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
05b12ddff71d66f009d85c792d36e5ddec5eebde
8de79ab1818c535dcd8ad6e0c92b5c9642ffb82a
/doc/development/tutorials/examples/helloworld.py
d6d81fd4f765afd5f212cc41339d0180c3e89e8b
[ "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
400
py
helloworld.py
from docutils import nodes from docutils.parsers.rst import Directive class HelloWorld(Directive): def run(self): paragraph_node = nodes.paragraph(text='Hello World!') return [paragraph_node] def setup(app): app.add_directive("helloworld", HelloWorld) return { 'version': '0.1',...
c0f9ee319ff63ed6626d28a828b9882816e6146f
75fab6855981ebb90264f8a81b044295606d67d2
/flask/ssti/src/app.py
ff72d1f5fe4cd10def292c4f151fe80242e8eea2
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
vulhub/vulhub
395262f51db7d6ca61f8f3cfa46ae1953bf5a775
6a142caa19620bffa4cda9989697afd5b4136c87
refs/heads/master
2023-08-10T07:01:35.605206
2023-08-08T09:59:24
2023-08-08T09:59:24
87,699,760
14,539
4,414
MIT
2023-09-14T03:05:28
2017-04-09T10:13:13
Dockerfile
UTF-8
Python
false
false
257
py
app.py
from flask import Flask, request from jinja2 import Template app = Flask(__name__) @app.route("/") def index(): name = request.args.get('name', 'guest') t = Template("Hello " + name) return t.render() if __name__ == "__main__": app.run()
d9899afe9334a86517992c90020b6cf8a4e9ded5
c56f0964f5e42e7cc6bfba6b0e305fa3936f395e
/robots/LoCoBot/locobot_control/nodes/pointrobot3factor_ros_server.py
03feab130b29438061358efee8e9889f3134ee8f
[ "MIT" ]
permissive
facebookresearch/pyrobot
4c702d1d01d1e11e8ff5b3a8d5783713ba29291a
b334b60842271d9d8f4ed7a97bc4e5efe8bb72d6
refs/heads/main
2023-07-30T04:35:22.664168
2022-03-08T18:09:11
2022-03-08T18:09:11
168,630,156
2,314
360
MIT
2023-07-11T01:00:04
2019-02-01T02:28:00
Python
UTF-8
Python
false
false
14,763
py
pointrobot3factor_ros_server.py
#!/usr/bin/env python #!/usr/bin/env python import numpy as np from gtsam import * from gpmp2 import * import threading import copy import actionlib import sys import math from scipy import ndimage import rospy import tf from geometry_msgs.msg import Twist, Pose, PoseStamped from sensor_msgs.msg import JointState ...
276e8dd07a1cb6b8cde84c248a408304215e7bce
642ba1746fed0b722a127b8426eca987df6efc61
/docs/courses/code/initbatser.py
d48046a616c1b788f23e34243ca9bb04f5ef8a53
[ "BSD-3-Clause" ]
permissive
neuronsimulator/nrn
23781d978fe9253b0e3543f41e27252532b35459
b786c36d715ba0f6da1ba8bdf5d2338c939ecf51
refs/heads/master
2023-08-09T00:13:11.123525
2023-08-04T13:11:02
2023-08-04T13:11:02
71,627,569
313
171
NOASSERTION
2023-09-14T17:48:03
2016-10-22T08:47:37
C++
UTF-8
Python
false
false
2,464
py
initbatser.py
""" Serial batch implementation for stimulus current i iterating over a range of values run a simulation and report spike frequency save i & corresponding f to a file optionally plot fi curve """ from neuron import h, gui import time # Simulation parameters PLOTRESULTS = True # if True, generates a graph that shows...
3d84029d093e2a01bb2449d166499eb945b02086
d4239425234eacb647c4cc4f2f4c8537b618fca0
/onadata/apps/main/tests/test_user_id_string_unique_together.py
aec4c9ed8e595d2ae39f24ac80d69a632c630512
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
onaio/onadata
58762d6a606870bd13d43fd27fdaa61720a745c2
e5bdec91cb47179172b515bbcb91701262ff3377
refs/heads/main
2023-09-04T03:12:43.388668
2023-08-24T07:27:08
2023-08-24T07:27:08
12,888,897
177
149
NOASSERTION
2023-09-13T14:19:05
2013-09-17T07:25:01
Python
UTF-8
Python
false
false
1,063
py
test_user_id_string_unique_together.py
import os from django.db import IntegrityError from onadata.apps.main.tests.test_base import TestBase from onadata.apps.logger.models import XForm class TestUserIdStringUniqueTogether(TestBase): def test_unique_together(self): """ Multiple users can have the same survey, but id_strings of ...
d92c648a0a66bf8716e1ddc7908dd1b94689300a
88dda5e76cef286c7db3ae7e5d1a32d28f7815a3
/reviewboard/webapi/resources/base_watched_object.py
e2f7766f4a5ce84b2cb926010bee99c906422e1c
[ "MIT" ]
permissive
reviewboard/reviewboard
f4d3bada08ba9d6ef53add2d1fdb82bd6cc63a1e
c3a991f1e9d7682239a1ab0e8661cee6da01d537
refs/heads/master
2023-08-31T09:03:14.170335
2023-08-30T08:22:43
2023-08-30T08:22:43
285,304
1,141
353
MIT
2023-06-07T16:51:02
2009-08-22T21:39:49
Python
UTF-8
Python
false
false
5,231
py
base_watched_object.py
from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponseRedirect from djblets.webapi.decorators import (webapi_login_required, webapi_response_errors, webapi_reques...
a818c8d04092f7a578ee1ff533f03d4a6a8bfa48
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/python/testData/formatter/spaceBetweenParenthesesInEmptyArgumentList_after.py
b980535f24596fa7e20981ec486be24cc37afda9
[ "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
21
py
spaceBetweenParenthesesInEmptyArgumentList_after.py
func(1, 2) empty( )
eac547f196a988796ea49501515622446fa469f1
9240c573719755b67f030b5491ebfeb4d1f352bc
/pluggable-architecture/slides/git-stats-code/c_base_plugin.py
a6738c9811aa4b7d2e401f562eb222135167b1e8
[]
no_license
alysivji/talks
46f6586e99af65de9b5d1dc34e2791e885a14d90
db63f50d27ab312e832a4314f0fcf874c324d1b8
refs/heads/main
2023-04-29T22:10:48.315626
2023-04-18T17:16:05
2023-04-18T17:16:05
89,402,889
115
54
null
2022-03-27T15:33:39
2017-04-25T20:19:12
Jupyter Notebook
UTF-8
Python
false
false
355
py
c_base_plugin.py
from git_stats.download import RepoStatistics class BasePlugin: def __init__(self, repo): self.repo = repo def __repr__(self): return f"<{self.__class__.__name__}>" @staticmethod def check(domain) -> bool: raise NotImplementedError def repo_stats(self) -> RepoStatistics:...
640220c1c07c229bda73a7f380c7d9fe89b51819
54292bb222c6525217458e92ddacfc4e2635b83e
/python/phonenumbers/shortdata/region_EG.py
a863023e6f9cc84ffd26265624ed1378e1b54be1
[ "Apache-2.0" ]
permissive
daviddrysdale/python-phonenumbers
0d69b48033d1464c0a6c358274062f1db2ee8c4a
2f06ef6db2ca83f3856fbb8019a0c665f5971b13
refs/heads/dev
2023-08-31T09:37:20.570690
2023-08-22T05:18:22
2023-08-22T05:18:22
1,643,611
2,944
406
Apache-2.0
2023-08-08T06:49:07
2011-04-21T03:06:38
Python
UTF-8
Python
false
false
957
py
region_EG.py
"""Auto-generated file, do not edit by hand. EG metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_EG = PhoneMetadata(id='EG', country_code=None, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='[13]\\d\\d(?:\\d{2})?', possible_length...
e12c1e8d27d7a693954abd3d2d63c870ddf28996
b60686a2e351a756f249e0d9faab8fe154a08f11
/examples/shouldi/shouldi/java/dependency_check.py
bc068bf9bbe898754069decefd3c19fc69916c82
[ "MIT", "Apache-2.0", "Python-2.0", "LicenseRef-scancode-generic-export-compliance" ]
permissive
intel/dffml
86483b47229b9b62c9f8dfef51491aa02563347e
7d381bf67a72fe1ecb1012393d5726085564cb0e
refs/heads/main
2023-08-28T00:35:04.219193
2023-06-06T18:29:16
2023-06-06T18:29:16
149,512,216
237
204
MIT
2023-05-05T15:39:35
2018-09-19T21:06:34
Python
UTF-8
Python
false
false
2,485
py
dependency_check.py
import json import os import tempfile import urllib.parse from pathlib import Path from typing import Dict, Any from dffml import op, Definition, run_command package_src_dir = Definition(name="package_src_dir", primitive="str") dependency_check_output = Definition( name="dependency_check_output", primitive="Dict[...
fea6c20542f5bae5eba4de98736f2e7ac82b4e85
53a83642c01a8828e3d7bd0b18e33c3b694c2b84
/Python/GeeksforGeeks/linked-list-insertion.py
ce26d82d437c923494cde831256f9f91e69ec452
[]
no_license
anantkaushik/Competitive_Programming
1dcd60a28b5b951c23024d6090942be081ad249f
6dba38fd7aa4e71b5196d01d64e81f9336d08b13
refs/heads/master
2022-03-06T15:36:23.797340
2022-02-21T12:00:37
2022-02-21T12:00:37
82,700,948
271
95
null
2020-10-27T17:34:39
2017-02-21T16:18:16
Python
UTF-8
Python
false
false
3,209
py
linked-list-insertion.py
""" Problem Link: https://practice.geeksforgeeks.org/problems/linked-list-insertion/1 Given a key (or data) to be inserted into the linked list of size N. The task is to insert the element at head or tail of the linked list depending on the input just before it p. If p is 0, then insert the element at beginning else ...
f6b7ff19e8706f223c46d7381eed78e838b78231
c26483bc1399e7879471a9e53d0288cb2c756088
/onnxmltools/convert/sparkml/operator_converters/__init__.py
db4b8aa2b87f73214fe856d988adad8da33ec353
[ "Apache-2.0" ]
permissive
onnx/onnxmltools
6782d9e1d2c75be7618b1378405d31198a310027
024a62f6915e6c3b9e040befaf058c7e60c271de
refs/heads/main
2023-09-04T04:57:10.943548
2023-08-28T16:43:37
2023-08-28T16:43:37
121,798,175
827
189
Apache-2.0
2023-09-13T16:07:20
2018-02-16T20:37:33
Python
UTF-8
Python
false
false
1,117
py
__init__.py
# SPDX-License-Identifier: Apache-2.0 # To register converter for sparkml operators, import associated modules here. from . import bucketed_random_projection_lsh from . import aft_survival_regression from . import element_wise_product from . import min_hash_lsh from . import word2vec from . import index_to_string from...
2ed511d7341930a13e94cc4146d7c8bd2a8e7034
bbd69601912a3361d788efd03a47f9d4e3bac09e
/docs/sphinx/rest_substitutions/snippets/python/converted/wx.LogFormatter.1.py
58de7a6b308be0c7864e3f844c1a708e9f380b37
[]
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
232
py
wx.LogFormatter.1.py
class LogFormatterWithThread(wx.LogFormatter): def Format(level, msg, info): return "[%d] %s(%d) : %s" % \ (info.threadId, info.filename, info.line, msg)
9b26e12360d00d28eb2f98e7f0ba492e5117511c
f1190adf3f20c17508d9791fd79cb59470ee5d8e
/tests/test_renders.py
14949cbd5359e6277faebdb971033646f9cc4d8c
[ "MIT" ]
permissive
kinegratii/django-echarts
38c42d6cd2078d01220b981fd7322b59d54f4fc5
12de6cf4faab1ecbbc06bd487727cc16791ee556
refs/heads/master
2023-03-18T02:26:11.916961
2023-03-17T02:33:34
2023-03-17T02:33:34
98,728,999
264
73
MIT
2023-03-17T02:33:35
2017-07-29T11:45:17
Python
UTF-8
Python
false
false
4,526
py
test_renders.py
import os import unittest from borax.htmls import HTMLString from django import setup from django_echarts.entities import ( Title, LinkItem, ChartInfo, bootstrap_table_class, material_table_class, Message, ValueItem, RowContainer, ElementEntity ) from django_echarts.renders import render_widget from pyecharts.c...
d7a9bb59ac95b9738fd030b6e65bb8a3c80a0aff
bb1977851e40ee4c0ff124437515c5f21148b820
/tests/test_ops.py
0a753baf9ffa3b103617609dc3748aad836542f8
[ "MIT" ]
permissive
open2c/bioframe
135df8f94599817f7f5434850d6108651268a80a
f208fe63e0d93c9e35a233bd02d07b1fc3545954
refs/heads/main
2023-07-06T09:57:54.209112
2023-07-03T18:12:13
2023-07-03T18:12:13
69,901,992
108
10
MIT
2023-06-30T23:48:44
2016-10-03T19:09:54
Python
UTF-8
Python
false
false
54,112
py
test_ops.py
from io import StringIO import numpy as np import pandas as pd import pytest import bioframe import bioframe.core.checks as checks from bioframe.core.construction import make_viewframe # import pyranges as pr # def bioframe_to_pyranges(df): # pydf = df.copy() # pydf.rename( # {"chrom": "Chromosome",...
1ed96fb4456af7633fd2d8ffa6fc40bc6059bf08
6defeaa9e3eff61cd861c855ed2f65db2a457564
/onmt/inputters/news_dataset.py
24f5445778e2d88f34a7c213a0d4fe4a24fa7590
[ "MIT" ]
permissive
memray/OpenNMT-kpg-release
50439d2a58d4499b3a4b1d1fdb586d266c4367e7
d16bf09e21521a6854ff3c7fe6eb271412914960
refs/heads/master
2023-08-17T14:32:04.442881
2023-01-31T03:24:46
2023-01-31T03:24:46
213,238,221
222
34
MIT
2023-07-22T18:03:01
2019-10-06T20:23:17
Jupyter Notebook
UTF-8
Python
false
false
47,907
py
news_dataset.py
# -*- coding: utf-8 -*- import copy import json import logging import random import time from collections import Counter from functools import partial from itertools import starmap from multiprocessing import pool, Pool import six import torch import torchtext from transformers import AutoTokenizer, RobertaTokenizerFa...
192bb0494fd3d46d34a162b83ba30602adcfce01
dfa77374ba7f3f8bf7965e646527dedc622085d7
/gcastle/example/daggnn/daggnn_demo.py
d14737ed600762f05dedafd9d8ad36e9532632e7
[ "Apache-2.0", "BSD-3-Clause", "MIT" ]
permissive
huawei-noah/trustworthyAI
7aa72721df59c3c4f75b7b9a037c5b71fb1284a1
238cbc41865ddf629bb6ae92c2e1445be27f98b8
refs/heads/master
2023-08-28T13:36:10.929075
2023-08-15T12:51:46
2023-08-15T12:51:46
248,501,097
832
206
Apache-2.0
2023-08-15T12:51:47
2020-03-19T12:46:47
Python
UTF-8
Python
false
false
1,715
py
daggnn_demo.py
# coding = utf-8 # Copyright (C) 2022. Huawei Technologies Co., Ltd. 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 # ...
77dbe3bb98c1d8755d37d707df033c33310294da
32712c478ff9dff44de085cb50a1302bfc2eba67
/users/migrations/0021_auto_20210512_1053.py
d1e7211af2e0947106ab3ffa41c043c57f248c07
[ "MIT" ]
permissive
vas3k/vas3k.club
158af17c329fe693178ca1bce36466922604df3b
b3ff2fd95ef1d6c593c57d3bcd501240f2705fbb
refs/heads/master
2023-09-03T07:10:10.859004
2023-09-01T09:08:32
2023-09-01T09:08:32
254,190,180
697
326
MIT
2023-09-04T09:02:12
2020-04-08T20:11:44
Python
UTF-8
Python
false
false
1,472
py
0021_auto_20210512_1053.py
# Generated by Django 3.2 on 2021-05-12 10:53 from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): dependencies = [ ('users', '0020_auto_20200822_0818'), ] operations = [ migrations.AlterField( model_nam...
b426ae689ded9dfe575803b13531343b58988596
c641636e184c0ec1dcc7b851bad678c898cdd05d
/examples/deploy_gnn/convert_to_static.py
036092fda03143ea90461fb6932dc79c4c61765b
[ "Apache-2.0" ]
permissive
PaddlePaddle/PGL
d8f0a82854a141bee1afdddd9a77bdd723c83ed8
7a55649d46d7ad93de31eb9b3ebf71b82d1fcffb
refs/heads/main
2023-08-17T10:33:02.425526
2023-08-04T02:52:06
2023-08-04T02:52:06
191,286,408
1,719
341
Apache-2.0
2023-08-04T02:52:07
2019-06-11T03:23:28
Python
UTF-8
Python
false
false
2,393
py
convert_to_static.py
# Copyright (c) 2021 PaddlePaddle 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 appli...
b3990ffb01e8bf4f93b7b45e796cab637edaf1e7
ec85250addb7357dfe7bb3e0680d53fc7b0fd8fb
/python_modules/dagster/dagster_tests/daemon_tests/conftest.py
93004dacd55e20ba0573b4ae8cca24f084ed65d8
[ "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
3,423
py
conftest.py
import os import sys from typing import Iterator, Optional, cast import pytest from dagster import DagsterInstance from dagster._core.host_representation import ( CodeLocation, ExternalRepository, InProcessCodeLocationOrigin, ) from dagster._core.test_utils import ( InProcessTestWorkspaceLoadTarget, ...
d3a1d53fcbfaeba530246e6cb90c8031a279d30d
48ee50316a950d9bc789ae843477b58b2913bf0d
/src/app/test/db/mongo/pruner_test.py
0053f26f8ebd957d98db5563a9514afdf711b8e2
[ "MIT" ]
permissive
beer-garden/beer-garden
f6d1c305a261b59d3cb3389513fc3138004a8d07
a5fd2dcc2444409e243d3fdaa43d86695e5cb142
refs/heads/develop
2023-08-15T11:50:29.833953
2023-07-20T03:20:45
2023-07-20T03:20:45
120,045,001
254
38
MIT
2023-07-20T03:20:47
2018-02-03T00:13:29
Python
UTF-8
Python
false
false
5,070
py
pruner_test.py
# -*- coding: utf-8 -*- import datetime from datetime import timedelta import pytest from mock import MagicMock, Mock, patch from mongomock.gridfs import enable_gridfs_integration from beer_garden.db.mongo.models import File, RawFile, Request from beer_garden.db.mongo.pruner import MongoPruner enable_gridfs_integrat...
99f4ce34fec158fd9785b632bd3c94270e1c1b40
2853845c003d03db22f67c3303fa1ec333180ae7
/test/channel/greeter_pb2.py
6f4df40766e1d2a2f3019cc8929d3d770f6f094e
[ "LicenseRef-scancode-proprietary-license", "Apache-2.0" ]
permissive
bytedance/fedlearner
fc1dd2ba2ec88092e83a32732eccea52451ce552
436e4959952c970917ee8f47b920f0a76cd4dd05
refs/heads/master
2023-08-14T23:01:02.875453
2023-05-23T03:44:03
2023-05-23T03:44:03
235,348,659
893
243
Apache-2.0
2023-06-08T07:37:18
2020-01-21T13:26:35
Python
UTF-8
Python
false
true
5,225
py
greeter_pb2.py
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: test/channel/greeter.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from g...
be9aa958a3b5dc59d0b33c18e0bb89b549c94962
bb33e6be8316f35decbb2b81badf2b6dcf7df515
/source/res/scripts/client/gui/Scaleform/daapi/view/lobby/veh_post_progression/veh_post_progression_cfg_view.py
c5dd53d2499ab8d48b51d873e2d4f01359c9dd00
[]
no_license
StranikS-Scan/WorldOfTanks-Decompiled
999c9567de38c32c760ab72c21c00ea7bc20990c
d2fe9c195825ececc728e87a02983908b7ea9199
refs/heads/1.18
2023-08-25T17:39:27.718097
2022-09-22T06:49:44
2022-09-22T06:49:44
148,696,315
103
39
null
2022-09-14T17:50:03
2018-09-13T20:49:11
Python
UTF-8
Python
false
false
6,720
py
veh_post_progression_cfg_view.py
# Python bytecode 2.7 (decompiled from Python 2.7) # Embedded file name: scripts/client/gui/Scaleform/daapi/view/lobby/veh_post_progression/veh_post_progression_cfg_view.py from functools import partial from adisp import process from gui.ClientUpdateManager import g_clientUpdateManager from gui.Scaleform.daapi.settings...
04d5b43fe3692ece408a356db84c00edbcd3388a
fc1dbf86c08788d9d47b933a206331e0d3af3f58
/Chapter_14/ch14_r04.py
dd51b278aef6bbee22d569f445e173425eb0d6e6
[]
no_license
PacktPublishing/Modern-Python-Cookbook-Second-Edition
819e17fe1f3d7e4389a290bde699fb45e08543ab
43c2549d51f05df6d897753a0d1e979f71b0729d
refs/heads/master
2023-08-01T09:35:33.833038
2023-07-29T13:27:30
2023-07-29T13:27:30
225,331,228
107
60
null
2023-07-29T13:28:03
2019-12-02T09:06:30
Python
UTF-8
Python
false
false
1,556
py
ch14_r04.py
"""Python Cookbook Chapter 14, recipe 4, Wrapping and combining CLI applications This uses an explicit `python` command so Chapter_13/ch13_r05.py does not have to be marked executable. """ import argparse from pathlib import Path import subprocess import sys from typing import List, Optional def get_options( ...
66b705bfd7d135482d2d66ae923dbaf0bd005a40
07e810873aa0134ba5017ccfef641d1038ca9b92
/hs_access_control/urls.py
0fbae1274b88c20a2875f0ffdd729222b395c2c0
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
hydroshare/hydroshare
9093e6dce047a30d4b2b7720257a7841d209353f
69855813052243c702c9b0108d2eac3f4f1a768f
refs/heads/develop
2023-09-04T12:52:30.816709
2023-08-30T16:46:20
2023-08-30T16:46:20
24,703,136
207
57
BSD-3-Clause
2023-09-14T20:20:16
2014-10-02T02:19:41
Python
UTF-8
Python
false
false
1,355
py
urls.py
from django.conf.urls import url from hs_access_control import views urlpatterns = [ # Community responders return JSON url(r'^_internal/community/(?P<cid>[0-9]+)/(?P<action>[a-z]+)/(?P<gid>[0-9]+)/$', views.CommunityView.as_view(), name='access_manage_community'), url(r'^_internal/community/(?P<ci...
134a650b9e82202f13fe5a6a95270c35adeda43a
e3cfab409afb5ff9a0b3812bf848be6ca9239cee
/test/testWgrs.py
892680a009ca6dc350744f06f59d49eaf54ece91
[ "MIT" ]
permissive
mrJean1/PyGeodesy
565266a4f7f6cda5abe98e915bbd868f6cbe1760
eba35704b248a7a0388b30f3cea19793921e99b7
refs/heads/master
2023-08-23T13:58:20.069917
2023-08-20T18:50:45
2023-08-20T18:50:45
68,028,481
283
66
null
2022-04-09T00:40:52
2016-09-12T16:49:10
Python
UTF-8
Python
false
false
4,315
py
testWgrs.py
# -*- coding: utf-8 -*- # Test L{wgrs} module. __all__ = ('Tests',) __version__ = '23.03.27' from bases import TestsBase from pygeodesy import degDMS, fstr, Georef, S_DEG, S_MIN, wgrs def _fstr(floats, prec=6): return ', '.join('None' if f is None else fstr(f, prec=prec) for f in floats) class Tests(TestsB...
c9725381d878e89b25ac98eec75cb726cbac58f0
7f59e2c4e771c19378e9839406c220d3985e7efe
/public-engines/iris-species-engine/tests/data_handler/test_acquisitor_and_cleaner.py
d12d027a26916f302cfab847675b1983e77c6f37
[ "Apache-2.0" ]
permissive
apache/incubator-marvin
c6ff32d50eb01ccd84266587d79f562a9e371496
58fdccf2e677041a13966ddbdd96d484edf3b474
refs/heads/develop
2023-08-30T12:46:56.973102
2022-11-18T15:27:52
2022-11-18T15:27:52
148,087,939
112
77
Apache-2.0
2023-03-07T05:45:59
2018-09-10T02:27:54
Jupyter Notebook
UTF-8
Python
false
false
640
py
test_acquisitor_and_cleaner.py
#!/usr/bin/env python # coding=utf-8 try: import mock except ImportError: import unittest.mock as mock from marvin_iris_species_engine.data_handler import AcquisitorAndCleaner @mock.patch('marvin_iris_species_engine.data_handler.acquisitor_and_cleaner.pd.read_csv') @mock.patch('marvin_python_toolbox.common...
55294977d8df3c1208d6b8aa28b33b6969ec55a7
8c0a92d54ea8b8c07648d454529cba588081ce12
/environments/mobile_robot/test_env.py
946d98fa37a5ec7c196691391b65a486c913b2fd
[ "MIT" ]
permissive
araffin/robotics-rl-srl
79c1e7f34b5a28367fabbe80e7cfe81e7693cd4c
eae7c1ab310c79662f6e68c0d255e08641037ffa
refs/heads/master
2023-08-25T17:09:16.050197
2021-04-05T18:43:17
2021-04-05T18:43:17
118,007,580
590
102
MIT
2019-08-09T09:30:36
2018-01-18T16:23:17
Python
UTF-8
Python
false
false
926
py
test_env.py
import time import environments.mobile_robot.mobile_robot_env as mobile_env env = mobile_env.MobileRobotGymEnv(renders=True, is_discrete=True, log_folder="mobile_robot", record_data=False, random_target=False) timesteps = 1000 # must be greater than MAX_STEPS episodes = 100 env.seed(1) i = 0 print('Starting episod...
9ed7b2b7ef3c8231eee8bc8750f0bd2b1c6cb7ba
746bd6e9242053e15bd49e6eb1f6e7940455fc0f
/lib/mirror/tools/common.py
4383c959618660013aef7ffbcb8b9b481401de43
[ "BSD-3-Clause", "MIT" ]
permissive
AIBluefisher/DAGSfM
34924b16bf55e0508a62ae4373e5e0dbba270d48
0ab0630bd4dcfab40729a239fbb396000a237dd0
refs/heads/dev
2023-05-31T05:11:26.653353
2022-07-01T09:21:19
2022-07-01T09:21:19
161,630,883
119
29
BSD-3-Clause
2022-07-01T09:21:35
2018-12-13T11:43:23
C
UTF-8
Python
false
false
1,902
py
common.py
#!/usr/bin/env python """ Copyright 2017, Zixin Luo, HKUST. Commonly used functions """ from __future__ import print_function import os from datetime import datetime class ClassProperty(property): """For dynamically obtaining system time""" def __get__(self, cls, owner): return classmethod(self.fget...
b2d092d3fd2d9875903178d628476594da064621
069c2295076c482afadfe6351da5ae02be8e18e6
/tests/template_tests/syntax_tests/test_with.py
dde581eab30be85fa98525a7ac073a445a528979
[ "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "GPL-1.0-or-later", "Python-2.0.1", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-other-permissive", "Python-2.0" ]
permissive
django/django
5eb557f57053631cd4f566f451e43197309dbeeb
c74a6fad5475495756a5bdb18b2cab2b68d429bc
refs/heads/main
2023-09-01T03:43:44.033530
2023-08-31T08:27:32
2023-08-31T08:27:32
4,164,482
73,530
38,187
BSD-3-Clause
2023-09-14T20:03:48
2012-04-28T02:47:18
Python
UTF-8
Python
false
false
2,641
py
test_with.py
from django.template import TemplateSyntaxError from django.template.defaulttags import WithNode from django.test import SimpleTestCase from ..utils import setup class WithTagTests(SimpleTestCase): at_least_with_one_msg = "'with' expected at least one variable assignment" @setup({"with01": "{% with key=dict...
0ff82136a92d84820c72a4a7538edbd5a295a609
5dc77586e3e0f9de1f032fd2ca68494d8e58928f
/great_expectations/expectations/metrics/column_aggregate_metrics/column_values_length_max.py
e19a2a38e37b64ab6f9f6ea9b589b223de8cae62
[ "Apache-2.0" ]
permissive
great-expectations/great_expectations
dd7c22e6277d6b08bee3ff38a015e6e8cd434df6
b0290e2fd2aa05aec6d7d8871b91cb4478e9501d
refs/heads/develop
2023-09-04T09:30:26.395518
2023-09-02T00:00:13
2023-09-02T00:00:13
103,071,520
8,931
1,535
Apache-2.0
2023-09-14T19:57:16
2017-09-11T00:18:46
Python
UTF-8
Python
false
false
1,156
py
column_values_length_max.py
import pandas as pd from great_expectations.compatibility.pyspark import functions as F from great_expectations.compatibility.sqlalchemy import sqlalchemy as sa from great_expectations.execution_engine import ( PandasExecutionEngine, SparkDFExecutionEngine, SqlAlchemyExecutionEngine, ) from great_expectati...
8d6f0f9defe325257fc68f9604629f2581fa9458
a699a524ce54a94436c69e0469cd09ced99a009d
/tests/functional/python/py2index.py
850aec825b7fca25ecb4c4374a2c109611d79c16
[ "ISC" ]
permissive
sarugaku/resolvelib
01f78cfcee85fcf8a9f0db4198dff017a5a5f812
77b256cdfb747e86112025d75cd698861ce355a5
refs/heads/main
2023-09-04T03:07:52.750922
2023-08-04T01:58:01
2023-08-04T01:58:01
136,112,488
114
29
ISC
2023-09-11T09:20:37
2018-06-05T03:07:00
Python
UTF-8
Python
false
false
9,932
py
py2index.py
"""Freeze metadata from Python index server to test locally. Inspired by index_from_rubygems.rb from CocoaPods/Resolver-Integration-Specs. This only reads metadata from wheels compatible with the given platform, and does not cover sdists at all. """ from __future__ import annotations import argparse import collecti...
6b3fba2572f65154c3b213422ec46e66fff688db
c5311176cd07f267fb1ca4f9cd71b308ed0778c5
/scripts/data/shared/normalize.py
87a27db6d8fab9da0db863171ada89dc191bf3dc
[ "MIT" ]
permissive
dwadden/dygiepp
1a71885b0588bb5f0997dec13b27ebfd30169e7c
ab764cd0d48b7c430a78a1edddf5acaeec13c109
refs/heads/master
2023-07-27T19:30:00.399646
2023-07-19T20:52:06
2023-07-19T20:52:06
171,385,430
534
129
MIT
2023-07-19T20:52:08
2019-02-19T01:48:41
Python
UTF-8
Python
false
false
2,698
py
normalize.py
import argparse import json import os from dygie.data.dataset_readers.document import Document, Dataset def load_jsonl(fname): return [json.loads(x) for x in open(fname)] def save_jsonl(xs, fname): with open(fname, "w") as f: for x in xs: print(json.dumps(x), file=f) def get_args(): ...
ed2822b58dc4c3156b178abbe8d2db714a360583
afd2087e80478010d9df66e78280f75e1ff17d45
/torch/_dynamo/variables/dicts.py
4023fe7b226e9c44e045262d2f8380f877a4d33f
[ "BSD-3-Clause", "BSD-2-Clause", "LicenseRef-scancode-secret-labs-2011", "LicenseRef-scancode-generic-cla", "BSL-1.0", "Apache-2.0" ]
permissive
pytorch/pytorch
7521ac50c47d18b916ae47a6592c4646c2cb69b5
a6f7dd4707ac116c0f5fb5f44f42429f38d23ab4
refs/heads/main
2023-08-03T05:05:02.822937
2023-08-03T00:40:33
2023-08-03T04:14:52
65,600,975
77,092
24,610
NOASSERTION
2023-09-14T21:58:39
2016-08-13T05:26:41
Python
UTF-8
Python
false
false
17,934
py
dicts.py
import collections import dataclasses import functools import inspect from typing import Any, Dict, List, Tuple import torch import torch.fx from torch.fx import _pytree as fx_pytree from torch.utils import _pytree as pytree from .. import variables from ..bytecode_transformation import create_call_function, create_...
20228baed57374a0ff58d7ae23bf8636bcd81632
2be5058bf498eadfbe9775e99840c8dec60c39ca
/docs/snippets/pair0_sync.py
9452e78dd1136c13a5759deb51765f341b1211b1
[ "MIT" ]
permissive
codypiersall/pynng
70a46a3f86c25da900f4c031885c64a1347a818f
62471eec746631bec36a4004b55fc548a28375cd
refs/heads/master
2023-08-31T23:56:33.522690
2022-11-20T04:09:19
2022-11-20T04:26:43
144,490,947
224
67
MIT
2023-01-17T14:57:43
2018-08-12T18:24:55
Python
UTF-8
Python
false
false
371
py
pair0_sync.py
from pynng import Pair0 address = 'tcp://127.0.0.1:13131' # in real code you should also pass recv_timeout and/or send_timeout with Pair0(listen=address) as s0, Pair0(dial=address) as s1: s0.send(b'hello s1') print(s1.recv()) # prints b'hello s1' s1.send(b'hi old buddy s0, great to see ya') print(s0.re...
4f6b90ec8c60bf2da30157f0d3f5c3e305a7b215
fb5c5d50d87a6861393d31911b9fae39bdc3cc62
/Scripts/sims4communitylib/utils/localization/common_localized_string_separators.py
aa7ae185a7229f4c7f81a4e790b21fa391c1fe7e
[ "CC-BY-4.0" ]
permissive
ColonolNutty/Sims4CommunityLibrary
ee26126375f2f59e5567b72f6eb4fe9737a61df3
58e7beb30b9c818b294d35abd2436a0192cd3e82
refs/heads/master
2023-08-31T06:04:09.223005
2023-08-22T19:57:42
2023-08-22T19:57:42
205,197,959
183
38
null
2023-05-28T16:17:53
2019-08-29T15:48:35
Python
UTF-8
Python
false
false
2,933
py
common_localized_string_separators.py
""" The Sims 4 Community Library is licensed under the Creative Commons Attribution 4.0 International public license (CC BY 4.0). https://creativecommons.org/licenses/by/4.0/ https://creativecommons.org/licenses/by/4.0/legalcode Copyright (c) COLONOLNUTTY """ from sims4communitylib.enums.enumtypes.common_int import Co...
5d3ddf8030d6e2ca967e3499074edd226778f423
f791462fb1286607d16459c1602d133f8d8c8b59
/test/test_pickle.py
a54479be20546c035ee9c2e593d77de7c3251852
[ "Apache-2.0" ]
permissive
pyro-ppl/numpyro
b071ed2bd93be41bafc3da8764c9f5617f996d92
ca96eca8e8e1531e71ba559ef7a8ad3b4b68cbc2
refs/heads/master
2023-09-03T15:56:13.252692
2023-08-28T14:32:25
2023-08-28T14:32:25
170,580,540
1,941
219
Apache-2.0
2023-09-04T11:26:11
2019-02-13T21:13:59
Python
UTF-8
Python
false
false
7,985
py
test_pickle.py
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import pickle import numpy as np from numpy.testing import assert_allclose import pytest from jax import random import jax.numpy as jnp from jax.tree_util import tree_all, tree_map import numpyro from numpyro.contrib.funsor import c...
4aed034cd3f0525f45e846d50ccd886df173170c
35b6013c1943f37d1428afd2663c8aba0a02628d
/privateca/snippets/create_certificate_csr.py
d3bc892507ce0279e64f56ad5dc1b09b3591cf72
[ "Apache-2.0" ]
permissive
GoogleCloudPlatform/python-docs-samples
d2a251805fbeab15d76ed995cf200727f63f887d
44e819e713c3885e38c99c16dc73b7d7478acfe8
refs/heads/main
2023-08-28T12:52:01.712293
2023-08-28T11:18:28
2023-08-28T11:18:28
35,065,876
7,035
7,593
Apache-2.0
2023-09-14T20:20:56
2015-05-04T23:26:13
Jupyter Notebook
UTF-8
Python
false
false
3,080
py
create_certificate_csr.py
#!/usr/bin/env python # Copyright 2021 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 ...
19e4f92b29c15a0f7f06ccee49183e6437a0cd29
fa89ef4a8eb06dc2015d7116637f230b6891eb8d
/test/units/crypto/cipher/test_camellia.py
25ce716ed8c96e64da9ef43dca0520fde6848063
[ "BSD-3-Clause" ]
permissive
binref/refinery
f61878d9fddf616fee8edf226df22f6a35238940
4c7c3717ae45543b9d7bae60a4af4c00993cf719
refs/heads/master
2023-08-17T17:02:34.357138
2023-08-14T08:43:05
2023-08-14T08:43:05
228,019,736
439
48
NOASSERTION
2023-09-11T10:26:02
2019-12-14T12:32:06
Python
UTF-8
Python
false
false
2,407
py
test_camellia.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from ... import TestUnitBase from refinery.units.crypto.cipher.camellia import Camellia, FL_FWD, FL_INV class TestCamellia(TestUnitBase): def test_fl_functions(self): key = 0x2BFAEDFDEEEAFBFE self.assertEqual(FL_INV(FL_FWD(0xDEFACED, key), key), 0xD...
adb6268891fc926931ccd1070657b0236e043272
6a468c1650b3c083f102f19ace0b0d6e4d0686f7
/sympy/matrices/utilities.py
b8a680b47e63615e210e561639a192ba47c642d3
[ "BSD-3-Clause", "MIT" ]
permissive
sympy/sympy
a5f8accaa7686c59d9b5c94212fef60d746dac4b
69f98fb2b0d845e76874067a381dba37b577e8c5
refs/heads/master
2023-09-01T15:51:37.886107
2023-08-31T20:54:33
2023-08-31T20:54:33
640,534
10,928
5,362
NOASSERTION
2023-09-14T17:29:13
2010-04-30T20:37:14
Python
UTF-8
Python
false
false
2,117
py
utilities.py
from contextlib import contextmanager from threading import local from sympy.core.function import expand_mul class DotProdSimpState(local): def __init__(self): self.state = None _dotprodsimp_state = DotProdSimpState() @contextmanager def dotprodsimp(x): old = _dotprodsimp_state.state try: ...
36f28a5c210ee01bf990dc1bcf14acff42a24256
b8a803694c283a5acd13ab6760a36710884ab24f
/llvm/tests/test_llrt.py
2b220f5f1f15e9c025ca39ce4f5a194be983da06
[ "NCSA", "BSD-3-Clause" ]
permissive
llvmpy/llvmpy
8a4c31e731364ead802231b97e058b8f8c444f96
13130fe35f1fb03a7051ad46c36146002391a6fa
refs/heads/master
2016-09-05T16:48:54.694686
2015-04-28T16:21:34
2015-04-28T16:21:34
3,375,197
155
13
null
2015-05-27T18:36:45
2012-02-07T07:09:59
HTML
UTF-8
Python
false
false
951
py
test_llrt.py
import unittest import llvm.core as lc import llvm.ee as le from .support import TestCase, tests class TestLLRT(TestCase): def test_llrt_divmod(self): from llvm import llrt m = lc.Module.new('testllrt') longlong = lc.Type.int(64) lfunc = m.add_function(lc.Type.function(longlong, [lo...
df6d2dc8b9b18707933378a1352560b08ad63022
833ef1cc5cbd5cf76da144d10d393e30976d9185
/froide/publicbody/migrations/0022_auto_20180726_1151.py
7e14d7876750cde3a291d808ae1a6e2c8ac13303
[ "MIT" ]
permissive
okfde/froide
d022407ec30bf018e6ca587ae9df0b73a8625edf
16e3c69b333fc82cb1e52378fc003ddf071152a7
refs/heads/main
2023-08-31T08:02:23.343743
2023-08-29T07:01:03
2023-08-29T07:01:03
1,700,944
230
48
MIT
2023-09-13T09:10:40
2011-05-04T12:20:51
Python
UTF-8
Python
false
false
585
py
0022_auto_20180726_1151.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-07-26 09:51 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("publicbody", "0021_proposedpublicbody"), ] operations = [ migrations.AlterModelOpti...
1956e982ba073b2edfb66939bc326f4ad3b9dc53
4c8ce1a65c1543d8411b990340b0ccb84bfcf18a
/tests/test_vars.py
b55366a80cb6ad35ea251285f5f6cb293e296736
[ "MIT" ]
permissive
scipopt/PySCIPOpt
e7b92c39ea1cdc32a123669614e4c06bee4b73eb
c6329760618a88e43e32d164e363ed233499de91
refs/heads/master
2023-09-03T13:35:16.769766
2023-07-03T08:33:49
2023-07-03T08:33:49
59,214,089
390
92
MIT
2023-08-07T10:44:19
2016-05-19T14:29:21
Cython
UTF-8
Python
false
false
1,611
py
test_vars.py
from pyscipopt import Model def test_variablebounds(): m = Model() x0 = m.addVar(lb=-5, ub=8) r1 = m.addVar() r2 = m.addVar() y0 = m.addVar(lb=3) t = m.addVar(lb=None) z = m.addVar() m.chgVarLbGlobal(x0, -2) m.chgVarUbGlobal(x0, 4) infeas, tightened = m.tightenVarLb(x0, -5) ...
480dc5dc0d32f4be2bcd154509aee87253ca7e0b
4c44cd6df77589a43f3ad0527f11cb1842d09a3b
/scout/server/blueprints/phenomodels/views.py
d5c18b42c4622a24198070a2cba5c0b00aa3c459
[ "BSD-3-Clause" ]
permissive
Clinical-Genomics/scout
b2118a06a534917734ed8575a3bd252691fbf3e4
1e6a633ba0a83495047ee7b66db1ebf690ee465f
refs/heads/main
2023-09-04T06:50:31.518288
2023-09-01T13:33:40
2023-09-01T13:33:40
25,027,539
143
64
BSD-3-Clause
2023-09-14T05:49:33
2014-10-10T08:44:01
HTML
UTF-8
Python
false
false
4,530
py
views.py
from bson import ObjectId from flask import Blueprint, flash, redirect, request, url_for from flask_login import current_user from scout.server.extensions import store from scout.server.utils import institute_and_case, templated from . import controllers from .forms import PhenoModelForm, PhenoSubPanelForm phenomode...
81f5ed5f104b657a46b9a277f3d1d599dfa0a18c
99a5229ba31d633b202252e1fda6194c70c83c38
/opsdroid/connector/matrix/tests/conftest.py
89c88d3ee7461c593cac416770ffe6820d5a9a34
[ "Apache-2.0" ]
permissive
opsdroid/opsdroid
1f5aeaa9a18e5c268ad7bfb46664f969f243814d
41246da2f6f379a889dadd1d3b4e139b65d3c9fb
refs/heads/master
2023-08-31T11:54:51.735969
2023-08-15T12:21:27
2023-08-15T12:21:27
64,034,523
835
593
Apache-2.0
2023-08-27T13:54:59
2016-07-23T20:18:56
Python
UTF-8
Python
false
false
5,054
py
conftest.py
import json from pathlib import Path import pytest import nio from opsdroid.connector.matrix import ConnectorMatrix ################################################################################ # Connector and config fixtures. ################################################################################ @pyt...
faae43450301555e58b90bf66bed3af7f427f3ed
d767236a45cc8a88ff652411cb96611f256f34c0
/keep/commands/cmd_pull.py
446b9049a31135818e44eb39ba0e4a3d10fcfb7e
[ "MIT" ]
permissive
OrkoHunter/keep
99dd90b6c1dd727de4e2b6193b9ac5b0fc02c5da
e6eadb926464af1ed41e9c8c69b72882b6bb1d77
refs/heads/master
2023-05-25T02:22:34.512630
2023-05-20T01:49:42
2023-05-20T01:49:42
46,737,100
609
69
MIT
2023-05-20T01:49:43
2015-11-23T17:36:10
Python
UTF-8
Python
false
false
883
py
cmd_pull.py
import click import os from keep import cli, utils from github import Github @click.command('pull', short_help='Pull commands from saved GitHub gist.') @cli.pass_context def cli(ctx): """Pull commands from saved GitHub gist.""" commands_file_path = os.path.join(utils.dir_path, 'commands.json') token = ut...
3bb4553bad32ed5d6d017f50107c5b3b22cbc5ca
9a2bbc25016326b3b1da275e3b9d9a3c5c5878a6
/project/game/ai/defence/yaku_analyzer/atodzuke.py
ba9fc78cfa9169b6ca27edd382ce9df7ac879745
[ "MIT" ]
permissive
MahjongRepository/tenhou-python-bot
3daabf510d58dfe7525bccf0df1575f027b632d2
112b08faab08ee862813de06cb5acc5db1c4feb0
refs/heads/dev
2023-07-20T14:51:02.101557
2023-07-08T10:11:47
2023-07-08T10:11:47
56,445,019
217
75
MIT
2023-05-23T02:05:41
2016-04-17T15:54:58
Python
UTF-8
Python
false
false
1,310
py
atodzuke.py
from game.ai.defence.yaku_analyzer.yaku_analyzer import YakuAnalyzer from game.ai.helpers.defence import TileDanger from mahjong.utils import is_honor class AtodzukeAnalyzer(YakuAnalyzer): id = "atodzuke_yakuhai" def __init__(self, enemy): self.enemy = enemy def serialize(self): return {...
f0add6b5321654c9a250a353878faa9900a90a04
a4ea525e226d6c401fdb87a6e9adfdc5d07e6020
/src/azure-cli-core/azure/cli/core/aaz/_command_ctx.py
40409230a10c4157f380eee2aa79266466a13d41
[ "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,401
py
_command_ctx.py
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
7c5e625480db1bd97a02bb0527b4ab7f8ce7f0b2
18ad3a6818cd9d8243e2fe41d65bc76530e6dbae
/tools/parse_test_res.py
fd5b0189d4ef130b0e772d483cf4c1e5643dff06
[ "MIT" ]
permissive
KaiyangZhou/deep-person-reid
55fe2fa0306847c5447d1c70fecd1f585758ae5e
566a56a2cb255f59ba75aa817032621784df546a
refs/heads/master
2023-09-02T21:55:37.749729
2023-02-08T02:52:17
2023-02-08T02:52:17
124,800,162
4,191
1,167
MIT
2023-05-23T11:41:21
2018-03-11T21:14:39
Python
UTF-8
Python
false
false
2,976
py
parse_test_res.py
""" This script aims to automate the process of calculating average results stored in the test.log files over multiple splits. How to use: For example, you have done evaluation over 20 splits on VIPeR, leading to the following file structure log/ eval_viper/ split_0/ test.log-xxxx spli...
31244b9a94674da0a9adb370d85d19452aade290
b40d1a26ea04a19ec0da7bf55db84b7ee36cc898
/leetcode.com/python/379_Design_Phone_Directory.py
07558d24dd605d46cd06e69f6e812a7943b4e626
[ "MIT" ]
permissive
partho-maple/coding-interview-gym
5e8af7d404c28d4b9b52e5cffc540fd51d8025cf
20ae1a048eddbc9a32c819cf61258e2b57572f05
refs/heads/master
2022-09-11T16:36:01.702626
2022-03-14T08:39:47
2022-03-14T08:39:47
69,802,909
862
438
MIT
2022-08-18T06:42:46
2016-10-02T14:51:31
Python
UTF-8
Python
false
false
1,577
py
379_Design_Phone_Directory.py
import heapq class PhoneDirectory(object): def __init__(self, maxNumbers): """ Initialize your data structure here @param maxNumbers - The maximum numbers that can be stored in the phone directory. :type maxNumbers: int """ self.phoneDictSts = {} self.avail...
8f70a02ee9923aef72238cd7d78b42d38196b443
98f1a0bfa5b20a0b81e9e555d76e706c62d949c9
/tests/python/common/backend/test_tensor.py
2f0bed1be25cd30577ffe9d02fe02179ef9bb35d
[ "Apache-2.0" ]
permissive
dmlc/dgl
3a8fbca3a7f0e9adf6e69679ad62948df48dfc42
bbc8ff6261f2e0d2b5982e992b6fbe545e2a4aa1
refs/heads/master
2023-08-31T16:33:21.139163
2023-08-31T07:49:22
2023-08-31T07:49:22
130,375,797
12,631
3,482
Apache-2.0
2023-09-14T15:48:24
2018-04-20T14:49:09
Python
UTF-8
Python
false
false
1,376
py
test_tensor.py
import unittest import backend as F import dgl import dgl.ndarray as nd import numpy as np @unittest.skipIf( dgl.backend.backend_name == "tensorflow", reason="TF doesn't support inplace update", ) def test_dlpack(): # test dlpack conversion. def nd2th(): ans = np.array( [[1.0, 1....
c6ba3191f3612fd54402051d93dded02b5c6e38e
ec85250addb7357dfe7bb3e0680d53fc7b0fd8fb
/python_modules/dagster/dagster_tests/general_tests/py3_tests/test_inference.py
6b0c48334b6ec62313e625db8a4bb5354a22622e
[ "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
14,694
py
test_inference.py
# ruff: noqa: D416 from typing import Any, Dict, List, Optional, Tuple import pytest from dagster import ( DagsterInvalidDefinitionError, DagsterType, In, Int, graph, job, make_python_type_usable_as_dagster_type, op, usable_as_dagster_type, ) from dagster._core.definitions.inferenc...
29b604a453abe583614fdc6f768194827caf1b83
4506d81df5ae98078e5cbe79f613514ad12b1c83
/nipype/interfaces/niftyfit/tests/test_auto_FitAsl.py
14093322cc1661dda219bdcfb87124986ada7706
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
nipy/nipype
d52eba1b98fda68e24d006ac0d5701fc8a531b9c
03a236320fa229299d637ff9af97865a6ae76aca
refs/heads/master
2023-08-28T10:36:07.020541
2023-08-25T13:40:09
2023-08-25T13:40:09
791,477
692
569
NOASSERTION
2023-09-11T06:04:51
2010-07-22T17:06:49
Python
UTF-8
Python
false
false
3,924
py
test_auto_FitAsl.py
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ..asl import FitAsl def test_FitAsl_inputs(): input_map = dict( args=dict( argstr="%s", ), cbf_file=dict( argstr="-cbf %s", extensions=None, name_source=["source_file"], n...
3a54f4062d414fdef36612445770870fdc1e0d0f
7c91ff850f81bf8759b055971d592a71ef025732
/tools/gengl.py
cb2afea8619c916796d174b66d0fc2bf0ba610ca
[ "BSD-3-Clause", "LicenseRef-scancode-free-unknown" ]
permissive
pyglet/pyglet
d9da2cccd52a6bc5c09548536876602f6e1412f0
094c638f0529fecab4e74556487b92453a78753c
refs/heads/master
2023-08-17T15:08:09.192350
2023-08-17T01:51:50
2023-08-17T01:51:50
191,043,601
1,687
427
BSD-3-Clause
2023-09-14T08:51:31
2019-06-09T18:55:00
Python
UTF-8
Python
false
false
7,237
py
gengl.py
""" Generate gl.py and gl_compat.py See : tools/requirements.txt We are using the opengl-registry project to extract this information from https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/master/xml/gl.xml A local version gl.xml can also be used. Usage: # Fetch gl.xml from Khronos Github repo python g...
95849bf36327dcb6c0dbec002ae9f2368594bb3b
e07885a1e08db9e335a0c88d578948aaf90b2af6
/genomepy/providers/ensembl.py
5bf592418cbddc11818b698c70e63563a793657e
[ "MIT" ]
permissive
vanheeringen-lab/genomepy
79b1af88e2f292d8ea1662ca296d48b26ed5d229
17f1ec9622488721d97dda4bdc6a01938c023177
refs/heads/master
2023-06-25T03:47:41.354519
2023-06-14T13:36:03
2023-06-14T13:36:03
76,658,708
260
29
MIT
2023-05-30T12:17:38
2016-12-16T14:11:17
Python
UTF-8
Python
false
false
11,629
py
ensembl.py
import re import requests from loguru import logger from genomepy.caching import cache_exp_genomes, cache_exp_other, disk_cache, lock from genomepy.exceptions import GenomeDownloadError from genomepy.online import check_url, retry from genomepy.providers.base import BaseProvider from genomepy.utils import safe clas...
f127ab5c15e1b3f30389dc35e781598a77738aa3
efcd21234f3291e8fc561f49a7c88fc57a63e952
/tests/functional/validators/test_validators_directives_are_defined.py
d4b7dceb2eb386bec5d9f870f155c080d78a90d8
[ "MIT" ]
permissive
tartiflette/tartiflette
146214a43847d2f423bf74594643c1fdefc746f1
421c1e937f553d6a5bf2f30154022c0d77053cfb
refs/heads/master
2023-09-01T02:40:05.974025
2022-01-20T14:55:31
2022-01-20T14:55:31
119,035,565
586
39
MIT
2023-09-11T07:49:27
2018-01-26T09:56:10
Python
UTF-8
Python
false
false
1,096
py
test_validators_directives_are_defined.py
import pytest @pytest.mark.parametrize( "query,expected", [ ( """ query{ catOrDog(id: 1) @dontExists { ... on Dog{ name @skip(if: false) } } } """, { "data": None, "errors": [ ...
bfc55223a9b3ac406c0b9b8cd686fe7e947de348
1559f2458e0b3a8319bca67b3041377e8d0ebb65
/graphql_ws/django/routing.py
395e0df0796690bac29bc7679af77c76965a4ec7
[ "MIT" ]
permissive
graphql-python/graphql-ws
c6fe4e598fb101aa654e778710cc0b4749f6f815
7ef25ecfaf5390bf1a0cb4023272d8cb074368c2
refs/heads/master
2022-11-11T02:16:31.805096
2021-08-24T09:05:56
2021-08-24T09:05:56
108,325,171
286
89
MIT
2022-10-26T22:53:52
2017-10-25T20:56:30
Python
UTF-8
Python
false
false
1,109
py
routing.py
from channels import __version__ as channels_version from channels.routing import ProtocolTypeRouter, URLRouter from channels.sessions import SessionMiddlewareStack from django.utils.version import get_version_tuple from django.apps import apps from django.urls import path from .consumers import GraphQLSubscriptionCons...
7e070ef586854c3392d028a3b752657635cdb346
45e2f5288afd65cd6b2213117e7df4fdc72847c1
/integration_tests/src/main/python/get_json_test.py
a6c0e00db0b0be5acb492ea2fe984751c174eb58
[ "LicenseRef-scancode-warranty-disclaimer", "Zlib", "BSD-3-Clause", "LicenseRef-scancode-free-unknown", "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
NVIDIA/spark-rapids
49cc2fb633f488dd48337c02b227502fcd473a12
5d5b3570eab2c8bb8d77d99613b19197b630a453
refs/heads/branch-23.10
2023-09-03T19:16:46.422726
2023-09-01T13:16:45
2023-09-01T13:16:45
264,043,501
600
212
Apache-2.0
2023-09-13T23:00:22
2020-05-14T22:56:44
Scala
UTF-8
Python
false
false
2,758
py
get_json_test.py
# Copyright (c) 2021-2023, NVIDIA 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 agre...
9842151d89177b7590642af20c13dd33bfec6ec9
ea0c5e1cac9f6a212ed2700316370da8f7d5ebd9
/attributionpriors/ops.py
bd89cda77ac392af807c2ea2b588d2feb50b960e
[ "MIT" ]
permissive
suinleelab/attributionpriors
61906e009e8706d865b9bf11b2752da4680da30f
487bd64842f341c918ed08121dc90718eb564789
refs/heads/master
2021-06-20T08:43:18.695052
2021-03-19T19:43:51
2021-03-19T19:43:51
193,598,358
129
12
null
null
null
null
UTF-8
Python
false
false
12,596
py
ops.py
import tensorflow # If using tensorflow v1, proceed as normal if int(tensorflow.__version__[0])<2: tf = tensorflow # If using v2, use the compat module and disable tf2 behavior else: tf = tensorflow.compat.v1 tf.disable_v2_behavior() import numpy as np class AttributionPriorExplainer(object): def __in...
2d8841f10146e135b0011d5259cf01004f61e78c
568fa58296378fa129ab3349adf010daa44ed45b
/tests/st/composite/test_graph_kernel_feature.py
6c436eacd9ee27777781d23c86c231ba6d3a2a79
[ "Apache-2.0", "BSD-3-Clause", "NCSA", "X11-distribute-modifications-variant", "Zlib", "MIT", "LicenseRef-scancode-unknown-license-reference", "Unlicense", "LLVM-exception", "BSD-2-Clause" ]
permissive
mindspore-ai/akg
37f471badc66de6a831f1f45ad84344f34d23ef2
99f33858d6972741748cbfc9ab0bf9600428fef7
refs/heads/master
2023-07-25T23:03:17.672665
2023-07-11T07:33:57
2023-07-11T07:33:57
274,077,856
319
36
Apache-2.0
2021-12-30T13:43:08
2020-06-22T08:09:05
Python
UTF-8
Python
false
false
1,865
py
test_graph_kernel_feature.py
# Copyright 2022 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...
c112bf9f8838d091e2687ac8359484e304d54f97
444a9480bce2035565332d4d4654244c0b5cd47b
/research/cv/tall/get_310_eval_dataset.py
e1bda3cdceeb4bafdb7b8f22c179be4b6ca5f9b6
[ "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
3,119
py
get_310_eval_dataset.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 a...
7fb5317c362d73895c81261aff31ac36f2133f1b
168f6e03f82b9a6530ce174659c218a162248b4d
/minidump/streams/Memory64ListStream.py
a07682ee9167b7a9401e9845d8d2d7d8c0e3e496
[ "MIT" ]
permissive
skelsec/minidump
c35a07846540c345d73e72c7e39525e42ba99662
069422590a5856eec8bfcf174b55a45442b8942f
refs/heads/master
2023-04-07T18:58:30.406970
2023-02-21T15:35:03
2023-02-21T15:35:03
134,586,242
226
50
MIT
2023-03-20T17:39:12
2018-05-23T15:02:19
Python
UTF-8
Python
false
false
3,211
py
Memory64ListStream.py
#!/usr/bin/env python3 # # Author: # Tamas Jos (@skelsec) # import io from minidump.common_structs import * # https://msdn.microsoft.com/en-us/library/windows/desktop/ms680387(v=vs.85).aspx class MINIDUMP_MEMORY64_LIST: def __init__(self): self.NumberOfMemoryRanges = None self.BaseRva = None self.MemoryRanges...
5b17c82955670edaad5db39b28e3933e1f6716bf
bb90ad20468f9fe2039b8c16858bd8eae8bbc050
/tests/e2e_logging.py
4b4b374c78302d8da0b8f76524dd9b0679e76528
[ "Apache-2.0" ]
permissive
microsoft/CCF
0997fd81a924d36d775b219720b26b4ff196b18a
2fbf87840b9e8334c141f4a9c9b25aae979b0540
refs/heads/main
2023-09-05T15:39:37.265089
2023-09-05T15:27:25
2023-09-05T15:27:25
180,112,558
687
229
Apache-2.0
2023-09-14T14:28:39
2019-04-08T09:13:04
C++
UTF-8
Python
false
false
66,423
py
e2e_logging.py
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache 2.0 License. import infra.network import suite.test_requirements as reqs import infra.logging_app as app import infra.e2e_args from infra.tx_status import TxStatus import infra.checker import infra.jwt_issuer import infra.proc impor...
6b989bd0f62b751ce67b50ff5a1fd5bdf6ffd4eb
7653ddbbc2256fae9cc62251f0241d0e9696df7d
/pyshtools/expand/__init__.py
f1057aa9d6ab4879bdacb8f04d610698fe77c15a
[ "BSD-3-Clause" ]
permissive
SHTOOLS/SHTOOLS
c3415b38da290805ecdfd59699587e5ac5233cc8
93e77dcc6b36b2363f07d79d07ec47d86e6cba65
refs/heads/master
2023-08-31T01:35:49.211882
2023-08-28T10:50:08
2023-08-28T10:50:08
24,725,612
315
117
BSD-3-Clause
2023-08-28T10:50:10
2014-10-02T15:53:36
Python
UTF-8
Python
false
false
4,591
py
__init__.py
""" pyshtools Spherical Harmonic Expansion Routines. This subpackage of pyshtools defines the following functions: Equally sampled (N by N) and equally spaced (N by 2N) Grids ----------------------------------------------------- SHExpandDH Expand an equally sampled or equally spaced map into spherical ...
c6762b0f93661be2d613ad4d67d8c8f6c4c44919
2727d25453482392dccb9a96d22df35fb53d5ce8
/hypernetx/algorithms/__init__.py
61ff87494404150478c3dd0378bf8578cfc21d11
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
pnnl/HyperNetX
a3c9ed016b04b7c37780ca38a8ddc64427aaf597
97ccb93ff9f0cc6ee887805e6974ebc2fd9718b3
refs/heads/master
2023-08-09T17:56:47.051977
2023-07-25T21:47:50
2023-07-25T22:04:42
154,165,172
378
76
NOASSERTION
2023-08-20T23:06:50
2018-10-22T15:10:44
Python
UTF-8
Python
false
false
2,596
py
__init__.py
from hypernetx.algorithms.homology_mod2 import ( kchainbasis, bkMatrix, swap_rows, swap_columns, add_to_row, add_to_column, logical_dot, logical_matmul, matmulreduce, logical_matadd, smith_normal_form_mod2, reduced_row_echelon_form_mod2, boundary_group, chain_comp...
873d8ca1f57c0d76980c229ebf2f2a47b77e9864
503256764aec0d4eaecc73e325bcd909e0c41764
/python/ctypes/treenumbers.py
a6b3940971e88d8c11f85fe433a80ef13cf8eba3
[]
no_license
hexchat/hexchat-addons
7b967ae33a8a7735304af82485ae71503f970210
16f6d169a2e46e10f4edac698ff7cbd476be5c7c
refs/heads/master
2023-06-17T15:34:53.304526
2023-05-02T18:12:34
2023-05-02T18:12:34
5,244,181
254
122
null
2023-05-02T18:09:16
2012-07-31T09:56:25
Perl
UTF-8
Python
false
false
12,824
py
treenumbers.py
from ctypes import * import xchat import traceback import sys __module_name__ = "treenumbers" __module_version__ = "1.0" __module_description__ = "Display tab numbers and an unread messages counter" # from gtype.h class GTypeClass(Structure): _fields_ = [("g_type", c_uint)] class GTypeInstance(Structur...
85c13840def4def2095f6fe97507a75cbc60ed2b
d94a508dcaadf415201a1e001896f5ad82d618e1
/auto_forensicate/stamp/manager.py
382ba81514e788db929ae77077a2dccdea86fd99
[ "Apache-2.0" ]
permissive
google/GiftStick
3d02700f46514c59d2cfc78db86f11806d5932b3
06059b1fc92db2bfd4d90ca9643433a7d8b633fe
refs/heads/main
2023-09-04T02:56:06.082469
2023-09-01T11:20:37
2023-09-01T11:20:37
154,346,214
128
26
Apache-2.0
2023-09-01T11:20:39
2018-10-23T14:49:54
Python
UTF-8
Python
false
false
1,900
py
manager.py
# -*- coding: utf-8 -*- # Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
c8e0b42a3aad89413a1766612b82a1338094601a
854b94d7be92582bd191a7cb63143a95e5b5c337
/hyfetch/distros/artix_small.py
53356f0ff4d911db893e87f07e777136cd477a39
[ "MIT" ]
permissive
hykilpikonna/hyfetch
673c0c999d0f3f542349824495ad6004f450ebac
98863df16d70b030696f4b94080d114396320f35
refs/heads/master
2023-08-17T10:41:10.289997
2023-08-17T03:37:23
2023-08-17T03:37:23
479,913,941
447
78
MIT
2023-09-14T14:39:18
2022-04-10T04:38:15
Shell
UTF-8
Python
false
false
441
py
artix_small.py
# This file is automatically generated. Please do not modify. from . import AsciiArt artix_small = AsciiArt(match=r'''"artix_small"*''', color='6 6 7 1', ascii=r""" ${c1} ' 'A' 'ooo' 'ookxo' `ookxxo' '. `ooko' 'ooo`. `oo' 'ooxxxoo`. `' 'ook...
eeea3260b10018634d741330a7b13bb4d7bee252
2ab8c172bc4e9d3b3c75659585e83ade1e2eb832
/tests/tools/test_vi_model.py
15592072302b78d36b80a18f55999206927aeec3
[ "BSD-3-Clause" ]
permissive
theislab/scvelo
0a5d717f8f025d7b6cf96ded2a7d5868f0484f43
d89ca6aecbe93256fbcdd8a521fdee2b9f2a673a
refs/heads/master
2023-07-25T16:28:58.484128
2023-07-25T15:21:12
2023-07-25T15:21:12
145,459,109
372
143
BSD-3-Clause
2023-07-25T15:21:14
2018-08-20T19:03:07
Python
UTF-8
Python
false
false
1,080
py
test_vi_model.py
from scvi.data import synthetic_iid import scvelo as scv from scvelo.tools import VELOVI def test_preprocess_data(): adata = synthetic_iid() adata.layers["spliced"] = adata.X.copy() adata.layers["unspliced"] = adata.X.copy() scv.pp.normalize_per_cell(adata) scv.pp.log1p(adata) scv.pp.moments(...
19f7e2752c3e5d3a23c6b8628904a192690be7ee
0e4860fecfdd34a3255003cc8c8df086c14083dd
/python/practise/Python之Django篇第六、七季:Web开发实战+用户登录模块/Django第七季完整项目源码-01/StudentMgr/apps/web/userweb/middleware/auth.py
f6954d5f202e00d055a7feef695a9b1e1a5c9ce8
[]
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
695
py
auth.py
from django.shortcuts import redirect, reverse from django.utils.deprecation import MiddlewareMixin # 引入setting文件 from django.conf import settings class Auth_Md(MiddlewareMixin): def process_request(self, request): # 获取当前请求的url current_url = request.path_info # 判断是否在白名单中 ...
79623ee7b58b4452d9c6460bc23d766707687823
c6b9b9f2fbc6c62e7a86b02718954661af3c564f
/mmflow/models/losses/ssim.py
fdc8f3750e3fc70bec9d02d083b8e42515921638
[ "Apache-2.0" ]
permissive
open-mmlab/mmflow
a90ff072805ac79cbc0b277baded1e74d25cccf0
9fb1d2f1bb3de641ddcba0dd355064b6ed9419f4
refs/heads/master
2023-05-22T05:19:48.986601
2023-01-10T16:05:18
2023-01-10T16:05:18
428,493,460
808
110
Apache-2.0
2023-09-05T13:19:38
2021-11-16T02:42:41
Python
UTF-8
Python
false
false
3,315
py
ssim.py
# Copyright (c) OpenMMLab. All rights reserved. from typing import Optional import torch import torch.nn.functional as F from torch import Tensor def weighted_ssim(x: Tensor, y: Tensor, weight: Optional[Tensor] = None, c1=0.01**2, c2=0.03**2, ...
4cbb73339f368c05af5d6b93f501261810b0344b
bbd69601912a3361d788efd03a47f9d4e3bac09e
/unittests/test_layout.py
3efdcff6d5e02b8c2db3996dba751b358a108726
[]
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
687
py
test_layout.py
import unittest from unittests import wtc import wx import os #--------------------------------------------------------------------------- class layout_Tests(wtc.WidgetTestCase): def test_layout(self): frame = self.frame panel = wx.Panel(frame) panel.BackgroundColour = 'blue' lc...
d15b331b18300c36047ea497bfc968ef88ba9461
d26bcefcb646e1bf9843d4872b2f85c12a0872db
/molfeat/calc/_map4.py
578ee916c4ad53268512f4a26ee9a64c1a82c63f
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
datamol-io/molfeat
2247335df72fb6ac715869a5752d7215f61c5af0
4390f9fce25fa2da94338227f7c8f33a23e25b2a
refs/heads/main
2023-08-31T18:27:43.933571
2023-08-01T13:42:04
2023-08-01T13:42:04
613,548,667
111
14
Apache-2.0
2023-09-08T12:31:02
2023-03-13T19:39:29
Python
UTF-8
Python
false
false
1,472
py
_map4.py
from typing import Union import datamol as dm from loguru import logger from molfeat.utils import requires if requires.check("map4"): from map4 import MAP4Calculator else: MAP4Calculator = requires.mock("map4") def MAP4( x: Union[dm.Mol, str], dimensions: int = 2048, radius: int = 2, is_coun...
85fe908202f8cf50e14353232539503626614881
2dc24a356ebe7a362623780603379a5b35a65c2f
/terraform/stacks/bot/lambdas/python/slack_automation_bot/slack_bolt/context/respond/internals.py
28cbbbec4dc6f386a16e417e22001c16dbefc9bf
[ "MIT" ]
permissive
cloud-sniper/cloud-sniper
cef08402f9109211c33909bdb3de07b16952e308
4b026da33695b25033c7667679f3cf552c4bf3b5
refs/heads/master
2023-06-24T20:46:02.377409
2023-04-14T14:48:45
2023-04-14T14:48:45
210,739,453
184
36
MIT
2023-04-14T14:48:46
2019-09-25T02:34:26
Python
UTF-8
Python
false
false
1,068
py
internals.py
from typing import Optional, Dict, Union, Any, Sequence from slack_sdk.models.attachments import Attachment from slack_sdk.models.blocks import Block from slack_bolt.util.utils import convert_to_dict_list def _build_message( text: str = "", blocks: Optional[Sequence[Union[dict, Block]]] = None, attachme...
b47049626a7ce07bf85d71bad8791eb9795af62d
e384f5467d8bcfd70845997bcbd68d950e874a61
/example/python/MyLibOGL/ogl/vertex.py
536abab5d55767b05fe3e7d4bac2cb74c8405353
[]
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
17,403
py
vertex.py
import sys import math #import array # Numpy improt [http://www.numpy.org/] import numpy # PyOpenGL import [http://pyopengl.sourceforge.net/] from OpenGL.GL import * # TODO numpy -> array [https://docs.python.org/3/library/array.html] # TODO use double array # vertex array object class VAObject: # dataArrays: ...
92225d7424a1fb2059db6bd947730d882e7e0563
5835ec8ce289f21f0d5be130ff5a725d6fbad9ee
/examples/atari/ppo/atari_ppo_rnd.py
9dd76ed08a482371a0b156628749721cdde5c33b
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
facebookresearch/rlmeta
4f3b8649380666a0661a58e33f5cc9857c98acf9
06b2dc2b04c78241ba30addc60d71fba8b9aec76
refs/heads/main
2023-05-23T11:00:24.819345
2023-02-11T06:20:05
2023-02-11T06:20:05
438,839,283
296
24
MIT
2023-02-11T06:20:07
2021-12-16T02:47:46
Python
UTF-8
Python
false
false
5,904
py
atari_ppo_rnd.py
# 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. import copy import json import logging import time import hydra import torch import torch.multiprocessing as mp import rlmeta.envs.atari_...
945bbf90c92a33fa8cd1bdc4e7a3f97c6660e5f9
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/python/testData/psi/MissingListSeparators.py
7e3c715664c985d1db405d0d09a47271f4827e1d
[ "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
11
py
MissingListSeparators.py
a = [1 2 3]
0dd9019848e0225ad87e6a9799099a653f055666
b347bc4b850dee4a8a9a171b563a3f31230ce1c7
/sktime/proba/tests/test_proba_basic.py
9cee3cd3814dd5f76b328a81dd67a3e501c6ced2
[ "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
733
py
test_proba_basic.py
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file) """Non-suite tests for probability distribution objects.""" __author__ = ["fkiraly"] import pytest from sktime.utils.validation._dependencies import _check_soft_dependencies @pytest.mark.skipif( not _check_soft_dependencies("tensorflow_pro...
ccb015201976f7c34de3508f8b85d99919337467
fdb9bdc6c4ab2f14ba71e544493706d5e275899f
/fhir/resources/examplescenario.py
336822d5b017517e0f468870bb8fc507e7c8f564
[ "BSD-3-Clause" ]
permissive
nazrulworld/fhir.resources
6ae8aea8180c611b0c5050759c6dcdf63e4cb061
1fd6ea476b27b3fcb8c4ef8f23bc51cf161e69e3
refs/heads/main
2023-08-30T18:27:27.277249
2023-07-03T19:57:06
2023-07-03T19:57:06
165,297,877
256
83
NOASSERTION
2023-08-24T15:34:05
2019-01-11T19:26:41
Python
UTF-8
Python
false
false
67,834
py
examplescenario.py
# -*- coding: utf-8 -*- """ Profile: http://hl7.org/fhir/StructureDefinition/ExampleScenario Release: R5 Version: 5.0.0 Build ID: 2aecd53 Last updated: 2023-03-26T15:21:02.749+11:00 """ import typing from pydantic import Field, root_validator from pydantic.error_wrappers import ErrorWrapper, ValidationError from pydan...
a8b868e35d6dc154b2deaf3092f6e5bf34163742
7d689ca6fa3fcea87bc636719fcc5594730057d7
/mollie/api/objects/balance_report.py
5b2adf939234bcf352eb493416b1b02b26216bed
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
mollie/mollie-api-python
fbbb3c05a7867b122c26debc05a5a91c16169748
e0d553aee4b52c3c7aabba2ff17ccc67e760635a
refs/heads/master
2023-08-27T19:35:19.487382
2023-07-28T13:20:43
2023-07-28T13:20:43
19,978,672
112
79
BSD-2-Clause
2023-08-31T15:35:55
2014-05-20T11:42:28
Python
UTF-8
Python
false
false
1,083
py
balance_report.py
from typing import TYPE_CHECKING, Any from .base import ObjectBase if TYPE_CHECKING: from ..client import Client from ..resources import BalanceReports class BalanceReport(ObjectBase): @classmethod def get_resource_class(cls, client: "Client", **kwargs: Any) -> "BalanceReports": from ..resou...
66fe9d65dd5ddd750c5a7e153a5d7076516c4575
f3806d9fb54773908cd9704121a543b114470aca
/angr/analyses/analysis.py
fed02a1ab5081c8bd9cd064ae4eede2f20f686fe
[ "BSD-2-Clause" ]
permissive
angr/angr
8ae95fceca51b0a001de56477d984dd01193ac1d
37e8ca1c3308ec601ad1d7c6bc8081ff38a7cffd
refs/heads/master
2023-08-17T03:15:21.007865
2023-08-15T18:44:57
2023-08-15T18:44:57
40,328,394
7,184
1,306
BSD-2-Clause
2023-09-14T20:14:23
2015-08-06T21:46:55
Python
UTF-8
Python
false
false
12,277
py
analysis.py
# ruff: noqa: F401 import functools import sys import contextlib from collections import defaultdict from inspect import Signature from typing import TYPE_CHECKING, TypeVar, Type, Generic, Callable, Optional import logging import time import typing from rich import progress from ..misc.plugins import PluginVendor, V...
ee7929a5ce095fabcb49a0a5145e5ecc82538419
802b23f75579f7c4855c675ff2e93fcb93f4d6e2
/src/exception_process.py
aa06f2339effd149bd17c36696916275ddc8a633
[]
no_license
s3team/uroboros
d7daa046e02e26e5b6b2d2f52b9ecf0e2589e2de
c074cca980eb94cc16735f1e568b08bb308001fc
refs/heads/master
2021-12-24T18:48:54.807768
2021-12-14T19:26:26
2021-12-14T19:26:26
44,036,165
201
60
null
2021-09-19T07:06:38
2015-10-11T02:21:47
OCaml
UTF-8
Python
false
false
3,124
py
exception_process.py
import re, sys lines = [] fn = sys.argv[1] with open(fn) as f: lines = f.readlines() lines = lines[2:-2] for i in range(len(lines)): l = lines[i] if ";" in l: lines[i] = l.split(';')[0] text_b = 0 text_e = 0 with open('text_sec.info') as f: l = f.readlines()[0] text_b = int(l.split()[1], 16) text_e = i...
71d04c68cb89d31f71d85117a6ef2dc2d185f302
5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d
/alipay/aop/api/domain/CommonPrizeModelVo.py
6493927717528d63bc860aafc891cfa8c7c57688
[ "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
2,191
py
CommonPrizeModelVo.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class CommonPrizeModelVo(object): def __init__(self): self._prize_desc_image_url = None self._prize_down_desc_text = None self._prize_name = None @property def prize_de...
df541b6d78d7c526f503d0010ec1f65757eed11b
a4515918f56dd7ab527e4999aa7fce818b6dd6f6
/Algorithms/Cryptography/rc4.py
74fc3885f7346c233d9c63cb50e5b82b85852429
[ "MIT" ]
permissive
rathoresrikant/HacktoberFestContribute
0e2d4692a305f079e5aebcd331e8df04b90f90da
e2a69e284b3b1bd0c7c16ea41217cc6c2ec57592
refs/heads/master
2023-06-13T09:22:22.554887
2021-10-27T07:51:41
2021-10-27T07:51:41
151,832,935
102
901
MIT
2023-06-23T06:53:32
2018-10-06T11:23:31
C++
UTF-8
Python
false
false
945
py
rc4.py
def run_rc4(text,key): resultado = [] for char in text: resultado.append(rc4(char,key)) return bytearray(resultado) def rc4(value,key): SJ = KSA(key) generatedByte = GenFluxo(SJ[0]) return value ^ next(generatedByte) def KSA(key): S = [] T = [] for i in range(256): ...
8b090d711871a5901506bb58ae87c44c2dea34eb
7bea5adf7d6284fbad0131d665e957d58adfe7c7
/allauth/socialaccount/providers/shopify/tests.py
415f7cdc1cf4f6433d69703d6c5b14b039fd4966
[ "MIT" ]
permissive
pennersr/django-allauth
50c9e71c3666785368e92ed9e19ea0f6a5438cd2
6b8911a5ebbabda0d446f2743bd4d00d250ed500
refs/heads/main
2023-09-03T16:48:10.988418
2023-09-02T08:00:53
2023-09-02T08:00:53
976,994
7,719
3,481
MIT
2023-09-14T15:06:57
2010-10-10T20:10:52
Python
UTF-8
Python
false
false
5,506
py
tests.py
import json from urllib.parse import parse_qs, urlparse from django.test.utils import override_settings from django.urls import reverse from django.utils.http import urlencode from allauth.socialaccount.models import SocialAccount from allauth.socialaccount.tests import OAuth2TestsMixin from allauth.tests import Mock...
cd35d2c9b475958c6ce964d66c708f4168236e68
28cf7b16dd29a5802d09b44b0186f6ae2c5ff0ed
/kuryr_kubernetes/tests/fake.py
57e00ea31a8fab19038cc32641f4d0ac78a187f2
[ "Apache-2.0" ]
permissive
openstack/kuryr-kubernetes
c292826abfb8aa0d3f8ef3b1007362162db16956
4993c7a4b2d7e4b053832bf39602f2573fad6266
refs/heads/master
2023-08-18T19:21:02.487908
2023-08-03T13:58:11
2023-08-03T13:58:11
58,626,548
169
78
Apache-2.0
2022-04-13T02:27:52
2016-05-12T09:14:29
Python
UTF-8
Python
false
false
6,527
py
fake.py
# Copyright (c) 2017 Red Hat. # 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 ...
0809b0450ab9cff6989bd189dc15abcc7aebcb12
80293519e9f36c9f5772f7e3615de912a2a48a9f
/Hackathon_Solutions/ZS-Patient Drug-Switch Prediction/Tirthankar Das/Model.py
e5d6e69c54668ed0137318fe7280032f77fe00b1
[]
no_license
analyticsindiamagazine/MachineHack
95362a677140051e10c1555f0a46b98a47383972
6d15adec5db64d4a7629f9e1aa27e11ca730c5ae
refs/heads/master
2023-02-18T20:20:37.787343
2022-10-12T09:44:20
2022-10-12T09:44:20
180,506,240
396
259
null
2023-02-11T01:15:53
2019-04-10T05:11:19
Jupyter Notebook
UTF-8
Python
false
false
17,655
py
Model.py
#!/usr/bin/env python # coding: utf-8 # In[1]: import numpy as np import pandas as pd from sklearn.model_selection import train_test_split import lightgbm as lgb from sklearn.model_selection import StratifiedKFold import scipy from sklearn.metrics import roc_curve, auc # # Feature Generation for Train: # In[ ]: ...
21abb188e0c2cd088b5f434b4958d3e0bbf2bdc8
f9d564f1aa83eca45872dab7fbaa26dd48210d08
/huaweicloud-sdk-metastudio/huaweicloudsdkmetastudio/v1/model/picture_modeling_by_url_req.py
6a200fea29a267adcad55fe7f03aab5cc5f2afe9
[ "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
5,409
py
picture_modeling_by_url_req.py
# coding: utf-8 import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class PictureModelingByUrlReq: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attr...
cc2558b659d075a607830762da47790fad3a88a9
ee63c4aa5ae8613d09080b2b766cd335f3c37a10
/tools/tensorflow_docs/api_generator/compat_test/estimator.py
0b54303ca3919b5ddbc87cf69ba84e5682bb9c89
[ "Apache-2.0", "MIT" ]
permissive
tensorflow/docs
fa7d1823d36dd07a8ec22011049ac9a3fe8124fe
a1abe995b09aca2768c03e509a146354828c6aa3
refs/heads/master
2023-08-21T01:02:59.624541
2023-08-18T20:53:45
2023-08-18T20:54:23
129,317,474
6,515
6,676
Apache-2.0
2023-09-14T15:13:04
2018-04-12T22:23:12
Jupyter Notebook
UTF-8
Python
false
false
1,497
py
estimator.py
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
e5c539edf872a8f7091575cd3eaca73969fe103e
2ddbcefa36bf68ad2e7f4018c5283b7aef726a1f
/etw/GUID.py
6edf9543ac00f21117f877bd56ba70a6c0fe3bda
[ "Apache-2.0" ]
permissive
fireeye/pywintrace
c275ba90f8ec942a4ff2f03fb700c562859e5f25
977eeb85d08982c160d9594f5f875f54db7a3415
refs/heads/master
2023-08-16T14:29:28.361857
2023-03-23T18:41:16
2023-03-23T18:41:16
102,869,990
273
73
Apache-2.0
2023-03-23T18:41:18
2017-09-08T14:27:01
Python
UTF-8
Python
false
false
3,208
py
GUID.py
######################################################################## # Copyright 2017 FireEye Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/L...
d0a60c4333ab9faa260e73567e1b1758ca6f08ff
e23256d6e31720bdb568694faee21ff51fd7e505
/pixellib/instance/mask_rcnn.py
e9e99f8348a9d817a221a2f8f3dc8ef60056be16
[ "MIT" ]
permissive
ayoolaolafenwa/PixelLib
534d94833ce1b499d43fd0534ad70de1b917615c
3d2a5abb02f081eb9446bf7d1eaa4b773ff9bd1d
refs/heads/master
2023-08-30T14:44:30.049673
2022-01-29T22:51:36
2022-01-29T22:51:36
255,074,156
983
281
MIT
2022-08-09T20:15:08
2020-04-12T12:07:34
Python
UTF-8
Python
false
false
125,466
py
mask_rcnn.py
""" Mask R-CNN The main Mask R-CNN model implementation. Copyright (c) 2017 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by Waleed Abdulla """ import os import datetime import re import math from collections import OrderedDict import multiprocessing import numpy as np import tensor...
88d206d76a154a06453ed6187e470719c8744dcd
afc3558e47ea4c82cb70190743472274eae7aeb1
/mmocr/utils/point_utils.py
809805f2eaf44337c184216375428f07e99899b9
[ "Apache-2.0" ]
permissive
open-mmlab/mmocr
86a77fb77ca80cede9c41a9a22080eeeaf364002
9551af6e5a2482e72a2af1e3b8597fd54b999d69
refs/heads/main
2023-08-03T14:06:11.075037
2023-07-26T02:32:14
2023-07-26T02:32:14
355,559,187
3,734
801
Apache-2.0
2023-09-12T03:17:12
2021-04-07T13:40:21
Python
UTF-8
Python
false
false
953
py
point_utils.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from mmocr.utils.typing_utils import ArrayLike def points_center(points: ArrayLike) -> np.ndarray: """Calculate the center of a set of points. Args: points (ArrayLike): A set of points. Returns: np.ndarray: The coordinat...
b1a650b937b507391196567a83dec206663e2280
312a8fde11293cb142334a3860966ec1f75ac401
/importer_client/python/timesketch_import_client/helper_test.py
8711a2b627086508f58b312afba29b9637ab8074
[ "Apache-2.0" ]
permissive
google/timesketch
f0fd09062a8a24bac581d2d4286d095d667d2f10
24f471b58ca4a87cb053961b5f05c07a544ca7b8
refs/heads/master
2023-08-31T21:48:19.602686
2023-08-31T11:24:17
2023-08-31T11:24:17
21,009,909
2,263
647
Apache-2.0
2023-09-14T14:08:07
2014-06-19T17:49:45
Python
UTF-8
Python
false
false
4,792
py
helper_test.py
# Copyright 2020 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
5a9a1fa51b417a496ada59c0f2391b5601c12fca
bb0e88e72382e27c48222d1e7a308476794740fe
/core/lib/payload/cleanup.py
fe99f69f95cad857ee6dcfc40062dfb7365ca639
[ "BSD-3-Clause" ]
permissive
facebookincubator/OnlineSchemaChange
b6b0e62618a54bc5a7058a8742a9c5eef395d22a
99c27961ec3a87c7d1bb650107e79971ae8c465f
refs/heads/main
2023-09-01T21:09:11.494282
2023-09-01T05:53:07
2023-09-01T05:53:07
79,285,486
998
167
NOASSERTION
2023-01-24T03:10:54
2017-01-18T00:06:19
Python
UTF-8
Python
false
false
12,920
py
cleanup.py
#!/usr/bin/env python3 """ Copyright (c) 2017-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. """ import logging import os import re import time import MySQLdb from .. import constant, sql, uti...
4902bc3a8ed92e3e0a2b7f1d638f325b9bbbe66d
24021fe2eb98aca9bc35f5b017fa8c631581bb54
/vulnerabilities/tests/test_pysec.py
f5d8107ac7f6f024f49e84a9a5a5d3192a41f3b9
[ "Apache-2.0", "CC-BY-SA-4.0", "Python-2.0" ]
permissive
nexB/vulnerablecode
0253160c1b04cd992899bf5b74ad76ac125a68ae
eec05bb0f796d743e408a1b402df8abfc8344669
refs/heads/main
2023-09-03T21:48:21.368810
2023-08-31T16:52:41
2023-08-31T16:52:41
91,780,998
371
181
Apache-2.0
2023-09-11T19:24:24
2017-05-19T07:56:17
Python
UTF-8
Python
false
false
1,759
py
test_pysec.py
# # Copyright (c) nexB Inc. and others. All rights reserved. # VulnerableCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. # See https://github.com/nexB/vulnerablecode for support or download. # See https://aboutcode.org for mor...
7860a146531b2fe6f6810d0f038d4776ec29bcd2
84961c5b8a190f7e2a35107bc9abf2259617e8c2
/Chapter03/fakelogger.py
107303c49a515b45dd0fff2836dde1cbd57196a5
[ "MIT" ]
permissive
PacktPublishing/Software-Architecture-with-Python
f1002dafba83d74a7096dfad4ac4cd338ee9e425
446b78ba0f5e23039ae0de71fb433424170fac67
refs/heads/master
2023-02-06T11:11:46.699458
2023-01-30T09:38:05
2023-01-30T09:38:05
90,152,034
126
91
MIT
2019-05-08T06:46:58
2017-05-03T13:28:23
Python
UTF-8
Python
false
false
1,352
py
fakelogger.py
# Code Listing #2 import logging class FakeLogger(object): """ A class that fakes the interface of the logging.Logger object in a minimalistic fashion """ def __init__(self): self.lvl = logging.INFO def setLevel(self, level): """ Set the logging level """ self.lvl = level ...
c8cd40c7378d68b7c65302e86b706233b73cd400
6f9375e722264d863734c6f44e883c9d8799386d
/ui/tests/unit/toolkit/test_configuration.py
e92a8b81d27932683a2da951baa3ee7475c15336
[ "PostgreSQL" ]
permissive
dalibo/temboard
8e5fcf5604c5f234a5c1be7d75e871251d80e61e
d26cb848f4b064e05d5e422ecc001889f224bd74
refs/heads/master
2023-08-31T05:09:26.385396
2023-08-30T10:09:12
2023-08-30T10:09:12
68,793,814
400
56
NOASSERTION
2023-09-12T13:50:42
2016-09-21T07:57:13
Python
UTF-8
Python
false
false
5,836
py
test_configuration.py
# -*- coding: utf-8 -*- import argparse import pytest def test_spec_and_value(): from temboardui.toolkit.configuration import OptionSpec, Value spec = OptionSpec(section='temboard', name='verbose', default=False) assert repr(spec) value = Value('temboard_verbose', True, origin='test') assert r...
7f008e8c3fdc661f3a61cbd29165bdce176e8ef2
73a0f661f1423d63e86489d4b2673f0103698aab
/python/oneflow/test/modules/test_global_higher_derivative_div.py
540272d2418b764dde3770b0c0d4aa4a9458c288
[ "Apache-2.0" ]
permissive
Oneflow-Inc/oneflow
4fc3e081e45db0242a465c4330d8bcc8b21ee924
0aab78ea24d4b1c784c30c57d33ec69fe5605e4a
refs/heads/master
2023-08-25T16:58:30.576596
2023-08-22T14:15:46
2023-08-22T14:15:46
81,634,683
5,495
786
Apache-2.0
2023-09-14T09:44:31
2017-02-11T06:09:53
C++
UTF-8
Python
false
false
3,399
py
test_global_higher_derivative_div.py
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
b732b0d6c8e242d46cd22009ef3aac2e204b8b26
6415c13547e6943f7b65337cbd2790c4e18723c8
/netbox/dcim/models/power.py
3377a9edb6df5c0f94490f617bc277712bf48a31
[ "Apache-2.0" ]
permissive
netbox-community/netbox
287254a9698270d51f57b1297118e9f01536da5a
506884bc4dc70299db3e2a7ad577dd7fd808065e
refs/heads/develop
2023-08-24T09:11:46.685121
2023-08-23T18:44:14
2023-08-23T18:44:14
52,796,596
8,122
1,817
Apache-2.0
2023-09-14T18:16:01
2016-02-29T14:15:46
Python
UTF-8
Python
false
false
5,519
py
power.py
from django.contrib.contenttypes.fields import GenericRelation from django.core.exceptions import ValidationError from django.core.validators import MaxValueValidator, MinValueValidator from django.db import models from django.urls import reverse from django.utils.translation import gettext as _ from dcim.choices impo...
5e5b2fb20b3b7a84f7874b89f83343abf9ffd014
edc1134436a79ca883a0d25f3c8dfffc4235c514
/tests/infer/reparam/test_discrete_cosine.py
17217e74a194f5b28fb256c7af769dd876115ac3
[ "Apache-2.0" ]
permissive
pyro-ppl/pyro
2283d8ca528fc090c724a3a6e0f344e505ebbf77
0e82cad30f75b892a07e6c9a5f9e24f2cb5d0d81
refs/heads/dev
2023-08-18T00:35:28.014919
2023-08-06T21:01:36
2023-08-06T21:01:36
94,506,832
3,647
606
Apache-2.0
2023-09-14T13:52:14
2017-06-16T05:03:47
Python
UTF-8
Python
false
false
4,030
py
test_discrete_cosine.py
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import pytest import torch from torch.autograd import grad import pyro import pyro.distributions as dist from pyro import poutine from pyro.infer.reparam import DiscreteCosineReparam from tests.common import assert_close from .util i...