max_stars_count
int64
301
224k
text
stringlengths
6
1.05M
token_count
int64
3
727k
370
import logging import tqdm import numpy as np def evaluate(model, tasks, iterator, cuda_device, split="val"): '''Evaluate on a dataset''' model.eval() all_preds = {} n_overall_examples = 0 for task in tasks: n_examples = 0 task_preds, task_idxs, task_labels = [], [], [] if ...
994
772
<reponame>binbash5447/scrimage package com.sksamuel.scrimage.examples; import com.sksamuel.scrimage.ImmutableImage; import com.sksamuel.scrimage.nio.JpegWriter; import java.awt.*; import java.io.IOException; public class Pad { public static void main(String[] args) throws IOException { ImmutableImage image...
310
14,425
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with this * work for additional information regarding copyright ownership. The ASF * licenses this file to you under the Apache License, Version 2.0 (the * "License"); you ma...
7,814
473
<gh_stars>100-1000 # coding: utf-8 from __future__ import (print_function, unicode_literals, absolute_import) from .interface import AbstractHmmParams, AbstractDagParams from .util import as_text import os import json DATA = 'data' DEFAULT = 'default' class DefaultHmmParams(AbstractHmmParams): def __init__(...
1,615
355
<filename>aop-arms/src/main/java/cn/com/superLei/aoparms/aspect/StatisticsAspect.java package cn.com.superLei.aoparms.aspect; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.Signature; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.ann...
591
1,085
<reponame>luxms/dremio-oss /* * Copyright (C) 2017-2019 Dremio Corporation * * 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 * * Unle...
822
1,240
package com.eventyay.organizer.core.event.create; import com.eventyay.organizer.common.mvp.view.Erroneous; import com.eventyay.organizer.common.mvp.view.Progressive; import com.eventyay.organizer.common.mvp.view.Successful; public interface EventDetailsStepThreeView extends Progressive, Erroneous, Successful { }
103
984
<filename>phoenix-core/src/main/java/org/apache/phoenix/expression/function/InvertFunction.java /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The...
1,861
1,350
<reponame>Shashi-rk/azure-sdk-for-java<filename>sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/Location.java // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generat...
370
634
/* Petar 'PetarV' Velickovic Data Structure: Pairing Heap */ #include <stdio.h> #include <math.h> #include <string.h> #include <time.h> #include <iostream> #include <vector> #include <list> #include <string> #include <algorithm> #include <queue> #include <stack> #include <set> #include <map> #include <complex> #defi...
2,371
480
<reponame>milyiyo/nlu<filename>nlu/pipe/utils/storage_ref_utils.py import logging from nlu.pipe.utils import uid_to_storageref as uid2storageref logger = logging.getLogger('nlu') """Storage Ref logic operations and utils""" class StorageRefUtils(): @staticmethod def has_storage_ref(component): """Sto...
1,268
847
<reponame>crazysunj/MultiTypeRecyclerViewAdapter<gh_stars>100-1000 package com.crazysunj.sample.entity; import androidx.annotation.Nullable; import com.crazysunj.sample.base.MutiTypeTitleEntity; /** * author: sunjian * created on: 2017/8/13 下午6:13 * description: */ public class LoadingEntity implements MutiType...
374
303
<reponame>cclauss/redun import os import threading import time from typing import List, cast import pytest from redun import File, Scheduler, task from redun.config import Config from redun.executors.local import LocalExecutor from redun.tests.utils import use_tempdir redun_namespace = "redun.tests.test_executors" ...
1,535
2,023
<filename>recipes/Python/68204_Sort_objects_using_SQL_ORDER/recipe-68204.py ############################################### # # sqlSortable Class - this class supports sorting of objects using # the same terms as used when specifying a sort in SQL # <NAME> 8/15/01 class sqlSortable: def __i...
922
852
<reponame>ckamtsikis/cmssw #ifndef RAWTOTEXT_H #define RAWTOTEXT_H /*\class RawToText *\description conversion of GCT raw to text formats based on and reverses J.Brooke's TextToRaw *\usage trigger pattern tests *\author <NAME> (CERN) *\date 07.08 */ // system include files #include <fstream> #incl...
392
392
/* This file shows the basics of using binn objects. It does not show lists and maps. For more examples check https://github.com/liteserver/binn/blob/master/usage.md */ #include <binn.h> void create_and_pass_buffer() { binn *obj; // create a new object obj = binn_object(); // add values to it binn_object_...
634
348
<reponame>chamberone/Leaflet.PixiOverlay {"nom":"Mamers","circ":"5ème circonscription","dpt":"Sarthe","inscrits":3702,"abs":2175,"votants":1527,"blancs":103,"nuls":49,"exp":1375,"res":[{"nuance":"LR","nom":"<NAME>","voix":774},{"nuance":"REM","nom":"<NAME>","voix":601}]}
112
1,667
package cn.bluemobi.dylan.step.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import java.util.List; /** * Created by yuandl on 2016-10-13. * 万能适配器 */ public abstract class CommonAdapter<T> e...
557
428
<reponame>zhiqiang-hu/qucsdk #ifndef WAVELINE_H #define WAVELINE_H /** * 直方波形图控件 作者:feiyangqingyun(QQ:517216493) 2016-11-06 * 1. 可设置最大值。 * 2. 可设置每次过渡的步长。 * 3. 可设置item之间的间隔。 * 4. 可设置渐变的背景颜色。 * 5. 可设置线条的颜色。 */ #include <QWidget> #ifdef quc class Q_DECL_EXPORT WaveLine : public QWidget #else class WaveLine : pu...
1,274
2,519
<gh_stars>1000+ // This file is licensed under the Elastic License 2.0. Copyright 2021-present, StarRocks Limited. #include "exec/parquet/encoding.h" #include <memory> #include "exec/parquet/encoding_dict.h" #include "exec/parquet/encoding_plain.h" #include "exec/parquet/types.h" #include "gutil/strings/substitute.h...
2,364
14,668
// 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 "chrome/browser/webid/federated_identity_request_permission_context.h" #include "base/strings/utf_string_conversions.h" #include "base/values.h"...
984
351
<reponame>leezhenghui/Mushroom /** * > Author: UncP * > Github: www.github.com/UncP/Mushroom * > License: BSD-3 * > Time: 2017-05-08 09:15:27 **/ #ifndef _RAFT_ARG_HPP_ #define _RAFT_ARG_HPP_ #include "../rpc/marshaller.hpp" // #include "mushroom_log.hpp" #include "log.hpp" namespace Mu...
1,252
515
/* * Copyright 2018-present HiveMQ and the HiveMQ Community * * 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 ...
2,211
337
<gh_stars>100-1000 #include "prometheus/serializer.h" #include <sstream> namespace prometheus { std::string Serializer::Serialize( const std::vector<MetricFamily> &metrics) const { std::ostringstream ss; Serialize(ss, metrics); return ss.str(); } } // namespace prometheus
100
353
<gh_stars>100-1000 package org.nutz.mongo.entity; import java.util.HashMap; import java.util.Map; import java.util.Set; import org.nutz.lang.Lang; import org.nutz.lang.Mirror; import org.nutz.lang.Strings; import org.nutz.lang.born.Borning; import org.nutz.lang.eject.Ejecting; /** * 描述了一个对象字段到 Mongo Document 之间的字段映...
3,078
346
<reponame>stanislaw/textX<gh_stars>100-1000 from __future__ import unicode_literals from os.path import dirname, abspath, join from pytest import raises import textx.exceptions import textx.scoping as scoping import textx.scoping.providers as scoping_providers from textx import get_children_of_type from textx import...
5,174
2,868
/* * Copyright (c) 2015, Intel Corporation * * 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 above copyright notice, * this list of conditions and the follow...
832
584
<filename>AppleIntelWifiAdapter/IWLCachedScan.hpp<gh_stars>100-1000 // // IWLCachedScan.hpp // AppleIntelWifiAdapter // // Created by <NAME> on 3/31/20. // Copyright © 2020 IntelWifi for MacOS authors. All rights reserved. // #ifndef APPLEINTELWIFIADAPTER_IWLCACHEDSCAN_HPP_ #define APPLEINTELWIFIADAPTER_IWLCACHEDS...
899
28,321
import os import mysql.connector as mys mycon = mys.connect( host="localhost", user="root", passwd="<PASSWORD>", database="book_store_management" ) if mycon.is_connected(): print() print("successfully connected") mycur = mycon.cursor() def DBZ(): # IF NO. OF BOOKS IS ZERO(0) THAN D...
14,471
1,222
<reponame>pchalupa/renative { "apply": [ "plugin: 'com.android.application'", "plugin: 'kotlin-android'", "plugin: 'kotlin-android-extensions'", "from: '../../../node_modules/react-native/react.gradle'" ], "android": { "compileSdkVersion": 29, "defaultConfig": { "applicationI...
1,265
4,403
<reponame>lhDream/hutool<gh_stars>1000+ package cn.hutool.core.text.finder; import org.junit.Assert; import org.junit.Test; public class CharFinderTest { @Test public void startTest(){ int start = new CharFinder('a').setText("cba123").start(2); Assert.assertEquals(2, start); start = new CharFinder('c').setT...
337
2,868
<gh_stars>1000+ /* * Copyright (c) 2015-2016, Intel Corporation * * 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 above copyright notice, * this list of cond...
2,343
416
<filename>contrib/depends/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/SceneKit.framework/Versions/A/Headers/SCNSceneSource.h<gh_stars>100-1000 // // SCNSceneSource.h // // Copyright (c) 2012-2015 Apple Inc. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @class SCNScene; /*! @...
4,842
374
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
772
1,233
<filename>mantis-remote-observable/src/main/java/io/reactivex/mantis/remote/observable/PortSelectorWithinRange.java /* * Copyright 2019 Netflix, 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...
839
462
<reponame>cedmans/bs-react-native<gh_stars>100-1000 { "name": "react-native-template-reason", "version": "0.1.1", "scripts": { "re:clean": "bsb -clean-world", "re:watch": "bsb -clean-world -make-world -w", "re:build": "bsb -clean-world -make-world", "clean": "yarn re:clean", "test": "yarn re:b...
150
3,262
<gh_stars>1000+ package com.tencent.angel.graph.psf.neighbors.SampleNeighborsWithCount; import com.tencent.angel.PartitionKey; import com.tencent.angel.common.ByteBufSerdeUtils; import com.tencent.angel.ml.matrix.psf.get.base.PartitionGetParam; import com.tencent.angel.psagent.matrix.transport.router.KeyValuePart; imp...
483
2,322
/* * W32SYS * helper DLL for Win32s * * Copyright (c) 1996 <NAME> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any l...
1,208
831
/* * Copyright 2000-2010 JetBrains s.r.o. * * 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 agre...
806
302
package com.yalantis.watchface.view.ticks_options; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v7.widget.Toolbar; import android.widget.SeekBar; import android.widget.TextView; import com.yalantis.watchface.App; import com.yalantis.watchface.R; impor...
1,555
678
/** * This header is generated by class-dump-z 0.2b. * * Source: /System/Library/PrivateFrameworks/SoftwareUpdateServices.framework/SoftwareUpdateServices */ #import <SoftwareUpdateServices/XXUnknownSuperclass.h> @class NSError, SUDescriptor, SUScanOptions; @interface SUScanRequest : XXUnknownSuperclass { SUSca...
518
4,168
<reponame>suweicong/corda-1 package net.corda.serialization.internal; import com.google.common.collect.Maps; import net.corda.core.serialization.SerializationContext; import net.corda.core.serialization.SerializationFactory; import net.corda.core.serialization.SerializedBytes; import net.corda.serialization.internal.a...
1,112
505
package de.rieckpil.blog; import org.eclipse.microprofile.config.inject.ConfigProperty; import javax.activation.DataHandler; import javax.activation.DataSource; import javax.annotation.Resource; import javax.ejb.Stateless; import javax.inject.Inject; import javax.mail.Message; import javax.mail.MessagingException; im...
639
1,484
<reponame>rbrady/anchore-engine<filename>anchore_engine/apis/common.py from anchore_engine.apis.context import ApiRequestContextProxy def version_response(versions): return { "service": {"version": versions.get("service_version", None)}, "api": {}, "db": {"schema_version": versions.get("db...
214
862
/* * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved. * * 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 ...
2,216
14,668
// 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_POLICY_ENROLLMENT_STATUS_H_ #define CHROME_BROWSER_POLICY_ENROLLMENT_STATUS_H_ #include "build/chromeos_buildflags.h" #if BUIL...
2,320
4,224
/**************************************************************************** * * Copyright (c) 2021 PX4 Development Team. 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. Redistri...
1,137
777
// 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 COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_H_ #define COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_H_ #include "base/macros.h" #include "base/observer_list...
1,058
690
<reponame>PranjalPansuriya/JavaScriptEnhancements import sublime, sublime_plugin import os, json, traceback from ....libs import NPM from ... import JavascriptEnhancementsEnableProjectTypeMenuEventListener class JavascriptEnhancementsEnableNpmMenuEventListener(JavascriptEnhancementsEnableProjectTypeMenuEventListener, ...
1,156
4,573
[{"op": "add", "path": "/PropertyTypes/AWS::DataBrew::Recipe.Action/Properties/Parameters/Type", "value": "RecipeParameters"}]
40
2,114
<filename>RNTester/RNTester-macOS/AppDelegate.h<gh_stars>1000+ // // AppDelegate.h // RNTester-macOS // // Created by <NAME> on 6/5/17. // Copyright © 2017 Facebook. All rights reserved. // #import <Cocoa/Cocoa.h> @class RCTBridge; extern NSString *kBundleNameJS; @interface AppDelegate : NSObject <NSApplicationD...
149
1,144
#ifndef __USB_COMPAT_H__ #define __USB_COMPAT_H__ #include <dm.h> #include "usb.h" struct usb_hcd { void *hcd_priv; }; struct usb_host_endpoint { struct usb_endpoint_descriptor desc; struct list_head urb_list; void *hcpriv; }; /* * urb->transfer_flags: * * Note: URB_DIR_IN/OUT is automatically set in usb_su...
1,151
449
<filename>include/platform/breakpoint.h /* Copyright (c) 2013 The F9 Microkernel Project. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef BREAKPOINT_H_ #define BREAKPOINT_H_ enum { BKPT_NONE, BKPT_HARD, BKPT_SOFT, }; struct br...
358
375
#!/usr/bin/env python import sys import xmlrunner __unittest = True from unittest.main import main main(module=None, testRunner=xmlrunner.XMLTestRunner())
58
303
<reponame>poalimWeb/webauthndemo // Copyright 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ap...
1,599
411
package com.documents4j.job; import com.documents4j.api.IConverter; import com.documents4j.ws.endpoint.MockWebApplication; import org.glassfish.jersey.test.JerseyTest; import org.glassfish.jersey.test.TestProperties; import org.glassfish.jersey.test.spi.TestContainerException; import javax.ws.rs.core.Application; imp...
726
308
<filename>app/src/main/java/com/wanbo/werb/ui/presenter/TabPresenter.java package com.wanbo.werb.ui.presenter; import android.content.Context; import android.os.Handler; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.widget.T...
2,470
359
<reponame>les1502/react-native-baidumap-sdk<gh_stars>100-1000 #import <React/RCTComponent.h> #import <BaiduMapAPI_Map/BMKMapView.h> @interface RCTMapView : BMKMapView <BMKMapViewDelegate> @property(nonatomic, copy) RCTBubblingEventBlock onBaiduMapLoad; @property(nonatomic, copy) RCTBubblingEventBlock onBaiduMapClick;...
205
2,728
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import json from typing import Any, TYPE_CHECKING, List, Union, overload from azure.core.tracing.decorator import distributed_trace from ._generated impo...
8,050
1,590
<filename>specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/SecuritySolutions/GetSecuritySolutionsResourceGroupLocation_example.json { "parameters": { "api-version": "2020-01-01", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "resourceGroupName": "myRg2", ...
420
14,668
<reponame>chromium/chromium // Copyright 2019 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/serial/chrome_serial_delegate.h" #include <utility> #include "chrome/browser/profiles/profile.h" #i...
984
2,724
<filename>src/sap.ui.core/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib2variables/themes/sap_hcb/library-parameters.json { "default": { "lib2_sample-variable":"16px", "lib2_with.dot:andcolon":"24px", "lib2_andcolon":"14px", "lib2_foo":"1rem", "lib2_paramWithRelativeUrlQuoted":"url(\"img/icon...
507
591
/****************************************************************************** * Copyright 2017 The Baidu Authors. All Rights Reserved. * * 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...
1,474
1,013
<filename>integration/tests/multilines.py from tests import app @app.route("/multilines") def multilines(): return 'line1\nline2\nline3\n'
57
13,006
package org.nd4j.autodiff.listeners.debugging; import lombok.val; import org.nd4j.autodiff.functions.DifferentialFunction; import org.nd4j.autodiff.listeners.At; import org.nd4j.autodiff.listeners.BaseListener; import org.nd4j.autodiff.listeners.Operation; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.au...
6,146
1,043
package com.oath.micro.server.spring; import org.springframework.context.ConfigurableApplicationContext; import com.oath.micro.server.config.Config; public interface SpringBuilder { public ConfigurableApplicationContext createSpringApp(Config config, Class...classes); public Class[] classes(Config config, Class.....
85
2,728
<reponame>rsdoherty/azure-sdk-for-python<filename>sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/__init__.py # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved....
856
794
<gh_stars>100-1000 [ { "name": "Airplane mode", "description": "Show Airplane mode toast when app switched.", "priority": 2, "condition": "frontPkgChanged == true", "actions": [ "ui.showShortToast(\"isAirplaneModeEnabled? \" + data.isAirplaneModeEnabled());" ] } ]
116
389
/* * Copyright 2014 <NAME>, Inc. */ package gw.lang.reflect.java; public interface IJavaEnumType { }
36
3,282
// Copyright 2016 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. package org.chromium.chrome.browser.vr_shell; import com.google.vr.ndk.base.Version; import com.google.vr.vrcore.base.api.VrCoreNotAvailableException; im...
663
1,127
// Copyright (C) 2018-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include "kernel_base_opencl.h" namespace kernel_selector { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // scatter_update_params ///////////...
558
415
<filename>Volume_10/Number_2/Baerentzen2005/Libsrc/CGLA/Vec2i.cpp #include "Vec2i.h" #include "Vec2f.h" namespace CGLA { Vec2i::Vec2i(const Vec2f& v): ArithVec<int,Vec2i,2>(int(floor(v[0])), int(floor(v[1]))) {} }
118
10,110
# Lint as: python3 # Copyright 2019 Deepmind Technologies Limited. # # 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 ap...
3,014
612
<gh_stars>100-1000 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # # # Spatial Temporal Multiview Dataset from os import path as osp from pathlib import Path from copy im...
7,640
1,760
<filename>agdk/third_party/protobuf-3.0.0/php/ext/google/protobuf/storage.c #include <stdint.h> #include <protobuf.h> // ----------------------------------------------------------------------------- // PHP <-> native slot management. // ----------------------------------------------------------------------------- sta...
8,287
3,110
""" Initialization for extra modules in igel"""
11
382
'''test_style - test coding style ================================= :Author: <NAME> :Release: $Id$ :Date: |today| :Tags: Python Purpose ------- This script runs pep8 on all UMI-tools This script is best run within nosetests:: nosetests tests/test_style.py This code is borrowed with permission from https://github.co...
971
796
<reponame>donroyco/falco """falco URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, n...
927
302
#ifndef _LIBC_LIMITS_H #define _LIBC_LIMITS_H 1 #include <stdint.h> #ifndef PAGE_SIZE #define PAGE_SIZE 4096 #endif #define PATH_MAX 4096 #if !defined MAXPATHLEN && defined PATH_MAX #define MAXPATHLEN PATH_MAX #endif #define NAME_MAX 255 #define PIPE_BUF 4096 #define INT_MAX INT32_MAX #define INT_MIN INT32_MIN #...
396
6,969
/* Solution by <NAME> *********************************************************** Albus Dumbledore announced that the school will host the legendary event known as Wizard Tournament where four magical schools are going to compete against each other in a very deadly competition by facing some dangerous chal...
1,440
5,169
{ "name": "Markup", "version": "2.2", "summary": "Lightweight markup text formatting in Swift", "description": "Markup generates attributed strings using a familiar markup syntax:\n\n* To emphasize words or sentences, you can surround the text with *asterisks* to create bold text or _underscores_ for italic tex...
379
471
#pragma once #include "libs.h" #ifdef __GNUC__ #define NAKED __attribute__((naked)) #define UNUSED __attribute__((unused)) #else // Visual studio really hates GCC-specific syntax (I mean, it's right) #undef PACKED #define PACKED #define NAKED #define UNUSED #endif #define CHECK(val, msg) if (val != 0) { throw std::r...
834
2,661
<reponame>tornado12345/earthenterprise // Copyright 2017 Google Inc. // Copyright 2020 The Open GEE Contributors // // 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.apac...
5,192
488
//! Contributed by <NAME> #include <omp.h> typedef double real8; extern void OtherFunc(int k,real8 *l,real8 *m,real8 *n,real8 *o,real8 *p,real8 q,real8 r,real8 s[3]); void foo(int istart,int iend,real8 *a,real8 *b,real8 *c,int k,real8 *l,real8 *m,real8 *n,real8 *o,real8 *p) { for (int i = istart; i <= iend - 1; i +...
284
310
<filename>gear/hardware/h/handshoe.json { "name": "HandShoe", "description": "An ergonomic mouse.", "url": "https://handshoemouse.com/" }
56
569
<filename>reverb/cc/support/trajectory_util.h // Copyright 2019 DeepMind Technologies Limited. // // 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/LIC...
1,306
4,200
<gh_stars>1000+ package com.dtolabs.rundeck.net.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @JsonIgnoreProperties(ignoreUnknown = true) public class ErrorResponse implements ErrorDetail { public String error; public int apiversion; public String errorCode; public Strin...
502
303
<filename>fastfold/utils/checkpointing.py # Copyright 2021 AlQuraishi Laboratory # # 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...
902
4,277
import unittest import pytest from django.test import override_settings from channels import DEFAULT_CHANNEL_LAYER from channels.exceptions import InvalidChannelLayerError from channels.layers import InMemoryChannelLayer, channel_layers, get_channel_layer class TestChannelLayerManager(unittest.TestCase): @overr...
863
1,610
<filename>drivers/aiy/aiy/include/aiy-io.h /* * AIY GPIO/PWM Driver * * Author: <NAME> <<EMAIL>> * Copyright 2017 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ...
3,186
787
<gh_stars>100-1000 // OJ: https://leetcode.com/problems/minimum-time-to-collect-all-apples-in-a-tree/ // Author: github.com/lzl124631x // Time: O(N) // Space: O(N) class Solution { vector<vector<int>> G; vector<bool> seen; int dfs(int u, vector<bool> &hasApple) { seen[u] = true; int ans = 0;...
399
348
{"nom":"Douville-en-Auge","circ":"4ème circonscription","dpt":"Calvados","inscrits":192,"abs":75,"votants":117,"blancs":12,"nuls":0,"exp":105,"res":[{"nuance":"REM","nom":"<NAME>","voix":60},{"nuance":"LR","nom":"<NAME>","voix":45}]}
93
841
package cgeo.geocaching.apps.cachelist; final class LocusExportCacheListApp extends AbstractLocusCacheListApp { LocusExportCacheListApp() { super(true); } }
66
679
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to y...
2,193
2,137
<gh_stars>1000+ package org.hibernate.tool.api.version; public interface Version { String CURRENT_VERSION = "6.0.0-SNAPSHOT"; }
61
1,449
#include "tabs/log-tab.h" #include <QDesktopServices> #include <QDir> #include <QFile> #include <QRegularExpression> #include <QScrollBar> #include <ui_log-tab.h> #include "functions.h" #include "helpers.h" #include "logger.h" #include "utils/logging.h" LogTab::LogTab(QWidget *parent) : QWidget(parent), ui(new Ui::L...
580
1,322
import json from liberapay.testing import Harness class TestTipsJson(Harness): def test_post(self): self.make_participant("test_tippee1") self.make_participant("test_tippee2") test_tipper = self.make_participant("test_tipper") data = [ {'username': 'test_tippee1', '...
1,466
6,289
<filename>examples/demo-native-android/app/src/androidTest/java/com/detox/example/detoxexample/MainActivityTest.java package com.detox.example.detoxexample; import android.support.test.rule.ActivityTestRule; import android.support.test.runner.AndroidJUnit4; import android.test.suitebuilder.annotation.LargeTest; impo...
469
909
<gh_stars>100-1000 package idea; public class Tag { private int tag = 1; public int tag() {return tag;} public int mag = 1; public int mag() {return mag;} }
59
867
<reponame>qberty1337/SMCAMDProcessor<filename>AMDRyzenCPUPowerManagement/AMDRyzenCPUPowerManagement.cpp #include "AMDRyzenCPUPowerManagement.hpp" #include <string.h> OSDefineMetaClassAndStructors(AMDRyzenCPUPowerManagement, IOService); #define TCTL_OFFSET_TABLE_LEN 6 static constexpr const struct tctl_offset tctl_off...
12,791