code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009, P. Christeas, Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modi... | unknown | codeparrot/codeparrot-clean | ||
"""
A keras attention layer that wraps RNN layers.
Based on tensorflows [attention_decoder](https://github.com/tensorflow/tensorflow/blob/c8a45a8e236776bed1d14fd71f3b6755bd63cc58/tensorflow/python/ops/seq2seq.py#L506)
and [Grammar as a Foreign Language](https://arxiv.org/abs/1412.7449).
date: 20161101
author: wassnam... | unknown | codeparrot/codeparrot-clean | ||
import os
import unittest
from queue import Queue
from clang.cindex import Index
from coalib.results.Result import Result
from coalib.results.SourceRange import SourceRange
from coalib.settings.Section import Section
from bears.c_languages.ClangComplexityBear import (
ClangComplexityBear)
from coalib.testing.Bear... | unknown | codeparrot/codeparrot-clean | ||
# frozen_string_literal: true
require_relative "../../test_helper"
module MailExt
class AddressWrappingTest < ActiveSupport::TestCase
test "wrap" do
assert_deprecated(ActionMailbox.deprecator) do
needing_wrapping = Mail::Address.wrap("david@basecamp.com")
wrapping_not_needed = Mail::Add... | ruby | github | https://github.com/rails/rails | actionmailbox/test/unit/mail_ext/address_wrapping_test.rb |
<div ngTabs>
<div ngTabList selectionMode="explicit" selectedTab="movie">
<div ngTab value="movie">Movie</div>
<div ngTab value="theatres">Cast</div>
<div ngTab value="showtimes">Reviews</div>
</div>
<div class="sliding-window">
<div ngTabPanel [preserveContent]="true" value="movie">
<ng-te... | html | github | https://github.com/angular/angular | adev/src/content/examples/aria/tabs/src/explicit-selection/app/app.html |
import logging
from urllib import urlencode
from urlparse import parse_qs
from urlparse import urlsplit
import time
import ldap
from saml2 import SAMLError
from saml2.aes import AESCipher
from saml2.httputil import Response
from saml2.httputil import make_cookie
from saml2.httputil import Redirect
from saml2.httputil i... | unknown | codeparrot/codeparrot-clean | ||
name: riscv64
on:
push:
tags:
- ciflow/riscv64/*
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true
permissions: read-all
jobs:
pytorch-linux-noble-riscv64-py... | unknown | github | https://github.com/pytorch/pytorch | .github/workflows/riscv64.yml |
[
{
"pk": "4",
"model": "fixtures_regress.person",
"fields": {
"name": "Neal Stephenson"
}
}
] | json | github | https://github.com/django/django | tests/fixtures_regress/fixtures_2/forward_ref_2.json |
import {bootstrapApplication} from '@angular/platform-browser';
import {appConfig} from './app/app.config';
import {AppComponent} from './app/app.component';
(globalThis as any)['doBootstrap'] = () => {
bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err));
}; | typescript | github | https://github.com/angular/angular | integration/platform-server-hydration/src/main.ts |
from prosoar.waypoints.list import WaypointList
def __compose_line(waypoint):
# "Aachen Merzbruc",AACHE,DE,5049.383N,00611.183E,189.0m,5,80,530.0m,"122.875",
str = '"' + waypoint.name + '",'
str += waypoint.short_name + ','
str += waypoint.country_code + ','
lat = abs(waypoint.lat)
str += "{0:... | unknown | codeparrot/codeparrot-clean | ||
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# 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 li... | unknown | codeparrot/codeparrot-clean | ||
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
# Copyright 2015 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)
from pants_test.cont... | unknown | codeparrot/codeparrot-clean | ||
from ajenti.com import implements
from ajenti.api import *
from ajenti.ui import *
from ajenti import apis
from groups import *
class ServicesPlugin(CategoryPlugin):
text = 'Services'
icon = '/dl/services/icon.png'
folder = 'system'
def on_init(self):
self.svc_mgr = self.app.get_backend(apis.... | unknown | codeparrot/codeparrot-clean | ||
import os
try:
from django.template import TemplateDoesNotExist
from django.template.loaders import filesystem, app_directories
_django_available = True
except ImportError:
class TemplateDoesNotExist(Exception):
pass
_django_available = False
from hamlpy import hamlpy
from hamlpy.template... | unknown | codeparrot/codeparrot-clean | ||
'''
Set up Visual Sudio to build a specified MPIR configuration
Copyright (C) 2011, 2012, 2013, 2014 Brian Gladman
'''
from __future__ import print_function
from operator import itemgetter
from os import listdir, walk, unlink, makedirs, sep
from os.path import split, splitext, isdir, relpath, join, exists
from os.pa... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals
import re
import unicodedata
from gzip import GzipFile
from io import BytesIO
from django.utils import six
from django.utils.encoding import force_text
from django.utils.functional import SimpleLazyObject, keep_lazy, keep_lazy_text
from django.utils.safestring import SafeText, ... | unknown | codeparrot/codeparrot-clean | ||
#ifndef Py_INTERNAL_INTERP_H
#define Py_INTERNAL_INTERP_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef Py_BUILD_CORE
# error "this header requires Py_BUILD_CORE define"
#endif
#include "pycore_interp_structs.h" // PyInterpreterState
/* interpreter state */
#define _PyInterpreterState_WHENCE_NOTSET -1
#define _Py... | c | github | https://github.com/python/cpython | Include/internal/pycore_interp.h |
/*!
* 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/components/AssetExpression/OrGateNode.tsx |
// 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.
package slices
import (
"cmp"
"iter"
)
// All returns an iterator over index-value pairs in the slice
// in the usual order.
func All[Slice ~[]E, E any](s S... | go | github | https://github.com/golang/go | src/slices/iter.go |
# -*- coding:Utf8 -*-
from tkinter import *
from math import pi, sin, cos
class Canon(object):
"""Petit canon graphique"""
def __init__(self, boss, x, y, angle=25):
self.boss = boss # référence du canevas
self.x1, self.y1 = x, y # axe de rotation du canon
# dessiner la b... | unknown | codeparrot/codeparrot-clean | ||
# -*- test-case-name: twisted.pair.test.test_ethernet -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
"""Support for working directly with ethernet frames"""
import struct
from twisted.internet import protocol
from twisted.pair import raw
from zope.interface import implements, Interfac... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Lenovo, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard CNOS documentation fragment
DOCUMENTATION = r'''
options:
outputfile:
description:
- This... | unknown | codeparrot/codeparrot-clean | ||
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright 2008-2010, 2015 Richard Dymond (rjdymond@gmail.com)
#
# This file is part of Pyskool.
#
# Pyskool 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 Lic... | unknown | codeparrot/codeparrot-clean | ||
from src.google_foobar.P001_pirates.solution_01 import answer
def main():
numbers_01 = [1, 0] # 2
numbers_02 = [1, 2, 1] # 2
numbers_03 = [1, 3, 0, 1] # 2
numbers_04 = [2, 1, 3, 2] # 2
numbers_05 = [2, 2, 4, 4, 0] # 3
numbers_06 = [2, 3, 1, 4, 5, 0] # 6
numbers_07 = [1, 7, 1, 4, 5, 0,... | unknown | codeparrot/codeparrot-clean | ||
import logging
import re
from django import http
from django.conf import settings
from django.core import urlresolvers
from django.core.exceptions import PermissionDenied
from django.core.mail import mail_managers
from django.utils.cache import get_conditional_response, set_response_etag
from django.utils.encoding imp... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2009-2010 Six Apart Ltd.
# 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 an... | unknown | codeparrot/codeparrot-clean | ||
// This file was automatically generated from coroutine-context-and-dispatchers.md by Knit tool. Do not edit.
package kotlinx.coroutines.guide.exampleContext01
import kotlinx.coroutines.*
fun main() = runBlocking<Unit> {
launch { // context of the parent, main runBlocking coroutine
println("main runBlocki... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | kotlinx-coroutines-core/jvm/test/guide/example-context-01.kt |
# coding=utf-8
"""
hash_table.py
Python implementation of the very simple, fixed-array hash table
used for the audfprint fingerprinter.
2014-05-25 Dan Ellis dpwe@ee.columbia.edu
"""
from __future__ import division, print_function
import gzip
import math
import os
import random
import sys
import numpy as np
import s... | unknown | codeparrot/codeparrot-clean | ||
import pickle
import re
import uuid
import warnings
from collections import defaultdict
from collections.abc import Mapping
from functools import partial
from io import StringIO
from itertools import product
import numpy as np
import pytest
from numpy.testing import assert_array_almost_equal, assert_array_equal
from s... | python | github | https://github.com/scikit-learn/scikit-learn | sklearn/feature_extraction/tests/test_text.py |
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
lookup: items
author: Michael... | unknown | codeparrot/codeparrot-clean | ||
### extends 'class_empty.py'
### block ClassImports
# NOTICE: Do not edit anything here, it is generated code
from . import gxapi_cy
from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref
from .GXE3DV import GXE3DV
from .GXMAP import GXMAP
### endblock ClassImports
### block Header
# NOTICE: The code genera... | unknown | codeparrot/codeparrot-clean | ||
#! /usr/bin/env python
from unit_timeside import *
from timeside.decoder import *
from timeside.analyzer.level import Level
class TestAnalyzerLevel(unittest.TestCase):
def setUp(self):
self.analyzer = Level()
def testOnSweep(self):
"runs on sweep"
self.source = os.path.join (os.path.... | unknown | codeparrot/codeparrot-clean | ||
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
const _navigator = typeof navigator === 'object' && navigator || undefined;
/**
* Determine if we're running in a standard browser environment
*
* This allows axios to run in a web worker, and react-native.
* Both environments... | javascript | github | https://github.com/axios/axios | lib/platform/common/utils.js |
# -*- coding: utf-8 -*-
# Copyright 2017 Novo Nordisk Foundation Center for Biosustainability,
# Technical University of Denmark.
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
__author__ = 'hs634'
class CircularBuffer {
int[] buffer;
// next spot for reading
int head;
// next spot for writing
int tail;
mutex mtx;
condition_variable cv_dequeue;
condition_variable cv_enqueue;
public CircularBuffer(int capacity) {
buffer = new int[capacity + 1]; // ... | unknown | codeparrot/codeparrot-clean | ||
/* ------------------------------------------------------------------------
_codecs -- Provides access to the codec registry and the builtin
codecs.
This module should never be imported directly. The standard library
module "codecs" wraps this builtin module for use within Python.
The codec... | c | github | https://github.com/python/cpython | Modules/_codecsmodule.c |
# coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
ExtractorError,
determine_ext,
int_or_none,
float_or_none,
js_to_json,
orderedSet,
strip_jsonp,
strip_or_none,
unified_strdate,
US_RATINGS,
)
class PBSIE(I... | 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/src/main/java/org/springframework/boot/diagnostics/FailureAnalyzers.java |
//! For each function that was instrumented for coverage, we need to embed its
//! corresponding coverage mapping metadata inside the `__llvm_covfun`[^win]
//! linker section of the final binary.
//!
//! [^win]: On Windows the section name is `.lcovfun`.
use std::ffi::CString;
use std::sync::Arc;
use rustc_abi::Align... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_codegen_llvm/src/coverageinfo/mapgen/covfun.rs |
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright 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... | go | github | https://github.com/kubernetes/kubernetes | pkg/apis/flowcontrol/v1beta1/zz_generated.defaults.go |
#!/usr/bin/python2.7
def owm_forecast_data():
#Weather forecast from open weather map
import urllib
#import datetime
from datetime import datetime
from xml.dom import minidom
from forecast_db_interface import forecast_db_interface, OwmTable, toFloat
url = 'http://api.openweathermap.org/da... | unknown | codeparrot/codeparrot-clean | ||
import importlib
import shutil
import sys
import os
import unittest
import socket
import tempfile
import errno
from test import support
TESTFN = support.TESTFN
TESTDIRN = os.path.basename(tempfile.mkdtemp(dir='.'))
class TestSupport(unittest.TestCase):
def setUp(self):
support.unlink(TESTFN)
suppo... | 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... | unknown | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-common/src/site/markdown/release/0.10.0/CHANGELOG.0.10.0.md |
import logging, os, sys
from PySide2.QtCore import *
from PySide2.QtWidgets import *
from PySide2.QtCore import Signal
from PySide2.QtCore import Slot
from functools import partial
try:
import maya.cmds as cmds
except ImportError:
pass
import nebula_libs.fileIO as fh
logging.basicConfig()
logger = logging.getLo... | unknown | codeparrot/codeparrot-clean | ||
# (c) 2016 Red Hat Inc.
#
# (c) 2017 Dell EMC.
#
# 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 vers... | 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/pages/Variables/ManageVariable/VariableForm.tsx |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, os
sys.path.append(sys.path[0]+os.sep+'pygccxml-1.0.0')
import pygccxml, sys, re, cStringIO, time, os
from optparse import OptionParser
# Start process time measurement
t0 = time.clock()
optionParser = OptionParser()
optionParser.add_option("--idx", action="... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
#
# Copyright © 2013 Ejwa Software. All rights reserved.
#
# This file is part of gitinspector.
#
# gitinspector 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,... | unknown | codeparrot/codeparrot-clean | ||
#ifndef Py_CPYTHON_FLOATOBJECT_H
# error "this header file must not be included directly"
#endif
typedef struct {
PyObject_HEAD
double ob_fval;
} PyFloatObject;
#define _PyFloat_CAST(op) \
(assert(PyFloat_Check(op)), _Py_CAST(PyFloatObject*, op))
// Static inline version of PyFloat_AsDouble() trading sa... | c | github | https://github.com/python/cpython | Include/cpython/floatobject.h |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Eliot documentation build configuration file, created by
# sphinx-quickstart on Mon Apr 14 12:04:03 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | unknown | codeparrot/codeparrot-clean | ||
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2alpha1",
"metadata": {
"name": "v38.table_displaymode_comprehensive.v42"
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "grafana",
"uid": ... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/migrated_dashboards_output/v1beta1-mig-v38.table_displaymode_comprehensive.v42.v2alpha1.json |
#!/usr/bin/env python
from setuptools import setup
with open('README.md') as f:
long_description = f.read()
setup(
name='PyMata',
packages=['PyMata'],
#install_requires=['pyserial==2.7'],
install_requires=['pyserial'],
version='2.20',
description="A Python Protocol Abstraction Library Fo... | unknown | codeparrot/codeparrot-clean | ||
#==========================================================================
#
# Copyright Insight Software Consortium
#
# 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... | 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 | connect/api/src/main/java/org/apache/kafka/connect/storage/Converter.java |
# Copyright 2012 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 | ||
// RUN: %check_clang_tidy -std=c++98-or-later %s bugprone-empty-catch %t -- \
// RUN: -config="{CheckOptions: {bugprone-empty-catch.AllowEmptyCatchForExceptions: '::SafeException;WarnException', \
// RUN: bugprone-empty-catch.IgnoreCatchWithKeywords: '@IGNORE;@TODO'}}" -- -fexceptions
struct Exception {};
struc... | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/test/clang-tidy/checkers/bugprone/empty-catch.cpp |
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for the Earth and Planetary Sciences
# Copyright (C) 2012 - 2015 by the BurnMan team, released under the GNU GPL v2 or later.
# Ian Rose ian.r.rose@gmail.com
"""
CIDER 2014 BurnMan Tutorial --- step 2
--------------------------------------
In... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2014 Rackspace, Andrew Melton
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python -u
#
# Original script modified in November 2003 to take advantage of
# the character-validation range routines, and updated to the
# current Unicode information (Version 4.0.1)
#
# NOTE: there is an 'alias' facility for blocks which are not present in
# the current release, but are needed for ABI com... | unknown | codeparrot/codeparrot-clean | ||
all:
children:
kids:
hosts:
marcia:
popular: True
jan:
popular: False
cindy:
popular: True
greg:
popular: True
peter:
... | unknown | github | https://github.com/ansible/ansible | test/integration/targets/inventory_yaml/test.yml |
export type Author = {
name: string;
picture: string;
}; | typescript | github | https://github.com/vercel/next.js | examples/blog-starter/src/interfaces/author.ts |
#ifndef COMPAT_DISK_H
#define COMPAT_DISK_H
#include "abspath.h"
#include "gettext.h"
static int get_disk_info(struct strbuf *out)
{
struct strbuf buf = STRBUF_INIT;
int res = 0;
#ifdef GIT_WINDOWS_NATIVE
char volume_name[MAX_PATH], fs_name[MAX_PATH];
DWORD serial_number, component_length, flags;
ULARGE_INTEGER... | c | github | https://github.com/git/git | compat/disk.h |
# frozen_string_literal: true
module ActionView
module Helpers
module Tags # :nodoc:
class DatetimeSelect < DateSelect # :nodoc:
end
end
end
end | ruby | github | https://github.com/rails/rails | actionview/lib/action_view/helpers/tags/datetime_select.rb |
import pygame
import socket
from string import *
import random
import datetime
import time
import obd
import _rpi_ws281x as ws
connection = obd.OBD() # auto-connects to USB or RF port
cmd = obd.commands.AMBIANT_AIR_TEMP # select an OBD command (sensor)
response = connection.query(cmd) # send the command, and parse t... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2013 Ian Harry
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the ... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
##############################################################################
#
# account_auto_fy_sequence module for Odoo
# Copyright (C) 2014 ACSONE SA/NV (<http://acsone.eu>)
# @author Laetitia Gangloff <laetitia.gangloff@acsone.eu>
#
# account_auto_fy_sequence is free software:
# you ... | unknown | codeparrot/codeparrot-clean | ||
<?php
use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase;
$container->loadFromExtension('framework', [
'workflows' => [
'article' => [
'type' => 'workflow',
'supports' => [
FrameworkExtensionTestCase::class,
],
... | php | github | https://github.com/symfony/symfony | src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflow_with_guard_expression.php |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Mischa Peters <mpeters@a10networks.com>,
# Eric Chou <ericc@a10networks.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = t... | unknown | codeparrot/codeparrot-clean | ||
import rospy
import json
from os import system
from nips2017.srv import *
from threading import RLock
from rospkg import RosPack
from os.path import join
from .services import TorsoServices
class Torso(object):
def __init__(self):
self.rospack = RosPack()
with open(join(self.rospack.get_path('nips2... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
***************************************************************************
i_maxlik.py
-----------
Date : March 2016
Copyright : (C) 2016 by Médéric Ribreux
Email : medspx at medspx dot fr
***************************************... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python2
# encoding: utf-8
import gettext
import locale
import os
import simplejson as json
import sys
import platform
import urllib
import web
from web.contrib.template import render_mako
import settings
from seaserv import CCNET_CONF_PATH
from seaserv import ccnet_rpc, seafile_rpc, applet_rpc
from se... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
######################################################################
##
## Generate parameter dictionary from param/loadparm.c
##
## Copyright (C) Gerald Carter 2004.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General P... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2011 OpenStack Foundation
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
// Learn more about Tauri commands at https://v2.tauri.app/develop/calling-rust/#commands
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {}! You've been greeted from Rust!", name)
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.invoke_handl... | rust | github | https://github.com/tauri-apps/tauri | crates/tauri-cli/templates/plugin/__example-api/tauri-app/src-tauri/src/lib.rs |
"""
This module contains configuration settings via waffle flags
for the Video Pipeline app.
"""
from edx_toggles.toggles import LegacyWaffleFlag, LegacyWaffleFlagNamespace
from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag
# Videos Namespace
WAFFLE_NAMESPACE = 'videos'
# .. toggle_name: videos.deprec... | unknown | codeparrot/codeparrot-clean | ||
area: Search
issues: []
pr: 141904
summary: Ensure Rewriteable.rewriteAndFetch listeners are not executed on transport
threads
type: bug | unknown | github | https://github.com/elastic/elasticsearch | docs/changelog/141904.yaml |
# -*- coding: utf-8 -*-
# (c) 2012-2014, Michael DeHaan <michael.dehaan@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 3 of the License, ... | unknown | codeparrot/codeparrot-clean | ||
#._cv_part guppy.heapy.View
class Horizon:
def __init__(self, mod):
self.mod = mod
self._hiding_tag_ = mod._hiding_tag_
# Make preallocations of things that will be needed for news()
self.retset = self.mod.retset
self.hv = mod.hv
self.exc_info = self.mod._root.sys.exc_info
self.iso = self.mod.iso
str(self.... | unknown | codeparrot/codeparrot-clean | ||
# Script which deterministically generates certificates given a definitions file.
import argparse
import datetime
import hashlib
import ipaddress
import json
from pathlib import PurePath
from typing import Any, Dict
import asn1crypto.core as asn1
import cryptography.hazmat.primitives.serialization.pkcs12 as pkcs12
fro... | python | github | https://github.com/mongodb/mongo | x509/mkcert.py |
# -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2017 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_ERRNO_H_INCLUDED_
#define _NGX_ERRNO_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
typedef DWORD ngx_err_t;
#define ngx_errno GetLastError()
#define ngx_set_errno(err) SetLastError... | c | github | https://github.com/nginx/nginx | src/os/win32/ngx_errno.h |
//go:build !windows
package main
import (
"os"
"strings"
"github.com/containerd/cgroups/v3"
"github.com/moby/moby/v2/pkg/sysinfo"
)
var sysInfo *sysinfo.SysInfo
func setupLocalInfo() {
sysInfo = sysinfo.New()
}
func cpuCfsPeriod() bool {
return testEnv.DaemonInfo.CPUCfsPeriod
}
func cpuCfsQuota() bool {
r... | go | github | https://github.com/moby/moby | integration-cli/requirements_unix_test.go |
import {
codeFixAll,
createCodeFixAction,
findAncestorMatchingSpan,
registerCodeFix,
} from "../_namespaces/ts.codefix.js";
import {
BinaryExpression,
createTextSpan,
DiagnosticMessageChain,
Diagnostics,
Expression,
factory,
find,
flattenDiagnosticMessageText,
isBinar... | typescript | github | https://github.com/microsoft/TypeScript | src/services/codefixes/fixNaNEquality.ts |
# Copyright 2017 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 | ||
from test import support
support.import_module("dbm.ndbm") #skip if not supported
import unittest
import os
import random
import dbm.ndbm
from dbm.ndbm import error
class DbmTestCase(unittest.TestCase):
def setUp(self):
self.filename = support.TESTFN
self.d = dbm.ndbm.open(self.filename, 'c')
... | unknown | codeparrot/codeparrot-clean | ||
# encoding: utf-8
#
# The Python Imaging Library.
# $Id$
#
# WAL file handling
#
# History:
# 2003-04-23 fl created
#
# Copyright (c) 2003 by Fredrik Lundh.
#
# See the README file for information on usage and redistribution.
#
# NOTE: This format cannot be automatically recognized, so the reader
# is not registered... | unknown | codeparrot/codeparrot-clean | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package arguments
import (
"flag"
"fmt"
)
// FlagStringSlice is a flag.Value implementation which allows collecting
// multiple instances of a single flag into a slice. This is used for flags
// such as -target=aws_instance.foo and -var x=y.
typ... | go | github | https://github.com/hashicorp/terraform | internal/command/arguments/flags.go |
//===--- AsyncDemotion.swift -----------------------------------------------==//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.... | swift | github | https://github.com/apple/swift | SwiftCompilerSources/Sources/Optimizer/FunctionPasses/AsyncDemotion.swift |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2018 João Pedro Rodrigues
#
# 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
#
# Unl... | unknown | codeparrot/codeparrot-clean | ||
"""Backup Dropbox Business files.
See README.md for full instructions.
"""
import argparse
from datetime import date, datetime
from concurrent.futures import ThreadPoolExecutor
from functools import partial
import json
import logging
import logging.config
import os
import re
import string
import sys
import time
from ... | unknown | codeparrot/codeparrot-clean | ||
// This file was automatically generated from shared-mutable-state-and-concurrency.md by Knit tool. Do not edit.
package kotlinx.coroutines.guide.exampleSync07
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.*
import kotlin.system.*
suspend fun massiveRun(action: suspend () -> Unit) {
val n = 100 ... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | kotlinx-coroutines-core/jvm/test/guide/example-sync-07.kt |
# This set of tests exercises the backward-compatibility class
# in mailbox.py (the ones without write support).
import mailbox
import os
import time
import unittest
from test import test_support
# cleanup earlier tests
try:
os.unlink(test_support.TESTFN)
except os.error:
pass
FROM_ = "From some.body@dummy.d... | unknown | codeparrot/codeparrot-clean | ||
# Author: Samuel Genheden samuel.genheden@gmail.com
import csv
import sys
from collections import namedtuple
import numpy as np
import dblib
ZhangEntry = namedtuple("ZhangEntry",["Solvent","SoluteName","Exper_","katritzky",
"katritzky_Difference","COSMO_RS","COSMO_RS_Difference",
... | unknown | codeparrot/codeparrot-clean | ||
#if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... | c | github | https://github.com/numpy/numpy | numpy/_core/src/_simd/checks/cpu_avx2.c |
#!/usr/bin/env python
#
# See LICENSE file for copying information
#
"""
Space Monkey Twisted helpers
http://www.spacemonkey.com/
This library provides some miscellaneous Twisted helper primitives
"""
__copyright__ = "Copyright 2012 Space Monkey, Inc."
import os
from twisted.internet import defer
from ... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2010-2024 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.fir.test.cases.generated.cases.components.expressionTypeProvider;
i... | java | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/expressionTypeProvider/FirIdeDependentAnalysisScriptSourceModuleDeclarationReturnTypeTestGenerated.java |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 IBM Corp.
#
# 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
#
# ... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.