hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
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
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
4b396d7ef57b81a9da0897b5335821bdb75365f3
703
py
Python
final_project/machinetranslation/tests/test_translator.py
iamnikaa/xzceb-flask_eng_fr
7bfcfc14c301b783cd2fa12b77970d8dcd11e02c
[ "Apache-2.0" ]
null
null
null
final_project/machinetranslation/tests/test_translator.py
iamnikaa/xzceb-flask_eng_fr
7bfcfc14c301b783cd2fa12b77970d8dcd11e02c
[ "Apache-2.0" ]
null
null
null
final_project/machinetranslation/tests/test_translator.py
iamnikaa/xzceb-flask_eng_fr
7bfcfc14c301b783cd2fa12b77970d8dcd11e02c
[ "Apache-2.0" ]
null
null
null
"""Unittest module for testing translator module""" import unittest from translator import englishToFrench from translator import frenchToEnglish class TranslatorTest(unittest.TestCase): """Test functions for english to french and french to english translator functions""" def test_englishToFrench(self): ...
35.15
89
0.72973
cc8d41d87b3706845606fa4c1c65216f03301cb9
1,870
py
Python
StringMatching.py
tasselcui/misc
4dfe0d9386b472a574d419492df0cdc9dedb164a
[ "MIT" ]
null
null
null
StringMatching.py
tasselcui/misc
4dfe0d9386b472a574d419492df0cdc9dedb164a
[ "MIT" ]
null
null
null
StringMatching.py
tasselcui/misc
4dfe0d9386b472a574d419492df0cdc9dedb164a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Jul 10 21:30:42 2018 @author: lenovo """ P = 'ababaca' T = 'cuiababacababaca' # 3 and 9 shifts #------------------------------------------------------------------------------ def Naive(T, P): n = len(T) m = len(P) for s in range(n - m + 1): ...
26.714286
80
0.28877
ef71e4a404c2846a5bd9c00b112836b1c4378c11
1,220
py
Python
perfkitbenchmarker/scripts/object_storage_api_test_scripts/gcs.py
msidana/PerfKitBenchmarker
2784642d3e6b20b3f474c4e27edb1ef163804f66
[ "Apache-2.0" ]
1
2018-08-28T19:33:21.000Z
2018-08-28T19:33:21.000Z
perfkitbenchmarker/scripts/object_storage_api_test_scripts/gcs.py
msidana/PerfKitBenchmarker
2784642d3e6b20b3f474c4e27edb1ef163804f66
[ "Apache-2.0" ]
1
2021-03-26T00:41:05.000Z
2021-03-26T00:41:05.000Z
perfkitbenchmarker/scripts/object_storage_api_test_scripts/gcs.py
msidana/PerfKitBenchmarker
2784642d3e6b20b3f474c4e27edb1ef163804f66
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
32.105263
74
0.759016
12d392a9f839c3bb37aa64da265c1d6d4d7f5aed
7,552
py
Python
train.py
jmnickerson05/Udacity_ImageClassifier_CLI
9305db86ed3789e187548d52197e7c7c857e3701
[ "MIT" ]
null
null
null
train.py
jmnickerson05/Udacity_ImageClassifier_CLI
9305db86ed3789e187548d52197e7c7c857e3701
[ "MIT" ]
null
null
null
train.py
jmnickerson05/Udacity_ImageClassifier_CLI
9305db86ed3789e187548d52197e7c7c857e3701
[ "MIT" ]
null
null
null
from workspace_utils import active_session import torch from torch import nn, optim from torchvision import datasets, transforms, models import os, copy, time, json, argparse def main(): parser = argparse.ArgumentParser() parser.add_argument('data_directory') parser.add_argument('--save_dir', default='.')...
44.163743
124
0.521319
2d17582f56c15c4883c16e11279f690712571482
833
py
Python
CCC-2019/WaterlooWinningScoreProblem2019J1.py
akkik04/University-of-Waterloo-CCC-Solutions
c5398a0aff36ccfc472413390a293db20637a5be
[ "MIT" ]
3
2021-06-26T21:47:35.000Z
2021-08-25T01:37:11.000Z
CCC-2019/WaterlooWinningScoreProblem2019J1.py
akkik04/University-of-Waterloo-CCC-Solutions
c5398a0aff36ccfc472413390a293db20637a5be
[ "MIT" ]
null
null
null
CCC-2019/WaterlooWinningScoreProblem2019J1.py
akkik04/University-of-Waterloo-CCC-Solutions
c5398a0aff36ccfc472413390a293db20637a5be
[ "MIT" ]
null
null
null
# 2019 CCC PROBLEM J1'S SOLUTION: # declaring variables to store input for the apples team. three_point_apples = int(input()) two_point_apples = int(input()) one_point_apples = int(input()) # declaring variables to store input for the bananas team. three_point_bananas = int(input()) two_point_bananas = int(...
33.32
93
0.735894
cbf5638ab4dba5f4bfc8f4433c8d6b173b7a80a1
47,105
py
Python
tensorflow/python/keras/distribute/distributed_training_utils.py
Caochuanhao/tensorflow
9aaf74d733a38cf587a75f2ffaa05d8a51d8c32b
[ "Apache-2.0" ]
1
2019-07-18T09:16:43.000Z
2019-07-18T09:16:43.000Z
tensorflow/python/keras/distribute/distributed_training_utils.py
Caochuanhao/tensorflow
9aaf74d733a38cf587a75f2ffaa05d8a51d8c32b
[ "Apache-2.0" ]
null
null
null
tensorflow/python/keras/distribute/distributed_training_utils.py
Caochuanhao/tensorflow
9aaf74d733a38cf587a75f2ffaa05d8a51d8c32b
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
40.607759
94
0.728458
113003d6f60040230b1a5cf46f7d7ff2d1f6fca0
226
py
Python
SimPEG/EM/__init__.py
kimjaed/simpeg
b8d716f86a4ea07ba3085fabb24c2bc974788040
[ "MIT" ]
3
2020-11-27T03:18:28.000Z
2022-03-18T01:29:58.000Z
SimPEG/EM/__init__.py
kimjaed/simpeg
b8d716f86a4ea07ba3085fabb24c2bc974788040
[ "MIT" ]
null
null
null
SimPEG/EM/__init__.py
kimjaed/simpeg
b8d716f86a4ea07ba3085fabb24c2bc974788040
[ "MIT" ]
1
2019-12-27T15:58:49.000Z
2019-12-27T15:58:49.000Z
from __future__ import absolute_import from scipy.constants import mu_0, epsilon_0 from . import TDEM from . import FDEM from . import NSEM from . import Static from . import Base from . import Analytics from . import Utils
18.833333
43
0.787611
8ce6c67ce5f5c768169c5ad457994ee099e207c5
46,185
py
Python
tests/functions/test_conditional_join.py
samukweku/pyjanitor
9a6cadfc7fa6e109e805722703af6247a6707711
[ "MIT" ]
null
null
null
tests/functions/test_conditional_join.py
samukweku/pyjanitor
9a6cadfc7fa6e109e805722703af6247a6707711
[ "MIT" ]
3
2020-09-29T04:41:33.000Z
2021-07-26T07:11:23.000Z
tests/functions/test_conditional_join.py
samukweku/pyjanitor
9a6cadfc7fa6e109e805722703af6247a6707711
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import pytest from hypothesis import given, settings from pandas.testing import assert_frame_equal from janitor.testing_utils.strategies import ( conditional_df, conditional_right, conditional_series, ) @pytest.mark.xfail(reason="empty object will pass thru") @given(...
29.81601
104
0.598744
7755937efb9ed31f4b4e28eecd0bb9a221a20dc0
2,913
py
Python
elementary_datastructures/linked_list/Sentinel_LinkedList.py
apri-me/datastructure-journey
315cbce29a263a899a966fd6041293c08db7a8d0
[ "MIT" ]
3
2021-11-01T22:53:03.000Z
2022-01-22T11:49:56.000Z
elementary_datastructures/linked_list/Sentinel_LinkedList.py
MobinNesari81/datastructure-journey
d6ad2e710fe9238fcf75f8838bab6e813e408789
[ "MIT" ]
null
null
null
elementary_datastructures/linked_list/Sentinel_LinkedList.py
MobinNesari81/datastructure-journey
d6ad2e710fe9238fcf75f8838bab6e813e408789
[ "MIT" ]
4
2021-11-28T07:44:20.000Z
2021-12-12T08:49:17.000Z
''' Implementing Linked list data structure with respect to Sentinel element method. In this program Sentinel element will be a node which is called nil. For safe programming reasons, nil.val will be None which will return some exceptions if in any part of the program we want to compare it with another node...
39.90411
159
0.611397
e968d90f2cae63e521cd8445a62d3b7ccd981fa1
14,739
py
Python
examples/classify/semi_supervised/img/libml/augment/randaugment/augment_ops.py
parmarsuraj99/objax
111cd78960f5812885505b5ec02552b98a789973
[ "Apache-2.0" ]
715
2020-08-20T07:23:03.000Z
2022-03-31T18:17:54.000Z
examples/classify/semi_supervised/img/libml/augment/randaugment/augment_ops.py
parmarsuraj99/objax
111cd78960f5812885505b5ec02552b98a789973
[ "Apache-2.0" ]
145
2020-08-21T07:42:36.000Z
2022-03-18T16:51:37.000Z
examples/classify/semi_supervised/img/libml/augment/randaugment/augment_ops.py
parmarsuraj99/objax
111cd78960f5812885505b5ec02552b98a789973
[ "Apache-2.0" ]
59
2020-08-20T07:30:53.000Z
2022-01-05T23:00:06.000Z
# Copyright 2020 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, ...
34.92654
153
0.631997
ea07bcd1f5518f5c822e44897090367504b6191b
2,757
py
Python
tests/test_prep_tasks.py
rednafi/rush
216d0a8f85ec90853608de4226fb61b2d287cf9f
[ "MIT" ]
32
2019-12-20T15:01:32.000Z
2021-04-30T18:58:17.000Z
tests/test_prep_tasks.py
rednafi/rush
216d0a8f85ec90853608de4226fb61b2d287cf9f
[ "MIT" ]
22
2019-12-21T08:24:26.000Z
2020-01-22T19:30:53.000Z
tests/test_prep_tasks.py
rednafi/rush
216d0a8f85ec90853608de4226fb61b2d287cf9f
[ "MIT" ]
4
2020-01-16T22:41:28.000Z
2021-05-31T21:30:01.000Z
from collections import OrderedDict import pytest import yaml from mock import patch from rush_cli.prep_tasks import PrepTasks from rush_cli.prep_tasks import Views @pytest.fixture def make_preptasks(): obj = PrepTasks() return obj def test_clean_tasks(make_preptasks): obj = make_preptasks asser...
23.168067
82
0.635111
db741988bd36b8dd8cb04415185731c74e951572
63,899
py
Python
Test.py
Tony031218/manim-projects
b243dec0f0a007649a92938e90d60eccb4c7dd15
[ "Apache-2.0" ]
45
2019-10-08T23:58:20.000Z
2020-05-20T03:49:15.000Z
Test.py
Tony031218/manim-projects
b243dec0f0a007649a92938e90d60eccb4c7dd15
[ "Apache-2.0" ]
null
null
null
Test.py
Tony031218/manim-projects
b243dec0f0a007649a92938e90d60eccb4c7dd15
[ "Apache-2.0" ]
12
2019-08-15T08:07:22.000Z
2020-05-09T12:34:14.000Z
from manimlib.imports import * from manim_projects.tony_useful.imports import * from random import randint ''' 这个文件中是群友问问题时我写的测试代码(2020.02.03开始) 一些目的和效果已经通过文档字符串的形式给出 ''' class Test0(Scene): def construct(self): circle = Circle(radius=3) poly = [] for i in range(3, 11): po = Po...
32.584906
170
0.53896
08cb4c8064d8360c27a8321c672012078a2b889f
4,013
py
Python
virtool/jobs/create_sample.py
jinxuchen/virtool
5a6e48fab986d77ad76d5583fa560798babe3f25
[ "MIT" ]
null
null
null
virtool/jobs/create_sample.py
jinxuchen/virtool
5a6e48fab986d77ad76d5583fa560798babe3f25
[ "MIT" ]
null
null
null
virtool/jobs/create_sample.py
jinxuchen/virtool
5a6e48fab986d77ad76d5583fa560798babe3f25
[ "MIT" ]
null
null
null
import os import shutil import virtool.files.db import virtool.samples.db import virtool.jobs.fastqc import virtool.jobs.job import virtool.jobs.utils import virtool.samples.utils import virtool.utils class Job(virtool.jobs.job.Job): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs)...
29.07971
119
0.552455
a9ab94c5cb1f497cd06a0d2b775b38b37eb47da0
2,549
py
Python
evaluation/gekko/statistics.py
mczero80/japonicus
d183f24a7e1d0e52052f4c6e5e82604d9e7700d3
[ "MIT" ]
229
2018-01-05T13:32:52.000Z
2021-12-18T00:57:49.000Z
evaluation/gekko/statistics.py
mczero80/japonicus
d183f24a7e1d0e52052f4c6e5e82604d9e7700d3
[ "MIT" ]
142
2018-01-04T23:39:28.000Z
2019-12-14T16:38:24.000Z
evaluation/gekko/statistics.py
mczero80/japonicus
d183f24a7e1d0e52052f4c6e5e82604d9e7700d3
[ "MIT" ]
95
2018-01-06T05:35:23.000Z
2021-12-13T16:42:22.000Z
#!/bin/python from deap import tools import numpy as np epochStatisticsNames = { 'avg': 'Average profit', 'std': 'Profit variation', 'min': 'Minimum profit', 'max': 'Maximum profit', 'size': 'Population size', 'maxsize': 'Max population size', 'avgTrades': 'Avg trade number', 'sharpe':...
34.445946
81
0.635151
f34623c6dadd4553f2cf87709c2d932fca3c52ef
13,521
py
Python
python/ray/serve/api.py
hekaisheng/ray
05fe6dc278126352e830a21b408027bd7a8cfd78
[ "Apache-2.0" ]
1
2021-04-08T12:02:58.000Z
2021-04-08T12:02:58.000Z
python/ray/serve/api.py
hekaisheng/ray
05fe6dc278126352e830a21b408027bd7a8cfd78
[ "Apache-2.0" ]
null
null
null
python/ray/serve/api.py
hekaisheng/ray
05fe6dc278126352e830a21b408027bd7a8cfd78
[ "Apache-2.0" ]
null
null
null
from functools import wraps import ray from ray.serve.constants import (DEFAULT_HTTP_HOST, DEFAULT_HTTP_PORT, SERVE_CONTROLLER_NAME, HTTP_PROXY_TIMEOUT) from ray.serve.controller import ServeController from ray.serve.handle import RayServeHandle from ray.serve.utils import (block_until...
35.675462
79
0.647585
c7b7b939485e16388731e8ee8401ca172479b7f5
1,297
py
Python
ensysmod/model/energy_model_parameter.py
NOWUM/EnSysMod
18c8a2198db3510e667c1f0298d00a3dfcb0aab7
[ "MIT" ]
1
2021-12-10T19:41:01.000Z
2021-12-10T19:41:01.000Z
ensysmod/model/energy_model_parameter.py
NOWUM/EnSysMod
18c8a2198db3510e667c1f0298d00a3dfcb0aab7
[ "MIT" ]
83
2021-10-20T22:54:28.000Z
2022-03-24T19:07:06.000Z
ensysmod/model/energy_model_parameter.py
NOWUM/EnSysMod
18c8a2198db3510e667c1f0298d00a3dfcb0aab7
[ "MIT" ]
null
null
null
import enum from sqlalchemy import Column, Integer, ForeignKey, Float, UniqueConstraint, Enum from sqlalchemy.orm import relationship from ensysmod.database.base_class import Base from ensysmod.database.ref_base_class import RefCRBase class EnergyModelParameterAttribute(enum.Enum): yearly_limit = 'yearly_limit'...
30.162791
81
0.744796
46ee8802a906a482bf4c5a6763d312084ea1718c
4,602
py
Python
explorer/utils.py
thecardcheat/django-sql-explorer
30676258bdbd1614d26bb89ca5f07c2cff2321c1
[ "MIT" ]
null
null
null
explorer/utils.py
thecardcheat/django-sql-explorer
30676258bdbd1614d26bb89ca5f07c2cff2321c1
[ "MIT" ]
null
null
null
explorer/utils.py
thecardcheat/django-sql-explorer
30676258bdbd1614d26bb89ca5f07c2cff2321c1
[ "MIT" ]
1
2020-06-15T16:44:58.000Z
2020-06-15T16:44:58.000Z
import functools import re from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.views import LoginView from django.contrib.auth import REDIRECT_FIELD_NAME from six import text_type import sqlparse from explorer import app_settings EXPLORER_PARAM_TOKEN = "$$" def passes_blacklist(sql): ...
26.297143
140
0.680791
675666cce1eeca3da6459cea3e1ab142af48330c
3,765
py
Python
third_party/sqlalchemy_migrate_0_7_1/migrate/changeset/databases/firebird.py
bopopescu/build
4e95fd33456e552bfaf7d94f7d04b19273d1c534
[ "BSD-3-Clause" ]
null
null
null
third_party/sqlalchemy_migrate_0_7_1/migrate/changeset/databases/firebird.py
bopopescu/build
4e95fd33456e552bfaf7d94f7d04b19273d1c534
[ "BSD-3-Clause" ]
null
null
null
third_party/sqlalchemy_migrate_0_7_1/migrate/changeset/databases/firebird.py
bopopescu/build
4e95fd33456e552bfaf7d94f7d04b19273d1c534
[ "BSD-3-Clause" ]
1
2020-07-23T11:05:06.000Z
2020-07-23T11:05:06.000Z
""" Firebird database specific implementations of changeset classes. """ from sqlalchemy.databases import firebird as sa_base from sqlalchemy.schema import PrimaryKeyConstraint from migrate import exceptions from migrate.changeset import ansisql, SQLA_06 if SQLA_06: FBSchemaGenerator = sa_base.FBDDLCompiler el...
37.65
87
0.683931
b35cae32a94630e5b3d757e76d76dddf64a5eb61
9,369
py
Python
ad-insertion/frontend/manifest_dash.py
jhou5/Ad-Insertion-Sample
c944c7386f0645ba935c1f9f6ddb9c244a4167f1
[ "BSD-3-Clause" ]
null
null
null
ad-insertion/frontend/manifest_dash.py
jhou5/Ad-Insertion-Sample
c944c7386f0645ba935c1f9f6ddb9c244a4167f1
[ "BSD-3-Clause" ]
1
2019-05-03T23:14:50.000Z
2019-05-03T23:14:50.000Z
ad-insertion/frontend/manifest_dash.py
jhou5/Ad-Insertion-Sample
c944c7386f0645ba935c1f9f6ddb9c244a4167f1
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python3 import xml.etree.ElementTree as ET from copy import deepcopy import re import time #PT0H1M59.89S def _to_seconds(time): s=0 m=re.search("([0-9.]+)H",time) if m: s=s+float(m.group(1))*3600 m=re.search("([0-9.]+)M",time) if m: s=s+float(m.group(1))*60 m=re.search("([0-9.]+)S",...
47.558376
177
0.607642
de33d4372dd0b40cbb5871debc1a44f93fe6c1eb
5,607
py
Python
layout_rpt.py
dstreev/hive_llap_calculator
5630d55a8bda182996388dc976ee97e2b6cb58b2
[ "Apache-2.0" ]
15
2019-06-13T00:02:15.000Z
2021-02-08T03:13:23.000Z
layout_rpt.py
dstreev/hive_llap_calculator
5630d55a8bda182996388dc976ee97e2b6cb58b2
[ "Apache-2.0" ]
21
2019-08-14T18:46:40.000Z
2021-02-18T20:56:46.000Z
layout_rpt.py
dstreev/hive_llap_calculator
5630d55a8bda182996388dc976ee97e2b6cb58b2
[ "Apache-2.0" ]
4
2019-06-21T15:26:36.000Z
2020-07-10T13:22:14.000Z
#!/usr/bin/env python # use this to parse the Ambari Layout Report that's generated with: # http://${AMBARI_HOST_PORT}/api/v1/clusters/${CLUSTER_NAME}/hosts?fields=Hosts/host_name,host_components,Hosts/ip,Hosts/total_mem,Hosts/os_arch,Hosts/os_type,Hosts/rack_info,Hosts/cpu_count,Hosts/disk_info,metrics/disk,Hosts/ph_...
32.224138
238
0.600856
c376cc4fedcf016ce4dcc8b91ce81970799a6e01
579
py
Python
disdata/migrations/0005_auto_20200708_2003.py
biswajitpatra/KB198_TechOverflow
cb1dc1c080db792c2a9d7723c67ca7ca0e8baae9
[ "MIT" ]
2
2020-09-01T18:17:30.000Z
2020-09-03T09:04:53.000Z
disdata/migrations/0005_auto_20200708_2003.py
biswajitpatra/KB198_TechOverflow
cb1dc1c080db792c2a9d7723c67ca7ca0e8baae9
[ "MIT" ]
3
2021-04-04T15:41:27.000Z
2021-06-10T18:24:08.000Z
disdata/migrations/0005_auto_20200708_2003.py
biswajitpatra/KB198_TechOverflow
cb1dc1c080db792c2a9d7723c67ca7ca0e8baae9
[ "MIT" ]
2
2021-04-04T15:04:05.000Z
2021-11-15T02:58:47.000Z
# Generated by Django 3.0.7 on 2020-07-08 20:03 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('disdata', '0004_auto_202...
26.318182
110
0.677029
36b216d60d84aedcabe48545c354b1a5d9701192
4,382
py
Python
echobot/plugins/admin/title.py
jks15satoshi/echobot
b8f980b330123068f2e9edaa7fd143e70e0ac0fe
[ "MIT" ]
9
2021-01-21T18:08:11.000Z
2021-04-29T13:40:24.000Z
echobot/plugins/admin/title.py
jks15satoshi/echobot
b8f980b330123068f2e9edaa7fd143e70e0ac0fe
[ "MIT" ]
16
2021-01-22T11:41:11.000Z
2021-08-23T09:40:56.000Z
echobot/plugins/admin/title.py
jks15satoshi/echobot
b8f980b330123068f2e9edaa7fd143e70e0ac0fe
[ "MIT" ]
1
2021-02-22T17:05:06.000Z
2021-02-22T17:05:06.000Z
"""群头衔申请""" from typing import Optional import jieba.posseg as posseg from echobot.permission import is_owner as owner from echobot.utils import confirm_intent from echobot.utils.segment_parser import AtSegmentParser from nonebot import require from nonebot.adapters.cqhttp import GROUP, Bot, Event, exception from none...
36.214876
79
0.619808
6b5f57500e4329d5a6f89cf9c89a9d05126cba10
503
py
Python
src/compgrid/__main__.py
Ro-Data/compgrid
c848fb50aa432edc0666154a22bcf2ab128d37d5
[ "0BSD" ]
null
null
null
src/compgrid/__main__.py
Ro-Data/compgrid
c848fb50aa432edc0666154a22bcf2ab128d37d5
[ "0BSD" ]
null
null
null
src/compgrid/__main__.py
Ro-Data/compgrid
c848fb50aa432edc0666154a22bcf2ab128d37d5
[ "0BSD" ]
null
null
null
from . import compgrid, snowflake TARGETS = { "email": compgrid.email, "slack": compgrid.slack, "slackimg": compgrid.slackimg, } if __name__ == "__main__": import argparse import pathlib parser = argparse.ArgumentParser() parser.add_argument("target", choices=TARGETS.keys()) parser....
21.869565
57
0.693837
a05053b897ae382f14266f7bcb11051c780c8287
1,103
py
Python
src/ggrc/migrations/versions/20160901125710_173b800a28f3_update_event_enum_field.py
acidburn0zzz/ggrc-core
386781d08172102eb51030b65db8212974651628
[ "ECL-2.0", "Apache-2.0" ]
1
2016-11-06T05:21:24.000Z
2016-11-06T05:21:24.000Z
src/ggrc/migrations/versions/20160901125710_173b800a28f3_update_event_enum_field.py
acidburn0zzz/ggrc-core
386781d08172102eb51030b65db8212974651628
[ "ECL-2.0", "Apache-2.0" ]
2
2021-02-02T23:09:40.000Z
2021-02-08T21:00:48.000Z
src/ggrc/migrations/versions/20160901125710_173b800a28f3_update_event_enum_field.py
Acidburn0zzz/ggrc-core
386781d08172102eb51030b65db8212974651628
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Update event enum field Create Date: 2016-09-01 12:57:10.984592 """ # disable Invalid constant name pylint warning for mandatory Alembic variables. # pylint: disable=invalid-name import sqlalchemy as s...
26.902439
79
0.657298
96183c791f09f53640155f00cbb637bf11306a4e
58,417
py
Python
torchaudio/transforms.py
brianjo/audio
1d6b15ea0439d84a0804c0bb645456b985e26696
[ "BSD-2-Clause" ]
null
null
null
torchaudio/transforms.py
brianjo/audio
1d6b15ea0439d84a0804c0bb645456b985e26696
[ "BSD-2-Clause" ]
1
2020-10-14T09:45:32.000Z
2020-10-14T09:46:12.000Z
torchaudio/transforms.py
brianjo/audio
1d6b15ea0439d84a0804c0bb645456b985e26696
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import math import warnings from typing import Callable, Optional import torch from torch import Tensor from torchaudio import functional as F from .functional.functional import ( _get_sinc_resample_kernel, _apply_sinc_resample_kernel, ) __all__ = [ 'Spectrogram', 'GriffinLim...
43.594776
117
0.610678
24ba42fb04c4f9c013d2e725e681622dacba5787
5,074
py
Python
django/contrib/comments/views/moderation.py
fizista/django
16f3a6a4c7bab11644d11c2be029374e5095cb56
[ "BSD-3-Clause" ]
1
2019-02-10T19:33:27.000Z
2019-02-10T19:33:27.000Z
django/contrib/comments/views/moderation.py
fizista/django
16f3a6a4c7bab11644d11c2be029374e5095cb56
[ "BSD-3-Clause" ]
null
null
null
django/contrib/comments/views/moderation.py
fizista/django
16f3a6a4c7bab11644d11c2be029374e5095cb56
[ "BSD-3-Clause" ]
1
2020-05-03T20:42:29.000Z
2020-05-03T20:42:29.000Z
from django import template from django.conf import settings from django.contrib import comments from django.contrib.auth.decorators import login_required, permission_required from django.contrib.comments import signals from django.contrib.comments.views.utils import next_redirect, confirmation_view from django.shortcu...
30.939024
95
0.684667
3a0aa67ef0e46228765eb8549d2d3f59625a0392
4,292
py
Python
etc/results.py
sublee/etc
f2be64604da5af0d7739cfacf36f55712f0fc5cb
[ "BSD-3-Clause" ]
4
2016-05-02T07:37:55.000Z
2019-12-24T03:25:26.000Z
etc/results.py
sublee/etc
f2be64604da5af0d7739cfacf36f55712f0fc5cb
[ "BSD-3-Clause" ]
null
null
null
etc/results.py
sublee/etc
f2be64604da5af0d7739cfacf36f55712f0fc5cb
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ etc.results ~~~~~~~~~~~ """ from __future__ import absolute_import import six from etc.helpers import gen_repr, registry __all__ = ['ComparedThenDeleted', 'ComparedThenSwapped', 'Created', 'Deleted', 'Directory', 'EtcdResult', 'Expired', 'Got', 'Node', 'Set', ...
29
79
0.6137
f4791de4dc6ba437cbee536401a78b1114b243b6
5,340
py
Python
adi_study_watch/nrf5_sdk_15.2.0/adi_study_watch/cli/m2m2/inc/python/ppg_application_interface_def.py
ArrowElectronics/Vital-Signs-Monitoring
ba43fe9a116d94170561433910fd7bffba5726e7
[ "Unlicense" ]
5
2021-06-13T17:11:19.000Z
2021-12-01T18:20:38.000Z
adi_study_watch/nrf5_sdk_15.2.0/adi_study_watch/cli/m2m2/inc/python/ppg_application_interface_def.py
ArrowElectronics/Vital-Signs-Monitoring
ba43fe9a116d94170561433910fd7bffba5726e7
[ "Unlicense" ]
null
null
null
adi_study_watch/nrf5_sdk_15.2.0/adi_study_watch/cli/m2m2/inc/python/ppg_application_interface_def.py
ArrowElectronics/Vital-Signs-Monitoring
ba43fe9a116d94170561433910fd7bffba5726e7
[ "Unlicense" ]
1
2022-01-08T15:01:44.000Z
2022-01-08T15:01:44.000Z
from ctypes import * from common_application_interface_def import * from common_sensor_interface_def import * from dcb_interface_def import * from m2m2_core_def import * class M2M2_PPG_APP_CMD_ENUM_t(c_ubyte): _M2M2_PPG_APP_CMD_LOWEST = 0x40 M2M2_PPG_APP_CMD_GET_LAST_STATES_REQ = 0x42 M2M2_PPG_APP_CMD...
29.021739
56
0.591199
8340984ac4236eb711586f512c20608bf4e8704e
14,111
py
Python
project/apps/birth_registration/migrations/0030_auto_20150921_1750.py
kostik/vrs
a347c2d901e1a6b60a85480c9d2b247157881fce
[ "BSD-3-Clause" ]
1
2016-11-09T18:57:23.000Z
2016-11-09T18:57:23.000Z
project/apps/birth_registration/migrations/0030_auto_20150921_1750.py
kostik/vrs
a347c2d901e1a6b60a85480c9d2b247157881fce
[ "BSD-3-Clause" ]
null
null
null
project/apps/birth_registration/migrations/0030_auto_20150921_1750.py
kostik/vrs
a347c2d901e1a6b60a85480c9d2b247157881fce
[ "BSD-3-Clause" ]
4
2016-09-30T08:24:09.000Z
2019-02-28T14:09:19.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import birth_registration.fields import birth_registration.validators class Migration(migrations.Migration): dependencies = [ ('birth_registration', '0029_auto_20150921_1714'), ] operations ...
335.97619
10,325
0.534406
0aa274baae2cbfa6ecb08ccff1d7cfa9712c2151
6,193
py
Python
crontab_module/crons/get_audience_network.py
openmaker-eu/watchtower
af4d3e92b4cf0bf93c10e288a8b8ea97079da86d
[ "MIT" ]
2
2017-05-16T10:57:29.000Z
2017-12-14T11:33:18.000Z
crontab_module/crons/get_audience_network.py
openmaker-eu/watchtower
af4d3e92b4cf0bf93c10e288a8b8ea97079da86d
[ "MIT" ]
9
2018-11-29T07:44:15.000Z
2021-12-13T19:54:18.000Z
crontab_module/crons/get_audience_network.py
openmaker-eu/watchtower
af4d3e92b4cf0bf93c10e288a8b8ea97079da86d
[ "MIT" ]
1
2019-03-17T13:58:18.000Z
2019-03-17T13:58:18.000Z
# Author: Kemal Berk Kocabagli import sys from decouple import config # to get current working directory sys.path.insert(0, config("ROOT_DIR")) from application.utils.basic import * import tweepy # Twitter API helper package from tweepy import OAuthHandler import pymongo # for pymongo functions from datetime import ...
37.762195
231
0.653641
e1dbdd4f3d3791312c3ab8161b0e4e99e9139361
4,104
py
Python
dnacentersdk/models/validators/v1_3_0/jsd_948ea8194348bc0b.py
daxm/dnacentersdk
5baa0cb151fb9e72cf7af1ae29e7541d89c3f06b
[ "MIT" ]
null
null
null
dnacentersdk/models/validators/v1_3_0/jsd_948ea8194348bc0b.py
daxm/dnacentersdk
5baa0cb151fb9e72cf7af1ae29e7541d89c3f06b
[ "MIT" ]
null
null
null
dnacentersdk/models/validators/v1_3_0/jsd_948ea8194348bc0b.py
daxm/dnacentersdk
5baa0cb151fb9e72cf7af1ae29e7541d89c3f06b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """DNA Center Create CLI credentials data model. Copyright (c) 2019 Cisco and/or its affiliates. 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, inclu...
28.699301
78
0.442982
8c4a5c502afac2dabcdc6624b86db300b6d192ab
17,413
py
Python
cbi_toolbox/parallel/mpi.py
idiap/cbi_toolbox
01e1f4ebc0a4156cfc5bbf65da9d932906b304d8
[ "BSD-3-Clause" ]
3
2021-04-21T12:19:54.000Z
2021-11-25T10:31:17.000Z
cbi_toolbox/parallel/mpi.py
idiap/cbi_toolbox
01e1f4ebc0a4156cfc5bbf65da9d932906b304d8
[ "BSD-3-Clause" ]
null
null
null
cbi_toolbox/parallel/mpi.py
idiap/cbi_toolbox
01e1f4ebc0a4156cfc5bbf65da9d932906b304d8
[ "BSD-3-Clause" ]
null
null
null
""" The mpi module allows to distribute operations in MPI communicators. It is an optional feature of cbi_toolbox that requires a working implementation of MPI. """ # Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ # Written by François Marelli <francois.marelli@idiap.ch> # # This file is part of CB...
28.87728
82
0.65721
e9dbafcdbb2ba6426befcd0979083233f5688117
111
py
Python
api/app/routes/index.py
BD103/Reflux
a00b8ec51249f2d59aa5164d46237899c69ff2a7
[ "MIT" ]
30
2021-01-27T22:55:56.000Z
2021-12-26T10:54:48.000Z
api/app/routes/index.py
BD103/Reflux
a00b8ec51249f2d59aa5164d46237899c69ff2a7
[ "MIT" ]
12
2021-01-26T14:48:59.000Z
2021-12-24T17:37:48.000Z
api/app/routes/index.py
BD103/Reflux
a00b8ec51249f2d59aa5164d46237899c69ff2a7
[ "MIT" ]
7
2021-01-29T13:39:53.000Z
2022-01-15T10:17:41.000Z
import flask from app import app @app.route("/") def index_route(): return flask.jsonify({"status": 200})
15.857143
41
0.684685
7cf600ec0f47e7f373da654d3e4c88668a2da1c8
8,008
py
Python
test/widgets/test_cmus.py
1kyu/qtile
da93518b2ab924e803552decdb364d64de46088d
[ "MIT" ]
1
2021-11-15T04:03:59.000Z
2021-11-15T04:03:59.000Z
test/widgets/test_cmus.py
1kyu/qtile
da93518b2ab924e803552decdb364d64de46088d
[ "MIT" ]
null
null
null
test/widgets/test_cmus.py
1kyu/qtile
da93518b2ab924e803552decdb364d64de46088d
[ "MIT" ]
1
2020-04-27T22:20:11.000Z
2020-04-27T22:20:11.000Z
# Copyright (c) 2021 elParaguayo # # 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 limitation the rights # to use, copy, modify, merge, publish, distrib...
32.032
116
0.622378
6a15c3ce0d6e3fcadf9ce916fc80384f6bdfc4fc
478
py
Python
accounts/views.py
lobo-death/uvfriendly-web
af69b2ceafcb3bad5e2f28840846bf97f1b85748
[ "CC0-1.0" ]
null
null
null
accounts/views.py
lobo-death/uvfriendly-web
af69b2ceafcb3bad5e2f28840846bf97f1b85748
[ "CC0-1.0" ]
null
null
null
accounts/views.py
lobo-death/uvfriendly-web
af69b2ceafcb3bad5e2f28840846bf97f1b85748
[ "CC0-1.0" ]
null
null
null
from django.contrib.auth.forms import UserCreationForm from django.urls import reverse_lazy from django.views import generic from django.shortcuts import render template_name = 'accounts' def forgot_password(request): return render(request, 'forgot-password.html') def login(request): return render(request, '...
26.555556
54
0.778243
d3ebe854b305638644258300223827afa4e6b6a1
11,316
py
Python
pch2csd/app.py
holotape/pch2csd
9fab9dcc8d9fe9c4ff272461685d4dfc586d38a9
[ "MIT" ]
null
null
null
pch2csd/app.py
holotape/pch2csd
9fab9dcc8d9fe9c4ff272461685d4dfc586d38a9
[ "MIT" ]
null
null
null
pch2csd/app.py
holotape/pch2csd
9fab9dcc8d9fe9c4ff272461685d4dfc586d38a9
[ "MIT" ]
null
null
null
import argparse import os import sys from io import StringIO from tabulate import tabulate from pch2csd import __version__, __homepage__ from pch2csd.csdgen import ZakSpace, Csd, UdoTemplate, UdoTemplateValidation, Udo from pch2csd.parse import parse_pch2 from pch2csd.patch import Patch, Location from pch2csd.resourc...
45.813765
105
0.58351
22cc25fbf63fb6f4acec09e62a7550166b4e7eab
63
py
Python
count.py
jtr4fh/cs3240-labdemo
f909e93439610e760e289cea032d2fd6ddbbf19e
[ "MIT" ]
null
null
null
count.py
jtr4fh/cs3240-labdemo
f909e93439610e760e289cea032d2fd6ddbbf19e
[ "MIT" ]
null
null
null
count.py
jtr4fh/cs3240-labdemo
f909e93439610e760e289cea032d2fd6ddbbf19e
[ "MIT" ]
null
null
null
def countdown(): print(3) print(2) print(1) print('PARTY!')
12.6
16
0.634921
3846cc3507730ee89781e439dbeccf981b0af744
147
py
Python
tests/classification/FourClass_100/ws_FourClass_100_LogisticRegression_sqlite_code_gen.py
antoinecarme/sklearn2sql_heroku
d680db10683daa419324461eeea851dd8b103ad5
[ "BSD-3-Clause" ]
1
2019-07-09T14:45:18.000Z
2019-07-09T14:45:18.000Z
tests/classification/FourClass_100/ws_FourClass_100_LogisticRegression_sqlite_code_gen.py
antoinecarme/sklearn2sql_heroku
d680db10683daa419324461eeea851dd8b103ad5
[ "BSD-3-Clause" ]
5
2017-11-13T13:35:37.000Z
2021-11-11T12:57:20.000Z
tests/classification/FourClass_100/ws_FourClass_100_LogisticRegression_sqlite_code_gen.py
antoinecarme/sklearn2sql_heroku
d680db10683daa419324461eeea851dd8b103ad5
[ "BSD-3-Clause" ]
1
2021-09-19T15:05:33.000Z
2021-09-19T15:05:33.000Z
from sklearn2sql_heroku.tests.classification import generic as class_gen class_gen.test_model("LogisticRegression" , "FourClass_100" , "sqlite")
29.4
72
0.823129
5bcad05c8f92b1c3d9e9fa44388f7d05e513ed5c
398
py
Python
Scripts/Discord Nitro Generator.py
Wtf-Is-This-x1337/Useful-Scripts
0f51ad216849e3f1dd05b1699d9f1c168b05a5d5
[ "Unlicense" ]
1
2021-02-03T17:48:15.000Z
2021-02-03T17:48:15.000Z
Scripts/Discord Nitro Generator.py
Wtf-Is-This-x1337/Useful-Scripts
0f51ad216849e3f1dd05b1699d9f1c168b05a5d5
[ "Unlicense" ]
null
null
null
Scripts/Discord Nitro Generator.py
Wtf-Is-This-x1337/Useful-Scripts
0f51ad216849e3f1dd05b1699d9f1c168b05a5d5
[ "Unlicense" ]
null
null
null
import random, string amount = int(input('! (all the codes are unchecked) How many Nitro codes do you want to be generated?: ')) value = 1 while value <= amount: code = "https://discord.gift/" + ('').join(random.choices(string.ascii_letters + string.digits, k=16)) f = open('Codes.txt', "a+") f.write(f...
36.181818
107
0.613065
a55c2b964f4ad73639e884d274d84577c231c158
5,627
py
Python
sdk/python/pulumi_azure_native/botservice/v20210301/list_channel_with_keys.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/botservice/v20210301/list_channel_with_keys.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/botservice/v20210301/list_channel_with_keys.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
32.33908
150
0.615426
96d2e399ec14c8c01a8c0eaf6c0f045006803fce
2,900
py
Python
examples/versioned_rows/versioned_rows.py
petit87/sqlalchemy
67d674bd63ca36ac32b23f96e2b19e9dac6b0863
[ "MIT" ]
1
2020-07-21T16:06:40.000Z
2020-07-21T16:06:40.000Z
examples/versioned_rows/versioned_rows.py
petit87/sqlalchemy
67d674bd63ca36ac32b23f96e2b19e9dac6b0863
[ "MIT" ]
4
2020-04-23T19:00:28.000Z
2021-09-28T18:14:58.000Z
examples/versioned_rows/versioned_rows.py
petit87/sqlalchemy
67d674bd63ca36ac32b23f96e2b19e9dac6b0863
[ "MIT" ]
1
2022-02-28T20:16:29.000Z
2022-02-28T20:16:29.000Z
"""Illustrates a method to intercept changes on objects, turning an UPDATE statement on a single row into an INSERT statement, so that a new row is inserted with the new data, keeping the old row intact. """ from sqlalchemy import Column from sqlalchemy import create_engine from sqlalchemy import event from sqlalchemy...
24.166667
78
0.697586
89a2b4dae766e12e0ae1757a1fa9046b37cf3af5
502
py
Python
sampleapp/migrations/0004_job_title.py
ptevans/django-thresher
3a82d7e3828c2537eb9a56bd2e9fffa554f8fbd3
[ "MIT" ]
null
null
null
sampleapp/migrations/0004_job_title.py
ptevans/django-thresher
3a82d7e3828c2537eb9a56bd2e9fffa554f8fbd3
[ "MIT" ]
null
null
null
sampleapp/migrations/0004_job_title.py
ptevans/django-thresher
3a82d7e3828c2537eb9a56bd2e9fffa554f8fbd3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-02-26 01:53 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sampleapp', '0003_auto_20180226_0138'), ] operations = [ migrations.AddFiel...
22.818182
69
0.615538
cf41a6aa2751c841adda537d92a9f589edc64e77
16,770
py
Python
deps/protobuf/objectivec/DevTools/pddm_tests.py
dlminvestments/coremltools
cf6db67bab18346e132124783d46a32b8a7f52c6
[ "BSD-3-Clause" ]
null
null
null
deps/protobuf/objectivec/DevTools/pddm_tests.py
dlminvestments/coremltools
cf6db67bab18346e132124783d46a32b8a7f52c6
[ "BSD-3-Clause" ]
75
2020-11-24T05:37:45.000Z
2022-02-25T15:14:23.000Z
deps/protobuf/objectivec/DevTools/pddm_tests.py
dlminvestments/coremltools
cf6db67bab18346e132124783d46a32b8a7f52c6
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2015 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
32.5
134
0.620215
c28d2c158a84a3cc09db3d92a668b046d12ad578
15,047
py
Python
grafanalib/elasticsearch.py
locan11/grafanalib
002b819ae307674d03e60bacdc3abc7092faa35b
[ "Apache-2.0" ]
null
null
null
grafanalib/elasticsearch.py
locan11/grafanalib
002b819ae307674d03e60bacdc3abc7092faa35b
[ "Apache-2.0" ]
null
null
null
grafanalib/elasticsearch.py
locan11/grafanalib
002b819ae307674d03e60bacdc3abc7092faa35b
[ "Apache-2.0" ]
null
null
null
"""Helpers to create Elasticsearch-specific Grafana queries.""" import attr import itertools from attr.validators import instance_of from grafanalib.core import AlertCondition DATE_HISTOGRAM_DEFAULT_FIELD = 'time_iso8601' ORDER_ASC = 'asc' ORDER_DESC = 'desc' @attr.s class CountMetricAgg(object): """An aggregat...
34.670507
127
0.639131
059e0f450521da36cb63c0b8fe990f3e468a744c
2,979
py
Python
nevow/taglibrary/tabbedPane.py
wthie/nevow
e630de8f640f27df85c38bc37ecdaf4e7b931afc
[ "MIT" ]
49
2015-03-18T15:29:16.000Z
2021-11-17T12:30:51.000Z
nevow/taglibrary/tabbedPane.py
wthie/nevow
e630de8f640f27df85c38bc37ecdaf4e7b931afc
[ "MIT" ]
62
2015-01-21T08:48:08.000Z
2021-04-02T17:31:29.000Z
nevow/taglibrary/tabbedPane.py
wthie/nevow
e630de8f640f27df85c38bc37ecdaf4e7b931afc
[ "MIT" ]
30
2015-02-26T09:35:39.000Z
2021-07-24T12:45:04.000Z
from nevow import tags as t, static, util, loaders, athena, inevow class tabbedPaneGlue: """ Record which holds information about the Javascript & CSS requirements of L{TabbedPane} and L{TabbedPaneFragment}. @type stylesheetPath: C{str} @ivar stylesheetPath: Filesystem path of the tabbed pane sty...
35.047059
91
0.627056
ea502194a3b41abbc1bfb3f8a8b660e376fd83ee
268
py
Python
api/app/util/request.py
Test01DezWebSite/covidex
ce5afe7185a2c3cb02aaf23aca8b185c832a88f5
[ "Apache-2.0" ]
1
2020-05-18T10:09:35.000Z
2020-05-18T10:09:35.000Z
api/app/util/request.py
Test01DezWebSite/covidex
ce5afe7185a2c3cb02aaf23aca8b185c832a88f5
[ "Apache-2.0" ]
null
null
null
api/app/util/request.py
Test01DezWebSite/covidex
ce5afe7185a2c3cb02aaf23aca8b185c832a88f5
[ "Apache-2.0" ]
null
null
null
from fastapi import Request def get_request_ip(request: Request): forwarded_header = 'X-Forwarded-For' request_ip = request.client.host if forwarded_header in request.headers: request_ip = request.headers[forwarded_header] return request_ip
24.363636
54
0.75
243a46dc71994534bc3d49e7e45ba5adfcca3119
1,134
py
Python
lib/matplotlib/tests/test_table.py
adrn/matplotlib
7a9f2347a3b1c1efaef6e547930661a547c20ef2
[ "MIT", "BSD-3-Clause" ]
null
null
null
lib/matplotlib/tests/test_table.py
adrn/matplotlib
7a9f2347a3b1c1efaef6e547930661a547c20ef2
[ "MIT", "BSD-3-Clause" ]
null
null
null
lib/matplotlib/tests/test_table.py
adrn/matplotlib
7a9f2347a3b1c1efaef6e547930661a547c20ef2
[ "MIT", "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, division, print_function, unicode_literals import six import matplotlib.pyplot as plt import numpy as np from matplotlib.testing.decorators import image_comparison @image_comparison(baseline_images=['table_zorder'], extensions=['png'], remo...
25.772727
82
0.560847
0709381537b1d79edefff323acd6fb3fa557bc25
3,333
py
Python
pyconnectomist/tests/test_wrappers.py
neurospin/pyconnectomist
81881fd88d94b3c2bd401602783261a64e818a05
[ "CECILL-B" ]
1
2018-05-24T13:02:41.000Z
2018-05-24T13:02:41.000Z
pyconnectomist/tests/test_wrappers.py
neurospin/pyconnectomist
81881fd88d94b3c2bd401602783261a64e818a05
[ "CECILL-B" ]
null
null
null
pyconnectomist/tests/test_wrappers.py
neurospin/pyconnectomist
81881fd88d94b3c2bd401602783261a64e818a05
[ "CECILL-B" ]
2
2018-06-25T14:20:34.000Z
2022-03-02T14:43:38.000Z
########################################################################## # NSAp - Copyright (C) CEA, 2016 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html # for details. ##########...
36.626374
77
0.649865
a285a3d45e0f8d8b4b47b43187b2799fae6e9eb7
1,038
py
Python
pydron/test_picklesupport.py
DelphianCalamity/pydron
1518dc71b5cf64fde563b864db2a4de74e092c8e
[ "MIT" ]
5
2020-04-06T15:20:56.000Z
2022-01-05T23:11:13.000Z
pydron/test_picklesupport.py
mahmoudimus/pydron
a7b484dec8bcc2730ba9bd76bc63bf3362c05e4d
[ "MIT" ]
null
null
null
pydron/test_picklesupport.py
mahmoudimus/pydron
a7b484dec8bcc2730ba9bd76bc63bf3362c05e4d
[ "MIT" ]
2
2020-11-27T20:21:34.000Z
2021-02-26T23:02:11.000Z
# Copyright (C) 2015 Stefan C. Mueller import unittest import datetime import pickle import pydron.picklesupport class Dummy(object): def __init__(self): self.value = 1 def f(self): return 42 + self.value class TestPickleSupport(unittest.TestCase): def test_module(self): dump...
28.054054
62
0.647399
98e955afb14680b3e1758ee0286635da84160e1e
20,766
py
Python
malmo/MalmoEnv/malmoenv/core.py
SmaleZ/vcl_diayn
b2c47a681675b405d2011bc4a43c3914f3af4ecc
[ "MIT" ]
null
null
null
malmo/MalmoEnv/malmoenv/core.py
SmaleZ/vcl_diayn
b2c47a681675b405d2011bc4a43c3914f3af4ecc
[ "MIT" ]
null
null
null
malmo/MalmoEnv/malmoenv/core.py
SmaleZ/vcl_diayn
b2c47a681675b405d2011bc4a43c3914f3af4ecc
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------------------------------ # Copyright (c) 2018 Microsoft Corporation # # 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 ...
38.742537
104
0.558943
dcc8ca9f110c22976bf2e69ea393e13ab9d5c9c0
2,202
py
Python
cove_cli.py
iainelder/aws-org-inventory
4e433699695d6b740a0995d70705d30792d803df
[ "MIT" ]
1
2021-12-24T12:43:11.000Z
2021-12-24T12:43:11.000Z
cove_cli.py
iainelder/aws-org-inventory
4e433699695d6b740a0995d70705d30792d803df
[ "MIT" ]
6
2021-11-01T15:03:20.000Z
2022-03-19T22:42:16.000Z
cove_cli.py
iainelder/aws-org-inventory
4e433699695d6b740a0995d70705d30792d803df
[ "MIT" ]
null
null
null
import json import sys from argparse import ArgumentParser, Namespace from datetime import datetime from inspect import getfullargspec from typing import Any, Callable, Dict, TextIO, get_args from boto3 import Session from botocove import CoveOutput, cove # type: ignore[import] from typing_inspect import is_generic_t...
28.973684
85
0.642598
83cb6554eccc51ed9baa5ce2d4d53b192a95ab94
9,115
py
Python
python/ingestion/standardized_columns.py
vanshkumar/health-equity-tracker
e3be05ee665f1c6aecab761527f6faf8a5183ea6
[ "MIT" ]
null
null
null
python/ingestion/standardized_columns.py
vanshkumar/health-equity-tracker
e3be05ee665f1c6aecab761527f6faf8a5183ea6
[ "MIT" ]
null
null
null
python/ingestion/standardized_columns.py
vanshkumar/health-equity-tracker
e3be05ee665f1c6aecab761527f6faf8a5183ea6
[ "MIT" ]
null
null
null
from enum import Enum, unique from collections import namedtuple import pandas # The name of the column for a unique string id for the race category. Should be # semi-human readable. See Race enum below for values. RACE_CATEGORY_ID_COL = "race_category_id" # The name of the column that displays the fully-qualified r...
41.811927
80
0.707296
f76f1fb954ada0f955275d43f302adf3b1516bfd
8,875
py
Python
openbb_terminal/cryptocurrency/overview/coinpaprika_view.py
JerBouma/OpenBBTerminal
0c60d70cb29b0a6e4db41d6dd0d34f79a6169b27
[ "MIT" ]
null
null
null
openbb_terminal/cryptocurrency/overview/coinpaprika_view.py
JerBouma/OpenBBTerminal
0c60d70cb29b0a6e4db41d6dd0d34f79a6169b27
[ "MIT" ]
null
null
null
openbb_terminal/cryptocurrency/overview/coinpaprika_view.py
JerBouma/OpenBBTerminal
0c60d70cb29b0a6e4db41d6dd0d34f79a6169b27
[ "MIT" ]
null
null
null
"""CoinPaprika view""" __docformat__ = "numpy" import logging import os from pandas.plotting import register_matplotlib_converters import openbb_terminal.cryptocurrency.overview.coinpaprika_model as paprika from openbb_terminal.cryptocurrency.dataframe_helpers import ( lambda_long_number_format_with_type_check, ...
23.729947
111
0.629296
822e9b586a1bab13972c7713ade7befedb9466b9
1,180
py
Python
python/product_annoter/mapper/votable_merger.py
loumir/modelinstanceinvot-code
246bd04b9eab558813ef09ad69a2a2f3ed7d2d92
[ "Unlicense" ]
null
null
null
python/product_annoter/mapper/votable_merger.py
loumir/modelinstanceinvot-code
246bd04b9eab558813ef09ad69a2a2f3ed7d2d92
[ "Unlicense" ]
2
2022-03-09T18:39:21.000Z
2022-03-11T16:27:45.000Z
python/product_annoter/mapper/votable_merger.py
loumir/modelinstanceinvot-code
246bd04b9eab558813ef09ad69a2a2f3ed7d2d92
[ "Unlicense" ]
1
2021-07-09T12:30:57.000Z
2021-07-09T12:30:57.000Z
''' Created on 16 avr. 2020 @author: laurentmichel ''' from product_annoter.mapper import logger class VOTableMerger(object): ''' classdocs ''' def __init__(self, raw_votable_path, mapping_block_path, output_path): ''' Constructor ''' self.raw_votable_path = raw_votab...
30.25641
74
0.570339
359e10528bbce247d42f091c6aa0f7830af3bf57
3,067
py
Python
evaluate.py
seanjh/DSRecommendationSystems
a08630b0113d35227f56c89e1d1b9394516f6ff6
[ "Apache-2.0" ]
1
2017-04-13T20:15:43.000Z
2017-04-13T20:15:43.000Z
evaluate.py
seanjh/DSRecommendationSystems
a08630b0113d35227f56c89e1d1b9394516f6ff6
[ "Apache-2.0" ]
null
null
null
evaluate.py
seanjh/DSRecommendationSystems
a08630b0113d35227f56c89e1d1b9394516f6ff6
[ "Apache-2.0" ]
null
null
null
import os import math import config import configspark import ml_parse from pyspark.mllib.recommendation import ALS RANKS = [10, 20, 30, 40, 50] LAMBDA_VALUES = [0.01, 0.1, 1.0, 10.0] ITERATIONS = 10 sc = configspark.SPARK_CONTEXT def report_mse_results(outfile, rank, lambda_value, mse, rmse): print("\nRank=%2d...
30.67
80
0.59374
f7684a51897ca7b66db658b118e9ab886946c37f
3,165
py
Python
src/olympia/files/tests/test_decorators.py
leplatrem/addons-server
8b5ebda6f33194aa9fce12c0453574e7f850e6ad
[ "BSD-3-Clause" ]
1
2020-04-07T07:21:25.000Z
2020-04-07T07:21:25.000Z
src/olympia/files/tests/test_decorators.py
leplatrem/addons-server
8b5ebda6f33194aa9fce12c0453574e7f850e6ad
[ "BSD-3-Clause" ]
null
null
null
src/olympia/files/tests/test_decorators.py
leplatrem/addons-server
8b5ebda6f33194aa9fce12c0453574e7f850e6ad
[ "BSD-3-Clause" ]
2
2018-03-04T00:11:22.000Z
2019-12-14T09:45:55.000Z
from django import http from django.core.exceptions import PermissionDenied, ObjectDoesNotExist import pytest from mock import Mock, patch from olympia import amo from olympia.amo.tests import TestCase from olympia.access import acl from olympia.files.decorators import allowed class AllowedTest(TestCase): def ...
41.103896
78
0.711532
ec6177b844824b535c33d169371e0ffac3b07db2
570
py
Python
olist_ecommerce/config.py
mara/mara-olist-ecommerce-data
663660edff1b4cd711a172027081915771628b9f
[ "MIT" ]
1
2021-03-12T04:47:05.000Z
2021-03-12T04:47:05.000Z
olist_ecommerce/config.py
mara/mara-olist-ecommerce-data
663660edff1b4cd711a172027081915771628b9f
[ "MIT" ]
null
null
null
olist_ecommerce/config.py
mara/mara-olist-ecommerce-data
663660edff1b4cd711a172027081915771628b9f
[ "MIT" ]
null
null
null
"""Configuration of loading olist e-commerce dataset to Postgres""" import pathlib def data_dir() -> str: """The directory where the csv files are located""" return pathlib.Path(__file__).parent.parent/'data' def db_name() -> str: """Database name""" return 'olist_ecommerce' def db_user() -> str:...
16.764706
67
0.621053
760f4e45c0081323f7c0be0a88b943045eed3a42
2,682
py
Python
experiments/adversarial_training/cluster_cifar10.py
srakrnxKU/adversarial-project
b75b45d4e24461b804db5ab2b4b28217ed09908f
[ "MIT" ]
3
2020-08-07T12:13:14.000Z
2020-12-11T02:26:17.000Z
experiments/adversarial_training/cluster_cifar10.py
srakrnxKU/adversarial-project
b75b45d4e24461b804db5ab2b4b28217ed09908f
[ "MIT" ]
5
2021-04-30T21:07:02.000Z
2022-01-25T11:50:36.000Z
experiments/adversarial_training/cluster_cifar10.py
srakrnxKU/adversarial-project
b75b45d4e24461b804db5ab2b4b28217ed09908f
[ "MIT" ]
null
null
null
# %% import logging import os import sys import torch from clustre.adversarial_training import cluster_training from clustre.helpers.datasets import cifar10_testloader, cifar10_trainloader from clustre.helpers.metrics import ( classification_report, classification_report_fgsm, classification_report_pgd, ) ...
29.472527
79
0.592095
98f485b591a0b705a9d8146f0ce629e0eef3c925
926
py
Python
I_PROYECTO_DJANGO_ICIT/colegio/estudiantes/migrations/0002_apoderados.py
fernandopacco71/PROGRAMACION-WEB-II-ICIT-REPOSITORIO
edf53e534c7c3d561981813c5cf0af061ea5c601
[ "MIT" ]
2
2021-09-03T00:02:38.000Z
2021-09-09T15:59:42.000Z
I_PROYECTO_DJANGO_ICIT/colegio/estudiantes/migrations/0002_apoderados.py
fernandopacco71/PROGRAMACION-WEB-II-ICIT-REPOSITORIO
edf53e534c7c3d561981813c5cf0af061ea5c601
[ "MIT" ]
null
null
null
I_PROYECTO_DJANGO_ICIT/colegio/estudiantes/migrations/0002_apoderados.py
fernandopacco71/PROGRAMACION-WEB-II-ICIT-REPOSITORIO
edf53e534c7c3d561981813c5cf0af061ea5c601
[ "MIT" ]
null
null
null
# Generated by Django 3.2.6 on 2021-08-25 15:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('estudiantes', '0001_initial'), ] operations = [ migrations.CreateModel( name='Apoderados', fields=[ ...
35.615385
117
0.596112
46562259897ef343769e60cee48f6dbfe76c8f05
10,307
py
Python
register.py
chripell/yaaca
9048ca5dc458f9a7dde9ca745f057f7499b19972
[ "Apache-2.0" ]
1
2020-09-23T19:56:17.000Z
2020-09-23T19:56:17.000Z
register.py
chripell/yaaca
9048ca5dc458f9a7dde9ca745f057f7499b19972
[ "Apache-2.0" ]
null
null
null
register.py
chripell/yaaca
9048ca5dc458f9a7dde9ca745f057f7499b19972
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # register.py # outputs: [x] [y] offset for every image import sys import os import multiprocessing sys.path.append(os.path.join(os.path.dirname(__file__), "astrolove")) sys.path.append("/usr/lib/astrolove") import numpy as np import astrolib as AL import scipy.signal import scipy.ndimage.inte...
38.602996
127
0.582905
43b9334c530cccb48ad6908bc13c1fbae678dd59
10,515
py
Python
train_ee.py
jaykay233/-
9e9d78cde55d9f1a7a0a431f6438b673b86ab510
[ "Apache-2.0" ]
10
2020-08-01T16:47:32.000Z
2022-03-30T04:05:53.000Z
train_ee.py
jaykay233/-
9e9d78cde55d9f1a7a0a431f6438b673b86ab510
[ "Apache-2.0" ]
2
2020-07-14T07:05:48.000Z
2021-11-03T13:20:15.000Z
train_ee.py
jaykay233/-
9e9d78cde55d9f1a7a0a431f6438b673b86ab510
[ "Apache-2.0" ]
2
2021-03-02T07:29:15.000Z
2021-11-08T12:45:40.000Z
import pytorch_lightning as pl import torch from pytorch_lightning import Trainer from torchcrf import CRF from data_process import role2label, trigger2label,label2role,label2trigger from data_process import train_loader, dev_loader, test_loader import json NUM_TAGS = len(role2label) NUM_RELATIONS = len(trigger2label)...
38.097826
158
0.602853
8fae9e04abeed7a7b78776dc79f145cf806698e4
12,097
py
Python
art/estimators/generation/tensorflow.py
synergit/adversarial-robustness-toolbox
192c4beda1f66776f6ede94a11808eb7b4651f01
[ "MIT" ]
null
null
null
art/estimators/generation/tensorflow.py
synergit/adversarial-robustness-toolbox
192c4beda1f66776f6ede94a11808eb7b4651f01
[ "MIT" ]
null
null
null
art/estimators/generation/tensorflow.py
synergit/adversarial-robustness-toolbox
192c4beda1f66776f6ede94a11808eb7b4651f01
[ "MIT" ]
null
null
null
# MIT License # # Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2020 # # 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 limitation the # r...
39.53268
120
0.642473
dc95ba9b445ea680f0e358c5a7d6a16c3eb525e8
10,248
py
Python
contrib/spendfrom/spendfrom.py
hss5747/HashShare-Core
d448f7cad7f6a3947154017bdfe432cdc772d2b9
[ "MIT" ]
2
2019-11-13T09:21:40.000Z
2019-12-09T00:49:25.000Z
contrib/spendfrom/spendfrom.py
hss5747/HashShare-Core
d448f7cad7f6a3947154017bdfe432cdc772d2b9
[ "MIT" ]
null
null
null
contrib/spendfrom/spendfrom.py
hss5747/HashShare-Core
d448f7cad7f6a3947154017bdfe432cdc772d2b9
[ "MIT" ]
1
2019-10-31T00:51:52.000Z
2019-10-31T00:51:52.000Z
#!/usr/bin/env python # # Use the raw transactions API to spend HSSs received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a hashsharecoind or h...
38.238806
112
0.640222
12ccffc815de32595d9539fec0cced5913f799e1
2,588
py
Python
tutorials/01-basics/logistic_regression/main.py
NegatioN/pytorch-tutorial
1ec90fad7260e7871a4912fce552cad90f6c2f4a
[ "MIT" ]
12
2018-03-07T00:44:56.000Z
2019-01-25T11:07:43.000Z
tutorials/01-basics/logistic_regression/main.py
NegatioN/pytorch-tutorial
1ec90fad7260e7871a4912fce552cad90f6c2f4a
[ "MIT" ]
3
2018-03-02T03:38:41.000Z
2018-03-20T00:45:06.000Z
tutorials/01-basics/logistic_regression/main.py
NegatioN/pytorch-tutorial
1ec90fad7260e7871a4912fce552cad90f6c2f4a
[ "MIT" ]
16
2017-10-04T19:38:09.000Z
2021-10-04T14:26:14.000Z
import torch import torch.nn as nn import torchvision.datasets as dsets import torchvision.transforms as transforms from torch.autograd import Variable # Hyper Parameters input_size = 784 num_classes = 10 num_epochs = 5 batch_size = 100 learning_rate = 0.001 # MNIST Dataset (Images and Labels) train_dataset = dsets...
31.560976
94
0.601236
ad506c384debff1a78fb376464e22afdaa4f199d
166
py
Python
actors/actions/damage_action.py
Catsuko/Westward
3c04df668f7e04ca45e622017ffa9dfe6d3c242c
[ "MIT" ]
3
2019-12-22T22:44:43.000Z
2020-02-11T11:14:10.000Z
actors/actions/damage_action.py
Catsuko/Westward
3c04df668f7e04ca45e622017ffa9dfe6d3c242c
[ "MIT" ]
null
null
null
actors/actions/damage_action.py
Catsuko/Westward
3c04df668f7e04ca45e622017ffa9dfe6d3c242c
[ "MIT" ]
null
null
null
from actors.actions.action import Action class DamageAction(Action): def on(self, actor, tile, root): return actor.attempt("damage", root, tile), self
20.75
56
0.698795
40f93829d398d4a48129be0b51cfe9554cb5f143
2,671
py
Python
model/loss.py
happygirlzt/soft_alignment_model_bug_deduplication
9c529542749a52e377baeb99d1782920bc72df49
[ "Unlicense" ]
2
2020-11-11T00:26:25.000Z
2020-12-21T16:17:28.000Z
model/loss.py
happygirlzt/soft_alignment_model_bug_deduplication
9c529542749a52e377baeb99d1782920bc72df49
[ "Unlicense" ]
5
2020-12-22T10:59:38.000Z
2021-07-13T15:00:46.000Z
model/loss.py
irving-muller/soft_alignment_model_bug_deduplication
abf786a17f526d965f1b6c303b06f26662d22f32
[ "Unlicense" ]
6
2020-09-25T01:01:37.000Z
2022-02-20T19:29:31.000Z
import logging from torch.nn.modules.loss import _Loss import torch import torch.nn as nn import torch.nn.functional as F class NeculoiuLoss(_Loss): """ Learning Text Similarity with Siamese Recurrent Networks - Paul Neculoiu, Maarten Versteegh and Mihai Rotaru Contrastive loss for cosine similarity ...
31.05814
118
0.618121
7cb5ed77a1b707b0a1e1c138808c0b5df9d68291
458
py
Python
numba/tests/test_typenames.py
tolysz/numba
d7953a18dbf5ea231dc16e967ce8e9b754578ea6
[ "Apache-2.0", "BSD-2-Clause" ]
null
null
null
numba/tests/test_typenames.py
tolysz/numba
d7953a18dbf5ea231dc16e967ce8e9b754578ea6
[ "Apache-2.0", "BSD-2-Clause" ]
1
2019-02-11T13:46:30.000Z
2019-02-11T13:46:30.000Z
numba/tests/test_typenames.py
asodeur/numba
d7953a18dbf5ea231dc16e967ce8e9b754578ea6
[ "Apache-2.0", "BSD-2-Clause" ]
null
null
null
import numpy as np from numba import types from numba import unittest_support as unittest class TestTypeNames(unittest.TestCase): def test_numpy_integers(self): expect = getattr(types, "int%d" % (np.dtype("int").itemsize * 8)) self.assertEqual(types.int_, expect) expect = getattr(types, ...
25.444444
75
0.676856
e0fc1b9fecabf3876f2450f7fd47bcdbe8e92635
6,503
py
Python
lib/googlecloudsdk/command_lib/iot/resource_args.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/command_lib/iot/resource_args.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/command_lib/iot/resource_args.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
32.193069
78
0.714901
ea2c9b4aeb5c7d3e5cafc9ff3b448f6112901a24
21,074
py
Python
django_q/tasks.py
ashkov/django-q
49e57a6d548ab2bc69b3372bf9eed1617cb59b62
[ "MIT" ]
null
null
null
django_q/tasks.py
ashkov/django-q
49e57a6d548ab2bc69b3372bf9eed1617cb59b62
[ "MIT" ]
null
null
null
django_q/tasks.py
ashkov/django-q
49e57a6d548ab2bc69b3372bf9eed1617cb59b62
[ "MIT" ]
2
2020-11-10T01:14:24.000Z
2021-06-11T12:50:19.000Z
"""Provides task functionality.""" # Standard from time import sleep, time # django from django.db import IntegrityError from django.utils import timezone from multiprocessing import Value from django_q.brokers import get_broker # local from django_q.conf import Conf, logger from django_q.humanhash import uuid from d...
30.453757
120
0.583847
b8d0e8d35667e990fb2df7966b0da79a825c94a0
1,115
py
Python
thetools/users/tests/test_forms.py
sarthaksahni/pseudo-code-flow
516b23af817252729679e3ddcd2c2ebed5b74c6c
[ "MIT" ]
null
null
null
thetools/users/tests/test_forms.py
sarthaksahni/pseudo-code-flow
516b23af817252729679e3ddcd2c2ebed5b74c6c
[ "MIT" ]
null
null
null
thetools/users/tests/test_forms.py
sarthaksahni/pseudo-code-flow
516b23af817252729679e3ddcd2c2ebed5b74c6c
[ "MIT" ]
null
null
null
import pytest from thetools.users.forms import UserCreationForm from thetools.users.tests.factories import UserFactory pytestmark = pytest.mark.django_db class TestUserCreationForm: def test_clean_username(self): # A user with proto_user params does not exist yet. proto_user = UserFactory.build(...
27.195122
59
0.593722
867f6a85b8994bfcf2de66269d8ab6bbc4d8f56e
15,268
py
Python
qa/L0_shared_memory/shared_memory_test.py
jiweibo/triton_server
a0f7868eb0cad9d6a119edf845387ceae808d350
[ "BSD-3-Clause" ]
2,159
2020-08-26T06:21:38.000Z
2022-03-31T16:13:46.000Z
qa/L0_shared_memory/shared_memory_test.py
jiweibo/triton_server
a0f7868eb0cad9d6a119edf845387ceae808d350
[ "BSD-3-Clause" ]
1,482
2020-08-26T08:26:36.000Z
2022-03-31T23:11:19.000Z
qa/L0_shared_memory/shared_memory_test.py
jiweibo/triton_server
a0f7868eb0cad9d6a119edf845387ceae808d350
[ "BSD-3-Clause" ]
592
2020-08-26T06:09:25.000Z
2022-03-31T00:37:41.000Z
# Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
47.26935
83
0.629945
b840af50fd282f34ead02c3cb1ea91de3c4f1595
4,128
py
Python
openshift/test/test_v1_config_map.py
flaper87/openshift-restclient-python
13d5d86ca89035b9f596032e7a34f3cc33bf8f18
[ "Apache-2.0" ]
null
null
null
openshift/test/test_v1_config_map.py
flaper87/openshift-restclient-python
13d5d86ca89035b9f596032e7a34f3cc33bf8f18
[ "Apache-2.0" ]
null
null
null
openshift/test/test_v1_config_map.py
flaper87/openshift-restclient-python
13d5d86ca89035b9f596032e7a34f3cc33bf8f18
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ OpenShift API (with Kubernetes) OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is...
96
3,380
0.787064
b3e204b69561604583a039eadc9b607c6042296d
12,586
py
Python
pyscandl/modules/Pyscandl.py
Annwan/pyscandl
afec7b410699f1bb6289a8653fc7cfa5b0d03406
[ "BSD-3-Clause" ]
null
null
null
pyscandl/modules/Pyscandl.py
Annwan/pyscandl
afec7b410699f1bb6289a8653fc7cfa5b0d03406
[ "BSD-3-Clause" ]
null
null
null
pyscandl/modules/Pyscandl.py
Annwan/pyscandl
afec7b410699f1bb6289a8653fc7cfa5b0d03406
[ "BSD-3-Clause" ]
null
null
null
import contextlib from .excepts import DryNoSauceHere, TooManySauce, EmptyChapter, DelayedRelease from .fetchers.fetcher import StandaloneFetcher from PIL import Image import requests import os from re import sub as re_sub from sys import stderr from wand.image import Image class Pyscandl: """ The main object of t...
37.570149
236
0.713094
5b5e84d4963f0fb3455c3bcb63fb12f2b6eb800d
4,135
py
Python
alipay/aop/api/request/AlipayEbppMerchantExternalbillUploadRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/request/AlipayEbppMerchantExternalbillUploadRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/request/AlipayEbppMerchantExternalbillUploadRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * class AlipayEbppMerchantExternalbillUploadRequest(object): def __init__(self, biz_model=None): self._biz_model = biz_model self._community...
27.026144
166
0.640387
d65cb5c26438ae7017fb24a43d98d8c39ada4174
657
py
Python
pp/samples/13_component_yaml.py
flaport/gdsfactory
1f2e844c1fe27b9c6340e2d51500fd3358fa16e5
[ "MIT" ]
8
2020-08-25T11:25:18.000Z
2022-03-27T11:32:11.000Z
pp/samples/13_component_yaml.py
flaport/gdsfactory
1f2e844c1fe27b9c6340e2d51500fd3358fa16e5
[ "MIT" ]
null
null
null
pp/samples/13_component_yaml.py
flaport/gdsfactory
1f2e844c1fe27b9c6340e2d51500fd3358fa16e5
[ "MIT" ]
1
2022-03-04T07:03:29.000Z
2022-03-04T07:03:29.000Z
import pp netlist = """ instances: CP1: component: mmi1x2 settings: width_mmi: 4.5 length_mmi: 10 CP2: component: mmi1x2 settings: width_mmi: 4.5 length_mmi: 5 arm_top: component: mzi_arm arm_bot: component: mzi_arm...
15.27907
42
0.561644
1ddc0a132b27f5d50057b083d7485063e98b031d
3,632
py
Python
configs/ttfnet/ttfnet_r18_dyndila_param10_scale1e4_1e4_1x.py
mrsempress/mmdetection
cb650560c97a2fe56a9b369a1abc8ec17e06583a
[ "Apache-2.0" ]
null
null
null
configs/ttfnet/ttfnet_r18_dyndila_param10_scale1e4_1e4_1x.py
mrsempress/mmdetection
cb650560c97a2fe56a9b369a1abc8ec17e06583a
[ "Apache-2.0" ]
null
null
null
configs/ttfnet/ttfnet_r18_dyndila_param10_scale1e4_1e4_1x.py
mrsempress/mmdetection
cb650560c97a2fe56a9b369a1abc8ec17e06583a
[ "Apache-2.0" ]
null
null
null
# model settings model = dict( type='TTFNet', pretrained='modelzoo://resnet18', backbone=dict( type='ResNet', depth=18, num_stages=4, local_conv_cfg=dict(type='DynDilaConv', param_multiply=10., alpha_scale=1e-4, split=8), stage_with_local_conv_cfg=(False, False, True,...
31.310345
95
0.631883
fc0429962d81fe7351780331d2200adeaf0f515d
5,610
py
Python
examples/kalman/helpers/feature_handler.py
mfkiwl/laika-gnss
dc38f251dbc7ebb535a3c220de8424634d297248
[ "MIT" ]
365
2018-12-17T07:43:34.000Z
2022-03-29T22:23:39.000Z
examples/kalman/helpers/feature_handler.py
mfkiwl/laika-gnss
dc38f251dbc7ebb535a3c220de8424634d297248
[ "MIT" ]
36
2019-07-24T10:20:45.000Z
2022-02-14T22:11:24.000Z
examples/kalman/helpers/feature_handler.py
mfkiwl/laika-gnss
dc38f251dbc7ebb535a3c220de8424634d297248
[ "MIT" ]
156
2018-12-17T05:06:23.000Z
2022-03-31T12:06:07.000Z
#!/usr/bin/env python3 import os import numpy as np import kalman.helpers.orientation as orient from selfdrive.locationd.kalman.helpers import (TEMPLATE_DIR, load_code, write_code) from selfdrive.locationd.kalman.helpers.sympy_helpers import quat_matrix_l def sane(tr...
35.283019
126
0.630838
8ad2b9e351092d6ffc399778dec20e3648d74fed
4,285
py
Python
examples/mlx90640_pygamer.py
dglaude/Adafruit_CircuitPython_MLX90640
874651ca04b0aea92d54c984203a360784e3acd6
[ "MIT" ]
null
null
null
examples/mlx90640_pygamer.py
dglaude/Adafruit_CircuitPython_MLX90640
874651ca04b0aea92d54c984203a360784e3acd6
[ "MIT" ]
null
null
null
examples/mlx90640_pygamer.py
dglaude/Adafruit_CircuitPython_MLX90640
874651ca04b0aea92d54c984203a360784e3acd6
[ "MIT" ]
null
null
null
import time import board import busio import adafruit_mlx90640 import displayio import terminalio from adafruit_display_text.label import Label number_of_colors = 64 palette = displayio.Palette(number_of_colors) # Palette with all our colors ## Heatmap code inspired from: http://www.andrewnoske.com/wiki/Code_-_heatm...
32.709924
98
0.631039
44f4fa4b8d5ba73aa49967d05978fb2db978bbb3
4,724
py
Python
vega/metrics/mindspore/detection_metric.py
zjzh/vega
aa6e7b8c69024262fc483ee06113b4d1bd5156d8
[ "Apache-2.0" ]
null
null
null
vega/metrics/mindspore/detection_metric.py
zjzh/vega
aa6e7b8c69024262fc483ee06113b4d1bd5156d8
[ "Apache-2.0" ]
null
null
null
vega/metrics/mindspore/detection_metric.py
zjzh/vega
aa6e7b8c69024262fc483ee06113b4d1bd5156d8
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE...
35.787879
102
0.614733
ac8f5ce5dbbbcdd0e54bb4eef17b551f445fa66c
8,956
py
Python
tests/test_headers.py
RedisLabs/jsonrpclib-1
7b3659d2ae373b4f63af81f371494fd3c0e4b74b
[ "Apache-2.0" ]
35
2015-01-16T16:54:03.000Z
2022-03-29T09:07:13.000Z
tests/test_headers.py
RedisLabs/jsonrpclib-1
7b3659d2ae373b4f63af81f371494fd3c0e4b74b
[ "Apache-2.0" ]
43
2015-01-15T23:27:26.000Z
2022-02-19T16:40:56.000Z
tests/test_headers.py
RedisLabs/jsonrpclib-1
7b3659d2ae373b4f63af81f371494fd3c0e4b74b
[ "Apache-2.0" ]
24
2015-02-12T14:11:24.000Z
2021-11-01T03:35:05.000Z
#!/usr/bin/python # -- Content-Encoding: UTF-8 -- """ Tests to verify the additional headers feature :license: Apache License 2.0 """ # Standard library import contextlib import re import sys import unittest import jsonrpclib try: # Python 2 from StringIO import StringIO except ImportError: # Python 3 ...
30.882759
80
0.574252
f99a7cd3235455578928e65caf4dff1f1ea7b1ee
9,397
py
Python
examples/trials/mnist-annotation/mnist.py
kant/nni
ff390b4d5457cd5dec9e5c1c3a98892e5f2aed2a
[ "MIT" ]
1
2019-06-27T16:31:20.000Z
2019-06-27T16:31:20.000Z
examples/trials/mnist-annotation/mnist.py
0Deer0/nni
b4e9f0878d3f74742ae3acd783ddff303b4732cb
[ "MIT" ]
null
null
null
examples/trials/mnist-annotation/mnist.py
0Deer0/nni
b4e9f0878d3f74742ae3acd783ddff303b4732cb
[ "MIT" ]
1
2019-01-04T00:32:14.000Z
2019-01-04T00:32:14.000Z
"""A deep MNIST classifier using convolutional layers.""" import logging import math import tempfile import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data FLAGS = None logger = logging.getLogger('mnist_AutoML') class MnistNetwork(object): ''' MnistNetwork is for initlizing and...
39.649789
202
0.599766
122ae92db8c0fba7f33754fcbab35f9e25571cce
1,032
py
Python
rsp2/src/python/rsp2/io/structure_dir.py
colin-daniels/agnr-ml
fc936cb8b6a68c37dfaf64c74796e0cf795c1bb8
[ "MIT" ]
null
null
null
rsp2/src/python/rsp2/io/structure_dir.py
colin-daniels/agnr-ml
fc936cb8b6a68c37dfaf64c74796e0cf795c1bb8
[ "MIT" ]
null
null
null
rsp2/src/python/rsp2/io/structure_dir.py
colin-daniels/agnr-ml
fc936cb8b6a68c37dfaf64c74796e0cf795c1bb8
[ "MIT" ]
null
null
null
import json import os from pymatgen.io.vasp import Poscar def from_path(path): # TODO: should maybe support .tar.gz or .tar.xz return StructureDir.from_dir(path) class StructureDir: def __init__(self, *, layers, masses, layer_sc_matrices, structure): self.layers = layers self.masses = mass...
32.25
102
0.643411
0276a00a250a94c7b7e52ba7fc6141e96292263b
803
py
Python
app_shop/urls.py
saoguang/hnist2
cac02dd1f9e860a24c99cdf10499307df33dad3b
[ "MIT" ]
null
null
null
app_shop/urls.py
saoguang/hnist2
cac02dd1f9e860a24c99cdf10499307df33dad3b
[ "MIT" ]
1
2020-11-30T01:23:53.000Z
2020-11-30T01:23:53.000Z
app_shop/urls.py
saoguang/hnist2
cac02dd1f9e860a24c99cdf10499307df33dad3b
[ "MIT" ]
null
null
null
"""hnist2 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
33.458333
77
0.711083
869faab6c6664ae441633d4ca2dd843121da41a1
667
py
Python
dbt_gen/py3env/bin/rst2s5.py
norton120/dbt_gen
712fc8698a77c3372f5a403a5ae50711d0cb3c7d
[ "MIT" ]
null
null
null
dbt_gen/py3env/bin/rst2s5.py
norton120/dbt_gen
712fc8698a77c3372f5a403a5ae50711d0cb3c7d
[ "MIT" ]
null
null
null
dbt_gen/py3env/bin/rst2s5.py
norton120/dbt_gen
712fc8698a77c3372f5a403a5ae50711d0cb3c7d
[ "MIT" ]
null
null
null
#!/home/ethan/dbt_gen/dbt_gen/py3env/bin/python3 # $Id: rst2s5.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: Chris Liechti <cliechti@gmx.net> # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing HTML slides using the S5 template system. """ tr...
26.68
74
0.743628
55b0ac1b94393a479b7e3b28497638147b763376
10,187
py
Python
kardioml/segmentation/teijeiro/model/automata.py
Seb-Good/physionet-challenge-2020
c6f1648a148335babc0a26d8a589120616327548
[ "BSD-2-Clause" ]
13
2020-12-18T08:09:34.000Z
2022-03-15T04:51:46.000Z
kardioml/segmentation/teijeiro/model/automata.py
Seb-Good/physionet-challenge-2020
c6f1648a148335babc0a26d8a589120616327548
[ "BSD-2-Clause" ]
null
null
null
kardioml/segmentation/teijeiro/model/automata.py
Seb-Good/physionet-challenge-2020
c6f1648a148335babc0a26d8a589120616327548
[ "BSD-2-Clause" ]
14
2020-09-16T21:07:38.000Z
2022-03-23T14:01:24.000Z
# -*- coding: utf-8 -*- # pylint: disable-msg= """ Created on Thu Dec 19 18:02:37 2013 This module contains the model definition for the automata-based abstraction patterns. Since abstraction patterns are defined by regular grammars, the internal representation is based on finite automatas. @author: T. Teijeiro """ ...
35.494774
109
0.640326
91a3b0b288114f05d07d3b80c229fe0ffeebd59d
17,014
py
Python
lib/tool_shed/util/metadata_util.py
rikeshi/galaxy
c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a
[ "CC-BY-3.0" ]
4
2015-05-12T20:36:41.000Z
2017-06-26T15:34:02.000Z
lib/tool_shed/util/metadata_util.py
rikeshi/galaxy
c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a
[ "CC-BY-3.0" ]
52
2015-03-16T14:02:14.000Z
2021-12-24T09:50:23.000Z
lib/tool_shed/util/metadata_util.py
rikeshi/galaxy
c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a
[ "CC-BY-3.0" ]
1
2016-03-21T12:54:06.000Z
2016-03-21T12:54:06.000Z
import logging from operator import itemgetter from sqlalchemy import and_ from galaxy.tool_shed.util.hg_util import ( INITIAL_CHANGELOG_HASH, reversed_lower_upper_bounded_changelog, ) from galaxy.tool_shed.util.repository_util import get_repository_by_name_and_owner from galaxy.util.tool_shed.common_util imp...
51.557576
142
0.710709
819eea4fcc3e07dc862b3203251c4ed0a37f1297
5,332
py
Python
client_ser_simulation/mvsc_server/server/app.py
klautenschlaeger/mvsc
9cc04ad2353b48e0a6715c859812e1afb67f8bbb
[ "MIT" ]
null
null
null
client_ser_simulation/mvsc_server/server/app.py
klautenschlaeger/mvsc
9cc04ad2353b48e0a6715c859812e1afb67f8bbb
[ "MIT" ]
null
null
null
client_ser_simulation/mvsc_server/server/app.py
klautenschlaeger/mvsc
9cc04ad2353b48e0a6715c859812e1afb67f8bbb
[ "MIT" ]
1
2021-11-09T01:42:40.000Z
2021-11-09T01:42:40.000Z
from flask import Flask, jsonify, request from flask_cors import CORS import distanceCalculator POLYS = [[], [], []] GROUP = [[], [], [1, 2]] MACHINES = [ { 'driverid': 1, 'drivername': 'test', 'forename': 'test', 'machineid': 'John Deere 5430i_12', 'one'...
31
87
0.554764
8bb7a2deefabfd854edc9a2906e13a0d6c0a27a3
7,444
py
Python
enemy.py
cxong/Slappa
bb601734db07ee1f1e1d3763d2c5f6146248fd76
[ "MIT" ]
7
2015-02-24T22:24:45.000Z
2021-05-15T16:39:27.000Z
enemy.py
cxong/Slappa
bb601734db07ee1f1e1d3763d2c5f6146248fd76
[ "MIT" ]
null
null
null
enemy.py
cxong/Slappa
bb601734db07ee1f1e1d3763d2c5f6146248fd76
[ "MIT" ]
1
2016-06-22T11:50:22.000Z
2016-06-22T11:50:22.000Z
from simple_character import * class Enemy(SimpleCharacter): def __init__(self, game, x, y, key, players, thing_keys, things): self.moves = True if key == 'zombie': self.init_zombie(game, x, y) elif key == 'monster': self.init_monster(game, x, y) elif key ==...
38.371134
84
0.510075
aebfe2728148f79689e01069f184a23b76e6fd06
6,484
py
Python
Heat_Transfer/4.3_Pipe_with_&_out_cover.py
Daz-Riza-Seriog/Transport_Phenomena
822b89556fa56ef57494a318cbb03524e3a4d237
[ "MIT" ]
4
2021-03-19T00:15:20.000Z
2021-11-17T11:32:28.000Z
Heat_Transfer/4.3_Pipe_with_&_out_cover.py
Daz-Riza-Seriog/Transport_Phenomena
822b89556fa56ef57494a318cbb03524e3a4d237
[ "MIT" ]
null
null
null
Heat_Transfer/4.3_Pipe_with_&_out_cover.py
Daz-Riza-Seriog/Transport_Phenomena
822b89556fa56ef57494a318cbb03524e3a4d237
[ "MIT" ]
1
2021-03-22T23:26:50.000Z
2021-03-22T23:26:50.000Z
# Code made for Sergio Andrés Díaz Ariza # 12 Abril 2021 # License MIT # Transport Phenomena: Python Program-Assessment 4.3 import matplotlib.pyplot as plt import seaborn as sns import numpy as np from scipy.optimize import minimize sns.set() # Solve for Temperature of Steam at given Pressure class enviroment_convec...
43.516779
120
0.543492
5fe2d14815e4a00c8ea1ad59d3c645f16e53b4ef
30,532
py
Python
spyder/widgets/fileswitcher.py
sharmalabs/spyder
7d2201699b6df6d4e72c73379dca0510f643bef9
[ "MIT" ]
null
null
null
spyder/widgets/fileswitcher.py
sharmalabs/spyder
7d2201699b6df6d4e72c73379dca0510f643bef9
[ "MIT" ]
null
null
null
spyder/widgets/fileswitcher.py
sharmalabs/spyder
7d2201699b6df6d4e72c73379dca0510f643bef9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) # Standard library imports from __future__ import print_function import os import os.path as osp # Third party imports from qtpy.QtCore import Signal, QEvent, QObjec...
37.325183
82
0.566127
bbb0af8e20a48242e7cfbe7031a3b7969faa2459
5,339
py
Python
twisted/cred/portal.py
ioggstream/twisted
34f9b1e3f097685839000c656332c66ee85be5d8
[ "Unlicense", "MIT" ]
7
2015-04-28T13:26:11.000Z
2020-02-09T17:01:04.000Z
twisted/cred/portal.py
ioggstream/twisted
34f9b1e3f097685839000c656332c66ee85be5d8
[ "Unlicense", "MIT" ]
4
2017-02-19T23:58:13.000Z
2019-11-01T15:31:22.000Z
twisted/cred/portal.py
ioggstream/twisted
34f9b1e3f097685839000c656332c66ee85be5d8
[ "Unlicense", "MIT" ]
6
2017-02-13T09:11:02.000Z
2021-06-29T11:22:18.000Z
# -*- test-case-name: twisted.test.test_newcred -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ The point of integration of application and authentication. """ from twisted.internet import defer from twisted.internet.defer import maybeDeferred from twisted.python import failure, refl...
43.762295
109
0.664731
8547d70127c1b02e8ff2087b2c3735f6be111b0c
123
py
Python
examples/docker/app/metrics/testmetric.py
defreng/python-pagr
352623d8c1a5b8d59f9c223c4f6cecc7a585bf9a
[ "MIT" ]
null
null
null
examples/docker/app/metrics/testmetric.py
defreng/python-pagr
352623d8c1a5b8d59f9c223c4f6cecc7a585bf9a
[ "MIT" ]
null
null
null
examples/docker/app/metrics/testmetric.py
defreng/python-pagr
352623d8c1a5b8d59f9c223c4f6cecc7a585bf9a
[ "MIT" ]
null
null
null
class TestMetric: def __init__(self, services): pass def run(self): print('Executing Testmetric')
17.571429
37
0.617886
9b33a3d47c8155ed85a6b9762a0303551ba5a627
2,854
py
Python
scripts/RunCosmicShear.py
lshuns/CosmicShearRB
84d682fc09dc8be0e12b82894cfb2c2c272b616b
[ "MIT" ]
null
null
null
scripts/RunCosmicShear.py
lshuns/CosmicShearRB
84d682fc09dc8be0e12b82894cfb2c2c272b616b
[ "MIT" ]
null
null
null
scripts/RunCosmicShear.py
lshuns/CosmicShearRB
84d682fc09dc8be0e12b82894cfb2c2c272b616b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Feb 10 15:49:41 2020 @author: ssli Running the module of cosmic shear signal prediction Please modify necessary configurations in Cosmo/cosmic_shear_signal/input """ import time import os import sys # Self-defined package sys.path.insert(0,os.path....
30.688172
121
0.689208
d1976f4e8d45b6060179a89540c740f71dc82f0e
2,039
py
Python
easyadmin/pages/admin_table.py
codemation/easyadmin
0f305a92174a151fe08b2c8db4cf893a34055407
[ "MIT" ]
6
2021-03-30T01:28:15.000Z
2021-12-18T00:51:14.000Z
easyadmin/pages/admin_table.py
codemation/easyadmin
0f305a92174a151fe08b2c8db4cf893a34055407
[ "MIT" ]
1
2021-05-24T01:10:35.000Z
2021-05-24T10:17:13.000Z
easyadmin/pages/admin_table.py
codemation/easyadmin
0f305a92174a151fe08b2c8db4cf893a34055407
[ "MIT" ]
null
null
null
from .admin import get_admin_page def get_table_body( name: str, table_headers_html: str, table_rows_html: str, above: str = '', below: str = '', ): return f""" <!-- Page Heading --> {above} <!-- DataTales Example --> <div class="card shadow mb-4"> <div class="card-header py-3"> <h...
23.709302
92
0.491908
aad9b3c42f839efa859efeda30f87ff4a9b7ad7a
124
py
Python
crash_course/ch02/exec/name_cases.py
dantin/python-by-example
5769c7a332ebd60fd54e477b6813f2f2a0f3f37f
[ "BSD-3-Clause" ]
null
null
null
crash_course/ch02/exec/name_cases.py
dantin/python-by-example
5769c7a332ebd60fd54e477b6813f2f2a0f3f37f
[ "BSD-3-Clause" ]
null
null
null
crash_course/ch02/exec/name_cases.py
dantin/python-by-example
5769c7a332ebd60fd54e477b6813f2f2a0f3f37f
[ "BSD-3-Clause" ]
null
null
null
name = 'david ding' print('lowercase:', name.lower()) print('uppercase:', name.upper()) print('titlecase:', name.title())
17.714286
33
0.66129
4fa24060276f935262300ba79923e9dd008767ca
5,333
py
Python
card_detection_module/yolov5/TabDetectDewarp/yolov5/utils/experimental.py
nhatnxn/ID_Passport-OCR
78322ec2b9648d0b027326dced7c4aec967bcab3
[ "MIT" ]
1
2021-06-30T11:01:25.000Z
2021-06-30T11:01:25.000Z
card_detection_module/yolov5/TabDetectDewarp/yolov5/utils/experimental.py
nhatnxn/ID_Passport-OCR
78322ec2b9648d0b027326dced7c4aec967bcab3
[ "MIT" ]
null
null
null
card_detection_module/yolov5/TabDetectDewarp/yolov5/utils/experimental.py
nhatnxn/ID_Passport-OCR
78322ec2b9648d0b027326dced7c4aec967bcab3
[ "MIT" ]
null
null
null
# YOLOv5 experimental modules import numpy as np import torch import torch.nn as nn import sys sys.path.append('..') from models.common import Conv, DWConv from .google_utils import attempt_download class CrossConv(nn.Module): # Cross Convolution Downsample def __init__(self, c1, c2, k=3, s=1, g=1, e=1.0, ...
38.092857
116
0.574161
3f3e5441cd5e6990fec7b1d369ae3c881bdfd53d
4,424
py
Python
wagtail_checklist/serializers.py
StocksDigital/wagtail-checklist
7883a397c09b3c86834de2428631c9374341682a
[ "MIT" ]
null
null
null
wagtail_checklist/serializers.py
StocksDigital/wagtail-checklist
7883a397c09b3c86834de2428631c9374341682a
[ "MIT" ]
null
null
null
wagtail_checklist/serializers.py
StocksDigital/wagtail-checklist
7883a397c09b3c86834de2428631c9374341682a
[ "MIT" ]
null
null
null
import re from django.contrib.contenttypes.models import ContentType from rest_framework import serializers from wagtail.core.models import Page from .rules import check_form_rules, check_rules class PageActions: EDIT = 'EDIT' CREATE = 'CREATE' class ChecklistSerializer(serializers.Serializer): EDIT_R...
39.855856
107
0.635624
cf051fa5c0ef57f45cfbf34d85e8d24b4bbed3f5
899
py
Python
brain_games/games/progression.py
ilitili/python-project-lvl1
a2f5e836f5ce6992cdf543beb06ff20555025cc8
[ "MIT" ]
2
2020-08-19T09:34:18.000Z
2020-08-30T20:43:15.000Z
brain_games/games/progression.py
ilitili/python-project-lvl1
a2f5e836f5ce6992cdf543beb06ff20555025cc8
[ "MIT" ]
11
2020-08-25T20:46:35.000Z
2021-07-30T03:40:55.000Z
brain_games/games/progression.py
ilitili/python-project-lvl1
a2f5e836f5ce6992cdf543beb06ff20555025cc8
[ "MIT" ]
11
2020-09-09T06:06:46.000Z
2022-01-08T10:08:46.000Z
"""Progression game engine.""" import random GAME_DESCRIPTION = 'What number is missing in the progression?' START_MIN = 1 START_MAX = 20 STEP_MIN = 1 STEP_MAX = 10 PROGERSSION_LENGTH = 10 def get_challenge(): """Progression game Q&A generation. It forms an arithmetic progression, replacing one of the...
27.242424
68
0.68743
72690bba5957e632c271e2c6696bd907cccc3c32
5,835
py
Python
deca/gui/dataviewwidget.py
kk49/deca
8a03ea5d1b7ae0d787638f1797b6e2cb46de4bae
[ "MIT" ]
50
2019-06-05T04:01:04.000Z
2022-03-05T14:56:43.000Z
deca/gui/dataviewwidget.py
kk49/deca
8a03ea5d1b7ae0d787638f1797b6e2cb46de4bae
[ "MIT" ]
115
2019-03-27T13:34:00.000Z
2022-03-11T23:43:12.000Z
deca/gui/dataviewwidget.py
kk49/deca
8a03ea5d1b7ae0d787638f1797b6e2cb46de4bae
[ "MIT" ]
13
2020-01-25T01:15:49.000Z
2022-02-08T02:20:05.000Z
from typing import Optional, List from deca.db_processor import VfsNode from deca.db_view import VfsView from deca.db_processor import VfsNode, VfsProcessor from deca.ff_types import * from deca.gui.viewer_adf import DataViewerAdf from deca.gui.viewer_rtpc import DataViewerRtpc from deca.gui.viewer_image import DataVie...
45.585938
92
0.700086
f4d5acd8ba2bb300b0c4a05c9d4505d31f3c3803
2,660
py
Python
data/p3BR/R2/benchmark/startCirq165.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R2/benchmark/startCirq165.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R2/benchmark/startCirq165.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=3 # total number=31 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode from cirq.contrib.svg import SVGCircuit # Symbols for...
33.670886
77
0.684962