hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
3c82edf683517fc13c8a9280a1bccfd34ca9bf0c
6,552
py
Python
test/functional/p2p_tx_download.py
DevVoluntarism/bitcoin-abc
b37e310aa64c5e87f11e92549a5897fc51abd142
[ "MIT" ]
null
null
null
test/functional/p2p_tx_download.py
DevVoluntarism/bitcoin-abc
b37e310aa64c5e87f11e92549a5897fc51abd142
[ "MIT" ]
null
null
null
test/functional/p2p_tx_download.py
DevVoluntarism/bitcoin-abc
b37e310aa64c5e87f11e92549a5897fc51abd142
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Test transaction download behavior """ from test_framework.address import ADDRESS_BCHREG_UNSPENDABLE from ...
34.666667
118
0.634768
220cf001d6038206a7f1cf8f6c5e435736fb0700
21,067
py
Python
references/classification/train.py
futurelife2016/vision
bbd9ff8fb936846aa0412996abab19b563677e5b
[ "BSD-3-Clause" ]
1
2022-01-06T01:58:01.000Z
2022-01-06T01:58:01.000Z
references/classification/train.py
futurelife2016/vision
bbd9ff8fb936846aa0412996abab19b563677e5b
[ "BSD-3-Clause" ]
null
null
null
references/classification/train.py
futurelife2016/vision
bbd9ff8fb936846aa0412996abab19b563677e5b
[ "BSD-3-Clause" ]
null
null
null
import datetime import os import time import warnings import presets import torch import torch.utils.data import torchvision import transforms import utils from torch import nn from torch.utils.data.dataloader import default_collate from torchvision.transforms.functional import InterpolationMode try: from torchv...
42.993878
120
0.667679
7ecc5ba9b47a86e601ac5f743eb724add2f29bae
1,647
py
Python
snail/Si5351_Clock/constants.py
Who8MyLunch/Snail
86f4093a884ceb6ba296afad50f238f439e4c2c4
[ "MIT" ]
null
null
null
snail/Si5351_Clock/constants.py
Who8MyLunch/Snail
86f4093a884ceb6ba296afad50f238f439e4c2c4
[ "MIT" ]
null
null
null
snail/Si5351_Clock/constants.py
Who8MyLunch/Snail
86f4093a884ceb6ba296afad50f238f439e4c2c4
[ "MIT" ]
null
null
null
# PLL index number PLL_A = 0 PLL_B = 1 # Crystal's internal load capacitance XTAL_CL_6PF = 0b01 XTAL_CL_8PF = 0b10 XTAL_CL_10PF = 0b11 XTAL_CL_DEF = XTAL_CL_10PF # Input clock dividers, Si5351C only CLKIN_DIV_1 = 0b00 CLKIN_DIV_2 = 0b01 CLKIN_DIV_4 = 0b10 CLKIN_DIV_8 = 0b11 ######################################...
18.931034
75
0.677596
b3bf4481094d83b5d7fc682b1308eb40e0434fd7
15,028
py
Python
software/mavlink/mavlink/pymavlink/generator/mavgen_swift.py
tucuongbrt/PIFer
e2ac4d4443e1c6a6263f91c32f28dbe767590359
[ "MIT" ]
10
2021-03-15T03:58:06.000Z
2021-12-30T15:33:38.000Z
software/mavlink/mavlink/pymavlink/generator/mavgen_swift.py
tucuongbrt/PIFer
e2ac4d4443e1c6a6263f91c32f28dbe767590359
[ "MIT" ]
4
2021-05-03T16:58:53.000Z
2021-12-21T21:01:02.000Z
Library/src/mavlink/pymavlink/generator/mavgen_swift.py
Dieptranivsr/Ros_Diep
d790e75e6f5da916701b11a2fdf3e03b6a47086b
[ "MIT" ]
9
2021-04-28T15:26:34.000Z
2021-12-21T20:41:30.000Z
#!/usr/bin/env python """ Parse a MAVLink protocol XML file and generate Swift implementation Copyright Max Odnovolyk 2015 Released under GNU GPL version 3 or later """ from __future__ import print_function import os from . import mavparse, mavtemplate abbreviations = ["MAV", "PX4", "UDB", "PPZ", "PIXHAWK", "SLUGS",...
39.44357
215
0.624567
5a89ba2c7c36f029b3f0f8427d8e38534c5b46d0
1,021
py
Python
indicate/data/get_espncricinfo/find_hindi_scorecards.py
soodoku/indic-transliterate
dc7537c0ca8d9a46f45e67e49be0d3eb478917b8
[ "MIT" ]
3
2021-11-11T02:38:27.000Z
2021-12-19T03:56:58.000Z
indicate/data/get_espncricinfo/find_hindi_scorecards.py
soodoku/indic-transliterate
dc7537c0ca8d9a46f45e67e49be0d3eb478917b8
[ "MIT" ]
null
null
null
indicate/data/get_espncricinfo/find_hindi_scorecards.py
soodoku/indic-transliterate
dc7537c0ca8d9a46f45e67e49be0d3eb478917b8
[ "MIT" ]
null
null
null
import json import datetime import requests from espncricinfo.match import Match hindi_matches = [] players = [] with open("all-matches.json", "r") as matches_file: matches = json.load(matches_file) possible_matches = [x for x in matches if x > 1230000] print(len(possible_matches)) for match_id in pos...
32.935484
115
0.612145
8cb6c7da561685d0f219ac48fb4657dfb6a047d3
1,555
py
Python
packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickfont.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickfont.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_tickfont.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="scatter3d.marker.colorbar", **kwargs ): super(TickfontValidator, self).__init__( plotly_name=plotly_name, ...
38.875
87
0.558199
8cf458d831ed2825be5a79ef2aafba029b33ccb4
1,076
py
Python
frontend/migrations/versions/15e17ac2f68f_zenodo_make_upload_bytes_be_bigint.py
Daniel-Mietchen/wdumper
59dba4d8843c376cc2d483382fa8f8155e3d3907
[ "MIT" ]
null
null
null
frontend/migrations/versions/15e17ac2f68f_zenodo_make_upload_bytes_be_bigint.py
Daniel-Mietchen/wdumper
59dba4d8843c376cc2d483382fa8f8155e3d3907
[ "MIT" ]
null
null
null
frontend/migrations/versions/15e17ac2f68f_zenodo_make_upload_bytes_be_bigint.py
Daniel-Mietchen/wdumper
59dba4d8843c376cc2d483382fa8f8155e3d3907
[ "MIT" ]
null
null
null
"""zenodo: make upload_bytes be bigint Revision ID: 15e17ac2f68f Revises: a95ef06204fe Create Date: 2019-08-18 14:56:11.878451 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = '15e17ac2f68f' down_revision = 'a95ef06204fe' bra...
29.081081
65
0.658922
7579c4fd18c3713ba4d0bc4a966449e701400913
2,907
py
Python
kale/rpc/rpc_client.py
grayfallstown/kale-blockchain
1c426a15967813ece30f77b9b7584f2dc5ed554a
[ "Apache-2.0" ]
23
2021-07-05T00:55:47.000Z
2022-02-09T04:30:08.000Z
kale/rpc/rpc_client.py
grayfallstown/kale-blockchain
1c426a15967813ece30f77b9b7584f2dc5ed554a
[ "Apache-2.0" ]
14
2021-07-05T13:08:25.000Z
2021-08-23T18:57:02.000Z
kale/rpc/rpc_client.py
grayfallstown/kale-blockchain
1c426a15967813ece30f77b9b7584f2dc5ed554a
[ "Apache-2.0" ]
5
2021-07-06T23:24:39.000Z
2022-03-15T08:43:03.000Z
import asyncio from ssl import SSLContext from typing import Dict, List, Optional, Any import aiohttp from kale.server.server import NodeType, ssl_context_for_client from kale.server.ssl_context import private_ssl_ca_paths from kale.types.blockchain_format.sized_bytes import bytes32 from kale.util.byte_types import h...
40.375
115
0.69109
51d3c76c61989c9a775131f23d659303af85918d
16,343
py
Python
python/oneflow/test/modules/test_conv1d.py
butterluo/oneflow
cf2ce575d80f89642b71bee2248e69b09213007d
[ "Apache-2.0" ]
null
null
null
python/oneflow/test/modules/test_conv1d.py
butterluo/oneflow
cf2ce575d80f89642b71bee2248e69b09213007d
[ "Apache-2.0" ]
null
null
null
python/oneflow/test/modules/test_conv1d.py
butterluo/oneflow
cf2ce575d80f89642b71bee2248e69b09213007d
[ "Apache-2.0" ]
null
null
null
""" 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...
33.696907
88
0.539987
1192a10b7b21014449c3801a620cfe56582ca79d
2,509
py
Python
tests/test_upnpservice_av_transport.py
svilborg/samsungtv
007d8cbf4326ae13d74ab138eb77798d11aae108
[ "Apache-2.0" ]
12
2018-05-07T10:27:15.000Z
2021-01-03T23:39:41.000Z
tests/test_upnpservice_av_transport.py
svilborg/samsungtv
007d8cbf4326ae13d74ab138eb77798d11aae108
[ "Apache-2.0" ]
1
2020-07-12T20:51:51.000Z
2020-07-12T20:51:51.000Z
tests/test_upnpservice_av_transport.py
svilborg/samsungtv
007d8cbf4326ae13d74ab138eb77798d11aae108
[ "Apache-2.0" ]
2
2019-08-20T00:48:10.000Z
2020-09-20T10:09:17.000Z
from unittest import TestCase from samsungtv.upnpservice import UPnPServiceAVTransport class TestUPnPServiceAVTransport(TestCase): def test_init(self): t = UPnPServiceAVTransport('192.168.0.1') self.skipTest("Todo") # def test_real(self): # print "UPnPServiceAVTransport \n" # ...
27.571429
118
0.472698
05197f47aa103e1ee01d2d931e0e974b0477d819
228
py
Python
type_cast/type_cast_0.py
avkorablev/code_4_blog
fcda82f018d1de7c7b2a6d87f5f83f10a4477878
[ "CC0-1.0" ]
null
null
null
type_cast/type_cast_0.py
avkorablev/code_4_blog
fcda82f018d1de7c7b2a6d87f5f83f10a4477878
[ "CC0-1.0" ]
null
null
null
type_cast/type_cast_0.py
avkorablev/code_4_blog
fcda82f018d1de7c7b2a6d87f5f83f10a4477878
[ "CC0-1.0" ]
null
null
null
# file name: type_cast_0.py class A: a = 'a' class B(A): b = 'b' class DoSomethingWithA: _class = A def do(self) -> A: return self._class() class DoSomethingWithB(DoSomethingWithA): _class = B
12
41
0.596491
25ff22aa99f23a8b64fac0e2bbdee0447aad83ef
2,715
py
Python
tests/common/postgres.py
epiphany-platform/cdl-temporary
daa704f379c05d7b733c382058ff88a2549d33d7
[ "Apache-2.0" ]
8
2020-11-04T10:32:03.000Z
2021-09-08T16:46:13.000Z
tests/common/postgres.py
epiphany-platform/cdl-temporary
daa704f379c05d7b733c382058ff88a2549d33d7
[ "Apache-2.0" ]
418
2020-11-05T12:43:26.000Z
2021-10-19T02:24:43.000Z
tests/common/postgres.py
epiphany-platform/cdl-temporary
daa704f379c05d7b733c382058ff88a2549d33d7
[ "Apache-2.0" ]
13
2020-11-18T12:37:42.000Z
2021-09-16T07:43:27.000Z
import json import psycopg2 class PostgresConfig: def __init__(self, user='postgres', password='1234', host='localhost', port='5432', dbname='postgres', schema='public'): self.user = user self.pa...
26.617647
96
0.542173
60416c88f8fed41716f5864f431d2fe70225b5cc
3,132
py
Python
Day15/Day15.py
MichaelMKKang/AdventOfCode
fcbc7dccdd116c8cce62c0570bbaeaafe17b55ff
[ "MIT" ]
null
null
null
Day15/Day15.py
MichaelMKKang/AdventOfCode
fcbc7dccdd116c8cce62c0570bbaeaafe17b55ff
[ "MIT" ]
null
null
null
Day15/Day15.py
MichaelMKKang/AdventOfCode
fcbc7dccdd116c8cce62c0570bbaeaafe17b55ff
[ "MIT" ]
null
null
null
with open('Day15 input.txt') as f: lines = f.readlines() lines = [x.strip() for x in lines] #only roughly remember dijkstra's algorithm and intentionally not looking it up again # of coordinates:[total value risk if moved,and path so far] #structure is... # (consideration_coord_tuple):list(cum_risk_value,list(coo...
44.742857
102
0.549808
4438bee97902fa96e2b700ba94b1c8d2654158cf
2,172
py
Python
openfda/annotation_table/tests/extract_unii_test.py
hobochili/openfda
9958c4bc3d04d2e9cfc75f9cd894ad07a45e9141
[ "CC0-1.0" ]
388
2015-01-09T18:50:35.000Z
2022-03-24T10:15:23.000Z
openfda/annotation_table/tests/extract_unii_test.py
hobochili/openfda
9958c4bc3d04d2e9cfc75f9cd894ad07a45e9141
[ "CC0-1.0" ]
150
2015-01-21T20:30:54.000Z
2022-03-28T20:46:29.000Z
openfda/annotation_table/tests/extract_unii_test.py
hobochili/openfda
9958c4bc3d04d2e9cfc75f9cd894ad07a45e9141
[ "CC0-1.0" ]
113
2015-01-31T21:24:16.000Z
2022-01-30T15:17:28.000Z
#!/usr/bin/env python import os import unittest from openfda.annotation_table import extract_unii as extract from openfda.spl import extract as extract_spl class UNIIExtractMethoxsalenUnitTest(unittest.TestCase): 'UNII Extract Unit Test' def setUp(self): self.tree = extract_spl.parse_xml(os.path.dirname(__f...
37.448276
74
0.64825
e7dcd7191a818401c794773463c7d81547f80fbe
2,345
py
Python
ctera_gateway_openapi/api/sync.py
ctera/ctera-gateway-openapi
0b37af6cd4b53dfe0f66f4dc75dc131e99c63233
[ "Apache-2.0" ]
null
null
null
ctera_gateway_openapi/api/sync.py
ctera/ctera-gateway-openapi
0b37af6cd4b53dfe0f66f4dc75dc131e99c63233
[ "Apache-2.0" ]
null
null
null
ctera_gateway_openapi/api/sync.py
ctera/ctera-gateway-openapi
0b37af6cd4b53dfe0f66f4dc75dc131e99c63233
[ "Apache-2.0" ]
null
null
null
import copy from ctera_gateway_openapi.api.ctera_exception_translator import handle_ctera_exception from ctera_gateway_openapi.api.tokenizer import unpack_session_id from ctera_gateway_openapi.managers.sync import SyncManager @unpack_session_id @handle_ctera_exception def get_status(session_id=None, **_kwargs): ...
28.950617
87
0.753945
2549ffb8d140561fbed24fcb68cc648f8f0a2f82
4,343
py
Python
vmware_nsx/services/vpnaas/nsxv/ipsec_validator.py
huihongxiao/vmware-nsx
00530f9207958df66211e5dba008764106fc82c3
[ "Apache-2.0" ]
null
null
null
vmware_nsx/services/vpnaas/nsxv/ipsec_validator.py
huihongxiao/vmware-nsx
00530f9207958df66211e5dba008764106fc82c3
[ "Apache-2.0" ]
null
null
null
vmware_nsx/services/vpnaas/nsxv/ipsec_validator.py
huihongxiao/vmware-nsx
00530f9207958df66211e5dba008764106fc82c3
[ "Apache-2.0" ]
1
2019-06-21T18:07:53.000Z
2019-06-21T18:07:53.000Z
# Copyright 2016 VMware, 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 applica...
46.202128
79
0.655998
43d983715e76b334623f647606a2587d38abb96a
444
py
Python
gokart/__init__.py
davegrays/gokart
64999e5441217eafa5f0a6f3d2ee9aea04df740e
[ "MIT" ]
null
null
null
gokart/__init__.py
davegrays/gokart
64999e5441217eafa5f0a6f3d2ee9aea04df740e
[ "MIT" ]
null
null
null
gokart/__init__.py
davegrays/gokart
64999e5441217eafa5f0a6f3d2ee9aea04df740e
[ "MIT" ]
null
null
null
from gokart.build import build from gokart.info import make_tree_info, tree_info from gokart.pandas_type_config import PandasTypeConfig from gokart.parameter import ExplicitBoolParameter, ListTaskInstanceParameter, TaskInstanceParameter from gokart.run import run from gokart.task import TaskOnKart from gokart.testing i...
44.4
100
0.885135
003dc421b71c0c4c1edf98e0016b1c8416bae6fd
1,072
py
Python
hw_asr/tests/test_dataset.py
ainmukh/asr_project_template
6ba81ed52764911295f774ff9ea2aa362fbe4d7d
[ "MIT" ]
1
2021-12-12T13:13:05.000Z
2021-12-12T13:13:05.000Z
hw_asr/tests/test_dataset.py
timothyxp/asr_project_template
6f0534d44f93a251e11109e8262e06c9119004d9
[ "MIT" ]
null
null
null
hw_asr/tests/test_dataset.py
timothyxp/asr_project_template
6f0534d44f93a251e11109e8262e06c9119004d9
[ "MIT" ]
null
null
null
import unittest from hw_asr.datasets import LibrispeechDataset, CustomDirAudioDataset from hw_asr.text_encoder.ctc_char_text_encoder import CTCCharTextEncoder from hw_asr.utils import ROOT_PATH from hw_asr.utils.parse_config import ConfigParser class TestDataset(unittest.TestCase): def test_librispeech(self): ...
33.5
89
0.716418
67b881b47b0a2ce1d7a288708c2661f026b47c39
251
py
Python
ssr/surface_rec/tasks/reduction_task.py
SBCV/SatelliteSurfaceReconstruction
7127bc0fb36155e31ae2928c18a65d562d7d29ba
[ "BSD-3-Clause" ]
34
2021-04-03T13:12:34.000Z
2022-03-27T14:12:34.000Z
ssr/surface_rec/tasks/reduction_task.py
jieeeeeeeeeee/SatelliteSurfaceReconstruction
24aa67ace67e69568cbc7e01a9e8b407463366f4
[ "BSD-3-Clause" ]
3
2021-04-06T14:01:43.000Z
2021-05-25T08:40:13.000Z
ssr/surface_rec/tasks/reduction_task.py
jieeeeeeeeeee/SatelliteSurfaceReconstruction
24aa67ace67e69568cbc7e01a9e8b407463366f4
[ "BSD-3-Clause" ]
6
2021-05-11T12:18:07.000Z
2022-03-18T14:09:16.000Z
from ssr.surface_rec.tasks.task import Task class ReductionTask(Task): def __init__(self, colmap_idp, mesh_odp): self.__dict__.update(locals()) # delete self, since it is redundant and a circular reference del self.self
25.1
69
0.701195
ecb7767f8ce4fc3f226d3240f230a69329133962
3,457
py
Python
celseq2/demultiplex_sam.py
johannesnicolaus/celseq2
0a0873d46aa1889d5389d3faa50ec01c465e85bd
[ "BSD-3-Clause" ]
14
2017-11-02T15:44:13.000Z
2022-03-26T13:37:17.000Z
celseq2/demultiplex_sam.py
johannesnicolaus/celseq2
0a0873d46aa1889d5389d3faa50ec01c465e85bd
[ "BSD-3-Clause" ]
25
2018-02-06T19:47:31.000Z
2022-03-03T07:46:04.000Z
celseq2/demultiplex_sam.py
johannesnicolaus/celseq2
0a0873d46aa1889d5389d3faa50ec01c465e85bd
[ "BSD-3-Clause" ]
13
2018-01-19T20:19:59.000Z
2022-03-26T13:37:16.000Z
#!/usr/bin/env python3 import pysam import argparse from celseq2.helper import print_logger from celseq2.helper import join_path from celseq2.demultiplex import bc_dict_id2seq, str2int def _cell_seq (name, length=6): # BC-TCTGAG_UMI-CGTTAC => TCTGAG try: out = name.split('_')[0][3:3 + length] e...
30.324561
79
0.596471
538d7d0ad5525068f974e817f1c2ba43990d1097
116
py
Python
finance4py/__init__.py
brokenlab/finance4py
839fb4c262c369973c1afaebb23291355f8b4668
[ "MIT" ]
6
2016-12-28T03:40:46.000Z
2017-03-31T12:04:43.000Z
finance4py/__init__.py
brokenlab/finance4py
839fb4c262c369973c1afaebb23291355f8b4668
[ "MIT" ]
null
null
null
finance4py/__init__.py
brokenlab/finance4py
839fb4c262c369973c1afaebb23291355f8b4668
[ "MIT" ]
3
2018-04-26T03:14:29.000Z
2021-06-13T16:18:04.000Z
# -*- coding: utf-8 -*- from .instruments import Stock from . import backtesting __all__ = ['Stock', 'backtesting']
23.2
34
0.689655
71aa73742352e80e21409aa82e0682526a02d969
18,035
py
Python
src/oidcop/oidc/registration.py
ctriant/oidc-op
41d7f5e86ad086b6b3c266d1b92d54cbfe2b8733
[ "Apache-2.0" ]
null
null
null
src/oidcop/oidc/registration.py
ctriant/oidc-op
41d7f5e86ad086b6b3c266d1b92d54cbfe2b8733
[ "Apache-2.0" ]
null
null
null
src/oidcop/oidc/registration.py
ctriant/oidc-op
41d7f5e86ad086b6b3c266d1b92d54cbfe2b8733
[ "Apache-2.0" ]
null
null
null
import hashlib import hmac import json import logging import secrets import time from typing import List from urllib.parse import urlencode from urllib.parse import urlparse from cryptojwt.jws.utils import alg2keytype from cryptojwt.utils import as_bytes from oidcmsg.exception import MessageException from oidcmsg.oaut...
37.809224
97
0.598226
4907cf650a32aea227af93685345487087285012
788
py
Python
curation_projects/misc/chitraveda_images.py
lalitaalaalitah/doc_curation
d26072dc5afd645019788b4844058da5d0c63ebe
[ "MIT" ]
7
2020-04-25T08:55:55.000Z
2020-12-21T05:31:00.000Z
curation_projects/misc/chitraveda_images.py
lalitaalaalitah/doc_curation
d26072dc5afd645019788b4844058da5d0c63ebe
[ "MIT" ]
15
2020-04-25T08:31:42.000Z
2021-07-24T12:23:42.000Z
curation_projects/misc/chitraveda_images.py
lalitaalaalitah/doc_curation
d26072dc5afd645019788b4844058da5d0c63ebe
[ "MIT" ]
4
2020-04-25T06:28:37.000Z
2020-12-19T21:30:10.000Z
import logging import regex from doc_curation import google_sheets_index # Remove all handlers associated with the root logger object. for handler in logging.root.handlers[:]: logging.root.removeHandler(handler) logging.basicConfig( level=logging.DEBUG, format="%(levelname)s:%(asctime)s:%(module)s:%(line...
37.52381
216
0.738579
cc6b654dcd699052ae003a89faf30b74907a0b2a
803
py
Python
tests/test_lang.py
edne/rami
9c30fdb0dc8afb7898959ba71b8abca84a97cf25
[ "MIT" ]
null
null
null
tests/test_lang.py
edne/rami
9c30fdb0dc8afb7898959ba71b8abca84a97cf25
[ "MIT" ]
null
null
null
tests/test_lang.py
edne/rami
9c30fdb0dc8afb7898959ba71b8abca84a97cf25
[ "MIT" ]
null
null
null
from rami.lang import Lang lang = Lang() @lang.leaf def sides(value): return {'sides': value} @lang.leaf def color(value): return {'color': value} @lang.branch def group(branches): return {'group': list(branches)} @lang.branch def square(branches): return {'square': list(branches)} @lang.bra...
14.87037
78
0.526775
a3f4ed50967431c03d0015817ae2fa4c90f054f7
955
py
Python
fetal_plate_segmentation/tests/test_fetal_plate_segmentation.py
jwhong1125/pl-fetal_plate_segmentation
02ca7da1a0232f0d411e7cbb515c4a80ad4037fc
[ "MIT" ]
null
null
null
fetal_plate_segmentation/tests/test_fetal_plate_segmentation.py
jwhong1125/pl-fetal_plate_segmentation
02ca7da1a0232f0d411e7cbb515c4a80ad4037fc
[ "MIT" ]
6
2020-01-28T23:15:07.000Z
2022-02-10T00:39:03.000Z
fetal_plate_segmentation/tests/test_fetal_plate_segmentation.py
jwhong1125/pl-fetal_plate_segmentation
02ca7da1a0232f0d411e7cbb515c4a80ad4037fc
[ "MIT" ]
null
null
null
from unittest import TestCase from unittest import mock from fetal_plate_segmentation.fetal_plate_segmentation import Fetal_plate_segmentation class Fetal_plate_segmentationTests(TestCase): """ Test Fetal_plate_segmentation. """ def setUp(self): self.app = Fetal_plate_segmentation() def ...
28.088235
86
0.637696
2459cbff6e0c67037d407f7e2008ee9cfff566fc
230
py
Python
tests/server_test.py
artegoser/sUDP
c2e8f0a2fdd535fd9ff1a165c93b275762bff142
[ "MIT" ]
1
2021-01-21T08:37:55.000Z
2021-01-21T08:37:55.000Z
tests/server_test.py
artegoser/sUDP
c2e8f0a2fdd535fd9ff1a165c93b275762bff142
[ "MIT" ]
null
null
null
tests/server_test.py
artegoser/sUDP
c2e8f0a2fdd535fd9ff1a165c93b275762bff142
[ "MIT" ]
null
null
null
import SUDP import time sock = SUDP.sUDPsocket() sock.bind (('192.168.0.183',9090)) while True: msg , address = sock.recvfrom(1024) sock.retimeout = 1 #any timeout print(sock.sendto(("lol").encode("utf-8"), address))
23
56
0.669565
f764d091b3a085d00802ab7f140d23d2ba7a09fd
125
py
Python
0x04-python-more_data_structures/1-search_replace.py
omarcherni007/holbertonschool-higher_level_programming
65f3430ab0310f85368d73cb72e139631e8c6f1e
[ "MIT" ]
1
2022-01-04T11:07:56.000Z
2022-01-04T11:07:56.000Z
0x04-python-more_data_structures/1-search_replace.py
omarcherni007/holbertonschool-higher_level_programming
65f3430ab0310f85368d73cb72e139631e8c6f1e
[ "MIT" ]
null
null
null
0x04-python-more_data_structures/1-search_replace.py
omarcherni007/holbertonschool-higher_level_programming
65f3430ab0310f85368d73cb72e139631e8c6f1e
[ "MIT" ]
null
null
null
#!/usr/bin/python3 def search_replace(my_list, search, replace): return [replace if i == search else i for i in my_list]
31.25
59
0.72
f1983e8f6a07b8ff320d3b8644142f41ca27289a
3,098
py
Python
protons/scripts/cli.py
choderalab/Protons
a55d7a72d0e4f2f402a2c144c5a7fb34ccce2a7f
[ "MIT" ]
16
2016-12-30T23:58:06.000Z
2021-09-29T02:40:35.000Z
protons/scripts/cli.py
choderalab/protons
a55d7a72d0e4f2f402a2c144c5a7fb34ccce2a7f
[ "MIT" ]
75
2016-10-31T19:52:32.000Z
2021-03-03T00:01:35.000Z
protons/scripts/cli.py
choderalab/Protons
a55d7a72d0e4f2f402a2c144c5a7fb34ccce2a7f
[ "MIT" ]
5
2017-01-18T23:15:07.000Z
2021-04-01T00:50:36.000Z
"""This library contains a minimal command line interface to enable tracking the common use cases. This should be more maintainable than having separate python scripts inside the examples directory. """ import os import sys from ..app.logger import log, logging from typing import List from .run_simulation import r...
27.90991
123
0.544545
f5dbced62806b2c242a44aa2d89c99bede047878
3,265
py
Python
password_manager.py
Sarvesh-SP/passwordManager
2ef32aa1329c2c49e3fada776855caf1fc791b4f
[ "MIT" ]
null
null
null
password_manager.py
Sarvesh-SP/passwordManager
2ef32aa1329c2c49e3fada776855caf1fc791b4f
[ "MIT" ]
null
null
null
password_manager.py
Sarvesh-SP/passwordManager
2ef32aa1329c2c49e3fada776855caf1fc791b4f
[ "MIT" ]
null
null
null
#importing configs and credentials from utils import config from update import update #from secret import get_secret_key from menu import menu, create, find, find_accounts, delAccount #importing the crypto module from cryptography.fernet import Fernet #functions to generate\load an encryption key def generate_key(): ...
33.316327
115
0.518224
6e906c92aae1110cb86839d7bb53080029048724
1,460
py
Python
wsgi/iportalen_django/articles/migrations/0029_imageattachment_otherattachment.py
I-sektionen/i-portalen
1713e5814d40c0da1bf3278d60a561e7d3df3550
[ "MIT" ]
4
2016-09-21T17:06:01.000Z
2018-02-06T16:36:44.000Z
wsgi/iportalen_django/articles/migrations/0029_imageattachment_otherattachment.py
I-sektionen/i-portalen
1713e5814d40c0da1bf3278d60a561e7d3df3550
[ "MIT" ]
149
2016-03-07T23:50:47.000Z
2022-03-11T23:16:33.000Z
wsgi/iportalen_django/articles/migrations/0029_imageattachment_otherattachment.py
I-sektionen/i-portalen
1713e5814d40c0da1bf3278d60a561e7d3df3550
[ "MIT" ]
1
2016-03-07T23:02:06.000Z
2016-03-07T23:02:06.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import articles.models class Migration(migrations.Migration): dependencies = [ ('articles', '0028_auto_20160104_2353'), ] operations = [ migrations.CreateModel( name='Ima...
40.555556
148
0.614384
8439e76c26e37961eb1f7e9d735d7f6202c644ce
688
py
Python
py_wake/tests/test_utils/test_check_input.py
aemoser/PyWake
889a2c10882195af21339e9bcf2ede0db9b58319
[ "MIT" ]
30
2019-03-18T14:10:27.000Z
2022-03-13T17:39:04.000Z
py_wake/tests/test_utils/test_check_input.py
aemoser/PyWake
889a2c10882195af21339e9bcf2ede0db9b58319
[ "MIT" ]
1
2020-11-12T06:13:00.000Z
2020-11-12T06:43:26.000Z
py_wake/tests/test_utils/test_check_input.py
aemoser/PyWake
889a2c10882195af21339e9bcf2ede0db9b58319
[ "MIT" ]
20
2019-01-11T14:45:13.000Z
2021-12-13T19:55:29.000Z
import pytest from py_wake.utils.check_input import check_input import numpy as np def test_check_input(): input_space = [(0, 1), (100, 200)] with pytest.raises(ValueError, match="Input, index_0, with value, 2 outside range 0-1"): check_input(input_space, np.array([(2, 150)]).T) with pytest.rais...
36.210526
97
0.667151
af1148b45a88f76f79d3ff1e4f04186e11212e0b
955
py
Python
commands/mkdir.py
dtebbs/tzbuild
be284674bd17db8f5de33b27db14381fa1290da6
[ "BSD-3-Clause" ]
null
null
null
commands/mkdir.py
dtebbs/tzbuild
be284674bd17db8f5de33b27db14381fa1290da6
[ "BSD-3-Clause" ]
null
null
null
commands/mkdir.py
dtebbs/tzbuild
be284674bd17db8f5de33b27db14381fa1290da6
[ "BSD-3-Clause" ]
null
null
null
from os import makedirs from os.path import exists from sys import argv def mkdir(): args = argv[1:] dirs = [] verbose = False create_intermediate = True while len(args) > 0: a = args.pop(0) if "-v" == a: verbose = True elif "-p" == a: # TODO: ? ...
20.76087
73
0.448168
5837a31b419fd2eb2fecca560f3b7a2d9c7ea344
801
py
Python
draco/programs.py
ShreyaBM/draco2
1b937b53c59a0821a4ed32a7380709e5b1798fe4
[ "MIT" ]
22
2020-11-17T18:46:59.000Z
2022-02-22T23:15:45.000Z
draco/programs.py
ShreyaBM/draco2
1b937b53c59a0821a4ed32a7380709e5b1798fe4
[ "MIT" ]
65
2020-12-02T21:51:48.000Z
2022-03-24T20:23:11.000Z
draco/programs.py
ShreyaBM/draco2
1b937b53c59a0821a4ed32a7380709e5b1798fe4
[ "MIT" ]
5
2020-11-20T05:36:28.000Z
2022-01-11T21:12:49.000Z
from dataclasses import dataclass from pathlib import Path from draco.asp_utils import Blocks, parse_blocks asp_path = Path(__file__).resolve().parent / "asp" @dataclass(frozen=True) class Program: """Class for an Answer Set Programming (ASP) program. Attributes: :program: The complete program. ...
24.272727
57
0.701623
0c54a06985d0ef817c355d6b5bafc5e2d9a2a0ba
2,233
py
Python
app/api/v2/models/sales_models.py
Deekerubo/Store-Manager-API
02ed2ce0c82d6854cc531a33a85bf9b8dff007fa
[ "MIT" ]
null
null
null
app/api/v2/models/sales_models.py
Deekerubo/Store-Manager-API
02ed2ce0c82d6854cc531a33a85bf9b8dff007fa
[ "MIT" ]
2
2018-12-10T12:03:16.000Z
2019-10-21T16:53:02.000Z
app/api/v2/models/sales_models.py
Deekerubo/Store-Manager-API
02ed2ce0c82d6854cc531a33a85bf9b8dff007fa
[ "MIT" ]
null
null
null
'''contains models for the app''' import os import psycopg2.extras from psycopg2 import sql from .basemodel import Basemodel from app.api.database import init_DB conn= init_DB() cursor = conn.cursor() class Sale(Basemodel): def __init__(self): super().__init__() def add_sale(self, sales_items, quant...
30.589041
100
0.553963
0447b25bbb2b2ae68eceaf05d42a755d4703fb42
3,550
py
Python
easy_rec/python/input/tfrecord_input.py
alibaba/EasyRec
436205f8480fa131d4b6e9d166b3ab85bd6b9d9d
[ "Apache-2.0" ]
285
2021-10-11T03:39:43.000Z
2022-03-31T09:12:33.000Z
easy_rec/python/input/tfrecord_input.py
alibaba/EasyRec
436205f8480fa131d4b6e9d166b3ab85bd6b9d9d
[ "Apache-2.0" ]
84
2021-10-15T03:48:58.000Z
2022-03-31T12:38:53.000Z
easy_rec/python/input/tfrecord_input.py
alibaba/EasyRec
436205f8480fa131d4b6e9d166b3ab85bd6b9d9d
[ "Apache-2.0" ]
71
2021-10-15T03:33:44.000Z
2022-03-31T08:37:11.000Z
# -*- encoding:utf-8 -*- # Copyright (c) Alibaba, Inc. and its affiliates. import logging import tensorflow as tf from easy_rec.python.input.input import Input from easy_rec.python.utils.tf_utils import get_tf_type if tf.__version__ >= '2.0': tf = tf.compat.v1 class TFRecordInput(Input): def __init__(self, ...
37.368421
80
0.661972
7031629af4908404917c54e64d7c698f0d47351b
3,698
py
Python
backend/apps/volontulo/tests/views/api/organizations/test_read.py
magul/volontulo
778168219e003b585604ee88cc54d03575bdc00e
[ "MIT" ]
16
2016-10-29T19:45:11.000Z
2021-04-23T03:54:22.000Z
backend/apps/volontulo/tests/views/api/organizations/test_read.py
magul/volontulo
778168219e003b585604ee88cc54d03575bdc00e
[ "MIT" ]
1,063
2016-10-28T17:43:39.000Z
2018-12-12T17:42:19.000Z
backend/apps/volontulo/tests/views/api/organizations/test_read.py
magul/volontulo
778168219e003b585604ee88cc54d03575bdc00e
[ "MIT" ]
60
2016-11-02T18:28:35.000Z
2018-11-07T17:01:05.000Z
""" .. module:: test_read """ from rest_framework import status from rest_framework.test import APITestCase from apps.volontulo.factories import OrganizationFactory from apps.volontulo.factories import UserFactory class _TestOrganizationsReadAPIView(APITestCase): """Tests for REST API's read organization view....
33.315315
79
0.695782
e7f2a75349f080e6ef9556951fc033879ae1e187
1,969
py
Python
application/api.py
DonBlaine/OpenDoorData
74740c6ff6dca893f0389963f2ef12de42a36829
[ "MIT" ]
null
null
null
application/api.py
DonBlaine/OpenDoorData
74740c6ff6dca893f0389963f2ef12de42a36829
[ "MIT" ]
null
null
null
application/api.py
DonBlaine/OpenDoorData
74740c6ff6dca893f0389963f2ef12de42a36829
[ "MIT" ]
null
null
null
# file that contains db models to be exposed via a REST API from models import room, survey, wifi_log, timetable, module # import db models from app import app # import Flask app from auth import auth # import Auth app to provide user authentificaiton from flask import request # import request object to parse json req...
39.38
145
0.739462
ddc801cb7f36547573640fd3ba477abc9d63bb64
594
py
Python
FinBoost/tree/__init__.py
VictorLi-QES/scikit-learn
40b5a835cf4174f008af794a19556958eba957db
[ "BSD-3-Clause" ]
null
null
null
FinBoost/tree/__init__.py
VictorLi-QES/scikit-learn
40b5a835cf4174f008af794a19556958eba957db
[ "BSD-3-Clause" ]
null
null
null
FinBoost/tree/__init__.py
VictorLi-QES/scikit-learn
40b5a835cf4174f008af794a19556958eba957db
[ "BSD-3-Clause" ]
null
null
null
""" The :mod:`FinBoost.tree` module includes decision tree-based models for classification and regression. """ from ._classes import BaseDecisionTree from ._classes import DecisionTreeClassifier from ._classes import DecisionTreeRegressor from ._classes import ExtraTreeClassifier from ._classes import ExtraTreeRegress...
25.826087
71
0.776094
fe762d644d52a8d50700de9b3421a6812c1ff7aa
5,079
py
Python
submissions/Ottenlips/mygames.py
WhittKinley/Legos
861a2651f481d0463003007694c895d3df3b0fee
[ "MIT" ]
null
null
null
submissions/Ottenlips/mygames.py
WhittKinley/Legos
861a2651f481d0463003007694c895d3df3b0fee
[ "MIT" ]
null
null
null
submissions/Ottenlips/mygames.py
WhittKinley/Legos
861a2651f481d0463003007694c895d3df3b0fee
[ "MIT" ]
null
null
null
from games import Game from math import nan, isnan from queue import PriorityQueue from copy import deepcopy from utils import isnumber from grading.util import print_table class GameState: def __init__(self, to_move, position, board, label=None): self.to_move = to_move self.position = position ...
26.731579
161
0.552865
3903f20fca20becad1439fdd1580eff0e0b15551
249
py
Python
ml_snek/models/base_model.py
joram/ml-snek
e1ed8aa831a4683dfe51a6af0cb25a44c3978903
[ "MIT" ]
null
null
null
ml_snek/models/base_model.py
joram/ml-snek
e1ed8aa831a4683dfe51a6af0cb25a44c3978903
[ "MIT" ]
13
2019-12-25T21:04:49.000Z
2020-01-04T20:25:05.000Z
ml_snek/models/base_model.py
joram/ml-snek
e1ed8aa831a4683dfe51a6af0cb25a44c3978903
[ "MIT" ]
null
null
null
class BaseModel(object): def save(self, save_path): raise NotImplementedError() def load(self, save_path): raise NotImplementedError() def train(self, input_values, expected_output): raise NotImplementedError()
24.9
51
0.686747
10efe27ac37122b887999fa50992a93f16c72bf3
4,146
py
Python
xarray/backends/pseudonetcdf_.py
ajwdewit/xarray
ff56e726f4b63a11cf8c5c6fac8f0a519c921fd8
[ "CC-BY-4.0", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
xarray/backends/pseudonetcdf_.py
ajwdewit/xarray
ff56e726f4b63a11cf8c5c6fac8f0a519c921fd8
[ "CC-BY-4.0", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
xarray/backends/pseudonetcdf_.py
ajwdewit/xarray
ff56e726f4b63a11cf8c5c6fac8f0a519c921fd8
[ "CC-BY-4.0", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "BSD-3-Clause" ]
1
2021-07-13T07:06:10.000Z
2021-07-13T07:06:10.000Z
import numpy as np from ..core import indexing from ..core.utils import Frozen, FrozenDict, close_on_error from ..core.variable import Variable from .common import AbstractDataStore, BackendArray from .file_manager import CachingFileManager from .locks import HDF5_LOCK, NETCDFC_LOCK, combine_locks, ensure_lock from .p...
29.197183
85
0.675591
86d8026087f66b8b443cf67a752f278e28b5dfb7
6,564
py
Python
HW3-2/lib/model.py
b05611038/MLDS_2019SPRING
0591a1a6f461da0a02b9e1b83f37ad3579f36f4d
[ "MIT" ]
3
2019-06-20T06:47:30.000Z
2021-11-05T03:16:37.000Z
HW3-2/lib/model.py
b05611038/MLDS_2019SPRING
0591a1a6f461da0a02b9e1b83f37ad3579f36f4d
[ "MIT" ]
null
null
null
HW3-2/lib/model.py
b05611038/MLDS_2019SPRING
0591a1a6f461da0a02b9e1b83f37ad3579f36f4d
[ "MIT" ]
null
null
null
import numpy as np import torch import torch.cuda as cuda import torch.nn as nn import torch.nn.functional as F from lib.utils import * def weights_init(model): class_name = model.__class__.__name__ if class_name.find('Conv') != -1: nn.init.normal_(model.weight.data, 0.0, 0.02) elif class_name.fin...
42.076923
160
0.591255
e46ae60556a70e200844e8ff422d78a1b36c08c2
238
py
Python
src/python/bin/args.py
matrix65537/xgo
f1b289cb5bb47a548a915223f9a32ef15299f8e7
[ "MIT" ]
null
null
null
src/python/bin/args.py
matrix65537/xgo
f1b289cb5bb47a548a915223f9a32ef15299f8e7
[ "MIT" ]
null
null
null
src/python/bin/args.py
matrix65537/xgo
f1b289cb5bb47a548a915223f9a32ef15299f8e7
[ "MIT" ]
null
null
null
#!/usr/bin/env python #codign:utf-8 import sys import os def main(): print sys.argv data = sys.stdin.read() length = len(data) if length > 0: print "length = %d" %(length) if __name__ == '__main__': main()
14
37
0.584034
b6274123ce1d52b7feba9223f8f2dc97797eb23f
4,345
py
Python
ddtrace/contrib/logging/patch.py
p7g/dd-trace-py
141ac0ab6e9962e3b3bafc9de172076075289a19
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
ddtrace/contrib/logging/patch.py
p7g/dd-trace-py
141ac0ab6e9962e3b3bafc9de172076075289a19
[ "Apache-2.0", "BSD-3-Clause" ]
3
2022-02-16T09:35:37.000Z
2022-03-04T16:48:45.000Z
ddtrace/contrib/logging/patch.py
p7g/dd-trace-py
141ac0ab6e9962e3b3bafc9de172076075289a19
[ "Apache-2.0", "BSD-3-Clause" ]
1
2022-02-11T16:34:22.000Z
2022-02-11T16:34:22.000Z
import logging import attr import ddtrace from ...internal.utils import get_argument_value from ...vendor.wrapt import wrap_function_wrapper as _w from ..trace_utils import unwrap as _u RECORD_ATTR_TRACE_ID = "dd.trace_id" RECORD_ATTR_SPAN_ID = "dd.span_id" RECORD_ATTR_ENV = "dd.env" RECORD_ATTR_VERSION = "dd.vers...
33.423077
98
0.695052
17e40efb1568d97a31b8a25a292ee079e552f819
1,607
py
Python
functions/sample/python/get_review.py
kirankumarsripati/agfzb-CloudAppDevelopment_Capstone
0155976113bed72b5081fdb545246641e7c2ea0d
[ "Apache-2.0" ]
null
null
null
functions/sample/python/get_review.py
kirankumarsripati/agfzb-CloudAppDevelopment_Capstone
0155976113bed72b5081fdb545246641e7c2ea0d
[ "Apache-2.0" ]
null
null
null
functions/sample/python/get_review.py
kirankumarsripati/agfzb-CloudAppDevelopment_Capstone
0155976113bed72b5081fdb545246641e7c2ea0d
[ "Apache-2.0" ]
null
null
null
# # # main() will be run when you invoke this action # # @param Cloud Functions actions accept a single parameter, which must be a JSON object. # # @return The output of this action, which must be a JSON object. # # from cloudant.client import Cloudant from cloudant.error import CloudantException import requests field...
31.509804
102
0.632234
1082fa34925048bb5583f013bf61ae4cc897c7f2
1,445
py
Python
lib/datasets/utils.py
kacel33/ActionAI_PC
a0528f49ea61cc07d7c1e9a3cd6846e5f50cfae7
[ "MIT" ]
1,311
2017-03-28T09:24:20.000Z
2022-03-30T02:43:11.000Z
lib/datasets/utils.py
kacel33/ActionAI_PC
a0528f49ea61cc07d7c1e9a3cd6846e5f50cfae7
[ "MIT" ]
144
2017-05-09T16:35:40.000Z
2022-03-25T03:14:42.000Z
lib/datasets/utils.py
kacel33/ActionAI_PC
a0528f49ea61cc07d7c1e9a3cd6846e5f50cfae7
[ "MIT" ]
437
2017-03-30T15:23:14.000Z
2022-03-25T09:18:50.000Z
import functools import math import numpy as np from .coco import COCO_KEYPOINTS, HFLIP def horizontal_swap_coco(keypoints): target = np.zeros(keypoints.shape) for source_i, xyv in enumerate(keypoints): source_name = COCO_KEYPOINTS[source_i] target_name = HFLIP.get(source_name) if ta...
26.272727
93
0.613149
aceb7a9ef2afd3c1472a71d88a0574be54fe332f
9,660
py
Python
part3/SpaceSciencePython_part3.py
ajpmaclean/SpaceScienceTutorial
ceddc5b3c3aa035ddc6c12b987a95c06b02ffe41
[ "MIT" ]
167
2020-04-21T21:04:14.000Z
2022-03-29T15:07:52.000Z
part3/SpaceSciencePython_part3.py
ajpmaclean/SpaceScienceTutorial
ceddc5b3c3aa035ddc6c12b987a95c06b02ffe41
[ "MIT" ]
11
2020-05-19T18:49:24.000Z
2021-06-08T01:51:29.000Z
part3/SpaceSciencePython_part3.py
ajpmaclean/SpaceScienceTutorial
ceddc5b3c3aa035ddc6c12b987a95c06b02ffe41
[ "MIT" ]
41
2020-05-03T06:13:17.000Z
2022-02-12T17:32:51.000Z
# Import modules import datetime import spiceypy import numpy as np import pandas as pd # Load the SPICE kernels via a meta file spiceypy.furnsh('kernel_meta.txt') # We want to compute miscellaneous positions w.r.t. the centre of # the Sun for a certain time interval. # First, we set an initial time in UTC. INIT_TIME...
40.25
79
0.649896
2c9ce9a473d58efa1b9a1d8bda61080d6bd0e086
19,650
py
Python
hydrus/client/ClientExporting.py
ReAnzu/hydrus
069f77e1941d13b3bdd969aeeffd7ae003fcb71e
[ "WTFPL" ]
1
2021-02-24T22:12:30.000Z
2021-02-24T22:12:30.000Z
hydrus/client/ClientExporting.py
ReAnzu/hydrus
069f77e1941d13b3bdd969aeeffd7ae003fcb71e
[ "WTFPL" ]
null
null
null
hydrus/client/ClientExporting.py
ReAnzu/hydrus
069f77e1941d13b3bdd969aeeffd7ae003fcb71e
[ "WTFPL" ]
null
null
null
import os import re from hydrus.core import HydrusConstants as HC from hydrus.core import HydrusData from hydrus.core import HydrusExceptions from hydrus.core import HydrusGlobals as HG from hydrus.core import HydrusPaths from hydrus.core import HydrusSerialisable from hydrus.core import HydrusTags from hydrus.core im...
33.589744
276
0.51659
482c3e1d4897f51913108281e5b45d4f7b358148
32
py
Python
training_utils/scouter/torchcam/version.py
conscienceli/node21_detection_baseline
d9eadaf1b0a81320b5c38d8b8a74eec86aa0d80a
[ "Apache-2.0" ]
null
null
null
training_utils/scouter/torchcam/version.py
conscienceli/node21_detection_baseline
d9eadaf1b0a81320b5c38d8b8a74eec86aa0d80a
[ "Apache-2.0" ]
null
null
null
training_utils/scouter/torchcam/version.py
conscienceli/node21_detection_baseline
d9eadaf1b0a81320b5c38d8b8a74eec86aa0d80a
[ "Apache-2.0" ]
null
null
null
__version__ = '0.1.2a0+6dd7a75'
16
31
0.71875
a478bcee271f8207b494b65feac57c7a0f6bee83
1,934
py
Python
tests/utils_test.py
DarrenZhang01/Neural_Tangents_TensorFlow
2fd360c8b1b8c9106044034f6a8b5c2734db9c3d
[ "Apache-2.0" ]
4
2020-12-25T17:37:13.000Z
2022-01-03T17:00:23.000Z
tests/utils_test.py
DarrenZhang01/TensorFlow_GSoC
2fd360c8b1b8c9106044034f6a8b5c2734db9c3d
[ "Apache-2.0" ]
33
2020-07-18T18:57:54.000Z
2020-08-17T13:58:46.000Z
tests/utils_test.py
DarrenZhang01/Neural_Tangents_TensorFlow
2fd360c8b1b8c9106044034f6a8b5c2734db9c3d
[ "Apache-2.0" ]
1
2021-08-16T19:00:06.000Z
2021-08-16T19:00:06.000Z
# Copyright 2019 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 or agreed to in writing, ...
31.193548
76
0.698035
dc66b0005b281fbe20c1aeec0bf8f879e72821a6
2,489
py
Python
Codeforces/GYM/RE/2019-20 ICPC Regional Hong Kong #1/gen.py
Mindjolt2406/Competitive-Programming
d000d98bf7005ee4fb809bcea2f110e4c4793b80
[ "MIT" ]
2
2018-12-11T14:37:24.000Z
2022-01-23T18:11:54.000Z
Codeforces/GYM/RE/2019-20 ICPC Regional Hong Kong #1/gen.py
Mindjolt2406/Competitive-Programming
d000d98bf7005ee4fb809bcea2f110e4c4793b80
[ "MIT" ]
null
null
null
Codeforces/GYM/RE/2019-20 ICPC Regional Hong Kong #1/gen.py
Mindjolt2406/Competitive-Programming
d000d98bf7005ee4fb809bcea2f110e4c4793b80
[ "MIT" ]
null
null
null
from random import * ''' Generate a random array of integers with elements in the range [L, R] ''' def genRandomArray(N, L, R): a = [randrange(L,R+1) for _ in xrange(N)] return a ''' Generate a random string from characters in the range [A, B]''' def genRandomString(N, A, B): l = genRandomArray(N, ord(A), ord(B)) ...
20.741667
79
0.624749
e100541feb52193c0f2aa675682c8e19638053b6
4,648
py
Python
jina_cli/api.py
sthagen/jina-ai-jina
a854da4f7cbafcf5d699a505dacfa4f27014fb62
[ "Apache-2.0" ]
null
null
null
jina_cli/api.py
sthagen/jina-ai-jina
a854da4f7cbafcf5d699a505dacfa4f27014fb62
[ "Apache-2.0" ]
null
null
null
jina_cli/api.py
sthagen/jina-ai-jina
a854da4f7cbafcf5d699a505dacfa4f27014fb62
[ "Apache-2.0" ]
null
null
null
from typing import TYPE_CHECKING if TYPE_CHECKING: from argparse import Namespace def deployment(args: 'Namespace'): """ Start a Deployment :param args: arguments coming from the CLI. """ from jina.orchestrate.deployments import Deployment try: with Deployment(args) as d: ...
23.009901
118
0.644793
685f0eacf95be0bb7f197e04df49fb0ce10d4bac
7,348
py
Python
CodonSubstitution/build/biopython/Bio/PopGen/GenePop/__init__.py
JackCurragh/DARNED
13963d129bd8f69fb1106ad1f47394b3211a939c
[ "MIT" ]
37
2015-02-24T18:58:30.000Z
2021-03-07T21:22:18.000Z
CodonSubstitution/build/biopython/Bio/PopGen/GenePop/__init__.py
JackCurragh/DARNED
13963d129bd8f69fb1106ad1f47394b3211a939c
[ "MIT" ]
12
2016-06-09T21:57:00.000Z
2020-09-11T18:48:51.000Z
CodonSubstitution/build/biopython/Bio/PopGen/GenePop/__init__.py
JackCurragh/DARNED
13963d129bd8f69fb1106ad1f47394b3211a939c
[ "MIT" ]
19
2016-03-26T08:15:17.000Z
2021-04-12T05:03:29.000Z
# Copyright 2007 by Tiago Antao. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """ This module provides code to work with GenePop. See http://wbiomed.curtin.edu.au/genepop/ ,...
33.248869
87
0.557431
a7b8a1ea3eb533f5e79edc8d2757a1632162630d
78,878
py
Python
infra/libs/buildbucket/proto/rpc_prpc_pb2.py
xinghun61/infra
b5d4783f99461438ca9e6a477535617fadab6ba3
[ "BSD-3-Clause" ]
2
2021-04-13T21:22:18.000Z
2021-09-07T02:11:57.000Z
infra/libs/buildbucket/proto/rpc_prpc_pb2.py
xinghun61/infra
b5d4783f99461438ca9e6a477535617fadab6ba3
[ "BSD-3-Clause" ]
16
2020-09-07T11:55:09.000Z
2022-03-02T05:47:58.000Z
infra/libs/buildbucket/proto/rpc_prpc_pb2.py
xinghun61/infra
b5d4783f99461438ca9e6a477535617fadab6ba3
[ "BSD-3-Clause" ]
null
null
null
# Generated by the pRPC protocol buffer compiler plugin. DO NOT EDIT! # source: rpc.proto import base64 import zlib from google.protobuf import descriptor_pb2 # Includes description of the rpc.proto and all of its transitive # dependencies. Includes source code info. FILE_DESCRIPTOR_SET = descriptor_pb2.FileDescrip...
79.514113
80
0.883783
2248bca54a31a5b38410001e034b4c337a0df547
1,358
py
Python
18-05-05-Apache-Spark-with-Python-Big-Data-with-PySpark-and-Spark/4_Pair_RDD/4_AirportsUppercaseProblem.py
maraboinavamshi/courses
48f255ffb1903ba20865c2b91b488758d5cb1a09
[ "Apache-2.0" ]
15
2017-09-19T08:09:01.000Z
2019-04-29T00:37:51.000Z
18-05-05-Apache-Spark-with-Python-Big-Data-with-PySpark-and-Spark/4_Pair_RDD/4_AirportsUppercaseProblem.py
chitrita/Courses-1
7713267ee5c92e488086588ac41490c44b4f7350
[ "Apache-2.0" ]
null
null
null
18-05-05-Apache-Spark-with-Python-Big-Data-with-PySpark-and-Spark/4_Pair_RDD/4_AirportsUppercaseProblem.py
chitrita/Courses-1
7713267ee5c92e488086588ac41490c44b4f7350
[ "Apache-2.0" ]
17
2018-02-27T03:15:54.000Z
2019-04-24T09:26:46.000Z
''' Create a Spark program to read the airport data from in/airports.text, generate a pair RDD with airport name being the key and country name being the value. Then convert the country name to uppercase and output the pair RDD to out/airports_uppercase.text Each row of the input file contains the following columns: ...
31.581395
108
0.717231
158e7db4cd83b61167706c5c659ee60939e7ccfa
1,211
py
Python
spo/spo/report/alle_anfragen/alle_anfragen.py
libracore/spo
c6617a4624d683e27ee3fde745313c30504f3fd1
[ "MIT" ]
null
null
null
spo/spo/report/alle_anfragen/alle_anfragen.py
libracore/spo
c6617a4624d683e27ee3fde745313c30504f3fd1
[ "MIT" ]
6
2019-08-23T18:36:26.000Z
2019-11-12T13:12:12.000Z
spo/spo/report/alle_anfragen/alle_anfragen.py
libracore/spo
efff6da53a776c4483f06d9ef1acc8a7aa96b28e
[ "MIT" ]
1
2021-08-14T22:22:43.000Z
2021-08-14T22:22:43.000Z
# Copyright (c) 2013, libracore and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ def execute(filters=None): columns, data = [ {"label": _("Anfrage"), "fieldname": "id", "fieldtype": "Link", "options": "Anfrage"}, {"label...
52.652174
179
0.662263
530a683c02f9d1ac59d6d8ce98f047f271af8668
137,717
py
Python
pandas/tests/test_resample.py
The-Interns/pandas
d864cde5db3126fef258646e94fc621edb75d736
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/test_resample.py
The-Interns/pandas
d864cde5db3126fef258646e94fc621edb75d736
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/test_resample.py
The-Interns/pandas
d864cde5db3126fef258646e94fc621edb75d736
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
# pylint: disable=E1101 from warnings import catch_warnings from datetime import datetime, timedelta from functools import partial from textwrap import dedent from operator import methodcaller import pytz import pytest import dateutil import numpy as np from pandas._libs.tslibs.period import IncompatibleFrequency fr...
39.55112
79
0.535954
7d40576b22bc776c7186de9f450f573f6bf7ae88
1,718
py
Python
jp.atcoder/abc016/abc016_1/21878992.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc016/abc016_1/21878992.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc016/abc016_1/21878992.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import Generator, NoReturn class StdReader: def __init__( self, ) -> NoReturn: import sys self.buf = sys.stdin.buffer self.lines = self.async_readlines() self.chunks: Generator def async_readlines( self, ...
16.361905
43
0.485448
31009814631d33c2e57bcf019bdba6446cab7edb
387
py
Python
mymap/mymap/wsgi.py
silveiratcl/teste_GeoDjango
02f3566ae26f8538b2fe3f50045d4c619ff79ced
[ "PostgreSQL" ]
null
null
null
mymap/mymap/wsgi.py
silveiratcl/teste_GeoDjango
02f3566ae26f8538b2fe3f50045d4c619ff79ced
[ "PostgreSQL" ]
null
null
null
mymap/mymap/wsgi.py
silveiratcl/teste_GeoDjango
02f3566ae26f8538b2fe3f50045d4c619ff79ced
[ "PostgreSQL" ]
null
null
null
""" WSGI config for mymap project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTING...
22.764706
78
0.782946
c8fded3a6fd93d5e7ce6b551f4029d64a77efd8d
29,463
py
Python
ads/ads.py
adamcath/ads
12078a28d108811a3a90a937a3fca2ba83462e72
[ "MIT" ]
15
2016-04-10T06:28:31.000Z
2020-12-01T17:41:20.000Z
ads/ads.py
adamcath/ads
12078a28d108811a3a90a937a3fca2ba83462e72
[ "MIT" ]
33
2015-02-23T02:00:42.000Z
2018-06-04T16:28:45.000Z
ads/ads.py
adamcath/ads
12078a28d108811a3a90a937a3fca2ba83462e72
[ "MIT" ]
6
2015-07-06T18:02:04.000Z
2018-04-22T02:37:45.000Z
import sys class colors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' def debug(msg): print(colors.OKBLUE + msg + colors.ENDC) sys.stdout.flush() def info(msg): ...
29.881339
80
0.597292
f5d47ed24a34da8a8c4705011de24e906e67be1a
2,657
py
Python
core/cost/HMLogLikelihood.py
szokejokepu/natural-rws
bb1ad4ca3ec714e6bf071d2136593dc853492b68
[ "MIT" ]
null
null
null
core/cost/HMLogLikelihood.py
szokejokepu/natural-rws
bb1ad4ca3ec714e6bf071d2136593dc853492b68
[ "MIT" ]
null
null
null
core/cost/HMLogLikelihood.py
szokejokepu/natural-rws
bb1ad4ca3ec714e6bf071d2136593dc853492b68
[ "MIT" ]
null
null
null
import tensorflow as tf from core.argo.core.network.AbstractModule import AbstractModule class HMLogLikelihood(AbstractModule): def __init__(self, name="HMLL"): super().__init__(name = name) def create_id(self, cost_fuction_kwargs): _id = "HMLL" return _id def _bu...
39.073529
183
0.64697
23d493093cc08dcc5c1ef9c7fae565054095db95
173
py
Python
vulture/whitelists/argparse_whitelist.py
kianmeng/vulture
b8cbc44dac89b2a96f6da7033424f52525d6f574
[ "MIT" ]
2,081
2017-03-06T14:45:21.000Z
2022-03-31T13:29:34.000Z
vulture/whitelists/argparse_whitelist.py
kianmeng/vulture
b8cbc44dac89b2a96f6da7033424f52525d6f574
[ "MIT" ]
248
2017-03-06T12:13:37.000Z
2022-03-15T11:21:27.000Z
vulture/whitelists/argparse_whitelist.py
kianmeng/vulture
b8cbc44dac89b2a96f6da7033424f52525d6f574
[ "MIT" ]
111
2017-03-06T20:48:04.000Z
2022-03-17T09:49:32.000Z
import argparse argparse.ArgumentParser().epilog argparse.ArgumentDefaultsHelpFormatter("prog")._fill_text argparse.ArgumentDefaultsHelpFormatter("prog")._get_help_string
24.714286
63
0.867052
98c7ebf6e12a5b877dbec1df6576215b08ea9a41
341
py
Python
valitor_python/errors.py
overcastsoftware/python-valitor
537e924c783474009e70f44c1a6aab4ed0df0ba1
[ "BSD-2-Clause" ]
1
2020-12-25T19:02:44.000Z
2020-12-25T19:02:44.000Z
valitor_python/errors.py
overcastsoftware/python-valitor
537e924c783474009e70f44c1a6aab4ed0df0ba1
[ "BSD-2-Clause" ]
null
null
null
valitor_python/errors.py
overcastsoftware/python-valitor
537e924c783474009e70f44c1a6aab4ed0df0ba1
[ "BSD-2-Clause" ]
null
null
null
class ValitorException(Exception): def __init__(self, number, message, log_id): print(number, message, log_id) self.number = number self.message = message self.log_id = log_id class ValitorPayException(Exception): def __init__(self, message): print(message) se...
22.733333
48
0.653959
daa5e43f97a37783706ea1b6abee2d99ebe92315
26,602
py
Python
fmsync2/core/FlowmonDDD.py
progress/Flowmon-Various-Scripts
e21d6334366eae3af7a1a8bf2f5735e1460d2aa0
[ "Apache-2.0" ]
null
null
null
fmsync2/core/FlowmonDDD.py
progress/Flowmon-Various-Scripts
e21d6334366eae3af7a1a8bf2f5735e1460d2aa0
[ "Apache-2.0" ]
null
null
null
fmsync2/core/FlowmonDDD.py
progress/Flowmon-Various-Scripts
e21d6334366eae3af7a1a8bf2f5735e1460d2aa0
[ "Apache-2.0" ]
null
null
null
from core.FlowmonREST import FlowmonREST import requests import logging import json class FlowmonDDD: def __init__(self, app, rest): self.rest = rest self.app = app # Return information about Groups def get_groups(self): r = requests.get(self.rest._url('/rest/iad/groups/'), ...
43.89769
118
0.561311
3bf3f21eb50a90d8cfa10a90860924be67a47fc5
7,649
py
Python
maskrcnn_benchmark/modeling/rpn/inference.py
huttzza/maskrcnn-benchmark
d15971e4b602bb71e5494ce8973293fedf202e58
[ "MIT" ]
236
2019-02-26T03:18:31.000Z
2022-03-30T07:02:59.000Z
maskrcnn_benchmark/modeling/rpn/inference.py
huttzza/maskrcnn-benchmark
d15971e4b602bb71e5494ce8973293fedf202e58
[ "MIT" ]
35
2019-10-15T14:45:12.000Z
2022-03-31T10:10:56.000Z
maskrcnn_benchmark/modeling/rpn/inference.py
huttzza/maskrcnn-benchmark
d15971e4b602bb71e5494ce8973293fedf202e58
[ "MIT" ]
60
2019-10-08T00:34:37.000Z
2022-03-17T14:29:58.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch from maskrcnn_benchmark.modeling.box_coder import BoxCoder from maskrcnn_benchmark.structures.bounding_box import BoxList from maskrcnn_benchmark.structures.boxlist_ops import cat_boxlist from maskrcnn_benchmark.structures.boxlist_ops...
37.312195
102
0.6359
65a4c461e75b03102fe2a747926ce0cd3ee2903e
242
py
Python
src/netbox_example/__init__.py
steffann/netbox-example-plugin
9f1c22ae60bb21e7d4685219eb76687c62f0161e
[ "Apache-2.0" ]
4
2020-01-19T04:14:07.000Z
2020-06-03T17:36:19.000Z
src/netbox_example/__init__.py
steffann/netbox-example-plugin
9f1c22ae60bb21e7d4685219eb76687c62f0161e
[ "Apache-2.0" ]
null
null
null
src/netbox_example/__init__.py
steffann/netbox-example-plugin
9f1c22ae60bb21e7d4685219eb76687c62f0161e
[ "Apache-2.0" ]
1
2020-09-17T17:02:43.000Z
2020-09-17T17:02:43.000Z
default_app_config = 'netbox_example.apps.NetboxExampleConfig' # NetBox plugin options netbox_version = '~= 2.6.9' extra_installed_apps = [] extra_menus = ['example'] required_configuration_settings = [] default_configuration_settings = {}
24.2
62
0.785124
95ac1f8df3d0220aec4629ca930112f77e5762ee
4,731
py
Python
gmail_yaml_filters/main.py
spacezorro/gmail-yaml-filters
f1652b77397b39319bec5f86e0ccba6159efff56
[ "MIT" ]
null
null
null
gmail_yaml_filters/main.py
spacezorro/gmail-yaml-filters
f1652b77397b39319bec5f86e0ccba6159efff56
[ "MIT" ]
null
null
null
gmail_yaml_filters/main.py
spacezorro/gmail-yaml-filters
f1652b77397b39319bec5f86e0ccba6159efff56
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import print_function from lxml import etree import argparse import os import re import sys import yaml from .ruleset import RuleSet from .ruleset import ruleset_to_etree from .upload import get_gmail_credentials f...
38.153226
113
0.686747
82099016a27029ec60f79ab18051557e53f0f36e
16,641
py
Python
mlrun/api/db/sqldb/models/models_mysql.py
AlxZed/mlrun
4b8fe3dec07764672664f33ac6161e14078c822b
[ "Apache-2.0" ]
null
null
null
mlrun/api/db/sqldb/models/models_mysql.py
AlxZed/mlrun
4b8fe3dec07764672664f33ac6161e14078c822b
[ "Apache-2.0" ]
null
null
null
mlrun/api/db/sqldb/models/models_mysql.py
AlxZed/mlrun
4b8fe3dec07764672664f33ac6161e14078c822b
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Iguazio # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwa...
37.820455
119
0.658073
ca2c845fb49890b2270a65c3ff5fe76bc4c20d31
1,103
py
Python
server/quizes/views.py
nickdotreid/opioid-mat-decision-aid
bbc2a0d8931d59cd6ab64b0b845e88c8dc1af5d1
[ "MIT" ]
null
null
null
server/quizes/views.py
nickdotreid/opioid-mat-decision-aid
bbc2a0d8931d59cd6ab64b0b845e88c8dc1af5d1
[ "MIT" ]
27
2018-09-30T07:59:21.000Z
2020-11-05T19:25:41.000Z
server/quizes/views.py
nickdotreid/opioid-mat-decision-aid
bbc2a0d8931d59cd6ab64b0b845e88c8dc1af5d1
[ "MIT" ]
null
null
null
from django.shortcuts import render from rest_framework import serializers from rest_framework.response import Response from rest_framework.views import APIView from .models import Quiz class QuizSerializer(serializers.ModelSerializer): class Meta: model = Quiz fields = ('slug', 'title', 'descrip...
30.638889
72
0.514959
d4a2cffc4ff29d5cb5b66d9083b2e9d36b441377
3,200
py
Python
examples/pybullet/gym/pybullet_utils/system_state.py
caffett/bullet3
1e125425141967f8a7c99be46216ddeed7acf24d
[ "Zlib" ]
null
null
null
examples/pybullet/gym/pybullet_utils/system_state.py
caffett/bullet3
1e125425141967f8a7c99be46216ddeed7acf24d
[ "Zlib" ]
null
null
null
examples/pybullet/gym/pybullet_utils/system_state.py
caffett/bullet3
1e125425141967f8a7c99be46216ddeed7acf24d
[ "Zlib" ]
null
null
null
# -*- coding: utf-8 -*- # ------------------------------- # Author: Zikang Xiong # Email: zikangxiong@gmail.com # Date: 2020-03-15 13:32:20 # Last Modified by: Zikang Xiong # Last Modified time: 2020-03-16 00:15:14 # ------------------------------- # Get states of all bodies and joints and reset them to specific st...
32
115
0.641563
f10315d4c25b3c98a93abcd0bdced843f3e3593c
6,317
py
Python
taskmon/dbmodels.py
fractal520/dbops
20c6b6b5669e09b43cd19e6f3fa0448bc7d5eaac
[ "MIT" ]
null
null
null
taskmon/dbmodels.py
fractal520/dbops
20c6b6b5669e09b43cd19e6f3fa0448bc7d5eaac
[ "MIT" ]
null
null
null
taskmon/dbmodels.py
fractal520/dbops
20c6b6b5669e09b43cd19e6f3fa0448bc7d5eaac
[ "MIT" ]
null
null
null
import sqlalchemy as sa from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.dialects.mysql.base import INTEGER from sqlalchemy.orm import sessionmaker, relationship from datetime import datetime Base = declarative_base() conn = sa.create_engine('mysql+pymysql://opr:Opr*1234@127.0.0.1/dbops') Sessi...
40.754839
109
0.723286
c4a435ab4e16392d2888929b94d0cc4a041cfdce
2,677
py
Python
ObstacleAvoidance/server_depth.py
alexvbogdan/Assistant-for-People-with-Low-Vision
2c8d60a857a63ce516f33263e61313a3bad0695f
[ "MIT" ]
1
2020-08-21T07:35:54.000Z
2020-08-21T07:35:54.000Z
ObstacleAvoidance/server_depth.py
alexvbogdan/Assistant-for-People-with-Low-Vision
2c8d60a857a63ce516f33263e61313a3bad0695f
[ "MIT" ]
null
null
null
ObstacleAvoidance/server_depth.py
alexvbogdan/Assistant-for-People-with-Low-Vision
2c8d60a857a63ce516f33263e61313a3bad0695f
[ "MIT" ]
null
null
null
from __future__ import print_function from flask import Flask, request, redirect, url_for, jsonify, send_from_directory from time import time import time import hashlib import os import sys import imp import pdb import cv2 from build import Depth_extraction UPLOAD_FOLDER = '/home/oleg/server_assembly/depth/uploads/ori...
30.770115
98
0.688457
a7069da47227cb14699b241dd2ac885815ad64e6
1,734
py
Python
code/actions/github.py
lpmatos/corona-tracker
ac4e28e6d2f91b2b5859b9900e3e92a5f1cdeacc
[ "MIT" ]
1
2020-03-19T18:34:30.000Z
2020-03-19T18:34:30.000Z
code/actions/github.py
lpmatos/corona-tracker
ac4e28e6d2f91b2b5859b9900e3e92a5f1cdeacc
[ "MIT" ]
null
null
null
code/actions/github.py
lpmatos/corona-tracker
ac4e28e6d2f91b2b5859b9900e3e92a5f1cdeacc
[ "MIT" ]
null
null
null
# ============================================================================= # IMPORTS # ============================================================================= import csv import requests from cachetools import cached, TTLCache # ============================================================================= #...
38.533333
105
0.502307
c1bbb0f54468169c736a51e88e56c5a7c092294c
578
py
Python
db/do_sqlite.py
LaurenceYang/learn-python
819994039abd3af298f73b1a73976eaa95071096
[ "Apache-2.0" ]
2
2018-01-20T03:38:58.000Z
2019-07-21T11:33:24.000Z
db/do_sqlite.py
LaurenceYang/learn-python
819994039abd3af298f73b1a73976eaa95071096
[ "Apache-2.0" ]
null
null
null
db/do_sqlite.py
LaurenceYang/learn-python
819994039abd3af298f73b1a73976eaa95071096
[ "Apache-2.0" ]
null
null
null
import sqlite3 conn = sqlite3.connect('test.db') cursor = conn.cursor() cursor.execute('create table if not EXISTS user (id VARCHAR(20) PRIMARY key, name VARCHAR(20))') cursor.execute('insert into user (id, name) VALUES (\'3\', \'xiaoxiao\')') print('rowcount =', cursor.rowcount) cursor.close() conn.commit() co...
20.642857
96
0.693772
5e4d6445dc7b246adc52993f9f8fcb1777ef3118
1,699
py
Python
tests/test_extend_trace_selectively.py
bcliang/dash-extendable-graph
5163f551d0e4b1c8ec283d903d58691241c84e51
[ "MIT" ]
13
2019-03-14T21:21:17.000Z
2021-12-23T08:32:41.000Z
tests/test_extend_trace_selectively.py
bcliang/dash-extendable-graph
5163f551d0e4b1c8ec283d903d58691241c84e51
[ "MIT" ]
43
2019-01-27T17:33:07.000Z
2022-01-20T21:07:10.000Z
tests/test_extend_trace_selectively.py
bcliang/dash-extendable-graph
5163f551d0e4b1c8ec283d903d58691241c84e51
[ "MIT" ]
1
2020-06-19T14:38:26.000Z
2020-06-19T14:38:26.000Z
import dash_extendable_graph as deg import dash from dash.dependencies import Input, Output, State from dash.exceptions import PreventUpdate import dash_html_components as html import dash_core_components as dcc import json # extending a specific trace (trace indices) def test_extg004_extend_trace_selectively(dash_d...
29.293103
66
0.623308
2c1150a3238057491c5cae7cb0e00ec4942b3592
933
py
Python
4 - manipulating dataframes with pandas/Grouping data/computing multiple aggregates of multiple columns.py
Baidaly/datacamp-samples
09b3e253ec2c503df936298fedc3902413c987b0
[ "MIT" ]
null
null
null
4 - manipulating dataframes with pandas/Grouping data/computing multiple aggregates of multiple columns.py
Baidaly/datacamp-samples
09b3e253ec2c503df936298fedc3902413c987b0
[ "MIT" ]
null
null
null
4 - manipulating dataframes with pandas/Grouping data/computing multiple aggregates of multiple columns.py
Baidaly/datacamp-samples
09b3e253ec2c503df936298fedc3902413c987b0
[ "MIT" ]
null
null
null
''' The .agg() method can be used with a tuple or list of aggregations as input. When applying multiple aggregations on multiple columns, the aggregated DataFrame has a multi-level column index. In this exercise, you're going to group passengers on the Titanic by 'pclass' and aggregate the 'age' and 'fare' columns by ...
42.409091
271
0.73955
6a05ac9e0f9263a9267a3e7b85141fca121ab7a0
1,168
py
Python
bootstrapvz/providers/virtualbox/__init__.py
qqshfox/bootstrap-vz
38fc7c52407d015d3c75867bfea266d0aec6d7e2
[ "Apache-2.0" ]
1
2019-06-11T17:36:37.000Z
2019-06-11T17:36:37.000Z
bootstrapvz/providers/virtualbox/__init__.py
qqshfox/bootstrap-vz
38fc7c52407d015d3c75867bfea266d0aec6d7e2
[ "Apache-2.0" ]
3
2017-05-10T15:04:10.000Z
2017-06-02T18:14:50.000Z
bootstrapvz/providers/virtualbox/__init__.py
qqshfox/bootstrap-vz
38fc7c52407d015d3c75867bfea266d0aec6d7e2
[ "Apache-2.0" ]
14
2016-12-15T09:29:10.000Z
2021-01-28T13:06:14.000Z
from bootstrapvz.common import task_groups import tasks.packages import tasks.boot from bootstrapvz.common.tasks import image from bootstrapvz.common.tasks import loopback def validate_manifest(data, validator, error): from bootstrapvz.common.tools import rel_path validator(data, rel_path(__file__, 'manifest-...
35.393939
71
0.695205
6b5c5576ebe707b3e567bd57c13d786b8448e7b3
12,148
py
Python
fem/utilities/tables/empty_table/_empty_table.py
mjredmond/FEMApp
dd8cc53acf80d0a1bb83ce9c89bcfd51e85c6be8
[ "MIT" ]
1
2019-08-03T21:40:26.000Z
2019-08-03T21:40:26.000Z
fem/utilities/tables/empty_table/_empty_table.py
mjredmond/FEMApp
dd8cc53acf80d0a1bb83ce9c89bcfd51e85c6be8
[ "MIT" ]
null
null
null
fem/utilities/tables/empty_table/_empty_table.py
mjredmond/FEMApp
dd8cc53acf80d0a1bb83ce9c89bcfd51e85c6be8
[ "MIT" ]
null
null
null
""" fem.utilities.tables.abstract_table._abstract_table Author: Michael Redmond """ from __future__ import print_function, absolute_import from six.moves import range from qtpy import QtCore, QtWidgets, QtGui from fem.utilities import MrSignal from operator import itemgetter import numpy as np class EmptyTable...
27.990783
89
0.615904
99679b8e5d081577d74f03ebf3e963ad1f790475
3,277
py
Python
mvn/models/loss.py
kristijanbartol/learnable-triangulation-pytorch
a8475847f9c71119fa557aad4328b326be09c136
[ "MIT" ]
null
null
null
mvn/models/loss.py
kristijanbartol/learnable-triangulation-pytorch
a8475847f9c71119fa557aad4328b326be09c136
[ "MIT" ]
null
null
null
mvn/models/loss.py
kristijanbartol/learnable-triangulation-pytorch
a8475847f9c71119fa557aad4328b326be09c136
[ "MIT" ]
null
null
null
import numpy as np import torch from torch import nn def expand_tensor(t, n_view_comb): return torch.transpose(t.repeat((n_view_comb, 1, 1, 1)), 0, 1) class KeypointsMSELoss(nn.Module): def __init__(self): super().__init__() def forward(self, keypoints_pred, keypoints_gt, keypoints_binary_vali...
38.104651
125
0.67043
2cba0711b36025d07e50f93603ca709439bc6527
7,796
py
Python
python_modules/dagster/dagster/core/types/runtime/config_schema.py
david-alexander-white/dagster
1c341500bb2380e14873b59b7e25503270188bda
[ "Apache-2.0" ]
1
2022-02-07T18:07:36.000Z
2022-02-07T18:07:36.000Z
python_modules/dagster/dagster/core/types/runtime/config_schema.py
david-alexander-white/dagster
1c341500bb2380e14873b59b7e25503270188bda
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/types/runtime/config_schema.py
david-alexander-white/dagster
1c341500bb2380e14873b59b7e25503270188bda
[ "Apache-2.0" ]
null
null
null
from dagster import check from dagster.core.decorator_utils import ( split_function_parameters, validate_decorated_fn_positionals, ) from dagster.core.errors import DagsterInvalidDefinitionError from dagster.core.types.config.config_type import ConfigType, ConfigTypeKind, List, Nullable from dagster.core.types....
35.926267
110
0.719985
8b9953f8af109d260aad67e3f80469b66ec2f05a
640
py
Python
tests/test_cli.py
roll/packspec-py
373e8ab7ca82e76548fb8daa6c136818bdef96f6
[ "MIT" ]
2
2017-05-10T23:38:58.000Z
2017-09-09T15:13:55.000Z
tests/test_cli.py
packspec/packspec-py
373e8ab7ca82e76548fb8daa6c136818bdef96f6
[ "MIT" ]
null
null
null
tests/test_cli.py
packspec/packspec-py
373e8ab7ca82e76548fb8daa6c136818bdef96f6
[ "MIT" ]
null
null
null
from packspec import cli # Tests def test_packspec(): specs = cli.parse_specs('tests/packspec.yml') valid = cli.test_specs(specs) assert valid def test_packspec_assertion_fail(): specs = cli.parse_specs('tests/packspec.yml') specs[0]['features'] = specs[0]['features'][0:3] specs[0]['feature...
24.615385
52
0.664063
294f801435ab10fed45896c9c5d1e519baf78009
20,356
py
Python
django/db/migrations/autodetector.py
schuyler1d/django
a91799a30c79ebbf0e5d9cad35362b4960c030fb
[ "BSD-3-Clause" ]
null
null
null
django/db/migrations/autodetector.py
schuyler1d/django
a91799a30c79ebbf0e5d9cad35362b4960c030fb
[ "BSD-3-Clause" ]
null
null
null
django/db/migrations/autodetector.py
schuyler1d/django
a91799a30c79ebbf0e5d9cad35362b4960c030fb
[ "BSD-3-Clause" ]
null
null
null
import re import sys from django.utils import datetime_safe from django.utils.six.moves import input from django.db.migrations import operations from django.db.migrations.migration import Migration from django.db.models.loading import cache class MigrationAutodetector(object): """ Takes a pair of ProjectState...
46.15873
170
0.574376
79162166f30cbb0a1913750bea5118e02e4fa714
443
py
Python
kolibri/core/device/upgrade.py
MBKayro/kolibri
0a38a5fb665503cf8f848b2f65938e73bfaa5989
[ "MIT" ]
545
2016-01-19T19:26:55.000Z
2022-03-20T00:13:04.000Z
kolibri/core/device/upgrade.py
MBKayro/kolibri
0a38a5fb665503cf8f848b2f65938e73bfaa5989
[ "MIT" ]
8,329
2016-01-19T19:32:02.000Z
2022-03-31T21:23:12.000Z
kolibri/core/device/upgrade.py
MBKayro/kolibri
0a38a5fb665503cf8f848b2f65938e73bfaa5989
[ "MIT" ]
493
2016-01-19T19:26:48.000Z
2022-03-28T14:35:05.000Z
""" A file to contain specific logic to handle version upgrades in Kolibri. """ from shutil import rmtree from django.conf import settings from kolibri.core.upgrade import version_upgrade # Before 0.15 we copied static files to the KOLIBRI_HOME directory. # After 0.15 we read them directly from their source directo...
27.6875
71
0.78781
043aff0397ce16a7ec713f89cd2aa17550cdd7ab
2,942
py
Python
src/auv_qualification_imu_no_depth.py
heyuhang0/SAUVC2019
111a2ac5936b95c75930394a3df63536a47d61e9
[ "Apache-2.0" ]
1
2018-11-16T13:05:48.000Z
2018-11-16T13:05:48.000Z
src/auv_qualification_imu_no_depth.py
heyuhang0/SAUVC2019
111a2ac5936b95c75930394a3df63536a47d61e9
[ "Apache-2.0" ]
null
null
null
src/auv_qualification_imu_no_depth.py
heyuhang0/SAUVC2019
111a2ac5936b95c75930394a3df63536a47d61e9
[ "Apache-2.0" ]
2
2020-02-28T02:51:51.000Z
2021-03-23T06:17:37.000Z
import time import argparse from tracking import CVManager from tracking import GateTrackerV3 from mcu import MCU from imu import IMU from pid import * def add_list(list1, list2, list3 ,list4): finalListValues = [] for i in range(5): a = list1[i] b = list2[i] c = list3[i] d = li...
27.240741
107
0.532971
0f58b2c204b59eef3e9b860a7a571bc9c89d4f16
5,802
py
Python
consoleiotools.py
kyan001/PyPrintTool
00ebad8235c4d5237543479435d5e3b4882866c5
[ "MIT" ]
1
2018-10-21T16:43:08.000Z
2018-10-21T16:43:08.000Z
consoleiotools.py
kyan001/PyPrintTool
00ebad8235c4d5237543479435d5e3b4882866c5
[ "MIT" ]
null
null
null
consoleiotools.py
kyan001/PyPrintTool
00ebad8235c4d5237543479435d5e3b4882866c5
[ "MIT" ]
1
2017-05-21T20:41:33.000Z
2017-05-21T20:41:33.000Z
from functools import wraps import os import colorama from colorama import Fore, Back, Style colorama.init() __version__ = "2.8.5" def as_session(name_or_func): # decorator """print start/title/end info before and after the function call Args: title: title will show after the start, if has any ...
32.595506
152
0.599276
f7edd0c680f9aebe037c2fc3660479acac6bee40
220
py
Python
ENV/lib/python3.6/site-packages/pyramid/tests/test_config/pkgs/scannable/subpackage/notinit.py
captain-c00keys/pyramid-stocks
0acf3363a6a7ee61cd41b855f43c9d6f9582ae6a
[ "MIT" ]
null
null
null
ENV/lib/python3.6/site-packages/pyramid/tests/test_config/pkgs/scannable/subpackage/notinit.py
captain-c00keys/pyramid-stocks
0acf3363a6a7ee61cd41b855f43c9d6f9582ae6a
[ "MIT" ]
null
null
null
ENV/lib/python3.6/site-packages/pyramid/tests/test_config/pkgs/scannable/subpackage/notinit.py
captain-c00keys/pyramid-stocks
0acf3363a6a7ee61cd41b855f43c9d6f9582ae6a
[ "MIT" ]
null
null
null
from pyramid.view import view_config from pyramid.renderers import null_renderer @view_config(name='subpackage_notinit', renderer=null_renderer) def subpackage_notinit(context, request): return 'subpackage_notinit'
31.428571
63
0.836364
b992bc624c692f14b15a862d34af24e17bf72e6a
4,664
py
Python
src/settings.py
cp4cds/cmip6_qc
0015e7a62b80ea577a664cea5f4a24de28ae5b99
[ "BSD-3-Clause" ]
null
null
null
src/settings.py
cp4cds/cmip6_qc
0015e7a62b80ea577a664cea5f4a24de28ae5b99
[ "BSD-3-Clause" ]
4
2020-04-30T12:12:04.000Z
2020-05-01T10:51:51.000Z
src/settings.py
cp4cds/cmip6_qc
0015e7a62b80ea577a664cea5f4a24de28ae5b99
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env Python EXIT_AFTER_N_FAILURES = 1000000 CMIP6_ARCHIVE_DIR = "/badc/cmip6/data/" qc_choices = ["all", "cfchecker", "prepare", "nctime"] SETUP_ENV_FILE = "/gws/nopw/j04/cp4cds1_vol3/c3s_34g/cmip6_qc/setup-env.sh" # # START_DATE = '1900-01-01' # # END_DATE = '2000-01-01' # lotus settings QUEUE = 'short-se...
61.368421
171
0.739923
7734df89ded67adcc850d12fe91c0b0402b488c1
3,592
py
Python
src/modules/configs.py
tomzig16/adbepy
ddcad646296c8d4a7806a4a24e993d53d64d1971
[ "MIT" ]
3
2019-07-06T20:58:19.000Z
2019-07-17T04:55:44.000Z
src/modules/configs.py
tomzig16/adbepy
ddcad646296c8d4a7806a4a24e993d53d64d1971
[ "MIT" ]
1
2019-07-09T19:58:31.000Z
2019-07-09T19:58:31.000Z
src/modules/configs.py
tomzig16/adbepy
ddcad646296c8d4a7806a4a24e993d53d64d1971
[ "MIT" ]
null
null
null
from subprocess import Popen, PIPE import re import os from platform import system resFolder = os.path.join(os.path.dirname(__file__), "../res/") configFileName = "adbepy.config" configFilePath = os.path.join(resFolder, configFileName) def GetDefaultSDKPath(): proc = Popen(["adb"], stdin=PIPE, stdout=PIPE, stderr...
36.282828
100
0.633909
5825e7d6c228d7999a7816ed60040103e791da63
453
py
Python
tests/test_main_window.py
pkuehne/phil
c06fd74e0f2ffb45eab72720b6ab9a50c7aa7b23
[ "MIT" ]
null
null
null
tests/test_main_window.py
pkuehne/phil
c06fd74e0f2ffb45eab72720b6ab9a50c7aa7b23
[ "MIT" ]
null
null
null
tests/test_main_window.py
pkuehne/phil
c06fd74e0f2ffb45eab72720b6ab9a50c7aa7b23
[ "MIT" ]
1
2020-08-17T19:40:11.000Z
2020-08-17T19:40:11.000Z
""" Tests for the main window """ from PyQt5.QtWidgets import QFileDialog from phil.main_window import MainWindow def test_load_folder_does_nothin_if_aborted(qtbot, monkeypatch): """ If the user aborts opening a folder, nothing should happen """ # Given window = MainWindow() qtbot.addWidget(window) ...
23.842105
83
0.715232
22ceb7e76cdaaa5427a4c31e24a84630e8486a25
2,355
py
Python
examples/00_empty_scene/generate_jpg_from_exr.py
americast/ml-hypersim
6cbaa80207f44a312654e288cf445016c84658a1
[ "AML" ]
1,246
2020-11-17T05:13:36.000Z
2022-03-31T13:42:40.000Z
examples/00_empty_scene/generate_jpg_from_exr.py
mikeroberts3000/ml-hypersim
75b363ee52fbdbd0cc9b554c34c1aadea404183e
[ "AML" ]
44
2020-12-20T19:54:30.000Z
2022-03-30T07:17:03.000Z
examples/00_empty_scene/generate_jpg_from_exr.py
mikeroberts3000/ml-hypersim
75b363ee52fbdbd0cc9b554c34c1aadea404183e
[ "AML" ]
101
2020-11-16T22:47:13.000Z
2022-03-26T11:25:15.000Z
# # For licensing see accompanying LICENSE.txt file. # Copyright (C) 2020 Apple Inc. All Rights Reserved. # from pylab import * import argparse import cv2 import glob import os parser = argparse.ArgumentParser() parser.add_argument("--in_files", required=True) parser.add_argument("--out_dir", required=True) parser.a...
25.597826
108
0.665817
d970f9d7726a379b29e4f86a10aabec6e7fead04
3,774
py
Python
oslo_log/watchers.py
kaptnemo/oslo.log
b97137fb8e418b08067b7ad49c176f4bfc45e916
[ "Apache-2.0" ]
65
2015-01-23T05:49:09.000Z
2022-01-09T06:54:33.000Z
oslo_log/watchers.py
kaptnemo/oslo.log
b97137fb8e418b08067b7ad49c176f4bfc45e916
[ "Apache-2.0" ]
null
null
null
oslo_log/watchers.py
kaptnemo/oslo.log
b97137fb8e418b08067b7ad49c176f4bfc45e916
[ "Apache-2.0" ]
50
2015-02-02T14:26:24.000Z
2021-03-12T06:13:16.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
33.696429
78
0.641229
aa65b9dba167cadb9a8d36af3fa72c62814ba83f
7,526
py
Python
main.py
jralha/binance-trading-bot-new-coins
0a00ffd3199329f5d97ce2b560ad69d51859c3bd
[ "MIT" ]
1
2021-08-28T21:07:00.000Z
2021-08-28T21:07:00.000Z
main.py
TiagoDS7/binance-trading-bot-new-coins
5b28c91dcb91e6e6d3848a984e222e85546984d2
[ "MIT" ]
null
null
null
main.py
TiagoDS7/binance-trading-bot-new-coins
5b28c91dcb91e6e6d3848a984e222e85546984d2
[ "MIT" ]
null
null
null
from trade_client import * from store_order import * from load_config import * from datetime import datetime, time import time import json import os.path # loads local configuration config = load_config('config.yml') def get_all_coins(): """ Returns all coins from Binance """ return client.get_all...
38.010101
163
0.463859
710e4eb564650c40b5ae7a4b3dc0e1f0c0b56600
12,459
py
Python
docs/conf.py
slowy07/python-secret-manager
e949b6a56815079d1ffd25d76cbee63cb4a79390
[ "Apache-2.0" ]
null
null
null
docs/conf.py
slowy07/python-secret-manager
e949b6a56815079d1ffd25d76cbee63cb4a79390
[ "Apache-2.0" ]
null
null
null
docs/conf.py
slowy07/python-secret-manager
e949b6a56815079d1ffd25d76cbee63cb4a79390
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # 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 agr...
32.700787
88
0.706718
e2c0f5f02be015369128230d70893f17ead9902e
870
py
Python
tests/opcodes/cases/test_map_iter_173.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2020-08-11T02:31:24.000Z
2020-08-11T02:31:24.000Z
tests/opcodes/cases/test_map_iter_173.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2020-12-30T16:44:56.000Z
2020-12-30T16:44:56.000Z
tests/opcodes/cases/test_map_iter_173.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2022-03-20T19:01:00.000Z
2022-03-20T19:01:00.000Z
from unittest import TestCase from tests import abspath from pytezos.repl.interpreter import Interpreter from pytezos.michelson.converter import michelson_to_micheline from pytezos.repl.parser import parse_expression class OpcodeTestmap_iter_173(TestCase): def setUp(self): self.maxDiff = None s...
33.461538
85
0.683908
3ce44ac93fec59ed957a0ea76e26467e7739a7d5
1,036
py
Python
kubernetes/test/test_apps_v1beta1_deployment_list.py
reymont/python
02a3a31c630c305527b328af49724f348fbdae15
[ "Apache-2.0" ]
1
2018-10-20T19:37:57.000Z
2018-10-20T19:37:57.000Z
kubernetes/test/test_apps_v1beta1_deployment_list.py
reymont/python
02a3a31c630c305527b328af49724f348fbdae15
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_apps_v1beta1_deployment_list.py
reymont/python
02a3a31c630c305527b328af49724f348fbdae15
[ "Apache-2.0" ]
2
2018-07-27T19:39:34.000Z
2020-12-25T02:48:27.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.11.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
23.022222
105
0.72973
881163159ed1444f00c9fbe722d68a5af5c5ecf4
8,341
py
Python
rlpyt/replays/non_sequence/uniform.py
2016choang/sfl
c99faa853f610455e8bb7709ac47f9d725499d91
[ "MIT" ]
2
2021-12-06T03:24:18.000Z
2022-01-12T01:11:38.000Z
rlpyt/replays/non_sequence/uniform.py
2016choang/sfl
c99faa853f610455e8bb7709ac47f9d725499d91
[ "MIT" ]
1
2021-12-06T13:28:44.000Z
2022-01-06T07:34:24.000Z
rlpyt/replays/non_sequence/uniform.py
2016choang/sfl
c99faa853f610455e8bb7709ac47f9d725499d91
[ "MIT" ]
null
null
null
import math import numpy as np from rlpyt.agents.base import AgentInputs from rlpyt.replays.async_ import AsyncReplayBufferMixin from rlpyt.replays.base import BaseReplayBuffer from rlpyt.replays.non_sequence.n_step import NStepReturnBuffer from rlpyt.utils.buffer import buffer_from_example, get_leading_dims, torchif...
42.126263
122
0.639851
138399bd5be7003c4d1c6d4cf2774a8946266b2c
2,670
py
Python
openGaussBase/testcase/KEYWORDS/synonym/Opengauss_Function_Keyword_Synonym_Case0020.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/KEYWORDS/synonym/Opengauss_Function_Keyword_Synonym_Case0020.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/KEYWORDS/synonym/Opengauss_Function_Keyword_Synonym_Case0020.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
36.081081
123
0.664045
2c5562fc837b7386f516c6e70e546df338d7bcaf
11,269
py
Python
raspberrypy/control/myo.py
PiscesDream/raspberrypy
7feabc66f76afa0daf9bb47e16e5317d7ff6145c
[ "MIT" ]
1
2022-01-23T19:21:08.000Z
2022-01-23T19:21:08.000Z
raspberrypy/control/myo.py
PiscesDream/RaspberryPy
7feabc66f76afa0daf9bb47e16e5317d7ff6145c
[ "MIT" ]
2
2020-07-22T17:20:33.000Z
2020-07-23T00:30:55.000Z
raspberrypy/control/myo.py
PiscesDream/RaspberryPy
7feabc66f76afa0daf9bb47e16e5317d7ff6145c
[ "MIT" ]
2
2019-07-02T00:26:25.000Z
2020-07-22T17:26:56.000Z
# This script is modified from # https://github.com/dzhu/myo-raw # http://www.fernandocosentino.net/pyoconnect/ # # to enable Myo please execute # // permission to ttyACM0 - must restart linux user after this # sudo usermod -a -G dialout $USER # // dependencies # sudo pip install pySerial enum34 from __future__...
26.703791
101
0.621439
9da8207f39675b41a16b4e0a9729dc9055a237d5
13,245
py
Python
gym/f110_gym/envs/f110_env.py
MTDzi/f1tenth_gym
0202b154ff37ab94ecab1c21b2a770958461290e
[ "MIT" ]
null
null
null
gym/f110_gym/envs/f110_env.py
MTDzi/f1tenth_gym
0202b154ff37ab94ecab1c21b2a770958461290e
[ "MIT" ]
1
2022-01-06T14:28:32.000Z
2022-01-06T14:28:32.000Z
gym/f110_gym/envs/f110_env.py
MTDzi/f1tenth_gym
0202b154ff37ab94ecab1c21b2a770958461290e
[ "MIT" ]
null
null
null
# MIT License # Copyright (c) 2020 Joseph Auckley, Matthew O'Kelly, Aman Sinha, Hongrui Zheng # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitati...
35.991848
328
0.600604
6f4579f20e591df8bf774aa0c383a05e8bfff949
9,592
py
Python
tests/dml/test_line.py
danielkovarik/python-pptx
248fe2c1881f3e32e3f0bef34bc568b5eb8a7685
[ "MIT" ]
null
null
null
tests/dml/test_line.py
danielkovarik/python-pptx
248fe2c1881f3e32e3f0bef34bc568b5eb8a7685
[ "MIT" ]
null
null
null
tests/dml/test_line.py
danielkovarik/python-pptx
248fe2c1881f3e32e3f0bef34bc568b5eb8a7685
[ "MIT" ]
null
null
null
# encoding: utf-8 """ Test suite for pptx.dml.line module """ from __future__ import absolute_import, print_function, unicode_literals import pytest from pptx.dml.color import ColorFormat from pptx.dml.fill import FillFormat from pptx.dml.line import LineFormat from pptx.enum.dml import MSO_ARROWHEAD, MSO_FILL, MSO...
35.791045
88
0.621143