hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
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
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
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
3
248
max_forks_repo_name
stringlengths
5
125
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
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
5f79434b07d0fd0852489b19f8f438fa54ae857d
7,273
py
Python
finetune_test.py
tengfeixue-victor/One-Shot-Animal-Video-Segmentation
15f9011c1b10f1e0c068f90ed46e72b3bc343310
[ "MIT" ]
2
2021-09-26T07:03:54.000Z
2022-02-21T15:46:30.000Z
finetune_test.py
tengfeixue-victor/One-Shot-Animal-Video-Segmentation
15f9011c1b10f1e0c068f90ed46e72b3bc343310
[ "MIT" ]
null
null
null
finetune_test.py
tengfeixue-victor/One-Shot-Animal-Video-Segmentation
15f9011c1b10f1e0c068f90ed46e72b3bc343310
[ "MIT" ]
1
2021-04-16T06:11:41.000Z
2021-04-16T06:11:41.000Z
""" References: https://github.com/scaelles/OSVOS-TensorFlow """ from __future__ import print_function import os import random import tensorflow as tf import time import numpy as np from utils import models from utils.load_data_finetune import Dataset from utils.logger import create_logger # seed seed = random.randin...
41.56
126
0.639214
0
0
0
0
0
0
0
0
2,281
0.313626
5f79476b04b3854cb2181098acbee05c751aa836
307
py
Python
kinopoisk_unofficial/response/films/seasons_response.py
masterWeber/kinopoisk-api-unofficial-client
5c95e1ec6e43bd302399b63a1525ee7e61724155
[ "MIT" ]
2
2021-11-13T12:23:41.000Z
2021-12-24T14:09:49.000Z
kinopoisk_unofficial/response/films/seasons_response.py
masterWeber/kinopoisk-api-unofficial-client
5c95e1ec6e43bd302399b63a1525ee7e61724155
[ "MIT" ]
1
2022-03-29T19:13:24.000Z
2022-03-30T18:57:23.000Z
kinopoisk_unofficial/response/films/seasons_response.py
masterWeber/kinopoisk-api-unofficial-client
5c95e1ec6e43bd302399b63a1525ee7e61724155
[ "MIT" ]
1
2021-11-13T12:30:01.000Z
2021-11-13T12:30:01.000Z
from dataclasses import field, dataclass from typing import List from kinopoisk_unofficial.contract.response import Response from kinopoisk_unofficial.model.season import Season @dataclass(frozen=True) class SeasonsResponse(Response): total: int items: List[Season] = field(default_factory=list)
25.583333
59
0.814332
101
0.32899
0
0
125
0.407166
0
0
0
0
5f7a417145bc1e9d7aeea4542c8fef811419cb42
4,906
py
Python
codepod/impl.py
alexmorley/codepod
d932391beda9c4df7f048326afe7d0ea73ccb141
[ "Apache-2.0" ]
null
null
null
codepod/impl.py
alexmorley/codepod
d932391beda9c4df7f048326afe7d0ea73ccb141
[ "Apache-2.0" ]
null
null
null
codepod/impl.py
alexmorley/codepod
d932391beda9c4df7f048326afe7d0ea73ccb141
[ "Apache-2.0" ]
null
null
null
import subprocess import os import shutil import tempfile import random import string import yaml src_dir=os.path.dirname(os.path.realpath(__file__)) def codepod(*,repository='',image=None,volumes=[],mount_tmp=True,host_working_directory=None,docker_opts=None,git_smart=False,no_pull=False,command=False): if not d...
35.294964
155
0.664492
0
0
0
0
0
0
0
0
1,758
0.358337
5f7b66cd930462b5d1756ba227c23eb8265b8002
5,040
py
Python
closed/FuriosaAI/code/inference/vision/medical_imaging/3d-unet-kits19/inference_utils.py
ctuning/inference_results_v1.1
d9176eca28fcf6d7a05ccb97994362a76a1eb5ab
[ "Apache-2.0" ]
388
2018-09-13T20:48:58.000Z
2020-11-23T11:52:13.000Z
closed/FuriosaAI/code/inference/vision/medical_imaging/3d-unet-kits19/inference_utils.py
ctuning/inference_results_v1.1
d9176eca28fcf6d7a05ccb97994362a76a1eb5ab
[ "Apache-2.0" ]
597
2018-10-08T12:45:29.000Z
2020-11-24T17:53:12.000Z
closed/FuriosaAI/code/inference/vision/medical_imaging/3d-unet-kits19/inference_utils.py
ctuning/inference_results_v1.1
d9176eca28fcf6d7a05ccb97994362a76a1eb5ab
[ "Apache-2.0" ]
228
2018-11-06T02:04:14.000Z
2020-12-09T07:51:02.000Z
#! /usr/bin/env python3 # coding=utf-8 # Copyright (c) 2021 NVIDIA CORPORATION. All rights reserved. # Copyright 2021 The MLPerf 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...
32.101911
91
0.698611
0
0
947
0.187897
0
0
0
0
2,789
0.553373
5f7d2edfb9acb222096440265492c363f375f8a6
3,047
py
Python
fdtool/modules/GetFDs.py
dancps/FDTool
0958f79fccbb3bb7d55cf9031ee4bd411e9c9b5a
[ "CC0-1.0" ]
13
2019-03-22T13:30:04.000Z
2022-02-01T04:46:44.000Z
fdtool/modules/GetFDs.py
dancps/FDTool
0958f79fccbb3bb7d55cf9031ee4bd411e9c9b5a
[ "CC0-1.0" ]
3
2020-07-01T11:17:40.000Z
2022-02-13T11:20:34.000Z
fdtool/modules/GetFDs.py
dancps/FDTool
0958f79fccbb3bb7d55cf9031ee4bd411e9c9b5a
[ "CC0-1.0" ]
11
2018-07-02T23:46:31.000Z
2021-12-14T12:29:38.000Z
import binaryRepr # Create decorator function to see how many times functions are called def call_counter(func): def helper(*args, **kwargs): helper.calls += 1 return func(*args, **kwargs); helper.calls = 0 helper.__name__= func.__name__ return helper; # Calculate Partition (C_k, ...
43.528571
187
0.637348
0
0
0
0
318
0.104365
0
0
1,646
0.540203
5f7e6f4612c23637da085f15ec80d97da8c65063
1,712
py
Python
experiments/benchmarks/activity_benchmark.py
Oidlichtnwoada/LongTermDependenciesLearning
f2913e86183588107f16402b402524a57b6ea057
[ "MIT" ]
1
2021-01-16T15:42:01.000Z
2021-01-16T15:42:01.000Z
experiments/benchmarks/activity_benchmark.py
Oidlichtnwoada/LongTermDependenciesLearning
f2913e86183588107f16402b402524a57b6ea057
[ "MIT" ]
null
null
null
experiments/benchmarks/activity_benchmark.py
Oidlichtnwoada/LongTermDependenciesLearning
f2913e86183588107f16402b402524a57b6ea057
[ "MIT" ]
null
null
null
import os import numpy as np import pandas as pd import experiments.benchmarks.benchmark as benchmark class ActivityBenchmark(benchmark.Benchmark): def __init__(self): super().__init__('activity', (('--sequence_length', 64, int), ('--max_samples', 40_00...
45.052632
139
0.624416
1,583
0.92465
0
0
0
0
0
0
191
0.111565
5f8081343c9866235ed311ae6467c672bfbe7609
4,685
py
Python
apps/menuplans/views.py
jajadinimueter/recipe
f3f0a4054a14637bf4e49728876fe7b0a029a21f
[ "MIT" ]
null
null
null
apps/menuplans/views.py
jajadinimueter/recipe
f3f0a4054a14637bf4e49728876fe7b0a029a21f
[ "MIT" ]
null
null
null
apps/menuplans/views.py
jajadinimueter/recipe
f3f0a4054a14637bf4e49728876fe7b0a029a21f
[ "MIT" ]
null
null
null
import xml.etree.ElementTree as et from dateutil import parser from django.shortcuts import render from django.shortcuts import redirect from django.core.urlresolvers import reverse import untangle from .forms import MenuplanSearchForm from .forms import MenuplanCreateForm from .tables import MenuplanTable from ....
30.225806
81
0.547492
0
0
0
0
0
0
0
0
531
0.11334
5f809ea0bdda1d52d937bea676c3f2375a0406e8
6,448
py
Python
data-detective-airflow/data_detective_airflow/operators/sinks/pg_scd1_df_update_insert.py
dmitriy-e/metadata-governance
018a879951dee3f3c2c05ac8e05b8360dd7f4ab3
[ "Apache-2.0" ]
5
2021-12-01T09:55:23.000Z
2021-12-21T16:23:33.000Z
data-detective-airflow/data_detective_airflow/operators/sinks/pg_scd1_df_update_insert.py
dmitriy-e/metadata-governance
018a879951dee3f3c2c05ac8e05b8360dd7f4ab3
[ "Apache-2.0" ]
1
2022-03-14T16:50:41.000Z
2022-03-14T16:50:41.000Z
data-detective-airflow/data_detective_airflow/operators/sinks/pg_scd1_df_update_insert.py
dmitriy-e/metadata-governance
018a879951dee3f3c2c05ac8e05b8360dd7f4ab3
[ "Apache-2.0" ]
2
2021-11-03T09:43:09.000Z
2021-11-17T10:16:29.000Z
from contextlib import closing from io import StringIO import numpy import pandas from airflow.providers.postgres.hooks.postgres import PostgresHook from psycopg2.extensions import connection as psycopg2_connection from data_detective_airflow.dag_generator.works import WorkType from data_detective_airflow.operators.s...
39.317073
109
0.640199
6,070
0.941377
0
0
0
0
0
0
2,224
0.344913
5f82a8065c53d38a11111b87bd83da3803a657ae
1,981
py
Python
django-server/fras/attendance/utils.py
ArleneAndrews/Facial-Recognition-Attendance-System
104d17e56af87358974331ef491949b557ab2f01
[ "MIT" ]
52
2019-01-29T14:46:17.000Z
2022-01-14T16:11:37.000Z
django-server/fras/attendance/utils.py
etrigaen47/Facial-Recognition-Attendance-System
ad0bd18cf9582cc12002baf8c92f6638f632c46e
[ "MIT" ]
13
2018-11-04T12:29:48.000Z
2020-02-11T23:47:35.000Z
django-server/fras/attendance/utils.py
etrigaen47/Facial-Recognition-Attendance-System
ad0bd18cf9582cc12002baf8c92f6638f632c46e
[ "MIT" ]
16
2019-03-07T11:07:16.000Z
2021-08-13T07:19:28.000Z
def convert_str_to_date(string): from datetime import datetime datetime.strptime(string, "%Y-%m-%d %H:%M:%S.%f") def create_database(): from attendance.models.Student import Student from attendance.models.WorkingDay import WorkingDay from attendance.models.LectureAttendance import LectureAttendanc...
43.065217
106
0.704695
0
0
0
0
0
0
0
0
263
0.132761
5f83b8fcb8f9923c7beb83eb883b788a12549bf3
32,588
py
Python
plangym/core.py
FragileTech/plangym
9a1482bea099f12f82bae27f1c5d13393daa8032
[ "MIT" ]
3
2020-03-25T22:19:17.000Z
2020-11-02T16:11:32.000Z
plangym/core.py
FragileTech/plangym
9a1482bea099f12f82bae27f1c5d13393daa8032
[ "MIT" ]
44
2020-03-25T14:17:54.000Z
2022-03-12T00:18:48.000Z
plangym/core.py
FragileTech/plangym
9a1482bea099f12f82bae27f1c5d13393daa8032
[ "MIT" ]
2
2020-03-25T12:17:12.000Z
2020-06-19T23:07:52.000Z
"""Plangym API implementation.""" from abc import ABC from typing import Any, Callable, Dict, Generator, Iterable, Optional, Tuple, Union import gym from gym.envs.registration import registry as gym_registry from gym.spaces import Space import numpy import numpy as np wrap_callable = Union[Callable[[], gym.Wrapper],...
36.574635
99
0.613232
32,204
0.988217
617
0.018933
5,951
0.182613
0
0
16,116
0.494538
5f890b9328d6983928b109fecc583fe7148f59dc
6,426
py
Python
L2.py
coka28/AlignmentCluster
11a4e5fc578258bd3a2181a13bdaa60346eca8da
[ "MIT" ]
null
null
null
L2.py
coka28/AlignmentCluster
11a4e5fc578258bd3a2181a13bdaa60346eca8da
[ "MIT" ]
null
null
null
L2.py
coka28/AlignmentCluster
11a4e5fc578258bd3a2181a13bdaa60346eca8da
[ "MIT" ]
null
null
null
# Layer 2 server script # project worker '''-. +#_pü'-..... ö*+...:(loop):.............................................. m}°: \ €>!: 1. register clients \ &w^: 2. distribute WLs and add them to pending \...
36.931034
124
0.495331
0
0
0
0
0
0
0
0
2,276
0.353197
5f8a8dc4b802b22d26a8494296192bb50d7f2d9a
2,677
py
Python
test/factory/schedule_factory.py
choonho/statistics
31fbae2d0772a2e8b717ac12c8de9edd9d8f1734
[ "Apache-2.0" ]
null
null
null
test/factory/schedule_factory.py
choonho/statistics
31fbae2d0772a2e8b717ac12c8de9edd9d8f1734
[ "Apache-2.0" ]
null
null
null
test/factory/schedule_factory.py
choonho/statistics
31fbae2d0772a2e8b717ac12c8de9edd9d8f1734
[ "Apache-2.0" ]
null
null
null
import factory from spaceone.core import utils from spaceone.statistics.model.schedule_model import Schedule, Scheduled, JoinQuery, Formula, QueryOption class ScheduledFactory(factory.mongoengine.MongoEngineFactory): class Meta: model = Scheduled cron = '*/5 * * * *' interval = 5 minutes = ...
26.245098
105
0.548001
2,508
0.93687
0
0
0
0
0
0
430
0.160628
5f9164c1cc7e9494a573895e93fd39680b8520f6
1,324
py
Python
ymir/backend/src/ymir_app/app/models/iteration.py
Zhang-SJ930104/ymir
dd6481be6f229ade4cf8fba64ef44a15357430c4
[ "Apache-2.0" ]
null
null
null
ymir/backend/src/ymir_app/app/models/iteration.py
Zhang-SJ930104/ymir
dd6481be6f229ade4cf8fba64ef44a15357430c4
[ "Apache-2.0" ]
1
2022-01-18T09:28:29.000Z
2022-01-18T09:28:29.000Z
ymir/backend/src/ymir_app/app/models/iteration.py
Aryalfrat/ymir
d4617ed00ef67a77ab4e1944763f608bface4be6
[ "Apache-2.0" ]
null
null
null
from datetime import datetime from sqlalchemy import Boolean, Column, DateTime, Integer, SmallInteger, String from app.config import settings from app.db.base_class import Base from app.models.task import Task # noqa class Iteration(Base): __tablename__ = "iteration" id = Column(Integer, primary_key=True, ...
36.777778
79
0.749245
1,101
0.831571
0
0
0
0
0
0
17
0.01284
5f92da5358e075a34f655feb29ca353ec1f92807
2,833
py
Python
src/jenova/components/common.py
inova-tecnologias/jenova
c975f0894b8663c6a9c9fdc7fa33590a219a6ad3
[ "Apache-2.0" ]
2
2016-08-10T15:08:47.000Z
2016-10-25T14:27:51.000Z
src/jenova/components/common.py
inova-tecnologias/jenova
c975f0894b8663c6a9c9fdc7fa33590a219a6ad3
[ "Apache-2.0" ]
41
2016-08-04T20:19:49.000Z
2017-03-07T20:05:53.000Z
src/jenova/components/common.py
inova-tecnologias/jenova
c975f0894b8663c6a9c9fdc7fa33590a219a6ad3
[ "Apache-2.0" ]
3
2016-09-26T19:04:51.000Z
2017-10-26T22:13:45.000Z
import uuid, hashlib, os, yaml, logging.config, json, requests, re from bcrypt import hashpw, gensalt from collections import namedtuple from sqlalchemy import create_engine from datetime import datetime CONFIG_FILE = os.environ.get('CONFIG_PATH_FILE') ZimbraGrant = namedtuple( 'ZimbraGrant', [ 'target_name', ...
26.726415
85
0.693611
2,382
0.840805
0
0
1,497
0.528415
0
0
282
0.099541
5f9463815346a08c07f5a3a2ec02e760f4e9de1f
3,569
py
Python
hbutils/binary/base.py
HansBug/hbutils
6872311c8a441c5955572e0093b10189a2b90708
[ "Apache-2.0" ]
null
null
null
hbutils/binary/base.py
HansBug/hbutils
6872311c8a441c5955572e0093b10189a2b90708
[ "Apache-2.0" ]
25
2021-10-03T06:19:05.000Z
2022-03-27T12:48:57.000Z
hbutils/binary/base.py
HansBug/hbutils
6872311c8a441c5955572e0093b10189a2b90708
[ "Apache-2.0" ]
null
null
null
import struct from typing import BinaryIO class CIOType: """ Overview: Basic IO type. Used as base class of all the IO types. """ def read(self, file: BinaryIO): """ Read from binary IO object. :param file: Binary file, ``io.BytesIO`` is supported as well. ...
24.445205
87
0.55842
3,515
0.98487
0
0
542
0.151863
0
0
1,963
0.550014
5f94b482c019a016c621810412b2112d18748236
958
py
Python
Rosalind/iprb.py
yuriyshapovalov/Prototypes
1fc4af4434440a8f59a4bcb486e79fd53d199a7d
[ "Apache-2.0" ]
null
null
null
Rosalind/iprb.py
yuriyshapovalov/Prototypes
1fc4af4434440a8f59a4bcb486e79fd53d199a7d
[ "Apache-2.0" ]
1
2015-03-25T22:35:52.000Z
2015-03-25T22:35:52.000Z
Rosalind/iprb.py
yuriyshapovalov/Prototypes
1fc4af4434440a8f59a4bcb486e79fd53d199a7d
[ "Apache-2.0" ]
null
null
null
# Mendel's First Law # http://rosalind.info/problems/iprb/ import sys import unittest class iprb: def main(self, hom_dom, het, hom_rec): total = hom_dom + het + hom_rec p_hom_dom = hom_dom / total p_het = het / total p_hom_rec = hom_rec / total prob = 1 prob -= p_hom_rec * ((hom_rec-1)/(total-1)) pro...
23.365854
51
0.654489
606
0.632568
0
0
0
0
0
0
96
0.100209
5f96125b242a38cf3339aa9cccbeb3af52c0c4f9
3,679
py
Python
boltzmann.py
jkotrc/2D-Elastic-Gas
ee7632518adb03076a684dae48f0fb6f8c44efa3
[ "Unlicense" ]
null
null
null
boltzmann.py
jkotrc/2D-Elastic-Gas
ee7632518adb03076a684dae48f0fb6f8c44efa3
[ "Unlicense" ]
null
null
null
boltzmann.py
jkotrc/2D-Elastic-Gas
ee7632518adb03076a684dae48f0fb6f8c44efa3
[ "Unlicense" ]
null
null
null
#MAIN method and graphics try: from OpenGL.GL import * from OpenGL import GLU import OpenGL.GL.shaders except: print("OpenGL wrapper for python not found") import glfw import numpy as np from computation import Computation class Graphics: def __init__(self,width,height, computation): ...
44.325301
141
0.651264
3,070
0.834466
0
0
0
0
0
0
321
0.087252
5f972ab5ab25213d75c3f56834078dbd2a9d9668
706
py
Python
python/src/day06.py
azuline/aoc2020
849b48adf3a67ac0eeb485818e38a4b3a72fc03a
[ "Apache-2.0" ]
3
2020-12-09T11:36:31.000Z
2020-12-11T01:41:52.000Z
python/src/day06.py
azuline/aoc2020
849b48adf3a67ac0eeb485818e38a4b3a72fc03a
[ "Apache-2.0" ]
null
null
null
python/src/day06.py
azuline/aoc2020
849b48adf3a67ac0eeb485818e38a4b3a72fc03a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from itertools import chain from pathlib import Path from typing import List INPUT_FILE = Path.cwd().parent / "inputs" / "day06.txt" AnswerGroup = List[str] def transform_input(input: str) -> List[AnswerGroup]: return [x.split("\n") for x in input.strip().split("\n\n")] def part1(groups...
23.533333
75
0.660057
0
0
0
0
0
0
0
0
113
0.160057
5f979d09341797e001c31791e45f05729f30d0c6
933
py
Python
symopt/objective.py
spcornelius/symopt
6f276ca07cc266af1cd58758a0cf413ab85f2591
[ "MIT" ]
null
null
null
symopt/objective.py
spcornelius/symopt
6f276ca07cc266af1cd58758a0cf413ab85f2591
[ "MIT" ]
null
null
null
symopt/objective.py
spcornelius/symopt
6f276ca07cc266af1cd58758a0cf413ab85f2591
[ "MIT" ]
null
null
null
from symopt.base import SymOptExpr import sympy as sym class ObjectiveFunction(SymOptExpr): """ Symbolic (non)linear optimization objective function. """ def __init__(self, obj, prob, **kwargs): """ Symbolic (non)linear optimization objective function. Parameters ---------- o...
27.441176
72
0.608789
875
0.937835
0
0
111
0.118971
0
0
538
0.576635
5f97f0b8c3e75f1f6f491e876381487088f22f49
771
py
Python
batch_run.py
hrishioa/Oyente
76c8943426727c93ab161a4e196dc6abdf636fe2
[ "MIT" ]
4
2017-01-25T05:25:52.000Z
2021-02-18T08:48:51.000Z
batch_run.py
hrishioa/Oyente
76c8943426727c93ab161a4e196dc6abdf636fe2
[ "MIT" ]
null
null
null
batch_run.py
hrishioa/Oyente
76c8943426727c93ab161a4e196dc6abdf636fe2
[ "MIT" ]
1
2018-08-09T20:57:31.000Z
2018-08-09T20:57:31.000Z
import json import glob from tqdm import tqdm import os contract_dir = 'contract_data' cfiles = glob.glob(contract_dir+'/contract*.json') cjson = {} print "Loading contracts..." for cfile in tqdm(cfiles): cjson.update(json.loads(open(cfile).read())) results = {} missed = [] print "Running analysis..." for c in...
19.769231
54
0.66537
0
0
0
0
0
0
0
0
233
0.302205
5f981f7b480688c0f261ed48cbccc55b236c176c
2,266
py
Python
tests/test_statistics.py
BENR0/textory
0f81b8b6726298b9181be27da7aaac2dd25bd763
[ "MIT" ]
1
2020-07-01T14:40:10.000Z
2020-07-01T14:40:10.000Z
tests/test_statistics.py
BENR0/textory
0f81b8b6726298b9181be27da7aaac2dd25bd763
[ "MIT" ]
9
2020-02-07T11:58:51.000Z
2021-09-07T16:23:38.000Z
tests/test_statistics.py
BENR0/textory
0f81b8b6726298b9181be27da7aaac2dd25bd763
[ "MIT" ]
1
2019-11-20T05:53:13.000Z
2019-11-20T05:53:13.000Z
#! /usr/bin/python # -*- coding: utf-8 -*- import pytest import numpy as np from textory.util import neighbour_diff_squared, num_neighbours, neighbour_count, create_kernel from textory.statistics import variogram, pseudo_cross_variogram @pytest.fixture def init_np_arrays(): """Inits two random np arrays""" np...
27.634146
101
0.566637
0
0
0
0
245
0.10812
0
0
595
0.262577
5f9861c2730925ff3619b6059676dc2a261cbae6
827
py
Python
question_bank/lemonade-change/lemonade-change.py
yatengLG/leetcode-python
5d48aecb578c86d69835368fad3d9cc21961c226
[ "Apache-2.0" ]
9
2020-08-12T10:01:00.000Z
2022-01-05T04:37:48.000Z
question_bank/lemonade-change/lemonade-change.py
yatengLG/leetcode-python
5d48aecb578c86d69835368fad3d9cc21961c226
[ "Apache-2.0" ]
1
2021-02-16T10:19:31.000Z
2021-02-16T10:19:31.000Z
question_bank/lemonade-change/lemonade-change.py
yatengLG/leetcode-python
5d48aecb578c86d69835368fad3d9cc21961c226
[ "Apache-2.0" ]
4
2020-08-12T10:13:31.000Z
2021-11-05T01:26:58.000Z
# -*- coding: utf-8 -*- # @Author : LG """ 执行用时:152 ms, 在所有 Python3 提交中击败了96.83% 的用户 内存消耗:14 MB, 在所有 Python3 提交中击败了12.45% 的用户 解题思路: 见代码注释 """ class Solution: def lemonadeChange(self, bills: List[int]) -> bool: five = ten = 0 # 5元10元初始各0个 for bill in bills: if bill == 20: # 对于20,...
27.566667
59
0.41717
768
0.764179
0
0
0
0
0
0
398
0.39602
5f98d7e1817b744273f69d626fee4ccb8dd5c371
319
py
Python
pythonProject/MUNDO 2/Desafio 57.py
lucasjlgc/Aulas-de-Python-
6aaed1c660487a680e9c449210600ccdfa326612
[ "MIT" ]
null
null
null
pythonProject/MUNDO 2/Desafio 57.py
lucasjlgc/Aulas-de-Python-
6aaed1c660487a680e9c449210600ccdfa326612
[ "MIT" ]
1
2021-06-25T15:29:11.000Z
2021-06-25T15:29:11.000Z
pythonProject/MUNDO 2/Desafio 57.py
lucasjlgc/Aulas-de-Python-
6aaed1c660487a680e9c449210600ccdfa326612
[ "MIT" ]
null
null
null
#Leia o sexo de uma pessoa, só aceite as letras M ou F; Caso contrario, peça a digitação novamente sexo= str(input('Digite seu sexo [M/F]: ')).strip().upper()[0] while sexo not in 'MF': sexo=str(input('DIGITE O SEXO [M/F]: ')).strip().upper()[0] print('seu sexo é {} e está registrado com sucesso!'.format(sexo))
39.875
98
0.670846
0
0
0
0
0
0
0
0
202
0.621538
5f993e929da96965b346f667b7d028433a1f27c0
2,157
py
Python
plugins/uma/plugins/uma_whois/__init__.py
liangzimiao/miyubot
c2788712255e39348c8980c8ace2f6f75fb6621c
[ "Apache-2.0" ]
null
null
null
plugins/uma/plugins/uma_whois/__init__.py
liangzimiao/miyubot
c2788712255e39348c8980c8ace2f6f75fb6621c
[ "Apache-2.0" ]
null
null
null
plugins/uma/plugins/uma_whois/__init__.py
liangzimiao/miyubot
c2788712255e39348c8980c8ace2f6f75fb6621c
[ "Apache-2.0" ]
null
null
null
from nonebot.adapters.onebot.v11.event import MessageEvent from nonebot.typing import T_State from nonebot.adapters.onebot.v11 import Bot, Message from plugins.uma.plugins.uma_whois.data_source import UmaWhois from plugins.uma import chara #matcher =on_endswith({'是谁','是谁?','是谁?'},priority=5) matcher =UmaWhois().on_reg...
32.19403
94
0.623551
0
0
0
0
1,809
0.788923
1,773
0.773223
584
0.254688
5f99e058ef025684556e0579c4ec1d81fb084ff1
8,288
py
Python
analyzer/views.py
jonfang/CMPE295_DataAnalyzer
6d74f55fa7e38ff8d25aecc388a5ed87c95037ae
[ "MIT" ]
1
2020-10-12T18:17:05.000Z
2020-10-12T18:17:05.000Z
analyzer/views.py
jonfang/CMPE295_DataAnalyzer
6d74f55fa7e38ff8d25aecc388a5ed87c95037ae
[ "MIT" ]
3
2019-11-19T20:41:50.000Z
2021-06-10T21:48:44.000Z
analyzer/views.py
jonfang/CMPE295_DataAnalyzer
6d74f55fa7e38ff8d25aecc388a5ed87c95037ae
[ "MIT" ]
2
2019-10-30T23:18:57.000Z
2019-11-23T00:23:17.000Z
from django.http import HttpResponse from pyspark.sql import SparkSession from django.shortcuts import render from datetime import datetime from core.chartfactory import createBarChart, createPieChart from core.dataprocessor import DataProcessor def sample(request): """ sample python report """ keys =...
35.418803
131
0.595077
0
0
0
0
0
0
0
0
1,917
0.231298
5f9a0e11f9d9a926bf4cc162d77896b7f50869b6
4,668
py
Python
utils/augment_data.py
caiobarrosv/object-detection-for-grasping
2ac2f58700dff73032836ce33d3b98ebf3f29257
[ "BSD-3-Clause" ]
null
null
null
utils/augment_data.py
caiobarrosv/object-detection-for-grasping
2ac2f58700dff73032836ce33d3b98ebf3f29257
[ "BSD-3-Clause" ]
4
2020-07-24T19:31:51.000Z
2022-03-12T00:41:28.000Z
utils/augment_data.py
caiobarrosv/object-detection-for-grasping
2ac2f58700dff73032836ce33d3b98ebf3f29257
[ "BSD-3-Clause" ]
null
null
null
from mxnet import nd import os import sys sys.path.append(os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..'))) import utils.common as dataset_commons import cv2 import numpy as np import glob import pandas as pd from gluoncv.data.transforms.presets.ssd import SSDDefaultTrainTransform from matplotlib import...
33.826087
130
0.633248
0
0
0
0
0
0
0
0
989
0.211687
5f9a91b6b4cb83726c16979ae7cd27a95c8fd08d
12,235
py
Python
ultracart/models/apply_library_item_response.py
UltraCart/rest_api_v2_sdk_python
d734ea13fabc7a57872ff68bac06861edb8fd882
[ "Apache-2.0" ]
1
2018-03-15T16:56:23.000Z
2018-03-15T16:56:23.000Z
ultracart/models/apply_library_item_response.py
UltraCart/rest_api_v2_sdk_python
d734ea13fabc7a57872ff68bac06861edb8fd882
[ "Apache-2.0" ]
null
null
null
ultracart/models/apply_library_item_response.py
UltraCart/rest_api_v2_sdk_python
d734ea13fabc7a57872ff68bac06861edb8fd882
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ UltraCart Rest API V2 UltraCart REST API Version 2 # noqa: E501 OpenAPI spec version: 2.0.0 Contact: support@ultracart.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class ApplyLibraryItemResponse...
31.211735
213
0.621087
11,944
0.976216
0
0
7,599
0.621087
0
0
7,116
0.58161
5f9b09cbcd120955bb173c4d9f5b1fd61f32f6e1
103
py
Python
notebooks/python_recap/_solutions/python_rehearsal6.py
jonasvdd/DS-python-data-analysis
835226f562ee0b0631d70e48a17c4526ff58a538
[ "BSD-3-Clause" ]
65
2017-03-21T09:15:40.000Z
2022-02-01T23:43:08.000Z
notebooks/python_recap/_solutions/python_rehearsal6.py
jonasvdd/DS-python-data-analysis
835226f562ee0b0631d70e48a17c4526ff58a538
[ "BSD-3-Clause" ]
100
2016-12-15T03:44:06.000Z
2022-03-07T08:14:07.000Z
notebooks/python_recap/_solutions/python_rehearsal6.py
jonasvdd/DS-python-data-analysis
835226f562ee0b0631d70e48a17c4526ff58a538
[ "BSD-3-Clause" ]
52
2016-12-19T07:48:52.000Z
2022-02-19T17:53:48.000Z
np_pressures_hPa * math.exp(-gravit_acc * molar_mass_earth* height/(gas_constant*standard_temperature))
103
103
0.84466
0
0
0
0
0
0
0
0
0
0
5f9b8fe1beadc23d6a4c015ccb7948ee8af7a618
322
py
Python
test/test_coverage.py
atupilojon/-resources--pytest
eae62b54828bb82dc534b37d9b46b83cb6d31c03
[ "MIT" ]
null
null
null
test/test_coverage.py
atupilojon/-resources--pytest
eae62b54828bb82dc534b37d9b46b83cb6d31c03
[ "MIT" ]
null
null
null
test/test_coverage.py
atupilojon/-resources--pytest
eae62b54828bb82dc534b37d9b46b83cb6d31c03
[ "MIT" ]
null
null
null
from pytest import mark # if setup.py present, code could be installed as library # so that there's no need include path # pip install -e . from pytest_resources import do_lower_case # from src.for_testing import do_lower_case @mark.coverage def check_lower_case(): assert do_lower_case('SomeThing') == 'something...
24.769231
57
0.773292
0
0
0
0
91
0.282609
0
0
178
0.552795
5f9c3b49af1837552a765743d83f19677ef7b0fe
3,476
py
Python
targets/simple_router/flow_radar_bm/change_bm.py
tsihang-zz/FlowRadar-P4
1b4f92b83257ba8f34475c098bce8b84daa35b7c
[ "Apache-2.0" ]
15
2018-08-21T10:49:38.000Z
2021-06-23T14:33:32.000Z
targets/simple_router/flow_radar_bm/change_bm.py
harvard-cns/FlowRadar-P4
1b4f92b83257ba8f34475c098bce8b84daa35b7c
[ "Apache-2.0" ]
1
2017-10-16T07:49:06.000Z
2017-10-16T13:45:36.000Z
targets/simple_router/flow_radar_bm/change_bm.py
USC-NSL/FlowRadar-P4
1b4f92b83257ba8f34475c098bce8b84daa35b7c
[ "Apache-2.0" ]
6
2016-07-26T15:47:46.000Z
2018-03-23T01:50:06.000Z
import re import os def changed(lines, token): for line in lines: if line.find(token) != -1: return True return False # copy required files def copy_files(): os.system("cp flow_radar.h ../build/bm/src") # change actions.c to add flow_radar lock def change_actions_c(): actions_c = open("../build/bm/src/actio...
31.035714
148
0.649597
0
0
0
0
0
0
0
0
1,553
0.446778
5f9c54619428b0b6d3296e3c0080e9ec17335d9c
2,807
py
Python
elecalc.py
shka86/py_calc
780167bc10e2a74741ac9620dbc859c0d310e299
[ "MIT" ]
null
null
null
elecalc.py
shka86/py_calc
780167bc10e2a74741ac9620dbc859c0d310e299
[ "MIT" ]
null
null
null
elecalc.py
shka86/py_calc
780167bc10e2a74741ac9620dbc859c0d310e299
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- # calculation tool for a bridge circuit with two input current sources # two current sources can supply from both of top of the bridge and middle of the bridge # define the voltage name as follows: # Vp: voltage at the top of the bridge # Vn: voltage at the middle of the brid...
25.990741
88
0.540791
0
0
0
0
0
0
0
0
1,126
0.40114
5f9c577bd20e78c6c12bbdda22baa4f5a81a595e
618
py
Python
Python/Armstrong_Number.py
shashwat-agarwal/hacktoberfest-2
552a4278ffd671603f8659562427b0f1ac5127a4
[ "Apache-2.0" ]
17
2020-10-02T03:28:33.000Z
2020-10-24T04:08:30.000Z
Python/Armstrong_Number.py
shubhamgoel90/hacktoberfest
e7b1aa18485c4a080b2568910f82e98a5feb6f37
[ "Apache-2.0" ]
22
2020-10-01T20:00:56.000Z
2020-10-31T01:56:10.000Z
Python/Armstrong_Number.py
shubhamgoel90/hacktoberfest
e7b1aa18485c4a080b2568910f82e98a5feb6f37
[ "Apache-2.0" ]
139
2020-10-01T19:51:40.000Z
2020-11-02T19:58:19.000Z
#Program to check whether the number is an armstrong number or not #Ask user to enter the number number=int(input("Enter the number you want to check armstrong: ")) #To calculate the length of number entered. order=len(str(number)) #Initialise sum to 0 sum=0 temp=number while temp>0: num=temp%10 sum+=num**o...
21.310345
68
0.723301
0
0
0
0
0
0
0
0
429
0.694175
5f9c87648a4e17596d684c15485c9c92d81abb57
304
py
Python
pyexlatex/models/format/hline.py
whoopnip/py-ex-latex
66f5fadc35a0bfdce5f1ccb3c80dce8885b061b6
[ "MIT" ]
4
2020-06-08T07:17:12.000Z
2021-11-04T21:39:52.000Z
pyexlatex/models/format/hline.py
nickderobertis/py-ex-latex
66f5fadc35a0bfdce5f1ccb3c80dce8885b061b6
[ "MIT" ]
24
2020-02-17T17:20:44.000Z
2021-12-20T00:10:19.000Z
pyexlatex/models/format/hline.py
nickderobertis/py-ex-latex
66f5fadc35a0bfdce5f1ccb3c80dce8885b061b6
[ "MIT" ]
null
null
null
from pyexlatex.models.sizes.textwidth import TextWidth from pyexlatex.models.format.rule import Rule class HLine(Rule): """ Draws a horizontal line across the text width. """ def __init__(self, thickness: float = 0.4): super().__init__(length=TextWidth(), thickness=thickness)
25.333333
65
0.710526
200
0.657895
0
0
0
0
0
0
62
0.203947
5f9d943e1c5e5e036c07d0eb1ed8c96b9fd06019
4,038
py
Python
sixx/plugins/images.py
TildeBeta/6X
1814eb8f394b7c25b49decdd7d7249567c85f30f
[ "MIT" ]
2
2018-03-06T20:39:49.000Z
2018-03-17T04:28:57.000Z
sixx/plugins/images.py
TildeBeta/TwitterImages
1814eb8f394b7c25b49decdd7d7249567c85f30f
[ "MIT" ]
2
2018-03-06T20:39:46.000Z
2018-03-15T17:03:03.000Z
sixx/plugins/images.py
TildeBeta/TwitterImages
1814eb8f394b7c25b49decdd7d7249567c85f30f
[ "MIT" ]
1
2018-04-25T22:24:40.000Z
2018-04-25T22:24:40.000Z
from math import sqrt import asks import datetime import numpy as np import random from PIL import Image from PIL.ImageDraw import Draw from PIL.ImageEnhance import Brightness from PIL.ImageFont import truetype from curio import spawn_thread from curious.commands import Context, Plugin, command from io import BytesIO ...
40.38
124
0.488856
3,586
0.888063
0
0
3,499
0.866518
3,484
0.862803
244
0.060426
5f9df6e37fc71858adef3ee969afe3699916d4a6
2,669
py
Python
plugins/DonorlessOperation/__init__.py
j-h-m/Media-Journaling-Tool
4ab6961e2768dc002c9bbad182f83188631f01bd
[ "BSD-3-Clause" ]
null
null
null
plugins/DonorlessOperation/__init__.py
j-h-m/Media-Journaling-Tool
4ab6961e2768dc002c9bbad182f83188631f01bd
[ "BSD-3-Clause" ]
null
null
null
plugins/DonorlessOperation/__init__.py
j-h-m/Media-Journaling-Tool
4ab6961e2768dc002c9bbad182f83188631f01bd
[ "BSD-3-Clause" ]
null
null
null
import logging from maskgen import video_tools import random import maskgen.video_tools import os import maskgen import json plugin = "DonorPicker" def transform(img, source, target, **kwargs): valid = [] possible = [] data = {} logging.getLogger('maskgen').info(str(kwargs)) for f in os.listdir(kwa...
38.128571
124
0.557887
0
0
0
0
0
0
0
0
990
0.370925
5f9e0f831db1b36f8edc783c6c1bfaa61c116474
1,228
py
Python
track_model/eval_avg_scores.py
QUVA-Lab/lang-tracker
6cb3630471765565b6f2d34a160f0cd51d95a082
[ "BSD-2-Clause-FreeBSD" ]
31
2017-09-13T13:40:59.000Z
2022-01-25T16:55:19.000Z
track_model/eval_avg_scores.py
zhenyangli/lang-tracker
dddd808a22582573ab0a5e4c3dbf0ba054e42d61
[ "BSD-3-Clause" ]
4
2017-09-14T01:56:58.000Z
2021-01-28T00:58:58.000Z
track_model/eval_avg_scores.py
QUVA-Lab/lang-tracker
6cb3630471765565b6f2d34a160f0cd51d95a082
[ "BSD-2-Clause-FreeBSD" ]
9
2017-09-28T03:22:08.000Z
2021-01-19T10:56:44.000Z
import caffe import numpy as np import os import sys import track_model_train as track_model import train_config max_iter = 1000 def eval_avg_scores(config): with open('./track_model/scores.prototxt', 'w') as f: f.write(str(track_model.generate_scores('', config))) caffe.set_device(config.gpu_id) ...
29.95122
90
0.643322
0
0
0
0
0
0
0
0
386
0.314332
5f9e1b47610239b65145f24fa61ab7d89533b94e
1,968
py
Python
tests/group_test.py
gekkeharry13/api-python
b18d1694c19f5f972a126ee9ff3d3971a08815cb
[ "Apache-2.0" ]
1
2018-05-31T17:29:30.000Z
2018-05-31T17:29:30.000Z
tests/group_test.py
gekkeharry13/api-python
b18d1694c19f5f972a126ee9ff3d3971a08815cb
[ "Apache-2.0" ]
8
2015-02-20T16:22:12.000Z
2019-04-25T23:57:43.000Z
tests/group_test.py
gekkeharry13/api-python
b18d1694c19f5f972a126ee9ff3d3971a08815cb
[ "Apache-2.0" ]
8
2015-02-28T06:56:15.000Z
2020-01-02T22:42:09.000Z
# # Copyright (C) 2014 Conjur Inc # # 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, distri...
37.132075
82
0.757622
0
0
0
0
582
0.295732
0
0
1,187
0.60315
5f9e9628295536489ee271571858b5c113c24c7c
99,362
py
Python
Scripts/generated/protocolbuffers/Social_pb2.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/generated/protocolbuffers/Social_pb2.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/generated/protocolbuffers/Social_pb2.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: D:\dev\TS4\_deploy\Client\Releasex64\Python\Generated\protocolbuffers\Social_pb2.py # Compiled at: 2020-12-13 14:24:09 # Size of sourc...
31.050625
10,693
0.763723
5,350
0.053839
0
0
0
0
0
0
27,127
0.272987
5f9ec6c74b57542c9787a229e40967ba3e06098c
56
py
Python
NumpyUtility/__init__.py
PaulKGrimes/NumpyUtility
35607725d07952deca10d7342043db7e77756278
[ "MIT" ]
null
null
null
NumpyUtility/__init__.py
PaulKGrimes/NumpyUtility
35607725d07952deca10d7342043db7e77756278
[ "MIT" ]
null
null
null
NumpyUtility/__init__.py
PaulKGrimes/NumpyUtility
35607725d07952deca10d7342043db7e77756278
[ "MIT" ]
null
null
null
__all__ = ["NumpyUtility"] from .NumpyUtility import *
14
27
0.732143
0
0
0
0
0
0
0
0
14
0.25
5f9f9ecefb3439db4ca570e4a61b0846cf1331d6
188
py
Python
09-Data-Analysis/Sweetviz/ReprotViz.py
NguyenQuangBinh803/Python-Heritage
7da72b2926cefc4903086a1cab7de3a64764d648
[ "MIT" ]
1
2021-01-10T12:06:26.000Z
2021-01-10T12:06:26.000Z
09-Data-Analysis/Sweetviz/ReprotViz.py
NguyenQuangBinh803/Python-Heritage
7da72b2926cefc4903086a1cab7de3a64764d648
[ "MIT" ]
null
null
null
09-Data-Analysis/Sweetviz/ReprotViz.py
NguyenQuangBinh803/Python-Heritage
7da72b2926cefc4903086a1cab7de3a64764d648
[ "MIT" ]
null
null
null
import sweetviz import pandas as pd if __name__ == '__main__': df = pd.read_csv("BankChurners_clean.csv") report = sweetviz.analyze(df, "Attrition_Flag") report.show_html()
20.888889
51
0.707447
0
0
0
0
0
0
0
0
50
0.265957
5fa0436f9f5d626cf4b365a484376d1f5343ee15
5,046
py
Python
FTPShell/FTPShell.py
dsogo/H4CKING
58aaaabc25995dbff9aa4985e8308a963772b87e
[ "MIT" ]
17
2020-10-07T01:37:32.000Z
2021-12-11T21:23:25.000Z
FTPShell/FTPShell.py
Al0nnso/H4CKING
58aaaabc25995dbff9aa4985e8308a963772b87e
[ "MIT" ]
null
null
null
FTPShell/FTPShell.py
Al0nnso/H4CKING
58aaaabc25995dbff9aa4985e8308a963772b87e
[ "MIT" ]
8
2020-09-22T03:14:51.000Z
2022-03-07T16:03:24.000Z
from pyftpdlib.authorizers import DummyAuthorizer from pyftpdlib.handlers import FTPHandler from multiprocessing import Process from pyftpdlib import servers from time import sleep from requests import get import socket import psutil import win32api # Al0nnso - 2019 # FTP Reverse Shell # NOT TESTED WITH EXTERN NETWOR...
35.535211
92
0.441538
0
0
0
0
0
0
0
0
641
0.127031
5fa103b113b3be7f53cb7ec2e64ba88c2cf38693
8,321
py
Python
tests/test_io.py
wellcometrust/deep_reference_parser
b58e4616f4de9bfe18ab41e90f696f80ab876245
[ "MIT" ]
13
2020-02-19T02:09:00.000Z
2021-12-16T23:15:58.000Z
tests/test_io.py
wellcometrust/deep_reference_parser
b58e4616f4de9bfe18ab41e90f696f80ab876245
[ "MIT" ]
33
2020-02-12T11:21:51.000Z
2022-02-10T00:48:17.000Z
tests/test_io.py
wellcometrust/deep_reference_parser
b58e4616f4de9bfe18ab41e90f696f80ab876245
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 import os import pytest from deep_reference_parser.io.io import ( read_jsonl, write_jsonl, load_tsv, write_tsv, _split_list_by_linebreaks, _unpack, ) from deep_reference_parser.reference_utils import yield_token_label_pairs from .common import TEST_JSON...
24.259475
88
0.414373
0
0
0
0
100
0.011953
0
0
3,232
0.386326
5fa141b264762a22f9a2b6309a86900f4d79fb07
389
py
Python
tests/unit/test_priorities.py
anshumangoyal/testrail-api
a9b2983a59667999a8432fa0af034c1fbd07e1cc
[ "MIT" ]
21
2019-04-15T07:25:48.000Z
2022-03-19T04:21:43.000Z
tests/unit/test_priorities.py
anshumangoyal/testrail-api
a9b2983a59667999a8432fa0af034c1fbd07e1cc
[ "MIT" ]
30
2019-04-15T07:18:59.000Z
2022-03-19T07:26:57.000Z
tests/unit/test_priorities.py
anshumangoyal/testrail-api
a9b2983a59667999a8432fa0af034c1fbd07e1cc
[ "MIT" ]
16
2019-02-21T11:59:32.000Z
2022-02-23T17:33:16.000Z
import json import responses def test_get_priorities(api, mock, host): mock.add_callback( responses.GET, '{}index.php?/api/v2/get_priorities'.format(host), lambda x: (200, {}, json.dumps([{'id': 1, 'priority': 1}, {'id': 4, 'priority': 4}])) ) resp = api.priorities.get_priorities...
24.3125
93
0.59383
0
0
0
0
0
0
0
0
78
0.200514
5fa14c2eb69ff76b5ae4ab590ca445b49132d179
37,185
py
Python
prescient/gosm/tester.py
iSoron/Prescient
a3c1d7c5840893ff43dca48c40dc90f083292d26
[ "BSD-3-Clause" ]
21
2020-06-03T13:54:22.000Z
2022-02-27T18:20:35.000Z
prescient/gosm/tester.py
iSoron/Prescient
a3c1d7c5840893ff43dca48c40dc90f083292d26
[ "BSD-3-Clause" ]
79
2020-07-30T17:29:04.000Z
2022-03-09T00:06:39.000Z
prescient/gosm/tester.py
bknueven/Prescient
6289c06a5ea06c137cf1321603a15e0c96ddfb85
[ "BSD-3-Clause" ]
16
2020-07-14T17:05:56.000Z
2022-02-17T17:51:13.000Z
# ___________________________________________________________________________ # # Prescient # Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC # (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. # Government retains certain rights in this software. # This software is ...
43.644366
134
0.61584
33,758
0.907839
0
0
0
0
0
0
4,999
0.134436
5fa27ee2e5dad2743d90292ecca26ad61a23a586
615
py
Python
inbound/admin.py
nilesh-kr-dubey/django-inbound-rules
5ca122bf915d17c04a63b1464048bba91006e854
[ "MIT" ]
1
2020-07-31T06:34:27.000Z
2020-07-31T06:34:27.000Z
inbound/admin.py
nilesh-kr-dubey/django-inbound-rules
5ca122bf915d17c04a63b1464048bba91006e854
[ "MIT" ]
null
null
null
inbound/admin.py
nilesh-kr-dubey/django-inbound-rules
5ca122bf915d17c04a63b1464048bba91006e854
[ "MIT" ]
null
null
null
from django.contrib import admin from inbound.models import Rule, InboundIP # Register your models here. class InboundIPInline(admin.TabularInline): ''' Inline of Inbound Rule ''' model = InboundIP readonly_fields = ['cidr'] extra = 1 class RuleAdmin(admin.ModelAdmin): model = Rule list_dis...
25.625
98
0.676423
464
0.754472
0
0
0
0
0
0
195
0.317073
5fa29ec1b9e32e73683aab09293ca2018836774b
397
py
Python
firldBuzzUserEntryApp/login/loginForm.py
sir-rasel/backend-api-integration
41e3d44caa6ec10382efbb482cb9d0f77bd4a5fb
[ "MIT" ]
2
2020-12-11T12:45:34.000Z
2021-11-09T11:25:23.000Z
firldBuzzUserEntryApp/login/loginForm.py
sir-rasel/backend-api-integration
41e3d44caa6ec10382efbb482cb9d0f77bd4a5fb
[ "MIT" ]
null
null
null
firldBuzzUserEntryApp/login/loginForm.py
sir-rasel/backend-api-integration
41e3d44caa6ec10382efbb482cb9d0f77bd4a5fb
[ "MIT" ]
null
null
null
from django import forms class LoginForm(forms.Form): userName = forms.EmailField(label='User Name', max_length=55, required=True, \ widget=forms.EmailInput(attrs={'placeholder': 'Username that sends via mail'})) password = forms.CharField(label='Password', max_length=55, required=True, \ widge...
49.625
89
0.722922
370
0.93199
0
0
0
0
0
0
106
0.267003
5fa32fa26545cc0a0f75090c1a789058c3f6ac3d
751
py
Python
src/level2/뉴스클러스터링.py
iml1111/programmers_coding_study
07e89220c59c3b40dd92edc39d1b573d018efae4
[ "MIT" ]
1
2021-01-03T13:01:33.000Z
2021-01-03T13:01:33.000Z
src/level2/뉴스클러스터링.py
iml1111/programmers_coding_study
07e89220c59c3b40dd92edc39d1b573d018efae4
[ "MIT" ]
null
null
null
src/level2/뉴스클러스터링.py
iml1111/programmers_coding_study
07e89220c59c3b40dd92edc39d1b573d018efae4
[ "MIT" ]
null
null
null
from collections import Counter def refine(s): result = [] for i in range(len(s) - 1): bigram = s[i:i+2].lower() if bigram.isalpha(): result.append(bigram) return result def solution(str1, str2): counter1, counter2 = Counter(refine(str1)), Counter(refine(str2)) set1, se...
31.291667
77
0.609854
0
0
0
0
0
0
0
0
64
0.08522
5fa6b75aa0e33eeec7402b44584c8450dcb054c7
1,226
py
Python
gssClients/gssPythonClients/download_gss.py
SemWES/client_libs
48c3af519ceaf80b3f33cf509c72376b9b3d9582
[ "Zlib" ]
null
null
null
gssClients/gssPythonClients/download_gss.py
SemWES/client_libs
48c3af519ceaf80b3f33cf509c72376b9b3d9582
[ "Zlib" ]
null
null
null
gssClients/gssPythonClients/download_gss.py
SemWES/client_libs
48c3af519ceaf80b3f33cf509c72376b9b3d9582
[ "Zlib" ]
null
null
null
#!/bin/env python # Copyright STIFTELSEN SINTEF 2016 import suds import urllib2 import sys if len(sys.argv) < 4: print ("Usage:") print ("\t %s gss-url outputfilename token" % sys.argv[0]) exit() # get url: url = sys.argv[1] outputfileName = sys.argv[2] sessionToken = sys.argv[3] wsdlLocation = "https:...
29.190476
88
0.686786
0
0
0
0
0
0
0
0
242
0.19739
5faad04658ea51684534a077173c5f03481fc86f
6,728
py
Python
Zmuggler.py
electronicbots/Zmuggler
5b9df5919367dffb588b18c5acd567e20135d2b7
[ "MIT" ]
1
2021-07-28T06:02:44.000Z
2021-07-28T06:02:44.000Z
Zmuggler.py
electronicbots/Zmuggler
5b9df5919367dffb588b18c5acd567e20135d2b7
[ "MIT" ]
null
null
null
Zmuggler.py
electronicbots/Zmuggler
5b9df5919367dffb588b18c5acd567e20135d2b7
[ "MIT" ]
null
null
null
#!/usr/bin/python3 from requests import Request, Session from requests.exceptions import ReadTimeout import urllib3, requests, collections, http.client, optparse, sys, os print("""\033[1;36m _____ _ |__ /_ __ ___ _ _ __ _ __ _| | ___ _ __ / /| '_ ` _ \| | | |/ _` |/ ...
35.597884
148
0.5
5,492
0.81629
0
0
0
0
0
0
2,137
0.317628
5faed7df0481d882b8814038712e8be58ef77e17
3,397
py
Python
cosmosis-standard-library/shear/cl_to_xi_fullsky/cl_to_xi_interface.py
ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra
07e5d308c6a8641a369a3e0b8d13c4104988cd2b
[ "BSD-2-Clause" ]
1
2021-09-15T10:10:26.000Z
2021-09-15T10:10:26.000Z
cosmosis-standard-library/shear/cl_to_xi_fullsky/cl_to_xi_interface.py
ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra
07e5d308c6a8641a369a3e0b8d13c4104988cd2b
[ "BSD-2-Clause" ]
null
null
null
cosmosis-standard-library/shear/cl_to_xi_fullsky/cl_to_xi_interface.py
ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra
07e5d308c6a8641a369a3e0b8d13c4104988cd2b
[ "BSD-2-Clause" ]
1
2021-06-11T15:29:43.000Z
2021-06-11T15:29:43.000Z
#coding: utf-8 #import cl_to_xi_full from __future__ import print_function from builtins import range import numpy as np from cosmosis.datablock import option_section, names as section_names from cl_to_xi import save_xi_00_02, save_xi_22, arcmin_to_radians, SpectrumInterp from legendre import get_legfactors_00, get_leg...
36.138298
87
0.657345
0
0
0
0
0
0
0
0
643
0.189285
5fafc8dcb4215c91fc9ae3f825e9c6da430bff4a
326
py
Python
software/glasgow/applet/video/__init__.py
electroniceel/Glasgow
f6d8fda1d5baec006a6c43fa3d2547a33bdee666
[ "Apache-2.0", "0BSD" ]
1,014
2019-10-05T16:21:43.000Z
2022-03-31T09:26:43.000Z
software/glasgow/applet/video/__init__.py
attie/glasgow
eca2cb278478d9cb9a102e6e99dfc5bd2d77a549
[ "Apache-2.0", "0BSD" ]
113
2019-10-06T07:49:37.000Z
2022-03-24T04:33:08.000Z
software/glasgow/applet/video/__init__.py
attie/glasgow
eca2cb278478d9cb9a102e6e99dfc5bd2d77a549
[ "Apache-2.0", "0BSD" ]
79
2019-10-08T07:36:03.000Z
2022-03-21T07:00:27.000Z
""" The ``video`` taxon groups applets implementing video interfaces, that is, interfaces for periodic transfers of 2d arrays of samples of electromagnetic wave properties. Examples: VGA output, TFT LCD capture, TFT LCD output. Counterexamples: SCSI scanner (use taxon ``photo``), SPI LCD output (use taxon ``display``)...
40.75
98
0.757669
0
0
0
0
0
0
0
0
325
0.996933
5fb11bba5257814c53fdaf00b36feffb7caef7ad
22,329
py
Python
aiida_vasp/parsers/content_parsers/vasprun.py
DropD/aiida_vasp
9967f5501a6fc1c67981154068135cec7be5396a
[ "MIT" ]
3
2016-11-18T07:19:57.000Z
2016-11-28T08:28:38.000Z
aiida_vasp/parsers/content_parsers/vasprun.py
DropD/aiida_vasp
9967f5501a6fc1c67981154068135cec7be5396a
[ "MIT" ]
null
null
null
aiida_vasp/parsers/content_parsers/vasprun.py
DropD/aiida_vasp
9967f5501a6fc1c67981154068135cec7be5396a
[ "MIT" ]
null
null
null
""" The vasprun.xml parser interface. --------------------------------- Contains the parsing interfaces to ``parsevasp`` used to parse ``vasprun.xml`` content. """ # pylint: disable=abstract-method, too-many-public-methods import numpy as np from parsevasp.vasprun import Xml from parsevasp import constants as parseva...
31.898571
132
0.578261
21,170
0.948094
0
0
12,889
0.577231
0
0
8,957
0.401138
5fb1b34629d1b25a94935e87aa37911d21e8edb9
704
py
Python
estoque/admin.py
Felipebros/mini_curso_django
965dd5e8837db9dea4485e889c2b8703fb5e902d
[ "MIT" ]
8
2019-06-18T20:20:39.000Z
2019-11-09T20:21:06.000Z
estoque/admin.py
Felipebros/mini_curso_django
965dd5e8837db9dea4485e889c2b8703fb5e902d
[ "MIT" ]
8
2019-12-04T23:26:42.000Z
2022-02-10T12:02:19.000Z
estoque/admin.py
Felipebros/mini_curso_django
965dd5e8837db9dea4485e889c2b8703fb5e902d
[ "MIT" ]
3
2019-06-21T22:37:32.000Z
2019-10-31T00:38:45.000Z
from django.contrib import admin from .models import Produto, TipoProduto, Estoque # Register your models here. class TipoProdutoAdmin(admin.ModelAdmin): search_fields = ['descricao',] admin.site.register(TipoProduto, TipoProdutoAdmin) class EstoqueAdmin(admin.ModelAdmin): search_fields = ['produto__nome'] ...
35.2
105
0.755682
448
0.636364
0
0
0
0
0
0
207
0.294034
5fb1ba21e31a7c2b9e588c895f10ae57243ce651
3,137
py
Python
star/star.py
gd-star-pp/star-pp
24c7289199215961fe5462b99ec600907b305d3f
[ "MIT" ]
2
2021-10-10T23:42:30.000Z
2022-03-31T19:43:13.000Z
star/star.py
lotus-gd/azalea
24c7289199215961fe5462b99ec600907b305d3f
[ "MIT" ]
null
null
null
star/star.py
lotus-gd/azalea
24c7289199215961fe5462b99ec600907b305d3f
[ "MIT" ]
null
null
null
import gd, itertools from cube import calculate_cube from ball import calculate_ball from helpers import average client = gd.Client() def calculate_ship(editor: gd.api.Editor, level: gd.Level, portal: gd.api.Object, speed, portal_count: int): pass def calculate_ufo(editor: gd.api.Editor, level: gd.Level, portal:...
36.057471
203
0.646159
0
0
0
0
0
0
0
0
110
0.035065
5fb3ccf7fca90c61707cbd90f3475846779b54b9
341
py
Python
clash-of-code/shortest/number_categories.py
jonasnic/codingame
f1a7fe8007b9ca63bdf30cd72f4d6ac41a5ac721
[ "MIT" ]
30
2016-04-30T01:56:05.000Z
2022-03-09T22:19:12.000Z
clash-of-code/shortest/number_categories.py
jonasnic/codingame
f1a7fe8007b9ca63bdf30cd72f4d6ac41a5ac721
[ "MIT" ]
1
2021-05-19T19:36:45.000Z
2021-05-19T19:36:45.000Z
clash-of-code/shortest/number_categories.py
jonasnic/codingame
f1a7fe8007b9ca63bdf30cd72f4d6ac41a5ac721
[ "MIT" ]
17
2020-01-28T13:54:06.000Z
2022-03-26T09:49:27.000Z
from collections import defaultdict c=defaultdict(set) f=lambda:[int(i) for i in input().split()] a,b=f() s,e=f() for i in range(s,e+1): x=i%a==0 y=i%b==0 if x and y: c[3].add(i) elif x and not y: c[1].add(i) elif y and not x: c[2].add(i) else: c[4].add(i) o=[] for i in range(1,5): o.append(str(len(c[i])...
17.05
42
0.58651
0
0
0
0
0
0
0
0
3
0.008798
5fb5e0196946388daa9f3a5d9e0cb39eba4f8a0c
520
py
Python
interpreter/src/parser/errors.py
Cdayz/simple_lang
dc19d6ef76bb69c87981c8b826cf8f71b0cc475b
[ "MIT" ]
3
2019-08-22T01:20:16.000Z
2021-02-05T09:11:50.000Z
interpreter/src/parser/errors.py
Cdayz/simple_lang
dc19d6ef76bb69c87981c8b826cf8f71b0cc475b
[ "MIT" ]
null
null
null
interpreter/src/parser/errors.py
Cdayz/simple_lang
dc19d6ef76bb69c87981c8b826cf8f71b0cc475b
[ "MIT" ]
2
2019-08-22T01:20:18.000Z
2021-05-27T14:40:12.000Z
"""Module with useful exceptions for Parser.""" class BadOperationIdentifier(Exception): """Bad operation identifier used.""" class BadOperationArgument(Exception): """Bad argument provided to operation.""" class BadInPlaceValue(Exception): """Bad in-place value provided as argument.""" class Parsin...
22.608696
52
0.696154
460
0.884615
0
0
0
0
0
0
190
0.365385
5fb7671976b6e01ae676fe790432693d8f4d3e4c
286
py
Python
st_library/utils/generics/singleton.py
vartagg/dataprovider-py
e392af3dab21c99c51a32345710fcd0dc4023462
[ "Apache-2.0" ]
null
null
null
st_library/utils/generics/singleton.py
vartagg/dataprovider-py
e392af3dab21c99c51a32345710fcd0dc4023462
[ "Apache-2.0" ]
2
2018-03-27T11:06:46.000Z
2020-10-27T20:48:51.000Z
st_library/utils/generics/singleton.py
vartagg/dataprovider-py
e392af3dab21c99c51a32345710fcd0dc4023462
[ "Apache-2.0" ]
4
2018-02-26T08:12:39.000Z
2018-05-18T06:01:01.000Z
class Singleton(object): _instances = {} def __new__(cls, *args, **kwargs): if cls not in cls._instances: # noinspection PyArgumentList cls._instances[cls] = super(Singleton, cls).__new__(cls, *args, **kwargs) return cls._instances[cls]
31.777778
85
0.618881
285
0.996503
0
0
0
0
0
0
29
0.101399
5fb78ad70383d16f179dd4a23ab825be06e844e6
1,919
py
Python
apps/DuelingBanditsPureExploration/dashboard/Dashboard.py
erinzm/NEXT-chemistry
d6ca0a80640937b36f9cafb5ead371e7a8677734
[ "Apache-2.0" ]
155
2015-11-01T17:48:41.000Z
2022-02-06T21:37:41.000Z
apps/DuelingBanditsPureExploration/dashboard/Dashboard.py
erinzm/NEXT-chemistry
d6ca0a80640937b36f9cafb5ead371e7a8677734
[ "Apache-2.0" ]
193
2015-09-29T21:40:31.000Z
2020-04-21T15:09:13.000Z
apps/DuelingBanditsPureExploration/dashboard/Dashboard.py
erinzm/NEXT-chemistry
d6ca0a80640937b36f9cafb5ead371e7a8677734
[ "Apache-2.0" ]
54
2015-09-30T15:51:05.000Z
2022-02-13T05:26:20.000Z
import json import next.utils as utils from next.apps.AppDashboard import AppDashboard class MyAppDashboard(AppDashboard): def __init__(self,db,ell): AppDashboard.__init__(self,db,ell) def most_current_ranking(self,app, butler, alg_label): """ Description: Returns a ranking of arms in ...
47.975
158
0.604482
1,828
0.952579
0
0
0
0
0
0
1,205
0.627931
5fba9266d157d784d487f4f6d96c252ab58bc927
221
py
Python
modules/module0/02_datastructures_and_geometry/datastructures_0b.py
tetov/ITA19
1af68a8885caf83acd98f4136d0286539ccbe63b
[ "MIT" ]
7
2019-11-13T20:29:54.000Z
2020-02-26T14:30:54.000Z
modules/module0/02_datastructures_and_geometry/datastructures_0b.py
GeneKao/ITA19
c4b10dc183599eed4ed60d922b6ef5922d173bdb
[ "MIT" ]
4
2019-11-07T20:57:51.000Z
2020-03-04T11:43:18.000Z
modules/module0/02_datastructures_and_geometry/datastructures_0b.py
GeneKao/ITA19
c4b10dc183599eed4ed60d922b6ef5922d173bdb
[ "MIT" ]
6
2019-10-30T13:25:54.000Z
2020-02-14T14:06:09.000Z
import os import compas from compas.datastructures import Mesh HERE = os.path.dirname(__file__) DATA = os.path.join(HERE, 'data') FILE = os.path.join(DATA, 'faces.obj') mesh = Mesh.from_obj(FILE) print(mesh.summary())
18.416667
38
0.737557
0
0
0
0
0
0
0
0
17
0.076923
5fbebd443ba2cc788cd34ccb4de7f2967a894072
3,957
py
Python
vis_utils/animation/group_animation_controller.py
eherr/vis_utils
b757b01f42e6da02ad62130c3b0e61e9eaa3886f
[ "MIT" ]
4
2020-05-20T03:55:19.000Z
2020-12-24T06:33:40.000Z
vis_utils/animation/group_animation_controller.py
eherr/vis_utils
b757b01f42e6da02ad62130c3b0e61e9eaa3886f
[ "MIT" ]
1
2020-05-18T11:21:35.000Z
2020-07-07T21:25:57.000Z
vis_utils/animation/group_animation_controller.py
eherr/vis_utils
b757b01f42e6da02ad62130c3b0e61e9eaa3886f
[ "MIT" ]
1
2020-07-20T06:57:13.000Z
2020-07-20T06:57:13.000Z
#!/usr/bin/env python # # Copyright 2019 DFKI GmbH. # # 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, merg...
39.57
98
0.706849
2,717
0.686631
0
0
0
0
0
0
1,235
0.312105
5fc115feb7229821fab8bd49844fdb6a161d73e2
408
py
Python
deploy/api/src/schemas/koe_favorite_schema.py
bonybody/2020_hew_app
d09cdafd55348ed70424a443d8619114cae3d27f
[ "MIT" ]
1
2021-06-03T02:54:51.000Z
2021-06-03T02:54:51.000Z
deploy/api/src/schemas/koe_favorite_schema.py
bonybody/agri
d09cdafd55348ed70424a443d8619114cae3d27f
[ "MIT" ]
19
2021-01-01T09:48:51.000Z
2021-04-08T09:11:30.000Z
deploy/api/src/schemas/koe_favorite_schema.py
bonybody/agri
d09cdafd55348ed70424a443d8619114cae3d27f
[ "MIT" ]
1
2021-09-28T11:54:25.000Z
2021-09-28T11:54:25.000Z
import sys import os sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from database.database import ma from models import KoeFavorite from .user_schema import UserSchema from .koe_schema import KoeSchema class KoeFavoriteSchema(ma.SQLAlchemyAutoSchema): Koe = ma.Nested(KoeSch...
25.5
77
0.742647
163
0.39951
0
0
0
0
0
0
0
0
5fc3fd1b7cba71af7933022261d214435bda9000
2,786
py
Python
results/baseline/parse_rollout.py
XiaoSanchez/autophase
3d8d173ad27b9786e36efd22d0ceacbcf1cb1dfb
[ "BSD-3-Clause" ]
14
2020-04-03T12:41:50.000Z
2022-02-04T00:05:01.000Z
results/baseline/parse_rollout.py
XiaoSanchez/autophase
3d8d173ad27b9786e36efd22d0ceacbcf1cb1dfb
[ "BSD-3-Clause" ]
2
2020-03-02T04:32:58.000Z
2021-09-15T20:02:25.000Z
results/baseline/parse_rollout.py
XiaoSanchez/autophase
3d8d173ad27b9786e36efd22d0ceacbcf1cb1dfb
[ "BSD-3-Clause" ]
8
2020-03-02T10:30:36.000Z
2021-08-03T02:29:38.000Z
import pickle import sys import numpy as np def geomean(iterable): a = np.array(iterable).astype(float) prod = a.prod() prod = -prod if prod < 0 else prod return prod**(1.0/len(a)) # Define the valid programs here def is_valid_pgm(pgm): pgms = ['471', '4926', '12092', '3449', '4567', '16510', '6118'...
34.395062
401
0.623116
0
0
0
0
0
0
0
0
742
0.266332
5fc54e77ecccf0f0df60b5cd1eae650a55b8cc8e
3,349
py
Python
signatureanalyzer/tests/test_mapping.py
julianhess/getzlab-SignatureAnalyzer
7f3ce93285c2aaaca88e82fee5a24854c224b453
[ "MIT" ]
37
2020-01-16T15:00:27.000Z
2021-08-22T11:18:56.000Z
signatureanalyzer/tests/test_mapping.py
julianhess/getzlab-SignatureAnalyzer
7f3ce93285c2aaaca88e82fee5a24854c224b453
[ "MIT" ]
18
2020-01-27T19:04:00.000Z
2021-09-26T14:19:39.000Z
signatureanalyzer/tests/test_mapping.py
julianhess/getzlab-SignatureAnalyzer
7f3ce93285c2aaaca88e82fee5a24854c224b453
[ "MIT" ]
8
2020-07-07T14:05:44.000Z
2021-07-30T00:44:36.000Z
import unittest import pandas as pd import numpy as np import os import tempfile import shutil from signatureanalyzer.signatureanalyzer import run_spectra from signatureanalyzer.bnmf import ardnmf from signatureanalyzer.utils import file_loader SPECTRA_ARROW = "../../examples/example_luad_spectra_1.tsv" SPECTRA_WORD ...
39.869048
118
0.696327
2,933
0.875784
0
0
0
0
0
0
499
0.149
5fc5f8dbe2e450d186ac311e88fde09d3e71e36d
767
py
Python
src/transformer_utils/util/module_utils.py
cfoster0/transformer-utils
4e4bc61adb331f90bb2a9a394db07e25eda87555
[ "MIT" ]
10
2021-07-11T07:32:35.000Z
2022-02-16T16:46:19.000Z
src/transformer_utils/util/module_utils.py
cfoster0/transformer-utils
4e4bc61adb331f90bb2a9a394db07e25eda87555
[ "MIT" ]
null
null
null
src/transformer_utils/util/module_utils.py
cfoster0/transformer-utils
4e4bc61adb331f90bb2a9a394db07e25eda87555
[ "MIT" ]
2
2021-05-24T22:50:28.000Z
2021-09-14T16:14:10.000Z
from .python_utils import make_print_if_verbose def get_child_module_by_names(module, names): obj = module for getter in map(lambda name: lambda obj: getattr(obj, name), names): obj = getter(obj) return obj def get_leaf_modules(module, verbose=False): vprint = make_print_if_verbose(verbose) ...
23.96875
74
0.65189
0
0
0
0
0
0
0
0
6
0.007823
5fc75bc9dcba17efcc6fbd5b1c74a679be2c870d
32,615
py
Python
monetio/models/_rrfs_cmaq_mm.py
zmoon/monetio
c8326750fa5d2404ccec726a5088f9a0e7fd4c4a
[ "MIT" ]
1
2022-02-18T22:49:23.000Z
2022-02-18T22:49:23.000Z
monetio/models/_rrfs_cmaq_mm.py
zmoon/monetio
c8326750fa5d2404ccec726a5088f9a0e7fd4c4a
[ "MIT" ]
null
null
null
monetio/models/_rrfs_cmaq_mm.py
zmoon/monetio
c8326750fa5d2404ccec726a5088f9a0e7fd4c4a
[ "MIT" ]
1
2022-02-04T19:09:32.000Z
2022-02-04T19:09:32.000Z
""" RRFS-CMAQ File Reader """ import numpy as np import xarray as xr from numpy import concatenate from pandas import Series def can_do(index): if index.max(): return True else: return False def open_mfdataset( fname, convert_to_ppb=True, mech="cb6r3_ae6_aq", var_list=None, ...
29.569356
112
0.508079
0
0
0
0
0
0
0
0
14,252
0.436977
5fc818c5836435c92ae4ef2d17b3e1e01d7c0fde
816
bzl
Python
build/build.bzl
abaer123/gitlab-agent
71c94d781ae2a7ae2851bb946c37fe01b1ed3da0
[ "MIT" ]
null
null
null
build/build.bzl
abaer123/gitlab-agent
71c94d781ae2a7ae2851bb946c37fe01b1ed3da0
[ "MIT" ]
null
null
null
build/build.bzl
abaer123/gitlab-agent
71c94d781ae2a7ae2851bb946c37fe01b1ed3da0
[ "MIT" ]
null
null
null
load("@com_github_atlassian_bazel_tools//multirun:def.bzl", "command") load("@bazel_skylib//lib:shell.bzl", "shell") def copy_to_workspace(name, label, file_to_copy, workspace_relative_target_directory): command( name = name, command = "//build:copy_to_workspace", data = [label], ar...
37.090909
99
0.658088
0
0
0
0
0
0
0
0
315
0.386029
5fc9836cfddecb88f1956951f281f1c8d40b8f81
4,471
py
Python
CAAPR/CAAPR_AstroMagic/PTS/pts/magic/catalog/catalog.py
wdobbels/CAAPR
50d0b32642a61af614c22f1c6dc3c4a00a1e71a3
[ "MIT" ]
7
2016-05-20T21:56:39.000Z
2022-02-07T21:09:48.000Z
CAAPR/CAAPR_AstroMagic/PTS/pts/magic/catalog/catalog.py
wdobbels/CAAPR
50d0b32642a61af614c22f1c6dc3c4a00a1e71a3
[ "MIT" ]
1
2019-03-21T16:10:04.000Z
2019-03-22T17:21:56.000Z
CAAPR/CAAPR_AstroMagic/PTS/pts/magic/catalog/catalog.py
wdobbels/CAAPR
50d0b32642a61af614c22f1c6dc3c4a00a1e71a3
[ "MIT" ]
1
2020-05-19T16:17:17.000Z
2020-05-19T16:17:17.000Z
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
31.485915
97
0.547976
3,374
0.754472
0
0
0
0
0
0
2,269
0.507379
5fcaa9f085f2d78ed188a66c5c69d0728b2a6373
2,640
py
Python
tools/common.py
JamzumSum/yNet
78506738e64321cfd26f0af70a62dd2119948e39
[ "MIT" ]
5
2021-06-09T02:11:19.000Z
2021-10-04T09:00:31.000Z
tools/common.py
JamzumSum/yNet
78506738e64321cfd26f0af70a62dd2119948e39
[ "MIT" ]
null
null
null
tools/common.py
JamzumSum/yNet
78506738e64321cfd26f0af70a62dd2119948e39
[ "MIT" ]
null
null
null
from dataclasses import dataclass from typing import Iterable import torch from torchmetrics import ConfusionMatrix from collections import defaultdict argmax = lambda l: l.index(max(l)) BIRAD_MAP = ['2', '3', '4', '5'] def _lbm(): global BIRAD_MAP BIRAD_MAP = torch.load("./data/BIRADs/meta.pt")['classname...
24.220183
117
0.591667
2,277
0.861195
289
0.109304
1,441
0.545008
0
0
246
0.093041
5fcb3be04540c3af2931e387575e6b75d7da7f7e
34,361
py
Python
quantlib/backends/twn_accelerator/grrules/dporules.py
mdatres/quantlab
09fb24ede78f49768f829afe0fac2ac291b8fd4f
[ "Apache-2.0" ]
null
null
null
quantlib/backends/twn_accelerator/grrules/dporules.py
mdatres/quantlab
09fb24ede78f49768f829afe0fac2ac291b8fd4f
[ "Apache-2.0" ]
null
null
null
quantlib/backends/twn_accelerator/grrules/dporules.py
mdatres/quantlab
09fb24ede78f49768f829afe0fac2ac291b8fd4f
[ "Apache-2.0" ]
1
2022-01-02T10:10:46.000Z
2022-01-02T10:10:46.000Z
# # dporules.py # # Author(s): # Matteo Spallanzani <spmatteo@iis.ee.ethz.ch> # # Copyright (c) 2020-2021 ETH Zurich. # # 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.apach...
47.723611
143
0.619831
33,064
0.962254
0
0
0
0
0
0
9,270
0.269783
5fcc22d5ecaf0da083c5ac9d8ac997e97cc93417
5,896
py
Python
news_api/endpoints/models.py
rdoume/News_API
9c555fdc5e5b717b98bcfec27364b9612b9c4aa1
[ "MIT" ]
9
2019-07-19T13:19:55.000Z
2021-07-08T16:25:30.000Z
news_api/endpoints/models.py
rdoume/News_API
9c555fdc5e5b717b98bcfec27364b9612b9c4aa1
[ "MIT" ]
null
null
null
news_api/endpoints/models.py
rdoume/News_API
9c555fdc5e5b717b98bcfec27364b9612b9c4aa1
[ "MIT" ]
1
2021-05-12T01:50:04.000Z
2021-05-12T01:50:04.000Z
# -*- coding: utf-8 -*- # System imports import json # Third-party imports import falcon from news_api.endpoints.vespaSearcher import vespaSearch from news_api.endpoints.top_entities import getTopNewEntities from news_api.endpoints.top_clusters import getTopNewCluster # Local imports # from news_api import settings ...
35.518072
111
0.518318
5,567
0.944199
0
0
1,439
0.244064
0
0
1,687
0.286126
5fcda78cf21f154d5256341e1d4f6994551d5ce9
858
py
Python
exercicio9.py
isaacfelipe1/Estrutura_De_Dados_Um_UEA
79b693d186154b54b7bb0c2dac10cd4cf9886bb3
[ "Apache-2.0" ]
null
null
null
exercicio9.py
isaacfelipe1/Estrutura_De_Dados_Um_UEA
79b693d186154b54b7bb0c2dac10cd4cf9886bb3
[ "Apache-2.0" ]
null
null
null
exercicio9.py
isaacfelipe1/Estrutura_De_Dados_Um_UEA
79b693d186154b54b7bb0c2dac10cd4cf9886bb3
[ "Apache-2.0" ]
null
null
null
#9-Faça um programa que leia um número indeterminado de notas. Após esta entrada de dados, faça seguinte: #. Mostre a quantidade de notas que foram lidas. #. Exiba todas as notas na ordem em que foram informadas. #. Calcule e mostre a média das notas. #. Calcule e mostre a quantidade de notas acima da média calculada. ...
35.75
105
0.708625
0
0
0
0
0
0
0
0
537
0.618664
5fcddc4097a230efd88262807f43401aaaeff2ab
257
py
Python
p5.py
kmark1625/Project-Euler
e80c4f2044fdbff93331117b8f02aa0becbb0706
[ "MIT" ]
null
null
null
p5.py
kmark1625/Project-Euler
e80c4f2044fdbff93331117b8f02aa0becbb0706
[ "MIT" ]
null
null
null
p5.py
kmark1625/Project-Euler
e80c4f2044fdbff93331117b8f02aa0becbb0706
[ "MIT" ]
null
null
null
from fractions import gcd def smallestDiv(): """Finds smallest number that is evenly divisible from 1 through 20""" return reduce(lambda x,y: lcm(x,y), range(1,21)) def lcm(a,b): return (a*b) / gcd(a,b) if __name__ == '__main__': print smallestDiv()
21.416667
71
0.692607
0
0
0
0
0
0
0
0
80
0.311284
5fcf633d461876ef2ed0512751ad534119c618aa
1,249
py
Python
src/resnet_datasize_plot.py
chloechsu/nanoparticle
5e78fe33c2d562aa31d5e458be0dbf52813f20b1
[ "MIT" ]
1
2021-04-04T23:07:59.000Z
2021-04-04T23:07:59.000Z
src/resnet_datasize_plot.py
chloechsu/nanoparticle
5e78fe33c2d562aa31d5e458be0dbf52813f20b1
[ "MIT" ]
null
null
null
src/resnet_datasize_plot.py
chloechsu/nanoparticle
5e78fe33c2d562aa31d5e458be0dbf52813f20b1
[ "MIT" ]
3
2021-01-13T14:50:42.000Z
2022-03-20T16:19:52.000Z
import argparse import csv import glob import os import pandas as pd import matplotlib.pyplot as plt import numpy as np import seaborn as sns sns.set() shapes = ['TriangPrismIsosc', 'parallelepiped', 'sphere', 'wire'] def main(): trainsizes = [] avg_acc = [] for f in glob.glob('model/resnet18-all-Adam-l...
29.046512
78
0.622898
0
0
0
0
0
0
0
0
244
0.195356
5fd0efe4c22b97942030348d8ad7858091215264
1,482
py
Python
pyramid_bootstrap/__init__.py
keitheis/pyramid_bootstrap
e8d6e8b9081427bca264d16a679571c35d3527e5
[ "BSD-3-Clause" ]
null
null
null
pyramid_bootstrap/__init__.py
keitheis/pyramid_bootstrap
e8d6e8b9081427bca264d16a679571c35d3527e5
[ "BSD-3-Clause" ]
null
null
null
pyramid_bootstrap/__init__.py
keitheis/pyramid_bootstrap
e8d6e8b9081427bca264d16a679571c35d3527e5
[ "BSD-3-Clause" ]
1
2018-04-12T14:27:52.000Z
2018-04-12T14:27:52.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Keith Yang' __email__ = 'yang@keitheis.org' __version__ = '0.1.0' from pyramid.settings import asbool from .bootstrap import BootstrapFactory def includeme(config): DEFAULT = { 'versions': '3.0.3', 'use_min_file': True, 'use_c...
30.244898
79
0.625506
0
0
0
0
0
0
0
0
428
0.288799
5fd224ae58a35451a109abe33921bfe534a36c4b
3,043
py
Python
Data Structures/Linked List/Merge Two Sorted Linked Lists/merge_two_sorted_linked_lists.py
brianchiang-tw/HackerRank
02a30a0033b881206fa15b8d6b4ef99b2dc420c8
[ "MIT" ]
2
2020-05-28T07:15:00.000Z
2020-07-21T08:34:06.000Z
Data Structures/Linked List/Merge Two Sorted Linked Lists/merge_two_sorted_linked_lists.py
brianchiang-tw/HackerRank
02a30a0033b881206fa15b8d6b4ef99b2dc420c8
[ "MIT" ]
null
null
null
Data Structures/Linked List/Merge Two Sorted Linked Lists/merge_two_sorted_linked_lists.py
brianchiang-tw/HackerRank
02a30a0033b881206fa15b8d6b4ef99b2dc420c8
[ "MIT" ]
null
null
null
#!/bin/python3 import math import os import random import re import sys class SinglyLinkedListNode: def __init__(self, node_data): self.data = node_data self.next = None class SinglyLinkedList: def __init__(self): self.head = None self.tail = None def insert_node(self, no...
21.58156
72
0.612882
431
0.141637
0
0
0
0
0
0
643
0.211305
39563b416a76edc246cc669718217ec4a6dc8d69
199
py
Python
tools/stress_test.py
chouette254/quo
8979afd118e77d3d0f93f9fbe8711efada7158c5
[ "MIT" ]
5
2021-06-17T21:06:39.000Z
2022-03-11T06:45:51.000Z
tools/stress_test.py
chouette254/quo
8979afd118e77d3d0f93f9fbe8711efada7158c5
[ "MIT" ]
39
2021-07-19T19:36:18.000Z
2022-02-23T14:55:08.000Z
tools/stress_test.py
secretuminc/quo
c4f77d52f015c612d32ed0fc2fc79545af598f10
[ "MIT" ]
1
2021-05-31T17:19:15.000Z
2021-05-31T17:19:15.000Z
from quo import Console from quo.pretty import Pretty from quo.panel import Panel DATA = "My name is Quo" console = Console() for w in range(130): console.echo(Panel(Pretty(DATA), width=w))
15.307692
46
0.718593
0
0
0
0
0
0
0
0
16
0.080402
3957f752a49e9fed33ab81dcc197e7f08498b9c3
4,856
py
Python
wysihtml5/conf/defaults.py
vkuryachenko/django-wysihtml5
5f6fa86ecbfeccfae61b06386f1f6f44dfca94c0
[ "BSD-2-Clause" ]
4
2015-03-24T20:41:31.000Z
2021-05-24T15:41:16.000Z
wysihtml5/conf/defaults.py
vkuryachenko/django-wysihtml5
5f6fa86ecbfeccfae61b06386f1f6f44dfca94c0
[ "BSD-2-Clause" ]
1
2017-08-06T18:17:53.000Z
2017-08-06T18:17:53.000Z
wysihtml5/conf/defaults.py
vkuryachenko/django-wysihtml5
5f6fa86ecbfeccfae61b06386f1f6f44dfca94c0
[ "BSD-2-Clause" ]
3
2015-05-14T15:06:21.000Z
2021-05-24T15:43:05.000Z
#-*- coding: utf-8 -*- from django.conf import settings WYSIHTML5_EDITOR = { # Give the editor a name, the name will also be set as class # name on the iframe and on the iframe's body 'name': 'null', # Whether the editor should look like the textarea (by adopting styles) 'style': 'true', # Id...
36.787879
76
0.635914
0
0
0
0
0
0
0
0
3,570
0.735173
395a96908738ec18c9180da4437fee979a2a2992
6,496
py
Python
protocols/migration/migration_participant_100_to_reports_300.py
Lucioric2000/GelReportModels
1704cdea3242d5b46c8b81ef46553ccae2799435
[ "Apache-2.0" ]
14
2016-09-22T10:10:01.000Z
2020-09-23T11:40:37.000Z
protocols/migration/migration_participant_100_to_reports_300.py
Lucioric2000/GelReportModels
1704cdea3242d5b46c8b81ef46553ccae2799435
[ "Apache-2.0" ]
159
2016-09-22T11:08:46.000Z
2021-09-29T13:55:52.000Z
protocols/migration/migration_participant_100_to_reports_300.py
Lucioric2000/GelReportModels
1704cdea3242d5b46c8b81ef46553ccae2799435
[ "Apache-2.0" ]
17
2016-09-20T13:31:58.000Z
2020-10-19T04:58:19.000Z
from protocols import reports_3_0_0 as participant_old from protocols import participant_1_0_0 from protocols.migration import BaseMigration class MigrationParticipants100ToReports(BaseMigration): old_model = participant_1_0_0 new_model = participant_old def migrate_pedigree(self, old_instance): ...
56.982456
129
0.736761
6,352
0.977833
0
0
0
0
0
0
193
0.029711
395b088785153a0b12425d78d2c97981d28c0b99
584
py
Python
bluebottle/test/factory_models/pages.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
10
2015-05-28T18:26:40.000Z
2021-09-06T10:07:03.000Z
bluebottle/test/factory_models/pages.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
762
2015-01-15T10:00:59.000Z
2022-03-31T15:35:14.000Z
bluebottle/test/factory_models/pages.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
9
2015-02-20T13:19:30.000Z
2022-03-08T14:09:17.000Z
from builtins import object from datetime import timedelta import factory from django.utils.timezone import now from bluebottle.pages.models import Page from .accounts import BlueBottleUserFactory class PageFactory(factory.DjangoModelFactory): class Meta(object): model = Page language = 'en' ti...
27.809524
66
0.741438
382
0.65411
0
0
0
0
0
0
30
0.05137
395bc11ce97e1bb26dff3ffa2dd8e88c133704f6
2,403
py
Python
ietf/ipr/migrations/0007_create_ipr_doc_events.py
hassanakbar4/ietfdb
cabee059092ae776015410640226064331c293b7
[ "BSD-3-Clause" ]
25
2022-03-05T08:26:52.000Z
2022-03-30T15:45:42.000Z
ietf/ipr/migrations/0007_create_ipr_doc_events.py
hassanakbar4/ietfdb
cabee059092ae776015410640226064331c293b7
[ "BSD-3-Clause" ]
219
2022-03-04T17:29:12.000Z
2022-03-31T21:16:14.000Z
ietf/ipr/migrations/0007_create_ipr_doc_events.py
hassanakbar4/ietfdb
cabee059092ae776015410640226064331c293b7
[ "BSD-3-Clause" ]
22
2022-03-04T15:34:34.000Z
2022-03-28T13:30:59.000Z
# Copyright The IETF Trust 2020, All Rights Reserved # -*- coding: utf-8 -*- # Generated by Django 1.11.27 on 2020-01-17 12:32 from django.db import migrations def create_or_delete_ipr_doc_events(apps, delete=False): """Create or delete DocEvents for IprEvents Mostly duplicates IprEvent.create_doc_even...
34.826087
91
0.62422
289
0.120266
0
0
0
0
0
0
997
0.414898
395f29ec9cf26aad90082c0bbf20534ee8f84d4b
788
py
Python
getting_setting.py
madhurgupta96/Image-Fundamentals-with-OpenCV
890fcce30155e98ab66e206c3511d77040570ec5
[ "Apache-2.0" ]
null
null
null
getting_setting.py
madhurgupta96/Image-Fundamentals-with-OpenCV
890fcce30155e98ab66e206c3511d77040570ec5
[ "Apache-2.0" ]
null
null
null
getting_setting.py
madhurgupta96/Image-Fundamentals-with-OpenCV
890fcce30155e98ab66e206c3511d77040570ec5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Dec 15 23:52:04 2020 @author: Madhur Gupta """ from __future__ import print_function import cv2 import argparse ap=argparse.ArgumentParser() ap.add_argument('-i','--image',required=True,help='path to image') args=vars(ap.parse_args()) image=cv2.imread(args['...
22.514286
71
0.619289
0
0
0
0
0
0
0
0
316
0.401015
395f4cf60fb9e63158d7823964bdae4a063e3899
665
py
Python
zk_shell/tests/test_acl_reader.py
sellers/zk_shell
5f5972c4362212f97de91a75e44d2a551c7bcd51
[ "Apache-2.0" ]
163
2015-01-24T06:17:34.000Z
2021-12-17T22:58:46.000Z
zk_shell/tests/test_acl_reader.py
sellers/zk_shell
5f5972c4362212f97de91a75e44d2a551c7bcd51
[ "Apache-2.0" ]
86
2015-01-01T00:22:57.000Z
2022-03-02T14:50:59.000Z
zk_shell/tests/test_acl_reader.py
sellers/zk_shell
5f5972c4362212f97de91a75e44d2a551c7bcd51
[ "Apache-2.0" ]
32
2015-02-18T17:33:16.000Z
2021-12-28T03:43:45.000Z
# -*- coding: utf-8 -*- """ ACLReader test cases """ import unittest from kazoo.security import ACL, Id from zk_shell.acl import ACLReader class ACLReaderTestCase(unittest.TestCase): """ test watcher """ def test_extract_acl(self): acl = ACLReader.extract_acl('world:anyone:cdrwa') expected...
28.913043
97
0.685714
519
0.780451
0
0
0
0
0
0
187
0.281203
395f821293e57d64e71d8ac788f63dcdb5e4e300
3,815
py
Python
dictator/validators/base.py
brunosmmm/dictator
60314734b9d0c378fad77d296c8946165f372400
[ "MIT" ]
null
null
null
dictator/validators/base.py
brunosmmm/dictator
60314734b9d0c378fad77d296c8946165f372400
[ "MIT" ]
null
null
null
dictator/validators/base.py
brunosmmm/dictator
60314734b9d0c378fad77d296c8946165f372400
[ "MIT" ]
null
null
null
"""Base validators.""" import re from dictator.errors import ValidationError from dictator.validators import Validator from typing import Type, Callable, Any, Tuple, Union HEX_REGEX = re.compile(r"^(0x)?([0-9A-Fa-f]+)$") BIN_REGEX = re.compile(r"^(0b)?([0-1]+)$") class ValidateType(Validator): """Type validator...
27.644928
79
0.654522
1,477
0.387156
0
0
115
0.030144
0
0
1,036
0.27156
3960d947244ab5cacdb399b505a02597c36f0c4b
554
py
Python
copasi_test/ReportParserMoieties.py
copasi/python-copasi-testsuite
604ce52f95b4a0e2631712b22c331cd8c263bd05
[ "Artistic-2.0" ]
null
null
null
copasi_test/ReportParserMoieties.py
copasi/python-copasi-testsuite
604ce52f95b4a0e2631712b22c331cd8c263bd05
[ "Artistic-2.0" ]
null
null
null
copasi_test/ReportParserMoieties.py
copasi/python-copasi-testsuite
604ce52f95b4a0e2631712b22c331cd8c263bd05
[ "Artistic-2.0" ]
null
null
null
from .ReportParser import ReportParser class ReportParserMoieties(ReportParser): def __init__(self): ReportParser.__init__(self) def parseLines(self, lines): # type: ([str]) -> None current = self.skip_until(lines, 0, 'Link matrix(ann)') if current == -1: return ...
29.157895
71
0.628159
512
0.924188
0
0
0
0
0
0
61
0.110108
396297e39e5a9bcc3e2b8459e2edf7a1785fe3e7
1,575
py
Python
models/networks/recurrent/encoder.py
jamesoneill12/LayerFusion
99cba1030ed8c012a453bc7715830fc99fb980dc
[ "Apache-2.0" ]
null
null
null
models/networks/recurrent/encoder.py
jamesoneill12/LayerFusion
99cba1030ed8c012a453bc7715830fc99fb980dc
[ "Apache-2.0" ]
null
null
null
models/networks/recurrent/encoder.py
jamesoneill12/LayerFusion
99cba1030ed8c012a453bc7715830fc99fb980dc
[ "Apache-2.0" ]
null
null
null
import torch.nn as nn import torch class EncoderRNN(nn.Module): def __init__(self, vocab_size, hidden_size, nlayers=2): super(EncoderRNN, self).__init__() self.nlayers = nlayers self.hidden_size = hidden_size self.embedding = nn.Embedding(vocab_size, hidden_size) self.gru ...
35
109
0.670476
826
0.524444
0
0
0
0
0
0
909
0.577143
396309f795615e199934ec29198bf8e06add077e
1,087
py
Python
relationship_classifiction/test.py
suolyer/PyTorch_BERT_Pipeline_IE
869a1fc937e268a565f5b30a2105a460b4e07f59
[ "MIT" ]
8
2021-05-23T02:04:09.000Z
2022-01-14T08:58:42.000Z
relationship_classifiction/test.py
2019hong/PyTorch_BERT_Pipeline_IE
9ee66bc9ceaed42e996e9b2414612de3fc0b23bb
[ "MIT" ]
2
2021-05-14T00:34:45.000Z
2021-08-08T08:36:33.000Z
relationship_classifiction/test.py
2019hong/PyTorch_BERT_Pipeline_IE
9ee66bc9ceaed42e996e9b2414612de3fc0b23bb
[ "MIT" ]
1
2021-09-28T15:15:44.000Z
2021-09-28T15:15:44.000Z
import torch import torch.nn as nn from torch.optim.lr_scheduler import CosineAnnealingLR, CosineAnnealingWarmRestarts import itertools import matplotlib.pyplot as plt initial_lr = 0.1 class model(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(in_channels=3, out_c...
24.155556
83
0.689052
192
0.164807
0
0
0
0
0
0
217
0.186266
39637ce1898c8dbfd20a89d25579fc15ae6c2bcd
432
py
Python
events_calendar/urls.py
mkbeh/Site-Nordic-Walking-
ba98f41db09ed448ecc4db175f65ef4fa2d64979
[ "MIT" ]
null
null
null
events_calendar/urls.py
mkbeh/Site-Nordic-Walking-
ba98f41db09ed448ecc4db175f65ef4fa2d64979
[ "MIT" ]
8
2021-04-08T21:57:55.000Z
2022-03-12T00:50:38.000Z
events_calendar/urls.py
mkbeh/Site-Nordic-Walking-
ba98f41db09ed448ecc4db175f65ef4fa2d64979
[ "MIT" ]
null
null
null
from django.urls import path from .views import events_calendar, calendar_event_detail, past_competitions app_name = 'events_calendar' urlpatterns = [ path('past_competitions/', past_competitions, name='past_competitions'), path('<int:year>/<int:month>/<int:day>/<int:hour>/<slug:event>/', calendar_...
30.857143
76
0.733796
0
0
0
0
0
0
0
0
167
0.386574
39642b71284a9db7523df49c8dca22286f61d556
1,236
py
Python
examples/linear_regression/01_linear_regression.py
zhaoshiying97/trading_gym
d4af8d724efa17420e6ebb430f6f9d4f08c6f83a
[ "Apache-2.0" ]
32
2019-12-06T19:23:51.000Z
2022-03-08T06:08:58.000Z
examples/linear_regression/01_linear_regression.py
zhaoshiying97/trading_gym
d4af8d724efa17420e6ebb430f6f9d4f08c6f83a
[ "Apache-2.0" ]
2
2020-02-20T11:04:07.000Z
2020-03-12T08:47:54.000Z
examples/linear_regression/01_linear_regression.py
zhaoshiying97/trading_gym
d4af8d724efa17420e6ebb430f6f9d4f08c6f83a
[ "Apache-2.0" ]
15
2019-12-12T07:43:34.000Z
2022-03-06T13:02:39.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import pdb import numpy as np import pandas as pd from sklearn.linear_model import LinearRegression from trading_gym.utils.data.toy import create_toy_data from trading_gym.envs.portfolio_gym.portfolio_gym import PortfolioTradingGym order_book_id_number = 100 toy_data = cr...
30.9
142
0.741909
0
0
0
0
0
0
0
0
157
0.127023
3965e8f70ee4cbba8c4a1ffa659f82e9962bbdcf
619
py
Python
migrations/versions/6f98e24760d_session_speaker.py
jace/goafunnel
5ff25f0e6a247ff1f6e87fce2a793d1775476cc0
[ "BSD-2-Clause" ]
null
null
null
migrations/versions/6f98e24760d_session_speaker.py
jace/goafunnel
5ff25f0e6a247ff1f6e87fce2a793d1775476cc0
[ "BSD-2-Clause" ]
null
null
null
migrations/versions/6f98e24760d_session_speaker.py
jace/goafunnel
5ff25f0e6a247ff1f6e87fce2a793d1775476cc0
[ "BSD-2-Clause" ]
null
null
null
"""session speaker Revision ID: 6f98e24760d Revises: 58588eba8cb8 Create Date: 2013-11-22 17:28:47.751025 """ # revision identifiers, used by Alembic. revision = '6f98e24760d' down_revision = '58588eba8cb8' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
22.925926
89
0.6979
0
0
0
0
0
0
0
0
388
0.626817
39671833a02d25c6d6b9a61a074e54f03e6112e8
1,124
py
Python
decision_tree/dt_author_id.py
ncfausti/udacity-machine-learning
223eb1821e739d048d278629a2e466b3f2af8912
[ "MIT" ]
null
null
null
decision_tree/dt_author_id.py
ncfausti/udacity-machine-learning
223eb1821e739d048d278629a2e466b3f2af8912
[ "MIT" ]
null
null
null
decision_tree/dt_author_id.py
ncfausti/udacity-machine-learning
223eb1821e739d048d278629a2e466b3f2af8912
[ "MIT" ]
null
null
null
#!/usr/bin/python """ this is the code to accompany the Lesson 3 (decision tree) mini-project use an DT to identify emails from the Enron corpus by their authors Sara has label 0 Chris has label 1 """ import sys from time import time sys.path.append("../tools/") from email_preprocess impor...
24.434783
75
0.674377
0
0
0
0
0
0
0
0
585
0.520463
3968419bade051f1706f219d6c57e614a8cbfb88
49,588
py
Python
climateeconomics/tests/_l1_test_energy_global_values.py
os-climate/witness-core
3ef9a44d86804c5ad57deec3c9916348cb3bfbb8
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
1
2022-01-14T06:37:42.000Z
2022-01-14T06:37:42.000Z
climateeconomics/tests/_l1_test_energy_global_values.py
os-climate/witness-core
3ef9a44d86804c5ad57deec3c9916348cb3bfbb8
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
climateeconomics/tests/_l1_test_energy_global_values.py
os-climate/witness-core
3ef9a44d86804c5ad57deec3c9916348cb3bfbb8
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
''' mode: python; py-indent-offset: 4; tab-width: 4; coding: utf-8 Copyright (C) 2020 Airbus SAS ''' import unittest import time import numpy as np import pandas as pd from sos_trades_core.execution_engine.execution_engine import ExecutionEngine from climateeconomics.sos_processes.iam.witness.witness_dev.usecase_witnes...
47.680769
304
0.638239
49,047
0.98909
0
0
0
0
0
0
28,559
0.575926
396aa7d766efce4140f100be9476c86629b27ef9
11,383
py
Python
bmtk/simulator/bionet/modules/save_synapses.py
tjbanks/bmtk
52fee3b230ceb14a666c46f57f2031c38f1ac5b1
[ "BSD-3-Clause" ]
1
2019-03-27T12:23:09.000Z
2019-03-27T12:23:09.000Z
bmtk/simulator/bionet/modules/save_synapses.py
tjbanks/bmtk
52fee3b230ceb14a666c46f57f2031c38f1ac5b1
[ "BSD-3-Clause" ]
null
null
null
bmtk/simulator/bionet/modules/save_synapses.py
tjbanks/bmtk
52fee3b230ceb14a666c46f57f2031c38f1ac5b1
[ "BSD-3-Clause" ]
null
null
null
import os import csv import h5py import numpy as np from neuron import h from .sim_module import SimulatorMod from bmtk.simulator.bionet.biocell import BioCell from bmtk.simulator.bionet.io_tools import io from bmtk.simulator.bionet.pointprocesscell import PointProcessCell pc = h.ParallelContext() MPI_RANK = int(pc....
48.233051
139
0.598876
11,025
0.96855
0
0
0
0
0
0
1,474
0.129491
396b128eaea90d279b0b41fb297fa2fa82ed6d87
1,930
py
Python
nanome/api/user/presenter_info.py
nanome-ai/nanome-plugin-api
f2ce6a5e3123ee7449a90c2659f3891124289f4a
[ "MIT" ]
3
2020-07-02T13:08:27.000Z
2021-11-24T14:32:53.000Z
nanome/api/user/presenter_info.py
nanome-ai/nanome-plugin-api
f2ce6a5e3123ee7449a90c2659f3891124289f4a
[ "MIT" ]
11
2020-09-14T17:01:47.000Z
2022-02-18T04:00:52.000Z
nanome/api/user/presenter_info.py
nanome-ai/nanome-plugin-api
f2ce6a5e3123ee7449a90c2659f3891124289f4a
[ "MIT" ]
5
2020-08-12T16:30:03.000Z
2021-12-06T18:04:23.000Z
class PresenterInfo(): """ | Class to fetch information about the current nanome session's presenter. """ def __init__(self): self._account_id = "" self._account_name = "" self._account_email = "" self._has_org = False self._org_id = 0 self._org_name = ""...
21.208791
78
0.564249
1,929
0.999482
0
0
1,537
0.796373
0
0
695
0.360104
396be9b8e76a36fa6d51ae0f674f69f4c1dcf376
1,217
py
Python
pydouyu/packet_util.py
Kexiii/pydouyu
494732159980b7b71575e6757899c48052c6c2e0
[ "MIT" ]
11
2019-02-22T01:02:32.000Z
2021-12-15T08:50:26.000Z
pydouyu/packet_util.py
Kexiii/pydouyu
494732159980b7b71575e6757899c48052c6c2e0
[ "MIT" ]
2
2020-07-05T01:26:18.000Z
2021-01-07T15:22:57.000Z
pydouyu/packet_util.py
Kexiii/pydouyu
494732159980b7b71575e6757899c48052c6c2e0
[ "MIT" ]
3
2019-04-23T01:22:20.000Z
2021-12-04T09:09:16.000Z
import time client_msg_type = 689 reserved_data_field = 0 def assemble_login_str(room_id): res = "type@=loginreq/roomid@=" + str(room_id) + "/" return res def assemble_join_group_str(room_id): res = "type@=joingroup/rid@=" + str(room_id) + "/gid@=-9999/"; return res def assemble_heartbeat_str(): ...
23.403846
66
0.632703
0
0
0
0
0
0
0
0
162
0.133114
396d4f672042b6ba26b0ebbbfccf8610a433735a
2,976
py
Python
scripts/staging/sklearn/mappers/supervised.py
mgd-hin/systemds
08944a7305cbc4f4d9cbbd4565efa8bcc93b82e3
[ "Apache-2.0" ]
372
2017-06-09T01:02:53.000Z
2020-06-24T05:45:00.000Z
scripts/staging/sklearn/mappers/supervised.py
ywcb00/systemds
5cc523971854cdf4f22e6199987a86e213fae4e2
[ "Apache-2.0" ]
418
2017-06-08T16:27:44.000Z
2020-06-25T12:15:54.000Z
scripts/staging/sklearn/mappers/supervised.py
ywcb00/systemds
5cc523971854cdf4f22e6199987a86e213fae4e2
[ "Apache-2.0" ]
190
2017-06-08T19:32:54.000Z
2020-06-15T12:26:12.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 unde...
33.438202
80
0.576277
2,024
0.680108
0
0
0
0
0
0
1,517
0.509745
396e8a1e3e6aa7c66751f496564ba6b53523d4aa
43
py
Python
homemade_steganog/__init__.py
zoomie/homemade_steganog
1ab0a140b6a2e0d9d36073d067a2c808c97adf38
[ "MIT" ]
1
2019-03-12T13:25:43.000Z
2019-03-12T13:25:43.000Z
homemade_steganog/__init__.py
zoomie/homemade_encryption
1ab0a140b6a2e0d9d36073d067a2c808c97adf38
[ "MIT" ]
4
2020-03-24T16:43:01.000Z
2022-03-11T23:39:53.000Z
homemade_steganog/__init__.py
zoomie/homemade_encryption
1ab0a140b6a2e0d9d36073d067a2c808c97adf38
[ "MIT" ]
null
null
null
from .home import Steg __all__ = ['Steg',]
14.333333
22
0.674419
0
0
0
0
0
0
0
0
6
0.139535
396fa59895ef035568d0b517a96fd649c4c2ec84
4,364
py
Python
xyw_macro/win32.py
xue0228/keyboard
dcb0def1d87a9197676c0f405b980a67e128ab24
[ "MIT" ]
null
null
null
xyw_macro/win32.py
xue0228/keyboard
dcb0def1d87a9197676c0f405b980a67e128ab24
[ "MIT" ]
null
null
null
xyw_macro/win32.py
xue0228/keyboard
dcb0def1d87a9197676c0f405b980a67e128ab24
[ "MIT" ]
null
null
null
import ctypes from ctypes import wintypes, windll import win32api import win32con import win32gui # PUL = ctypes.POINTER(ctypes.c_ulong) PUL = ctypes.c_void_p class KeyBdMsg(ctypes.Structure): """ 键盘回调函数用结构体 """ _fields_ = [ ('vkCode', wintypes.DWORD), ('scanCode', wintypes.DWORD), ...
21.82
68
0.632676
1,845
0.39866
0
0
0
0
0
0
820
0.177182
397163cbc30071660c1df03a91c22f9cdffa46d3
496
py
Python
helpdesk/simple/views.py
fratoj/helpdesk
302c41491f26432bd65e468f015cdb123a47bcad
[ "MIT" ]
null
null
null
helpdesk/simple/views.py
fratoj/helpdesk
302c41491f26432bd65e468f015cdb123a47bcad
[ "MIT" ]
4
2021-04-08T21:51:21.000Z
2021-06-10T20:21:24.000Z
helpdesk/simple/views.py
fratoj/helpdesk
302c41491f26432bd65e468f015cdb123a47bcad
[ "MIT" ]
null
null
null
from django.shortcuts import render import numpy as np def index(request): return render(request, 'simple/index.html') def room(request, room_name): safe = np.random.normal(size=20, loc=0, scale=1) return render(request, 'simple/room.html', { 'room_name': room_name, 'some_thing': { ...
21.565217
52
0.59879
0
0
0
0
0
0
0
0
106
0.21371
397474e797b04315ff3ee3188dba1be27f9df132
752
py
Python
fullthrottleapp/models.py
Pranjali16/FullThrottle-Project
bb6fbd3783d22c2e47ad85687e18f02a30c69799
[ "Apache-2.0" ]
null
null
null
fullthrottleapp/models.py
Pranjali16/FullThrottle-Project
bb6fbd3783d22c2e47ad85687e18f02a30c69799
[ "Apache-2.0" ]
null
null
null
fullthrottleapp/models.py
Pranjali16/FullThrottle-Project
bb6fbd3783d22c2e47ad85687e18f02a30c69799
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser class User(AbstractBaseUser, models.Model): """User Model""" name = models.CharField(max_length=500, blank=True, null=True) tz = models.CharField(max_length=500, blank=True, null=True) USERNAME_FIELD = 'name...
34.181818
91
0.679521
653
0.868351
0
0
0
0
0
0
65
0.086436
3974ecf545e9249007cc970e291df529ea220e8f
83
py
Python
devind_helpers/validator/__init__.py
devind-team/devind-django-helpers
5c64d46a12802bbe0b70e44aa9d19bf975511b6e
[ "MIT" ]
null
null
null
devind_helpers/validator/__init__.py
devind-team/devind-django-helpers
5c64d46a12802bbe0b70e44aa9d19bf975511b6e
[ "MIT" ]
4
2022-02-18T09:24:05.000Z
2022-03-31T16:46:29.000Z
devind_helpers/validator/__init__.py
devind-team/devind-django-helpers
5c64d46a12802bbe0b70e44aa9d19bf975511b6e
[ "MIT" ]
null
null
null
from .validators import Validator, BaseRule __all__ = ('Validator', 'BaseRule',)
16.6
43
0.73494
0
0
0
0
0
0
0
0
21
0.253012