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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7d1280b66eb2d11555e0da8bd69608aa9a3f6ebb | 1180c0bfe29959d95f3c131e6e839950e528d4ee | /26/clamytoe/pytrack/pytrack.py | 5dfb5b313f2d5f918fa0db219397e97d880174f0 | [
"MIT"
] | permissive | pybites/challenges | e3e461accd8e7f890aee8007ba5070086ef983fc | 02b77652d0901e6e06cb9b1e7cb3e59c675445c2 | refs/heads/community | 2023-08-20T18:19:02.982214 | 2022-11-17T09:23:31 | 2022-11-17T09:23:31 | 78,264,928 | 764 | 3,115 | null | 2023-07-21T05:58:19 | 2017-01-07T07:17:50 | Jupyter Notebook | UTF-8 | Python | false | false | 6,451 | py | pytrack.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from maya import get_localzone, MayaInterval, now, parse
from pytrack.models import Log, Project
STATE = ('INACTIVE', 'ACTIVE')
def get_projects(display=False):
projects = []
in_db = Project.select()
if in_db:
for project in Project.select():
... |
2feed536922631da290848d9286ebd4757c2328c | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /20_杂题/atc競プロ/AtCoder Beginner Contest/271/D - Flip and Adjust.py | 092e9820efe549da20d4f431b3a4c10cce79f075 | [] | 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,418 | py | D - Flip and Adjust.py | """
有n个卡牌,正面和反面都有一个权值,
你可以选择一个面朝上,最后使得n张牌朝上的总和为m,输出任意一组方案数。
dp复原
"""
import sys
sys.setrecursionlimit(int(1e9))
input = lambda: sys.stdin.readline().rstrip("\r\n")
MOD = 998244353
INF = int(4e18)
# 上に向けられた面に書かれた整数の総和がちょうど S となるようにカードを置くことができるか判定し、可能ならそのようなカードの置き方の一例を求めてください。
# !H:表 Head T:裏 Tail
if __... |
7600c689f8d88e09b189ab4cc4fd9cb92ee80d12 | e9f8704efe416f28dfd868f8a3c4ecf876809af7 | /tests/importing/test_load_from_mgf.py | 921fedee56a90cf0503bdc93ccab07720c6dac16 | [
"Apache-2.0"
] | permissive | matchms/matchms | 8ee1285f19bb0bbd340562cc7d702803972eba5c | a161325b2edfa35e2a6f3fb2de30e1de171ba676 | refs/heads/master | 2023-09-01T20:08:05.453420 | 2023-09-01T11:30:07 | 2023-09-01T11:30:07 | 265,598,917 | 140 | 55 | Apache-2.0 | 2023-09-12T08:48:10 | 2020-05-20T14:55:48 | Python | UTF-8 | Python | false | false | 775 | py | test_load_from_mgf.py | import os
from matchms import Spectrum
from matchms.importing import load_from_mgf
def test_load_from_mgf_using_filepath():
module_root = os.path.join(os.path.dirname(__file__), "..")
spectra_file = os.path.join(module_root, "testdata", "pesticides.mgf")
spectra = list(load_from_mgf(spectra_file))
a... |
0408d3750ea9a2fa7a419c17f79e8235aadcb99b | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/tests/ShowPmPortInterface/cli/equal/golden_output_expected.py | 05c10e056f638b3e596654c5d12cf24d3e3a6e5b | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | Python | UTF-8 | Python | false | false | 2,229 | py | golden_output_expected.py | expected_output={
"pm_port_info": {
"port": "1/24",
"pd": "0x7F837FEABD78",
"sw_idb": "0x7F837EBFA020(switch)",
"sb": "0x7F837EBFCA40",
"hw_idb": "0x7F837EBF8C38",
"if_num": 32,
"hw_if_index": 31,
"snmp_if_index": "32(32)",
"ptrunk_group": "0(port)",
"admin": "up(up)",
"line": "up(up)",
"oper_... |
b23882baaa083123e74fc41dd0d112f4f06ce57a | 578db86c51d44ebddd0dc7b1738985b3dc69eb74 | /corehq/apps/oauth_integrations/migrations/0004_auto_20220304_1139.py | 19d83b2b61bc38472435e0bf2669527ba678bf87 | [
"BSD-3-Clause"
] | permissive | dimagi/commcare-hq | a43c7dd32b5f89c89fd5aa1b1359ab7301f4ff6b | e7391ddae1af1dbf118211ecb52c83fc508aa656 | refs/heads/master | 2023-08-16T22:38:27.853437 | 2023-08-16T19:07:19 | 2023-08-16T19:07:19 | 247,278 | 499 | 203 | BSD-3-Clause | 2023-09-14T19:03:24 | 2009-07-09T17:00:07 | Python | UTF-8 | Python | false | false | 869 | py | 0004_auto_20220304_1139.py | # Generated by Django 2.2.27 on 2022-03-04 11:39
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('oauth_integrations', '0003_livegooglesheetrefreshstatus'),
]
operations = [
migrations.AlterField(
... |
1e8079a0d47fc243c1b3bd1cfefe076a8ed70248 | 3dc647cd07a7361ed401e40d2b7cce8c826c8f6c | /Lib/copyreg.py | dfc463c49a389d59789c982846c3697c456646f1 | [
"Python-2.0",
"CC-BY-4.0",
"MIT"
] | permissive | RustPython/RustPython | 5ddce4a9848b9de8c041ffd2634f83c0105d3f39 | b864e5da1f18897fc884180b7093df5aa170024f | refs/heads/main | 2023-09-04T12:38:29.458699 | 2023-09-03T12:33:42 | 2023-09-03T12:33:42 | 135,201,145 | 15,815 | 1,302 | MIT | 2023-09-14T08:11:45 | 2018-05-28T19:27:01 | Rust | UTF-8 | Python | false | false | 7,135 | py | copyreg.py | """Helper to provide extensibility for pickle.
This is only useful to add pickle support for extension types defined in
C, not for instances of user-defined classes.
"""
__all__ = ["pickle", "constructor",
"add_extension", "remove_extension", "clear_extension_cache"]
dispatch_table = {}
def pickle(ob_typ... |
b2a33f5227e9ecaf6fdf0c30d7221d0de419f145 | c2c212ba42ebfa35f3b6122344978bc94ec8fa67 | /tests/test_matprat.py | 41a5c3a247fb26daf6f325bbb156a9e9c125c296 | [
"MIT"
] | permissive | hhursev/recipe-scrapers | 0cd6b7db4ef23ca825f2354f5d1ba76076a14813 | 8ced0227b3b16c532fc5ebf3060c99ee0452adab | refs/heads/main | 2023-09-03T07:33:29.684121 | 2023-09-01T21:15:50 | 2023-09-01T21:15:50 | 42,446,168 | 1,276 | 443 | MIT | 2023-09-14T16:34:09 | 2015-09-14T12:05:00 | Python | UTF-8 | Python | false | false | 3,728 | py | test_matprat.py | from recipe_scrapers.matprat import Matprat
from tests import ScraperTest
class TestMatprat(ScraperTest):
scraper_class = Matprat
def test_host(self):
self.assertEqual("matprat.no", self.harvester_class.host())
def test_canonical_url(self):
self.assertEqual(
"https://www.mat... |
df3e05e552f79b02eec5c497ed0b48c66e19d614 | bf8b77adbb1a6db404339bf70cead22b8e7ff633 | /chi_annotator/task_center/task_center_webapi/apis/urls.py | 656d4b162c5de7f931cf1252663237d2563fe56a | [
"Apache-2.0"
] | permissive | deepwel/Chinese-Annotator | c93e628435b939e36cc7073f2b6d7a66b2d0a4a8 | fb0b2814afbea1622f9270360b025928fed186cf | refs/heads/master | 2023-09-06T00:17:26.893233 | 2023-07-17T06:14:57 | 2023-07-17T06:14:57 | 110,061,626 | 1,054 | 227 | Apache-2.0 | 2023-07-17T06:14:59 | 2017-11-09T03:17:45 | JavaScript | UTF-8 | Python | false | false | 260 | py | urls.py | from django.urls import path
from rest_framework.routers import DefaultRouter
from . import views
urlpatterns = [
# First index page ####################################################
path('test_connect/', views.test_connect, name='test_connect'),
] |
a16bd30e87bfbe53fbdf046a723fe64414623bab | 975b2d421d3661e6770b601929d5f11d981d8985 | /msgraph/generated/models/time_off_request.py | c5783d955743d6015214ec4113e102214f9389b9 | [
"MIT"
] | permissive | microsoftgraph/msgraph-sdk-python | a7c551b85daadeebf76ec4ae12668664ea639b42 | 27de7ccbe688d7614b2f6bde0fdbcda4bc5cc949 | refs/heads/main | 2023-09-03T21:45:27.989672 | 2023-08-31T06:22:18 | 2023-08-31T06:22:18 | 534,665,999 | 135 | 18 | MIT | 2023-09-14T11:04:11 | 2022-09-09T14:00:17 | Python | UTF-8 | Python | false | false | 2,982 | py | time_off_request.py | from __future__ import annotations
import datetime
from dataclasses import dataclass, field
from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
if TYPE_CHECKING:
from .schedule_change_request import Sched... |
a8f92565f01b36a630b92804996a640b9251a6a6 | fdbb74a95924e2677466614f6ab6e2bb13b2a95a | /third_party/python/Lib/test/ssltests.py | 5073ae12204b1642b5bfbdb33bdb97ff90f58ef2 | [
"ISC",
"Python-2.0",
"GPL-1.0-or-later",
"LicenseRef-scancode-python-cwi",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-other-copyleft"
] | permissive | jart/cosmopolitan | fb11b5658939023977060a7c6c71a74093d9cb44 | 0d748ad58e1063dd1f8560f18a0c75293b9415b7 | refs/heads/master | 2023-09-06T09:17:29.303607 | 2023-09-02T03:49:13 | 2023-09-02T03:50:18 | 272,457,606 | 11,887 | 435 | ISC | 2023-09-14T17:47:58 | 2020-06-15T14:16:13 | C | UTF-8 | Python | false | false | 1,051 | py | ssltests.py | # Convenience test module to run all of the OpenSSL-related tests in the
# standard library.
import ssl
import sys
import subprocess
TESTS = [
'test_asyncio', 'test_ensurepip.py', 'test_ftplib', 'test_hashlib',
'test_hmac', 'test_httplib', 'test_imaplib', 'test_nntplib',
'test_poplib', 'test_ssl', 'test_s... |
1b0c6b6b80c5292f76505d5561fdf6d730178a22 | 2465564c2c22ab2bc210532d44efcbc22a9696fe | /timekeeper.py | 7112682aadadb0e143cdd43fd542276ec0cdbcff | [
"MIT"
] | permissive | mountwebs/timeglass | 5eb4dd9b7501e8fb44c485e1bb1f23eaee47767b | 2f527e190cb90199cdd3a29ea7625e1f561fe01c | refs/heads/master | 2022-07-16T12:17:19.249978 | 2020-05-19T19:29:01 | 2020-05-19T19:29:01 | 259,140,875 | 114 | 7 | MIT | 2020-05-19T17:06:32 | 2020-04-26T21:51:58 | Python | UTF-8 | Python | false | false | 1,562 | py | timekeeper.py | import time
from datetime import timedelta
class Timer():
def __init__(self,seconds):
self.initial = seconds
self.remaining = seconds
self.elapsed = 0
self.pause = False
self.done = False
self.active = False
self.last_tick = time.time()
self.start_tim... |
ce638b2a37fdfc23527f3160d76c2576dfa85aaf | 54c67306d63bb69a5cf381d12108d3dc98ae0f5d | /scripts/gsrc/check-for-conflicts.py | eb60925f25292138822e302f8eb694e6b3ee323c | [
"ISC"
] | permissive | open-goal/jak-project | adf30a3459c24afda5b180e3abe1583c93458a37 | d96dce27149fbf58586160cfecb634614f055943 | refs/heads/master | 2023-09-01T21:51:16.736237 | 2023-09-01T16:10:59 | 2023-09-01T16:10:59 | 289,585,720 | 1,826 | 131 | ISC | 2023-09-14T13:27:47 | 2020-08-22T23:55:21 | Common Lisp | UTF-8 | Python | false | false | 810 | py | check-for-conflicts.py | # Merge tools use specific algorithms or assumptions to detect conflicts
# and not all of them will obviously flag them, even if they use the standard format
#
# So this is to ensure no conflict markers get ignored in goal_src atleast
import os
files_with_unresolved_conflicts = []
for dirpath, subdirs, files in os.wa... |
e354b546b10ca6c2da6822023f4676ba0ddae46e | c9cdc07694c4cb60025f7a471d9f7baf06ea48ac | /museformer/museformer/attention/common/blocksparse_common_operations/av_mul/av_mul_1.py | f2f8b146913b28c8b57616592be1656015118682 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | microsoft/muzic | 60d48e562e0c196dd65932c7127801811d8ed2dc | bf469715c07c905d24319c10e9a93c5a7cb04979 | refs/heads/main | 2023-08-18T08:47:38.831559 | 2023-08-12T09:58:26 | 2023-08-12T09:58:26 | 373,462,930 | 3,453 | 327 | MIT | 2023-09-01T10:29:22 | 2021-06-03T10:06:54 | Python | UTF-8 | Python | false | false | 1,875 | py | av_mul_1.py | import torch
from .....blocksparse import BlocksparseMatMul
def do_sample_av_mul_base(self, sample_attn_weights, sample_v, sample_layout, real_part, sample_idx, tgt_len):
if sample_layout is None:
_, head, head_dim = sample_v.shape
return sample_v.new_zeros(tgt_len, 1, head, head_dim)
sample_v... |
19985df6aa038b957655d7c6a04680ad594514d2 | 3abc1fef99ac6ce0b845a1090fae7f6875fee729 | /src/ralph/lib/polymorphic/tests/tests_models.py | 3ff7825d6f4e11500b571b711d1fa967f31b433c | [
"Apache-2.0"
] | permissive | allegro/ralph | 5ff9165a202e836061c99e8af20214e0d651622f | b4a72356f527b1f12c7babd7465d2d7fa3ffb0d3 | refs/heads/ng | 2023-09-02T01:13:43.672554 | 2023-09-01T09:48:38 | 2023-09-01T09:48:38 | 4,359,038 | 1,970 | 617 | Apache-2.0 | 2023-09-01T09:44:39 | 2012-05-17T14:04:57 | Python | UTF-8 | Python | false | false | 6,951 | py | tests_models.py | # -*- coding: utf-8 -*-
from django.contrib.contenttypes.models import ContentType
from django.db.models import Prefetch
from django.test import TestCase
from ralph.lib.polymorphic.models import Polymorphic
from ralph.lib.polymorphic.tests.models import (
PolymorphicModelBaseTest,
PolymorphicModelTest,
Pol... |
41e51b3d7b69df93dec316955210f920119d561e | 98f26251ba440790de20466afd223178cf5d5e0e | /src/irl_maxent/__init__.py | 8c8e3a521f9e2e810ffad98338c00d1c7cf1841f | [
"MIT"
] | permissive | qzed/irl-maxent | edff21b1a5f09d75f1c1b76aa69ddb9a555ccc0f | 0c49544a69228f0462d41c9b3312e550e394cbab | refs/heads/master | 2023-07-06T12:00:06.789134 | 2023-06-25T14:06:00 | 2023-06-25T14:06:00 | 185,288,428 | 149 | 45 | MIT | 2022-04-12T21:23:25 | 2019-05-06T23:57:32 | Jupyter Notebook | UTF-8 | Python | false | false | 134 | py | __init__.py | from . import gridworld
from . import maxent
from . import optimizer
from . import plot
from . import solver
from . import trajectory
|
2cece52fa1746592aafc9e431a6ba465f33928cd | 7b5a7ff0aededc3afbe9ffc461e5747c26611efb | /isagenerator/disasmlib.py | af3af0bdbfceba87a3397130052603d8a476769a | [
"Apache-2.0"
] | permissive | bitdefender/bddisasm | 12ef02756235dcc29e2ebb62478d8b3d769e53bc | 727c87ecc44a9035ca01e68a213d8460ee2aecd2 | refs/heads/master | 2023-08-05T12:04:25.453259 | 2023-07-21T07:14:31 | 2023-07-21T07:14:31 | 278,359,094 | 817 | 117 | Apache-2.0 | 2023-06-27T11:57:17 | 2020-07-09T12:30:49 | C | UTF-8 | Python | false | false | 58,061 | py | disasmlib.py | #
# Copyright (c) 2020 Bitdefender
# SPDX-License-Identifier: Apache-2.0
#
import os
import sys
import re
import glob
valid_attributes = {
'MODRM', # Mod r/m is present.
'II64', # Instruction invalid in 64 bit mode.
'F64', # Operand size forced to 64 bit.
'D64', # Oper... |
5bcf391b0b0120ae42310daf5dfaa8c143d1fece | 97d7455fbaa56813e97cf601e4a23786d47c2e2c | /paasta_tools/async_utils.py | fa2eb8fb3d0c9f8745f5ab2d8b14e09ebbb28e72 | [
"Apache-2.0"
] | permissive | Yelp/paasta | 9138fbb0beaaa6146520c1483144679f9d5d4941 | 6fafc7c86073f136e64b959b963994be3d6160ab | refs/heads/master | 2023-08-17T00:00:47.610727 | 2023-08-10T21:40:26 | 2023-08-10T21:40:26 | 44,998,824 | 1,805 | 291 | Apache-2.0 | 2023-09-13T20:40:04 | 2015-10-26T21:35:53 | Python | UTF-8 | Python | false | false | 3,514 | py | async_utils.py | import asyncio
import functools
import time
import weakref
from collections import defaultdict
from typing import AsyncIterable
from typing import Awaitable
from typing import Callable
from typing import Dict
from typing import List
from typing import Optional
from typing import TypeVar
T = TypeVar("T")
# NOTE: thi... |
dbefe24e0112f76e158afbdcc0c5e2822cfc88af | 2f4605e878c073d7f735eed1d675c2ee454ad68e | /sdk/python/pulumi_kubernetes/events/v1/_inputs.py | 72d5a50b0e1640d976f3c5b8d5898d094b62b50c | [
"Apache-2.0"
] | permissive | pulumi/pulumi-kubernetes | 3c0c82e03a19f4077625d2ff6dae5ea4dbf90243 | b5d76f0731383f39903f35a6c1566f2f4344c944 | refs/heads/master | 2023-08-17T16:57:11.845935 | 2023-08-16T00:55:18 | 2023-08-16T00:55:18 | 116,869,354 | 353 | 128 | Apache-2.0 | 2023-09-13T21:42:01 | 2018-01-09T20:50:33 | Java | UTF-8 | Python | false | false | 19,318 | py | _inputs.py | # coding=utf-8
# *** WARNING: this file was generated by pulumigen. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from .... |
21a582210037559c287ea1aa5cae2a1ebbf252de | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/doorbird/button.py | 1c69429d3c70877ad3434443382def0981878ff6 | [
"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,661 | py | button.py | """Support for powering relays in a DoorBird video doorbell."""
from collections.abc import Callable
from dataclasses import dataclass
from doorbirdpy import DoorBird
from homeassistant.components.button import ButtonEntity, ButtonEntityDescription
from homeassistant.config_entries import ConfigEntry
from homeassist... |
8f1715369d7252e96d75c6dd744724e037b904ca | 6f36df6219f8e50374068bb4b3e1a5387c7a2f34 | /fipy/meshes/nonUniformGrid2D.py | f0210924b734f2e27013766215065c0c36116c91 | [
"NIST-PD"
] | permissive | usnistgov/fipy | 0a3db715fea452ae710eea3999d9cd42dfe76fe7 | fdc17193bc293da7511be9021e6d4766757e1966 | refs/heads/master | 2023-08-31T21:59:36.611448 | 2023-06-27T16:28:58 | 2023-06-27T16:28:58 | 23,316,495 | 444 | 171 | NOASSERTION | 2023-09-06T19:21:19 | 2014-08-25T14:27:58 | Python | UTF-8 | Python | false | false | 13,613 | py | nonUniformGrid2D.py | """
2D rectangular Mesh
"""
from __future__ import unicode_literals
__docformat__ = 'restructuredtext'
from fipy.tools import parallelComm
from fipy.meshes.mesh2D import Mesh2D
from fipy.meshes.builders import _NonuniformGrid2DBuilder
from fipy.meshes.representations.gridRepresentation import _Grid2DRepresentation
fr... |
63e85f0413382595773f93c5b0a78456401a2a41 | e3a97b316fdf07b170341da206163a865f9e812c | /python/kwiver/sprokit/tests/sprokit/pipeline/test-process_registry.py | 165cfa31f7c820f4b916285151ffd787068cb514 | [
"BSD-3-Clause"
] | permissive | Kitware/kwiver | 09133ede9d05c33212839cc29d396aa8ca21baaf | a422409b83f78f31cda486e448e8009513e75427 | refs/heads/master | 2023-08-28T10:41:58.077148 | 2023-07-28T21:18:52 | 2023-07-28T21:18:52 | 23,229,909 | 191 | 92 | NOASSERTION | 2023-06-26T17:18:20 | 2014-08-22T15:22:20 | C++ | UTF-8 | Python | false | false | 12,655 | py | test-process_registry.py | #!/usr/bin/env python
#ckwg +28
# Copyright 2011-2020 by Kitware, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,... |
25d45aef80dec156ec87dc8f584f71b54f81090a | a9fdace9236af6c73133fd8dddb80843697efc7d | /examples/detection/models/__init__.py | 525223853a12c6683d9ffc89b48df9ebcf694790 | [
"Apache-2.0"
] | permissive | catalyst-team/catalyst | 026c38f26dad471cd77347adbc13423b156a5d8b | e99f90655d0efcf22559a46e928f0f98c9807ebf | refs/heads/master | 2023-08-26T23:12:49.277005 | 2022-04-29T04:19:24 | 2022-04-29T04:19:24 | 145,385,156 | 3,038 | 487 | Apache-2.0 | 2023-08-12T03:40:14 | 2018-08-20T07:56:13 | Python | UTF-8 | Python | false | false | 197 | py | __init__.py | # flake8: noqa
from .centernet import CenterNet
from .ssd import SingleShotDetector
from .yolo_x import (
yolo_x_tiny,
yolo_x_small,
yolo_x_medium,
yolo_x_large,
yolo_x_big,
)
|
7b5418c75dc3b86270b21817b9f08c7c8cb34144 | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-hilens/huaweicloudsdkhilens/v1/__init__.py | 8f73fa59569a3618d44140d847d8f9e4f1b86b1b | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 746 | py | __init__.py | # coding: utf-8
from __future__ import absolute_import
from huaweicloudsdkhilens.v1.hilens_client import HiLensClient
from huaweicloudsdkhilens.v1.hilens_async_client import HiLensAsyncClient
from huaweicloudsdkhilens.v1.model.get_device_alarm_array_object import GetDeviceAlarmArrayObject
from huaweicloudsdkhilens.v... |
5360fbaa8b813e70f2ac7acf574a7a5988bf22e4 | 1742b6719b988e5519373002305e31d28b8bd691 | /sdk/python/pulumi_aws/cognito/outputs.py | cc5eeabb5340e0aae04d18e556923ffaba486258 | [
"MPL-2.0",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-aws | 4f7fdb4a816c5ea357cff2c2e3b613c006e49f1a | 42b0a0abdf6c14da248da22f8c4530af06e67b98 | refs/heads/master | 2023-08-03T23:08:34.520280 | 2023-08-01T18:09:58 | 2023-08-01T18:09:58 | 97,484,940 | 384 | 171 | Apache-2.0 | 2023-09-14T14:48:40 | 2017-07-17T14:20:33 | Java | UTF-8 | Python | false | false | 104,793 | py | outputs.py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
fr... |
7b9fd475d59aa9d4cd5d54b51f84827cc027614c | 40dd8330e5f78c4348bbddc2c5acfd59d793dd51 | /mmseg/models/utils/res_layer.py | 3dd7a6f75a168f2f7e3c61f82d309b1cf0d502bc | [
"Apache-2.0"
] | permissive | open-mmlab/mmsegmentation | 0d12092312e2c465ede1fd7dd9847b6f2b37049c | 30a3f94f3e2916e27fa38c67cc3b8c69c1893fe8 | refs/heads/main | 2023-09-04T10:54:52.299711 | 2023-07-24T07:28:21 | 2023-07-24T07:28:21 | 272,133,018 | 6,534 | 2,375 | Apache-2.0 | 2023-09-14T01:22:32 | 2020-06-14T04:32:33 | Python | UTF-8 | Python | false | false | 3,384 | py | res_layer.py | # Copyright (c) OpenMMLab. All rights reserved.
from mmcv.cnn import build_conv_layer, build_norm_layer
from mmengine.model import Sequential
from torch import nn as nn
class ResLayer(Sequential):
"""ResLayer to build ResNet style backbone.
Args:
block (nn.Module): block used to build ResLayer.
... |
ca49a40de3e05eba0787737878e095a6427434d9 | 1299ffaa8bb1cd13db0ed53598b638ec36c555ac | /tests/dicts/io/test_io_dict_plist.py | bb08902b7b05fc421c2cdc3943b73c10a548696a | [
"MIT"
] | permissive | fabiocaccamo/python-benedict | c93240bf526696c7b11043fef898a461d3fd6f14 | 27d76331a00fff1fffe7890a77ffd93c8833aeda | refs/heads/main | 2023-08-31T04:06:24.451591 | 2023-08-22T20:59:04 | 2023-08-22T20:59:04 | 187,202,744 | 1,118 | 51 | MIT | 2023-09-08T12:43:04 | 2019-05-17T11:13:40 | Python | UTF-8 | Python | false | false | 7,755 | py | test_io_dict_plist.py | import datetime as dt
from benedict.dicts.io import IODict
from .test_io_dict import io_dict_test_case
class io_dict_plist_test_case(io_dict_test_case):
"""
This class describes an IODict / plist test case.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
s... |
02f07fca283ed706211b05c87f3b03c9cec7d643 | ca54045faebf354767db22518faf2cbe17797f86 | /cmake/simgen/sim_collection.py | d4ca850c0c7f7b3e5e059a596b9ca0a3229295a4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | open-simh/simh | f659873614bf54538f2c4fb7d92c8673ddcdfb85 | d4f85d01bdf7301d5f7a2c4e51c3a84024561b26 | refs/heads/master | 2023-09-05T07:04:48.971084 | 2023-09-04T04:39:17 | 2023-09-04T04:39:17 | 498,052,344 | 288 | 87 | NOASSERTION | 2023-09-10T11:14:16 | 2022-05-30T18:16:34 | C | UTF-8 | Python | false | false | 6,282 | py | sim_collection.py | import pprint
import simgen.parse_makefile as SPM
import simgen.basic_simulator as SBS
import simgen.vax_simulators as VAXen
import simgen.utils as SU
## Special variables that should __not__ expand into their definitions:
_special_vars = frozenset(['DISPLAYL',
'DISPLAYVT',
'DISPLAY340',
'DISPL... |
2ca5a3f6a8904e588cd71a8858eb4247df066b50 | eda6e7b8f399dedcdb960f4b48a2134b978f8d83 | /bnpy/init/FromLP.py | 3aaf5945df9ec9da60112614118fb6a69392031c | [
"BSD-3-Clause"
] | permissive | bnpy/bnpy | 8ed61bc4fe2f0ed99e0254c11a21c27c0cee59b2 | ffc2242427451aa6a61dcac1473c47577a5ade6f | refs/heads/master | 2023-08-16T06:49:58.716279 | 2022-10-15T15:59:12 | 2022-10-15T15:59:12 | 75,731,181 | 197 | 54 | NOASSERTION | 2023-07-21T20:59:10 | 2016-12-06T12:56:07 | Python | UTF-8 | Python | false | false | 4,915 | py | FromLP.py | '''
FromLP.py
Initialize global params of a bnpy model using a set of local parameters
'''
import numpy as np
from bnpy.init.FromTruth import convertLPFromHardToSoft
import logging
Log = logging.getLogger('bnpy')
Log.setLevel(logging.DEBUG)
def init_global_params(hmodel, Data, initname='', initLP=None,
... |
677d98e5a6ca6f94f06c279884232439dd2898d6 | e26973efecccf121ec6e6b1b39f1dc35021571cb | /runtests.py | a53352c32242c79bf3c148ad51d27230df5c7337 | [
"BSD-2-Clause"
] | permissive | jambonsw/django-improved-user | d9eeffd06d14fc22dcdd03b775b040ccd8c0c29c | 26bb15e0de9957364f5ce5841ef49f9a059128f4 | refs/heads/development | 2023-08-30T23:29:39.003139 | 2022-05-19T11:27:12 | 2022-05-19T11:27:12 | 71,849,663 | 126 | 19 | BSD-2-Clause | 2023-03-06T12:57:04 | 2016-10-25T02:00:47 | Python | UTF-8 | Python | false | false | 3,892 | py | runtests.py | #!/usr/bin/env python3
"""Utility script to setup Django and run tests against package"""
import sys
from os.path import dirname, join
try:
from django import setup
from django.apps import apps
from django.conf import settings
from django.core.management import execute_from_command_line
except ImportEr... |
54fa143b6cd4aaf4f308dc643cda61bc49c295b5 | 749af8e81d5ccd2d8714a34434a9c77772df551b | /statsmodels/sandbox/tsa/__init__.py | aa72b549e7d93cc6737eaf6966d3e52a6c744aaf | [
"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 | 840 | py | __init__.py | '''functions and classes time series analysis
Status
------
work in progress
arima.py
^^^^^^^^
ARIMA : initial class, uses conditional least squares, needs merging with new class
arma2ar
arma2ma
arma_acf
arma_acovf
arma_generate_sample
arma_impulse_response
deconvolve
index2lpol
lpol2index
mcarma22
movstat.py
^^^^... |
6be75bba09a8292f7389c7b15ed6b95a646b9ab9 | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /olap/ByConity/tests/testflows/map_type/tests/feature.py | 5d7c900d59110e469dd2a36bcaae3e86451a7069 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | alldatacenter/alldata | 7bc7713c9f1d56ad6b8e59ea03206d1073b7e047 | 8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6 | refs/heads/master | 2023-08-05T07:32:25.442740 | 2023-08-03T13:17:24 | 2023-08-03T13:17:24 | 213,321,771 | 774 | 250 | Apache-2.0 | 2023-09-06T17:35:32 | 2019-10-07T07:36:18 | null | UTF-8 | Python | false | false | 64,379 | py | feature.py | # -*- coding: utf-8 -*-
import time
from testflows.core import *
from testflows.asserts import error
from map_type.requirements import *
from map_type.tests.common import *
@TestOutline
def select_map(self, map, output, exitcode=0, message=None):
"""Create a map using select statement.
"""
node = self.co... |
6945e23a43adb5020f30975cecea9ed8e131ed73 | 184b40438287d124117dcd48cf9abdab71e116c7 | /src/cosmic_ray/tools/html.py | f00893d83e27771f58aa964fe5214e6b83b243bc | [
"MIT"
] | permissive | sixty-north/cosmic-ray | 45bea97513eb75d00c514e0df2c5c3d156268f0f | aa63d36ef84659d941c22da9d4d39ae0408d488e | refs/heads/master | 2023-08-26T07:57:57.939516 | 2023-03-14T13:49:49 | 2023-03-14T13:49:49 | 34,157,278 | 569 | 77 | MIT | 2023-01-02T07:58:54 | 2015-04-18T07:44:21 | Python | UTF-8 | Python | false | false | 13,871 | py | html.py | "A tool for generating HTML reports."
import datetime
from itertools import chain
import click
from yattag import Doc
from cosmic_ray.work_db import WorkDB, use_db
from cosmic_ray.work_item import TestOutcome
from cosmic_ray.tools.survival_rate import kills_count, survival_rate
@click.command()
@click.option("--o... |
94d646cb0989cf6c9c8cc1801d9f65878e1a6e61 | 1577e1cf4e89584a125cffb855ca50a9654c6d55 | /pyobjc/pyobjc/pyobjc-framework-Cocoa-2.5.1/PyObjCTest/test_nsrunningapplication.py | 48c6f007d87b39c3ba7073ddddbe01aa533a33a7 | [
"MIT"
] | permissive | apple-open-source/macos | a4188b5c2ef113d90281d03cd1b14e5ee52ebffb | 2d2b15f13487673de33297e49f00ef94af743a9a | refs/heads/master | 2023-08-01T11:03:26.870408 | 2023-03-27T00:00:00 | 2023-03-27T00:00:00 | 180,595,052 | 124 | 24 | null | 2022-12-27T14:54:09 | 2019-04-10T14:06:23 | null | UTF-8 | Python | false | false | 1,306 | py | test_nsrunningapplication.py | from PyObjCTools.TestSupport import *
from AppKit import *
class TestNSRunningApplication (TestCase):
@min_os_level('10.6')
def testConstants(self):
self.assertEqual(NSApplicationActivateAllWindows, 1<<0)
self.assertEqual(NSApplicationActivateIgnoringOtherApps, 1<<1)
self.assertEqual(N... |
2ae3eb4068e374e87a4c7523145928899a5e281d | bbd69601912a3361d788efd03a47f9d4e3bac09e | /demo/MaskedNumCtrl.py | 987939510770faf76d828e309d5ea222d59d3454 | [] | no_license | wxWidgets/Phoenix | 56929484460a0399a8f1d9582bc77c20aa14748d | a1184286703cf24c4b88e5bc14cf2979c1b1ea00 | refs/heads/master | 2023-09-01T07:10:17.437093 | 2023-08-31T05:38:01 | 2023-08-31T05:38:01 | 5,078,061 | 2,268 | 677 | null | 2023-09-09T17:06:59 | 2012-07-17T06:22:25 | Python | UTF-8 | Python | false | false | 15,516 | py | MaskedNumCtrl.py | #!/usr/bin/env python
import string
import sys
import traceback
import wx
from wx.lib import masked
#----------------------------------------------------------------------
class TestPanel( wx.Panel ):
def __init__( self, parent, log ):
wx.Panel.__init__( self, parent, -1 )
self.log = log
... |
d0013095386705bc4218f1757e79cc3d5c61a826 | 8a4b17f89a8b24e6e1f8073f4df9d3bee7c546ec | /tests/support/__init__.py | 6ba871daf2835ce4bdf296c1603f1fd7fa6d182d | [
"Apache-2.0"
] | permissive | biocommons/hgvs | f8a600f15657b7f6aaa7c913d55d3acc43c1cb51 | 697b32bba2b191c3e10c44d408030927f031c03e | refs/heads/main | 2023-08-19T12:40:15.503258 | 2023-05-23T21:46:06 | 2023-05-23T21:46:06 | 84,496,560 | 228 | 95 | Apache-2.0 | 2023-09-14T05:01:26 | 2017-03-09T22:58:27 | Python | UTF-8 | Python | false | false | 35 | py | __init__.py | CACHE = "tests/data/cache-py3.hdp"
|
556f9b4fc3317719d9eb09e0ded7e33dd4156087 | 20dda4f19ec777d1a69ae20b5e2a48b9b28bb4a4 | /flexbe_testing/src/flexbe_testing/test/import_only_state.py | 6d2a99feb524a55fcd68de337ecfa4ed19237159 | [] | permissive | team-vigir/flexbe_behavior_engine | fd94ac2b75bfef6ca318d700d94b76f16cfd6552 | 6028c8585d852be55f4512024dcca5caa53e57c2 | refs/heads/main | 2023-05-12T20:25:50.388882 | 2022-03-09T22:19:43 | 2022-03-09T22:19:43 | 38,892,260 | 131 | 72 | BSD-3-Clause | 2023-06-23T03:06:37 | 2015-07-10T17:06:37 | Python | UTF-8 | Python | false | false | 261 | py | import_only_state.py | #!/usr/bin/env python
import rospy
from flexbe_core import EventState
class ImportOnlyState(EventState):
def __init__(self):
'''Constructor'''
super(ImportOnlyState, self).__init__(outcomes=['done'])
raise Exception('Test should be import only!')
|
411c33e1f18641c1973cd6b2e0f1ae2ec8387b0a | 3c6bca8e9f4be0034e30673eeaf4659c59f6b93e | /tests/test_ssl.py | b9f768d95d7730fbd009210d1bd434f1395883a7 | [
"MIT"
] | permissive | miguelgrinberg/greenletio | 4e846647e02d9879e3914340af9a7e98051b599c | db38bd2c5315cd0b9d515665f19256424fe655ee | refs/heads/main | 2023-08-25T17:08:16.093632 | 2023-07-12T06:59:05 | 2023-07-12T06:59:05 | 279,851,837 | 143 | 8 | MIT | 2023-07-25T18:22:58 | 2020-07-15T11:36:43 | Python | UTF-8 | Python | false | false | 2,510 | py | test_ssl.py | import asyncio
import sys
import unittest
from greenletio.core import bridge, async_
from greenletio.green import socket, ssl
# Tests in this module use server and client certificates
#
# To generate server certificate:
# openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365
# -nodes -subj "/CN=ex... |
28a4b5f059c6a204ad49e150549f8e6e94200da0 | e6e99b42bf2912cac9b6f16441031d51073c9092 | /downloader_cli/__version__.py | 0efd2876a832869fcb7dbd1267d7d1b6a3d7cbd0 | [
"MIT"
] | permissive | deepjyoti30/downloader-cli | 0b256928ab90eeb11a5dc7f57653fdc8c2d33e50 | 801091d019f6913b219d0189ef6ce8e24677902b | refs/heads/master | 2022-06-01T14:59:51.749283 | 2022-05-27T05:16:49 | 2022-05-27T05:16:49 | 221,208,977 | 333 | 32 | MIT | 2022-01-17T13:40:22 | 2019-11-12T12:07:34 | Python | UTF-8 | Python | false | false | 64 | py | __version__.py | """Contiain the version of the package"""
__version__ = "0.3.3"
|
e21bcf5793db0086a3984fc9df5e816dc225dff3 | 10cb11f83e1c8b51b9d72c28d6259a56ff1a97c8 | /samcli/commands/package/__init__.py | 6e45897bbb676ddab042df1fed189038ff25c44a | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"BSD-2-Clause"
] | permissive | aws/aws-sam-cli | 6d4411aacf7f861e75e5cf4882a32858797a276d | b297ff015f2b69d7c74059c2d42ece1c29ea73ee | refs/heads/develop | 2023-08-30T23:28:36.179932 | 2023-08-30T21:58:26 | 2023-08-30T21:58:26 | 92,205,085 | 1,402 | 470 | Apache-2.0 | 2023-09-14T21:14:23 | 2017-05-23T18:16:23 | Python | UTF-8 | Python | false | false | 93 | py | __init__.py | """
`sam package` command
"""
# Expose the cli object here
from .command import cli # noqa
|
76eb6edec09f3fdf33fee275e049e226fcc45add | e61e664d95af3b93150cda5b92695be6551d2a7c | /vega/algorithms/nas/opt_nas/__init__.py | fe30849ffaaec917b56f1242f089e9702ad1a4ed | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | huawei-noah/vega | 44aaf8bb28b45f707ed6cd4e871ba70fc0c04846 | 12e37a1991eb6771a2999fe0a46ddda920c47948 | refs/heads/master | 2023-09-01T20:16:28.746745 | 2023-02-15T09:36:59 | 2023-02-15T09:36:59 | 273,667,533 | 850 | 184 | NOASSERTION | 2023-02-15T09:37:01 | 2020-06-20T08:20:06 | Python | UTF-8 | Python | false | false | 66 | py | __init__.py | from .ops_nas import OperatorSearchSpace, OperatorReplaceCallback
|
676644d1dfd3538487e7442d84d5661cb3680db3 | 952dc66c61966f099756cdb6c2d13b40352f63cc | /zerver/lib/pysa.py | c0fa12484a2a42419c2200cb81c8a70db7dca054 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | zulip/zulip | 5ae6aad35fd9f72996c0a2a9cdd674400966ebf6 | 965a25d91b6ee2db54038f5df855215fa25146b0 | refs/heads/main | 2023-08-28T23:43:00.971110 | 2023-08-28T16:47:09 | 2023-08-28T19:33:02 | 43,160,685 | 20,239 | 8,996 | Apache-2.0 | 2023-09-14T20:57:47 | 2015-09-25T16:37:25 | Python | UTF-8 | Python | false | false | 95 | py | pysa.py | from typing import TypeVar
T = TypeVar("T")
def mark_sanitized(arg: T) -> T:
return arg
|
d11269f755ddba1488e3cfd0dc8bfcd4d2142072 | 1b94c7cfd66804fe8d40b5def35e4b9b18d69ba2 | /stubs/google/appengine/datastore/datastore_index_xml.pyi | 46d0aa6a00acd4a19730ee162267126a446a7a3a | [
"MIT"
] | permissive | the-blue-alliance/the-blue-alliance | 3dc210a9611ce9b240907ffd420f78040318dcdc | 6d42f3cdb2f785d192f2871419e58aaae3445029 | refs/heads/py3 | 2023-08-22T21:02:36.398100 | 2023-08-22T19:14:01 | 2023-08-22T19:14:01 | 888,427 | 344 | 263 | MIT | 2023-09-14T18:35:20 | 2010-09-04T20:34:11 | HTML | UTF-8 | Python | false | false | 593 | pyi | datastore_index_xml.pyi | from google.appengine.api.validation import ValidationError as ValidationError
from google.appengine.datastore.datastore_index import Index as Index, IndexDefinitions as IndexDefinitions, Property as Property
from typing import Any
MISSING_KIND: str
BAD_DIRECTION: str
BAD_MODE: str
NAME_MISSING: str
MODE_AND_DIRECTION... |
ea631181b950e97e4f18c8821737e9958ac1b61d | 40282fc3afc28166ce01cdf2240d445a1930f2b0 | /plugins/ipynb/ipynb.py | 1e625a119964e6517ced7f272999d0797ddb4503 | [
"MIT"
] | permissive | Harvard-IACS/2020-CS109A | 7dac61f88aefe9647fe7e3eabb3dc6ef85cc8d73 | 665100fec24309edb818a51bc8c29db2912d370f | refs/heads/master | 2022-07-31T18:05:47.127653 | 2021-11-17T22:30:00 | 2021-11-17T22:30:00 | 287,811,847 | 114 | 123 | MIT | 2022-05-04T06:26:14 | 2020-08-15T19:28:34 | Jupyter Notebook | UTF-8 | Python | false | false | 72 | py | ipynb.py | """
This file is needed to make pelican work :)
"""
from .core import *
|
39ac2e31f129ac600a6a057558477a197aaa9f62 | bfa4447ec5e92017aec95ee6d349d91b5733afca | /otter/utils.py | bea73199924ab876332c28b5bfe0af21230e86c4 | [
"BSD-3-Clause"
] | permissive | ucbds-infra/otter-grader | 4020c14614fc62a93ce564c6b8ad88269defac97 | e6ece6b53ef2291f2724ff9965f09d910ad10e7e | refs/heads/master | 2023-08-23T22:46:15.793814 | 2023-08-18T21:53:52 | 2023-08-18T21:53:52 | 208,363,438 | 112 | 62 | BSD-3-Clause | 2023-09-12T00:01:41 | 2019-09-13T23:40:57 | Python | UTF-8 | Python | false | false | 11,413 | py | utils.py | """Various utilities for Otter-Grader"""
import importlib
import logging
import logging.handlers
import os
import pathlib
import random
import re
import string
import shutil
import tempfile
import yaml
from contextlib import contextmanager, redirect_stdout
from functools import lru_cache
from IPython import get_ipyth... |
eb89777b00b5234a7283ed105f6111c5215503e1 | 6fdb4eaf5b0e6dbd7db4bf947547541e9aebf110 | /g-code-testing/g_code_parsing/g_code_functionality_defs/smoothie/set_max_speed_g_code_functionality_def.py | ced60700ccac4a0f0fd48db502bf18078444eada | [
"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 | 920 | py | set_max_speed_g_code_functionality_def.py | from typing import Dict
from string import Template
from g_code_parsing.g_code_functionality_defs.g_code_functionality_def_base import (
GCodeFunctionalityDefBase,
)
class SetMaxSpeedGCodeFunctionalityDef(GCodeFunctionalityDefBase):
# Using this list to output string in specific order
EXPECTED_ARGS = ["X"... |
5dc4173f0e7c1152f4af2a7e2ec7b91d8d2fc61a | 88ae8695987ada722184307301e221e1ba3cc2fa | /third_party/angle/src/libANGLE/renderer/vulkan/gen_vk_mandatory_format_support_table.py | f8233b038e5f78c04d1f0881e99e6db2d142f81a | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LGPL-2.0-or-later",
"MIT",
"GPL-1.0-or-later"
] | permissive | iridium-browser/iridium-browser | 71d9c5ff76e014e6900b825f67389ab0ccd01329 | 5ee297f53dc7f8e70183031cff62f37b0f19d25f | refs/heads/master | 2023-08-03T16:44:16.844552 | 2023-07-20T15:17:00 | 2023-07-23T16:09:30 | 220,016,632 | 341 | 40 | BSD-3-Clause | 2021-08-13T13:54:45 | 2019-11-06T14:32:31 | null | UTF-8 | Python | false | false | 5,361 | py | gen_vk_mandatory_format_support_table.py | #!/usr/bin/python3
# Copyright 2018 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# gen_vk_mandatory_format_support_table.py:
# Code generation for mandatory formats supported by Vulkan.
# NOTE: don't run this sc... |
cd500eadfd08e22d9f47c1354303afe9a946ed86 | 68b20a02c7aa438c65eed5b8095ca566383f2343 | /emotion-cause-extraction/ECPE-2D/utils/prepare_data.py | ea9efbf958a1831bc9a7b4663dc24b5d9e7884bd | [
"MIT"
] | permissive | declare-lab/conv-emotion | 68163b8ac523e346715d2b2649a6e97430c30325 | 8851bbde8bedd0fe07beec72d74b3b3624c9c729 | refs/heads/master | 2023-08-23T03:18:47.452652 | 2022-06-29T01:51:41 | 2022-06-29T01:51:41 | 155,637,781 | 791 | 210 | MIT | 2023-06-12T21:32:08 | 2018-10-31T23:54:41 | Python | UTF-8 | Python | false | false | 13,705 | py | prepare_data.py | # encoding: utf-8
# @author: zxding
# email: d.z.x@qq.com
import codecs
import random
import numpy as np
import pickle as pk
from sklearn.metrics import precision_score, recall_score, f1_score
import time
def print_time():
print('\n----------{}----------'.format(time.strftime("%Y-%m-%d %X", time.local... |
4c5a4ee6cc84c25ac0f63a051811db538951421d | 8a87f5b889a9ce7d81421515f06d9c9cbf6ce64a | /3rdParty/V8/v7.9.317/src/snapshot/DEPS | 810dfd6e84e91eac83f001735e2a828b0ad50364 | [
"bzip2-1.0.6",
"BSD-3-Clause",
"Apache-2.0",
"SunPro",
"ICU",
"Zlib",
"GPL-1.0-or-later",
"OpenSSL",
"ISC",
"LicenseRef-scancode-gutenberg-2020",
"MIT",
"GPL-2.0-only",
"CC0-1.0",
"BSL-1.0",
"LicenseRef-scancode-autoconf-simple-exception",
"LicenseRef-scancode-pcre",
"Bison-exception... | permissive | arangodb/arangodb | 0980625e76c56a2449d90dcb8d8f2c485e28a83b | 43c40535cee37fc7349a21793dc33b1833735af5 | refs/heads/devel | 2023-08-31T09:34:47.451950 | 2023-08-31T07:25:02 | 2023-08-31T07:25:02 | 2,649,214 | 13,385 | 982 | Apache-2.0 | 2023-09-14T17:02:16 | 2011-10-26T06:42:00 | C++ | UTF-8 | Python | false | false | 98 | DEPS | specific_include_rules = {
"mksnapshot\.cc": [
"+include/libplatform/libplatform.h",
],
}
| |
18d24b4f5fef41c4f73a35fd44ef91e994b7a851 | 9468849850c7c2b2040835eb9496bfb716a98c21 | /cea/optimization/slave/seasonal_storage/SolarPowerHandler_incl_Losses.py | f1c9c26b3d5b5b549308a7a412f6f006614864cd | [
"MIT"
] | permissive | architecture-building-systems/CityEnergyAnalyst | e6532c0c794538dbb665366ccf6d783e0d9d1345 | b84bcefdfdfc2bc0e009b5284b74391a957995ac | refs/heads/master | 2023-08-30T19:57:47.445797 | 2023-08-25T13:30:28 | 2023-08-25T13:30:28 | 49,491,341 | 166 | 60 | MIT | 2023-09-11T11:10:00 | 2016-01-12T10:02:17 | Python | UTF-8 | Python | false | false | 16,405 | py | SolarPowerHandler_incl_Losses.py | """
Slave Sub Function - Treat solar power!
In this file, all sub-functions are stored that are used for storage design and operation.
They are called by either the operation or optimization of storage.
"""
import numpy as np
from cea.constants import *
from cea.optimization.constants import *
def StorageGatewa... |
00c53c28e124fcbbdab1a54a217d09bccf1ce54c | 3c41443364da8b44c74dce08ef94a1acd1b66b3e | /api/registrations/views.py | d3e7f8664dcb5c1c9180d93a49473620764a2a59 | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer",
"AGPL-3.0-only",
"LGPL-2.0-or-later",
"LicenseRef-scancode-proprietary-license",
"MPL-1.1",
"CPAL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause",
"Apache-2.0"
] | permissive | CenterForOpenScience/osf.io | 71d9540be7989f7118a33e15bc4a6ce2d2492ac1 | a3e0a0b9ddda5dd75fc8248d58f3bcdeece0323e | refs/heads/develop | 2023-09-04T03:21:14.970917 | 2023-08-31T14:49:20 | 2023-08-31T14:49:20 | 10,199,599 | 683 | 390 | Apache-2.0 | 2023-09-14T17:07:52 | 2013-05-21T15:53:37 | Python | UTF-8 | Python | false | false | 37,843 | py | views.py | from rest_framework import generics, permissions as drf_permissions
from rest_framework.exceptions import ValidationError, NotFound, PermissionDenied
from framework.auth.oauth_scopes import CoreScopes
from osf.models import Registration, OSFUser, RegistrationProvider, OutcomeArtifact
from osf.utils.permissions import ... |
76f7006cec8b4dce881a764873775cde00f894ad | 1f3715bc6c1137b605959ea938aae18ce357ea18 | /pubgate/db/user.py | bde702b5828bf138907af84761409ac48c87ff69 | [
"BSD-3-Clause"
] | permissive | autogestion/pubgate | 72453b09cc2a7070a1c4aa2c8089fca4fc25706a | e9a1850a60bb34aac59542b97f730c08dc8d46fa | refs/heads/master | 2022-12-09T23:40:06.857427 | 2020-06-28T20:01:01 | 2020-06-28T20:01:01 | 137,607,267 | 110 | 8 | BSD-3-Clause | 2022-12-08T03:14:56 | 2018-06-16T20:03:57 | Python | UTF-8 | Python | false | false | 3,102 | py | user.py | from sanic_motor import BaseModel
from simple_bcrypt import generate_password_hash
# import flask_admin
# from flask_admin.contrib.pymongo.view import ModelView
from pubgate.utils.user import UserUtils
from pubgate.db.boxes import Outbox, Inbox
from pubgate.db.managers import BaseManager
def actor_clean(data):
re... |
cf73fd92e072b22c37d60250bd590c8c1a44ce49 | 4e6f104621ce510157eda4ccce1984dbebd0d4fa | /tests/test_saved_analysis.py | 0ffbd584f3b1097fc493153b602a414fdcfde1d6 | [
"MIT"
] | permissive | AMDResearch/omniperf | c9d8b145e8cdc99c82ac999da19596375e4683a2 | eb3dc981b0e2ec3a8844145da55b600b86cca26d | refs/heads/main | 2023-08-18T12:21:10.181384 | 2023-08-17T17:53:25 | 2023-08-17T17:53:25 | 561,919,887 | 106 | 20 | MIT | 2023-09-11T19:16:10 | 2022-11-04T19:53:55 | Python | UTF-8 | Python | false | false | 37,638 | py | test_saved_analysis.py | import sys
import pandas as pd
import glob
def compare(prev, cur):
prev_csvs = glob.glob(prev + "/*")
cur_csvs = glob.glob(cur + "/*")
for prev_csv in prev_csvs:
csv_name = prev_csv[prev_csv.rfind("/") + 1 :]
with open(prev_csv, "r") as csv1, open(
cur + "/" + csv_name, "r"
... |
ed664fa612a27bf681cd068d8f836fd9f8ee38ba | 38e277526f58eb08ac12257c0297b9d46c421c75 | /himl/inject_secrets.py | 029c2f514325d1053d201f2af9c8b99c1f643caf | [
"Apache-2.0"
] | permissive | adobe/himl | fdfdbc83caea55d67df8a3bf885b56d80b6bf8f9 | eb447d157ddd02ef41a07ae0d705e4d3bf6e8d23 | refs/heads/master | 2023-09-04T03:35:15.369780 | 2023-08-06T19:35:55 | 2023-08-06T19:35:55 | 202,412,608 | 107 | 31 | Apache-2.0 | 2023-09-12T12:51:41 | 2019-08-14T19:23:44 | Python | UTF-8 | Python | false | false | 2,581 | py | inject_secrets.py | # Copyright 2019 Adobe. All rights reserved.
# This file is licensed to you 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 ... |
583e972b0ecc9df4714db729c1963c7078c01b4b | 5fdfa2069b1aa05f61852b498328366d3dcfeb2a | /2021_05_12/dojo.py | 7eb53fb625b64e99359d1f22ec025f90def48713 | [
"MIT"
] | permissive | globocom/dojo | 5110b5ed86734d49fd0934d8701d5016e7e27e0d | 8df96c932f61645e9717197e5b58ca60909c7fc1 | refs/heads/master | 2022-07-21T17:59:16.133549 | 2022-06-22T18:17:01 | 2022-06-22T18:17:01 | 2,145,424 | 121 | 40 | MIT | 2022-02-17T17:21:46 | 2011-08-02T22:11:54 | JavaScript | UTF-8 | Python | false | false | 1,314 | py | dojo.py | import time
def main():
cells = 50000
func1(cells)
# Function func1 finished in 12.51378083
func2(cells)
# Function func2 finished in 0.20699382
func3(cells)
# Function func3 finished in 0.00020552
func4(cells)
#Function func4 finished in 0.00004649
func5(cells)
#Function f... |
b8ffbb96f21e85cda1994133aea61fbb05e5107f | b056263a62d97b90103a5fa89adb90ed765ac72a | /meetings/read_minutes.py | 389199de65949905d89b63d2c34d1cdee48e8204 | [
"Apache-2.0"
] | permissive | ansible/community | faa67ac0e5731e89d250cbad276906ce0cd86a07 | 8cd4f2e31bd32d28b2602de64f9d4521c69c70bf | refs/heads/main | 2023-06-22T07:26:15.032372 | 2023-06-13T09:59:30 | 2023-06-13T09:59:30 | 52,299,866 | 527 | 164 | Apache-2.0 | 2023-09-14T10:33:22 | 2016-02-22T19:35:08 | HTML | UTF-8 | Python | false | false | 2,834 | py | read_minutes.py | #!/usr/bin/env python3
import argparse
import requests
TEMPLATE = """
{date}
==========
{content}
Logs
----
{logs}
"""
LOG_MAP = [
("Minutes:", "html"),
("Minutes (text):", "txt"),
("Log:", "log.html"),
]
def read(url):
date = url.split("/")[-2]
minutes = requests.get(url).text
sections ... |
484fc3f9ae706e2ac39ccef30dead75c838e3317 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/response/AlipayCommerceEducateCampusIdentityQueryResponse.py | 84d0e4d9fcc97be75dbe5133716c77ac9f7ae7c3 | [
"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 | 841 | py | AlipayCommerceEducateCampusIdentityQueryResponse.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayCommerceEducateCampusIdentityQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayCommerceEducateCampusIdentityQueryResponse, self).__init__()
self._c... |
50918f129705c1f4ac69d3ca4df26471b754ddd0 | e7bf1ff05319acc59bba5af5890041bd82c3e197 | /mne/io/egi/tests/test_egi.py | 7ed2743249ddcf5a5b1c8fd11d81b04122f3de00 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mne-tools/mne-python | 7e8d7e945dfbbee6432a4955cf050fa823f2d34b | f44636f00666b8eb869417960926d01690ff4f42 | refs/heads/main | 2023-09-04T03:05:37.402100 | 2023-09-03T14:15:18 | 2023-09-03T14:15:18 | 1,301,584 | 2,437 | 1,418 | BSD-3-Clause | 2023-09-14T19:23:38 | 2011-01-28T03:31:13 | Python | UTF-8 | Python | false | false | 20,110 | py | test_egi.py | # Authors: Denis A. Engemann <denis.engemann@gmail.com>
# simplified BSD-3 license
from copy import deepcopy
from pathlib import Path
import os
import shutil
from datetime import datetime, timezone
import numpy as np
from numpy.testing import assert_array_equal, assert_allclose
import pytest
from scipy imp... |
e1f30f54b69c386cd1bb49f936440a65ee37d3ee | 0db05f7b843e8450bafd5ae23f8f70f9a9a8c151 | /Src/StdLib/Lib/test/test_ttk_guionly.py | 3f7ff65f2472dac75deb7d501f4ea672f1e77b26 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | IronLanguages/ironpython2 | 9c7f85bd8e6bca300e16f8c92f6384cecb979a6a | d00111890ce41b9791cb5bc55aedd071240252c4 | refs/heads/master | 2023-01-21T21:17:59.439654 | 2023-01-13T01:52:15 | 2023-01-13T01:52:15 | 91,620,472 | 1,171 | 288 | Apache-2.0 | 2023-01-13T01:52:16 | 2017-05-17T21:11:51 | Python | UTF-8 | Python | false | false | 999 | py | test_ttk_guionly.py | import os
import unittest
from test import test_support
# Skip this test if _tkinter wasn't built or gui resource is not available.
test_support.import_module('_tkinter')
test_support.requires('gui')
this_dir = os.path.dirname(os.path.abspath(__file__))
lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.par... |
0738d02533c82996e3bc09cc7a17c37619d700b3 | ec85250addb7357dfe7bb3e0680d53fc7b0fd8fb | /python_modules/dagster/dagster/_serdes/utils.py | 0844979b99a30f8718d191df522e73ad22c9da96 | [
"Apache-2.0"
] | permissive | dagster-io/dagster | 6adb5deee8bcf3ea1866a6a64f2ed81e1db5e73a | fe21995e0402878437a828c6a4244025eac8c43b | refs/heads/master | 2023-09-05T20:46:08.203794 | 2023-09-05T19:54:52 | 2023-09-05T19:54:52 | 131,619,646 | 8,565 | 1,154 | Apache-2.0 | 2023-09-14T21:57:37 | 2018-04-30T16:30:04 | Python | UTF-8 | Python | false | false | 674 | py | utils.py | import hashlib
from typing import NamedTuple, Optional
from .serdes import WhitelistMap, serialize_value
def create_snapshot_id(snapshot: NamedTuple, whitelist_map: Optional[WhitelistMap] = None) -> str:
kwargs = dict(whitelist_map=whitelist_map) if whitelist_map else {}
json_rep = serialize_value(snapshot, ... |
b37f148cc3686621b2fbf435b3c2e74f24a37496 | 3d262f92d72d1e91485af583cd4613c46bf02835 | /Raspberry-Pi-Sonoff/Main.py | a780a014612206f7e08423fd17efb9ab7f3b5870 | [
"MIT"
] | permissive | Arbazkhan4712/Python-Quarantine-Projects | 7b6e3933e442174435a37b7800263daecc3fae7d | 1ce699cca76fb83b00785f02607f68e939285164 | refs/heads/master | 2023-05-12T02:26:19.493520 | 2021-12-16T06:27:34 | 2021-12-16T06:27:34 | 249,693,718 | 296 | 132 | MIT | 2023-05-01T22:16:45 | 2020-03-24T11:47:10 | Python | UTF-8 | Python | false | false | 539 | py | Main.py | from flask import Flask, render_template, request, redirect
from gpiozero import LED
from time import sleep
led = LED(2)
app = Flask(__name__)
@app.route("/")
def home():
if led.value == 1:
status = 'ON'
else:
status = 'OFF'
return render_template('home.html', status=status)... |
3728ac071dec7d7b88eb2c3ace6ace953b9a5779 | f9e7d65cb784c01a0200145ba8d289afe41d4a56 | /extra/usb_power/stats_manager.py | 69fb33f292e1b4f923dd32edd73dffdb7c603ed2 | [
"BSD-3-Clause"
] | permissive | FrameworkComputer/EmbeddedController | ad7086769e87d0a4179eae96a7c9ff5e383ff54e | f6d6b927eed71550d3475411cfc3e59abe5cef2a | refs/heads/hx20-hx30 | 2023-08-08T20:45:10.621169 | 2023-05-26T07:03:59 | 2023-05-26T07:03:59 | 447,021,040 | 846 | 48 | BSD-3-Clause | 2023-05-26T07:04:59 | 2022-01-12T00:11:14 | C | UTF-8 | Python | false | false | 11,449 | py | stats_manager.py | # Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Calculates statistics for lists of data and pretty print them."""
# Note: This is a py2/3 compatible file.
from __future__ import print_function
imp... |
8380b83b3b56807a22ef7db073a8aa74c767f85f | eeabb0f83e700da0b4c71b62e7af4c17db158543 | /test-crates/pyo3-mixed/check_installed/check_installed.py | 428b7f811e823c3044946bd7b927bd7e6a93b6b8 | [
"MIT",
"Apache-2.0"
] | permissive | PyO3/maturin | 9a9a79d419a6638e6aae0dfffe07c021649f999d | cffc837c456f403ad38a395f1743e851bfc345b6 | refs/heads/main | 2023-09-05T07:05:41.910307 | 2023-09-05T05:20:41 | 2023-09-05T05:20:41 | 141,846,986 | 2,331 | 182 | Apache-2.0 | 2023-09-12T13:50:23 | 2018-07-21T21:27:46 | Rust | UTF-8 | Python | false | false | 2,117 | py | check_installed.py | #!/usr/bin/env python3
import json
import os.path
import platform
import sys
from pathlib import Path
from subprocess import check_output
from boltons.strutils import slugify
import pyo3_mixed
assert pyo3_mixed.get_42() == 42
assert slugify("First post! Hi!!!!~1 ") == "first_post_hi_1"
script_name = "print_cli_a... |
ec82582beed6466782afeab7d3592d262c130cd3 | 6f2fef1b207299681f8d67d3831c400bb91de04b | /data_collection/gazette/spiders/sc_capao_alto.py | 4f20081e7233ee83c7f1698a404cda0378d5fe0a | [
"MIT"
] | permissive | okfn-brasil/querido-diario | 76177747aa5ad47e99514f38402e6bc747b9a715 | 548a9b1b2718dc78ba8ccb06b36cf337543ad71d | refs/heads/main | 2023-08-22T04:26:30.798196 | 2023-08-18T14:12:37 | 2023-08-18T14:12:37 | 127,598,755 | 402 | 233 | MIT | 2023-09-14T18:56:02 | 2018-04-01T05:01:21 | Python | UTF-8 | Python | false | false | 197 | py | sc_capao_alto.py | from gazette.spiders.base.fecam import FecamGazetteSpider
class ScCapaoAltoSpider(FecamGazetteSpider):
name = "sc_capao_alto"
FECAM_QUERY = "cod_entidade:63"
TERRITORY_ID = "4203253"
|
1acde067c23f155b435b7d67ca2900b14ce35807 | 3c2cc8910c4a333a44d2d7b22489ef8d5ddb6a13 | /src/zvt/ui/__init__.py | 7eeeff8822f170b37939e5ba7bd1bc6c4fa0c77d | [
"MIT"
] | permissive | zvtvz/zvt | 6341dc765177b1e99727207f1608b730cbbb705a | 03aee869fd432bb933d59ba419401cfc11501392 | refs/heads/master | 2023-08-28T10:05:29.185590 | 2023-08-01T10:19:03 | 2023-08-01T10:19:03 | 179,451,497 | 2,782 | 922 | MIT | 2023-04-04T09:31:03 | 2019-04-04T08:06:57 | Python | UTF-8 | Python | false | false | 435 | py | __init__.py | # -*- coding: utf-8 -*-
import os
import dash
import dash_bootstrap_components as dbc
assets_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "assets"))
zvt_app = dash.Dash(
__name__,
meta_tags=[{"name": "viewport", "content": "width=device-width"}],
assets_folder=assets_path,
external_... |
cb6b4c5a69e31d68ae60216e52216bf294ca89fc | 2d5a3cde8291c1f733f63b83e3d02f77321a9f12 | /python/mysql/demo_mysqlconnector.py | 3e8124e7e80263740a6b3fa568f4f1a025c4890d | [
"BSD-3-Clause"
] | permissive | DataDog/trace-examples | 99d5e6e0984beefb08a2a3ead0dc35e19798d932 | 121636bbae446fb93f56c14a83ba819faf327d1f | refs/heads/master | 2023-08-19T00:30:52.632661 | 2023-03-23T15:14:13 | 2023-03-23T15:14:13 | 61,754,713 | 106 | 73 | BSD-3-Clause | 2023-03-08T14:06:45 | 2016-06-22T22:08:05 | Python | UTF-8 | Python | false | false | 993 | py | demo_mysqlconnector.py | import logging.config
from ddtrace import Pin, patch
import mysql.connector
logging.config.dictConfig({
'version': 1,
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
},
},
'handlers': {
'console': {
... |
6aa7ecebd200cbb01bca75b9a61fea240fd4dc38 | 26c6d869abdc3a797dd3564165ff1744be58794c | /tests/test_digest_ha1_password.py | 51f1c31a1d7824925767de0401acd3c55ae3ec62 | [
"MIT"
] | permissive | miguelgrinberg/Flask-HTTPAuth | 8b00a40d3e01fdb4839c30d999649cb17cf8d85d | 36fe7aa6cdce721a01e32c416593f8437c8ac386 | refs/heads/main | 2023-08-14T13:07:17.006849 | 2023-06-23T18:29:28 | 2023-06-23T18:29:28 | 10,136,908 | 1,237 | 267 | MIT | 2023-04-27T09:21:22 | 2013-05-18T05:10:52 | Python | UTF-8 | Python | false | false | 2,425 | py | test_digest_ha1_password.py | import unittest
from hashlib import md5 as basic_md5
from flask import Flask
from flask_httpauth import HTTPDigestAuth
from werkzeug.http import parse_dict_header
def md5(str):
if type(str).__name__ == 'str':
str = str.encode('utf-8')
return basic_md5(str)
def get_ha1(user, pw, realm):
a1 = user... |
62431c1e527bb2f38e4362b73243710c78255ee8 | cf2756bdc6c366715f8e8bc953ba4b8e19765a4a | /docs/dalapi/extension.py | befe3cd99947f3f405b865e30aa86c2abab804aa | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"Intel",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-2-Clause",
"MIT",
"Zlib"
] | permissive | oneapi-src/oneDAL | c88b1f59218aa3b3b624a7b9f457bfc5823d583b | f4abbf2a18e27fa4165eb6b91b3456b5039e03a6 | refs/heads/master | 2023-09-06T00:47:52.411627 | 2023-09-05T22:29:42 | 2023-09-05T22:29:42 | 54,928,587 | 260 | 115 | Apache-2.0 | 2023-09-14T17:51:26 | 2016-03-28T22:39:32 | C++ | UTF-8 | Python | false | false | 7,312 | py | extension.py | # file: extension.py
#===============================================================================
# Copyright 2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ... |
7d77b45a7afb1cbfe3557246bd49d2cc9f9bc56a | a2b20597759990445081057d35d113434cfcf970 | /stubs/integration_test/fixture_stubs/django/utils/functional.pyi | db6bae5e8877567c034fa0a468773d73b579b287 | [
"MIT"
] | permissive | facebook/pyre-check | 34059599c02b65605c574f13555229f3b931fd4e | fe8ccedc572cc1faa1fd01e9138f65e982875002 | refs/heads/main | 2023-09-03T19:10:11.587028 | 2023-09-02T07:40:35 | 2023-09-02T07:40:35 | 110,274,488 | 6,703 | 575 | MIT | 2023-09-13T17:02:32 | 2017-11-10T17:31:36 | OCaml | UTF-8 | Python | false | false | 667 | pyi | functional.pyi | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# pyre-unsafe
from typing import Any, TypeVar
_T = TypeVar("_T")
def curry(_curried_func, *args, **kwargs) -> Any: ...
def memoize(func: ... |
246ac239e0aefe49414524f13332c0fda887e628 | 11f7558e56bcfb742495cec766baeea7650a3103 | /python/Multi-Service/speech_call_center.py | 7d33ee5b74b8c7bc5cb483dee5bdb2d88dc77e10 | [
"MIT"
] | permissive | Azure-Samples/cognitive-services-quickstart-code | ee6936fae3bdfc902e6e8c74080f598845eb9c49 | 3ec40229ae753720605319e2e4d0955f9039449a | refs/heads/master | 2023-08-21T21:19:28.114774 | 2023-06-06T20:12:38 | 2023-06-06T20:12:38 | 198,896,181 | 323 | 511 | MIT | 2023-09-08T06:29:25 | 2019-07-25T20:20:09 | Jupyter Notebook | UTF-8 | Python | false | false | 3,224 | py | speech_call_center.py |
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
import os
from azure.cognitiveservices.language.textanalytics import TextAnalyticsClient
import azure.cognitiveservices.speech as speechsdk
from msrest.authenticatio... |
ca2a64f7577ffd58f4c6c0120483021d355b164f | 0e4860fecfdd34a3255003cc8c8df086c14083dd | /python/source_code/AutomatePython/07-regex/stripRe.py | c4077ea92e48eb91e027eb59efd42105fbcc6fc5 | [] | no_license | anzhihe/learning | 503ab9a58f280227011da5eaa4b14b46c678e6f3 | 66f7f801e1395207778484e1543ea26309d4b354 | refs/heads/master | 2023-08-08T11:42:11.983677 | 2023-07-29T09:19:47 | 2023-07-29T09:19:47 | 188,768,643 | 1,443 | 617 | null | 2023-08-24T02:10:34 | 2019-05-27T04:04:10 | Python | UTF-8 | Python | false | false | 241 | py | stripRe.py | import re
def stripRe(s):
#stripRe = re.compile(r'^\s+\(.*\)\s+$')
stripRegex = re.compile(r'^\s+(.*)\s+$')
mo = stripRegex.search(s)
return mo.group(1)
strTest = ' hello world '
print(strTest)
print(stripRe(strTest)) |
6902619908bee3a92d600a5b4b25903b1b97b885 | 31cf77b4c0342c6148b35ae2613d5e2501d5e755 | /src/encoded/tests/test_audit_file.py | 1df86a070fb976e57a8aac8750d9a60917264624 | [
"MIT"
] | permissive | ENCODE-DCC/encoded | 096de8a6d60c959a783cc9517f1d60bd6c21b71f | 80e05610c79b46d0890228555bb03e436b2fef11 | refs/heads/dev | 2023-08-08T15:45:07.493187 | 2023-08-03T20:01:24 | 2023-08-03T20:01:24 | 7,045,549 | 110 | 69 | MIT | 2023-09-12T23:59:45 | 2012-12-07T00:52:21 | JavaScript | UTF-8 | Python | false | false | 45,161 | py | test_audit_file.py | import pytest
def collect_audit_errors(result, error_types=None):
errors = result.json['audit']
errors_list = []
if error_types:
for error_type in error_types:
errors_list.extend(errors[error_type])
else:
for error_type in errors:
errors_list.extend(errors[error... |
abd4d182e1819cc95acf8581af0d504a5fce607c | 965efc4d7a83c2b5592417aa7e0d25a51f5a8108 | /backend/metering_billing/migrations/0099_remove_historicalsubscriptionrecord_flat_fee_already_billed_and_more.py | 3b2fe959860d72ffd18f663d9d3fc964ee2daa45 | [
"MIT"
] | permissive | uselotus/lotus | f4ee23bb828605215f18aacd1d6fcff8e0986c53 | c065fb33ee1a870d72bbd2adfddc08d50ca049b6 | refs/heads/main | 2023-08-17T03:38:35.770580 | 2023-07-26T18:50:17 | 2023-07-26T18:50:17 | 516,192,901 | 1,447 | 100 | MIT | 2023-06-25T22:53:06 | 2022-07-21T02:06:46 | Python | UTF-8 | Python | false | false | 4,680 | py | 0099_remove_historicalsubscriptionrecord_flat_fee_already_billed_and_more.py | # Generated by Django 4.0.5 on 2022-12-05 00:29
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
(
"metering_billing",
"0098_rename_plan_version_historicalsubscriptionrecord_billing_plan_and_more",
... |
f7e142bac8ccf9296c23720b3ecd995b95e7d766 | 5b6ba0f288b1e2ac236af846a9bf546a63228476 | /mmtbx/refinement/real_space/weight.py | ac2bfd3f8ca5020afd95b3b3edc68d8b70d76ccb | [
"BSD-3-Clause-LBNL"
] | permissive | cctbx/cctbx_project | 5b547b416cadbdf95cca21dace9f54272a08d98a | 7f4dfb6c873fd560920f697cbfd8a5ff6eed82fa | refs/heads/master | 2023-08-17T17:44:05.077010 | 2023-08-16T22:40:22 | 2023-08-16T22:40:22 | 39,508,026 | 206 | 131 | NOASSERTION | 2023-09-14T17:12:55 | 2015-07-22T13:36:27 | Python | UTF-8 | Python | false | false | 4,093 | py | weight.py | from __future__ import absolute_import, division, print_function
from cctbx.array_family import flex
import mmtbx.refinement.real_space.individual_sites
import random
from six.moves import range
class run(object):
def __init__(
self,
map_data,
xray_structure,
pdb_hierarchy,
geometry_res... |
dcee52d512abcdf976b383a95e3876aa14bbfbd5 | ab85c30d0dbcf7e369fe6116100501f4b30e1f43 | /lagom/experimental/definitions.py | 0ef8f2ba392788ee7a9fd2d7a6fc7c4343784a49 | [
"MIT"
] | permissive | meadsteve/lagom | 3bac4a87dc68f17abb0c1f867f6d93f9e9a56804 | e8929861f18a0d295cdcc6385a898319c7e2f702 | refs/heads/master | 2023-07-22T08:05:27.086831 | 2023-07-17T09:15:57 | 2023-07-17T09:15:57 | 189,738,708 | 203 | 11 | MIT | 2023-07-17T09:15:59 | 2019-06-01T13:54:42 | Python | UTF-8 | Python | false | false | 644 | py | definitions.py | """
Similar to the main definitions module but these definitions do not
yet have a stable interface.
"""
from ..definitions import X, ConstructionWithContainer
from ..interfaces import SpecialDepDefinition, ReadableContainer
class PlainFunction(SpecialDepDefinition[X]):
"""Preserves a function without any dep inj... |
63eb90ee19440927951bcfc43c958d4f4c25fb4f | 52b89a544a47d514cd1e15196ee6cf01c1148072 | /aws_lambda_builders/workflows/java_maven/maven_resolver.py | 3a0a1edf0bb7fc35d7a4963c6c5ca54c6b6c99bf | [
"Apache-2.0"
] | permissive | aws/aws-lambda-builders | 1c2d8c32d464a2326fa9685c514a915ff8c2f427 | c90c9bc8953aa684a23a3b438c7a71cc41cce809 | refs/heads/develop | 2023-08-31T02:19:45.135785 | 2023-08-30T17:12:27 | 2023-08-30T17:12:27 | 156,287,142 | 144 | 65 | Apache-2.0 | 2023-09-11T19:05:13 | 2018-11-05T21:42:39 | Python | UTF-8 | Python | false | false | 632 | py | maven_resolver.py | """
Maven executable resolution
"""
from aws_lambda_builders.workflows.java.utils import OSUtils
class MavenResolver(object):
def __init__(self, executable_search_paths=None, os_utils=None):
self.binary = "mvn"
self.executables = [self.binary]
self.executable_search_paths = executable_sea... |
26ffd37e07d3e053e4bfc852ec6167d951e60650 | 20283acdba47ebcdc339dee36a4aba07064add73 | /web/ckpts/dumper/checkpoint_dumper.py | 0152ac75cd2d38076bf9fac193ca12b16fc1bad8 | [
"MIT"
] | permissive | chrisdonahue/wavegan | 95bc928f28c32f5cbdf63e2662335f12a1394bf0 | 40e85e8adf6207ee194e976f844e257970c6c5dc | refs/heads/master | 2022-12-02T11:44:32.063120 | 2022-11-27T22:29:32 | 2022-11-27T22:29:32 | 120,957,530 | 1,278 | 289 | MIT | 2019-03-05T05:42:19 | 2018-02-09T21:27:42 | Python | UTF-8 | Python | false | false | 3,897 | py | checkpoint_dumper.py | # Copyright 2018 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
7ed4d4bbca4037e520a188d297a31a0970f3e516 | 554718851656376ad2bceb282de30459167ffeb2 | /smdebug/core/reader.py | 37b83cd3e4edec88680c058fa8638611d20e45ce | [
"Apache-2.0"
] | permissive | awslabs/sagemaker-debugger | d6ae6a6177a6cb457972772e2b3021e8a9dcc621 | 37ecf0aaeb24ab2adbe7f0ad664d0e50fa4154f2 | refs/heads/master | 2023-09-05T05:20:02.458427 | 2023-04-20T20:48:11 | 2023-04-20T20:48:11 | 222,554,670 | 162 | 89 | Apache-2.0 | 2023-08-23T14:31:27 | 2019-11-18T22:12:36 | Python | UTF-8 | Python | false | false | 3,531 | py | reader.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... |
2263f1200fc2f1d3b9e545d5cfc7f55057ef5c1a | fb05fb9f9f7fe7eb91072ad62c10200cae10acc6 | /src/borg/helpers/process.py | ff828f30a9c2a8e91bfc3c5a517c367f826a5c27 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | borgbackup/borg | c83f2a34e8bcc19859e9696a9425cbf4e23a743c | 4ded3620c5e9cd930d2e07e912af6c894abe6d5d | refs/heads/master | 2023-09-03T20:36:44.300124 | 2023-09-03T18:49:50 | 2023-09-03T18:49:50 | 35,517,126 | 10,379 | 1,053 | NOASSERTION | 2023-09-14T21:52:33 | 2015-05-12T23:10:47 | Python | UTF-8 | Python | false | false | 14,327 | py | process.py | import contextlib
import os
import os.path
import shlex
import signal
import subprocess
import sys
import time
import traceback
from .. import __version__
from ..platformflags import is_win32
from ..logger import create_logger
logger = create_logger()
from ..helpers import EXIT_SUCCESS, EXIT_WARNING, EXIT_SIGNAL_BA... |
772b96c3af7276b63a0e6e15844ed6fccfcd1a65 | 2e4e193a74a5e0acee1374adc4085f81c14e7a33 | /ocotillo/model_loader.py | 62c170765754f6e6f76d6c452b829721df98e69f | [
"Apache-2.0"
] | permissive | neonbjb/ocotillo | 84045592cf6e7cfeb95387db57366a3da319c808 | 3fa8513436a1a41c82069be31a317ca6da229110 | refs/heads/main | 2023-05-22T02:26:34.410019 | 2022-05-19T17:03:28 | 2022-05-19T17:03:28 | 447,307,140 | 194 | 19 | null | null | null | null | UTF-8 | Python | false | false | 3,645 | py | model_loader.py | import os
from time import time
import torch
from transformers import Wav2Vec2ForCTC, Wav2Vec2FeatureExtractor, Wav2Vec2CTCTokenizer, Wav2Vec2Processor
def load_model(device, phonetic=False, use_torchscript=False):
"""
Utility function to load the model and corresponding processor to the specified device. Su... |
67332c2d2540f0efb07768631538b9ff6cf71cc1 | cfdd6d24f7139d057d13afe32f1dc1de64b33c3f | /src/pyglow/constants.py | 5da036ed3539b2a48581eb4ec88b740787baf60a | [
"MIT"
] | permissive | timduly4/pyglow | cec15d7afe7f90dc5f2f019626f63622da4c3de0 | 1988757f3b6a4bd5ed98266a3fb1dc64f2513fc5 | refs/heads/master | 2023-05-10T19:02:52.777677 | 2023-05-02T19:07:51 | 2023-05-02T19:07:51 | 12,006,247 | 105 | 60 | MIT | 2023-05-02T19:09:55 | 2013-08-09T17:06:55 | Fortran | UTF-8 | Python | false | false | 139 | py | constants.py | import os
# Pyglow version:
VERSION = '2.2'
# Directory of pyglow files:
DIR_FILE = os.path.dirname(__file__)
# NaN:
nan = float('nan')
|
6bbdb3b43f49d9290dbe0608e54617c83dd99e19 | d41c7f7f0730e5802c3cd5c58213674b4e7ef11e | /attach_objects.py | a35bae8da70a8309479f42ee0abeb74b97b2c981 | [] | no_license | Tlousky/blender_scripts | 98c3bd6014d1c086f89dcb46d47445cf3d665bee | d79725302e9f9e14869d5a9a3c5717f4dbfb1a64 | refs/heads/master | 2022-11-28T04:51:15.975390 | 2022-11-26T12:34:21 | 2022-11-26T12:34:21 | 8,910,696 | 167 | 42 | null | 2022-11-26T12:34:22 | 2013-03-20T17:53:04 | Jupyter Notebook | UTF-8 | Python | false | false | 972 | py | attach_objects.py | # Go over a list of objects, and attatch them to another object via shrinkwrap constraint
import bpy
objs = [ o for o in bpy.context.scene.objects if 'House' in o.name ]
counter = 1
for o in objs:
bpy.ops.object.select_all(action='DESELECT')
o.select = True
bpy.context.scene.objects.active = o
bpy.cont... |
6893647a2c8d8e05e7575b3e4dd3df3bf5859a68 | 057e555023112b7409de8e3e1908670cbce01d5b | /frag_gt/frag_gt/tests/src/test_scorers.py | cb22137cf896a7ead54cceb391970202c2609727 | [
"MIT"
] | permissive | BenevolentAI/guacamol_baselines | 4826ebd3b5d5fe0b0b5dd8e7065094ee25d28e95 | 44d24c53f3acf9266eb2fb06dbff909836549291 | refs/heads/master | 2023-08-07T07:13:08.549075 | 2022-02-22T10:54:16 | 2022-02-22T10:54:16 | 157,866,504 | 108 | 39 | MIT | 2023-03-24T23:15:14 | 2018-11-16T12:45:46 | Python | UTF-8 | Python | false | false | 390 | py | test_scorers.py | from frag_gt.src.scorers import MolecularWeightScorer
def test_molecular_weight_scorer():
# Given
smiles = 'c1ccccc1'
# When
scoring_function = MolecularWeightScorer()
list_score = scoring_function.score_list([smiles])[0]
single_score = scoring_function.score(smiles)
# Then
assert li... |
c91acd33dadebdda65a3c275bda39b917fff3363 | 92da6d0aab06e2d8ed6ec4b7e81d01c77b875bb8 | /gui/configuration_tab.py | 542755e725acbc0fe7676ece20d2362dee88082c | [] | no_license | Quitten/Autorize | b4629b295da1b20d6b9344471e321c9fefbaec0f | 65b5cfdf764a92c053994ebc0ce295868fcc6d1e | refs/heads/master | 2023-08-10T09:09:33.216274 | 2023-04-11T17:37:35 | 2023-04-11T17:37:35 | 30,739,183 | 764 | 162 | null | 2023-06-18T20:55:55 | 2015-02-13T03:47:50 | Python | UTF-8 | Python | false | false | 9,286 | py | configuration_tab.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from javax.swing import DefaultComboBoxModel
from java.awt.event import ActionListener
from javax.swing import SwingUtilities
from javax.swing import JToggleButton
from javax.swing import JScrollPane
from javax.swing import JTabbedPane
from javax.swing import JOptionPane
... |
b97331e873bf59ef1724a6631c0440980f8a7e61 | 6b97499b67fa3de10eb9449f4805100cfca0bbbd | /account/conf.py | ff711b1f3e83a93d02b2d703ecf5757732149e92 | [
"MIT"
] | permissive | pinax/django-user-accounts | c9b9b74bf14c1f117766b89829055c35cf794345 | a69832facfb511ee9347fea7bc4303a8729c97a7 | refs/heads/master | 2023-08-17T06:51:55.779202 | 2023-02-09T09:22:00 | 2023-02-09T09:22:00 | 3,682,622 | 976 | 334 | MIT | 2023-09-14T18:07:35 | 2012-03-10T21:41:14 | Python | UTF-8 | Python | false | false | 1,948 | py | conf.py | import importlib
from django.conf import settings # noqa
from django.core.exceptions import ImproperlyConfigured
from account.languages import LANGUAGES
from account.timezones import TIMEZONES
from appconf import AppConf
def load_path_attr(path):
i = path.rfind(".")
module, attr = path[:i], path[i + 1:]
... |
91238da51b27bc950b6fa4830b9f8b85b00ef337 | 554718851656376ad2bceb282de30459167ffeb2 | /smdebug/rules/action/message_action.py | 36d1005b09a0ede36858483e796aff7b9a2b37b5 | [
"Apache-2.0"
] | permissive | awslabs/sagemaker-debugger | d6ae6a6177a6cb457972772e2b3021e8a9dcc621 | 37ecf0aaeb24ab2adbe7f0ad664d0e50fa4154f2 | refs/heads/master | 2023-09-05T05:20:02.458427 | 2023-04-20T20:48:11 | 2023-04-20T20:48:11 | 222,554,670 | 162 | 89 | Apache-2.0 | 2023-08-23T14:31:27 | 2019-11-18T22:12:36 | Python | UTF-8 | Python | false | false | 5,703 | py | message_action.py | # Standard Library
import json
import os
# Third Party
import boto3
# First Party
from smdebug.core.logger import get_logger
# action :
# {name:'sms' or 'email', 'endpoint':'phone or emailid'}
class MessageAction:
def __init__(self, rule_name, message_type, message_endpoint):
self._topic_name = "SMDebu... |
1bb6b0129eaa5692a07fdcecda09489b4b337829 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/psi/ErrorInParameterList.py | 7520dc9c0d8fbaf0556a292a99437aafc7988595 | [
"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 | 60 | py | ErrorInParameterList.py | def select2 (self,filds=None, from=''):
print (sql)
|
e7a0b8fc74f7caca0c635573bdac2b3e7dfb4758 | 4d3a077a439df835ce475efe7824ef6d3046b81c | /script/vul/mysql/mysql_burst.py | f763bf132004c67ddac446c836edc5ce8ec68acf | [] | no_license | orleven/Tentacle | f00bc62278e462a3be4bfc4378f34c95d5419617 | 0b364caa7272030e03b876caf71bc9026e3ba57a | refs/heads/master | 2023-09-01T11:07:33.020640 | 2023-08-22T03:37:35 | 2023-08-22T03:37:35 | 85,373,049 | 383 | 129 | null | 2023-08-21T09:26:03 | 2017-03-18T03:27:59 | Python | UTF-8 | Python | false | false | 1,380 | py | mysql_burst.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @author: orleven
import aiomysql
from lib.core.env import *
from lib.core.enums import ServicePortMap
from script import BaseScript
class Script(BaseScript):
def __init__(self):
BaseScript.__init__(self)
self.service_type = ServicePortMap.MYSQL
... |
048a87cec69cccdd28e672959e4eeb09efa4d170 | 0032d988541e85c47b5034c20ecf88220dde5a95 | /openbook_communities/tests/views/community/banned_users/test_views.py | 0f59b659ef56550f26f9a02ece0c3165f39f1eb4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | OkunaOrg/okuna-api | eabd37fef9d2be59b590ed8d72bee084ac377997 | f87d8e80d2f182c01dbce68155ded0078ee707e4 | refs/heads/master | 2022-02-04T21:31:10.577601 | 2021-12-28T18:20:39 | 2021-12-28T18:20:39 | 151,052,951 | 185 | 92 | MIT | 2022-01-13T01:00:40 | 2018-10-01T07:44:46 | Python | UTF-8 | Python | false | false | 24,949 | py | test_views.py | import random
from django.urls import reverse
from faker import Faker
from rest_framework import status
from openbook_common.tests.models import OpenbookAPITestCase
import logging
import json
from openbook_common.tests.helpers import make_user, make_authentication_headers_for_user, \
make_community
logger = log... |
5a8bca996786104ff7707cc94edaa22658501023 | 01184c7098e40569dd48219fbe3012321cf31244 | /test/test_literal/test_uriref_literal_comparison.py | 2dfdb734d19b7efe7cfb0ecfbe64764fa11823f0 | [
"BSD-3-Clause"
] | permissive | RDFLib/rdflib | 1c81136f2656207042f81374540d8e1f02be28f5 | 077f4ac3abb3038b266f40dc95a8ccf9f4e9a84c | refs/heads/main | 2023-08-30T11:22:00.041615 | 2023-08-29T21:31:43 | 2023-08-29T21:31:43 | 3,342,046 | 1,754 | 562 | BSD-3-Clause | 2023-09-12T14:58:35 | 2012-02-03T05:49:13 | Python | UTF-8 | Python | false | false | 2,588 | py | test_uriref_literal_comparison.py | from rdflib.graph import Graph
from rdflib.namespace import RDF
from rdflib.plugins.parsers.rdfxml import CORE_SYNTAX_TERMS
from rdflib.term import BNode, Literal, URIRef
"""
Ah... it's coming back to me...
[6:32p] eikeon: think it's so transitivity holds...
[6:32p] eikeon: if a==b and b==c then a should == c
[6:32p] ... |
a15ce1e79121515b951acf5ce85e2da8f2d87400 | 3db15c39d9fb11b98ffc5e43ac1f6d697ccd93ea | /demo_nodes_py/demo_nodes_py/logging/use_logger_service.py | df979e9032ff90bd59bb55cd57f9634d8d32252b | [
"Apache-2.0"
] | permissive | ros2/demos | e1967e0232a8d6ef4d8cb9bc914cf75735415674 | 7ecb54e14e1726d543f77c798bf41e19efc1b9b4 | refs/heads/rolling | 2023-08-05T20:24:32.172085 | 2023-08-04T17:07:50 | 2023-08-04T17:07:50 | 39,266,291 | 415 | 328 | Apache-2.0 | 2023-09-14T11:28:15 | 2015-07-17T17:24:00 | C++ | UTF-8 | Python | false | false | 6,098 | py | use_logger_service.py | # Copyright 2023 Sony Group Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... |
1437428ea6ceebb2afbe3737c36cc165db14ddea | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /net/data/ssl/scripts/asn1.py | 358efbf342b1eda55ebf2d27aede8f16784ff666 | [
"BSD-3-Clause"
] | 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 | 3,907 | py | asn1.py | # Copyright 2012 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file implements very minimal ASN.1, DER serialization.
def ToDER(obj):
'''ToDER converts the given object into DER encoding'''
if obj is None:
# None turns into N... |
12dff3c99ca2ae2c571c314d6192d6bfa09d75d7 | 08f8d1203bae66dbb692f8c085b6bbe25934195a | /tool_generate_packages.py | 57a05dec7613e2dd0d900e3d7925d979fed9c51c | [
"LGPL-2.1-or-later",
"BSD-3-Clause",
"ISC",
"Apache-2.0",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | Azure/azure-storage-azcopy | a747b43ad5cf1162dafbb308024f864baec13ae1 | f8b3875a8d30bb56fecc3b70023d4a20c53bc7d5 | refs/heads/main | 2023-08-16T18:55:37.997091 | 2023-08-15T19:08:15 | 2023-08-15T19:08:15 | 114,798,676 | 552 | 218 | MIT | 2023-09-14T21:46:12 | 2017-12-19T18:33:42 | Go | UTF-8 | Python | false | false | 3,558 | py | tool_generate_packages.py | #!/usr/bin/env python
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------... |
f0dcf06acfaa254245236ff7385cf662c489dbb4 | 916c1313c623c799e98d1bd897b3aef510172639 | /py/abd/abdcmd_fetch.py | 48773a9c1e3e2320dc90e8d7ed6405ca576ca817 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | bloomberg/phabricator-tools | 377ba3dba299c5d21a015bb039ae920fae5478ef | 09bd1587fe8945d93a891162fd4c89640c6fada7 | refs/heads/master | 2021-01-02T19:43:48.274684 | 2019-01-11T13:34:55 | 2019-01-11T13:34:55 | 8,464,182 | 154 | 40 | Apache-2.0 | 2022-02-14T09:57:48 | 2013-02-27T20:02:50 | Python | UTF-8 | Python | false | false | 4,203 | py | abdcmd_fetch.py | """Fetch managed repos.
This can be useful if you are switching from one arcyd instance to
another, to 'pre-fetch' before actually moving over.
"""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------... |
f5ff9150a726520b910c59820003a8b5d22d5e96 | d139ef8d18fcde584b06c1d7d25477d7d31ee59b | /google/ads/googleads/v14/resources/types/custom_interest.py | d3404a33c840d8b621a2c67e1bcdfa67edf0d0db | [
"Apache-2.0"
] | permissive | googleads/google-ads-python | a53993e6be057d3aa61f276b69e97b8b338d1c12 | 146d7070c1ea2140555d49d73c77892430b37314 | refs/heads/main | 2023-08-31T01:58:16.738997 | 2023-06-05T08:18:42 | 2023-08-28T19:08:38 | 143,435,091 | 422 | 525 | Apache-2.0 | 2023-09-12T17:46:52 | 2018-08-03T14:08:04 | Python | UTF-8 | Python | false | false | 5,112 | py | custom_interest.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... |
e16c4997d87c96320142d896e1a776dccd63be77 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /testing/unexpected_passes_common/builders_unittest.py | 3e5d38c714289c0060db6b170083f94152cc1802 | [
"BSD-3-Clause"
] | 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 | 23,292 | py | builders_unittest.py | #!/usr/bin/env vpython3
# Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import print_function
import json
import os
import sys
from typing import Any, Dict, Set, Tuple
import unittest
if sys.version_info[0] ==... |
40d86c73520f53f62e1a505dc87399d1930cf4cf | 95b5388157d6c0b14883bfc7102d54f8c5737b0a | /src/opnsense/scripts/filter/download_geoip.py | c19873838d5b2f42c7b0df6ccfa1c83881ae634f | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | opnsense/core | f071a087984a8d8b2b2e6ca152cf73645f9bc68a | a702cf9fb3300e125cd7acc8af3813474606e509 | refs/heads/master | 2023-09-01T05:20:10.627528 | 2023-08-31T13:10:59 | 2023-08-31T13:10:59 | 27,965,134 | 2,778 | 1,014 | BSD-2-Clause | 2023-09-14T15:45:24 | 2014-12-13T15:43:50 | PHP | UTF-8 | Python | false | false | 1,958 | py | download_geoip.py | #!/usr/local/bin/python3
"""
Copyright (c) 2016 Ad Schellevis <ad@opnsense.org>
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 abo... |
737b8832a1ebbb0215c062586cb36266d72d9cd0 | ea49dd7d31d2e0b65ce6aadf1274f3bb70abfaf9 | /problems/0026_Remove_Duplicates_from_Sorted_Array/solution.py | 0b24f615d9bf67809a84fac1693d11e8ad32ee18 | [] | no_license | yychuyu/LeetCode | 907a3d7d67ada9714e86103ac96422381e75d683 | 48384483a55e120caf5d8d353e9aa287fce3cf4a | refs/heads/master | 2020-03-30T15:02:12.492378 | 2019-06-19T01:52:45 | 2019-06-19T01:52:45 | 151,345,944 | 134 | 331 | null | 2019-08-01T02:56:10 | 2018-10-03T01:26:28 | C++ | UTF-8 | Python | false | false | 1,238 | py | solution.py | # 使用index记录上一次元素去重的位置,如果发现后续的元素和上一次去重位置的元素不同,
# 那么就把当前的元素填入上一次去重位置的下一个元素的位置,
# 这样,两次去重的两个元素之间没有重复的元素
# 同时,index标识的是去重后数组最后一个元素的下表,
# 所以,如果要返回去重数组的长度,返回index+1即可
# 同时,对于边界情况,即数组为空的时候,显然不能返回index+1,
# 此时,需要特殊处理,返回0
class Solution:
def removeDuplicates(self, nums):
index = 0
if not nums:
return index
for n in nu... |
8baddf744fadf7a898c96d9c853995d7de6de882 | 749af8e81d5ccd2d8714a34434a9c77772df551b | /statsmodels/stats/tests/test_effectsize.py | e843c7017524069cf591ab9282c1e86ba37fee36 | [
"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 | 2,282 | py | test_effectsize.py | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 5 13:13:59 2020
Author: Josef Perktold
License: BSD-3
"""
from scipy import stats
from numpy.testing import assert_allclose
from statsmodels.stats.effect_size import (
_noncentrality_chisquare, _noncentrality_f, _noncentrality_t)
def test_noncent_chi2():
... |
5bd994206ba97459b5ec6b2f8dd865e991b78481 | 71fb04f723b46a1bf45295be239bcec25e07f98c | /keras_cv/point_cloud/within_box_3d_test.py | a547b94a53c2e6b345b1187a7e66eec2d3f50a29 | [
"Apache-2.0"
] | permissive | keras-team/keras-cv | 9bca4479474e853ec3a1c541b8be20fea2447a1a | e83f229f1b7b847cd712d5cd4810097d3e06d14e | refs/heads/master | 2023-08-31T10:22:08.406394 | 2023-08-30T20:24:57 | 2023-08-30T20:24:57 | 265,079,853 | 818 | 287 | NOASSERTION | 2023-09-12T16:49:01 | 2020-05-18T22:39:21 | Python | UTF-8 | Python | false | false | 7,808 | py | within_box_3d_test.py | # Copyright 2022 The KerasCV Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... |
927dc3fba5570b47d461f9a9b4f9c13b32827b72 | 6923f79f1eaaba0ab28b25337ba6cb56be97d32d | /Introduction_to_Python_for_Econometrics/Python_introduction/file_system_and_navigation_basic.py | 5d72f40111c296ccaeee294759b01f938587a7ca | [] | no_license | burakbayramli/books | 9fe7ba0cabf06e113eb125d62fe16d4946f4a4f0 | 5e9a0e03aa7ddf5e5ddf89943ccc68d94b539e95 | refs/heads/master | 2023-08-17T05:31:08.885134 | 2023-08-14T10:05:37 | 2023-08-14T10:05:37 | 72,460,321 | 223 | 174 | null | 2022-10-24T12:15:06 | 2016-10-31T17:24:00 | Jupyter Notebook | UTF-8 | Python | false | false | 2,835 | py | file_system_and_navigation_basic.py | # Create file.csv.gz from file.csv
# Extract csv from gzipped csv
from __future__ import division
from __future__ import print_function
import glob
import gzip
import os
import shutil
import subprocess
import sys
import tarfile
import zipfile
from pylab import *
from numpy import *
# End Imports
pw... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.