doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
bfdff3ce-0fab-42ec-be5d-f44b1ef9372a | {
"language": "BitBake"
} | ```bitbake
```
Use this to compile full image and produce extra-packages | ```bitbake
# Creates the "feed", packages not required for the image
# but that should be built for the feed so that other
# components may use them and install on demand.
require blackpole-image.bb
DEPENDS += "${OPTIONAL_PACKAGES}"
``` |
cb158fd2-fb89-45e9-b031-e32b83386a59 | {
"language": "BitBake"
} | ```bitbake
```
Add debug image with no modules for kernel dev work | ```bitbake
DESCRIPTION = "A console kernel development image, no modules"
LICENSE = "MIT"
IMAGE_FEATURES += "package-management"
IMAGE_LINGUAS = "en-us"
inherit core-image
CORE_OS = " \
busybox-hwclock \
task-core-ssh-openssh openssh-keygen \
term-prompt \
tzdata \
"
DEV_SDK_INSTALL = " \
binut... |
f33adcbe-8547-49e8-8a6d-880bde3f74ef | {
"language": "BitBake"
} | ```bitbake
```
Update libao to latest version | ```bitbake
LICENSE = "GPL"
DESCRIPTION = "A cross platform audio library"
HOMEPAGE = "http://www.xiph.org/ao/"
SECTION = "libs"
PRIORITY = "optional"
PR = "r0"
SRC_URI = "http://www.xiph.org/ao/src/libao-${PV}.tar.gz"
inherit autotools pkgconfig
EXTRA_OECONF = "--disable-esd --disable-esdtest \
--disable-alsa --di... |
90b4f6fa-2a9f-471b-a919-b3945978ad19 | {
"language": "BitBake"
} | ```bitbake
```
Add recipe for xapian-core package | ```bitbake
SUMMARY = "This package contains the core Xapian runtime library"
DESCRIPTION = "\
The Xapian search engine library is a highly adaptable toolkit which allows \
developers to easily add advanced indexing and search facilities to their own \
applications. It implements the probabilistic model of informati... |
54c3e293-c56e-47c3-9255-c3d9289c8c8b | {
"language": "BitBake"
} | ```bitbake
MAINTAINER = "Koen Kooi <Koen@dominion.kabel.utwente.nl>"
HOMEPAGE = "http://tapioca-voip.sourceforge.net/wiki/index.php/Tapioca"
LICENSE = "LGPL"
DEPENDS = "gtk+ glib-2.0 dbus gconf tapioca-xmpp tapioca farsight gst-plugins-farsight"
inherit autotools pkgconfig
SRC_URI = "${SOURCEFORGE_MIRROR}/tapioca-voi... | ```bitbake
MAINTAINER = "Koen Kooi <Koen@dominion.kabel.utwente.nl>"
HOMEPAGE = "http://tapioca-voip.sourceforge.net/wiki/index.php/Tapioca"
LICENSE = "LGPL"
DEPENDS = "gtk+ glib-2.0 dbus gconf tapioca-xmpp tapioca farsight gst-plugins-farsight"
RDEPENDS = "tapioca-xmpp"
PR = "r1"
inherit autotools pkgconfig
SRC_URI ... |
eaa4b644-db08-41c5-bd70-64a8fcd7be9e | {
"language": "BitBake"
} | ```bitbake
```
Add recipe for insserv package | ```bitbake
#
# base recipe: http://cgit.openembedded.org/cgit.cgi/openembedded-core/tree/meta/\
# recipes-devtools/insserv/insserv_1.14.0.bb?h=fido
# base branch: fido
# base commit: f0873b83d693af4a103999160d67fcf25c7eedc1
#
SUMMARY = "Boot sequence organizer using LSB init.d dependencies"
DESCRIPTION = "This ... |
1cdecde8-c9a4-44c9-a71e-d85b2d1a0d26 | {
"language": "BitBake"
} | ```bitbake
```
Add recipe for libyaml package | ```bitbake
SUMMARY = "Fast YAML 1.1 parser and emitter library"
DESCRIPTION = "LibYAML is a C library for parsing and emitting data in YAML 1.1, a \
human-readable data serialization format."
HOMEPAGE = "http://pyyaml.org/wiki/LibYAML"
PR = "r0"
inherit debian-package
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICEN... |
9c59103e-ebf4-4937-99d3-86850cf3932b | {
"language": "BitBake"
} | ```bitbake
```
Add recipe for dsh package | ```bitbake
SUMMARY = "dancer's shell, or distributed shell"
DESCRIPTION = "\
Executes specified command on a group of computers using remote shell \
methods such as rsh or ssh. \
dsh can parallelise job submission using several algorithms, such as using \
fan-out method or opening as much connections as possible, o... |
29767c4a-23bc-4bd9-8ddc-04eb0f41bb05 | {
"language": "BitBake"
} | ```bitbake
DESCRIPTION = "Evince is simply a document viewer"
LICENSE = "GPL"
DEPENDS = "tiff espgs poppler gtk+ libgnomeui libgnomeprint libgnomeprintui"
RDEPENDS = "espgs gconf"
RRECOMMENDS = "gnome-vfs-plugin-file"
PR = "r0"
inherit gnome pkgconfig
SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/evince/0.5/${PN}... | ```bitbake
DESCRIPTION = "Evince is a document viewer for document formats like pdf, ps, djvu."
LICENSE = "GPL"
SECTION = "x11/office"
DEPENDS = "tiff espgs poppler gtk+ libgnomeui libgnomeprint libgnomeprintui"
RDEPENDS = "espgs gconf"
RRECOMMENDS = "gnome-vfs-plugin-file"
PR = "r1"
inherit gnome pkgconfig
SRC_URI =... |
8100867e-ee1f-4342-8220-04cbd1cf7b5f | {
"language": "BitBake"
} | ```bitbake
```
Add python library pamela which supports PAM | ```bitbake
DESCRIPTION = "Pamela: yet another Python wrapper for PAM"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://PKG-INFO;md5=bfb663f37eb99232bc8ccfa4ea8f1202"
SRC_URI[md5sum] = "de6516118d51eb5fc97017f3b6d5c68b"
SRC_URI[sha256sum] = "1e198446a6cdd87704aa0def7621d62e7c20b0e6068e2788b9a866a8355e5d6b"
PYPI_PACKAGE = "p... |
ba1c4b5a-c7a1-4c05-af9c-000bff9a3229 | {
"language": "BitBake"
} | ```bitbake
```
Add recipe for compiling clk_wiz driver | ```bitbake
inherit features_check
REQUIRED_DISTRO_FEATURES = "clk-wiz"
inherit esw python3native
DEPENDS += "xilstandalone"
ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/clk_wiz/src/"
ESW_COMPONENT_NAME = "libclk_wiz.a"
addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
do_pre... |
f21ee2a6-cb39-4e26-b06a-e6698cd9b83e | {
"language": "BitBake"
} | ```bitbake
```
Add recipe for psmisc package | ```bitbake
#
# base recipe: /meta/recipes-extended/psmisc/psmisc_22.21.bb
# base branch: master
# base commit: e335d9519c883165e70cda5c1fde348391686e31
#
SUMMARY = "Utilities for managing processes on your system"
DESCRIPTION = "The psmisc package contains utilities for managing processes \
on your system: pstree, kil... |
f613eac3-81d9-4da8-9378-72115f0fcac3 | {
"language": "BitBake"
} | ```bitbake
```
Add recipe for tftp-hpa package | ```bitbake
#
# base recipe: http://cgit.openembedded.org/cgit.cgi/meta-openembedded/tree/\
# meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb?
# base branch: master
# base commit: 98842e4e9f53f5f8614dd583dde9f5e898aadbb2
#
SUMMARY = "Client for the Trivial File Transfer Protocol"
DESCRIPTION = \
"Th... |
dabe1990-a6aa-466a-b9bd-87e2737f9737 | {
"language": "BitBake"
} | ```bitbake
```
Add recipe for passwdqc package | ```bitbake
DESCRIPTION = "password strength checking and policy enforcement toolset"
PR="r0"
inherit debian-package autotools-brokensep
LICENSE = "BSD & PD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1b4af6f3d4ee079a38107366e93b334d"
DEPENDS += "libpam"
do_compile_prepend_class-target() {
sed -i -e "s/^CC = gcc/CC = ... |
be923b3a-9431-4ab2-ab46-d7aa33fa2815 | {
"language": "BitBake"
} | ```bitbake
```
Upgrade to latest version with HEVC content. | ```bitbake
DESCRIPTION = "AMSDK multimedia support files"
HOMEPAGE = "https://gforge.ti.com/gf/project/am_multimedia/"
LICENSE = "CC-BY-NC-ND-3.0 & CC-BY-3.0"
SECTION = "multimedia"
LIC_FILES_CHKSUM = "file://Multimedia_Data_Files_Manifest.doc;md5=9254447a504d2179d83a6bc9e2c28142"
PR = "r0"
COMPATIBLE_MACHINE = "(omap... |
34476325-a440-4432-98b9-50c6595feb46 | {
"language": "BitBake"
} | ```bitbake
```
Add a bitbake recipe to build logutils | ```bitbake
SUMMARY = "Go package that augments the standard library "log" package"
HOMEPAGE = "https://github.com/hashicorp/logutils"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b278a92d2c1509760384428817710378"
PKG_NAME = "github.com/hashicorp/logutils"
SRC_URI = "git://${PKG_NAME}.git"
SRCREV = "0dc08... |
dde8ecf2-c03e-4842-94fc-2de9962507a3 | {
"language": "BitBake"
} | ```bitbake
```
Add recipe for python-setuptools package. | ```bitbake
# base recipe: meta/recipes-devtools/python/python-setuptools_40.8.0.bb
# base branch: warrior
DESCRITPION = "Python Distutils Enhancements"
SUMMARY = "Extensions to the python-distutils for large or complex distributions."
require recipes-devtools/python/python-setuptools.inc
inherit debian-package
requi... |
55f50a41-a624-4462-a29c-3967e2259fa4 | {
"language": "BitBake"
} | ```bitbake
```
Add new release if gpe-mixer. | ```bitbake
LICENSE = "GPL"
PR = "r0"
inherit gpe pkgconfig
DESCRIPTION = "GPE audio mixer"
DEPENDS = "gtk+ libgpewidget"
SECTION = "gpe"
PRIORITY = "optional"
``` |
e0f1a7df-2300-4356-8086-2c8f6d96a35a | {
"language": "BitBake"
} | ```bitbake
```
Add new recipe for opentyrian-hg | ```bitbake
DESCRIPTION = "OpenTyrian is a port of the DOS shoot-em-up Tyrian."
HOMEPAGE = "https://code.google.com/p/opentyrian/"
SECTION = "games"
LICENSE = "GPLv2"
DEPENDS = "virtual/libsdl libsdl-net"
REV = "3f3819c0b2"
PV = "2.1+hg${REV}"
PR = "r0"
SRC_URI = "hg://opentyrian.googlecode.com/hg;module=opentyrian;r... |
11b5f5e6-2b15-43b6-9bb8-ab4b5a48f8cb | {
"language": "BitBake"
} | ```bitbake
```
Add recipe for Azure IoT device python SDK | ```bitbake
SUMMARY = "Microsoft Azure IoT Device Library"
AUTHOR = "Microsoft Corporation"
HOMEPAGE = "https://github.com/Azure/azure-iot-sdk-python/tree/master/azure-iot-device"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
inherit pypi setuptools3
... |
5e538e06-9403-4bbb-b844-b0090de31600 | {
"language": "BitBake"
} | ```bitbake
```
Add cryptography example C applications | ```bitbake
DESCRIPTION = "TI Cryptography Example Applications"
HOMEPAGE = "http://arago-project.org/git/projects/?p=crypto-example-apps.git;a=summary"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://AES/aes_256.c;beginline=9;endline=35;md5=8edbb4dee965d2f2eb5ca2822addcae5"
SECTION = "console"
PR = "r0"
BRANCH ?= "master"... |
e249aae7-8f0c-465a-808b-2ec4e8a777df | {
"language": "BitBake"
} | ```bitbake
```
Add bitbake recipe to build consul | ```bitbake
DESCRIPTION = "A tool for discovering and configuring services in your infrastructure"
HOMEPAGE = "https://www.consul.io/"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b278a92d2c1509760384428817710378"
DEPENDS += "golang-cross \
circbuf \
consul-migrate \
go-checkpoint \
go-msg... |
a857047a-a5fc-4909-bde3-f2ed1927352e | {
"language": "BitBake"
} | ```bitbake
DESCRIPTION = "Action GUI for Installer"
HOMEPAGE = "http://assassin.projects.openmoko.org/"
LICENSE = "GPL"
DEPENDS = "dbus (>= 1.1.1) glib-2.0 e-wm packagekit etk edbus eet"
RDEPENDS = "etk-theme-ninja"
PV = "0.2+svnr${SRCREV}"
PR = "r6.03"
SRC_URI = "svn://svn.projects.openmoko.org/svnroot/;module=assass... | ```bitbake
DESCRIPTION = "Action GUI for Installer"
HOMEPAGE = "http://assassin.projects.openmoko.org/"
LICENSE = "GPL"
DEPENDS = "dbus (>= 1.1.1) glib-2.0 e-wm packagekit etk edbus eet curl"
RDEPENDS = "etk-theme-ninja"
PV = "0.2+svnr${SRCREV}"
PR = "r6.02"
SRC_URI = "svn://svn.projects.openmoko.org/svnroot/;module=a... |
8d12563f-1007-4c14-8456-67b04842c2c4 | {
"language": "BitBake"
} | ```bitbake
DESCRIPTION = "Action GUI for Installer"
HOMEPAGE = "http://assassin.projects.openmoko.org/"
LICENSE = "GPL"
DEPENDS = "dbus (>= 1.1.1) glib-2.0 e-wm packagekit etk edbus eet curl"
RDEPENDS = "etk-theme-ninja"
PV = "0.2+svnr${SRCREV}"
PR = "r6.02"
SRC_URI = "svn://svn.projects.openmoko.org/svnroot/;module=a... | ```bitbake
DESCRIPTION = "Action GUI for Installer"
HOMEPAGE = "http://assassin.projects.openmoko.org/"
LICENSE = "GPL"
DEPENDS = "dbus (>= 1.1.1) glib-2.0 e-wm packagekit etk edbus eet"
RDEPENDS = "etk-theme-ninja"
PV = "0.2+svnr${SRCREV}"
PR = "r6.03"
SRC_URI = "svn://svn.projects.openmoko.org/svnroot/;module=assass... |
db4eb881-c45f-4785-a959-b7d841d89e30 | {
"language": "BitBake"
} | ```bitbake
```
Add recipe for libdshconfig package | ```bitbake
DESCRIPTION = "\
Runtime library for configuration file parser,required for running \
programs with dsh config file support. \
dsh uses this library to parse configuration files."
PR = "r0"
inherit debian-package
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"... |
6a1ce8e0-eaa7-404a-81e3-63ac8558a374 | {
"language": "BitBake"
} | ```bitbake
```
Add network manager addon for XBMC | ```bitbake
DESCRIPTION = "XBMC network manager addon"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7226e01ff2d738e2246d467214c409b9"
DEPENDS += "xbmc"
PR = "r0"
SRC_URI = "http://mirrors.xbmc.org/addons/frodo/script.linux.nm/script.linux.nm-0.1.4.zip"
SRC_URI[md5sum] = "918ffb412b571d3e0e00f1d8a7e9e4fb... |
7b56da22-3f46-4028-a360-0b4c1e7a30b4 | {
"language": "BitBake"
} | ```bitbake
```
Add recipe for libdatetime-perl package | ```bitbake
SUMMARY = "module for manipulating dates, times and timestamps"
DESCRIPTION = "\
DateTime is a Perl module which aims to provide a complete, correct, and easy \
to use date/time object implementation. It provides an easy way to manipulate \
dates and times, including date calculations (even addition and subt... |
b3cd0de4-41c0-47f1-87d7-fa5b925f7645 | {
"language": "BitBake"
} | ```bitbake
```
Add recipe for libjson-perl package | ```bitbake
SUMMARY = "module for manipulating JSON-formatted data"
PR = "r0"
inherit debian-package
LICENSE = "GPL-1+"
LIC_FILES_CHKSUM = "file://README;md5=309aa8b91686700797df6e79ceb678f0"
inherit cpan
FILES_${PN} += "${datadir}"
BBCLASSEXTEND = "native nativesdk"
``` |
6fec3509-81fb-4f47-9766-1ff1813be489 | {
"language": "BitBake"
} | ```bitbake
```
Add PSP version for ti816x devices. | ```bitbake
require u-boot-omap3.inc
COMPATIBLE_MACHINE = "ti816x"
BRANCH = "master"
# Use literal tags in SRCREV, when available, instead of commit IDs
SRCREV = "v2010.06_TI816XPSP_04.00.00.10"
UVER = "2010.06"
PSPREL = "04.00.00.10"
PR = "r1"
``` |
3dec743b-37b6-4fc9-a3f5-94505d99f08a | {
"language": "BitBake"
} | ```bitbake
```
Add recipe for target, native and nativesdk use | ```bitbake
SUMMARY = "UpdateHub utilities for update package management and server"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d7d0c756730e640e1731676efa6782e9"
SRC_URI = "git://github.com/UpdateHub/uhu.git;protocol=https"
SRCREV = "fed71af14f79fdc8db8da90f63b8b3d59ea93174"
PV = "... |
7061cac9-97b1-4651-b31c-8f415c343869 | {
"language": "BitBake"
} | ```bitbake
LICENSE = "BSD-X"
SECTION = "x11/libs"
PRIORITY = "optional"
DEPENDS = "virtual/libx11 xcalibrateext libxext"
DESCRIPTION = "XCalibrate client-side library"
PV = "0.0+git4be232e30cd33a44a1ce6d3ec429ee6101540c62"
SRC_URI = "git://anongit.freedesktop.org/git/xorg/lib/libXCalibrate;protocol=git;tag=4be232e30c... | ```bitbake
LICENSE = "BSD-X"
SECTION = "x11/libs"
PRIORITY = "optional"
DEPENDS = "virtual/libx11 xcalibrateext libxext"
DESCRIPTION = "XCalibrate client-side library"
PR = "r0"
PV = "0.0+${PR}+gitr4be232e30cd33a44a1ce6d3ec429ee6101540c62"
SRC_URI = "git://anongit.freedesktop.org/git/xorg/lib/libXCalibrate;protocol=g... |
db33115d-b932-419a-8a7b-f30612e5d6ae | {
"language": "BitBake"
} | ```bitbake
```
Test application for OMAP DRM interface | ```bitbake
DESCRIPTION = "Test applications for OMAP DRM interface"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://viddec3test.c;beginline=1;endline=16;md5=c391f44e40a29096285e3121923041df"
DEPENDS += "libdrm libdce libav"
inherit autotools pkgconfig
PR = "r3"
SRCREV = "64e4e389dd8be4947c107a057f34556a4280281a"
SRC_U... |
6716b9bb-393a-4470-96f0-c857381f5035 | {
"language": "BitBake"
} | ```bitbake
```
Add new release of gpe-filemanager. | ```bitbake
inherit gpe
PR = "r0"
LICENSE = "GPL"
DESCRIPTION = "GPE file manager"
DEPENDS = "libgpewidget gnome-vfs dbus"
SECTION = "gpe"
RDEPENDS = "gpe-icons"
RRECOMMENDS = "gnome-vfs-plugin-file"
FILES_${PN} += " ${datadir}/gpe"
``` |
99127a88-0f87-4efd-8fe0-a130c8f5cdd1 | {
"language": "BlitzMax"
} | ```blitzmax
Type mxLoggerObserverGUI
Field m_output:Object
Method Reset()
If TGadget(m_output)
SetGadgetText(TGadget(m_output), "")
End If
End Method
Method SendMessage:Object(message:Object, context:Object)
Local msg:String = String(message)
If String(context) = "error"
Notify(msg, True)
Else I... | ```blitzmax
Type mxLoggerObserverGUI
Field m_output:Object
Method Reset()
If TGadget(m_output)
SetGadgetText(TGadget(m_output), "")
End If
End Method
Method SendMessage:Object(message:Object, context:Object)
Local msg:String = String(message)
If String(context) = "error"
Notify(msg, True)
Else I... |
77dd6efd-ad25-4837-bd1b-881453b00bcc | {
"language": "Bluespec"
} | ```bluespec
function String toHex(Bit#(s) num);
function String f(Bit#(s) n);
String dig[16] = {"0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"};
return (n == 0) ? "" : f(n / 16) + dig[n % 16];
endfunction
return (num == 0) ? "0" : f(num);
endfunction
```
Implement toHex sup... | ```bluespec
function Bit#(n) removeDontCares(Bit#(n) num);
Bit#(n) res = 0;
for(Integer i = 0; i < valueOf(n); i = i + 1)
res[i] = (num[i] == 1'b1) ? 1'b1 : 1'b0;
return res;
endfunction
function String toHex(Bit#(n) num)
provisos (
Div#(n , 4, ndig),
Mul#(ndig, 4, nadj),
Add#(pad , n... |
6fd347f6-faed-4aa9-911a-47625652f891 | {
"language": "Bluespec"
} | ```bluespec
import Ethernet::*;
(* always_ready, always_enabled *)
interface DE5Pins;
method Action osc_50(Bit#(1) b3d, Bit#(1) b4a, Bit#(1) b4d, Bit#(1) b7a, Bit#(1) b7d, Bit#(1) b8a, Bit#(1) b8d);
method Action sfp(Bit#(1) refclk);
method Action buttons(Bit#(4) v);
// method Bit#(4) serial_tx_data;
// m... | ```bluespec
import Ethernet::*;
(* always_ready, always_enabled *)
interface DE5Pins;
method Action osc_50(Bit#(1) b3d, Bit#(1) b4a, Bit#(1) b4d, Bit#(1) b7a, Bit#(1) b7d, Bit#(1) b8a, Bit#(1) b8d);
method Action sfp(Bit#(1) refclk);
method Action buttons(Bit#(4) v);
// method Bit#(4) serial_tx_data;
// m... |
51aad0a5-7bbe-4c9c-8eeb-e737b63e7ecd | {
"language": "Boo"
} | ```boo
namespace BooJs.Compiler.Steps
import Boo.Lang.Compiler.Ast
import Boo.Lang.Compiler.Steps
class ProcessGoto(AbstractTransformerCompilerStep):
"""
Process labels and goto statements
The supported uses are very limited. It's only possible to jump to a label
previously defined in the same function. ... | ```boo
namespace BooJs.Compiler.Steps
import Boo.Lang.Compiler.Ast
import Boo.Lang.Compiler.Steps
class ProcessGoto(AbstractTransformerCompilerStep):
"""
Process labels and goto statements
The supported uses are very limited. It's only possible to jump to a label
previously defined in the same function. ... |
f2acad57-c12a-407d-9ff5-9a8bed01d0df | {
"language": "Boo"
} | ```boo
namespace BooJs.Compiler.Steps
import Boo.Lang.Compiler.Ast
import Boo.Lang.Compiler.Steps
class NormalizeGeneratorExpression(AbstractTransformerCompilerStep):
"""
Converts generator expressions to a simpler format:
( i*2 for i in range(3) )
---
{ __gen = []; for i in range(3): __g... | ```boo
namespace BooJs.Compiler.Steps
import Boo.Lang.Compiler.Ast
import Boo.Lang.Compiler.Steps
class NormalizeGeneratorExpression(AbstractTransformerCompilerStep):
"""
Converts generator expressions to a simpler format:
( i*2 for i in range(3) )
---
{ __gen = []; for i in range(3): __g... |
e47ba9a3-2633-4fde-969c-bb60dd8cb32a | {
"language": "Brainfuck"
} | ```brainfuck
global w;
global t;
global k;
LIKELIHOOD_FUNCTION_OUTPUT = 1;
RANDOM_STARTING_PERTURBATIONS = 1;
/* Include relevant functions */
#include "matrices.mdl"; //rate matrices
#include "GY94_Header.ibf";
/* Read in the data */
DataSet raw_data = ReadDataFile("temp.fasta");
/* Filter the data to find and... | ```brainfuck
global w;
global t;
global k;
LIKELIHOOD_FUNCTION_OUTPUT = 1;
RANDOM_STARTING_PERTURBATIONS = 1;
/* Include relevant functions */
#include "matrices_fix_k.mdl"; //rate matrices
#include "GY94_Header.ibf";
/* Read in the data */
DataSet raw_data = ReadDataFile("temp.fasta");
/* Filter the data to fi... |
7befc42a-9e23-420a-9a7d-2ec595a461e3 | {
"language": "Brainfuck"
} | ```brainfuck
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ f
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ i
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... | ```brainfuck
+++++++++++++++++++++++++++++++++++++++++++++ empty line sign
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ f
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ i
>+++++++++++++++++++++++++++++... |
1f6cd629-8213-4712-b5c4-f063827f18b4 | {
"language": "Bro"
} | ```bro
# Copyright (C) 2016, Missouri Cyber Team
# All Rights Reserved
# See the file "LICENSE" in the main distribution directory for details
module ROCK;
export {
const sensor_id = "sensor001-001" &redef;
}
# Load integration with Snort on ROCK
@load ./frameworks/files/unified2-integration
# Load integration wi... | ```bro
# Copyright (C) 2016, Missouri Cyber Team
# All Rights Reserved
# See the file "LICENSE" in the main distribution directory for details
module ROCK;
export {
const sensor_id = "sensor001-001" &redef;
}
# Load integration with Snort on ROCK
@load ./frameworks/files/unified2-integration
# Load integration wi... |
f900779f-49a9-430c-babe-ab76f371d9a8 | {
"language": "Bro"
} | ```bro
```
Add archive formats from upstream. | ```bro
@load ../__load__.bro
module FileExtraction;
const archive_types: set[string] = { "application/x-rar-compressed",
"application/x-bzip2",
"application/gzip",
"application/x-lzma",
"application/x-lzip",
"application/x-xz",
"application/x-lzop",
"appl... |
f55c1c2a-b984-4774-a236-f2ad3ebd0bd8 | {
"language": "Bro"
} | ```bro
##! Packet source using Napatech
module Napatech;
export {
## The size of the software deduplication lru cache
const dedupe_lru_size = 1024 &redef;
## Because applications can share streams, the Host Buffer Allowance
## allows an application to consume a portion of the host buffer
## befor... | ```bro
##! Packet source using Napatech
module Napatech;
export {
## Should the plugin try to deduplicate packets with the color1
## value of the DYN4 packet descriptor?
const enable_software_deduplication = T &redef;
## The size of the software deduplication lru cache
const dedupe_lru_size = 1024... |
cedf71a3-241d-4826-888d-1109814e3b53 | {
"language": "C#"
} | ```c#
using StackExchange.Elastic;
namespace StackExchange.Opserver
{
public class OpserverCore
{
// Initializes various bits in OpserverCore like exception logging and such so that projects using the core need not load up all references to do so.
public static void Init()
{
... | ```c#
using StackExchange.Elastic;
namespace StackExchange.Opserver
{
public class OpserverCore
{
// Initializes various bits in OpserverCore like exception logging and such so that projects using the core need not load up all references to do so.
public static void Init()
{
... |
60fb5902-94f7-48fb-97cf-d161605d9316 | {
"language": "C#"
} | ```c#
/*
Copyright 2014 David Bordoley
Copyright 2014 Zumero, LLC
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 require... | ```c#
/*
Copyright 2014 David Bordoley
Copyright 2014 Zumero, LLC
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 require... |
2cd4bea6-9c9f-41e9-a05f-4ff79b682d66 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Contentful.Core.Models
{
/// <summary>
/// Represents information about the actual binary file of an <see cref="Asset"/>.
/// </summary>
public class File
{
/// <summary>
... | ```c#
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Contentful.Core.Models
{
/// <summary>
/// Represents information about the actual binary file of an <see cref="Asset"/>.
/// </summary>
public class File
{
... |
3c5d1994-962e-40c8-a595-94943823fe7d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using ArcGIS.ServiceModel;
using ArcGIS.ServiceModel.Operation;
namespace ArcGIS.Test
{
public class JsonDotNetSerializer : ISerializer
{
static ISerializer _serializer = null;
public static void Init()
{
_serializer = ... | ```c#
using System;
using System.Collections.Generic;
using ArcGIS.ServiceModel;
using ArcGIS.ServiceModel.Operation;
namespace ArcGIS.ServiceModel.Serializers
{
public class JsonDotNetSerializer : ISerializer
{
static ISerializer _serializer = null;
public static void Init()
{
... |
311f2cc1-aa37-4422-b8ea-c31fda8280d1 | {
"language": "C#"
} | ```c#
namespace XSerializer.Encryption
{
/// <summary>
/// Provides a mechanism for an application to specify an instance of
/// <see cref="IEncryptionMechanism"/> to be used by XSerializer when
/// encrypting or decrypting data.
/// </summary>
public static class EncryptionMechanism
{
... | ```c#
namespace XSerializer.Encryption
{
/// <summary>
/// Provides a mechanism for an application to specify an instance of
/// <see cref="IEncryptionMechanism"/> to be used by XSerializer when
/// encrypting or decrypting data.
/// </summary>
public static class EncryptionMechanism
{
... |
59af934f-ec83-4060-a25c-4b5e9348d83c | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.IO;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Sprites;
using osuTK;
namespace osu.Framework.Graphics.UserInterface
{
public cla... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.IO;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Sprites;
using osuTK;
namespace osu.Framework.Graphics.UserInterface
{
public cla... |
fe306f2b-ce0f-48a6-a6f6-03efbd3db57c | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KGP.Curves
{
public class ThresholdLinearCurve : ICurve
{
private float threshold;
public float Threshold
{
get { return this.threshold; }
... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KGP
{
/// <summary>
/// Linear threshold curve, clamp while absolute value is within threshold
/// </summary>
public class ThresholdLinearCurve : ICurve
{
pri... |
9e0fa810-9645-47d0-8d7d-126844e2b3ab | {
"language": "C#"
} | ```c#
namespace Server
{
using System;
using System.IO;
using System.Text;
internal partial class Program
{
class Dup : Stream
{
string _name;
private Dup() { }
public Dup(string name) { _name = name; }
public override bool CanRead... | ```c#
namespace Server
{
using System;
using System.IO;
using System.Text;
internal partial class Program
{
class Dup : Stream
{
string _name;
private Dup() { }
public Dup(string name) { _name = name; }
public override bool CanRead... |
dc056fcf-f33e-4fa3-8250-ae898b12c72d | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.CodeModel
{
interface ICodeModelInstanceFactory
{
/// <summary>
/// Requests the project system to create a... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.CodeModel
{
interface ICodeModelInstanceFactory
{
/// <summary>
/// Requests the project system to create a... |
adeca731-1092-427e-8d7a-32b3eb37db53 | {
"language": "C#"
} | ```c#
using System;
using Shouldly;
using Spk.Common.Helpers.Service;
using Xunit;
namespace Spk.Common.Tests.Helpers.Service
{
public class ServiceResultTests
{
[Theory]
[InlineData("test")]
[InlineData("")]
[InlineData(null)]
public void SetData_SuccessShouldBeTrue(str... | ```c#
using System;
using Shouldly;
using Spk.Common.Helpers.Service;
using Xunit;
namespace Spk.Common.Tests.Helpers.Service
{
public class ServiceResultTests
{
[Theory]
[InlineData("test")]
[InlineData("")]
[InlineData(null)]
public void Success_ShouldBeTrue_WhenDataIs... |
912d4696-fd3d-4654-a6dd-161a9b31d15a | {
"language": "C#"
} | ```c#
using System.Collections.Concurrent;
using System.IO;
using NLog;
using NLog.Config;
using NLog.Targets;
namespace Microsoft.Azure.Commands.DataLakeStore.Models
{
/// <summary>
/// NLog is used by the ADLS dataplane sdk to log debug messages. We can create a custom target
/// which basically queues ... | ```c#
using System.Collections.Concurrent;
using NLog;
using NLog.Targets;
namespace Microsoft.Azure.Commands.DataLakeStore.Models
{
/// <summary>
/// NLog is used by the ADLS dataplane sdk to log debug messages. We can create a custom target
/// which basically queues the debug data to the ConcurrentQueu... |
8ec3e52b-968a-463b-887f-f4ebc3576318 | {
"language": "C#"
} | ```c#
using Simpler;
using System;
using Schedules.API.Models;
using Schedules.API.Tasks.Reminders;
namespace Schedules.API.Tasks.Sending
{
public class PostRemindersEmailSend : InOutTask<PostRemindersEmailSend.Input, PostRemindersEmailSend.Output>
{
public class Input
{
public Send Send { get; set;... | ```c#
using Simpler;
using System;
using Schedules.API.Models;
using Schedules.API.Tasks.Reminders;
namespace Schedules.API.Tasks.Sending
{
public class PostRemindersEmailSend : InOutTask<PostRemindersEmailSend.Input, PostRemindersEmailSend.Output>
{
public class Input
{
public Send Send { get; set;... |
38cd315d-ec68-4791-862b-36386d9d4427 | {
"language": "C#"
} | ```c#
using System;
using System.Diagnostics.Contracts;
using System.Globalization;
using System.Net.Mail;
using System.Net.Mime;
using RazorEngine.Text;
namespace Essential.Templating.Razor.Email.Helpers
{
public static class ResourceTemplateHelperExtensions
{
public static IEncodedString Link(this R... | ```c#
using System;
using System.Diagnostics.Contracts;
using System.Globalization;
using System.Net.Mail;
using System.Net.Mime;
using RazorEngine.Text;
namespace Essential.Templating.Razor.Email.Helpers
{
public static class ResourceTemplateHelperExtensions
{
public static IEncodedString Link(this R... |
b7819be1-5a04-4753-bcd5-9581e5ee666a | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.... | ```c#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.... |
66c6cf60-51f0-4d72-a27c-78b5a04d4bcd | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace AlertRoster.Web.Models
{
public class Group
{
[Key]
public int Id { get; private set; }
[Required, StringLength(25)]
public String DisplayName { get; set; }
[S... | ```c#
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
namespace AlertRoster.Web.Models
{
public class Group
{
[Key]
public int Id { get; private set; }
[Required, StringLength(25)]
public String DisplayName { get;... |
4470378e-b7b1-4401-8756-2583419c4a36 | {
"language": "C#"
} | ```c#
// MvxColorExtensions.cs
// (c) Copyright Cirrious Ltd. http://www.cirrious.com
// MvvmCross is licensed using Microsoft Public License (Ms-PL)
// Contributions and inspirations noted in readme.md and license.txt
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
using Cirrious.CrossCore.UI;
using MonoTo... | ```c#
// MvxColorExtensions.cs
// (c) Copyright Cirrious Ltd. http://www.cirrious.com
// MvvmCross is licensed using Microsoft Public License (Ms-PL)
// Contributions and inspirations noted in readme.md and license.txt
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
using Cirrious.CrossCore.UI;
using MonoTo... |
6fb2d588-39fa-4c01-9408-73d60463e5e3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace PS.Mothership.Core.Common.Dto.Merchant
{
[DataContract]
public class OpportunityDto
{
[DataMember]
public Guid Opportunity... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace PS.Mothership.Core.Common.Dto.Merchant
{
[DataContract]
public class OpportunityDto
{
[DataMember]
public Guid Opportunity... |
82334cba-51d0-4f10-afe7-14f96efe4e39 | {
"language": "C#"
} | ```c#
using MongoDB.Driver;
using Persistence.MongoDB;
using SO115App.Models.Classi.Marker;
using SO115App.Models.Servizi.Infrastruttura.GestioneUtenti;
using SO115App.Models.Servizi.Infrastruttura.Marker;
namespace SO115App.Persistence.MongoDB.Marker
{
public class DeleteChiamataInCorsoByIdUtente : IDeleteChiama... | ```c#
using MongoDB.Driver;
using Persistence.MongoDB;
using SO115App.Models.Classi.Marker;
using SO115App.Models.Servizi.Infrastruttura.GestioneUtenti;
using SO115App.Models.Servizi.Infrastruttura.Marker;
namespace SO115App.Persistence.MongoDB.Marker
{
public class DeleteChiamataInCorsoByIdUtente : IDeleteChiama... |
52e3c33f-fb14-4521-873f-d948f7854aa2 | {
"language": "C#"
} | ```c#
using System.Collections.Generic;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Models.Editors;
using Umbraco.Core.PropertyEditors;
namespace Umbraco.Web.PropertyEditors
{
/// <summary>
/// Represents a media picker property editor.
/// </summary>
[DataEditor(
Consta... | ```c#
using System.Collections.Generic;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Models.Editors;
using Umbraco.Core.PropertyEditors;
namespace Umbraco.Web.PropertyEditors
{
/// <summary>
/// Represents a media picker property editor.
/// </summary>
[DataEditor(
Consta... |
c0d882a7-0a62-4ae3-a439-e61283c9cfc9 | {
"language": "C#"
} | ```c#
using System;
namespace ChamberLib
{
public interface IShaderProgram
{
string Name { get; }
void Apply();
void UnApply();
IShaderStage VertexShader { get; }
IShaderStage FragmentShader { get; }
void SetUniform(string name, bool value);
void SetU... | ```c#
using System;
using System.Collections.Generic;
namespace ChamberLib
{
public interface IShaderProgram
{
string Name { get; }
void Apply();
void UnApply();
IShaderStage VertexShader { get; }
IShaderStage FragmentShader { get; }
IEnumerable<string> BindA... |
2af25663-c267-47c6-9117-3a30eced28a1 | {
"language": "C#"
} | ```c#
@using Piranha.Extend;
@using Piranha.Manager.Manager;
@model Block
@foreach(var name in Model.GetFieldNames())
{
<div class="form-group">
<label>@name</label>
@Html.Editor(name)
</div>
}```
Split Pascal cased property names into words | ```c#
@using Piranha.Extend;
@using Piranha.Manager.Manager;
@using System.Text.RegularExpressions;
@model Block
@foreach(var name in Model.GetFieldNames())
{
var label = Regex.Replace(name, "(\\B[A-Z])", " $1");
<div class="form-group">
<label>@label</label>
@Html.Editor(name)
<... |
e2c6a4bb-03bc-4bf5-a87f-efadfee5f5e3 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using HandlebarsDotNet.Compiler.Lexer;
using System.Linq.Expressions;
namespace HandlebarsDotNet.Compiler
{
internal class ExpressionScopeConverter : TokenConverter
{
public static IEnumerable<object> Convert(IEnumerable<object> ... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using HandlebarsDotNet.Compiler.Lexer;
using System.Linq.Expressions;
namespace HandlebarsDotNet.Compiler
{
internal class ExpressionScopeConverter : TokenConverter
{
public static IEnumerable<object> Convert(IEnumerable<object> ... |
7394b0dc-dab5-4bc6-8e36-b1aa41594853 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using TestObjectBuilder;
namespace TestObjectBuilderTests.Tests
{
public class TestObjectBuilderBuilderTests
{
[TestFixture]
public class CreateNewObject
{
[... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using TestObjectBuilder;
namespace TestObjectBuilderTests.Tests
{
public class TestObjectBuilderBuilderTests
{
[TestFixture]
public class CreateNewObject
{
[... |
cbeeaa15-eb10-431d-b5b1-dfb6798ae862 | {
"language": "C#"
} | ```c#
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGameUtils.Diagnostics;
namespace PCGame.GameComponents
{
public class UIFPSCounter : DrawableGameComponent
{
private FPSCounter _fpsCounter = new FPSCounter();
private SpriteBatch _spriteBatch;
priva... | ```c#
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGameUtils.Diagnostics;
namespace MonoGameUtils.UI.GameComponents
{
public class UIFPSCounter : DrawableGameComponent
{
private FPSCounter _fpsCounter = new FPSCounter();
private SpriteBatch _spriteBatch;
... |
bb92261c-66ce-45e5-ac03-4137ac35ac6c | {
"language": "C#"
} | ```c#
using Microsoft.EntityFrameworkCore;
using System;
using System.Linq;
using System.Net.Sockets;
using System.Threading.Tasks;
namespace RebirthTracker.PacketHandlers
{
/// <summary>
/// Request a game host try a hole punch
/// </summary>
[Opcode(26)]
public class HolePunchPacketHandler : IPa... | ```c#
using Microsoft.EntityFrameworkCore;
using System;
using System.Linq;
using System.Net.Sockets;
using System.Threading.Tasks;
namespace RebirthTracker.PacketHandlers
{
/// <summary>
/// Request a game host try a hole punch
/// </summary>
[Opcode(26)]
public class HolePunchPacketHandler : IPa... |
c67d6181-861e-4d94-87f9-41a1738af751 | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Tests.Experimental.Requests.Calendars
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TraktApiSharp.Experimental.Requests.Calendars;
using TraktApiSharp.Objects.Get.Calendars;
[TestClass]
public class TraktCalendarAllDVDMoviesRe... | ```c#
namespace TraktApiSharp.Tests.Experimental.Requests.Calendars
{
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TraktApiSharp.Experimental.Requests.Calendars;
using TraktApiSharp.Objects.Get.Calendars;
using TraktApiSharp.Requests;
[TestClass]
public... |
e47bca97-6d95-4b8d-9626-dee5e0466507 | {
"language": "C#"
} | ```c#
@using ForumModels;
@{
string usersFile = Server.MapPath("~/App_Data/users.json");
var userList = new UserList(usersFile);
}
<table class="table">
<thead>
<tr class="lead">
<th></th>
<th>Name</th>
<th>MSDN Name</th>
<th>StackOverflow ID</th>
... | ```c#
@using ForumModels;
@{
string usersFile = Server.MapPath("~/App_Data/users.json");
var userList = new UserList(usersFile);
}
<table class="table">
<thead>
<tr class="lead">
<th></th>
<th></th>
<th>Name</th>
<th>MSDN Name</th>
<th>... |
c74e97ad-371f-438d-8d1f-74c6100cec65 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Online.Rooms;
using os... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Online.Rooms;
using os... |
8ac1e926-baa7-43f2-846c-f3d0b57b4018 | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable enable
using System.Diagnostics;
namespace osu.Framework.Extensions.ObjectExtensions
{
/// <summary>
/// Extensions that apply to all objects.
... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable enable
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
namespace osu.Framework.Extensions.ObjectExtensions
{
/// <summary>
/// ... |
9fbb37fb-aed6-497c-a6eb-2588c4fdfdf7 | {
"language": "C#"
} | ```c#
using System;
using Baseline;
namespace Marten.Testing
{
public class ConnectionSource : ConnectionFactory
{
public static readonly string ConnectionString = Environment.GetEnvironmentVariable("marten_testing_database");
static ConnectionSource()
{
if (ConnectionStri... | ```c#
using System;
namespace Marten.Testing
{
public class ConnectionSource : ConnectionFactory
{
public static readonly string ConnectionString = Environment.GetEnvironmentVariable("marten_testing_database");
static ConnectionSource()
{
if (ConnectionString.IsEmpty())
... |
3925f09d-a70d-43af-9abe-977bf90c2b41 | {
"language": "C#"
} | ```c#
using Harmony;
using LunaClient.Systems.Lock;
using LunaCommon.Enums;
using System.Collections.Generic;
// ReSharper disable All
namespace LunaClient.Harmony
{
/// <summary>
/// This harmony patch is intended to override the "FindVesselsLandedAt" that sometimes is called to check if there are vessels in... | ```c#
using Harmony;
using LunaClient.Systems.Lock;
using LunaCommon.Enums;
using System.Collections.Generic;
// ReSharper disable All
namespace LunaClient.Harmony
{
/// <summary>
/// This harmony patch is intended to override the "FindVesselsLandedAt" that sometimes is called to check if there are vessels in... |
bbd00a08-0516-417e-a5b0-039a7ca84a4d | {
"language": "C#"
} | ```c#
// Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace Draw2D.Core
{
public abstract class ObservableObject : INotifyPropertyChan... | ```c#
// Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace Draw2D.Core
{
public abstract class ObservableObject : INotifyPropertyChan... |
d70e1ca6-c437-4dd8-8309-8201b62d1608 | {
"language": "C#"
} | ```c#
using System.Data.Entity;
namespace food_tracker {
public class TrackerContext : DbContext {
public TrackerContext() : base("name=NutritionTrackerContext") {
Configuration.LazyLoadingEnabled = false;
this.Database.Log = s => System.Diagnostics.Debug.WriteLine(s);
}
... | ```c#
using System.Data.Entity;
namespace food_tracker {
public class TrackerContext : DbContext {
public TrackerContext() : base() {
Configuration.LazyLoadingEnabled = false;
this.Database.Log = s => System.Diagnostics.Debug.WriteLine(s);
}
public DbSet<WholeDay... |
25b6c1f5-f676-4e88-80a6-982d3724d55b | {
"language": "C#"
} | ```c#
namespace Bakery.Processes
{
using Specification.Builder;
using System;
using System.Text;
using System.Threading.Tasks;
using Xunit;
public class SystemDiagnosticsProcessTests
{
[Fact]
public async Task EchoWithCombinedOutput()
{
var processSpecification =
ProcessSpecification... | ```c#
namespace Bakery.Processes
{
using System;
using System.Text;
using System.Threading.Tasks;
using Xunit;
public class SystemDiagnosticsProcessTests
{
[Fact]
public async Task EchoWithCombinedOutput()
{
var process = await new ProcessFactory().RunAsync(builder =>
{
return buil... |
1b81c7be-050a-45c5-b2c3-ca13f299c18f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using Cake.Core.Diagnostics;
namespace Cake.Arguments
{
/// <summary>
/// Responsible for parsing <see cref="Verbosity"/>.
/// </summary>
internal sealed class VerbosityParser
{
private readonly Dictionary<string, Verbosity> _lookup;
... | ```c#
using System;
using System.Collections.Generic;
using System.Globalization;
using Cake.Core.Diagnostics;
namespace Cake.Arguments
{
/// <summary>
/// Responsible for parsing <see cref="Verbosity"/>.
/// </summary>
internal sealed class VerbosityParser
{
private readonly Dictionary<st... |
c56d0e1c-1e85-4e85-8a25-8634bc2aab55 | {
"language": "C#"
} | ```c#
namespace TraktApiSharp.Services
{
using Authentication;
using System;
/// <summary>Provides helper methods for serializing and deserializing Trakt objects.</summary>
public static class TraktSerializationService
{
public static string Serialize(TraktAuthorization authorization)
... | ```c#
namespace TraktApiSharp.Services
{
using Authentication;
using Extensions;
using System;
using Utils;
/// <summary>Provides helper methods for serializing and deserializing Trakt objects.</summary>
public static class TraktSerializationService
{
/// <summary>Serializes an <se... |
0785694a-c9b9-4508-8557-3b6c3f5d741f | {
"language": "C#"
} | ```c#
using IIUWr.Fereol.Common;
using IIUWr.Fereol.Interface;
using IIUWr.ViewModels.Fereol;
using LionCub.Patterns.DependencyInjection;
using System;
using HTMLParsing = IIUWr.Fereol.HTMLParsing;
namespace IIUWr
{
public static class ConfigureIoC
{
public static void All()
{
#if DEBUG
... | ```c#
using IIUWr.Fereol.Common;
using IIUWr.Fereol.Interface;
using IIUWr.ViewModels.Fereol;
using LionCub.Patterns.DependencyInjection;
using System;
using HTMLParsing = IIUWr.Fereol.HTMLParsing;
namespace IIUWr
{
public static class ConfigureIoC
{
public static void All()
{
#if DEBUG
... |
f33ea74d-ac5e-495d-b14d-b67f2ebe9f6e | {
"language": "C#"
} | ```c#
using NBi.Core.Structure;
using NBi.Core.Structure.Olap;
using NBi.Core.Structure.Relational;
using NBi.Core.Structure.Tabular;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;... | ```c#
using NBi.Core.Structure;
using NBi.Core.Structure.Olap;
using NBi.Core.Structure.Relational;
using NBi.Core.Structure.Tabular;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;... |
da00bd2a-c133-47f8-993d-754e2a96f776 | {
"language": "C#"
} | ```c#
using SFA.DAS.EmployerApprenticeshipsService.Domain.Entities.Account;
namespace SFA.DAS.EmployerApprenticeshipsService.Web.Models
{
public class UserAccountsViewModel
{
public Accounts Accounts;
public int Invitations;
public string SuccessMessage;
}
}```
Change user accounts... | ```c#
using SFA.DAS.EmployerApprenticeshipsService.Domain.Entities.Account;
namespace SFA.DAS.EmployerApprenticeshipsService.Web.Models
{
public class UserAccountsViewModel
{
public Accounts Accounts;
public int Invitations;
public SuccessMessageViewModel SuccessMessage;
}
}``` |
9441fcc7-e89b-4e74-89fc-b59d40b7996e | {
"language": "C#"
} | ```c#
/* ------------------------------------------------------------------------- */
//
// Copyright (c) 2010 CubeSoft, 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:... | ```c#
/* ------------------------------------------------------------------------- */
//
// Copyright (c) 2010 CubeSoft, 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:... |
d67620fc-9164-43fd-a353-e16ebbe0e54d | {
"language": "C#"
} | ```c#
using System;
using System.ComponentModel.Composition.Hosting;
using System.Reflection;
using MuffinFramework.Muffin;
using MuffinFramework.Platform;
using MuffinFramework.Service;
namespace MuffinFramework
{
public class MuffinClient : IDisposable
{
private readonly object _lockObj = new object... | ```c#
using System;
using System.ComponentModel.Composition.Hosting;
using System.Reflection;
using MuffinFramework.Muffin;
using MuffinFramework.Platform;
using MuffinFramework.Service;
namespace MuffinFramework
{
public class MuffinClient : IDisposable
{
private readonly object _lockObj = new object... |
15a87901-225b-47a6-9088-dd0fd9e198aa | {
"language": "C#"
} | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using OpenTK;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Beatma... | ```c#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using OpenTK;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Beatma... |
83d6a246-17db-4758-9811-1ea033290160 | {
"language": "C#"
} | ```c#
using System;
using Xunit;
namespace DnxFlash.Test
{
public class MessageTest
{
private Message sut;
public class Constructor : MessageTest
{
[Fact]
public void Should_set_message()
{
sut = new Message("test message");
... | ```c#
using System;
using Xunit;
namespace DnxFlash.Test
{
public class MessageTest
{
private Message sut;
public class Constructor : MessageTest
{
[Fact]
public void Should_set_message()
{
sut = new Message("test message");
... |
de964fbf-6d83-46ba-bc2c-1d31b6a4e0ba | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Mania.Scoring
{
internal class ManiaScoreProcessor : ScoreProcessor
{
protected overr... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Mania.Scoring
{
internal class ManiaScoreProcessor : ScoreProcessor
{
protected overr... |
7a376af6-2a1c-4f86-8d71-a0bcf3426b2e | {
"language": "C#"
} | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Mania.Scoring
{
internal class ManiaScoreProcessor : ScoreProcessor
{
public override... | ```c#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Mania.Scoring
{
internal class ManiaScoreProcessor : ScoreProcessor
{
protected overr... |
2ccd0965-a49e-41bf-b67d-a89c1608559f | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SassSharp.Ast
{
public class SassSyntaxTree
{
public SassSyntaxTree(IEnumerable<Node> children)
{
this.Children = children;
}
public ... | ```c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SassSharp.Ast
{
public class SassSyntaxTree
{
public SassSyntaxTree(IEnumerable<Node> children)
{
this.Children = children;
}
public ... |
abb492be-e255-427c-9d4b-ad3f57fcf264 | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Threading;
using Microsoft.CodeAnalys... | ```c#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
/*This tutorial is going to guide you to write a diagnostic analyzer that enforces the placement of one space between the if keyword of an if statement ... |
1156d6fd-454f-4a74-93dd-4f0e5b78b5df | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
#if DNX
[assembly: Asse... | ```c#
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
#if DNX
[assembly: Asse... |
b3904943-be00-432d-a32d-68acdd88a133 | {
"language": "C#"
} | ```c#
// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Reactive.Linq;
using Perspex.Markup.Data;
using Xunit;
namespace Perspex.Markup.UnitTe... | ```c#
// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Reactive.Linq;
using Perspex.Markup.Data;
using Xunit;
namespace Perspex.Markup.UnitTe... |
5fef6d7c-42bd-4629-949c-3496b4dc560e | {
"language": "C#"
} | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
public class YoumuSlashTimingEffectsController : MonoBehaviour
{
[SerializeField]
private AudioSource musicSource;
[SerializeField]
private float pitchMult = 1f;
[SerializeField]
private flo... | ```c#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
public class YoumuSlashTimingEffectsController : MonoBehaviour
{
[SerializeField]
private AudioSource musicSource;
[SerializeField]
private float pitchMult = 1f;
[SerializeField]
private flo... |
2cb9ab1e-c0cc-4c47-a240-1cf20e520bbc | {
"language": "C#"
} | ```c#
#load "LogHelper.csx"
using System.Configuration;
public static class AppSettingsHelper
{
public static string GetAppSetting(string SettingName, bool LogValue = true )
{
string SettingValue = "";
try
{
SettingValue = ConfigurationManager.AppSettings[SettingName].ToS... | ```c#
#load "LogHelper.csx"
using System.Configuration;
public static class AppSettingsHelper
{
public static string GetAppSetting(string SettingName, bool LogValue = true )
{
string SettingValue = "";
try
{
SettingValue = ConfigurationManager.AppSettings[SettingName].ToS... |
0de8464b-3947-4bc0-b11b-8b81b226dede | {
"language": "C#"
} | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace System.Diagnostics.CodeAnalysis
{
[AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = false)]
internal sealed class Exclude... | ```c#
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace System.Diagnostics.CodeAnalysis
{
[Conditional("DEBUG")] // don't bloat release assemblies
[AttributeUsage(AttributeTargets.All, Inherited = fal... |
641dbf98-4ad5-482e-9e54-3eb32bf3d6f3 | {
"language": "C#"
} | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ServerHost")]
[assembly: AssemblyDe... | ```c#
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ServerHost")]
[assembly: AssemblyDe... |
6b1c7cec-e219-4780-ad63-f681c13fb865 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using BrightstarDB.EntityFramework;
namespace BrightstarDB.PerformanceBenchmarks.Models
{
[Entity("http://xmlns.com/foaf/0.1/Person")]
public interface IFoafPerson
{
string Id { get; }
[PropertyType("http://xmlns.com... | ```c#
using System;
using System.Collections.Generic;
using System.Text;
using BrightstarDB.EntityFramework;
namespace BrightstarDB.PerformanceBenchmarks.Models
{
[Entity("http://xmlns.com/foaf/0.1/Person")]
public interface IFoafPerson
{
[Identifier("http://www.brightstardb.com/people/")]
... |
2ab7b418-bf1a-40ef-98ef-4baee82e482c | {
"language": "C#"
} | ```c#
namespace Bakery
{
using System;
using System.ComponentModel;
using System.Globalization;
public class UuidTypeConverter
: TypeConverter
{
public override Boolean CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(String);
}
public over... | ```c#
namespace Bakery
{
using System;
using System.ComponentModel;
using System.Globalization;
public class UuidTypeConverter
: TypeConverter
{
public override Boolean CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(String);
}
public over... |
27d9fcc7-4150-45f3-a5b2-17d3a23f2ad0 | {
"language": "C#"
} | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ForumModels
{
public static class Helpers
{
public static DateTimeOffset GetStartOfWeek(string date)
{
var dt = DateTimeOffset.Now;
... | ```c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ForumModels
{
public static class Helpers
{
public static DateTimeOffset GetStartOfWeek(string date)
{
var dt = DateTimeOffset.Now;
... |
028166b7-0961-4b3b-ba50-740056251ff3 | {
"language": "C#"
} | ```c#
using System;
using System.Net.Http;
using Newtonsoft.Json;
namespace PexelsNet
{
public class PexelsClient
{
private readonly string _apiKey;
private const string BaseUrl = "http://api.pexels.com/v1/";
public PexelsClient(string apiKey)
{
_apiKey = apiKey;
... | ```c#
using System;
using System.Net.Http;
using Newtonsoft.Json;
using System.Threading.Tasks;
namespace PexelsNet
{
public class PexelsClient
{
private readonly string _apiKey;
private const string BaseUrl = "http://api.pexels.com/v1/";
public PexelsClient(string apiKey)
{
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.