code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
/* * Copyright 2012-present the original author or authors. * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot/src/main/java/org/springframework/boot/json/BasicJsonParser.java
name: Comment Commands on: issue_comment: types: created permissions: contents: read issues: write pull-requests: write jobs: preview_docs: runs-on: ubuntu-24.04 if: github.event.issue.pull_request && github.event.comment.body == '/preview' concurrency: group: ${{ github.actor }}-previ...
unknown
github
https://github.com/pandas-dev/pandas
.github/workflows/comment-commands.yml
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import unittest fro...
unknown
codeparrot/codeparrot-clean
# Derived from the 'default' backend in django-registration-redux from django.conf import settings from django.contrib.sites.requests import RequestSite from django.contrib.auth import authenticate from django.contrib.auth import login from django.db import transaction from django.http import HttpResponse from utils.t...
unknown
codeparrot/codeparrot-clean
<?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\FrameworkBundle\Controller; use Symfony\Component\HttpFo...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php
/* Copyright 2022 The TensorFlow 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 at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/lite/acceleration/configuration/stable_delegate_plugin.h
{% extends 'partial_base.html' %} {% partialdef extra-content %} Extra Content {% endpartialdef %} {% block main %} Main Content {% endblock %}
html
github
https://github.com/django/django
tests/template_tests/templates/partial_child.html
#!/bin/sh test_description='Test commit notes organized in subtrees' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh number_of_commits=100 start_note_commit () { test_tick && cat <<INPUT_END commit refs/notes/commits committer $GIT_COMMITTER_NAME <$GIT_COMMIT...
unknown
github
https://github.com/git/git
t/t3303-notes-subtrees.sh
"""SymPy is a Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) while keeping the code as simple as possible in order to be comprehensible and easily extensible. SymPy is written entirely in Python and does not require any external libraries, except optionally for ...
unknown
codeparrot/codeparrot-clean
## pygame - Python Game Library ## Copyright (C) 2007 Marcus von Appen ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (at ...
unknown
codeparrot/codeparrot-clean
""" test_data: ========== A module intended for use with Nose. """ from __future__ import absolute_import from nose.tools import raises from plotly.exceptions import (PlotlyError, PlotlyDictKeyError, PlotlyDictValueError, PlotlyDataTypeError, PlotlyListE...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """Sphinx directive to support embedded IPython code. This directive allows pasting of entire interactive IPython sessions, prompts and all, and their code will actually get re-executed at doc build time, with all prompts renumbered sequentially. It also allows you to input code as a pure pytho...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Argument-less script to select what to run on the buildbots.""" import os import shutil import subprocess import sys if sys.platform in ...
unknown
codeparrot/codeparrot-clean
// Copyright The Prometheus Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
go
github
https://github.com/prometheus/prometheus
rules/alerting_test.go
# tests for errors in {} format string try: '{0:0}'.format('zzz') except (ValueError): print('ValueError') try: '{1:}'.format(1) except IndexError: print('IndexError') try: '}'.format('zzzz') except ValueError: print('ValueError') # end of format parsing conversion specifier try: '{!'.fo...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2009 The Guava Authors * * 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...
java
github
https://github.com/google/guava
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/RegularImmutableMap.java
import functools from django.conf import settings from django.urls import LocalePrefixPattern, URLResolver, get_resolver, path from django.views.i18n import set_language def i18n_patterns(*urls, prefix_default_language=True): """ Add the language code prefix to every URL pattern within this function. This...
python
github
https://github.com/django/django
django/conf/urls/i18n.py
name: DevInfra on: push: pull_request_target: types: [opened, synchronize, reopened, ready_for_review, labeled] # Declare default permissions as read only. permissions: contents: read jobs: assistant_to_the_branch_manager: runs-on: ubuntu-latest if: github.event.repository.fork == false steps...
unknown
github
https://github.com/angular/angular
.github/workflows/assistant-to-the-branch-manager.yml
"""DC/OS release management 1. Build and upload a DC/OS release to a release URL 2. Move a latest version of a release from one place to another Co-ordinates across all gen.build_deploy """ import argparse import copy import importlib import inspect import json import logging import os.path import sys from distutils...
unknown
codeparrot/codeparrot-clean
/* * 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 may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/errors/LeaderNotAvailableException.java
#!/usr/bin/env python # # # 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 #...
unknown
codeparrot/codeparrot-clean
"""Support for Transport NSW (AU) to query next leave event.""" from datetime import timedelta from TransportNSW import TransportNSW import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity from homeassistant.const import ( ATTR_ATTRIBUTION, ATTR_MODE, CONF_API_KE...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.email.email_body import get_email from frappe.email.smtp import send def sendmail_md(recipients, sender=None, msg=None, subject=None, attachments=No...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2012 The Guava Authors * * 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...
java
github
https://github.com/google/guava
android/guava-testlib/src/com/google/common/collect/testing/DerivedGenerator.java
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 # noqa: F401 # noqa: F401 # noqa: F401 # noqa: F401 import traceback import dateparser # Disable insecure warnings requests.packages.urllib3.disable_warnings() '''CONSTANTS''' DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' DEPROVISIONED_...
unknown
codeparrot/codeparrot-clean
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. ```esql ROW a = "1" | ENRICH languages_policy ON a ``` | a:keyword | language_name:keyword | | --- | --- | | 1 | English |
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/commands/examples/enrich.csv-spec/enrich_on.md
""" Utility functions for - building and importing modules on test time, using a temporary location - detecting if compilers are present """ import os import sys import subprocess import tempfile import shutil import atexit import textwrap import re import random import nose from numpy.compat import asbytes, asstr...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2010 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. import os import sys SCRIPT_PATH = os.path.dirname(sys.argv[0]) if SCRIPT_PATH == "": SCRIPT_PATH = os.getcwd() PATHS_TO_TRY = [ '\\..\\..\\build\\...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations class ModuleDocFragment(object): DOCUMENTATION = r""" options: testcol2option: description: - A plugin option taken from testcol2 ...
python
github
https://github.com/ansible/ansible
test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/plugin.py
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package etcd import ( "context" "errors" "fmt" "os" "path" "strconv" "strings" "sync" "time" "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-secure-stdlib/parseutil" "github.com/hashicorp/go...
go
github
https://github.com/hashicorp/vault
physical/etcd/etcd3.go
def main(request, response): import simplejson as json f = file('config.json') source = f.read() s = json.JSONDecoder().decode(source) url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1]) url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0]) response.headers.set( ...
unknown
codeparrot/codeparrot-clean
# (c) 2017 Red Hat Inc. # # This file is part of Ansible # # Ansible 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 Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
unknown
codeparrot/codeparrot-clean
from datetime import datetime, timedelta from django.template.defaultfilters import timesince_filter from django.test import SimpleTestCase from django.test.utils import requires_tz_support from ..utils import setup from .timezone_utils import TimezoneTestCase class TimesinceTests(TimezoneTestCase): """ #202...
unknown
codeparrot/codeparrot-clean
{ "html": { "type": "Fragment", "start": 0, "end": 70, "children": [ { "type": "EachBlock", "start": 0, "end": 70, "children": [ { "type": "Element", "start": 33, "end": 62, "name": "div", "attributes": [ { "start": 38, "end": 50, ...
json
github
https://github.com/sveltejs/svelte
packages/svelte/tests/parser-legacy/samples/animation/output.json
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Chris Hoffman <christopher.hoffman@gmail.com> # # This file is part of Ansible # # Ansible 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 Foundation, either version ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers <dag@wieers.com> # # This file is part of Ansible # # Ansible 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 Foundation, either version 3 of the Lice...
unknown
codeparrot/codeparrot-clean
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for the inotify wrapper in L{twisted.internet.inotify}. """ import sys from twisted.internet import defer, reactor from twisted.python import filepath, runtime from twisted.python.reflect import requireModule from twisted.trial import u...
unknown
codeparrot/codeparrot-clean
from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.helpers.encoding import tryUrlencode from couchpotato.core.logger import CPLog from couchpotato.core.providers.movie.base import MovieProvider from couchpotato.environment import Env import time log = CPLog(__name__) class CouchPotatoApi(Mov...
unknown
codeparrot/codeparrot-clean
""" Python Character Mapping Codec tis_620 generated from 'python-mappings/TIS-620.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='st...
unknown
codeparrot/codeparrot-clean
/* Copyright 2022 The TensorFlow 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 at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/dtensor/mlir/expansions/identity_n_spmd_expander.h
<?php declare(strict_types=1); namespace Illuminate\Tests\Database; use Closure; use Exception; use Illuminate\Database\Connection; use Illuminate\Database\ConnectionResolverInterface; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\Belongs...
php
github
https://github.com/laravel/framework
tests/Database/DatabaseEloquentBelongsToManyCreateOrFirstTest.php
# Copyright 2023 Meta Platforms, Inc. and affiliates, and the HuggingFace Inc. team. 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/license...
python
github
https://github.com/huggingface/transformers
src/transformers/models/encodec/configuration_encodec.py
from unittest.mock import Mock import numpy import pytest import pyflo_suspect.processing as p import pyflo.ports import suspect @pytest.fixture def simple_data(): source_array = numpy.ones((4, 128), 'complex') source_array[1, :] *= 2 source_array[2, :] *= 4 source_array[3, :] *= 8 data = suspect...
unknown
codeparrot/codeparrot-clean
{ "applyable": true, "complete": true, "configuration": { "provider_config": { "tfcoremock": { "full_name": "registry.terraform.io/hashicorp/tfcoremock", "name": "tfcoremock", "version_constraint": "0.1.1" } }, "root_module": { "resources": [ { ...
json
github
https://github.com/hashicorp/terraform
testing/equivalence-tests/outputs/drift_relevant_attributes/plan.json
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
unknown
codeparrot/codeparrot-clean
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/controller/garbagecollector/graph.go
from __future__ import absolute_import, print_function from datetime import timedelta from django.conf import settings from django.db import models from django.utils import timezone from jsonfield import JSONField from sentry.db.models import FlexibleForeignKey, Model, sane_repr class AuthIdentity(Model): user =...
unknown
codeparrot/codeparrot-clean
class CheckoutSessionData(object): """ Responsible for marshalling all the checkout session data Multi-stage checkouts often require several forms to be submitted and their data persisted until the final order is placed. This class helps store and organise checkout form data until it is required to...
unknown
codeparrot/codeparrot-clean
from apps.plus_groups.models import TgGroup, Location from django.contrib.auth.models import User from django.db import models from django.conf import settings from apps.plus_permissions.site import Site def get_site(user) : from apps.plus_permissions.interfaces import secure_wrap ss = Site.objects.all() ...
unknown
codeparrot/codeparrot-clean
/*! * 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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/src/context/ChakraCustomProvider.tsx
/* * contrib/btree_gist/btree_macaddr8.c */ #include "postgres.h" #include "btree_gist.h" #include "btree_utils_num.h" #include "utils/fmgrprotos.h" #include "utils/inet.h" #include "utils/rel.h" #include "utils/sortsupport.h" typedef struct { macaddr8 lower; macaddr8 upper; /* make struct size = sizeof(gbtreeke...
c
github
https://github.com/postgres/postgres
contrib/btree_gist/btree_macaddr8.c
import math def find_Index(n): x = math.sqrt(2 * math.pow(10,(n - 1))); return round(x);
unknown
mbpp
module.exports = "jsx";
javascript
github
https://github.com/webpack/webpack
examples/dll/c.jsx
db1 = {"Database": {"Raynor": { "Raynor-Counter": ["Tracer", "Uther", "Zeratul"], "Raynor-Synergize": ["Who", "It" , "is"] }, "Stitches" : { "Stiches-Counter": ["What", "ever", "it",], "Stiches-Synergize":["What", "name", "is"] } } } db ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2013 Isaku Yamahata <yamahata at private email ne jp> # # 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 # # h...
unknown
codeparrot/codeparrot-clean
import numpy as np import pyworld as pw # import soundfile as sf import tensorflow as tf import os, shutil import glob def get_speakers(trainset: str = './data/fourspeakers'): '''return current selected speakers for training eg. ['SF2', 'TM1', 'SF1', 'TM2'] ''' p = os.path.join(trainset, "*") a...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models from itertools import chain class Migration(DataMigration): def forwards(self, orm): # See 0059_ontologize_emg_sono_sensors.py sensors...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import itertools import os import os.path import sys import argparse import logging def cartesian_product(dicts): return (dict(zip(dicts, x)) for x in itertools.product(*dicts.values())) def summary(configuration): kvs = sorted([(k, v) for k, v in configuration...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json import psycopg2 from flask import g class Retriever(object): """ Retrieves data from the DB. The 'fields' param accepts wildcards. They still need to be in a list though """ def __init__(self, fields, table, cond=None): ...
unknown
codeparrot/codeparrot-clean
// Copyright 2017 The Abseil Authors. // // 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
c
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/absl/synchronization/internal/graphcycles.h
# Copyright 2011 Matt Chaput. 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 list of conditions and the...
unknown
codeparrot/codeparrot-clean
use serde_derive::Serialize; mod remote { pub struct S { pub a: u16, } } #[derive(Serialize)] #[serde(remote = "remote::S")] struct S { a: u8, } fn main() {}
rust
github
https://github.com/serde-rs/serde
test_suite/tests/ui/remote/wrong_ser.rs
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe no_sitemap = 1 base_template_path = "templates/pages/style_settings.css" default_properties = { "background_color": "FFFFFF", "top_bar_background": "FFFFFF", ...
unknown
codeparrot/codeparrot-clean
import os from django.db import models from django.core.exceptions import ValidationError class Person(models.Model): name = models.CharField(max_length=100) class Triple(models.Model): left = models.IntegerField() middle = models.IntegerField() right = models.IntegerField() class Meta: u...
unknown
codeparrot/codeparrot-clean
#################################################################### #################################################################### #### The Awesome Simulator, DF-ISE FileIO Module #### #### #### #### Author: Abhejit Rajagopal, abhejit@ucla.edu #### #### #### #### (DFISE....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2014 clowwindy # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to u...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models, transaction from sentry.utils.db import is_postgres class Migration(SchemaMigration): def forwards(self, orm): # if you're not using Postgres...
unknown
codeparrot/codeparrot-clean
import {Component} from '@angular/core'; @Component({ selector: 'app-root', template: ` @if (isServerRunning) { <span>Yes, the server is running</span> } @else { <span>No, the server is not running</span> } `, }) export class App { isServerRunning = true; }
typescript
github
https://github.com/angular/angular
adev/src/content/tutorials/learn-angular/steps/4-control-flow-if/answer/src/app/app.ts
// RUN: pp-trace -callbacks 'File*,Macro*,-MacroUndefined' %s -- | FileCheck %s // RUN: pp-trace -callbacks ' File* , Macro* , -MacroUndefined ' %s -- | FileCheck %s // RUN: not pp-trace -callbacks '[' %s -- 2>&1 | FileCheck --check-prefix=INVALID %s #define M 1 int i = M; #undef M // CHECK: --- // CHECK: -...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/pp-trace/pp-trace-filter.cpp
# Copyright 2015 Tesora, 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 required by ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from functools import reduce from hwt.hdl.constants import Time from hwt.interfaces.std import VectSignal from hwt.interfaces.utils import addClkRstn from hwt.pyUtils.arrayQuery import grouper, balanced_reduce from hwt.simulator.simTestCase import SimTestCase from hwt.sy...
unknown
codeparrot/codeparrot-clean
.half { width: 50%; }
unknown
github
https://github.com/jekyll/jekyll
test/source/_sass/_grid.scss
# -*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response, get_object_or_404 from django.contrib.auth.decorators import login_required from django.template import RequestContext from django.views.decora...
unknown
codeparrot/codeparrot-clean
import pdb; import sys; import linecache def qdebug(options = None, expanded = None, typeformats = None, individualformats = None, watchers = None): class QDebug: def __init__(self, options = None, expanded = None, ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2014 Shaun McCance <shaunm@gnome.org> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, me...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2025 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.standalone.base.projectStructure import com.intellij.core.CoreAppli...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-standalone/analysis-api-standalone-base/src/org/jetbrains/kotlin/analysis/api/standalone/base/projectStructure/PluginStructureProvider.kt
//go:build ignore // +build ignore package main import ( "log" "os" "github.com/grafana/grafana/pkg/build" ) func main() { log.SetOutput(os.Stdout) log.SetFlags(0) os.Exit(build.RunCmd()) }
go
github
https://github.com/grafana/grafana
build.go
# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy,...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2014 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
unknown
codeparrot/codeparrot-clean
#include "Python.h" #include "pycore_fileutils.h" // _Py_HasFileSystemDefaultEncodeErrors #include "pycore_getopt.h" // _PyOS_GetOpt() #include "pycore_initconfig.h" // _PyStatus_OK() #include "pycore_interp.h" // _PyInterpreterState.runtime #include "pycore_long.h" // _PY_LONG_MAX_STR_DIG...
c
github
https://github.com/python/cpython
Python/initconfig.c
# Copyright 2011 OpenStack Foundation # 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 requ...
unknown
codeparrot/codeparrot-clean
from browser import window _kids=['Marsha', 'Jan', 'Cindy'] def continue1(event): _objectStore.get('Jan', onsuccess=exists, onerror=continue2) def continue2(event): for _kid in _kids: _rec={'name': _kid} _objectStore.put(_rec, _kid, onsuccess=printmsg, onerror=printerr) _objectStore.get(...
unknown
codeparrot/codeparrot-clean
## Input ```javascript function mutate() {} function cond() {} function Component(props) { let a = {}; let b = {}; let c = {}; let d = {}; while (true) { mutate(a, b); if (cond(a)) { break; } } // all of these tests are seemingly readonly, since the values are never directly // muta...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/mutable-liverange-loop.expect.md
import pytest from pandas import ( CategoricalIndex, Index, ) import pandas._testing as tm class TestAppend: @pytest.fixture def ci(self): categories = list("cab") return CategoricalIndex(list("aabbca"), categories=categories, ordered=False) def test_append(self, ci): # ap...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/indexes/categorical/test_append.py
//===-- BackgroundIndexLoader.cpp - ---------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clangd/index/BackgroundIndexLoader.cpp
/* * Redis objects overview * * robj (struct redisObject) is the fundamental in-memory container that can hold * values of different logical types (strings, lists, sets, hashes, sorted sets, * streams, modules, ...). It contains: * - type: one of OBJ_STRING, OBJ_LIST, OBJ_SET, OBJ_ZSET, OBJ_HASH, OBJ_STREAM, *...
c
github
https://github.com/redis/redis
src/object.h
#ifndef C10_UTIL_STRINGUTIL_H_ #define C10_UTIL_STRINGUTIL_H_ #include <c10/macros/Macros.h> #include <c10/util/string_utils.h> #include <cstddef> #include <optional> #include <ostream> #include <sstream> #include <string> #include <string_view> #include <type_traits> #include <vector> C10_CLANG_DIAGNOSTIC_PUSH() #i...
c
github
https://github.com/pytorch/pytorch
c10/util/StringUtil.h
# frozen_string_literal: true module ActiveModel module Validations # = Active \Model \Validation \Callbacks # # Provides an interface for any class to have ClassMethods#before_validation and # ClassMethods#after_validation callbacks. # # First, include +ActiveModel::Validations::Callbacks+ f...
ruby
github
https://github.com/rails/rails
activemodel/lib/active_model/validations/callbacks.rb
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. # Appengine users: https://developers.google.com/appengine/docs/python/sockets/#making_httplib_use_sockets from __future__ import absolute_import, print_function import logging import requests from requests.exceptions import Timeout from thre...
unknown
codeparrot/codeparrot-clean
- Type: `function` - Name: `staticMethod` - Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` - Static: yes
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.md
//// [tests/cases/compiler/dynamicNames.ts] //// //// [module.ts] export const c0 = "a"; export const c1 = 1; export const s0 = Symbol(); export interface T0 { [c0]: number; [c1]: string; [s0]: boolean; } export declare class T1 implements T2 { [c0]: number; [c1]: string; [s0]: boolean; } expor...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/dynamicNames.js
# SQLite. Versions 3.8.0 and up are supported. # gem install sqlite3 # # Ensure the SQLite 3 gem is defined in your Gemfile # gem "sqlite3" # default: &default adapter: sqlite3 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> timeout: 5000 development: <<: *default database: storage/development.sqlite...
unknown
github
https://github.com/rails/rails
actionmailbox/test/dummy/config/database.yml
""" wfapiclient - WebFaction API Client module A local client for interfacing to the WebFaction web hosting server API. It provides class-based organization, convenience methods, script execution, and run reporting. Can be used as standalone module to execute a supplied script file or as an import...
unknown
codeparrot/codeparrot-clean
""" WSGI config for document_similarity project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_AP...
unknown
codeparrot/codeparrot-clean
"""Constants used by Mutagen.""" GENRES = [ u"Blues", u"Classic Rock", u"Country", u"Dance", u"Disco", u"Funk", u"Grunge", u"Hip-Hop", u"Jazz", u"Metal", u"New Age", u"Oldies", u"Other", u"Pop", u"R&B", u"Rap", u"Reggae", u"Rock", u"Techno", ...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 The TensorFlow 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 at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
""" Models can have a ``managed`` attribute, which specifies whether the SQL code is generated for the table on various manage.py operations. """ from django.db import models from django.utils.encoding import python_2_unicode_compatible # All of these models are created in the database by Django. @python_2_unicode_...
unknown
codeparrot/codeparrot-clean
from ..quantizers.quantizers_utils import should_convert_module from ..utils import is_torch_available, logging if is_torch_available(): import torch import torch.nn as nn import torch.nn.functional as F logger = logging.get_logger(__name__) # the weights are ternary so can be represented with 2 bits, an...
python
github
https://github.com/huggingface/transformers
src/transformers/integrations/bitnet.py
import functools import os import shutil import subprocess import tempfile from datetime import datetime class OpenSSL(object): def __init__(self, logger, binary, base_path, conf_path, hosts, duration, base_conf_path=None): """Context manager for interacting with OpenSSL. Creates a...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com> # 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 above copyright # notice, this li...
unknown
codeparrot/codeparrot-clean