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
4673611d576165121ec121e4d31b68c7350660357936cf442dd34f631b2ae258
/*================================================================================ Copyright (c) 2012 Steve Jin. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must re...
Java
src/com/vmware/vim25/DistributedVirtualSwitchInfo.java
xebialabs/vijava
bsd-3-clause
2,520
66
codeparrot/github-code
0b3f61ec25574ad2abf57c28b307233e5776a9d5ec4fdc60618af1122736c908
/* Copyright (c) 2006-2013, Alexis Royer, http://alexis.royer.free.fr/CLI All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the abo...
C++
cpp/src/ui_more.cpp
kn65op/cli-toolkit
bsd-3-clause
7,600
192
codeparrot/github-code
bef1410832f4cd20486b282ba6503b41af8409394041bf4ebd2ee47e87d31bec
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ash/arc/auth/arc_auth_service.h" #include <utility> #include <vector> #include "ash/components/arc/arc_browser_context_keyed_se...
C++
chromium/chrome/browser/ash/arc/auth/arc_auth_service.cc
ric2b/Vivaldi-browser
bsd-3-clause
31,607
799
codeparrot/github-code
77dc6764a998bf6c73cfbcee355e388ac4bd26677c4dddda83abd0116b2855b8
<?php /** * ScWidgets (https://github.com/dphn/ScWidgets) * * @author Dolphin <work.dolphin@gmail.com> * @copyright Copyright (c) 2013-2014 ScContent * @link https://github.com/dphn/ScWidgets * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ScWidgets\Controller; use Sc...
PHP
src/ScWidgets/Controller/SearchWidgetController.php
dphn/ScWidgets
bsd-3-clause
860
40
codeparrot/github-code
a2795e79d382298a4886586c1e6d698185ea36d28cbbae6549dcc78aa9b0854b
/* Javascript plotting library for jQuery, v. 0.5. * * Released under the MIT license by IOLA, December 2007. * */ (function($) { function Plot(target, data_, options_, plugins) { // data is on the form: // [ series1, series2 ... ] // where series is either just the data as [ [x1, y1]...
JavaScript
assets/javascript/jquery.flot.js
brosner/Cony
bsd-3-clause
95,053
2,380
codeparrot/github-code
02f8d3b550a8739dfda7393efbef8492a3ff4b879936134399ae80dde1227d17
<?php /* * @author: Allan C. Perez * @module: Mailing list Controller */ namespace MailingList\Controller; use MailingList\Model\MailingList; use Zend\Mvc\Controller\AbstractActionController; use MailingList\Form\MailingListForm; class MailingListController extends AbstractActionController { protected $mailin...
PHP
module/MailingList/src/MailingList/Controller/MailingListController.php
rachelleannmorales/aboitiz
bsd-3-clause
6,384
168
codeparrot/github-code
0d0d77b590b2fd0df0bbb31b1f510de2ed431015706b7279db06172142d6393f
/** * @ngdoc service * @name $ionicModal * @module ionic * @codepen gblny * @description * * Related: {@link ionic.controller:ionicModal ionicModal controller}. * * The Modal is a content pane that can go over the user's main view * temporarily. Usually used for making a choice or editing an item. * * Put ...
JavaScript
www/js/modal.js
gu1cortez/X-Nerd
bsd-3-clause
11,921
363
codeparrot/github-code
306946638a1adfb0a81bc4265988d3e507b14adbc5ed69510592c08879bfef31
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_EXTENSIONS_PERMISSIONS_UPDATER_H__ #define CHROME_BROWSER_EXTENSIONS_PERMISSIONS_UPDATER_H__ #include <memory> #include <strin...
C
chrome/browser/extensions/permissions_updater.h
endlessm/chromium-browser
bsd-3-clause
11,181
243
codeparrot/github-code
39bd98ad017d7c309032063b6b185db90930860d966afba9e33ccfad7d886366
///////////////////////////////////////////////////////////////////////////// // Name: src/x11/reparent.cpp // Purpose: wxWindow // Author: Julian Smart // Modified by: // Created: 2002-03-09 // Copyright: (c) Julian Smart // Licence: wxWindows licence /////////////////////////////////////////...
C++
update_notifier/thirdparty/wxWidgets/src/x11/reparent.cpp
ric2b/Vivaldi-browser
bsd-3-clause
8,024
284
codeparrot/github-code
bc1ebc48cb8df2755f0811d92d6d7b336d760593e42858f5a0c78d2963b5d798
#ifndef FVMPOR_H #define FVMPOR_H #include "definitions.h" #include "shape.h" #include <fvm/fvm.h> #include <fvm/mesh.h> #include <fvm/solver_compact.h> #include <fvm/physics_base.h> #include <util/intvector.h> #include <util/interpolation.h> #include <util/dimvector.h> #include <util/timer.h> #include <cublas.h> #...
C
examples/saltConfined/fvmpor.h
jackd/FVMPor
bsd-3-clause
48,039
1,186
codeparrot/github-code
dc30fa1e8d37d2480b83d5593ea216a40f26b8e9e0951e1fbe0f6266ef76dd7f
try: from primitives import Mem except ImportError: from mem import Mem import sys if sys.version >= '3': xrange = range class MMU(): def __init__(self, mem, size=0): """ Initialize MMU """ self._enabled = False self._mem = mem self._wordsize = 4 self._t...
Python
primitives/mmu.py
jroivas/cpus
bsd-3-clause
23,832
610
codeparrot/github-code
858aba73f2db8e90eca4d4e7f6c1549f5ddb7ac7a3e5ebcac2e8cb9a9578fa98
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/omnibox/browser/keyword_provider.h" #include <stddef.h> #include <map> #include <memory> #include <utility> #include "base/command...
C++
components/omnibox/browser/keyword_provider_unittest.cc
endlessm/chromium-browser
bsd-3-clause
25,605
619
codeparrot/github-code
18be3a17b867daff8ca5f0aa55485ffec343d144dbbfc3a7af623f8b1db59ee0
/****************************************************************************** * * PROJECT: Carnegie Mellon Planetary Rover Project * Task Control Architecture * * (c) Copyright 1991 Christopher Fedor and Reid Simmons. All rights reserved. * * MODULE: resources * * FILE: res.c * * ABSTRACT: * ...
C
src/res.c
languitar/ipc
bsd-3-clause
59,742
1,845
codeparrot/github-code
9c35823161337f315f4a37134f493bfdb3b6e2abd46fd9477a1a0cfaeb7a51f9
var appName; var popupMask; var popupDialog; var clientId; var realm; var redirect_uri; var clientSecret; var scopeSeparator; var additionalQueryStringParams; function handleLogin() { var scopes = []; var auths = window.swaggerUi.api.authSchemes || window.swaggerUi.api.securityDefinitions; if(auths) { var k...
JavaScript
Swashbuckle.Core/SwaggerUi/CustomAssets/swagger-oauth.js
bigtlb/Swashbuckle
bsd-3-clause
11,183
339
codeparrot/github-code
960fc5458f83f0ffe5248524b06a2a06f5073cc870d5b628f39ae4f7ec82b203
module Test.Cache(main) where import Development.Shake import Development.Shake.FilePath import System.Directory import Data.Char import Test.Type main = testBuild test $ do vowels <- newCache $ \file -> do src <- readFile' file liftIO $ appendFile "trace.txt" "1" pure $ length $ filter ...
Haskell
src/Test/Cache.hs
ndmitchell/shake
bsd-3-clause
2,096
75
codeparrot/github-code
d66617b3bdfd042d329dc17c25c07dbbb69e8bc07263901002c4d85568971897
#ifndef PARETO_NODE_HPP #define PARETO_NODE_HPP #include <core/forward_sampleable_node.hpp> #include <helper/node_counter.hpp> #include <string> #include <helper/abstract_node_factory.hpp> #include <math/distributions.hpp> namespace mcmc_utilities { template <typename T,template <typename TE> class T_vector> class...
C++
nodes/pareto_node.hpp
astrojhgu/mcmc_utilities
bsd-3-clause
1,919
86
codeparrot/github-code
bf6efbefba008f95f1c32b9bde66d07b23be5fcba6d386d01872b59ca5ba8b35
""" pyfire.contact ~~~~~~~~~~ Handles Contact ("roster item") interpretation as per RFC-6121 :copyright: 2011 by the pyfire Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import xml.etree.ElementTree as ET from sqlalchemy import Table, Column, Boolean, Integ...
Python
pyfire/contact.py
IgnitedAndExploded/pyfire
bsd-3-clause
3,814
125
codeparrot/github-code
e8dac21d4df9950cfe3ee111cc207cadc0f0ac129f84e4e23bda21b2954b0357
#include "orca_gazebo/orca_gazebo_util.h" void testGaussianKernel() { // Anything outside of 4 stddev on either side is an outlier, and go in the first and last buckets constexpr int NUM_BUCKETS = 10; constexpr double MEAN = NUM_BUCKETS / 2; constexpr double STDDEV = 1; constexpr double BUCKET_WIDTH = STDDE...
C++
orca_gazebo/src/test.cpp
clydemcqueen/orca
bsd-3-clause
795
34
codeparrot/github-code
ca8e63a9c8c7801eaf1280771036ff02ed6a73b3b8bf793385efa5aa6592faad
/** @file Export all functions in yuv-video to user @author Gilson Varghese<gilsonvarghese7@gmail.com> @date 13 Oct, 2016 **/ /** Module includes */ var frameReader = require(./lib/framereader); var frameWriter = require(./lib/framewriter); var frameConverter = require(./lib/frameconverter); /** Global var...
JavaScript
index.js
gilson27/yuv-video
bsd-3-clause
878
49
codeparrot/github-code
2886e0b7a11055e95fc479a3544cc670b69dc72452fbeb31e6e8c3ff47b1bd68
package name.falgout.jeffrey.throwing; import java.util.function.Consumer; import java.util.function.DoubleToIntFunction; import java.util.function.Function; import javax.annotation.Nullable; @FunctionalInterface public interface ThrowingDoubleToIntFunction<X extends Throwable> { public int applyAsInt(double value...
Java
throwing-interfaces/src/main/java/name/falgout/jeffrey/throwing/ThrowingDoubleToIntFunction.java
JeffreyFalgout/ThrowingStream
bsd-3-clause
1,457
44
codeparrot/github-code
f6da01addc8c4a4d89eb21688476c57f013573a789ed1d34dbf52b278a768354
@ECHO OFF REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set BUILDDIR=_build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . set I18NSPHINXOPTS=%SPHINXOPTS% . if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% set I18N...
Batchfile
docs/make.bat
nitishaggarwal/wed
bsd-3-clause
5,089
190
codeparrot/github-code
80f699b7f67266700569fdeb3d3937779ba22bd5fab325527ee446073924eb48
package com.hunterdavis.easyreptilewhistle; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import com.google.ads.AdRequest; import com.google.ads.Ad...
Java
src/com/hunterdavis/easyreptilewhistle/EasyReptileWhistle.java
huntergdavis/Easy_Reptile_Whistle
bsd-3-clause
3,184
112
codeparrot/github-code
0af071d04693b78ba3cc1e52dcd614b504b7264ddf106c9eba7f8515d863d871
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_CONNECTION_H_ #define EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_E...
C
extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_connection.h
endlessm/chromium-browser
bsd-3-clause
1,889
56
codeparrot/github-code
1e5b3a95ab4823ec369c71ec7edb0b58fb558ba83023a8542f5bc0f0504d9553
/** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @emails o...
JavaScript
src/legacy/store/__tests__/GraphQLSegment-test.js
venepe/relay
bsd-3-clause
16,171
506
codeparrot/github-code
1594a7117696900cfb529dd1d9db29faff180be124e6027063a10d73229e715c
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/test/test_simple_task_runner.h" #include "base/threading/thread.h" ...
C++
content/browser/indexed_db/indexed_db_unittest.cc
cvsuser-chromium/chromium
bsd-3-clause
9,106
264
codeparrot/github-code
563a6d0dec3274b1097899d0c2a918d009b8960e10a0fa974d9737b2369ecdba
-- IrDA sample System.irdaInit() ownCrossPressed = false otherCrossPressed = false gray = Color.new(64, 64, 64) white = Color.new(255, 255, 255) timeout = 10 while true do screen:clear() screen:print(0, 0, "IrDA sample", white) screen:print(0, 10, "start on 2 PSPs and press x", white) if ownCrossPressed then col...
Lua
Applications/IrDA/index.lua
Klozz/LuaPlayer
bsd-3-clause
1,162
62
codeparrot/github-code
018929eb4f49a813f32a430ddd30c8d292684ebb7a80994c22841a82fcf8b342
#include <pthread.h> #include <stdio.h> #include <string.h> #include <errno.h> #include <unistd.h> #include <assert.h> #define THREAD_SIZE 8 void *job1(void *arg) { pthread_t pid = pthread_self(); sleep(1); printf("job1: print %p\n", arg); printf("job1: pthread_self: %lu\n", pid); sleep(1); r...
C
cpp/stl/c/pthread/thread.c
zhaochenyou/Tips
bsd-3-clause
1,701
82
codeparrot/github-code
6ba0fdfb03cbfe24f4bc28663bc683ca06f855418f116c1cfeb0c7561a808c3e
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} -- | -- Module: $HEADER$ -- Description: TODO -...
Haskell
src/Data/DHT/DKS/Type/Message/UpdateSuccessorAck.hs
FPBrno/dht-dks
bsd-3-clause
1,038
43
codeparrot/github-code
89c4d91c02e49ddea5c8f029e5fdb6041f1600c1a6af12b896ecc26e5aba8521
package net.viperfish.bookManager.core; public abstract class TransactionWithResult<T> implements Transaction { private boolean isDone; private T result; protected void setResult(T result) { this.result = result; isDone = true; } /** * check whether this has finished executing * * @return is complet...
Java
src/main/java/net/viperfish/bookManager/core/TransactionWithResult.java
shilongdai/bookManager
bsd-3-clause
719
36
codeparrot/github-code
07394d7f6f4acc06b02276e21958018bdf7fc990d55cd2af4146567a5babd464
<?php namespace app\controllers; use Yii; use app\models\Engineering; use app\models\EngineeringSearch; use yii\web\Controller; use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; use yii\data\ActiveDataProvider; use app\models\Track; use yii\filters\AccessControl; use app\models\User; /** * EngineerCont...
PHP
controllers/EngineeringController.php
temirfe/colstat
bsd-3-clause
4,072
147
codeparrot/github-code
c68c1bc4a8845feb798b15b0e32d1c4632369416791744cbc62fdec647d083ac
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ #include "base/id_map...
C
content/child/service_worker/service_worker_dispatcher.h
cvsuser-chromium/chromium
bsd-3-clause
2,853
81
codeparrot/github-code
491795381f89bba7b49c1b7c1107a0ceb1d44844ec7fac1f3c367e0230c596e5
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "third_party/blink/public/common/interest_group/interest_group.h" #include <string> #include <tuple> #include <utility> #include <vector> #incl...
C++
chromium/third_party/blink/common/interest_group/interest_group.cc
ric2b/Vivaldi-browser
bsd-3-clause
5,558
170
codeparrot/github-code
fcba4d740e2dfff5c281c628f4835057eb047001ebcb2309922abd3a5ba0b14d
/////////////////////////////////////////////////////////////////////////////// // Name: src/common/textbuf.cpp // Purpose: implementation of wxTextBuffer class // Created: 14.11.01 // Author: Morten Hanssen, Vadim Zeitlin // Copyright: (c) 1998-2001 wxWidgets team // Licence: wxWindows licenc...
C++
update_notifier/thirdparty/wxWidgets/src/common/textbuf.cpp
ric2b/Vivaldi-browser
bsd-3-clause
7,614
271
codeparrot/github-code
7eb278d411834755444f7222ab79e4f027737e6087b61932f91b1af555c6e480
/* * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions ...
C++
third_party/WebKit/Source/core/page/CreateWindow.cpp
was4444/chromium.src
bsd-3-clause
11,465
241
codeparrot/github-code
c0f94308b0c410e50e78a5e9150b6f8a07b47b834ffb4184316e8d3c554e261c
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/app_list/start_page_service.h" #include <string> #include "base/command_line.h" #include "base/memory/singleton.h" #include ...
C++
chrome/browser/ui/app_list/start_page_service.cc
cvsuser-chromium/chromium
bsd-3-clause
4,978
148
codeparrot/github-code
4448ca7f5e548e7314b9d567963ad7d1e1a27587be210f12029aed2d7e75d070
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_PROVIDER_H_ #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_PROV...
C
chrome/browser/chromeos/policy/device_local_account_policy_provider.h
cvsuser-chromium/chromium
bsd-3-clause
2,666
69
codeparrot/github-code
00e0c0e4036ee2c8f60272cf006a66e9cb7541215c659323ff7780377cdb401c
package bridge import ( "fmt" "io/ioutil" "net" "os" "sync" "github.com/docker/docker/engine" "github.com/docker/docker/nat" "github.com/docker/docker/pkg/iptables" "github.com/docker/docker/pkg/networkfs/resolvconf" log "github.com/flynn/flynn/Godeps/_workspace/src/github.com/Sirupsen/logrus" "github.com/...
GO
Godeps/_workspace/src/github.com/docker/docker/daemon/networkdriver/bridge/driver.go
mubassirhayat/flynn
bsd-3-clause
16,206
543
codeparrot/github-code
56d981c4c1b43b5937904266c2848be5ec403a50578315b1571838c6f3e536f6
<?php /** * UrlView class file. * @copyright (c) 2015, bariew * @license http://www.opensource.org/licenses/bsd-license.php */ namespace bariew\yii2Tools\widgets; /** * This widget just runs app controller action an returns its response. * You may, for example, use it with rbac to deny rendering some parts of v...
PHP
widgets/UrlView.php
bariew/yii2-tools
bsd-3-clause
718
34
codeparrot/github-code
afb182387eb2c3116955d6119c39054159cd259f89654ad0e4f14fc56b50eda3
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SERVICES_DEVICE_SERIAL_SERIAL_PORT_MANAGER_IMPL_H_ #define SERVICES_DEVICE_SERIAL_SERIAL_PORT_MANAGER_IMPL_H_ #include <memory> #include "base/m...
C
chromium/services/device/serial/serial_port_manager_impl.h
ric2b/Vivaldi-browser
bsd-3-clause
4,165
102
codeparrot/github-code
b41e2ebf6bd000f12b028f413922d76e3777db523b83889f9ab2b477c5b027c2
""" Methods for exporting mediawiki pages & images to a dokuwiki data/ directory. Tested with Dokuwiki 2014-05-05 "Ponder Stibbons". Copyright (C) 2014 Angus Gratton Licensed under New BSD License as described in the file LICENSE. """ from __future__ import print_function, unicode_literals, absolute_import, division ...
Python
dokuwiki.py
lordofbikes/yamdwe
bsd-3-clause
10,121
223
codeparrot/github-code
5185c6067d7886b9dd43fbc95440d8a5921f43580ee9848dbce0c98934e1abed
#ifndef I_ASSET_PRESENTATION_PROVIDER_HPP #define I_ASSET_PRESENTATION_PROVIDER_HPP #include "core_data_model/i_item.hpp" namespace wgt { class IAssetObjectItem; /** IAssetPresentationProviderOld An interface to a class that can provide the specific presentation data for studio assets. Each studio or plugin will ...
C++
src/core/lib/core_data_model/asset_browser/i_asset_presentation_provider.hpp
wgsyd/wgtf
bsd-3-clause
1,148
35
codeparrot/github-code
00bb0f79baf944090e4e128db72fd3c3c910e2a9e8a8fcb069da712b33e31279
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/bind.h" #include "base/callback_helpers.h" #include "base/location.h" #include "base/memory/raw_ptr.h" #include "base/run_loop.h" #incl...
C++
chromium/chrome/browser/ui/views/web_dialog_view_browsertest.cc
ric2b/Vivaldi-browser
bsd-3-clause
11,795
334
codeparrot/github-code
8abf1a9ca10736ed627656cb93e8cc1e4473c7aeb01fda2ce1322c35075c6227
package main // safe -- 15.9ns/op // unsafe -- 1.6ns/op import ( "fmt" "syscall" "unsafe" ) // can we unsafe cast to unwrap all the interface layers? Or is the value in // memory different now? No! We have a new layer of indirection... func unsafeErr(err error) uintptr { if err != nil { p1 := (uintptr)(unsa...
GO
go/InterfaceValues/main.go
dterei/Scraps
bsd-3-clause
836
42
codeparrot/github-code
ee1d11b9b4e7486fcfd2d0a45ca137dd43e0181711039680274e08f372af3bc8
-- {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} -- {-# LANGUAGE MultiParamTypeClasses #-} -- {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE RecordWildCards #-} -- {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- {-# LANGUAGE MultiWayIf #-} -- {-# LANGUAGE OverloadedStrings #-} -- {-# LANGU...
Haskell
src/Pire/Refactor/Refactor.hs
reuleaux/pire
bsd-3-clause
34,059
1,287
codeparrot/github-code
bee492f33bb8b730747af2bde580d0f162ac17ee59d1e397d5523d3d32c8107c
/*- * Copyright (c) 2011-2012 Michihiro NAKAJIMA * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this lis...
C
FreeBSD/contrib/libarchive/libarchive/archive_write_set_format_7zip.c
TigerBSD/TigerBSD
isc
56,623
2,329
codeparrot/github-code
f6ccc8c6cea68dadf80ecac6a59c988cd339eca29baaac1832d4607069a540ac
/*- * Copyright (c) 2002 by Thomas Moestl <tmm@FreeBSD.org>. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * noti...
C
FreeBSD/usr.sbin/ofwdump/ofwdump.c
TigerBSD/TigerBSD
isc
6,219
251
codeparrot/github-code
cd806d548b495dedfdbc940c9ec9a0f2a42a10ed1c4a05b29af3b2908ebcde11
/* * svnlook.c: Subversion server inspection tool main file. * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional inf...
C
FreeBSD/contrib/subversion/subversion/svnlook/svnlook.c
eriknstr/ThinkPad-FreeBSD-setup
isc
92,775
2,860
codeparrot/github-code
7f54a56efcab716546592e6c75e27679d98cf66480152d46e45ea041d7bfce04
/* ** Copyright (c) 2007 D. Richard Hipp ** ** This program is free software; you can redistribute it and/or ** modify it under the terms of the Simplified BSD License (also ** known as the "2-Clause License" or "FreeBSD License".) ** This program is distributed in the hope that it will be useful, ** but without any w...
C
libdiffmerge/merge3.c
BBBSnowball/ori
isc
14,905
466
codeparrot/github-code
beea883e24d3ed2d865a0acdd8fac272cf344baffdd239c37378da62b6c47485
# $OpenBSD: cfgmatch.sh,v 1.9 2015/03/03 22:35:19 markus Exp $ # Placed in the Public Domain. tid="sshd_config match" pidfile=$OBJ/remote_pid fwdport=3301 fwd="-L $fwdport:127.0.0.1:$PORT" echo "ExitOnForwardFailure=yes" >> $OBJ/ssh_config echo "ExitOnForwardFailure=yes" >> $OBJ/ssh_proxy start_client() { rm -f $p...
Shell
FreeBSD/crypto/openssh/regress/cfgmatch.sh
TigerBSD/TigerBSD
isc
3,915
128
codeparrot/github-code
32e6dfbe781c039b02b3b4c2d4a10248f7f5792d7bb2f5ebab791d2c568b4818
package ameba.event; import ameba.core.AddOn; import ameba.core.Application; import ameba.lib.Akka; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @author icode */ public class EventTest { private static final Logger logger = LoggerFactory.getLogger(EventTest.class); ...
Java
src/test/java/ameba/event/EventTest.java
wangscript/ameba
mit
4,682
148
codeparrot/github-code
c6c90d1e58b2493c585bfbd0099886ba984d508580e33d17abf16f86c442dd50
Array.prototype.equals = function(array) { // if the other array is a falsy value, return if (!array) return false; // compare lengths - can save a lot of time if (this.length != array.length) return false; for (var i = 0, l = this.length; i < l; i++) { // Check if we have nested arrays if ...
JavaScript
source/js/background.js
rodrigopolo/EvenBetterTweetDeck
mit
7,269
282
codeparrot/github-code
874a8a65347082a13e569f7a1b9b7f029d29313a6b89a388e3ae2b19c95c64d7
<?php /** * WPSEO plugin file. * * @package WPSEO\Internals * @since 1.5.0 */ use Yoast\WP\SEO\Repositories\Indexable_Repository; /** * This class implements defaults and value validation for all WPSEO Post Meta values. * * Some guidelines: * - To update a meta value, you can just use update_post_meta() wi...
PHP
wp-content/plugins/wordpress-seo/inc/class-wpseo-meta.php
mandino/www.bloggingshakespeare.com
mit
35,326
1,023
codeparrot/github-code
67ba9b4c7c691e1d715e6bca28a0b62616cb2f01c007382996405df737c85597
package com.itl_energy.webcore; import java.util.Date; import javax.ejb.EJB; import javax.ejb.Stateless; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; import com.itl_energy.model.User; import com.itl_energy.repo.UserCollection; /** * Provides a means of authenticating users. * * @author...
Java
itlenergy-web/src/main/java/com/itl_energy/webcore/AuthenticationService.java
itlenergy/server-api
mit
4,476
137
codeparrot/github-code
9f7b883572b108f01ef652705f8520410c83ba0506a56938723588962e707a07
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------...
JavaScript
test/BigInt/increment.js
Microsoft/ChakraCore
mit
3,410
115
codeparrot/github-code
38b71d00de3c4e45b23360d1d4f4ad8ca0164e4fbd28026b0f8253a6a3840dc8
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Globalization; namespace System.Net.Http { public partial class HttpClientHandler : HttpMessageHan...
C#
src/System.Net.Http/src/System/Net/Http/HttpClientHandler.Core.cs
zhenlan/corefx
mit
2,844
74
codeparrot/github-code
1a84607f643541b940059f80e4b99a0f32579da85db67ca6f56848b126bbf504
<?php namespace Chamilo\Libraries\Calendar\Table\Type; use Chamilo\Libraries\Calendar\Table\Calendar; use Chamilo\Libraries\Platform\Translation; use Chamilo\Libraries\Utilities\Utilities; /** * A tabular representation of a day calendar * * @package libraries\calendar\table * @author Hans De Bisschop <hans.de.b...
PHP
src/Chamilo/Libraries/Calendar/Table/Type/DayCalendar.php
cosnicsTHLU/cosnics
mit
7,978
325
codeparrot/github-code
4ab6acdd03d0b11208ee899ac031c07ea4a400fb1c97a79a49945d712ad35e12
/* contourlet - Implementation of the contourlet transform for image coding Copyright (C) 2005 Vivien Chappelier - IRISA/University of Rennes 1 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foun...
C++
Contourlet_demo_src/pyramid.cpp
xiao00li/Undergraduate_Dissertation
mit
4,517
181
codeparrot/github-code
aed4a88f6196ed84c9b9988bfb180129cc5426685d7150b66e9e4d53a31c4bc6
using System.Text; namespace newtelligence.DasBlog.Util { public static class HttpHelper { public static string GetURLSafeString(string urlString) { if (urlString == null || urlString.Length == 0) return ""; StringBuilder retVal = new StringBuilder(urlString.Length); ...
C#
source/newtelligence.DasBlog.Util/HttpHelper.cs
shanselman/dasblog
mit
3,094
87
codeparrot/github-code
f7f98f0a50508c990b1f0f92e57cd498a63679373ec854e88871eefc30ad28b8
<?php namespace mobilejazz\yii2\oauth2server; use Yii; /** * For example, * * ```php * 'oauth2' => [ * 'class' => 'filsh\yii2\oauth2server\Module', * 'options' => [ * 'token_param_name' => 'accessToken', * 'access_lifetime' => 3600 * ], * 'storageMap' => [ * 'user_c...
PHP
Module.php
mobilejazz/yii2-oauth2-server
mit
5,562
218
codeparrot/github-code
b1825465d9414674504ccbc0af05d9541023014e04bcb5256556ce8c37d44897
package com.plugin.core; import java.io.File; import java.lang.reflect.Method; import com.plugin.content.PluginDescriptor; import com.plugin.util.LogUtil; import com.plugin.util.RefInvoker; import android.app.Application; import android.content.Context; import android.content.res.AssetManager; import android.content...
Java
PluginCore/src/com/plugin/core/PluginCreator.java
AronXue/Android-Plugin-Framework
mit
4,584
145
codeparrot/github-code
271e5f34487b63bd597cefd7e8a305053d86e8c077a08fa873095e0bd1472ff0
<?php class ModelToolSimpleimage extends Model { var $image; var $image_type; function load($filename) { $image_info = getimagesize($filename); $this->image_type = $image_info[2]; if( $this->image_type == IMAGETYPE_JPEG ) { $this->image = imagecreatefromjpeg($file...
PHP
extension/catalog/model/tool/simpleimage.php
productify/opencart-importer
mit
3,474
104
codeparrot/github-code
96f6193a1b23e083cb8d5388e7d19dbf7e1811b772449878c9ab5491585e605c
declare module "core/src/pointer/src/ByteArrayBase" { export class ByteArrayBase { static BIG_ENDIAN: string; static LITTLE_ENDIAN: string; static SIZE_OF_BOOLEAN: number; static SIZE_OF_INT8: number; static SIZE_OF_INT16: number; static SIZE_OF_INT32: number; ...
TypeScript
example/typing/xrenderer.d.ts
nidin/xrenderer
mit
65,223
1,563
codeparrot/github-code
4a348a07e28d9ad77d6dd2e8f2088020c941308ec127a09b939b505f72d722b9
/* * Copyright © 2010, Denys Vuika * * 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 agree...
C#
WpfPropertyGrid/Design/CategoryEditorContentPresenter.cs
Nixxis/ncs-client
mit
1,620
48
codeparrot/github-code
6ef2a5ce84c53bf8a55c4e885a97dc4441ffa43361aa97225174e3314db0e3f1
package fi.csc.microarray.messaging.message; import java.awt.Color; import java.util.LinkedList; import java.util.List; import javax.jms.JMSException; import javax.jms.MapMessage; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeLi...
Java
src/main/java/fi/csc/microarray/messaging/message/ModuleDescriptionMessage.java
chipster/chipster
mit
5,804
188
codeparrot/github-code
56ac7dced252f0bbcba9f8ce45b7aa8378794a4ca39f1a7c812a192be8b9ffe3
<?php /* * This file is part of the Aisel package. * * (c) Ivan Proskuryakov * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Aisel\ConfigBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; /**...
PHP
src/Aisel/ConfigBundle/Controller/ApiController.php
kamilkisiela/Aisel
mit
756
42
codeparrot/github-code
ad65bd868d82d37270d40d726c87b1099298ac5fa828c46eeaf21a844864c24f
import React, { Component } from 'react'; import { GoogleMapLoader, GoogleMap, Marker, SearchBox } from 'react-google-maps'; class CreateMapView extends Component { constructor(props) { super(props); this.state = { coordinates: '', }; this.handlePlacesChanged = this.handlePlacesChanged...
JavaScript
app/components/events/CreateMapView.js
Block-and-Frame/block-and-frame
mit
2,036
68
codeparrot/github-code
e3e8b7dc8866e6861f874d2f74c1a5cb69932887cc94b3870d65366a8edfe442
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using LeagueSharp; using LeagueSharp.Common; using SharpDX; using SharpDX.Direct3D9; namespace SAssemblies.Timers { class Altar { public static Menu.MenuItemSettings AltarTimer = new Men...
C#
SStandalones/STimers/SAltarTimer/Timers/Altar.cs
Screeder/SAssemblies
mit
9,997
256
codeparrot/github-code
2b72478151a8e366fcde8fd516f099e37cd85338451ac8634a09318325813e76
#include "f2c.h" #include "blaswrap.h" /* Subroutine */ int dgtts2_(integer *itrans, integer *n, integer *nrhs, doublereal *dl, doublereal *d__, doublereal *du, doublereal *du2, integer *ipiv, doublereal *b, integer *ldb) { /* System generated locals */ integer b_dim1, b_offset, i__1, i__2; /* Local v...
C
third_party/clapack/SRC/dgtts2.c
dacap/loseface
mit
6,452
250
codeparrot/github-code
b1d058d0ba30d9c10d535470f127f2ac3bb804198295dcdf920edffecb64f44d
# Copyright (c) 2014 Museum Victoria # This software is released under the MIT license (see license.txt for details) from Queue import * import threading import atexit remote_action_PowerOn = RemoteAction() remote_action_PowerOff = RemoteAction() remote_action_SetInput = RemoteAction() def local_action_activate(x = ...
Python
(retired)/pjlinkqueue/script.py
museumsvictoria/nodel-recipes
mit
1,588
56
codeparrot/github-code
a6c768e115346c6bda31bb8d03db26c9ca517905310dc995bfbbc2dfe234a3b2
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\SecurityBundle\Command; use Symfony\Component\Console\Co...
PHP
src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php
hason/symfony
mit
7,254
209
codeparrot/github-code
77152843e13c94e446eceebd0b2fa6da68d942208a2d596cbd5458bcf9f8df5b
/** * * @license * Copyright (C) 2017 Joseph Roque * * 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 ...
TypeScript
src/containers/welcome/EmptyMain.tsx
joseph-roque/uottawa-campus-guide
mit
1,861
71
codeparrot/github-code
d82984da2dd8b3cf841814551012bd2d6ea990a3b5f8a64c8816e2e65b39c6a6
/** * The MIT License * Copyright (c) 2015 Estonian Information System Authority (RIA), Population Register Centre (VRK) * * 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 restri...
Java
src/common-verifier/src/test/java/ee/ria/xroad/common/conf/globalconfextension/OcspFetchIntervalSchemaValidatorTest.java
ria-ee/X-Road
mit
2,959
72
codeparrot/github-code
4688cc4cac2ebbef3553d7652f1f0b925c0cea4a647bbedaf8c363583f0e04f0
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Rationale</title> <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="...
HTML
deps/boost_1_77_0/doc/html/boost_stlinterfaces/rationale.html
davehorton/drachtio-server
mit
16,560
178
codeparrot/github-code
d86f612d026bda7cfc2ee2773e73a8890c7eae4c344c975ce95b8bc7eb30d24a
module MergeRequests class BaseService < ::IssuableBaseService def create_note(merge_request) SystemNoteService.change_status(merge_request, merge_request.target_project, current_user, merge_request.state, nil) end def create_title_change_note(issuable, old_title) removed_wip = old_title =~ ...
Ruby
app/services/merge_requests/base_service.rb
larryli/gitlabhq
mit
2,172
68
codeparrot/github-code
436d0712931e61cb518f1dc7392916e56c683ea6e3a4c7937c618cd53d826680
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; using System.Text; using System.Thread...
C#
src/Microsoft.Diagnostics.Runtime/Utilities/SymbolLocator.Async.cs
tomasr/clrmd
mit
28,210
659
codeparrot/github-code
f9213a2a0ea77b008042b162845891dce6fc6fca1f1c582088ca0c9f3f68f314
// Copyright (c) 2014 The Darkcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "keepass.h" #include <exception> #include <openssl/rand.h> #include <boost/lexical_cast.hpp> #include <boost/foreach.hpp...
C++
src/keepass.cpp
industrialcoinmagic/crave
mit
16,769
495
codeparrot/github-code
5f2c6463f220cd7973d0ea2ed5886c774c01f954fa5e881a88adef36c8a2d1bd
// // Created by Andrew Podkovyrin // Copyright © 2020 Dash Core Group. All rights reserved. // // Licensed under the MIT License (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://opensource.org/licenses/MIT // // Unless ...
C
DashWallet/Sources/UI/DashPay/Contacts/DWBaseContactsContentViewController+DWProtected.h
QuantumExplorer/breadwallet
mit
1,870
44
codeparrot/github-code
0c1dfaf5ae160eb395ca3d776316289134c9d96ee9ffb97a5775878ad8d569b2
using System; using System.IO; using System.Net; namespace FluentMnistDemo { internal class DataSets { private const string urlMnist = @"http://yann.lecun.com/exdb/mnist/"; private const string mnistFolder = @"..\Mnist\"; private const string trainingLabelFile = "train-labels-idx1-ubyte...
C#
Examples/FluentMnistDemo/DataSets.cs
cbovar/ConvNetSharp
mit
3,189
80
codeparrot/github-code
80c6e31a3ead8b6388b0fc554da33683ed6f82d9d039b996929abc2a410392a1
/** * @file Frustum.cpp * * @author Jan Dušek <xdusek17@stud.fit.vutbr.cz> * @date 2013 */ #include "Frustum.h" enum Planes { TOP, BOTTOM, LEFT, RIGHT, NEAR, FAR }; Frustum::Frustum(const glm::mat4& vp) { // transpose matrix, so we can access rows via [] operator auto m = glm::transpose(vp); m_planes[TOP] =...
C++
src/utils/Frustum.cpp
Zycon42/ShadingMethods
mit
1,714
61
codeparrot/github-code
09511d17a1d4b7f3c2da7c50b4589b8dfccec65ac986a6255fc4cd62340974d3
'''The Example from Huang and Darwiche's Procedural Guide''' from __future__ import division from bayesian.factor_graph import * from bayesian.utils import make_key def f_a(a): return 1 / 2 def f_b(a, b): tt = dict( tt=0.5, ft=0.4, tf=0.5, ff=0.6) return tt[make_key(a, b)...
Python
bayesian/examples/factor_graphs/huang_darwiche.py
kamijawa/ogc_server
mit
1,341
82
codeparrot/github-code
e0515c7780a610692d7f84f18b69f8cae6fa8701fe071ad9dc81e2d03ea09553
//----------------------------------------------------------------------------- // Verve // Copyright (C) - Violent Tulip //----------------------------------------------------------------------------- #ifndef _VT_VSPAWNSPHEREGROUP_H_ #define _VT_VSPAWNSPHEREGROUP_H_ #ifndef _VT_VSCENEOBJECTGROUP_H_ #include "Verve/E...
C
Templates/Verve/source/Verve/Extension/Game/VSpawnSphereGroup.h
AnteSim/Verve
mit
776
30
codeparrot/github-code
f80396bdd1f9aa072c10b57281594682eaed926fd1a86faf009f38ada3534795
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. using System.Threading; using System.Threading.Tasks; using Azure.Messaging.EventHubs.Producer; using Microsoft.Azure.WebJobs.Logging; using Microsoft.Extensions.Loggi...
C#
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/EventHubProducerClientImpl.cs
Azure/azure-sdk-for-net
mit
1,390
36
codeparrot/github-code
14c4d13800674c4b85d050f93073a4111aa68092a91b8ae5e54f4d868dfcc04b
'use strict'; var util = require('util'); var GtReq = require('../GtReq'); var BaseTemplate = require('./BaseTemplate'); function IncTemplate(options) { BaseTemplate.call(this, options); options = util._extend({ transmissionContent: '', incAppId: '' }, options); util._extend(th...
JavaScript
libraries/getuiLibs/getui/template/IncTemplate.js
hardylake8020/youka-server
mit
2,108
75
codeparrot/github-code
526fbb46fcb7a3d212a7ff395bf2ae83f319733de4029596307316dcf437359d
/** * @module ember-paper */ import Ember from 'ember'; import RippleMixin from '../mixins/ripple-mixin'; import ProxyMixin from 'ember-paper/mixins/proxy-mixin'; const { get, set, isEmpty, computed, run, Component } = Ember; /** * @class PaperItem * @extends Ember.Component * @uses ProxyMixin * @us...
JavaScript
addon/components/paper-item.js
tmclouisluk/ember-paper
mit
3,910
127
codeparrot/github-code
cd2454eb8cea6f65f0ed2cec91242b3443d0d9ffbd471f28e0ddbcf7ab1ece76
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width" /> <link rel="shortcut icon" type="image/x-icon" href="../../../favicon.ico" /> <title>And...
HTML
tools/sdk/preview/features.html
terrytowne/android-developer-cn
mit
26,160
731
codeparrot/github-code
d76b74ace83e842ff1283d8279d8b730f11b8948ff5660eaa6de9b69c0b371b7
function char2int(c) { return c.charCodeAt(0); } var hexD = [ '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' ]; hexD = ['0'].concat(hexD); function hex(number) { var str = ""; str = hexD[number&0xf] + str str = hexD[(number>>=4)&0xf] + str ; str = hexD[(number>>=4)&0xf]...
JavaScript
src/util.js
Jazzling/jazzle-parser
mit
1,655
71
codeparrot/github-code
bf53e36ebc535d78172f5fb5a9cfe62a75437e92d1b4f70d6f938ff81c3bf6ad
--- layout: post title: "Kotlin で RESTful API を開発する" metatitle: "Kotlin で RESTful API を開発する" description: "Kotlin と Spring Boot で RESTful API を構築してセキュアにしましょう" metadescription: "Kotlin と Spring Boot で RESTful API を構築してセキュアにしましょう" date: 2017-06-22 19:41 category: Technical guide, Backend, Kotlin author: name: "Bruno Kr...
Markdown
_posts/2017-06-22-jp-developing-restful-apis-with-kotlin.markdown
kmaida/blog
mit
27,969
657
codeparrot/github-code
07635d5392a6097a1ea5661ed9962928c54925f28f92355059ba0475a75b1b25
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from sqlalchemy.ext.declarative import declared_attr from indico...
Python
indico/core/db/sqlalchemy/review_comments.py
mvidalgarcia/indico
mit
2,710
108
codeparrot/github-code
6d6e3550739f7e4ab361eb21c8a6d91732981e3ec53f6df6a05ac5c761099d1e
package scalariform.formatter import scala.PartialFunction._ import scalariform.formatter.Alignment._ import scalariform.formatter.preferences._ import scalariform.lexer.Token import scalariform.parser._ import scalariform.utils.Utils trait CaseClauseFormatter { self: HasFormattingPreferences with ExprFormatter with ...
Scala
scalariform/src/main/scala/scalariform/formatter/CaseClauseFormatter.scala
scala-ide/scalariform
mit
9,283
209
codeparrot/github-code
42f8341d6bb0f1a763a500b6f9aa02dfbfc91d06870dab9b86bca0df8fddb7e7
<?php declare(strict_types=1); namespace Ray\Aop; use Ray\Aop\Exception\InvalidMatcherException; use ReflectionClass; use ReflectionMethod; use function assert; use function class_exists; use function ucwords; class BuiltinMatcher extends AbstractMatcher { /** @var string */ private $matcherName; /** ...
PHP
src/BuiltinMatcher.php
ray-di/Ray.Aop
mit
1,376
57
codeparrot/github-code
b271cb6a1ab30c8cc2859f66b72c41fb2dafa87b2d951da9c3fd0fd1cd59380f
import functools import sys import traceback from stacked import Stacked from .xtraceback import XTraceback class TracebackCompat(Stacked): """ A context manager that patches the stdlib traceback module Functions in the traceback module that exist as a method of this class are replaced with equival...
Python
xtraceback/tracebackcompat.py
g2p/xtraceback
mit
3,453
93
codeparrot/github-code
881eb35f23d535e06190b033152f0a45db2c6aed662fa6a539ebff774f741548
package main import ( "github.com/Terry-Mao/goim/define" "sync" "time" ) type Bucket struct { bLock sync.RWMutex // protect the session map sessions map[int64]*Session // map[user_id] -> map[sub_id] -> server_id counter map[int32]int32 // map[roomid] -> count, if noroom then all cleaner *Cleaner...
GO
router/bucket.go
vincentqiu/goim
mit
3,639
178
codeparrot/github-code
cdbc73f7bf9064018c42ef7750999ca85649f937107bfd6befe5f12ce0913ebd
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* This file contains the code to check for shadowed variables. A shadowed variable is a variable declared in an inner scope with the same name and type as a va...
GO
go.tools/cmd/vet/shadow.go
wolf20xx/goslide_sample
mit
6,542
228
codeparrot/github-code
a92dc749c70aaaba3d67350b6dffda02d2b5554a67ac195956d0c02ecba9334c
import urllib2, json, time, sys from datetime import date, datetime from dateutil.rrule import rrule, DAILY from optparse import OptionParser parser = OptionParser() parser.add_option("-f", dest="fahrenheit", action="store", default=False, type="string", help="Convert to FAHRENHEIT") parser.add_option("-e", dest="end"...
Python
src/wunderground.py
heatseeknyc/data-science
mit
2,014
78
codeparrot/github-code
a04b5e37aa1e285c38d7d0e433f57996ab3e768c5afcbf159b3a80c74248b3ef
using System; using System.Reflection; using OrigoDB.Core.Proxying; namespace OrigoDB.Core { /// <summary> /// Used to mark non-void methods as commands so they won't be interpreted as queries. /// Can also be used to map methods to a domain specific command type /// </summary> [AttributeUsage(Attr...
C#
src/OrigoDB.Core/Proxying/CommandAttribute.cs
mm999/OrigoDB
mit
1,203
38
codeparrot/github-code
1d4efebe89e51713dffe86a86ad714737029b2c7b202b6735f17cbb64de02716
using System; using System.Collections.Generic; using System.Reflection; namespace JinianNet.TengSnake { /// <summary> /// 类型方法集合 /// </summary> public class MethodCollection : IDictionary<string, ExcuteMethodInfo> { private Dictionary<string, ExcuteMethodInfo> dictionary; /// <su...
C#
src/JinianNet.TengSnake/MethodCollection.cs
jiniannet/NAjax
mit
8,222
269
codeparrot/github-code
8e6b6dda6a1a861003c46b366e5afb4d207b596b61ee16aa7cf40665397384c3
public class SimpleOrderSystem { public static void main(String[] args) { Input in = new Input(); // The model is responsible for managing the data structure and the operations on it. SimpleOrderSystemModel model = new DataManager(); initialiseExampleData(model); // Create objects to ...
Java
Term2/OOP/Lab3/SimpleOrderSystem/src/SimpleOrderSystem.java
martrik/COMP101
mit
1,774
49
codeparrot/github-code
28208daa03fee2e1d67d6188530a1e990af5ba81806fd211f723d2e7ddf701f6
/* Azure Media Services REST API v2 Function This function deletes the files from a specific asset. Input: { "assetId" : "the Id of the asset", "startsWith" : "video", //optional, delete only files that start with name video "endsWith" : ".mp4", //optional, delete only files that end with .mp4 } Output:...
C#
media-functions-for-logic-app/functions/delete-asset-files.cs
shigeyf/media-services-dotnet-functions-integration
mit
3,444
97
codeparrot/github-code
a4dedd4a0641763704509e65af4c539ffb6f84eae37d87624abfc1a00334749b
/* eslint-env mocha */ /* global expect, testContext */ /* eslint-disable prefer-arrow-callback, no-unused-expressions */ import factory from 'src/test/factories' import {resetDB, runGraphQLMutation, useFixture} from 'src/test/helpers' import {Cycle} from 'src/server/services/dataService' import {COMPLETE, PRACTICE} fr...
JavaScript
src/server/graphql/mutations/__tests__/saveRetrospectiveSurveyResponses.test.js
ian-deans/echo
mit
2,217
61
codeparrot/github-code
8636764b1f9f29c1290bff39be2e55940d6b7f7a071f33f967b72d5eff27b0c6
// Type definitions for webpack-sources 1.4 // Project: https://github.com/webpack/webpack-sources // Definitions by: e-cloud <https://github.com/e-cloud> // Chris Eppstein <https://github.com/chriseppstein> // Piotr Błażejewicz <https://github.com/peterblazejewicz> // Definitions: https...
TypeScript
types/webpack-sources/index.d.ts
dsebastien/DefinitelyTyped
mit
7,186
222
codeparrot/github-code