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
d88163d2be8d29f8cf9fd39abc90cccca956130f
540
py
Python
test/dialects/exasol_fs_test.py
leamingrad/sqlfluff
56b2dd8b361225389ab75ad9ba4b1e28162311d4
[ "MIT" ]
null
null
null
test/dialects/exasol_fs_test.py
leamingrad/sqlfluff
56b2dd8b361225389ab75ad9ba4b1e28162311d4
[ "MIT" ]
null
null
null
test/dialects/exasol_fs_test.py
leamingrad/sqlfluff
56b2dd8b361225389ab75ad9ba4b1e28162311d4
[ "MIT" ]
1
2021-08-29T20:59:03.000Z
2021-08-29T20:59:03.000Z
"""Tests specific to the exasol_fs dialect.""" import pytest TEST_DIALECT = "exasol_fs" # Develop test to check specific elements against specific grammars. @pytest.mark.parametrize( "segmentref,raw", [ ("WalrusOperatorSegment", ":="), ("VariableNameSegment", "var1"), ], ) def test_dialec...
27
74
0.725926
e5f8aad64eed4042e450597d9b18dd672bc62c02
388
py
Python
vaxx-happens/housekeeping.py
verascity/data-analysis
2e3a26735ecbb90ae1f63f2836ab18ae3e7c6c9e
[ "MIT" ]
null
null
null
vaxx-happens/housekeeping.py
verascity/data-analysis
2e3a26735ecbb90ae1f63f2836ab18ae3e7c6c9e
[ "MIT" ]
null
null
null
vaxx-happens/housekeeping.py
verascity/data-analysis
2e3a26735ecbb90ae1f63f2836ab18ae3e7c6c9e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Apr 14 20:18:24 2019 @author: verascity This is a little housekeeping script while I work out the kinks on this classifier; it will eventually go away! """ import pandas as pd df1 = pd.read_csv('vaccine_df_01312019.csv') df2 = pd.read_csv('vaccine_df_02242019.csv') df1.co...
22.823529
72
0.706186
385517bcfab33a567362e47d216371b937ffc894
1,696
py
Python
src/download_data/task_get_exchange_rate_data.py
SchickMarkus/CurrencySwap
3bb83066a4fa60b997584470ee927346129de776
[ "MIT" ]
null
null
null
src/download_data/task_get_exchange_rate_data.py
SchickMarkus/CurrencySwap
3bb83066a4fa60b997584470ee927346129de776
[ "MIT" ]
null
null
null
src/download_data/task_get_exchange_rate_data.py
SchickMarkus/CurrencySwap
3bb83066a4fa60b997584470ee927346129de776
[ "MIT" ]
null
null
null
""" Downloads the daily EURO/USD exchange rate from FRED and saves output as a pickle. url: https://fred.stlouisfed.org/series/DEXUSEU """ import datetime import pickle from datetime import date import numpy as np import pandas_datareader as pdr import pytask from src.config import BLD def _download_data(): sta...
24.228571
84
0.693986
61109429fc5041d965328207d510da34f4db2db5
1,760
py
Python
libs/python/test/test_attribute_value_dto.py
Scripta-Qumranica-Electronica/SQE_API_Connectors
aaa9b9eb8709d4257c32ea57321a179c6b1e041a
[ "MIT" ]
null
null
null
libs/python/test/test_attribute_value_dto.py
Scripta-Qumranica-Electronica/SQE_API_Connectors
aaa9b9eb8709d4257c32ea57321a179c6b1e041a
[ "MIT" ]
null
null
null
libs/python/test/test_attribute_value_dto.py
Scripta-Qumranica-Electronica/SQE_API_Connectors
aaa9b9eb8709d4257c32ea57321a179c6b1e041a
[ "MIT" ]
null
null
null
# coding: utf-8 """ SQE API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest impor...
28.387097
124
0.628977
4db651106cbd90ac59b4b669a97628122886badf
4,624
py
Python
gym_env/dota2_env.py
Andrea-MariaDB-2/LastOrder-Dota2
d2fb53a7166218eda1e402efd422586f3adaadff
[ "MIT" ]
332
2021-08-02T07:37:41.000Z
2022-03-26T17:44:53.000Z
gym_env/dota2_env.py
Andrea-MariaDB-2/LastOrder-Dota2
d2fb53a7166218eda1e402efd422586f3adaadff
[ "MIT" ]
13
2021-08-04T12:04:24.000Z
2021-09-26T06:57:46.000Z
gym_env/dota2_env.py
Andrea-MariaDB-2/LastOrder-Dota2
d2fb53a7166218eda1e402efd422586f3adaadff
[ "MIT" ]
34
2021-08-02T09:08:39.000Z
2022-03-27T18:32:31.000Z
from multiprocessing import Process, Queue import os import queue import time import psutil import sys from sys import platform from gym_env.dota_game import logger, get_default_game_path, TEAM_RADIANT, TEAM_DIRE from dotaservice.protos.dota_gcmessages_common_bot_script_pb2 import CMsgBotWorldState from dotaservice....
37.593496
113
0.597318
6d5322170b3a2d5c7e16890171e097cf3611f60b
30,286
py
Python
fury/tests/test_material.py
iamansoni/fury
2e7971a176c2540e10a9a6da861097583d08cb4a
[ "BSD-3-Clause" ]
null
null
null
fury/tests/test_material.py
iamansoni/fury
2e7971a176c2540e10a9a6da861097583d08cb4a
[ "BSD-3-Clause" ]
null
null
null
fury/tests/test_material.py
iamansoni/fury
2e7971a176c2540e10a9a6da861097583d08cb4a
[ "BSD-3-Clause" ]
null
null
null
from fury import actor, material, window from fury.optpkg import optional_package import fury.testing as ft from scipy.spatial import Delaunay import math import numpy as np import numpy.testing as npt import random dipy, have_dipy, _ = optional_package('dipy') def _generate_surface(): size = 11 vertices ...
35.505275
79
0.55983
afb2e12e6022ad32c5d4fb32b2cf99dfee45e5cd
4,444
py
Python
flask/lib/python3.6/site-packages/stem/util/tor_tools.py
JOFLIX/grapevines
34576e01184570d79cc140b42ffb71d322132da6
[ "MIT", "Unlicense" ]
null
null
null
flask/lib/python3.6/site-packages/stem/util/tor_tools.py
JOFLIX/grapevines
34576e01184570d79cc140b42ffb71d322132da6
[ "MIT", "Unlicense" ]
3
2019-07-29T09:47:34.000Z
2019-07-29T09:47:35.000Z
flask/lib/python3.6/site-packages/stem/util/tor_tools.py
JOFLIX/grapevines
34576e01184570d79cc140b42ffb71d322132da6
[ "MIT", "Unlicense" ]
null
null
null
# Copyright 2012-2017, Damian Johnson and The Tor Project # See LICENSE for licensing information """ Miscellaneous utility functions for working with tor. .. versionadded:: 1.2.0 **Module Overview:** :: is_valid_fingerprint - checks if a string is a valid tor relay fingerprint is_valid_nickname - checks if a ...
26.771084
89
0.709496
7e1e87195701176ac33b14ebccff2f853002a8ed
3,405
py
Python
alerta/app/severity_code.py
been2io/alerta
510681bd8fcd5b266fab9c6e00a3abd25591a2b6
[ "Apache-2.0" ]
null
null
null
alerta/app/severity_code.py
been2io/alerta
510681bd8fcd5b266fab9c6e00a3abd25591a2b6
[ "Apache-2.0" ]
null
null
null
alerta/app/severity_code.py
been2io/alerta
510681bd8fcd5b266fab9c6e00a3abd25591a2b6
[ "Apache-2.0" ]
null
null
null
""" Possible alert severity codes. See ITU-T perceived severity model M.3100 and CCITT Rec X.736 http://tools.ietf.org/html/rfc5674 http://www.itu.int/rec/T-REC-M.3100 http://www.itu.int/rec/T-REC-X.736-199201-I ITU Perceived Severity syslog SEVERITY (Name) Critical 1 (Al...
25.410448
98
0.636417
ccd2f5137b5eb3fba03dc819c4c179b610929b69
6,594
py
Python
Launcron.py
negeorge/Launcron
ab6a5691c00f9c7e379d1c769821f4431e378e15
[ "Apache-2.0" ]
1
2021-02-16T20:19:12.000Z
2021-02-16T20:19:12.000Z
Launcron.py
negeorge/Launcron
ab6a5691c00f9c7e379d1c769821f4431e378e15
[ "Apache-2.0" ]
null
null
null
Launcron.py
negeorge/Launcron
ab6a5691c00f9c7e379d1c769821f4431e378e15
[ "Apache-2.0" ]
null
null
null
# references: http://www.twilio.com/docs/quickstart/python/sms/replying-to-sms-messages import flask import twilio.twiml import pymongo import time import twilio.rest import os import logging, sys import urlparse # Flask does not by default show logs in production: # http://stackoverflow.com/questions/8007176/500-er...
44.857143
136
0.678041
f0d92c977ce2daa2447f0c2cac162f5f15e4bd80
7,777
py
Python
detectron2/evaluation/rotated_coco_evaluation.py
MargeryLab/BMaskR-CNN
41f63d301d6be7fa30ba281a5a0f727fbca6ad2a
[ "Apache-2.0" ]
null
null
null
detectron2/evaluation/rotated_coco_evaluation.py
MargeryLab/BMaskR-CNN
41f63d301d6be7fa30ba281a5a0f727fbca6ad2a
[ "Apache-2.0" ]
null
null
null
detectron2/evaluation/rotated_coco_evaluation.py
MargeryLab/BMaskR-CNN
41f63d301d6be7fa30ba281a5a0f727fbca6ad2a
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import itertools import json import numpy as np import os import torch from fvcore.common.file_io import PathManager from pycocotools.cocoeval import COCOeval, maskUtils from detectron2.structures import BoxMode, RotatedBoxes, pairwise_iou...
37.936585
95
0.566671
4930c18717164211a679125fb0447518c83d7f4d
1,507
py
Python
8_Tran_Vu_Ngoc_Thach/bai3.4.py
lpython2006e/exercies
84343eae57d86708a7984aa02f77183a4688a508
[ "MIT" ]
null
null
null
8_Tran_Vu_Ngoc_Thach/bai3.4.py
lpython2006e/exercies
84343eae57d86708a7984aa02f77183a4688a508
[ "MIT" ]
null
null
null
8_Tran_Vu_Ngoc_Thach/bai3.4.py
lpython2006e/exercies
84343eae57d86708a7984aa02f77183a4688a508
[ "MIT" ]
8
2020-07-10T14:13:54.000Z
2020-08-03T08:17:50.000Z
"""Update previous one, allow to enter multiple classmate, at end, allow to save to file as CSV format""" from datetime import datetime import re import csv def _check_valid_name(a): list = ["Huong", "Thach", "Dung", "Thien"] if a not in list: return False else: return True def _check_va...
26.910714
105
0.629064
c39941466f572ad19714088829ef59ffac0160dd
101,510
py
Python
python/ccxt/base/exchange.py
fuqi1001/ccxt
87f4ddf9530775e26c1e9dd428d8ecc376d61a3a
[ "MIT" ]
null
null
null
python/ccxt/base/exchange.py
fuqi1001/ccxt
87f4ddf9530775e26c1e9dd428d8ecc376d61a3a
[ "MIT" ]
null
null
null
python/ccxt/base/exchange.py
fuqi1001/ccxt
87f4ddf9530775e26c1e9dd428d8ecc376d61a3a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Base exchange class""" # ----------------------------------------------------------------------------- __version__ = '1.57.58' # ----------------------------------------------------------------------------- from ccxt.base.errors import ExchangeError from ccxt.base.errors import NetworkEr...
40.832663
219
0.592139
af4f6afe6182a7c2c572185767a50012b6a168f3
58,026
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/aio/operations_async/_virtual_network_gateways_operations_async.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
2
2019-05-17T21:24:53.000Z
2020-02-12T11:13:42.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/aio/operations_async/_virtual_network_gateways_operations_async.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
15
2019-07-12T18:18:04.000Z
2019-07-25T20:55:51.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/aio/operations_async/_virtual_network_gateways_operations_async.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.238961
246
0.678885
ff37ac3e90488357e662b26d90089258bef1e1ca
47
py
Python
tests/parser/planning_requires.2.bk.test.py
veltri/DLV2
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
[ "Apache-2.0" ]
null
null
null
tests/parser/planning_requires.2.bk.test.py
veltri/DLV2
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
[ "Apache-2.0" ]
null
null
null
tests/parser/planning_requires.2.bk.test.py
veltri/DLV2
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
[ "Apache-2.0" ]
null
null
null
input = """ i(x). """ output = """ i(x). """
6.714286
12
0.319149
0482e92b3a8783c34154c7d3623e90e2d5f1523f
11,339
py
Python
post_office/admin.py
Armacom-AG/django-post_office
b9973f3e6e7497b0ff4160dd16c09c09a32c579c
[ "MIT" ]
null
null
null
post_office/admin.py
Armacom-AG/django-post_office
b9973f3e6e7497b0ff4160dd16c09c09a32c579c
[ "MIT" ]
null
null
null
post_office/admin.py
Armacom-AG/django-post_office
b9973f3e6e7497b0ff4160dd16c09c09a32c579c
[ "MIT" ]
null
null
null
import re from django import forms from django.db import models from django.contrib import admin from django.conf import settings from django.conf.urls import re_path from django.core.exceptions import ValidationError from django.core.mail.message import SafeMIMEText from django.forms import BaseInlineFormSet from dja...
36.577419
138
0.657377
8bdb950c714487dc6abe901a94bfa05dfc525e13
20,905
py
Python
clients/kratos/python/ory_kratos_client/model/ui_node_attributes.py
ory/sdk-generator
958314d130922ad6f20f439b5230141a832231a5
[ "Apache-2.0" ]
null
null
null
clients/kratos/python/ory_kratos_client/model/ui_node_attributes.py
ory/sdk-generator
958314d130922ad6f20f439b5230141a832231a5
[ "Apache-2.0" ]
null
null
null
clients/kratos/python/ory_kratos_client/model/ui_node_attributes.py
ory/sdk-generator
958314d130922ad6f20f439b5230141a832231a5
[ "Apache-2.0" ]
null
null
null
""" Ory Kratos API Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the admini...
49.655582
446
0.594068
e2b0f8a16e032ea624bfed86cdea6fe1719de128
13,873
py
Python
hubmap/query_app/queries.py
hubmapconsortium/cross_modality_query
9d38359a02c0ee7c8f74a24bfad4ff19530df6ea
[ "MIT" ]
null
null
null
hubmap/query_app/queries.py
hubmapconsortium/cross_modality_query
9d38359a02c0ee7c8f74a24bfad4ff19530df6ea
[ "MIT" ]
29
2021-01-05T16:37:42.000Z
2022-03-29T17:57:08.000Z
hubmap/query_app/queries.py
hubmapconsortium/cross_modality_query
9d38359a02c0ee7c8f74a24bfad4ff19530df6ea
[ "MIT" ]
null
null
null
from functools import reduce from operator import and_, or_ from typing import Dict from django.core.cache import cache from .filters import ( get_cell_filter, get_cluster_filter, get_dataset_filter, get_gene_filter, get_organ_filter, get_protein_filter, ) from .models import ( AtacQuant, ...
33.754258
99
0.672025
c399de03406933eb554caa6fb1768a84291b87c9
5,516
py
Python
src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/_help.py
JennyLawrance/azure-cli
cb9ca4b694110806b31803a95f9f315b2fde6410
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/_help.py
JennyLawrance/azure-cli
cb9ca4b694110806b31803a95f9f315b2fde6410
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/_help.py
JennyLawrance/azure-cli
cb9ca4b694110806b31803a95f9f315b2fde6410
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------...
35.818182
139
0.641044
38e87b647501d2f6bd4ab9c3d795c03eed04bad7
2,711
py
Python
web/web/settings.py
WhySoGeeky/DroidPot
7c3d9e975dae3835e2ccf42c425d65b26466e82a
[ "MIT" ]
6
2016-02-18T10:00:34.000Z
2021-05-27T09:41:35.000Z
web/web/settings.py
WhySoGeeky/DroidPot
7c3d9e975dae3835e2ccf42c425d65b26466e82a
[ "MIT" ]
6
2018-03-30T10:06:12.000Z
2021-06-10T17:59:44.000Z
web/web/settings.py
WhySoGeeky/DroidPot
7c3d9e975dae3835e2ccf42c425d65b26466e82a
[ "MIT" ]
null
null
null
""" Django settings for web project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import...
24.87156
71
0.73294
72f65668b690d971129ef03edf3cb7008757d6e7
7,908
py
Python
structSVM/structSVMBase.py
akhilpm/Masters-Project
cc10673e695cbc0531f6268d729760705890a116
[ "MIT" ]
null
null
null
structSVM/structSVMBase.py
akhilpm/Masters-Project
cc10673e695cbc0531f6268d729760705890a116
[ "MIT" ]
null
null
null
structSVM/structSVMBase.py
akhilpm/Masters-Project
cc10673e695cbc0531f6268d729760705890a116
[ "MIT" ]
null
null
null
''' Basic StructSVM(N-slack formulation) with standard cutting plane algorithm. Author : Akhil P M Problem Instance : Multiclass Classification Kernel type : Linear Reference : Cutting-Plane training of Structural SVMs, Joachims 2009 ''' import numpy as np import json import time import cvxopt from sklearn import d...
28.446043
111
0.691072
84a1069f3b72fa216be1bb4b5d1f2c22c931f84f
1,265
py
Python
Cython/util.py
Fivefold/SRCNN
614d70360800ad446aaeb47afc3454635094018e
[ "MIT" ]
null
null
null
Cython/util.py
Fivefold/SRCNN
614d70360800ad446aaeb47afc3454635094018e
[ "MIT" ]
null
null
null
Cython/util.py
Fivefold/SRCNN
614d70360800ad446aaeb47afc3454635094018e
[ "MIT" ]
1
2022-03-29T16:44:51.000Z
2022-03-29T16:44:51.000Z
import numpy as np # Source for formulas: https://sistenix.com/rgb2ycbcr.html def rgb2y(i): if type(i) == np.ndarray: return 16. + (65.738 * i[:, :, 0] + 129.057 * i[:, :, 1] + 25.064 * i[:, :, 2]) / 256. else: raise Exception('Unknown Type', type(i)) def rgb2ycbcr(i): if type(i) == np....
34.189189
94
0.413439
29c4a94baf721d0dfd1282ed98df52085fbcb780
885
py
Python
tests/test_migrations.py
ryfloyd/django-simple-sso
3a23f21e1f67ea85c0b597f1795acd616d6d0635
[ "BSD-3-Clause" ]
889
2015-12-02T11:02:25.000Z
2020-10-06T18:38:59.000Z
tests/test_migrations.py
ryfloyd/django-simple-sso
3a23f21e1f67ea85c0b597f1795acd616d6d0635
[ "BSD-3-Clause" ]
631
2015-12-02T17:06:46.000Z
2020-10-08T07:26:27.000Z
tests/test_migrations.py
ryfloyd/django-simple-sso
3a23f21e1f67ea85c0b597f1795acd616d6d0635
[ "BSD-3-Clause" ]
391
2015-12-12T08:03:33.000Z
2020-09-30T18:57:25.000Z
# original from # http://tech.octopus.energy/news/2016/01/21/testing-for-missing-migrations-in-django.html from io import StringIO from django.core.management import call_command from django.test import TestCase, override_settings class MigrationTestCase(TestCase): @override_settings(MIGRATION_MODULES={}) d...
28.548387
90
0.613559
d9bc230a2a3eca2f960e053ea021c99a7b610bdd
3,972
py
Python
src/oci/database/models/convert_to_pdb_target_base.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/database/models/convert_to_pdb_target_base.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/database/models/convert_to_pdb_target_base.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
38.563107
245
0.683283
15ead6b394472c2fd137c078ae670cd2d3352c13
287
py
Python
python/word-count/word_count.py
gdantaas/Exercism-Python
3a11f5010a1f740b73be458d9802ec074d6569a0
[ "MIT" ]
null
null
null
python/word-count/word_count.py
gdantaas/Exercism-Python
3a11f5010a1f740b73be458d9802ec074d6569a0
[ "MIT" ]
null
null
null
python/word-count/word_count.py
gdantaas/Exercism-Python
3a11f5010a1f740b73be458d9802ec074d6569a0
[ "MIT" ]
null
null
null
import re def count_words(sentence): ret = dict() words = re.findall(r"\W?([a-zA-Z0-9]+('[a-zA-Z0-9])*)\W?", sentence.lower()) words = [word[0] for word in words] for word in set([word.lower() for word in words]): ret[word] = words.count(word) return ret
22.076923
80
0.585366
634b2366e813cba50cf5e24f3818b4265f95bf32
1,223
py
Python
proj/python/video_stream/multi_stream/camera.py
timebe00/Mercenary
7762bad28e4f49b2ad84fb8abbd8056bd01f61d4
[ "MIT" ]
3
2020-10-29T15:00:30.000Z
2021-10-21T08:09:34.000Z
proj/python/video_stream/multi_stream/camera.py
timebe00/Mercenary
7762bad28e4f49b2ad84fb8abbd8056bd01f61d4
[ "MIT" ]
20
2020-10-31T03:19:03.000Z
2020-11-02T18:59:49.000Z
proj/python/video_stream/multi_stream/camera.py
timebe00/Mercenary
7762bad28e4f49b2ad84fb8abbd8056bd01f61d4
[ "MIT" ]
9
2020-10-14T02:04:10.000Z
2020-12-01T08:23:02.000Z
import numpy as np import imutils import cv2 class SingleMotionDetector: def __init__(self, accumWeight=0.5): self.accumWeight = accumWeight self.bg = None def update(self, img): if self.bg is None: self.bg = img.copy().astype("float") return ...
32.184211
90
0.542927
d6a4853a2126f9c65ebfb809a7f0607ba0d0a502
358
py
Python
terrascript/data/time.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/data/time.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/data/time.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/data/time.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:28:43 UTC) # # For imports without namespace, e.g. # # >>> import terrascript.data.time # # instead of # # >>> import terrascript.data.hashicorp.time # # This is only available for 'official' and 'partner' providers. from ter...
23.866667
73
0.72905
edaf40409477ad4d199172fe5e55d836926a35e6
1,540
py
Python
swd/main/templatetags/main_extras.py
Aviral09/swd_django
233201f4f47bbffeabc80e9e05901e4a5b45c66a
[ "MIT" ]
14
2018-11-14T07:37:05.000Z
2022-02-02T16:40:21.000Z
swd/main/templatetags/main_extras.py
ashadhaz/swd_django
1550c72cf9da6979ed35baf26e0bdc27b2c4e37b
[ "MIT" ]
181
2018-03-11T13:10:49.000Z
2022-03-11T23:26:31.000Z
swd/main/templatetags/main_extras.py
ashadhaz/swd_django
1550c72cf9da6979ed35baf26e0bdc27b2c4e37b
[ "MIT" ]
41
2018-03-11T13:00:25.000Z
2022-02-02T16:51:18.000Z
from django import template from main.models import Warden, HostelSuperintendent, Security register = template.Library() @register.simple_tag def active_page(request, view_name): from django.urls import resolve, Resolver404 path = resolve(request.path_info) if not request: return "" try: ...
28
81
0.684416
f30a1bb8833314f140ee5b246eb94645ed9e8dc1
194
py
Python
programmers/pick_two_and_add.py
schio/algorithm_test
c240faca428a9adb2970591338d4792b2f4fb7f3
[ "MIT" ]
null
null
null
programmers/pick_two_and_add.py
schio/algorithm_test
c240faca428a9adb2970591338d4792b2f4fb7f3
[ "MIT" ]
null
null
null
programmers/pick_two_and_add.py
schio/algorithm_test
c240faca428a9adb2970591338d4792b2f4fb7f3
[ "MIT" ]
null
null
null
# https://programmers.co.kr/learn/courses/30/lessons/68644 def solution(numbers): from itertools import combinations return sorted(set([sum(nums) for nums in combinations(numbers, 2)]))
38.8
72
0.752577
8091ce267bec954bfcabf1567f9cef89e43c899d
17,687
py
Python
rllib/algorithms/dqn/dqn.py
Gekho457/ray
bed660b085fa9949bca71160addfc0a69931c64b
[ "Apache-2.0" ]
null
null
null
rllib/algorithms/dqn/dqn.py
Gekho457/ray
bed660b085fa9949bca71160addfc0a69931c64b
[ "Apache-2.0" ]
null
null
null
rllib/algorithms/dqn/dqn.py
Gekho457/ray
bed660b085fa9949bca71160addfc0a69931c64b
[ "Apache-2.0" ]
null
null
null
""" Deep Q-Networks (DQN, Rainbow, Parametric DQN) ============================================== This file defines the distributed Trainer class for the Deep Q-Networks algorithm. See `dqn_[tf|torch]_policy.py` for the definition of the policies. Detailed documentation: https://docs.ray.io/en/master/rllib-algorithms...
39.479911
94
0.61859
575b28d9504931fd7b51de6852faaaac77a9a822
812
py
Python
server/trees/migrations/0001_initial.py
blacksider/django-startup
a5eee9be58a0917e02a9b144f53ec1093709e098
[ "MIT" ]
null
null
null
server/trees/migrations/0001_initial.py
blacksider/django-startup
a5eee9be58a0917e02a9b144f53ec1093709e098
[ "MIT" ]
null
null
null
server/trees/migrations/0001_initial.py
blacksider/django-startup
a5eee9be58a0917e02a9b144f53ec1093709e098
[ "MIT" ]
null
null
null
# Generated by Django 2.1.1 on 2018-10-15 08:39 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Tree', fields=[ ('id', models.AutoField(aut...
28
114
0.538177
863b3fdc44ce4ddae6226e6ef804f6c99a48095a
15,508
py
Python
tests/test_submit_to_bsd.py
itsroops/eva-submission
16c0860e020013ce1d1c2b8a3688676460269f40
[ "Apache-2.0" ]
null
null
null
tests/test_submit_to_bsd.py
itsroops/eva-submission
16c0860e020013ce1d1c2b8a3688676460269f40
[ "Apache-2.0" ]
null
null
null
tests/test_submit_to_bsd.py
itsroops/eva-submission
16c0860e020013ce1d1c2b8a3688676460269f40
[ "Apache-2.0" ]
null
null
null
import copy import os from copy import deepcopy from unittest import TestCase from unittest.mock import patch, Mock, PropertyMock import yaml from eva_submission import biosamples_submission, ROOT_DIR from eva_submission.biosamples_submission import HALCommunicator, BSDSubmitter, SampleMetadataSubmitter class BSDTe...
51.693333
177
0.629224
562e14311d1bf4f43836cffc1455d5e3cc13bab9
772
py
Python
Data Structures/lists_methods.py
luizpavanello/python_udacity
6411af82db8123e5b6b731c5a3bced2c31dc2c57
[ "MIT" ]
null
null
null
Data Structures/lists_methods.py
luizpavanello/python_udacity
6411af82db8123e5b6b731c5a3bced2c31dc2c57
[ "MIT" ]
null
null
null
Data Structures/lists_methods.py
luizpavanello/python_udacity
6411af82db8123e5b6b731c5a3bced2c31dc2c57
[ "MIT" ]
null
null
null
"""Quiz: len, max, min, and Lists → What would the output of the following code be? (Treat the comma in the multiple choice answers as newlines.)""" a = [1, 5, 8] b = [2, 6, 9, 10] c = [100, 200] print(max([len(a), len(b), len(c)])) # 4 print(min([len(a), len(b), len(c)])) # 2 """ → What would the output of the fol...
29.692308
115
0.63342
4e86441d28a16ed74c2d65070849eb1751dfa180
9,839
py
Python
darts/models/filtering/kalman_filter.py
ephsmith/darts
0e5b5ad184ed8e83e703e5c955156400930d8afa
[ "Apache-2.0" ]
null
null
null
darts/models/filtering/kalman_filter.py
ephsmith/darts
0e5b5ad184ed8e83e703e5c955156400930d8afa
[ "Apache-2.0" ]
null
null
null
darts/models/filtering/kalman_filter.py
ephsmith/darts
0e5b5ad184ed8e83e703e5c955156400930d8afa
[ "Apache-2.0" ]
null
null
null
""" Kalman Filter ------------- """ from abc import ABC from copy import deepcopy from typing import Optional import numpy as np import pandas as pd from nfoursid.kalman import Kalman from nfoursid.nfoursid import NFourSID from darts.models.filtering.filtering_model import FilteringModel from darts.timeseries import...
39.043651
119
0.611038
309d52b48f25a481ae8bb6f414cb7e698cef103f
312
py
Python
core/api.py
u-n-i-c-o-rn/jimi
bbd647fa9cd4326305a33a99122d8d8a2614967d
[ "Apache-2.0" ]
2
2021-08-15T01:19:47.000Z
2022-01-16T22:57:31.000Z
core/api.py
u-n-i-c-o-rn/jimi
bbd647fa9cd4326305a33a99122d8d8a2614967d
[ "Apache-2.0" ]
5
2021-04-29T11:16:18.000Z
2021-05-02T16:40:01.000Z
core/api.py
u-n-i-c-o-rn/jimi
bbd647fa9cd4326305a33a99122d8d8a2614967d
[ "Apache-2.0" ]
null
null
null
from flask import Flask, request, make_response, redirect, g, send_file import _thread base = "/api/1.0/" webServer = None def createServer(name, **kwargs): global webServer webServer = Flask(name,**kwargs) def startServer(**kwargs): global webServer _thread.start_new_thread(webServer.run, (), kwargs)
19.5
71
0.746795
ee05c173cb68321eca9cfb1fc5cd794c35d697a9
138
py
Python
ledger_diff/__init__.py
pepomes/ledger_diff
3ac414c8079e707e7b84ea757cb02a65b3b19227
[ "MIT" ]
null
null
null
ledger_diff/__init__.py
pepomes/ledger_diff
3ac414c8079e707e7b84ea757cb02a65b3b19227
[ "MIT" ]
null
null
null
ledger_diff/__init__.py
pepomes/ledger_diff
3ac414c8079e707e7b84ea757cb02a65b3b19227
[ "MIT" ]
null
null
null
"""Top-level package for Ledger Diff.""" __author__ = """Pierre-Emmanuel Pomes""" __email__ = 'pe.pomes@gmail.com' __version__ = '0.1.0'
23
40
0.688406
551da337c53d937340878cad562fe1838a5be188
10,819
py
Python
library.py
ichpuchtli/Geometry-Genocide
900cc84f9aebddc39d8af72e9cb159add5c42d99
[ "MIT" ]
1
2017-12-30T06:51:15.000Z
2017-12-30T06:51:15.000Z
library.py
ichpuchtli/Geometry-Genocide
900cc84f9aebddc39d8af72e9cb159add5c42d99
[ "MIT" ]
null
null
null
library.py
ichpuchtli/Geometry-Genocide
900cc84f9aebddc39d8af72e9cb159add5c42d99
[ "MIT" ]
null
null
null
__doc__ = 'This module contains various support classes including vector \ and matrix support, rendering support, time management and other various \ classes ' from math import sin, cos, acos, asin, radians, atan2, sqrt, degrees import pygame from random import uniform class Global: """ Global Variables ""...
28.174479
91
0.655421
1996d62c14557283284e06e0d8bd677592db794c
4,534
py
Python
core/dbt/deprecations.py
sumanau7/dbt
0115e469c13237aed0ea53cc93655a089b843ab6
[ "Apache-2.0" ]
null
null
null
core/dbt/deprecations.py
sumanau7/dbt
0115e469c13237aed0ea53cc93655a089b843ab6
[ "Apache-2.0" ]
null
null
null
core/dbt/deprecations.py
sumanau7/dbt
0115e469c13237aed0ea53cc93655a089b843ab6
[ "Apache-2.0" ]
null
null
null
from typing import Optional, Set, List, Dict, ClassVar import dbt.links import dbt.exceptions import dbt.flags from dbt.ui import printer class DBTDeprecation: _name: ClassVar[Optional[str]] = None _description: ClassVar[Optional[str]] = None @property def name(self) -> str: if self._name is...
27.815951
98
0.68659
338fbf3b8518e92e69ed5fef8d6c394c72daa7ca
7,507
py
Python
core.py
ShahRutav/ferm
bd93672ea9f5448ff32272a6522f15a118486454
[ "MIT" ]
null
null
null
core.py
ShahRutav/ferm
bd93672ea9f5448ff32272a6522f15a118486454
[ "MIT" ]
null
null
null
core.py
ShahRutav/ferm
bd93672ea9f5448ff32272a6522f15a118486454
[ "MIT" ]
null
null
null
import logging import numpy as np from mjrl.utils.gym_env import GymEnv from mjrl.utils import tensor_utils logging.disable(logging.CRITICAL) import multiprocessing as mp import time as timer # from mjrl.utils.multicam import MultiCam # from mjrl.utils.frame_stack import FrameStack from env_wrapper import * from utils ...
32.781659
138
0.585054
6a32dde7d7123500c779a85049f31cd901f53832
17,921
py
Python
scripts/preprocess_waymo.py
krshrimali/Open3D-ML
e6352ee84d38a4b90c71dd7f376f5570fe849537
[ "MIT" ]
346
2021-07-27T20:14:47.000Z
2022-03-31T12:19:39.000Z
scripts/preprocess_waymo.py
krshrimali/Open3D-ML
e6352ee84d38a4b90c71dd7f376f5570fe849537
[ "MIT" ]
179
2021-07-27T15:32:33.000Z
2022-03-30T14:32:53.000Z
scripts/preprocess_waymo.py
krshrimali/Open3D-ML
e6352ee84d38a4b90c71dd7f376f5570fe849537
[ "MIT" ]
92
2021-07-28T13:50:52.000Z
2022-03-30T09:24:33.000Z
try: from waymo_open_dataset import dataset_pb2 except ImportError: raise ImportError( 'Please run "pip install waymo-open-dataset-tf-2-1-0==1.2.0" ' 'to install the official devkit first.') import logging import numpy as np import os, sys, glob, pickle from pathlib import Path from os.path imp...
38.457082
105
0.562413
886a0d5619073ef636741020bb26d61a5c14282b
46,746
py
Python
PythonNetwork/venv/Lib/site-packages/mysqlx/statement.py
Moldovandreii/RepetitionCount
b5715b0948b609fde0ce05d45023b7d4cfd635e7
[ "FTL" ]
1
2021-04-09T15:23:40.000Z
2021-04-09T15:23:40.000Z
PythonNetwork/venv/Lib/site-packages/mysqlx/statement.py
Moldovandreii/RepetitionCount
b5715b0948b609fde0ce05d45023b7d4cfd635e7
[ "FTL" ]
null
null
null
PythonNetwork/venv/Lib/site-packages/mysqlx/statement.py
Moldovandreii/RepetitionCount
b5715b0948b609fde0ce05d45023b7d4cfd635e7
[ "FTL" ]
1
2021-03-28T18:09:09.000Z
2021-03-28T18:09:09.000Z
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as # published by the Free Software Foundation. # # This program is also distributed with certain software (including # ...
32.530271
80
0.579793
fd393f28881fd2f3d400d395be420355b24b58e2
6,227
py
Python
Doc/includes/mp_synchronize.py
ystk/debian-python3.1
6241444a6994140621d1b143a2d6b311b184366a
[ "PSF-2.0" ]
2
2019-03-03T00:04:36.000Z
2020-10-06T16:22:38.000Z
Doc/includes/mp_synchronize.py
ystk/debian-python3.1
6241444a6994140621d1b143a2d6b311b184366a
[ "PSF-2.0" ]
1
2015-10-29T20:51:31.000Z
2015-10-29T20:51:31.000Z
Doc/includes/mp_synchronize.py
ystk/debian-python3.1
6241444a6994140621d1b143a2d6b311b184366a
[ "PSF-2.0" ]
2
2018-08-06T04:37:38.000Z
2022-02-27T18:07:12.000Z
# # A test file for the `multiprocessing` package # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # import time, sys, random from queue import Empty import multiprocessing # may get overwritten #### TEST_VALUE def value_func(running, mutex): random.seed() time.sleep(random.rando...
22.480144
80
0.598523
d76f7f1c5296ed77111826fe05a12257e2d90b03
21,237
py
Python
plexapi/audio.py
glensc/python-plexapi
1429867ae5b0bb92bc9db373f7dec36bc035b686
[ "BSD-3-Clause" ]
null
null
null
plexapi/audio.py
glensc/python-plexapi
1429867ae5b0bb92bc9db373f7dec36bc035b686
[ "BSD-3-Clause" ]
1
2022-01-23T19:51:38.000Z
2022-01-23T19:51:38.000Z
plexapi/audio.py
glensc/python-plexapi
1429867ae5b0bb92bc9db373f7dec36bc035b686
[ "BSD-3-Clause" ]
2
2020-09-20T14:41:32.000Z
2022-01-02T04:04:29.000Z
# -*- coding: utf-8 -*- from urllib.parse import quote_plus from plexapi import library, media, utils from plexapi.base import Playable, PlexPartialObject from plexapi.exceptions import BadRequest from plexapi.mixins import ArtUrlMixin, ArtMixin, PosterUrlMixin, PosterMixin from plexapi.mixins import SplitMergeMixin, ...
51.546117
123
0.638037
804486355b13dd23be10e6fb94c225acf4979695
5,326
py
Python
Exp102.py
FarhanKhan1911/Python-Practice-code
6567fe57c13c49a465175f95c80967f0cb36aaa4
[ "Apache-2.0" ]
1
2021-05-16T18:41:21.000Z
2021-05-16T18:41:21.000Z
Exp102.py
FarhanKhan1911/Python-Practice-code
6567fe57c13c49a465175f95c80967f0cb36aaa4
[ "Apache-2.0" ]
null
null
null
Exp102.py
FarhanKhan1911/Python-Practice-code
6567fe57c13c49a465175f95c80967f0cb36aaa4
[ "Apache-2.0" ]
1
2021-05-16T18:41:25.000Z
2021-05-16T18:41:25.000Z
''' 1.2 Write a python program to implement List, Set, Tuple, Dictionary and Array. Theory There are four collection data types in the Python programming language: 1]List is a collection which is ordered and changeable. Allows duplicate members. 2]Tuple is a collection which is ordered and unchangeable. Al...
30.965116
239
0.684003
36034a22e55f407885d4caeafdb69de1f1aecb44
1,331
py
Python
Dockerized_Apps/taxii-client/src/iec61850/mms/MMSCommandSTIX.py
CanadianInstituteForCybersecurity/cic-exchange-model
1bb4f3ed51252cf152c2279cbeae75ca607b6fca
[ "MIT" ]
null
null
null
Dockerized_Apps/taxii-client/src/iec61850/mms/MMSCommandSTIX.py
CanadianInstituteForCybersecurity/cic-exchange-model
1bb4f3ed51252cf152c2279cbeae75ca607b6fca
[ "MIT" ]
null
null
null
Dockerized_Apps/taxii-client/src/iec61850/mms/MMSCommandSTIX.py
CanadianInstituteForCybersecurity/cic-exchange-model
1bb4f3ed51252cf152c2279cbeae75ca607b6fca
[ "MIT" ]
null
null
null
from stix2 import properties from stix2 import CustomObject @CustomObject('mms-command-frame', [ ('command', properties.StringProperty(required=True)), ('logical_device', properties.StringProperty()), ('logical_node', properties.StringProperty()), ('data_object', properties.StringProperty()), ("dat...
53.24
89
0.669421
510cc4d02792fe8e52ec3b0b96daacc6f9cb1608
3,056
py
Python
homeassistant/auth_providers/legacy_api_password.py
kartik-karz/home-assistant
1ff329d9d6ec122460161a55ffed1cdbdd51bd75
[ "Apache-2.0" ]
1
2021-03-16T18:41:48.000Z
2021-03-16T18:41:48.000Z
homeassistant/auth_providers/legacy_api_password.py
kariudo/home-assistant
6f582dcf24978a5288bbf583450070bb63b7c234
[ "Apache-2.0" ]
null
null
null
homeassistant/auth_providers/legacy_api_password.py
kariudo/home-assistant
6f582dcf24978a5288bbf583450070bb63b7c234
[ "Apache-2.0" ]
1
2018-10-05T17:34:09.000Z
2018-10-05T17:34:09.000Z
""" Support Legacy API password auth provider. It will be removed when auth system production ready """ from collections import OrderedDict import hmac import voluptuous as vol from homeassistant.exceptions import HomeAssistantError from homeassistant import auth, data_entry_flow from homeassistant.core import callb...
29.104762
79
0.635798
ad5239e719b26c6af5dc3c8a2f53aa48e1f815b5
11,467
py
Python
own_actor_pixel/utilis.py
ChrisProgramming2018/ReinforcementLearning
d5895d989249978a0b24fa0488433950daeb31bd
[ "MIT" ]
null
null
null
own_actor_pixel/utilis.py
ChrisProgramming2018/ReinforcementLearning
d5895d989249978a0b24fa0488433950daeb31bd
[ "MIT" ]
null
null
null
own_actor_pixel/utilis.py
ChrisProgramming2018/ReinforcementLearning
d5895d989249978a0b24fa0488433950daeb31bd
[ "MIT" ]
null
null
null
# Copyright 2020 # Author: Christian Leininger <info2016frei@gmail.com> import os import sys import cv2 import time import torch import random import numpy as np from DDPG import DDPG import robosuite as suite from collections import deque from datetime import datetime from memory import ReplayBuffer from models im...
35.834375
162
0.609663
8364745a965c4e0a948cdfa1f85558d64223f019
15,438
py
Python
docs/source/conf.py
magcho/sysPass-doc
f6c104e64f7632cbc0f784b952a8655cbe3a5b35
[ "Unlicense" ]
4
2019-03-20T14:32:36.000Z
2021-07-07T14:28:52.000Z
docs/source/conf.py
magcho/sysPass-doc
f6c104e64f7632cbc0f784b952a8655cbe3a5b35
[ "Unlicense" ]
19
2019-02-15T16:41:39.000Z
2021-05-30T20:08:44.000Z
docs/source/conf.py
magcho/sysPass-doc
f6c104e64f7632cbc0f784b952a8655cbe3a5b35
[ "Unlicense" ]
18
2019-02-06T09:01:46.000Z
2022-03-09T15:29:10.000Z
# -*- coding: utf-8 -*- # # sysPass documentation build configuration file, created by # sphinx-quickstart on Sun Feb 5 11:14:30 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
28.018149
80
0.709807
10aa83293f3742cb944b224573af8c94ca073de0
7,857
py
Python
tests/test_hilbert_transform.py
benduffy1/MONAI
046e625b09262261373d7b8039fb652547201368
[ "Apache-2.0" ]
3
2020-06-22T20:59:14.000Z
2021-04-09T21:24:45.000Z
tests/test_hilbert_transform.py
Borda/MONAI
e0db5a564225a7cb62e7a23df97267019006302f
[ "Apache-2.0" ]
null
null
null
tests/test_hilbert_transform.py
Borda/MONAI
e0db5a564225a7cb62e7a23df97267019006302f
[ "Apache-2.0" ]
1
2020-06-22T19:22:59.000Z
2020-06-22T19:22:59.000Z
# Copyright (c) MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
35.233184
117
0.682831
67273120c20c8abf7454c40c9dfaaad0fb68e02a
455
py
Python
frappe/printing/page/print_format_builder/print_format_builder.py
oryxsolutions/frappe
d193ea22d17ca40d57432040a8afad72287d9e23
[ "MIT" ]
null
null
null
frappe/printing/page/print_format_builder/print_format_builder.py
oryxsolutions/frappe
d193ea22d17ca40d57432040a8afad72287d9e23
[ "MIT" ]
null
null
null
frappe/printing/page/print_format_builder/print_format_builder.py
oryxsolutions/frappe
d193ea22d17ca40d57432040a8afad72287d9e23
[ "MIT" ]
null
null
null
import frappe @frappe.whitelist() def create_custom_format(doctype, name, based_on="Standard", beta=False): doc = frappe.new_doc("Print Format") doc.doc_type = doctype doc.name = name beta = frappe.parse_json(beta) if beta: doc.print_format_builder_beta = 1 else: doc.print_format_builder = 1 doc.format_da...
22.75
98
0.734066
f9c160467a0be56ac2fc7c7710b34d977d357777
16,957
py
Python
bioptim/limits/objective_functions.py
vennand/BiorbdOptim
9c741da6366e0c9d5d727da6297a17a599759eb1
[ "MIT" ]
null
null
null
bioptim/limits/objective_functions.py
vennand/BiorbdOptim
9c741da6366e0c9d5d727da6297a17a599759eb1
[ "MIT" ]
null
null
null
bioptim/limits/objective_functions.py
vennand/BiorbdOptim
9c741da6366e0c9d5d727da6297a17a599759eb1
[ "MIT" ]
null
null
null
from enum import Enum import numpy as np import casadi from casadi import dot, sum1 from .penalty import PenaltyType, PenaltyFunctionAbstract, PenaltyOption from ..misc.enums import Node from ..misc.options_lists import OptionList, OptionGeneric class ObjectiveOption(PenaltyOption): def __init__(self, objective...
40.182464
148
0.617857
90c64b819d802989a188f07d8ae606677e85e439
6,343
py
Python
ark_nlp/nn/configuration/configuration_nezha.py
Zrealshadow/ark-nlp
159045d17747524bd4e9af7f65f1d0283e8098e6
[ "Apache-2.0" ]
258
2021-09-04T14:01:13.000Z
2022-03-31T16:34:52.000Z
ark_nlp/nn/configuration/configuration_nezha.py
yubuyuabc/ark-nlp
165d35cfacd7476791c0aeba19bf43f4f8079553
[ "Apache-2.0" ]
17
2022-01-13T04:46:02.000Z
2022-03-31T16:34:07.000Z
ark_nlp/nn/configuration/configuration_nezha.py
yubuyuabc/ark-nlp
165d35cfacd7476791c0aeba19bf43f4f8079553
[ "Apache-2.0" ]
36
2021-11-17T06:18:45.000Z
2022-03-30T11:32:26.000Z
from transformers import PretrainedConfig NEZHA_PRETRAINED_CONFIG_ARCHIVE_MAP = {} class NeZhaConfig(PretrainedConfig): r""" This is the configuration class to store the configuration of an :class:`~transformers.AlbertModel`. It is used to instantiate an ALBERT model according to the specified a...
49.554688
122
0.670818
83a0ff8099cba31c76167d9fe33c28a9ef5ca9f8
67,215
py
Python
python/paddle/distributed/fleet/base/fleet_base.py
luliyucoordinate/Paddle
8df917633e02ee11a76d135a8eae7f2c5607b15c
[ "Apache-2.0" ]
null
null
null
python/paddle/distributed/fleet/base/fleet_base.py
luliyucoordinate/Paddle
8df917633e02ee11a76d135a8eae7f2c5607b15c
[ "Apache-2.0" ]
null
null
null
python/paddle/distributed/fleet/base/fleet_base.py
luliyucoordinate/Paddle
8df917633e02ee11a76d135a8eae7f2c5607b15c
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 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 app...
36.911038
153
0.587027
3a385f362fec85742642a17f5c9d8589b2448bce
6,419
py
Python
src/train.py
Danboruya/mt-sequential-multi-agent-rl
75df9ede038db8cc05b3f53a0df8a93292575367
[ "Apache-2.0" ]
null
null
null
src/train.py
Danboruya/mt-sequential-multi-agent-rl
75df9ede038db8cc05b3f53a0df8a93292575367
[ "Apache-2.0" ]
13
2020-03-02T03:43:53.000Z
2021-04-25T01:13:23.000Z
src/train.py
Danboruya/mt-sequential-multi-agent-rl
75df9ede038db8cc05b3f53a0df8a93292575367
[ "Apache-2.0" ]
1
2021-12-19T08:36:11.000Z
2021-12-19T08:36:11.000Z
import random from itertools import count import torch import utils def train(envs, agents, core_env, core_agent, n_episodes, agent_n, exp, constants, render=False): """ Training step. In this code, we use the multi-agents to create candidate for core agent. The core agent and environment is main R...
37.982249
97
0.573298
4b6936e28e25fe3724e05722595b67eafc2e515d
655,671
py
Python
pysnmp/CISCO-UNIFIED-COMPUTING-FABRIC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/CISCO-UNIFIED-COMPUTING-FABRIC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/CISCO-UNIFIED-COMPUTING-FABRIC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCO-UNIFIED-COMPUTING-FABRIC-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-UNIFIED-COMPUTING-FABRIC-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:59:21 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using...
140.370584
17,595
0.799828
6fbf86d37e254534c78ea3cdd0de404e4c348b83
21,293
py
Python
server/integrations/cert/UserCertExternalAuthenticator.py
duttarnab/jans-auth-server
c74d4b1056cc6ae364dee1d3b89121925a3dcd0b
[ "Apache-2.0" ]
30
2020-10-08T07:42:25.000Z
2022-01-14T08:28:54.000Z
server/integrations/cert/UserCertExternalAuthenticator.py
duttarnab/jans-auth-server
c74d4b1056cc6ae364dee1d3b89121925a3dcd0b
[ "Apache-2.0" ]
339
2020-10-23T19:07:38.000Z
2022-01-14T08:27:47.000Z
server/integrations/cert/UserCertExternalAuthenticator.py
duttarnab/jans-auth-server
c74d4b1056cc6ae364dee1d3b89121925a3dcd0b
[ "Apache-2.0" ]
17
2020-10-07T17:23:59.000Z
2022-01-14T09:28:21.000Z
# # Janssen Project software is available under the Apache License (2004). See http://www.apache.org/licenses/ for full text. # Copyright (c) 2020, Janssen Project # # Author: Yuriy Movchan # from io.jans.service.cdi.util import CdiUtil from io.jans.model.custom.script.type.auth import PersonAuthenticationType from ja...
44.176349
164
0.663833
ec75a752f9ac98a712155580728c4dc960947262
4,161
py
Python
training/gan/debiased_contrad_v2_ablation_DCD.py
DylanTao94/ContraD
115c8e96e1ec2bcae1f37c2428236a59db555799
[ "MIT" ]
null
null
null
training/gan/debiased_contrad_v2_ablation_DCD.py
DylanTao94/ContraD
115c8e96e1ec2bcae1f37c2428236a59db555799
[ "MIT" ]
null
null
null
training/gan/debiased_contrad_v2_ablation_DCD.py
DylanTao94/ContraD
115c8e96e1ec2bcae1f37c2428236a59db555799
[ "MIT" ]
null
null
null
import torch import torch.nn.functional as F import numpy as np from third_party.gather_layer import GatherLayer from training.criterion import nt_xent def supcon_fake(out1, out2, others, temperature, distributed=False): if distributed: out1 = torch.cat(GatherLayer.apply(out1), dim=0) out2 = torc...
33.556452
112
0.630377
6642ca4134c9151bf89721d4d49e07a20f083846
5,165
py
Python
mayan/apps/converter/managers.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
4
2021-09-02T00:16:30.000Z
2021-09-09T22:25:15.000Z
mayan/apps/converter/managers.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
86
2021-09-01T23:53:02.000Z
2021-09-20T02:25:10.000Z
mayan/apps/converter/managers.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
70
2021-09-01T12:54:51.000Z
2022-02-16T00:53:18.000Z
import logging from django.apps import apps from django.contrib.contenttypes.models import ContentType from django.core.exceptions import PermissionDenied from django.db import models from mayan.apps.acls.models import AccessControlList from mayan.apps.common.serialization import yaml_load from .classes import Layer...
35.62069
81
0.538432
4f12885799384b43165beeb04447f767fe15f28c
138
py
Python
utils/clearLogs.py
Fantailed/fallback-chatbot
596ed6566f61ee3491b7964df74efae05b64721f
[ "Apache-2.0" ]
1
2018-11-29T15:35:16.000Z
2018-11-29T15:35:16.000Z
utils/clearLogs.py
Fantailed/fallback-chatbot
596ed6566f61ee3491b7964df74efae05b64721f
[ "Apache-2.0" ]
null
null
null
utils/clearLogs.py
Fantailed/fallback-chatbot
596ed6566f61ee3491b7964df74efae05b64721f
[ "Apache-2.0" ]
null
null
null
logs = [ 'BakaBot/scripts/windows/bakabot.log', 'y-bot/scripts/windows/y-bot.log', ] for log in logs: open(log, 'w').close()
17.25
42
0.615942
acf82bfb68e0d9e5be2241a10fc5158d07ac20eb
4,747
py
Python
ranger-util/src/scripts/saveVersion.py
tooptoop4/ranger
3c18a99c2ca5b0a5302d0b646438be2990ee6c34
[ "Apache-2.0" ]
4
2019-04-20T03:35:03.000Z
2022-03-29T03:26:32.000Z
ranger-util/src/scripts/saveVersion.py
tooptoop4/ranger
3c18a99c2ca5b0a5302d0b646438be2990ee6c34
[ "Apache-2.0" ]
5
2020-03-04T23:08:53.000Z
2022-03-25T19:36:34.000Z
ranger-util/src/scripts/saveVersion.py
daidd2019/ranger-hdp
65a72b0882c5cf44529d964095e4c6aaab29f34a
[ "Apache-2.0" ]
10
2021-04-06T06:08:03.000Z
2022-03-11T08:45:53.000Z
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
31.437086
183
0.695808
ae0bce0cdcefb75cd9741a9a39c8a2d5e61f51af
5,069
py
Python
cross3d/studiomax/studiomaxscenematerial.py
vedantirb/cross3d
e27c2dc80bf607ef7ccf3970b713bfea8211228b
[ "MIT" ]
129
2016-07-26T16:00:56.000Z
2021-08-07T03:44:41.000Z
cross3d/studiomax/studiomaxscenematerial.py
vedantirb/cross3d
e27c2dc80bf607ef7ccf3970b713bfea8211228b
[ "MIT" ]
3
2016-08-26T01:37:03.000Z
2019-08-13T01:46:01.000Z
cross3d/studiomax/studiomaxscenematerial.py
vedantirb/cross3d
e27c2dc80bf607ef7ccf3970b713bfea8211228b
[ "MIT" ]
33
2016-07-30T00:26:00.000Z
2022-03-09T07:10:54.000Z
## # \namespace cross3d.abstract.abstractscenematerial # # \remarks 3ds Max implementation of SceneMaterial. # # \author eric # \author Blur Studio # \date 09/08/10 # import os.path from Py3dsMax import mxs from cross3d.constants import MaterialType, MapType from cross3d.abstract.abstractscenematerial...
31.290123
80
0.669757
003a02cb2ffb5fbb17bc785a64ad5febf12696ec
776
py
Python
scripts/npc/PTjob4N.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
null
null
null
scripts/npc/PTjob4N.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
null
null
null
scripts/npc/PTjob4N.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
null
null
null
# Portrait (1403003) | Leafre Treasure Vault (915010201) # Phantom 4th Job remembers = 1142378 empress = 25122 if sm.hasQuest(empress): if sm.canHold(remembers): sm.giveItem(remembers) sm.completeQuestNoRewards(empress) sm.jobAdvance(2412) sm.addMaxHP(300) sm.addMaxMP(150)...
29.846154
77
0.657216
889bea3b7d6e1d8ed65ef455cc7c61a876b3bd33
2,500
py
Python
scripts/astf/http_manual_tunables3.py
ajitkhaparde/trex-core
1834ebd49112af0731a819056612dde832f7a94e
[ "Apache-2.0" ]
null
null
null
scripts/astf/http_manual_tunables3.py
ajitkhaparde/trex-core
1834ebd49112af0731a819056612dde832f7a94e
[ "Apache-2.0" ]
3
2019-06-20T13:38:04.000Z
2019-07-02T09:25:13.000Z
scripts/astf/http_manual_tunables3.py
ajitkhaparde/trex-core
1834ebd49112af0731a819056612dde832f7a94e
[ "Apache-2.0" ]
null
null
null
# split the buffer to MSS and ack every buffer, no need the no_delay option from trex.astf.api import * import argparse # we can send either Python bytes type as below: http_req = b'GET /3384 HTTP/1.1\r\nHost: 22.0.0.3\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; ....
40.983607
279
0.6388
8aef94a9faa49a6a4ed42581ba8c709c49908d36
1,163
py
Python
modules/protocols/ethernet.py
thewhiteninja/flowgen
75a334aa84a5e995e8fe7cb83ca6f3bc98c8e925
[ "MIT" ]
2
2021-03-16T08:56:35.000Z
2021-09-25T08:55:19.000Z
modules/protocols/ethernet.py
thewhiteninja/flowgen
75a334aa84a5e995e8fe7cb83ca6f3bc98c8e925
[ "MIT" ]
null
null
null
modules/protocols/ethernet.py
thewhiteninja/flowgen
75a334aa84a5e995e8fe7cb83ca6f3bc98c8e925
[ "MIT" ]
2
2021-02-08T08:48:15.000Z
2021-03-07T01:58:40.000Z
import bitstring import netaddr from modules.constants import EtherType from modules.protocols.ip import IPv4 from modules.utils import random_mac_address class Ethernet: def __init__(self, mac_from=None, mac_to=None): self.encapsulated = None if mac_from is None: mac_from = random_...
29.820513
119
0.658641
854f73d6c27973a465d4abe014392f196a129755
5,112
py
Python
cupy/random/__init__.py
prkhrsrvstv1/cupy
ea86c8225b575af9d2855fb77a306cf86fd098ea
[ "MIT" ]
1
2021-07-06T21:08:17.000Z
2021-07-06T21:08:17.000Z
cupy/random/__init__.py
prkhrsrvstv1/cupy
ea86c8225b575af9d2855fb77a306cf86fd098ea
[ "MIT" ]
8
2019-02-11T17:20:01.000Z
2021-09-08T01:14:51.000Z
cupy/random/__init__.py
prkhrsrvstv1/cupy
ea86c8225b575af9d2855fb77a306cf86fd098ea
[ "MIT" ]
1
2021-01-08T14:16:53.000Z
2021-01-08T14:16:53.000Z
import numpy as _numpy from cupy_backends.cuda.api import runtime def bytes(length): """Returns random bytes. .. note:: This function is just a wrapper for :obj:`numpy.random.bytes`. The resulting bytes are generated on the host (NumPy), not GPU. .. seealso:: :meth:`numpy.random.bytes ...
48.226415
129
0.760172
d0f5986b745d94f82b4d3bc621cc81ebb1b347f1
1,043
py
Python
nexus/templatetags/nexus_admin.py
seatme/nexus
53e2ed18cc361b2e952b905db550678e70b831e9
[ "Apache-2.0" ]
69
2015-01-03T12:25:11.000Z
2021-03-15T16:01:03.000Z
nexus/templatetags/nexus_admin.py
seatme/nexus
53e2ed18cc361b2e952b905db550678e70b831e9
[ "Apache-2.0" ]
19
2015-01-22T21:06:09.000Z
2017-12-05T21:46:00.000Z
nexus/templatetags/nexus_admin.py
seatme/nexus
53e2ed18cc361b2e952b905db550678e70b831e9
[ "Apache-2.0" ]
28
2015-01-21T16:35:40.000Z
2017-12-14T14:59:02.000Z
from django import template register = template.Library() def submit_row(context): """ Displays the row of buttons for delete and save. """ opts = context['opts'] change = context['change'] is_popup = context['is_popup'] save_as = context['save_as'] return { 'onclick_attrib': ...
40.115385
99
0.633749
9226e118fa2ba11a123d49fc73be1cb5c4b983df
530
py
Python
src/equations/symbols.py
martinlarsalbert/manoeuvring
52e8fff39bacb9d06030851b5859fea52085f553
[ "MIT" ]
1
2021-02-03T09:41:21.000Z
2021-02-03T09:41:21.000Z
src/equations/symbols.py
martinlarsalbert/manoeuvring
52e8fff39bacb9d06030851b5859fea52085f553
[ "MIT" ]
null
null
null
src/equations/symbols.py
martinlarsalbert/manoeuvring
52e8fff39bacb9d06030851b5859fea52085f553
[ "MIT" ]
2
2021-02-03T09:41:34.000Z
2022-02-17T02:14:13.000Z
import rolldecayestimators.special_symbol as ss import sympy as sp import sympy.physics.mechanics as me t = ss.Symbol(name='t',description='time',unit='s') delta = ss.Symbol(name='delta',description='Rudder angle',unit='rad') r = me.dynamicsymbols('r') # yaw rate [rad/s] r_1d = r.diff() r_2d = r_1d.diff() K = ss.Sy...
35.333333
74
0.722642
1fec4018756beafa79190116befb5991e28e3dab
1,017
py
Python
hassio/services/__init__.py
InfernoEmbedded/hassio
a401bf0bb8d81d76924254d5b8c9c493ad343468
[ "Apache-2.0" ]
null
null
null
hassio/services/__init__.py
InfernoEmbedded/hassio
a401bf0bb8d81d76924254d5b8c9c493ad343468
[ "Apache-2.0" ]
null
null
null
hassio/services/__init__.py
InfernoEmbedded/hassio
a401bf0bb8d81d76924254d5b8c9c493ad343468
[ "Apache-2.0" ]
null
null
null
"""Handle internal services discovery.""" from .mqtt import MQTTService from .data import ServicesData from ..const import SERVICE_MQTT from ..coresys import CoreSysAttributes AVAILABLE_SERVICES = { SERVICE_MQTT: MQTTService } class ServiceManager(CoreSysAttributes): """Handle internal services discovery.""...
26.076923
59
0.653884
668dc7e9ae357e328683b8f8f7fe9de2aa5f28fb
8,394
py
Python
termpair/server.py
dumpmemory/termpair
543d84af21e2892a8b6f177d1c397b88973b0e98
[ "MIT" ]
null
null
null
termpair/server.py
dumpmemory/termpair
543d84af21e2892a8b6f177d1c397b88973b0e98
[ "MIT" ]
null
null
null
termpair/server.py
dumpmemory/termpair
543d84af21e2892a8b6f177d1c397b88973b0e98
[ "MIT" ]
null
null
null
""" Server to receive all output from user's terminal and forward on to any browsers that are watching the broadcast """ import asyncio import json import logging import os import time from hashlib import md5 from typing import Any, Dict, List, Optional import starlette # type: ignore from fastapi import FastAPI #...
33.983806
107
0.666548
0eafc1d458f937a72f0e59e9deee69f03c7456ea
3,150
py
Python
grr/client/grr_response_client/client_build_test.py
ahmednofal/grr
08a57f6873ee13f425d0106e4143663bc6dbdd60
[ "Apache-2.0" ]
null
null
null
grr/client/grr_response_client/client_build_test.py
ahmednofal/grr
08a57f6873ee13f425d0106e4143663bc6dbdd60
[ "Apache-2.0" ]
null
null
null
grr/client/grr_response_client/client_build_test.py
ahmednofal/grr
08a57f6873ee13f425d0106e4143663bc6dbdd60
[ "Apache-2.0" ]
2
2020-08-24T00:22:03.000Z
2020-11-14T08:34:43.000Z
#!/usr/bin/env python """Tests for grr_response_client.client_build.""" from __future__ import absolute_import from __future__ import unicode_literals import multiprocessing import os import platform import unittest import mock from grr_response_core.lib import builders from grr_response_core.lib import flags from g...
33.510638
75
0.706667
227d22c750665ce23a8d02b7e2cedab97703f40f
400
py
Python
LevelObjective.py
Axdecces/Bounce
125ad8def473898bb1efc5d990a9fb964145b784
[ "MIT" ]
null
null
null
LevelObjective.py
Axdecces/Bounce
125ad8def473898bb1efc5d990a9fb964145b784
[ "MIT" ]
null
null
null
LevelObjective.py
Axdecces/Bounce
125ad8def473898bb1efc5d990a9fb964145b784
[ "MIT" ]
null
null
null
from Block import Block class LevelObjective(Block): color = (255, 255, 255) def __init__(self, game, x, y, width, height): super(LevelObjective, self).__init__(game, x, y, width, height, self.color) def update(self, delta_time, events): super(LevelObjective, self).update(delta_time, event...
33.333333
83
0.6775
f5c24f4ccceb7eafd20098329f2e1d8d9c95e5c8
883
py
Python
tests/test_loaddata_dumpdata.py
lphk92/django-concurrency
c2a01c341f79529b3b7cc94adcd89d779608086d
[ "MIT" ]
null
null
null
tests/test_loaddata_dumpdata.py
lphk92/django-concurrency
c2a01c341f79529b3b7cc94adcd89d779608086d
[ "MIT" ]
null
null
null
tests/test_loaddata_dumpdata.py
lphk92/django-concurrency
c2a01c341f79529b3b7cc94adcd89d779608086d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import json import logging import os from six import StringIO from django.core.management import call_command import pytest from demo.models import SimpleConcurrentModel logger = logging.getLogger(__name__) @pytest.ma...
24.527778
72
0.729332
e77ccf7e69337cb64ebacc0b4dc07b277d85335f
3,637
py
Python
server/u2net/u2net_test.py
Salman-Inayat/Agri-D-Map-End-Device
c9712c077ea7bd14b09da336792afc1b573cb2f3
[ "CC0-1.0" ]
null
null
null
server/u2net/u2net_test.py
Salman-Inayat/Agri-D-Map-End-Device
c9712c077ea7bd14b09da336792afc1b573cb2f3
[ "CC0-1.0" ]
null
null
null
server/u2net/u2net_test.py
Salman-Inayat/Agri-D-Map-End-Device
c9712c077ea7bd14b09da336792afc1b573cb2f3
[ "CC0-1.0" ]
null
null
null
import os from skimage import io, transform import torch import torchvision from torch.autograd import Variable import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset, DataLoader from torchvision import transforms#, utils # import torch.optim as optim import numpy as np from PIL imp...
30.822034
132
0.606819
5889b5b683fceb0e86b51b10c8f95885ad9eeb3e
2,766
py
Python
ytdlfunc.py
Wizard684/YouTube-DL-Mega
be11833353d116dbcd0a6af902a14cb5bca998a4
[ "MIT" ]
null
null
null
ytdlfunc.py
Wizard684/YouTube-DL-Mega
be11833353d116dbcd0a6af902a14cb5bca998a4
[ "MIT" ]
null
null
null
ytdlfunc.py
Wizard684/YouTube-DL-Mega
be11833353d116dbcd0a6af902a14cb5bca998a4
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from pyrogram import Client, Filters, StopPropagation, InlineKeyboardButton, InlineKeyboardMarkup import youtube_dl from utils.util import humanbytes import asyncio def buttonmap(item): quality = item['format'] if "audio" in quality: return [InlineKeyboardButto...
34.575
110
0.642444
d7597d179b045952a01b93f85187a6d156f0d1db
3,610
py
Python
test/functional/p2p_feefilter.py
CommanderXanon/Xcoin
58c8daa1346e1b5f563d457c475c7f2804596551
[ "MIT" ]
null
null
null
test/functional/p2p_feefilter.py
CommanderXanon/Xcoin
58c8daa1346e1b5f563d457c475c7f2804596551
[ "MIT" ]
1
2020-06-20T00:39:21.000Z
2020-06-21T02:32:33.000Z
test/functional/p2p_feefilter.py
CommanderXanon/Xcoin
58c8daa1346e1b5f563d457c475c7f2804596551
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016-2018 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 processing of feefilter messages.""" from decimal import Decimal import time from test_framework...
37.604167
81
0.670083
0ce163bc28ccb9d6e4294e44edc57ee2903568f8
4,664
py
Python
commercialoperator/migrations/0069_auto_20200704_1818.py
shibaken/commercialoperator
1e0adfe683288626d9d3113e9efb44e0eba78adb
[ "Apache-2.0" ]
null
null
null
commercialoperator/migrations/0069_auto_20200704_1818.py
shibaken/commercialoperator
1e0adfe683288626d9d3113e9efb44e0eba78adb
[ "Apache-2.0" ]
12
2020-02-12T06:26:55.000Z
2022-02-13T05:52:54.000Z
commercialoperator/migrations/0069_auto_20200704_1818.py
shibaken/commercialoperator
1e0adfe683288626d9d3113e9efb44e0eba78adb
[ "Apache-2.0" ]
8
2020-02-24T05:11:18.000Z
2021-02-26T07:54:24.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2020-07-04 10:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('commercialoperator', '0068_proposalfilmingactivity_half_day'), ] operations = [ ...
61.368421
985
0.652873
fa599c618c3e156ec00d26ca4e9c318233ed38de
36,994
py
Python
AppServer/lib/django-1.5/tests/regressiontests/admin_widgets/tests.py
loftwah/appscale
586fc1347ebc743d7a632de698f4dbfb09ae38d6
[ "Apache-2.0" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
AppServer/lib/django-1.5/tests/regressiontests/admin_widgets/tests.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
AppServer/lib/django-1.5/tests/regressiontests/admin_widgets/tests.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
# encoding: utf-8 from __future__ import absolute_import, unicode_literals from datetime import datetime from django import forms from django.conf import settings from django.contrib import admin from django.contrib.admin import widgets from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase from django...
49.194149
427
0.638239
f05a828963713ad49cf1640d3c66f6012144461b
229
py
Python
First_Ten/09.py
NiCrook/Ebabit_Exercises
235f63e3b6053cbad05d7a3a97595deef085779c
[ "MIT" ]
null
null
null
First_Ten/09.py
NiCrook/Ebabit_Exercises
235f63e3b6053cbad05d7a3a97595deef085779c
[ "MIT" ]
null
null
null
First_Ten/09.py
NiCrook/Ebabit_Exercises
235f63e3b6053cbad05d7a3a97595deef085779c
[ "MIT" ]
null
null
null
# https://edabit.com/challenge/GPmoRCZKkyNtoJMcN # Create a function that takes a string and returns it as an integer. def numberizer(string: str) -> int: number = int(string) return number print(numberizer("7"))
20.818182
71
0.707424
7fdb45e62ffeaecda6d317dde5710b3f18e5f51a
1,463
py
Python
duplyaml/tests/test_construct.py
peterkmurphy/duplyaml
7ce59cacb4ea04c6b12c6abb27a3e1eec2cca0cf
[ "MIT" ]
null
null
null
duplyaml/tests/test_construct.py
peterkmurphy/duplyaml
7ce59cacb4ea04c6b12c6abb27a3e1eec2cca0cf
[ "MIT" ]
null
null
null
duplyaml/tests/test_construct.py
peterkmurphy/duplyaml
7ce59cacb4ea04c6b12c6abb27a3e1eec2cca0cf
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import math from unittest import TestCase from duplyaml import * testnodes = [YAMLScalarNode(NULL_CAN, "!!null"), YAMLScalarNode(FALSE_CAN, "!!bool"), YAMLScalarNode(TRUE_CAN, "!!bool"), YAMLScalarNode("", "tag:yaml.org,2002:str"), YAMLScalarNode("0", "!!...
33.25
110
0.667806
a174201f7df2dfb733be7f15cb50c8b1b4024cee
1,301
py
Python
Analysis/dailyHistogram.py
boztalay/LappyLogger
30d4367e1c55c2d039ade40573dc19aa116e5d17
[ "MIT" ]
null
null
null
Analysis/dailyHistogram.py
boztalay/LappyLogger
30d4367e1c55c2d039ade40573dc19aa116e5d17
[ "MIT" ]
null
null
null
Analysis/dailyHistogram.py
boztalay/LappyLogger
30d4367e1c55c2d039ade40573dc19aa116e5d17
[ "MIT" ]
null
null
null
import sys import csv import datetime import numpy as np import matplotlib.pyplot as plt if len(sys.argv) != 2: print "Please specify a file to read" sys.exit(1) fileToPlot = open(sys.argv[1], "r") csvReader = csv.DictReader(fileToPlot) timestamps = [] data = [] for row in csvReader: timestamps.append(d...
27.680851
97
0.702537
761772351ba7a362c05f50284303534dc0f927f1
6,346
py
Python
rdmo/tasks/tests/test_viewset_task.py
dario-pilori/rdmo
d94e0f85f7a1cfedbfcbf40da1fcc8deb07e1a01
[ "Apache-2.0" ]
null
null
null
rdmo/tasks/tests/test_viewset_task.py
dario-pilori/rdmo
d94e0f85f7a1cfedbfcbf40da1fcc8deb07e1a01
[ "Apache-2.0" ]
null
null
null
rdmo/tasks/tests/test_viewset_task.py
dario-pilori/rdmo
d94e0f85f7a1cfedbfcbf40da1fcc8deb07e1a01
[ "Apache-2.0" ]
null
null
null
import xml.etree.ElementTree as et import pytest from django.urls import reverse from ..models import Task users = ( ('editor', 'editor'), ('reviewer', 'reviewer'), ('user', 'user'), ('api', 'api'), ('anonymous', None), ) status_map = { 'list': { 'editor': 200, 'reviewer': 200, 'api'...
35.452514
95
0.642137
05898e8fb1ddef6f1b445a291f93911d8044f482
408
py
Python
src/project_name/wsgi.py
510908220/django-backend-template
77c6a789e86654885616334b4a3590934026b07e
[ "MIT" ]
1
2017-01-22T09:24:20.000Z
2017-01-22T09:24:20.000Z
src/project_name/wsgi.py
510908220/django-backend-template
77c6a789e86654885616334b4a3590934026b07e
[ "MIT" ]
null
null
null
src/project_name/wsgi.py
510908220/django-backend-template
77c6a789e86654885616334b4a3590934026b07e
[ "MIT" ]
null
null
null
""" WSGI config for project_name 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/1.10/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO...
24
78
0.779412
8953d70be93fafe3d3c35e26e747db37c15612dc
522
py
Python
ia870/iamat2set.py
andreperesnl/ia870
e6a089e17ea9def39cb9fd6901bbdf72a6ba7dfc
[ "BSD-3-Clause" ]
null
null
null
ia870/iamat2set.py
andreperesnl/ia870
e6a089e17ea9def39cb9fd6901bbdf72a6ba7dfc
[ "BSD-3-Clause" ]
null
null
null
ia870/iamat2set.py
andreperesnl/ia870
e6a089e17ea9def39cb9fd6901bbdf72a6ba7dfc
[ "BSD-3-Clause" ]
1
2020-12-29T23:43:00.000Z
2020-12-29T23:43:00.000Z
# -*- encoding: utf-8 -*- # Module iamat2set from numpy import * def iamat2set(A): from ialimits import ialimits if len(A.shape) == 1: A = A[newaxis,:] offsets = nonzero(ravel(A) - ialimits(A)[0]) if type(offsets) == type(()): offsets = offsets[0] # for compatibility with numarray ...
22.695652
69
0.549808
872b9175293b56a5ad804330dd6ff11fcf818032
57
py
Python
t_base64.py
iloghyr/easy_python
b750f6817d54562b23630e2419bace19da0abf8b
[ "Apache-2.0" ]
1
2018-03-01T02:42:52.000Z
2018-03-01T02:42:52.000Z
t_base64.py
iloghyr/easy_python
b750f6817d54562b23630e2419bace19da0abf8b
[ "Apache-2.0" ]
null
null
null
t_base64.py
iloghyr/easy_python
b750f6817d54562b23630e2419bace19da0abf8b
[ "Apache-2.0" ]
null
null
null
import base64 print base64.b64encode(' sjfiajfsjf safs')
28.5
42
0.807018
8b9848fa1ab632f1edc849a23eabed50de58dee9
1,510
py
Python
read_data.py
DennisMagnusson/voice2voice
cee95b3eda8c2159f6b85e1733652ff8b7a537ce
[ "MIT" ]
null
null
null
read_data.py
DennisMagnusson/voice2voice
cee95b3eda8c2159f6b85e1733652ff8b7a537ce
[ "MIT" ]
null
null
null
read_data.py
DennisMagnusson/voice2voice
cee95b3eda8c2159f6b85e1733652ff8b7a537ce
[ "MIT" ]
1
2021-05-29T04:47:11.000Z
2021-05-29T04:47:11.000Z
import librosa import numpy as np import scipy import torch from scipy.io import wavfile from UniversalVocoding import wav_to_mel from random import shuffle from os import walk, listdir from tqdm import tqdm """ def get_data(base_path): x = [] y = [] i = 0 for sub in tqdm(walk(base_path), total=471): ...
22.205882
97
0.681457
08787752f3b0d97892bc11d63b626ebb86f27916
627
py
Python
static_files/rental/views/stock.py
davhanks/digitalmyworld
0f718be3967d399dddc6105f0b9d4cbc0ab35764
[ "Apache-2.0" ]
null
null
null
static_files/rental/views/stock.py
davhanks/digitalmyworld
0f718be3967d399dddc6105f0b9d4cbc0ab35764
[ "Apache-2.0" ]
null
null
null
static_files/rental/views/stock.py
davhanks/digitalmyworld
0f718be3967d399dddc6105f0b9d4cbc0ab35764
[ "Apache-2.0" ]
null
null
null
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from homepage.models import * from manager import models as mmod from . import templater def process_request(request): '''Get products from the DB''' if request.urlparams[0] == 'out': ...
28.5
84
0.716108
cdb0756592c8e634770f7d41521309041973b23f
1,275
py
Python
plan/plugins/json_stash.py
CodePeasants/pyplan
6e22a974194982f6e000dadc34f43a4b6fee8beb
[ "MIT" ]
null
null
null
plan/plugins/json_stash.py
CodePeasants/pyplan
6e22a974194982f6e000dadc34f43a4b6fee8beb
[ "MIT" ]
null
null
null
plan/plugins/json_stash.py
CodePeasants/pyplan
6e22a974194982f6e000dadc34f43a4b6fee8beb
[ "MIT" ]
null
null
null
# Python standard library import os import json # 3ps import appdirs # Package import plan from plan.logger import log from plan.manager import Manager from plan.abstract_stash import AbstractStash from plan.plugin_registry import RegisterMeta DEFAULT_PATH = appdirs.user_data_dir(appname=plan.__package__, appauthor...
25.5
115
0.67451
fb2a4ffdf7922e50b8bf4108f0dee901e4631892
7,893
py
Python
src/python/pants/backend/docker/subsystems/docker_options.py
bastianwegge/pants
43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/docker/subsystems/docker_options.py
bastianwegge/pants
43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/docker/subsystems/docker_options.py
bastianwegge/pants
43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import os import sys from textwrap import dedent from typing import Any from pants.backend.docker.registries import DockerRegistries from pants.engine....
38.315534
103
0.60636
8d094e87e75e603c4ef217f1c50cb442f3a9a99c
4,188
py
Python
library/software_firmware_inventory.py
uw-med-ets-is/ansible-ilorest-role
8f0f49cfdda228a77046d7d19a344a96d6e6da5f
[ "Apache-2.0" ]
49
2017-06-23T15:26:44.000Z
2022-02-18T13:58:18.000Z
library/software_firmware_inventory.py
uw-med-ets-is/ansible-ilorest-role
8f0f49cfdda228a77046d7d19a344a96d6e6da5f
[ "Apache-2.0" ]
18
2017-09-05T20:21:38.000Z
2022-03-10T17:35:51.000Z
library/software_firmware_inventory.py
uw-med-ets-is/ansible-ilorest-role
8f0f49cfdda228a77046d7d19a344a96d6e6da5f
[ "Apache-2.0" ]
30
2017-05-01T20:43:07.000Z
2022-02-18T07:04:36.000Z
# Copyright 2019 Hewlett Packard Enterprise Development LP # # 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 ...
40.269231
100
0.665712
b965ebbcedfa540683769cf5c0c154c6bb30965f
15,859
py
Python
Unet_training_torch.py
Heisenberg-l/NIH-pacemaker-FPGA
c464cd09f0a4b285334c728496c8897b5bf5e152
[ "MIT" ]
2
2020-11-04T20:45:03.000Z
2020-12-02T01:20:28.000Z
Unet_training_torch.py
Heisenberg-l/NIH-pacemaker-FPGA
c464cd09f0a4b285334c728496c8897b5bf5e152
[ "MIT" ]
null
null
null
Unet_training_torch.py
Heisenberg-l/NIH-pacemaker-FPGA
c464cd09f0a4b285334c728496c8897b5bf5e152
[ "MIT" ]
null
null
null
import os import re import scipy.misc from sklearn.model_selection import train_test_split import numpy as np import matplotlib.pyplot as plt from glob import glob import math from sklearn.utils import shuffle import scipy.signal as signal import torch from torch.autograd import Variable import torch.nn as nn import to...
36.881395
134
0.640204
1e961dc01113fd3b6bdb0cb3d08cc1d22478e656
10,210
py
Python
usaspending_api/etl/management/commands/es_rapidloader.py
Violet26/usaspending-api
3e2b54662bb27217f4af223d429b09c112a01a5a
[ "CC0-1.0" ]
null
null
null
usaspending_api/etl/management/commands/es_rapidloader.py
Violet26/usaspending-api
3e2b54662bb27217f4af223d429b09c112a01a5a
[ "CC0-1.0" ]
null
null
null
usaspending_api/etl/management/commands/es_rapidloader.py
Violet26/usaspending-api
3e2b54662bb27217f4af223d429b09c112a01a5a
[ "CC0-1.0" ]
null
null
null
from datetime import datetime, timezone from django.core.management.base import BaseCommand from pathlib import Path from time import perf_counter from usaspending_api import settings from usaspending_api.broker.helpers.last_load_date import get_last_load_date from usaspending_api.common.elasticsearch.client import i...
45.377778
120
0.653183
0d4c00deab3cdaa11ce8fabc884312942d256d21
4,455
py
Python
stem_cell_hypothesis/zh_electra_base/single/pos.py
emorynlp/stem-cell-hypothesis
48a628093d93d653865fbac6409d179cddd99293
[ "Apache-2.0" ]
4
2021-09-17T15:23:31.000Z
2022-02-28T10:18:04.000Z
stem_cell_hypothesis/zh_electra_base/single/pos.py
emorynlp/stem-cell-hypothesis
48a628093d93d653865fbac6409d179cddd99293
[ "Apache-2.0" ]
null
null
null
stem_cell_hypothesis/zh_electra_base/single/pos.py
emorynlp/stem-cell-hypothesis
48a628093d93d653865fbac6409d179cddd99293
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2021-01-06 16:12 from typing import List from elit.common.dataset import SortingSamplerBuilder from elit.common.transform import NormalizeToken from elit.components.mtl.multi_task_learning import MultiTaskLearning from elit.components.mtl.tasks.constituency import CRFCon...
39.078947
121
0.624916
46d86a28b6cffb989c54a862e963b601ff021e54
1,553
py
Python
SEAS_Utils/Common_Utils/constants.py
zhuchangzhan/SEAS
d844ceecc54a475a5384925f45a2078eef3416ee
[ "MIT" ]
1
2020-12-06T23:09:08.000Z
2020-12-06T23:09:08.000Z
SEAS_Utils/Common_Utils/constants.py
azariven/SEAS
d844ceecc54a475a5384925f45a2078eef3416ee
[ "MIT" ]
null
null
null
SEAS_Utils/Common_Utils/constants.py
azariven/SEAS
d844ceecc54a475a5384925f45a2078eef3416ee
[ "MIT" ]
1
2020-01-04T17:32:31.000Z
2020-01-04T17:32:31.000Z
""" Astrophysical and Atmospherical constants used in the simulation all paramters, unless specified, are assumed to be in SI units """ import numpy as np from scipy.constants import h,k,c # Physical Parameters HPlanck = 6.626070040e-34 c = 2.998e8 CLight = 2.998e8 V_c = 2.998e8 BoltK = 1.38064852e-23 mH = 1.660...
16.010309
64
0.529942
27c3e5dcecb79f53a323e42ecbc6e5517504b21f
3,011
py
Python
sympy/matrices/expressions/matmul.py
goodok/sympy
de84ed2139125a755ea7b6ba91d945d9fbbe5ed9
[ "BSD-3-Clause" ]
2
2015-05-11T12:26:38.000Z
2016-08-19T00:11:03.000Z
sympy/matrices/expressions/matmul.py
goodok/sympy
de84ed2139125a755ea7b6ba91d945d9fbbe5ed9
[ "BSD-3-Clause" ]
null
null
null
sympy/matrices/expressions/matmul.py
goodok/sympy
de84ed2139125a755ea7b6ba91d945d9fbbe5ed9
[ "BSD-3-Clause" ]
null
null
null
from matexpr import MatrixExpr, ShapeError, matrixify, Identity, ZeroMatrix from sympy.core import Mul, Add, Basic class MatMul(MatrixExpr, Mul): """A Product of Matrix Expressions MatMul inherits from and operates like SymPy Mul >>> from sympy import MatMul, MatrixSymbol >>> A = MatrixSymbol('A', 5,...
33.831461
79
0.582531
32dc1d86876a4ba21d4edfcaa4fe8e217bcf79b2
1,650
py
Python
data-engineering/l06/practice/lesson.py
IevgenV/edu-robot-dreams
af70cf2f22b6057242edadc558c2da7e736107ba
[ "BSD-3-Clause" ]
null
null
null
data-engineering/l06/practice/lesson.py
IevgenV/edu-robot-dreams
af70cf2f22b6057242edadc558c2da7e736107ba
[ "BSD-3-Clause" ]
null
null
null
data-engineering/l06/practice/lesson.py
IevgenV/edu-robot-dreams
af70cf2f22b6057242edadc558c2da7e736107ba
[ "BSD-3-Clause" ]
null
null
null
import os import json from fastavro import writer, reader, parse_schema def write_avro(): schema = { "namespace": "sample.avro", "type": "record", "name": "Cars", "fields": [ {"name": "model", "type": "string"}, {"name": "make", "type": ["string", "null"]},...
30
73
0.481212
3cdd4ba93260dfc27fde956c7c4ae88ca171c972
2,149
py
Python
utils/clustering.py
ywyue/ASIS
fdd3e7fa6701799efcf83d9a464ff1608b5d7694
[ "MIT" ]
269
2019-02-27T01:36:12.000Z
2021-12-24T08:56:10.000Z
utils/clustering.py
ywyue/ASIS
fdd3e7fa6701799efcf83d9a464ff1608b5d7694
[ "MIT" ]
44
2019-03-01T08:25:01.000Z
2022-03-02T06:55:57.000Z
utils/clustering.py
ywyue/ASIS
fdd3e7fa6701799efcf83d9a464ff1608b5d7694
[ "MIT" ]
64
2019-02-28T04:05:42.000Z
2021-08-19T02:42:38.000Z
import os import numpy as np from sklearn.cluster import MeanShift, estimate_bandwidth import time import cv2 COLOR=[np.array([255,0,0]), np.array([0,255,0]), np.array([0,0,255]), np.array([125,125,0]), np.array([0,125,125]), np.array([125,0,125]), np.array([50,100,50]), np.array([100,50,1...
29.847222
109
0.712424
693afda046b1ee1bf8216cff768c8ea65110d6ea
8,110
py
Python
fidellittyapi/crud/article.py
wborbajr/FideLLiTTyAPI
53f38027a747acd8c807a6559d7c802ada21fc1e
[ "MIT" ]
null
null
null
fidellittyapi/crud/article.py
wborbajr/FideLLiTTyAPI
53f38027a747acd8c807a6559d7c802ada21fc1e
[ "MIT" ]
null
null
null
fidellittyapi/crud/article.py
wborbajr/FideLLiTTyAPI
53f38027a747acd8c807a6559d7c802ada21fc1e
[ "MIT" ]
null
null
null
from datetime import datetime from typing import List, Optional from bson import ObjectId from slugify import slugify from ..core.config import ( article_collection_name, database_name, favorites_collection_name, users_collection_name, ) from ..db.mongodb import AsyncIOMotorClient from ..models.articl...
32.310757
86
0.65857
a43d9d0e5a3aaf82098c4b07de2170c81542a6c7
1,414
py
Python
Scripts/03-01-Repertoire-Metadata.py
MaelleCoriou/Musees_App
030f86bf105bf1bf4ab003b3567b5d8288a588e1
[ "Apache-2.0" ]
null
null
null
Scripts/03-01-Repertoire-Metadata.py
MaelleCoriou/Musees_App
030f86bf105bf1bf4ab003b3567b5d8288a588e1
[ "Apache-2.0" ]
null
null
null
Scripts/03-01-Repertoire-Metadata.py
MaelleCoriou/Musees_App
030f86bf105bf1bf4ab003b3567b5d8288a588e1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import pymongo import subprocess import json import os import glob from pymongo import MongoClient def Metadata(): ### transforme liste en dictionnaire path = "C:/Users/utilisateur/SIMPLON/DEV-DATA/projet-chef-d-oeuvre/Version_3/Data" shpfiles = [] for dirpath, subdirs, files in ...
30.085106
129
0.651344
c5bb30a203bab1a5cc3b4e5c0018cd9d9c70dcde
5,317
py
Python
spikewidgets/widgets/featurewidgets/pcawidget.py
KnierimLab/spikewidgets
5ee37a43df21676db646942141c60e9bde95362c
[ "MIT" ]
6
2019-01-23T03:51:31.000Z
2021-02-15T07:54:39.000Z
spikewidgets/widgets/featurewidgets/pcawidget.py
KnierimLab/spikewidgets
5ee37a43df21676db646942141c60e9bde95362c
[ "MIT" ]
52
2019-01-23T10:10:30.000Z
2021-06-27T10:23:10.000Z
spikewidgets/widgets/featurewidgets/pcawidget.py
KnierimLab/spikewidgets
5ee37a43df21676db646942141c60e9bde95362c
[ "MIT" ]
7
2019-01-23T10:06:03.000Z
2020-10-29T18:38:37.000Z
import numpy as np from matplotlib import pyplot as plt from spikewidgets.widgets.basewidget import BaseMultiWidget import spiketoolkit as st def plot_pca_features(recording, sorting, unit_ids=None, max_spikes_per_unit=100, nproj=4, colormap=None, figure=None, ax=None, axes=None, **pca_kwargs): ...
35.925676
117
0.566109
5b8cf2e9d6bc7ff234c0f7738ed66e78c8effdb4
720
py
Python
src/bot.py
ashketchupppp/quote-bot
8594c25564b10d4de632cf3364b7c3a4a3c3b339
[ "MIT" ]
null
null
null
src/bot.py
ashketchupppp/quote-bot
8594c25564b10d4de632cf3364b7c3a4a3c3b339
[ "MIT" ]
null
null
null
src/bot.py
ashketchupppp/quote-bot
8594c25564b10d4de632cf3364b7c3a4a3c3b339
[ "MIT" ]
null
null
null
import os import sys import pathlib from discord.ext import commands from dotenv import load_dotenv from commands import QuoteCommands from mongo import Quotes envPath = pathlib.Path(__file__).parent.parent.resolve() load_dotenv(envPath) args = { 'TOKEN': None, 'MONGO_CONN_STR': None } i = 1 for arg in args: a...
19.459459
56
0.726389
03fa849edfbeb4d2b56c29e574b22545066cbf90
9,762
py
Python
Lib/test/test_pep292.py
sireliah/polish-python
605df4944c2d3bc25f8bf6964b274c0a0d297cc3
[ "PSF-2.0" ]
1
2018-06-21T18:21:24.000Z
2018-06-21T18:21:24.000Z
Lib/test/test_pep292.py
sireliah/polish-python
605df4944c2d3bc25f8bf6964b274c0a0d297cc3
[ "PSF-2.0" ]
null
null
null
Lib/test/test_pep292.py
sireliah/polish-python
605df4944c2d3bc25f8bf6964b274c0a0d297cc3
[ "PSF-2.0" ]
null
null
null
# Copyright (C) 2004 Python Software Foundation # Author: barry@python.org (Barry Warsaw) # License: http://www.opensource.org/licenses/PythonSoftFoundation.php zaimportuj unittest z string zaimportuj Template klasa Bag: dalej klasa Mapping: def __getitem__(self, name): obj = self dla part w...
39.204819
79
0.536161