code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# Copyright 2015 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
/* * pg_db_role_setting.c * Routines to support manipulation of the pg_db_role_setting relation * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION * src/backend/catalog/pg_db_role_setting.c */ #in...
c
github
https://github.com/postgres/postgres
src/backend/catalog/pg_db_role_setting.c
/* * 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
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/HerderConnectorContext.java
#!/usr/bin/env python # Copyright The HuggingFace Team 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/licens...
python
github
https://github.com/huggingface/transformers
examples/pytorch/translation/run_translation.py
login: path: /login logout: path: /logout profile: path: /profile controller: Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\RememberMeBundle\Controller\ProfileController
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/RememberMe/routing.yml
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems 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.o...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # encoding: utf-8 # # written by Sylvain Rouquette, 2014 ''' This is an extra tool, not bundled with the default waf binary. To add the cpplint tool to the waf file: $ ./waf-light --tools=compat15,cpplint or, if you have waf >= 1.6.2 $ ./waf update --files=cpplint this tool also requires c...
unknown
codeparrot/codeparrot-clean
# Copyright 2019 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
import requests from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter, OAuth2LoginView, OAuth2CallbackView) from .provider import PaypalProvider class PaypalOAuth2Adapter(OAuth2Adapter...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.chat_models.vertexai import ChatVertexAI # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling option...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/chat_models/vertexai.py
# Volatility # # Authors: # attc - atcuno@gmail.com # Joe Sylve - joe.sylve@gmail.com # # This file is part of Volatility. # # Volatility 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 2 of the...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Queue\Events; class JobExceptionOccurred { /** * Create a new event instance. * * @param string $connectionName The connection name. * @param \Illuminate\Contracts\Queue\Job $job The job instance. * @param \Throwable $exception The exception instance. ...
php
github
https://github.com/laravel/framework
src/Illuminate/Queue/Events/JobExceptionOccurred.php
# -*- coding: utf-8 -*- # pylint: disable=invalid-name """ Main application window. Copyright (c) Karol Będkowski, 2014-2015 This file is part of mna Licence: GPLv2+ """ __author__ = u"Karol Będkowski" __copyright__ = u"Copyright (c) Karol Będkowski, 2014-2015" __version__ = "2015-01-30" import sys import logging i...
unknown
codeparrot/codeparrot-clean
import configargparse import cPickle as pickle from ctypes import byref, windll, Structure from ctypes.wintypes import DWORD import os import socket import SocketServer import struct import threading import time from collections import OrderedDict from pydivert.windivert import WinDivert from pydivert.enum import Dire...
unknown
codeparrot/codeparrot-clean
/* * 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-test/src/test/java/org/springframework/boot/test/context/filter/TestTypeExcludeFilterTests.java
/** * \file sha256.h * * \brief This file contains SHA-224 and SHA-256 definitions and functions. * * The Secure Hash Algorithms 224 and 256 (SHA-224 and SHA-256) cryptographic * hash functions are defined in <em>FIPS 180-4: Secure Hash Standard (SHS)</em>. */ /* * Copyright The Mbed TLS Contributors * SPDX-...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/mbedtls/include/mbedtls/sha256.h
name: 'CodeQL' on: push: branches: ['master'] paths-ignore: - 'doc/**' - '**/man/*' - '**.md' - '**.rdoc' - '**/.document' - '.*.yml' pull_request: paths-ignore: - 'doc/**' - '**/man/*' - '**.md' - '**.rdoc' - '**/.document' - '.*....
unknown
github
https://github.com/ruby/ruby
.github/workflows/codeql-analysis.yml
<div cdkDropList cdkDropListOrientation="mixed" class="example-list" (cdkDropListDropped)="drop($event)" > @for (item of items; track item) { <div class="example-box" cdkDrag>{{ item }}</div> } </div>
html
github
https://github.com/angular/angular
adev/src/content/examples/drag-drop/src/mixed-sorting/app/app.html
from email.utils import parseaddr from datetime import (datetime, date) from time import (strptime, strftime) from sqlalchemy import (not_, or_) from pyramid.view import ( view_config, ) from pyramid.httpexceptions import ( HTTPFound, ) import colander from deform import ( Form, widget, Vali...
unknown
codeparrot/codeparrot-clean
""" Django settings for untitled1 project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) ...
unknown
codeparrot/codeparrot-clean
#pragma once #include <c10/macros/Macros.h> #include <memory> namespace at::functorch { // NOTE [functorch TLS in pytorch/pytorch] // // functorch lives out-of-tree. However, it has some TLS that needs to be // propagated. The solution for that is we store a pointer to the TLS // inside pytorch/pytorch and extend Fu...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/FuncTorchTLS.h
# -*- test-case-name: twisted.names.test.test_names -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for twisted.names. """ import socket, operator, copy from StringIO import StringIO from twisted.trial import unittest from twisted.internet import reactor, defer, error from...
unknown
codeparrot/codeparrot-clean
/* * 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
build-plugin/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/PluginApplicationAction.java
''' firewallconfigdecryptor: firewall configuration parsing tool Note that "python setup.py test" invokes pytest on the package. With appropriately configured setup.cfg, this will check both xxx_test modules and docstrings. Copyright 2014, dinesha ranathunga. Licensed under MIT. ''' import sys from setuptools import ...
unknown
codeparrot/codeparrot-clean
# @ut.accepts_scalar_input2(argx_list=[1]) # def get_obj(depc, tablename, root_rowids, config=None, ensure=True): # """ Convinience function. Gets data in `tablename` as a list of # objects. """ # print('WARNING EXPERIMENTAL') # try: # if tablename == depc.root: # obj_list = list(dep...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # encoding: utf-8 ## ============================================== ## GOAL : Format code, Update headers ## ============================================== import argparse import logging import os import re import sys import datetime import subprocess ## ========================================...
unknown
codeparrot/codeparrot-clean
<html> <head></head> <body> <script src="js/vendor.js" charset="utf-8"></script> <script src="js/pageA.js" charset="utf-8"></script> </body> </html>
html
github
https://github.com/webpack/webpack
examples/explicit-vendor-chunk/pageA.html
# -*- coding: utf-8 -*- """Supporting definitions for the Python regression tests. Backported for python-future from Python 3.3 test/support.py. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from future import utils from future.builtins import str, ra...
unknown
codeparrot/codeparrot-clean
""" Test lldb data formatter subsystem. """ from __future__ import print_function import lldb from lldbsuite.test.lldbtest import * import lldbsuite.test.lldbutil as lldbutil class LanguageCategoryUpdatesTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's se...
unknown
codeparrot/codeparrot-clean
""" ============================ LocalOutlierFactor benchmark ============================ A test of LocalOutlierFactor on classical anomaly detection datasets. """ from time import time import numpy as np import matplotlib.pyplot as plt from sklearn.neighbors import LocalOutlierFactor from sklearn.metrics import ro...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 --- $id: http://devicetree.org/schemas/mfd/brcm,cru.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Broadcom CRU maintainers: - Rafał Miłecki <rafal@milecki.pl> description: | Broadcom CRU ("Clock and Reset Unit" or "Central Re...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/mfd/brcm,cru.yaml
from django.contrib.syndication.views import Feed from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404 from WebMTG.models import MTGCard, MTGPrice class Top50Feed(Feed): title = "MTGToolbox 50 Most Expensive Cards" description = "MTGToolbox 50 Most Expensive Cards" l...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 # Copyright 2011 Tree.io Limited # This file is part of Treeio. # License www.tree.io/license import re from xml.sax.saxutils import escape, unescape import html5lib from html5lib import treebuilders, treewalkers, serializer from html5lib.tokenizer import HTMLTokenizer from html5lib.constants import ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import UserError class CrmTeam(models.Model): _inherit = 'crm.team' use_quotations = fields.Boolean(string='Quotations', help="Check this box if you ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright 2012 Google 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 b...
unknown
codeparrot/codeparrot-clean
# defines global variables import os import pickle import importlib import sol.themer as themer class SingletonDecorator: def __init__(self, klass): self.klass = klass self.instance = None def __call__(self, *args, **kwds): if self.instance is None: self.instance = self.kl...
unknown
codeparrot/codeparrot-clean
""" numerictypes: Define the numeric type objects This module is designed so "from numerictypes import \\*" is safe. Exported symbols include: Dictionary with all registered number types (including aliases): typeDict Type objects (not all will be available, depends on platform): see variable sctypes fo...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Generate short reads from a fragment selected from a genome import sys import random import bisect import gzip try: import cPickle as pickle except: import pickle import numpy from time import time import argparse import math inds = {'A': 0, 'T': 1, 'G': 2, 'C': 3, 'N': 4, 'a': 0...
unknown
codeparrot/codeparrot-clean
# Caesar Cipher - Python Code - Elizabeth Tweedale # t is the text string for decoding/encoding # k is the key integer # decode is a boolean def caesar(t, k, decode = False): if decode: k = 26 - k # check if you are decoding or encoding # if decode = True, shift the key forward ...
unknown
codeparrot/codeparrot-clean
# 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, software # d...
unknown
codeparrot/codeparrot-clean
""" Tests common to genericpath, ntpath and posixpath """ import copy import genericpath import os import pickle import sys import unittest import warnings from test import support from test.support import os_helper from test.support import warnings_helper from test.support.script_helper import assert_python_ok from t...
python
github
https://github.com/python/cpython
Lib/test/test_genericpath.py
// // use_awaitable.hpp // ~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_USE_AWAITABLE_...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/asio/use_awaitable.hpp
#!/s/std/bin/python import sys, string, os, glob, re, mfgraph def gen_data_size(benchmarks): configs = ["1p-MOSI_bcast_opt", "2p-MOSI_bcast_opt", "4p-MOSI_bcast_opt", "8p-MOSI_bcast_opt", "16p-MOSI_bcast_opt"] parameters = ["C GET_INSTR", "C GETS", "C GETX"] stacks = [] for benchmark in benchmarks...
unknown
codeparrot/codeparrot-clean
# # Module providing the `Process` class which emulates `threading.Thread` # # multiprocessing/process.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # __all__ = ['BaseProcess', 'current_process', 'active_children', 'parent_process'] # # Imports # import os impo...
python
github
https://github.com/python/cpython
Lib/multiprocessing/process.py
from j25.loaders.ControllerLoader import AutoControllerLoader from j25.loaders.TaskLoader import AutoTaskLoader import importlib import logging import traceback import j25 logger = logging.getLogger("AppLoader") class AutoAppLoader(object): def __init__(self, applications): self.apps = [] self.app...
unknown
codeparrot/codeparrot-clean
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !js package runtime // sleep and wakeup on one-time events. // before any calls to notesleep or notewakeup, // must call noteclear to initialize th...
go
github
https://github.com/golang/go
src/runtime/note_other.go
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #include <immintrin.h> #include <qnnpack/q8dwconv.h> #include <requantization/runtime-sse2.h> void ...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/quantized/cpu/qnnpack/src/q8dwconv/up8x9-sse2-per-channel.c
# # ------------------------------------------------------------ # Copyright (c) All rights reserved # SiLab, Institute of Physics, University of Bonn # ------------------------------------------------------------ # import unittest import os from basil.dut import Dut from basil.utils.sim.utils import cocotb_compile_a...
unknown
codeparrot/codeparrot-clean
/** @type {import('tailwindcss').Config} */ module.exports = { content: ["./components/**/*.js", "./pages/**/*.js"], theme: { extend: { fontFamily: { sans: '-apple-system, "Helvetica Neue", "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"...
javascript
github
https://github.com/vercel/next.js
examples/cms-builder-io/tailwind.config.js
/* Copyright 2015 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/core/lib/io/table_builder.h
/** * @file static_literals.h * * A set of static literal nodes that can be checked for duplicates. */ #ifndef PRISM_STATIC_LITERALS_H #define PRISM_STATIC_LITERALS_H #include "prism/defines.h" #include "prism/ast.h" #include "prism/util/pm_newline_list.h" #include <assert.h> #include <stdbool.h> /** * An inter...
c
github
https://github.com/ruby/ruby
prism/static_literals.h
// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: lease.proto package leasepb import ( fmt "fmt" io "io" math "math" math_bits "math/bits" proto "github.com/golang/protobuf/proto" etcdserverpb "go.etcd.io/etcd/api/v3/etcdserverpb" ) // Reference imports to suppress errors if they are not otherwise...
go
github
https://github.com/etcd-io/etcd
server/lease/leasepb/lease.pb.go
"""Tests covering Credentials utilities.""" import uuid from edx_oauth2_provider.tests.factories import ClientFactory import mock from nose.plugins.attrib import attr from provider.constants import CONFIDENTIAL from openedx.core.djangoapps.credentials.models import CredentialsApiConfig from openedx.core.djangoapps.cr...
unknown
codeparrot/codeparrot-clean
import datetime from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, override_settings from django.views.generic.base import View from .models import Artist, Author, Book, Page @override_settings(ROOT_URLCONF="generic_views.urls") class ListViewTests(TestCase): @classmethod ...
python
github
https://github.com/django/django
tests/generic_views/test_list.py
def main(j, args, params, tags, tasklet): params.merge(args) params.result = "" tags = params["tags"] id = tags.tagGet("id") model = tags.tagGet("model") actor = tags.tagGet("actor") application = tags.tagGet("application") if application == "": application = "system" # i...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # coding=utf-8 import os import re import time import datetime import hashlib import string import random from google.appengine.ext import webapp from google.appengine.api import memcache from google.appengine.ext import db from google.appengine.ext.webapp import util from google.appengine.ext.w...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack 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 requ...
unknown
codeparrot/codeparrot-clean
import json import re from re import Pattern from langchain_core.agents import AgentAction, AgentFinish from langchain_core.exceptions import OutputParserException from typing_extensions import override from langchain_classic.agents.agent import AgentOutputParser from langchain_classic.agents.chat.prompt import FORMA...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/agents/output_parsers/react_json_single_input.py
# # Copyright (C) 2021 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be...
unknown
codeparrot/codeparrot-clean
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015-2019 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # 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 distribut...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-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-framework
spring-context/src/main/java/org/springframework/context/annotation/EnableMBeanExport.java
""" Monthly precip reliability""" import calendar import datetime import psycopg2.extras import numpy as np import pandas as pd from pyiem import network from pyiem.plot.use_agg import plt from pyiem.util import get_autoplot_context, get_dbconn from pyiem.exceptions import NoDataFound def get_description(): """ R...
unknown
codeparrot/codeparrot-clean
import collections.abc import inspect import warnings from math import ceil from asgiref.sync import sync_to_async from django.utils.deprecation import RemovedInDjango70Warning from django.utils.functional import cached_property from django.utils.inspect import method_has_no_args from django.utils.translation import ...
python
github
https://github.com/django/django
django/core/paginator.py
from distutils.util import convert_path from distutils import log from distutils.errors import DistutilsOptionError import distutils import os from setuptools import Command __all__ = ['config_file', 'edit_config', 'option_base', 'setopt'] def config_file(kind="local"): """Get the filename of the distutils, loca...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2013 Google Inc. 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 list of conditions and the ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python #-*- coding: utf-8 -*- ################################################################# # classes Output # # Création d'objet de type output pour les GPIO # # # # Auteu...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals import re import itertools from .common import InfoExtractor from ..compat import ( compat_str, ) from ..utils import ( determine_ext, unified_strdate, ) class RutubeIE(InfoExtractor): IE_NAME = 'rutube' IE_DESC = 'Rutube videos' _VALID_...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # Copyright (c) 2016 Red Hat, 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...
unknown
codeparrot/codeparrot-clean
__author__ = 'Charles' from collections import defaultdict from warpper import check_files from model import IMAGE_OUTPUT_MODEL from datetime import datetime import logging import sys import image import numpy as np reload(sys) sys.setdefaultencoding('utf-8') logger = logging.getLogger() logger.setLevel(logging.DEBUG...
unknown
codeparrot/codeparrot-clean
""" user_auth.py This blueprint handles user authentication, everything from sign up to log out. We use flask-login. """ from datetime import datetime, timedelta from uuid import uuid4 from flask import render_template, Blueprint, redirect, url_for, request, \ flash from flask.ext.login import LoginManager, logi...
unknown
codeparrot/codeparrot-clean
# !/usr/bin/python # -*- coding: utf-8 -*- # # Created on Oct 16, 2015 # @author: Bo Zhao # @email: bo_zhao@hks.harvard.edu # @website: http://yenching.org # @organization: Harvard Kennedy School import sys from multiprocessing.dummy import Pool as ThreadPool # from multiprocessing.dummy import Lock i...
unknown
codeparrot/codeparrot-clean
use actix_web::{web, App, Responder}; use actix_multipart::form::{tempfile::TempFile, text::Text, MultipartForm}; #[derive(Debug, MultipartForm)] struct ImageUpload { description: Text<String>, timestamp: Text<i64>, image: TempFile, } async fn handler(_form: MultipartForm<ImageUpload>) -> impl Responder ...
rust
github
https://github.com/actix/actix-web
actix-multipart-derive/tests/trybuild/all-required.rs
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = '7sDream' class Activity: """用户动态类,请使用Author.activities获取.""" def __init__(self, act_type, act_time, **kwarg): """创建用户动态类实例. :param ActType act_type: 动态类型 :param datatime.datatime act_time: 动态发生时间 :return: 用户动态对象 ...
unknown
codeparrot/codeparrot-clean
""" This module implements the Sequential Least SQuares Programming optimization algorithm (SLSQP), originally developed by Dieter Kraft. See http://www.netlib.org/toms/733 Functions --------- .. autosummary:: :toctree: generated/ approx_jacobian fmin_slsqp """ from __future__ import division, print_func...
unknown
codeparrot/codeparrot-clean
```{eval-rst} .. role:: hidden :class: hidden-section ``` # PyTorch Symmetric Memory :::{note} `torch.distributed._symmetric_memory` is currently in alpha state and under development. API changes may be possible. ::: ## Why Symmetric Memory? With rapidly evolving parallelization techniques, existing frameworks ...
unknown
github
https://github.com/pytorch/pytorch
docs/source/symmetric_memory.md
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Title: CURLINFO_APPCONNECT_TIME Section: 3 Source: libcurl See-also: - CURLINFO_APPCONNECT_TIME_T (3) - curl_easy_getinfo (3) - curl_easy_setopt (3) Protocol: - All Added-in: 7.19.0 --- # NAME CURLINFO_APPCONNECT_TIME...
unknown
github
https://github.com/curl/curl
docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.md
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
unknown
codeparrot/codeparrot-clean
// Copyright 2020 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package jobs import ( "github.com/cockroachdb/cockroach/pkg/sql/catalog/colinfo" "github.com/cockroachdb/cockroach/pkg/sql/types" ) // BulkJobExecutionResultHeader i...
go
github
https://github.com/cockroachdb/cockroach
pkg/jobs/resultcols.go
{ "GEORADIUSBYMEMBER_RO": { "summary": "Returns members from a geospatial index that are within a distance from a member.", "complexity": "O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the...
json
github
https://github.com/redis/redis
src/commands/georadiusbymember_ro.json
# 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 (t...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import os.path import subprocess import sys import re from .common import FileDownloader from ..postprocessor.ffmpeg import FFmpegPostProcessor, EXT_TO_OUT_FORMATS from ..utils import ( cli_option, cli_valueless_option, cli_bool_option, cli_configuration_args, ...
unknown
codeparrot/codeparrot-clean
"""Tests for setuptools.find_packages().""" import os import sys import shutil import tempfile import unittest import platform import setuptools from setuptools import find_packages from setuptools.tests.py26compat import skipIf find_420_packages = setuptools.PEP420PackageFinder.find # modeled after CPython's test.s...
unknown
codeparrot/codeparrot-clean
import { LanguageService } from "../../_namespaces/Harness.js"; import * as ts from "../../_namespaces/ts.js"; import { jsonToReadableText } from "../helpers.js"; import { baselineTsserverLogs, openFilesForSession, TestSession, verifyGetErrRequest, } from "../helpers/tsserver.js"; import { File, ...
typescript
github
https://github.com/microsoft/TypeScript
src/testRunner/unittests/tsserver/plugins.ts
data = ( 'Dang ', # 0x00 'Ma ', # 0x01 'Sha ', # 0x02 'Dan ', # 0x03 'Jue ', # 0x04 'Li ', # 0x05 'Fu ', # 0x06 'Min ', # 0x07 'Nuo ', # 0x08 'Huo ', # 0x09 'Kang ', # 0x0a 'Zhi ', # 0x0b 'Qi ', # 0x0c 'Kan ', # 0x0d 'Jie ', # 0x0e 'Fen ', # 0x0f 'E ', # 0x10 'Ya ', ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.network.tls.cipher import io.ktor.network.tls.* import io.ktor.util.* import io.ktor.utils.io.core.* import kotlinx.io.* import java.security.* import javax.crypto.* import ja...
kotlin
github
https://github.com/ktorio/ktor
ktor-network/ktor-network-tls/jvm/src/io/ktor/network/tls/cipher/CBCCipher.kt
"""Utilities for input validation""" # Authors: Olivier Grisel # Gael Varoquaux # Andreas Mueller # Lars Buitinck # Alexandre Gramfort # Nicolas Tresegnie # License: BSD 3 clause import warnings import numbers import numpy as np import scipy.sparse as sp from ..externals...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.db import models class EmailAddressManager(models.Manager): def add_email(self, user, email, **kwargs): confirm = kwargs.pop("confirm", False) email_address = self.get_or_create(user=user, email=email, **kwargs) if confirm and not email_...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/assignmentCompatability23.ts] //// //// [assignmentCompatability23.ts] namespace __test1__ { export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };; export var __val__obj4 = obj4; } namespace _...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/assignmentCompatability23.js
// 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/random/internal/randen_engine.h
from functools import update_wrapper from django.http import Http404, HttpResponseRedirect from django.contrib.admin import ModelAdmin, actions from django.contrib.admin.forms import AdminAuthenticationForm from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.contenttypes import views as contenttype_...
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 not...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/migrations/versions/0007_2_8_0_add_processor_subdir_import_error.py
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This measurement runs a blink performance test and reports the results.""" import os import sys from telemetry.core import util from telemetry.page ...
unknown
codeparrot/codeparrot-clean
r"""HTTP cookie handling for web clients. This module has (now fairly distant) origins in Gisle Aas' Perl module HTTP::Cookies, from the libwww-perl library. Docstrings, comments and debug strings in this code refer to the attributes of the HTTP cookie system as cookie-attributes, to distinguish them clearly from Pyt...
python
github
https://github.com/python/cpython
Lib/http/cookiejar.py
//===- bolt/Passes/AArch64RelaxationPass.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
bolt/lib/Passes/AArch64RelaxationPass.cpp
__author__ = 'Ashoo' import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import scipy.stats import warnings sns.set(color_codes=True) # Reading the data where low_memory=False increases the program efficiency data= pd.read_csv("gapminder.csv", low_memory=False) # setting variab...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCU...
unknown
codeparrot/codeparrot-clean
""" This module houses the GEOS ctypes prototype functions for the unary and binary predicate operations on geometries. """ from ctypes import c_char, c_char_p, c_double from django.contrib.gis.geos.libgeos import GEOM_PTR, GEOSFuncFactory from django.contrib.gis.geos.prototypes.errcheck import check_predicate # ##...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright 2012 Olivier Leveau <olifozzy@gmail.com> # Copyright 2012 Antoine Bertin <diaoulael@gmail.com> # # This file is part of subliminal. # # subliminal is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by # t...
unknown
codeparrot/codeparrot-clean