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
63c65035704dd82d0e35220cf5d131d497f11b32
133
py
Python
output/models/sun_data/attr_decl/ad_name/ad_name00110m/ad_name00110m7_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/sun_data/attr_decl/ad_name/ad_name00110m/ad_name00110m7_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/sun_data/attr_decl/ad_name/ad_name00110m/ad_name00110m7_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.sun_data.attr_decl.ad_name.ad_name00110m.ad_name00110m7_xsd.ad_name00110m7 import Root __all__ = [ "Root", ]
22.166667
105
0.796992
0
0
0
0
0
0
0
0
6
0.045113
63c6855c80193d1b3280b06dc0b0691722907cfc
1,444
py
Python
data/process.py
jbchouinard/untitled-word-game
dc4433318d9d811c3e9d47d51934fed608d96522
[ "MIT" ]
null
null
null
data/process.py
jbchouinard/untitled-word-game
dc4433318d9d811c3e9d47d51934fed608d96522
[ "MIT" ]
null
null
null
data/process.py
jbchouinard/untitled-word-game
dc4433318d9d811c3e9d47d51934fed608d96522
[ "MIT" ]
null
null
null
def frequencies(): freqs = {} with open("frequency.txt", "r") as f: for line in f: word, freq = line.strip().split("\t") freq = int(freq) freqs[word] = freq return freqs def matches(word, letter_count): if len(word) != letter_count: return False ...
32.818182
59
0.608033
0
0
0
0
0
0
0
0
378
0.261773
63c68621abf624a4f16177142cfd89a3892f13a1
1,459
py
Python
megatron/fp16_deprecated/loss_scaler.py
adammoody/Megatron-DeepSpeed
972211163608818fe9e5ba821246f18d0a5dc264
[ "MIT" ]
2,869
2019-03-22T04:45:32.000Z
2022-03-31T14:47:42.000Z
megatron/fp16_deprecated/loss_scaler.py
adammoody/Megatron-DeepSpeed
972211163608818fe9e5ba821246f18d0a5dc264
[ "MIT" ]
161
2019-04-23T21:00:16.000Z
2022-03-27T15:33:17.000Z
megatron/fp16_deprecated/loss_scaler.py
adammoody/Megatron-DeepSpeed
972211163608818fe9e5ba821246f18d0a5dc264
[ "MIT" ]
567
2019-04-05T22:17:47.000Z
2022-03-31T04:45:25.000Z
# coding=utf-8 # Copyright (c) 2020, NVIDIA CORPORATION. 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 # # ...
36.475
80
0.662097
727
0.498286
0
0
0
0
0
0
704
0.482522
63c724cd0c9b172541c1859415974b49037ba195
415
py
Python
ParsingProject/movie/migrations/0005_alter_movie_photo.py
rzhvn1/Parsing-APi
3e22c5a0fabbdc733ec2263e71eb885fb901a65e
[ "MIT" ]
null
null
null
ParsingProject/movie/migrations/0005_alter_movie_photo.py
rzhvn1/Parsing-APi
3e22c5a0fabbdc733ec2263e71eb885fb901a65e
[ "MIT" ]
null
null
null
ParsingProject/movie/migrations/0005_alter_movie_photo.py
rzhvn1/Parsing-APi
3e22c5a0fabbdc733ec2263e71eb885fb901a65e
[ "MIT" ]
null
null
null
# Generated by Django 3.2 on 2021-04-09 14:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('movie', '0004_rename_summary_text_movie_desc'), ] operations = [ migrations.AlterField( model_name='movie', name='phot...
21.842105
73
0.609639
324
0.780723
0
0
0
0
0
0
105
0.253012
63c74a7746328169f8af4e57a44eb64b67d34e0f
3,485
py
Python
mosfit/modules/transforms/diffusion_csm.py
bxg682/MOSFiT
c65ab943bd0024b3d72c992c01a19f4f82956e98
[ "MIT" ]
25
2017-05-01T10:26:00.000Z
2021-12-29T09:36:06.000Z
mosfit/modules/transforms/diffusion_csm.py
bxg682/MOSFiT
c65ab943bd0024b3d72c992c01a19f4f82956e98
[ "MIT" ]
156
2016-09-19T21:06:42.000Z
2022-02-07T02:32:39.000Z
mosfit/modules/transforms/diffusion_csm.py
bxg682/MOSFiT
c65ab943bd0024b3d72c992c01a19f4f82956e98
[ "MIT" ]
48
2016-10-05T20:32:31.000Z
2022-02-16T16:57:56.000Z
"""Definitions for the `DiffusionCSM` class.""" from collections import OrderedDict import numpy as np from scipy.interpolate import interp1d from mosfit.constants import C_CGS, DAY_CGS, M_SUN_CGS, AU_CGS from mosfit.modules.transforms.transform import Transform # Important: Only define one ``Module`` class per fil...
38.722222
79
0.573314
3,159
0.906456
0
0
0
0
0
0
429
0.123099
63c7c198233f90418ed5f82dcfeaec9570780535
5,905
py
Python
preprocess.py
floydhub/textutil-preprocess-text
9cf4e29004970a45ed2f35c63b8cb3d66ac063a9
[ "MIT" ]
null
null
null
preprocess.py
floydhub/textutil-preprocess-text
9cf4e29004970a45ed2f35c63b8cb3d66ac063a9
[ "MIT" ]
null
null
null
preprocess.py
floydhub/textutil-preprocess-text
9cf4e29004970a45ed2f35c63b8cb3d66ac063a9
[ "MIT" ]
null
null
null
""" Preprocess text """ from __future__ import absolute_import, division, print_function, unicode_literals import argparse import codecs import csv import textacy def str2bool(val): """ Helper method to convert string to bool """ if val is None: return False val = val.lower().strip() if...
43.419118
113
0.594073
0
0
0
0
0
0
0
0
2,031
0.342438
63c8dabc395502393e558d6b73692e6820ae740d
5,013
py
Python
main.py
faluciano/travel-tinder
634a1e16288c02e8ef399e77728eef5725098203
[ "CC-BY-3.0" ]
null
null
null
main.py
faluciano/travel-tinder
634a1e16288c02e8ef399e77728eef5725098203
[ "CC-BY-3.0" ]
null
null
null
main.py
faluciano/travel-tinder
634a1e16288c02e8ef399e77728eef5725098203
[ "CC-BY-3.0" ]
null
null
null
from flask import Flask, render_template, request, url_for, redirect,session from datetime import timedelta from flask_sqlalchemy import SQLAlchemy import os import googlemaps import json app = Flask(__name__) seckey = os.urandom(12) app.secret_key=seckey key = os.environ["googleapikey"] app.permanent_session_lifeti...
35.553191
235
0.603631
571
0.113904
0
0
3,818
0.76162
0
0
979
0.195292
63c915d5906220490ace40f167a3f374fce27916
1,411
py
Python
src/exabgp/bgp/message/update/attribute/bgpls/node/lterid.py
pierky/exabgp
34be537ae5906c0830b31da1152ae63108ccf911
[ "BSD-3-Clause" ]
1,560
2015-01-01T08:53:05.000Z
2022-03-29T20:22:43.000Z
src/exabgp/bgp/message/update/attribute/bgpls/node/lterid.py
pierky/exabgp
34be537ae5906c0830b31da1152ae63108ccf911
[ "BSD-3-Clause" ]
818
2015-01-01T17:38:40.000Z
2022-03-30T07:29:24.000Z
src/exabgp/bgp/message/update/attribute/bgpls/node/lterid.py
pierky/exabgp
34be537ae5906c0830b31da1152ae63108ccf911
[ "BSD-3-Clause" ]
439
2015-01-06T21:20:41.000Z
2022-03-19T23:24:25.000Z
# encoding: utf-8 """ nodename.py Created by Evelio Vila on 2016-12-01. Copyright (c) 2014-2017 Exa Networks. All rights reserved. """ from exabgp.protocol.ip import IP from exabgp.bgp.message.notification import Notify from exabgp.bgp.message.update.attribute.bgpls.linkstate import LinkState # | 1028 | I...
29.395833
83
0.537916
593
0.420269
0
0
655
0.46421
0
0
672
0.476258
63c98447c20ad02d24ae44cfb39b2b5fe1101422
641
py
Python
tests/test_performance.py
ramonhagenaars/nptying
99927e1007b5d5d14fbd57559ec3ad2f7c352478
[ "MIT" ]
null
null
null
tests/test_performance.py
ramonhagenaars/nptying
99927e1007b5d5d14fbd57559ec3ad2f7c352478
[ "MIT" ]
null
null
null
tests/test_performance.py
ramonhagenaars/nptying
99927e1007b5d5d14fbd57559ec3ad2f7c352478
[ "MIT" ]
null
null
null
from timeit import Timer from unittest import TestCase import numpy as np from nptyping import ( Float, NDArray, Shape, ) class PerformanceTest(TestCase): def test_instance_check_performance(self): arr = np.random.randn(42, 42, 3, 5) def _check_inst(): isinstance(arr, N...
23.740741
72
0.669267
502
0.783151
0
0
0
0
0
0
20
0.031201
63c9dc1c7d3d8ba098eeeb8725c6567c3b999e8b
5,185
py
Python
aws_log_parser/models.py
dpetzold/aws-log-parser
a36ea99696f332d25879a7faa24f6d922ad11370
[ "Apache-2.0" ]
17
2020-05-04T00:35:14.000Z
2022-03-17T06:05:26.000Z
aws_log_parser/models.py
dpetzold/aws-log-parser
a36ea99696f332d25879a7faa24f6d922ad11370
[ "Apache-2.0" ]
14
2019-10-24T03:08:17.000Z
2021-12-07T19:13:41.000Z
aws_log_parser/models.py
dpetzold/aws-log-parser
a36ea99696f332d25879a7faa24f6d922ad11370
[ "Apache-2.0" ]
8
2020-05-04T12:23:16.000Z
2022-03-19T13:30:13.000Z
import datetime import typing from enum import ( Enum, auto, ) from dataclasses import dataclass from http import cookies class HttpType(Enum): Http = "http" Https = "https" H2 = "h2" WebSocket = "ws" WebSocketSecure = "wss" @dataclass(frozen=True) class Host: ip: str port: int...
24.457547
58
0.707811
4,906
0.946191
0
0
3,398
0.655352
0
0
131
0.025265
63ca287602c1af9c49104b0c48b37549ad2032ff
3,596
py
Python
__init__.py
rhammond17/Blender2MSFS2
51ed5e6624e6e072ee03bb7123013ccce4159fbd
[ "Apache-2.0" ]
25
2021-07-01T04:48:08.000Z
2022-03-15T00:20:55.000Z
__init__.py
rhammond17/Blender2MSFS2
51ed5e6624e6e072ee03bb7123013ccce4159fbd
[ "Apache-2.0" ]
9
2021-10-14T12:58:11.000Z
2022-03-22T05:10:05.000Z
__init__.py
rhammond17/Blender2MSFS2
51ed5e6624e6e072ee03bb7123013ccce4159fbd
[ "Apache-2.0" ]
4
2021-12-18T22:26:00.000Z
2022-03-16T14:00:27.000Z
################################################################################################### # # Copyright 2020 Otmar Nitsche # # 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 # # htt...
32.690909
203
0.626808
929
0.258343
0
0
0
0
0
0
2,083
0.579255
63ca797f894cb6d4d5eb308094d39bb41a5d11cc
6,250
py
Python
bin/calendar_builder/process/read_calc_request_queue.py
rsterbin/liturgicalendar
9ac1d779cf9bedaaeeb00eea83deff98445d0af2
[ "MIT" ]
2
2016-09-17T09:03:41.000Z
2018-02-24T03:09:38.000Z
bin/calendar_builder/process/read_calc_request_queue.py
rsterbin/liturgicalendar
9ac1d779cf9bedaaeeb00eea83deff98445d0af2
[ "MIT" ]
null
null
null
bin/calendar_builder/process/read_calc_request_queue.py
rsterbin/liturgicalendar
9ac1d779cf9bedaaeeb00eea83deff98445d0af2
[ "MIT" ]
null
null
null
import argparse import boto3 import datetime import dateutil import json import logging import signal from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.engine.url import URL import sys import time from ..fetch.calculated import Calculated from ..fetch.overrides import Overrid...
32.552083
123
0.61792
0
0
0
0
0
0
0
0
1,688
0.27008
63ca9a094cf1438ed29a52f8444164667fcea641
1,330
py
Python
apps/Messaging/build/process_style_output.py
Keneral/apackages
af6a7ffde2e52d8d4e073b4030244551246248ad
[ "Unlicense" ]
null
null
null
apps/Messaging/build/process_style_output.py
Keneral/apackages
af6a7ffde2e52d8d4e073b4030244551246248ad
[ "Unlicense" ]
null
null
null
apps/Messaging/build/process_style_output.py
Keneral/apackages
af6a7ffde2e52d8d4e073b4030244551246248ad
[ "Unlicense" ]
null
null
null
#!/usr/bin/python # Copyright (C) 2015 The Android Open Source Project # # 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 req...
34.102564
112
0.696992
0
0
0
0
0
0
0
0
814
0.61203
63cb2c56d23fea40ba77a5d5c270072879d21082
2,609
py
Python
aiotruenas_client/websockets/interfaces.py
colemamd/aiotruenas-client
26f754fcceadbacbfc87a19465d5a8d035e4bd00
[ "MIT" ]
11
2020-12-30T00:33:01.000Z
2022-01-25T07:56:55.000Z
aiotruenas_client/websockets/interfaces.py
colemamd/aiotruenas-client
26f754fcceadbacbfc87a19465d5a8d035e4bd00
[ "MIT" ]
35
2020-09-29T07:45:49.000Z
2022-03-29T15:02:52.000Z
aiotruenas_client/websockets/interfaces.py
colemamd/aiotruenas-client
26f754fcceadbacbfc87a19465d5a8d035e4bd00
[ "MIT" ]
3
2020-12-30T18:19:03.000Z
2021-09-18T17:32:22.000Z
from __future__ import annotations import asyncio from abc import ABC, abstractmethod from typing import Any, List, Optional from ..job import Job, TJobId from ..machine import Machine class StateFetcher(ABC): @classmethod @abstractmethod async def create( cls, machine: WebsocketMachine,...
28.358696
92
0.637026
2,413
0.924875
0
0
2,278
0.873131
1,941
0.743963
1,080
0.413952
63cde583e31d98eb0acd90cf10aba92b87ffc53d
6,409
py
Python
greparl/SearchEngine/backend/similarity/similarity_manager.py
GeorgeVasiliadis/GreParl
10c085c9892ff156aeb13401063c9e0e20d0baff
[ "MIT" ]
null
null
null
greparl/SearchEngine/backend/similarity/similarity_manager.py
GeorgeVasiliadis/GreParl
10c085c9892ff156aeb13401063c9e0e20d0baff
[ "MIT" ]
null
null
null
greparl/SearchEngine/backend/similarity/similarity_manager.py
GeorgeVasiliadis/GreParl
10c085c9892ff156aeb13401063c9e0e20d0baff
[ "MIT" ]
null
null
null
import pickle import typing from dataclasses import dataclass import numpy as np @dataclass class SimilarityMember: """ Represents a member of parliament. Contains their name and a list of the parties they have served with """ name: str parties: list[str] @dataclass class SimilarityResult: ...
46.442029
118
0.688407
6,296
0.982369
0
0
722
0.112654
0
0
2,128
0.332033
63cea53033390cd1b8049400439d92676e1209c5
607
py
Python
substrabac/libs/versioning.py
GuillaumeCisco/substra-backend
777ec0cfc10a1aad34cccba449e4923c20786d32
[ "Apache-2.0" ]
null
null
null
substrabac/libs/versioning.py
GuillaumeCisco/substra-backend
777ec0cfc10a1aad34cccba449e4923c20786d32
[ "Apache-2.0" ]
null
null
null
substrabac/libs/versioning.py
GuillaumeCisco/substra-backend
777ec0cfc10a1aad34cccba449e4923c20786d32
[ "Apache-2.0" ]
null
null
null
from rest_framework import exceptions from rest_framework.utils.mediatypes import _MediaType from rest_framework.versioning import AcceptHeaderVersioning class AcceptHeaderVersioningRequired(AcceptHeaderVersioning): def determine_version(self, request, *args, **kwargs): media_type = _MediaType(request.ac...
37.9375
102
0.7743
450
0.741351
0
0
0
0
0
0
24
0.039539
63d0bbce5f3e728a7a5ac833c26d4513a4af7fbd
503
py
Python
travelling/migrations/0050_trip_maps_location.py
HerbyDE/jagdreisencheck-webapp
9af5deda2423b787da88a0c893f3c474d8e4f73f
[ "BSD-3-Clause" ]
null
null
null
travelling/migrations/0050_trip_maps_location.py
HerbyDE/jagdreisencheck-webapp
9af5deda2423b787da88a0c893f3c474d8e4f73f
[ "BSD-3-Clause" ]
null
null
null
travelling/migrations/0050_trip_maps_location.py
HerbyDE/jagdreisencheck-webapp
9af5deda2423b787da88a0c893f3c474d8e4f73f
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 2.1.7 on 2019-03-29 08:52 from django.db import migrations import django_google_maps.fields class Migration(migrations.Migration): dependencies = [ ('travelling', '0049_auto_20190327_1849'), ] operations = [ migrations.AddField( model_name='trip', ...
25.15
136
0.662028
385
0.765408
0
0
0
0
0
0
126
0.250497
63d2d0462174b9a239ed087ce1d36b74f3a8a55d
1,445
py
Python
processor/lib/logging.py
Torbay-Tech/sbkup
5da307db5dc5b47c3ba11b1c4e53113cbc34bfca
[ "0BSD" ]
null
null
null
processor/lib/logging.py
Torbay-Tech/sbkup
5da307db5dc5b47c3ba11b1c4e53113cbc34bfca
[ "0BSD" ]
null
null
null
processor/lib/logging.py
Torbay-Tech/sbkup
5da307db5dc5b47c3ba11b1c4e53113cbc34bfca
[ "0BSD" ]
null
null
null
import logging import os import sys from lib.readCfg import ConfigReader ''' Simple Logger utility add this line to py file log = logging.getLogger(__file__) and use the log object by calling log.error("My error message") log.info("My info message") ''' class Logger: def __init__(self): readCfg = ConfigR...
36.125
89
0.636678
1,188
0.822145
0
0
0
0
0
0
621
0.429758
63d2fa5f2f28f8b7f760b3c3cb14ecd0069dc120
15,789
py
Python
Ball-in-Maze/Tut-Ball-in-Maze.py
francholi/PandaExamples
729674387cc482f25296f08bbb5fb571e59fc4ea
[ "MIT" ]
null
null
null
Ball-in-Maze/Tut-Ball-in-Maze.py
francholi/PandaExamples
729674387cc482f25296f08bbb5fb571e59fc4ea
[ "MIT" ]
null
null
null
Ball-in-Maze/Tut-Ball-in-Maze.py
francholi/PandaExamples
729674387cc482f25296f08bbb5fb571e59fc4ea
[ "MIT" ]
null
null
null
# Author: Shao Zhang, Phil Saltzman # Last Updated: 5/2/2005 # # This tutorial shows how to detect and respond to collisions. It uses solids # create in code and the egg files, how to set up collision masks, a traverser, # and a handler, how to detect collisions, and how to dispatch function based # on the collisions....
49.495298
80
0.699981
14,253
0.902717
0
0
0
0
0
0
8,937
0.566027
63d4c063bbe7c148a20e0a5fe25d62de6c6aae65
626
py
Python
source/code/preprocessing/wordtovectransformer.py
IooHooI/NEURAL_NETWORKS
1fff41658f01ebd61dc26745ad377d86f4716d30
[ "Unlicense" ]
null
null
null
source/code/preprocessing/wordtovectransformer.py
IooHooI/NEURAL_NETWORKS
1fff41658f01ebd61dc26745ad377d86f4716d30
[ "Unlicense" ]
null
null
null
source/code/preprocessing/wordtovectransformer.py
IooHooI/NEURAL_NETWORKS
1fff41658f01ebd61dc26745ad377d86f4716d30
[ "Unlicense" ]
null
null
null
import gensim import numpy as np from sklearn.base import BaseEstimator, TransformerMixin class WordToVecTransformer(BaseEstimator, TransformerMixin): def __init__(self, size=100): self.size = size self.word2vec = dict() def fit(self, X, y=None): model = gensim.models.Word2Vec(X, size...
31.3
120
0.65655
533
0.851438
0
0
0
0
0
0
0
0
63d4f1afadb072b78a9829303ff58b7feeb731b4
1,766
py
Python
simplectf/__main__.py
alberttxu/simplectf
719ceccd9c1e5b0b868f2e9a7e342d3fe2a7c664
[ "MIT" ]
1
2020-10-29T04:43:24.000Z
2020-10-29T04:43:24.000Z
simplectf/__main__.py
alberttxu/simplectf
719ceccd9c1e5b0b868f2e9a7e342d3fe2a7c664
[ "MIT" ]
null
null
null
simplectf/__main__.py
alberttxu/simplectf
719ceccd9c1e5b0b868f2e9a7e342d3fe2a7c664
[ "MIT" ]
null
null
null
import argparse import time from . import CTFModel, find_ctf def main(): default_amplitude_contrast = 0.07 parser = argparse.ArgumentParser() parser.add_argument("mrc", help="input aligned mrc file") parser.add_argument( "--pixelsize", type=float, help="pixelsize in angstroms", required=True...
32.703704
85
0.669309
0
0
0
0
0
0
0
0
696
0.394111
63d5fb092f0cc24e2c27f0886b0cd5ba71e075d6
4,033
py
Python
tests/test_hvac.py
joro75/mytoyota
405f7d84b3737846124aac6e7692aa6da52838a1
[ "MIT" ]
null
null
null
tests/test_hvac.py
joro75/mytoyota
405f7d84b3737846124aac6e7692aa6da52838a1
[ "MIT" ]
1
2022-02-12T16:46:48.000Z
2022-02-12T16:46:48.000Z
tests/test_hvac.py
joro75/mytoyota
405f7d84b3737846124aac6e7692aa6da52838a1
[ "MIT" ]
null
null
null
"""pytest tests for mytoyota.models.hvac.Hvac""" from mytoyota.models.hvac import Hvac # pylint: disable=no-self-use class TestHvac: """pytest functions to test Hvac""" @staticmethod def _create_example_data(): """Create hvac with predefined data""" return Hvac( { ...
31.023077
60
0.521944
3,911
0.96975
0
0
1,725
0.427721
0
0
1,089
0.270022
63d63032b91f57211f0ecc481533bc76092d870f
414
py
Python
TWO D ARRAY MANIPULATION.py
Vedakeerthi/Python-programs
91f3f21211bfaba576d1ce5981166e356fc36b38
[ "MIT" ]
null
null
null
TWO D ARRAY MANIPULATION.py
Vedakeerthi/Python-programs
91f3f21211bfaba576d1ce5981166e356fc36b38
[ "MIT" ]
null
null
null
TWO D ARRAY MANIPULATION.py
Vedakeerthi/Python-programs
91f3f21211bfaba576d1ce5981166e356fc36b38
[ "MIT" ]
null
null
null
import numpy as np # EXTRACTING SOME COLUMNS OR ROWS OF THE 2D ARRAY arr1 = np.arange(36).reshape(6,6) print("THE 2D ARRAY : ",arr1) ex = np.array(arr1) print("EXTRACTION OF THE 4 ROW AND 5 ROW : ", ex[3:5]) # FINDING THE SUM OF THE COLUMNS arr2 = np.array([[1,3,5,6],[3,6,7,3],[2,3,6,6],[4,5,8,5]]) prin...
29.571429
66
0.628019
0
0
0
0
0
0
0
0
195
0.471014
63d731aa59cc13a2b71fa76d81924363872807c5
1,125
py
Python
tests/102_projectstarter/002_validate.py
Sam-prog-sudo/boussole
5d6ec94356f9a91ff4d6d23c1700d3512b67006a
[ "MIT" ]
13
2016-05-19T15:18:41.000Z
2022-03-22T15:37:32.000Z
tests/102_projectstarter/002_validate.py
Sam-prog-sudo/boussole
5d6ec94356f9a91ff4d6d23c1700d3512b67006a
[ "MIT" ]
38
2016-04-07T00:30:58.000Z
2022-02-28T13:29:33.000Z
tests/102_projectstarter/002_validate.py
Sam-prog-sudo/boussole
5d6ec94356f9a91ff4d6d23c1700d3512b67006a
[ "MIT" ]
3
2016-05-20T09:21:57.000Z
2020-10-12T10:56:49.000Z
# -*- coding: utf-8 -*- import pytest from boussole.exceptions import SettingsInvalidError @pytest.mark.parametrize("paths", [ ( '/home/foo', '/home/bar', ), ( '/home', '/home/bar', '/var/lib', ), ( '/home', '/home/bar', '/home/bar.g...
17.578125
53
0.458667
0
0
0
0
1,027
0.912889
0
0
413
0.367111
891ecd9b4c5792da34f463d0d4884a7fedddb4b9
883
py
Python
Providers/nxOMSAutomationWorker/automationworker/3.x/worker/importHelper.py
chsamala2/PowerShell-DSC-for-Linux
5cac971f1877dd545c71be50b0ffd29199ac1acc
[ "MIT" ]
110
2019-05-06T21:17:02.000Z
2022-03-27T12:57:57.000Z
Providers/nxOMSAutomationWorker/automationworker/3.x/worker/importHelper.py
chsamala2/PowerShell-DSC-for-Linux
5cac971f1877dd545c71be50b0ffd29199ac1acc
[ "MIT" ]
82
2019-05-09T00:41:23.000Z
2022-03-22T07:35:26.000Z
Providers/nxOMSAutomationWorker/automationworker/3.x/worker/importHelper.py
chsamala2/PowerShell-DSC-for-Linux
5cac971f1877dd545c71be50b0ffd29199ac1acc
[ "MIT" ]
65
2019-05-21T21:37:26.000Z
2022-03-19T01:25:38.000Z
#!/usr/bin/env python # ==================================== # Copyright (c) Microsoft Corporation. All rights reserved. # ==================================== PY_MAJOR_VERSION = 0 PY_MINOR_VERSION = 2 CONFIGPARSER_KEY = "configparser" QUEUE_KEY = "queue" import sys def install_aliases(): """ Imports the rel...
26.757576
109
0.640997
0
0
0
0
0
0
0
0
466
0.527746
89211948f7b76ec3184dd80009cdf870aed75612
1,917
py
Python
docs/examples/immutable-field.py
rolepoint/flump
37603387afa7a4af64fe93c03dfd4f389833178b
[ "MIT" ]
17
2016-03-04T00:54:12.000Z
2019-07-17T08:42:34.000Z
docs/examples/immutable-field.py
rolepoint/flump
37603387afa7a4af64fe93c03dfd4f389833178b
[ "MIT" ]
35
2016-03-04T18:02:59.000Z
2017-12-06T15:14:34.000Z
docs/examples/immutable-field.py
rolepoint/flump
37603387afa7a4af64fe93c03dfd4f389833178b
[ "MIT" ]
2
2016-11-30T16:12:29.000Z
2018-09-30T12:39:32.000Z
from collections import namedtuple import uuid from flask import Flask from flump import FlumpBlueprint, FlumpView, OrmIntegration, Fetcher from flump.validators import Immutable from marshmallow import fields, Schema # Our non-persistent "database" INSTANCES = [] # The "model" we will be storing in our "database" U...
24.576923
76
0.679708
1,047
0.546166
0
0
166
0.086594
0
0
431
0.22483
8921919e62754476a6b499fb99cccaec5396399a
416
py
Python
01_introductory_problems/10_trailing_zeroes.py
hariharanragothaman/CSES
fa3478a71fbf66f695673e2a644d84084f6a3b90
[ "MIT" ]
1
2021-06-17T17:14:13.000Z
2021-06-17T17:14:13.000Z
01_introductory_problems/10_trailing_zeroes.py
hariharanragothaman/CSES
fa3478a71fbf66f695673e2a644d84084f6a3b90
[ "MIT" ]
null
null
null
01_introductory_problems/10_trailing_zeroes.py
hariharanragothaman/CSES
fa3478a71fbf66f695673e2a644d84084f6a3b90
[ "MIT" ]
null
null
null
""" Calculate the number of trailing zeroes in a factorial """ """ Solution approaches: > Consider prime factors of n! - 2's and 5's contribute to zeroes. if we count the number of 2's and 5's we can count zeroes. - If we can count the number of 5's we should be done - since number of 2's will always be more ni fac...
18.086957
108
0.663462
0
0
0
0
0
0
0
0
328
0.788462
8922370796ea430aa932d199eb3e29be90edb535
6,410
py
Python
study/python/pyqt/demo/signup.py
cheenwe/blog
a866b3ab98aa58e3ed4a7624fbb72c8fd8dee790
[ "MIT" ]
10
2016-09-28T03:22:41.000Z
2020-06-16T08:42:25.000Z
study/python/pyqt/demo/signup.py
cheenwe/blog
a866b3ab98aa58e3ed4a7624fbb72c8fd8dee790
[ "MIT" ]
12
2017-04-18T08:41:04.000Z
2020-06-10T02:54:58.000Z
study/python/pyqt/demo/signup.py
cheenwe/blog
a866b3ab98aa58e3ed4a7624fbb72c8fd8dee790
[ "MIT" ]
8
2016-09-28T03:03:32.000Z
2019-09-16T04:22:01.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindow.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindow.ui' # # Created by: PyQt5 UI code...
43.605442
615
0.680811
5,525
0.854205
0
0
0
0
0
0
1,606
0.248299
89246eeb031a4daaf956547c2a82f3969d7ebdc9
1,267
py
Python
globality_black/jupyter_formatter.py
globality-corp/globality-black
24817b8d8f25300d166e13c38cf96c01dbc0e75e
[ "MIT" ]
2
2020-12-11T19:59:48.000Z
2022-01-17T15:01:11.000Z
globality_black/jupyter_formatter.py
globality-corp/globality-black
24817b8d8f25300d166e13c38cf96c01dbc0e75e
[ "MIT" ]
4
2021-02-10T10:10:40.000Z
2021-12-09T17:57:43.000Z
globality_black/jupyter_formatter.py
globality-corp/globality-black
24817b8d8f25300d166e13c38cf96c01dbc0e75e
[ "MIT" ]
null
null
null
"""Helper class to use with `jupyterlab_code_formatter` Jupyter extension. See README for details""" import logging import black from jupyterlab_code_formatter.formatters import BaseFormatter, handle_line_ending_and_magic from globality_black.reformat_text import reformat_text class GlobalityBlackFormatter(BaseFor...
35.194444
100
0.719811
983
0.775848
0
0
798
0.629834
0
0
528
0.416732
89248949c4bf2e73af24eb041ea87a139342c58e
2,530
py
Python
tests/unit/test_role_repository.py
joeseggie/resourceidea
aae6120e3ec84f3fc7e1ab1bc833ce37bd06685f
[ "MIT" ]
null
null
null
tests/unit/test_role_repository.py
joeseggie/resourceidea
aae6120e3ec84f3fc7e1ab1bc833ce37bd06685f
[ "MIT" ]
21
2019-01-26T20:39:34.000Z
2019-06-20T10:09:57.000Z
tests/unit/test_role_repository.py
joeseggie/resourceidea
aae6120e3ec84f3fc7e1ab1bc833ce37bd06685f
[ "MIT" ]
null
null
null
from app.role.models.role import Role from app.role.repositories.role_repository import RoleRepository def test_update(session): """ Test the role repository update function. """ # Arrange test_model = RoleRepository.create(Role(name='Super User')) test_model_id = test_model.id update_fiel...
25.049505
77
0.687747
0
0
0
0
0
0
0
0
572
0.226087
8925352e9bd235c372978fa797a57bca0150adfc
7,661
py
Python
python/craftassist/ttad-annotate/process_results.py
satyamedh/craftassist
d97cbc14bc25149d3ef41737231ab9f3cb7e392a
[ "MIT" ]
626
2019-07-18T18:40:44.000Z
2022-03-29T17:34:43.000Z
python/craftassist/ttad-annotate/process_results.py
satyamedh/craftassist
d97cbc14bc25149d3ef41737231ab9f3cb7e392a
[ "MIT" ]
42
2019-07-27T11:04:15.000Z
2021-02-23T03:15:14.000Z
python/craftassist/ttad-annotate/process_results.py
satyamedh/craftassist
d97cbc14bc25149d3ef41737231ab9f3cb7e392a
[ "MIT" ]
89
2019-07-19T15:07:39.000Z
2022-02-15T18:44:24.000Z
""" Copyright (c) Facebook, Inc. and its affiliates. """ import csv import argparse import json from collections import defaultdict, Counter import re from ttad_annotate import MAX_WORDS def process_result(full_d): worker_id = full_d["WorkerId"] d = with_prefix(full_d, "Answer.root.") try: acti...
30.521912
94
0.531784
0
0
0
0
0
0
0
0
1,980
0.258452
892751e84a7f6a1e839a96fb0ef3b05f1a088251
9,110
py
Python
lanzou/gui/others.py
akalasysx/lanzou-gui
4eea55828954ce372de1491288df44ad279994de
[ "MIT" ]
1
2020-12-29T20:58:39.000Z
2020-12-29T20:58:39.000Z
lanzou/gui/others.py
akalasysx/lanzou-gui
4eea55828954ce372de1491288df44ad279994de
[ "MIT" ]
null
null
null
lanzou/gui/others.py
akalasysx/lanzou-gui
4eea55828954ce372de1491288df44ad279994de
[ "MIT" ]
null
null
null
''' 重新封装的控件 ''' import os from PyQt5.QtCore import Qt, pyqtSignal, QTimer, QSize from PyQt5.QtGui import QTextDocument, QAbstractTextDocumentLayout, QPalette, QFontMetrics, QIcon from PyQt5.QtWidgets import (QApplication, QAbstractItemView, QStyle, QListView, QLineEdit, QTableView, QPushBu...
35.585938
112
0.641493
8,633
0.927282
0
0
0
0
0
0
1,883
0.202256
89279f2c5ae2941cabd43bcd029a5a17b5f9cae4
30,355
py
Python
fltk/synthpriv/attacks/nasr.py
tudelft-eemcs-dml/fltk-testbed-gr-1
bbe01d5d82a447ad8b6d9e3f350f831922a8b8b7
[ "BSD-2-Clause" ]
null
null
null
fltk/synthpriv/attacks/nasr.py
tudelft-eemcs-dml/fltk-testbed-gr-1
bbe01d5d82a447ad8b6d9e3f350f831922a8b8b7
[ "BSD-2-Clause" ]
null
null
null
fltk/synthpriv/attacks/nasr.py
tudelft-eemcs-dml/fltk-testbed-gr-1
bbe01d5d82a447ad8b6d9e3f350f831922a8b8b7
[ "BSD-2-Clause" ]
null
null
null
""" Membership inference attack based on https://github.com/privacytrustlab/ml_privacy_meter/blob/master/ml_privacy_meter/attack/meminf.py """ import datetime from itertools import zip_longest import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import numpy as np import torch import torch.nn.funct...
37.154223
134
0.602306
27,354
0.901137
0
0
0
0
0
0
5,721
0.18847
892a2f69832448fa92e158619e9bc1ae462b36c7
1,183
py
Python
examples/routes.py
StanislavMitrofanov/fastapi-admin
844d982c6c80dc7a313e2540cc043d6265646ba6
[ "Apache-2.0" ]
null
null
null
examples/routes.py
StanislavMitrofanov/fastapi-admin
844d982c6c80dc7a313e2540cc043d6265646ba6
[ "Apache-2.0" ]
null
null
null
examples/routes.py
StanislavMitrofanov/fastapi-admin
844d982c6c80dc7a313e2540cc043d6265646ba6
[ "Apache-2.0" ]
null
null
null
from fastapi import Depends, HTTPException from starlette.requests import Request from starlette.responses import RedirectResponse from starlette.status import HTTP_303_SEE_OTHER, HTTP_404_NOT_FOUND from examples.models import Config from fastapi_admin.app import app from fastapi_admin.depends import get_resources fro...
31.972973
95
0.723584
0
0
0
0
815
0.688926
748
0.632291
174
0.147084
892b5e79e284470ebd59bd46fdb143b8b121f246
670
py
Python
solutions/p015.py
xianlinfeng/project_euler_python3
77eca44eb2b1d13bc70d6dc0258b737449d43a23
[ "MIT" ]
2
2019-12-10T17:10:02.000Z
2020-07-04T10:30:19.000Z
p015.py
pranayjoshi/projecteuler
238a7844654e214dff9c2f8b596af470b828113c
[ "Apache-2.0" ]
null
null
null
p015.py
pranayjoshi/projecteuler
238a7844654e214dff9c2f8b596af470b828113c
[ "Apache-2.0" ]
1
2020-01-13T17:44:40.000Z
2020-01-13T17:44:40.000Z
# # Solution to Project Euler problem 15 # Copyright (c) Project Nayuki. All rights reserved. # # https://www.nayuki.io/page/project-euler-solutions # https://github.com/nayuki/Project-Euler-solutions # import eulerlib # This is a classic combinatorics problem. To get from the top left corner to the bottom right ...
31.904762
117
0.758209
0
0
0
0
0
0
0
0
550
0.820896
892ba219404b4a36c279e6259dff3417d0449bd6
435
py
Python
LeetCode_Python/graph_algorithms/breadthfirst_printer.py
nlantau/Codewars_2020_2021
055fbf8785ddd52b9f8e8c2b59294ead01852467
[ "MIT" ]
null
null
null
LeetCode_Python/graph_algorithms/breadthfirst_printer.py
nlantau/Codewars_2020_2021
055fbf8785ddd52b9f8e8c2b59294ead01852467
[ "MIT" ]
null
null
null
LeetCode_Python/graph_algorithms/breadthfirst_printer.py
nlantau/Codewars_2020_2021
055fbf8785ddd52b9f8e8c2b59294ead01852467
[ "MIT" ]
null
null
null
# nlantau, 2022-01-01 from collections import deque def breadth_depth_print(graph, source): queue = deque([source]) while queue: curr = queue.popleft() print(curr) for neighbor in graph[curr]: queue.append(neighbor) g = { 'a' : ['b', 'c'], 'b' : ['d'], 'c' :...
15.535714
39
0.498851
0
0
0
0
0
0
0
0
67
0.154023
892c1c86b81f563a72783ae080f4de286ab23459
100
py
Python
gym_invaders/ai_invader/model/__init__.py
Jh123x/Orbital
6f8f2da4fd26ef1d77c0c6183230c3a5e6bf0bb9
[ "MIT" ]
4
2020-05-15T11:17:09.000Z
2020-06-30T01:11:41.000Z
gym_invaders/ai_invader/model/__init__.py
Jh123x/Orbital
6f8f2da4fd26ef1d77c0c6183230c3a5e6bf0bb9
[ "MIT" ]
10
2020-05-16T10:45:32.000Z
2020-07-27T07:17:02.000Z
gym_invaders/ai_invader/model/__init__.py
Jh123x/Orbital
6f8f2da4fd26ef1d77c0c6183230c3a5e6bf0bb9
[ "MIT" ]
null
null
null
from .basemodel import BaseModel from .dqncnn import DQNCNN from .evolutionary import EvolutionaryAI
33.333333
40
0.86
0
0
0
0
0
0
0
0
0
0
892cb1bece9f2a7a57ecaff6febef2e19d2db6be
8,360
py
Python
util/call_differential_mods.py
ritututeja/HAMR
a299f402365c34ec3447f584fd9de5c498a6b315
[ "MIT" ]
2
2020-04-17T04:27:46.000Z
2020-06-22T15:46:07.000Z
util/call_differential_mods.py
ritututeja/HAMR
a299f402365c34ec3447f584fd9de5c498a6b315
[ "MIT" ]
2
2021-05-25T16:51:41.000Z
2021-07-13T01:35:08.000Z
util/call_differential_mods.py
ritututeja/HAMR
a299f402365c34ec3447f584fd9de5c498a6b315
[ "MIT" ]
1
2021-06-09T15:53:20.000Z
2021-06-09T15:53:20.000Z
#!/bin/python2.7 # # Copyright (c) 2013 University of Pennsylvania # # 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...
43.769634
236
0.616866
0
0
0
0
0
0
0
0
4,231
0.5061
892dc54a723d08d5259a8460a94c096a75910404
3,660
py
Python
ark_nlp/nn/biaffine_bert.py
yubuyuabc/ark-nlp
165d35cfacd7476791c0aeba19bf43f4f8079553
[ "Apache-2.0" ]
1
2022-03-23T05:10:55.000Z
2022-03-23T05:10:55.000Z
ark_nlp/nn/biaffine_bert.py
yubuyuabc/ark-nlp
165d35cfacd7476791c0aeba19bf43f4f8079553
[ "Apache-2.0" ]
null
null
null
ark_nlp/nn/biaffine_bert.py
yubuyuabc/ark-nlp
165d35cfacd7476791c0aeba19bf43f4f8079553
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 DataArk Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
29.756098
74
0.646175
2,886
0.771245
0
0
0
0
0
0
1,366
0.365045
892e48833b5baafde56ca7f950f5d8a10d6829a8
278
py
Python
src/py/fi3201/intro/for-nested.py
butiran/butiran.github.io
bf99f55819a140190e5bda8f9675109ef607eb9d
[ "MIT" ]
null
null
null
src/py/fi3201/intro/for-nested.py
butiran/butiran.github.io
bf99f55819a140190e5bda8f9675109ef607eb9d
[ "MIT" ]
2
2020-08-08T13:57:20.000Z
2020-08-08T14:18:05.000Z
src/py/fi3201/intro/for-nested.py
butiran/butiran.github.io
bf99f55819a140190e5bda8f9675109ef607eb9d
[ "MIT" ]
1
2020-08-08T13:54:23.000Z
2020-08-08T13:54:23.000Z
# # for-nested.py # Use nested for to display numbers in Python 3.7 # # Sparisoma Viridi | https://github.com/dudung # # Execute: python3.7 for.py # # 20210122 # 0933 Create this example, test it, and it works. # for i in range(1, 5): for j in range(1, 4): print(i, j)
17.375
50
0.654676
0
0
0
0
0
0
0
0
207
0.744604
8931c54e93c9c10297df6cda39f1b73fb07b65c6
1,463
py
Python
volttron/platform/lib/kwonlyargs.py
rmay-intwine/volttron
a449f70e32f73ff0136a838d0feddb928ede6298
[ "Apache-2.0" ]
2
2019-10-03T17:00:34.000Z
2019-10-03T17:00:38.000Z
volttron/platform/lib/kwonlyargs.py
rmay-intwine/volttron
a449f70e32f73ff0136a838d0feddb928ede6298
[ "Apache-2.0" ]
2
2018-08-29T13:45:17.000Z
2018-09-06T12:34:23.000Z
volttron/platform/lib/kwonlyargs.py
rmay-intwine/volttron
a449f70e32f73ff0136a838d0feddb928ede6298
[ "Apache-2.0" ]
1
2019-10-21T12:56:38.000Z
2019-10-21T12:56:38.000Z
'''Support functions for implementing keyword-only arguments. This module is designed to make it easy to support keyword-only arguments in Python 2.7 while providing the same kind of exceptions one would see with Python 3.x. Basic usage: .. code-block:: python def foo(arg1, *args, **kwargs): # Use requi...
30.479167
79
0.659604
427
0.291866
0
0
301
0.205742
0
0
1,019
0.696514
8931f5e36e69dfcbd54c87e3f84f28cc88a8724d
2,509
py
Python
pyomrx/tests/test_examples.py
ShaunHowell/py-omrx
dc76a2a286488de1ad1fe131ca552f556583b0b3
[ "X11" ]
null
null
null
pyomrx/tests/test_examples.py
ShaunHowell/py-omrx
dc76a2a286488de1ad1fe131ca552f556583b0b3
[ "X11" ]
5
2021-03-31T20:44:39.000Z
2022-02-16T10:54:11.000Z
pyomrx/tests/test_examples.py
ShaunHowell/py-omrx
dc76a2a286488de1ad1fe131ca552f556583b0b3
[ "X11" ]
null
null
null
import os import pytest from pathlib import Path from pyomrx.core.form_maker import FormMaker from pyomrx.core.omr_factory import OmrFactory import pandas as pd from pyomrx.utils.test_utils import * def test_attendance_register_example(request, res_folder): attendance_example_folder = Path('examples/attendance_re...
39.825397
84
0.749701
0
0
0
0
0
0
0
0
366
0.145875
89322cf303e8c5a843e0f5f0b11c5853b5ee35f7
13,871
py
Python
moldesign/geom/constraints.py
Autodesk/molecular-design-toolkit
5f45a47fea21d3603899a6366cb163024f0e2ec4
[ "Apache-2.0" ]
147
2016-07-15T18:53:55.000Z
2022-01-30T04:36:39.000Z
moldesign/geom/constraints.py
cherishyli/molecular-design-toolkit
5f45a47fea21d3603899a6366cb163024f0e2ec4
[ "Apache-2.0" ]
151
2016-07-15T21:35:11.000Z
2019-10-10T08:57:29.000Z
moldesign/geom/constraints.py
cherishyli/molecular-design-toolkit
5f45a47fea21d3603899a6366cb163024f0e2ec4
[ "Apache-2.0" ]
33
2016-08-02T00:04:51.000Z
2021-09-02T10:05:04.000Z
from __future__ import print_function, absolute_import, division from future.builtins import * from future import standard_library standard_library.install_aliases() # Copyright 2017 Autodesk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
34.591022
103
0.635426
12,486
0.900151
403
0.029053
144
0.010381
0
0
5,329
0.384183
8934c9215b91bf26ad0e501197779b64c284834c
6,407
py
Python
loldib/getratings/models/NA/na_poppy/na_poppy_jng.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_poppy/na_poppy_jng.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_poppy/na_poppy_jng.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
from getratings.models.ratings import Ratings class NA_Poppy_Jng_Aatrox(Ratings): pass class NA_Poppy_Jng_Ahri(Ratings): pass class NA_Poppy_Jng_Akali(Ratings): pass class NA_Poppy_Jng_Alistar(Ratings): pass class NA_Poppy_Jng_Amumu(Ratings): pass class NA_Poppy_Jng_Anivia(Ratings): pass ...
15.364508
46
0.761667
5,806
0.906196
0
0
0
0
0
0
0
0
8935615b837a49fef702e885fe7f7711b2999e69
5,910
py
Python
trainer/task.py
estherGomezCantarero/DLProductionKSchool
4e6c0fe366e533403163c9820bb1f49a5fe8546f
[ "Apache-2.0" ]
null
null
null
trainer/task.py
estherGomezCantarero/DLProductionKSchool
4e6c0fe366e533403163c9820bb1f49a5fe8546f
[ "Apache-2.0" ]
null
null
null
trainer/task.py
estherGomezCantarero/DLProductionKSchool
4e6c0fe366e533403163c9820bb1f49a5fe8546f
[ "Apache-2.0" ]
null
null
null
"""A simple main file to showcase the template.""" '''Modulo por defecto para poner linea de comandos es argparse''' import logging.config import argparse import os import time import sys import tensorflow as tf from tensorflow.keras import datasets from tensorflow.keras import models from tensorflow.keras import laye...
35.178571
124
0.692217
0
0
0
0
0
0
0
0
1,747
0.295351
8936f5392f9c16187ea3e034a6f07baffa5228d7
6,188
py
Python
orm/sql.py
ChanthMiao/inSpyder
4916e944d675094fc812cfbd9a5d7c283a1fc64a
[ "MIT" ]
3
2019-06-16T13:07:52.000Z
2019-10-16T13:29:52.000Z
orm/sql.py
ChanthMiao/inSpyder
4916e944d675094fc812cfbd9a5d7c283a1fc64a
[ "MIT" ]
null
null
null
orm/sql.py
ChanthMiao/inSpyder
4916e944d675094fc812cfbd9a5d7c283a1fc64a
[ "MIT" ]
1
2020-03-15T18:48:17.000Z
2020-03-15T18:48:17.000Z
# encoding="utf-8" from sqlalchemy import Integer, String from sqlalchemy import Column, create_engine, ForeignKey from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker, relationship Base = declarative_base() class User(Base): __tablename__ = "users" id = Column(Stri...
34.377778
79
0.506949
5,927
0.957822
0
0
0
0
0
0
339
0.054783
8938bff55d9a25b0a08b3653bc1b868f9bcab4d6
716
py
Python
30_days_of_Code/15_linked_list.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
30_days_of_Code/15_linked_list.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
30_days_of_Code/15_linked_list.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 class Node: def __init__(self, data): self.data = data self.next = None class Solution: def display(self, head): current = head while current: print(current.data, end=' ') current = current.next def insert(self, head, data): ...
20.457143
40
0.519553
545
0.761173
0
0
0
0
0
0
25
0.034916
893b3513d5d0f6590aeea57f9fde89eef1fb1744
19,636
py
Python
Author_Template/TexScanner.py
ygrange/ADASSProceedings
61502d4ba827845c65e98588d84c69d3596ae958
[ "MIT" ]
1
2019-09-18T08:10:25.000Z
2019-09-18T08:10:25.000Z
Author_Template/TexScanner.py
ygrange/ADASSProceedings
61502d4ba827845c65e98588d84c69d3596ae958
[ "MIT" ]
10
2019-09-29T13:55:38.000Z
2021-12-27T16:23:49.000Z
Author_Template/TexScanner.py
ygrange/ADASSProceedings
61502d4ba827845c65e98588d84c69d3596ae958
[ "MIT" ]
3
2020-10-05T19:10:22.000Z
2021-12-25T09:51:07.000Z
#!/usr/bin/env python # T e x S c a n n e r . p y # # Defines a TexScanner class that can be used to extract LaTeX directives # from a .tex file. Call SetFile() to supply a reference to an already # open .tex file, then use successive calls to GetNextTexCommand() to get # all the tex directive...
45.24424
80
0.557242
14,893
0.758454
0
0
0
0
0
0
11,104
0.565492
893cd792efe2e1b8b3a79e8bc57f11210491e2f5
446
py
Python
perceus.py
Naman-Biswajit/Discord-Bot-Perceus
338826e085653e3cd4f972bfb156a7ca129c1f49
[ "MIT" ]
null
null
null
perceus.py
Naman-Biswajit/Discord-Bot-Perceus
338826e085653e3cd4f972bfb156a7ca129c1f49
[ "MIT" ]
null
null
null
perceus.py
Naman-Biswajit/Discord-Bot-Perceus
338826e085653e3cd4f972bfb156a7ca129c1f49
[ "MIT" ]
null
null
null
import os from discord.ext import commands perceus = commands.Bot(command_prefix = '$', description = 'A demo Discord Chat Bot built using Discord.py') perceus.remove_command('help') token = '' for cog in os.listdir('./cogs'): if cog.endswith('.py') and not cog.startswith('_'): perceus.load_extension(f'co...
27.875
108
0.650224
0
0
0
0
0
0
0
0
141
0.316143
893db583f78ea487b4e94e5b59e694fb51ec16c7
1,231
py
Python
src/simulations/sim_relay.py
m-rubik/Grow-Space
f87673cf13498e4dc8266cf29a7b61c857e54894
[ "BSD-2-Clause", "BSD-3-Clause" ]
2
2020-01-06T19:26:03.000Z
2021-06-03T18:31:25.000Z
src/simulations/sim_relay.py
m-rubik/Grow-Space
f87673cf13498e4dc8266cf29a7b61c857e54894
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
src/simulations/sim_relay.py
m-rubik/Grow-Space
f87673cf13498e4dc8266cf29a7b61c857e54894
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
"""! This code is for the simulation of relays. """ import atexit class Relay(): """! This is the class for all relay devices @param pin: The RPi pin that acts as the signal pin to the relay @param name: The name of the relay. @param is_off: The current state of the relay """ pin: int ...
23.673077
72
0.575142
1,161
0.943136
0
0
0
0
0
0
545
0.442729
893e33d2fc8008166eb18fef3e6dac851364c38c
1,386
py
Python
tests/test_primer/SPARQLEndpoints.py
cmungall/PyShEx
43026c4b0393362e770b868794c5d9071e691d6f
[ "CC0-1.0" ]
25
2018-01-11T10:59:16.000Z
2021-07-02T03:44:02.000Z
tests/test_primer/SPARQLEndpoints.py
cmungall/PyShEx
43026c4b0393362e770b868794c5d9071e691d6f
[ "CC0-1.0" ]
66
2018-03-12T01:12:02.000Z
2022-03-18T07:56:31.000Z
tests/test_primer/SPARQLEndpoints.py
cmungall/PyShEx
43026c4b0393362e770b868794c5d9071e691d6f
[ "CC0-1.0" ]
12
2018-04-06T11:29:40.000Z
2021-12-17T22:48:07.000Z
from pyshex.shex_evaluator import ShExEvaluator from pyshex.user_agent import SlurpyGraphWithAgent from pyshex.utils.sparql_query import SPARQLQuery # SPARQL Endpoint endpoint = 'http://wifo5-04.informatik.uni-mannheim.de/drugbank/sparql' # SPARQL Query sparql = """ PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-synta...
30.8
104
0.63925
0
0
0
0
0
0
0
0
846
0.61039
893ef1393e385b20f7f7b4980d592e7f0b87d1b2
59
py
Python
mlflow/version.py
rstudio/mlflow-original
4eb703bc9af5f5bb6c63b8772ccde590624cf73d
[ "Apache-2.0" ]
2
2019-08-31T10:18:47.000Z
2022-02-13T13:34:14.000Z
mlflow/version.py
rstudio/mlflow-original
4eb703bc9af5f5bb6c63b8772ccde590624cf73d
[ "Apache-2.0" ]
5
2018-08-29T00:46:14.000Z
2018-08-31T07:17:58.000Z
mlflow/version.py
rstudio/mlflow-original
4eb703bc9af5f5bb6c63b8772ccde590624cf73d
[ "Apache-2.0" ]
2
2019-11-06T23:26:40.000Z
2020-12-18T08:59:20.000Z
# Copyright 2018 Databricks, Inc. VERSION = '0.5.2.dev0'
11.8
33
0.677966
0
0
0
0
0
0
0
0
45
0.762712
89423055c6b1874719a9ee46af208da9b3e24736
16,641
py
Python
report.py
reniericorreia/MTVCodeSmellCheck
4f1deb7f117effcdffbf7cff49047d153319769d
[ "MIT" ]
null
null
null
report.py
reniericorreia/MTVCodeSmellCheck
4f1deb7f117effcdffbf7cff49047d153319769d
[ "MIT" ]
null
null
null
report.py
reniericorreia/MTVCodeSmellCheck
4f1deb7f117effcdffbf7cff49047d153319769d
[ "MIT" ]
3
2018-05-14T20:25:31.000Z
2020-07-23T01:27:36.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import csv import pandas as pd def export_csv(head=[], datalist=[], filename='export_csv.csv', delimitator=';'): c = csv.writer(open(filename, "wb")) c.writerow(head) for data in datalist: c.writerow(data.__str__().split(delimitator)...
69.627615
104
0.728802
0
0
0
0
0
0
0
0
6,068
0.361643
8943e67f4389bee0dec96ce61196abd28cab6ae4
795
py
Python
setup.py
possibilities/CQ-editor
dc950180b365ae39840f6787c8f5a061492734ed
[ "Apache-2.0" ]
351
2018-06-08T14:36:35.000Z
2022-03-29T22:03:04.000Z
setup.py
possibilities/CQ-editor
dc950180b365ae39840f6787c8f5a061492734ed
[ "Apache-2.0" ]
315
2018-06-08T14:35:08.000Z
2022-03-31T15:45:27.000Z
setup.py
possibilities/CQ-editor
dc950180b365ae39840f6787c8f5a061492734ed
[ "Apache-2.0" ]
71
2018-06-19T02:00:24.000Z
2022-03-25T08:55:02.000Z
import codecs import os.path from setuptools import setup, find_packages def read(rel_path): here = os.path.abspath(os.path.dirname(__file__)) with codecs.open(os.path.join(here, rel_path), 'r') as fp: return fp.read() def get_version(rel_path): for line in read(rel_path).splitlines(): if...
28.392857
62
0.613836
0
0
0
0
0
0
0
0
178
0.223899
894465f77a8695d4a865a00f4d256f8d49f18108
2,231
py
Python
entitas/entity_index.py
Aenyhm/entitas-python
016e88b65cb231a6130bf4e9b1192a31c36b89df
[ "MIT" ]
43
2017-02-13T08:06:35.000Z
2022-03-22T03:54:21.000Z
src/entitas/entity_index.py
UpUpLiu/python_entitas
91878683f00811fa3afd0e5ab707b5054d832fec
[ "MIT" ]
null
null
null
src/entitas/entity_index.py
UpUpLiu/python_entitas
91878683f00811fa3afd0e5ab707b5054d832fec
[ "MIT" ]
6
2017-12-05T14:12:21.000Z
2021-08-12T09:07:41.000Z
from abc import ABCMeta, abstractmethod from .exceptions import EntitasException class AbstractEntityIndex(metaclass=ABCMeta): def __init__(self, comp_type, group, *fields): self.type = comp_type self._group = group self._fields = fields self._index = {} self._activate() ...
27.8875
79
0.649485
2,140
0.959211
0
0
139
0.062304
0
0
87
0.038996
8947a64d2eb4e66159f5e366be84fcf1c2c358d7
1,358
py
Python
appengine/findit/handlers/test/process_flake_analysis_request_test.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
2
2021-04-13T21:22:18.000Z
2021-09-07T02:11:57.000Z
appengine/findit/handlers/test/process_flake_analysis_request_test.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
21
2020-09-06T02:41:05.000Z
2022-03-02T04:40:01.000Z
appengine/findit/handlers/test/process_flake_analysis_request_test.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import mock import pickle import re from google.appengine.ext import testbed import webapp2 import webtest from testing_utils import testing from handlers...
33.95
79
0.734168
996
0.733432
0
0
733
0.539764
0
0
583
0.429308
894a5779f5981fbc1930b87d14c0f1e033ccc8d3
35,418
py
Python
tests/test_interface_ats.py
alliedtelesis/py-networking
6c5d4bdafabfb4feef235a02344432e1f0336e48
[ "Apache-2.0" ]
4
2015-04-24T20:36:56.000Z
2021-05-03T20:21:54.000Z
tests/test_interface_ats.py
alliedtelesis/py-networking
6c5d4bdafabfb4feef235a02344432e1f0336e48
[ "Apache-2.0" ]
1
2019-07-14T07:07:21.000Z
2019-07-14T07:07:21.000Z
tests/test_interface_ats.py
alliedtelesis/py-networking
6c5d4bdafabfb4feef235a02344432e1f0336e48
[ "Apache-2.0" ]
3
2015-04-24T20:37:04.000Z
2017-03-02T15:14:46.000Z
# -*- coding: utf-8 -*- import pytest from pynetworking.Device import Device ats_supported_sw_version = '3.0.0.44' ats_supported_boot_version = '1.0.1.07' ats_basic_supported_model = 'AT-8000S' ats_supported_model = [ats_basic_supported_model + '/' + '24', ats_basic_supported_model + '/' + '48'] ats_model_port_number...
38.372698
138
0.448557
0
0
0
0
0
0
0
0
30,874
0.871704
894be86795043b9676120c0bf240a9230a6cf62e
2,809
py
Python
generated_python_code/ball_collector/ballcollector/scripts/auxiliary_subsystem_camera.py
mfigat/public_rshpn_tool
3555cb8f1eb35ef12441b9aef63dae8f578c2aa7
[ "BSD-3-Clause" ]
null
null
null
generated_python_code/ball_collector/ballcollector/scripts/auxiliary_subsystem_camera.py
mfigat/public_rshpn_tool
3555cb8f1eb35ef12441b9aef63dae8f578c2aa7
[ "BSD-3-Clause" ]
null
null
null
generated_python_code/ball_collector/ballcollector/scripts/auxiliary_subsystem_camera.py
mfigat/public_rshpn_tool
3555cb8f1eb35ef12441b9aef63dae8f578c2aa7
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python ''' Copyright (c) 2019, Robot Control and Pattern Recognition Group, Warsaw University of Technology 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...
39.56338
98
0.721609
0
0
0
0
0
0
0
0
1,948
0.693485
894c3833caea3640946da0558f06c859beb0aaf4
4,146
py
Python
MNIST&Fashion/adv/blackModel.py
LX-doctorAI/LR1
bd4377058c8806b3ff332ca2aaf5473c2b1e6efb
[ "MIT" ]
1
2022-01-03T09:12:47.000Z
2022-01-03T09:12:47.000Z
MNIST&Fashion/adv/blackModel.py
ZhangAIPI/LR_Experiment
46b7d7be9a739139eee4f3038e3a6ee3e5e5687d
[ "MIT" ]
null
null
null
MNIST&Fashion/adv/blackModel.py
ZhangAIPI/LR_Experiment
46b7d7be9a739139eee4f3038e3a6ee3e5e5687d
[ "MIT" ]
null
null
null
import torch from torch.autograd import Variable from torch.autograd import Function import torch.nn as nn import torch.nn.functional as F import numpy as np from abc import ABCMeta, abstractmethod from torchvision import datasets, transforms from torch.utils.data import DataLoader from tqdm import tqdm import os from ...
37.351351
114
0.655813
338
0.081055
0
0
0
0
0
0
482
0.115588
894d9b261427db31b6c579aab4844bc8a92709a8
1,012
py
Python
src/utils/formatters.py
silvexis/serverless-slack
f5d242c241a8656af515a0bd2f2f6681bd53f967
[ "BSD-3-Clause" ]
null
null
null
src/utils/formatters.py
silvexis/serverless-slack
f5d242c241a8656af515a0bd2f2f6681bd53f967
[ "BSD-3-Clause" ]
null
null
null
src/utils/formatters.py
silvexis/serverless-slack
f5d242c241a8656af515a0bd2f2f6681bd53f967
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2016-present, CloudZero, Inc. All rights reserved. # Licensed under the BSD-style license. See LICENSE file in the project root for full license information. from datetime import datetime from decimal import Decimal from enum import Enum import simplejson as json def markdown...
24.682927
106
0.636364
300
0.296443
0
0
0
0
0
0
408
0.403162
894f3fc69273e878e3689fd473a5d926384286e8
325
py
Python
Algorithms/Sorting/Insertion_Sort_Part2.py
gauthamkrishna-g/HackerRank
472d7a56fc1c1c4f8f03fcabc09d08da4000efde
[ "MIT" ]
1
2017-12-02T14:23:44.000Z
2017-12-02T14:23:44.000Z
Algorithms/Sorting/Insertion_Sort_Part2.py
gauthamkrishna-g/HackerRank
472d7a56fc1c1c4f8f03fcabc09d08da4000efde
[ "MIT" ]
null
null
null
Algorithms/Sorting/Insertion_Sort_Part2.py
gauthamkrishna-g/HackerRank
472d7a56fc1c1c4f8f03fcabc09d08da4000efde
[ "MIT" ]
null
null
null
n = int(input()) ar = [int(ar_temp) for ar_temp in input().strip().split(' ')] for i in range(n): temp = ar[i] j = i while j > 0 and ar[j-1] > temp: ar[j] = ar[j-1] j -= 1 ar[j] = temp if i > 0: for k in ar: print (k, end=' ') print () ...
23.214286
62
0.396923
0
0
0
0
0
0
0
0
6
0.018462
89504989087775dd7ba2da5a1d9611e8030284df
447
py
Python
tests/test_teamcity.py
flexmock/flexmock
31091e747e38a2edb3ced6b64ae159b36110e83c
[ "BSD-2-Clause-FreeBSD" ]
15
2021-07-05T13:21:38.000Z
2022-01-06T02:53:26.000Z
tests/test_teamcity.py
flexmock/flexmock
31091e747e38a2edb3ced6b64ae159b36110e83c
[ "BSD-2-Clause-FreeBSD" ]
93
2021-07-05T13:12:31.000Z
2022-03-21T00:55:27.000Z
tests/test_teamcity.py
flexmock/flexmock
31091e747e38a2edb3ced6b64ae159b36110e83c
[ "BSD-2-Clause-FreeBSD" ]
4
2021-07-12T21:05:34.000Z
2021-08-22T07:54:10.000Z
"""Test TeamCity (PyCharm) integration.""" # pylint: disable=missing-docstring,no-self-use import unittest from teamcity.unittestpy import TeamcityTestRunner from tests.features import FlexmockTestCase class TestTeamCityTeardown(FlexmockTestCase, unittest.TestCase): """Test flexmock teardown works with TeamCity...
26.294118
75
0.778523
140
0.313199
0
0
0
0
0
0
170
0.380313
8950596453e002623e4009ce7cd83af42547805a
11,807
py
Python
authors/apps/authentication/serializers.py
andela/ah-legion
223f8c207d3de40f5d9fe7d5bb57b452b04af86f
[ "BSD-3-Clause" ]
3
2019-03-23T16:56:32.000Z
2019-05-22T20:42:52.000Z
authors/apps/authentication/serializers.py
andela/ah-legion
223f8c207d3de40f5d9fe7d5bb57b452b04af86f
[ "BSD-3-Clause" ]
31
2019-02-26T13:19:35.000Z
2021-12-13T19:56:18.000Z
authors/apps/authentication/serializers.py
andela/ah-legion
223f8c207d3de40f5d9fe7d5bb57b452b04af86f
[ "BSD-3-Clause" ]
6
2019-03-22T09:41:34.000Z
2019-10-17T05:07:38.000Z
from django.contrib.auth import authenticate from django.core.validators import RegexValidator, URLValidator from rest_framework import serializers from rest_framework.validators import UniqueValidator from .models import User, PasswordResetToken from authors.apps.profiles.serializers import ProfileSerializer class ...
37.601911
78
0.618362
11,471
0.971542
0
0
0
0
0
0
5,390
0.456509
8951d51b46dce58e644f7ed9188c363c28a226ff
1,079
py
Python
multilstm_tensorpack/tensorpack/callbacks/graph.py
neale/A4C
acbbb3cf14e31a19c12f27306971b4db4feafe09
[ "MIT" ]
1
2017-03-11T23:10:00.000Z
2017-03-11T23:10:00.000Z
multilstm_tensorpack/tensorpack/callbacks/graph.py
neale/A4C
acbbb3cf14e31a19c12f27306971b4db4feafe09
[ "MIT" ]
null
null
null
multilstm_tensorpack/tensorpack/callbacks/graph.py
neale/A4C
acbbb3cf14e31a19c12f27306971b4db4feafe09
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: graph.py # Author: Yuxin Wu <ppwwyyxxc@gmail.com> """ Graph related callbacks""" from .base import Triggerable __all__ = ['RunOp'] class RunOp(Triggerable): """ Run an Op. """ def __init__(self, setup_func, run_before=True, run_epoch=True): """...
25.690476
97
0.604263
888
0.822984
0
0
0
0
0
0
577
0.534754
895398c9cdc502909c0f77aea4669469831c7687
169
py
Python
application/__init__.py
amcodec1/Flask-aws-app
205aed34629c345ea82d6228be2c6bf47d6686ef
[ "MIT" ]
1
2017-08-10T06:45:51.000Z
2017-08-10T06:45:51.000Z
application/__init__.py
amcodec1/Flask-aws-app
205aed34629c345ea82d6228be2c6bf47d6686ef
[ "MIT" ]
null
null
null
application/__init__.py
amcodec1/Flask-aws-app
205aed34629c345ea82d6228be2c6bf47d6686ef
[ "MIT" ]
null
null
null
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy application = Flask(__name__) application.config.from_object('config') db = SQLAlchemy(application)
24.142857
43
0.822485
0
0
0
0
0
0
0
0
8
0.047337
89544fe5be471dfc862fbd416e5ab8a4d1aa2ce5
1,152
py
Python
patchsim_experiment/experiment_extra_patches_1time_patchsim/exp_patchsim.py
poracle100/poracle-experiments
2582e7a0b0380bac810d49a75eb33f7a0626d6d8
[ "Apache-2.0" ]
null
null
null
patchsim_experiment/experiment_extra_patches_1time_patchsim/exp_patchsim.py
poracle100/poracle-experiments
2582e7a0b0380bac810d49a75eb33f7a0626d6d8
[ "Apache-2.0" ]
null
null
null
patchsim_experiment/experiment_extra_patches_1time_patchsim/exp_patchsim.py
poracle100/poracle-experiments
2582e7a0b0380bac810d49a75eb33f7a0626d6d8
[ "Apache-2.0" ]
2
2021-03-29T08:13:34.000Z
2021-04-23T08:51:18.000Z
#!/usr/bin/python from datetime import datetime import os import shutil, sys from os.path import join import json i = 0 configs_dir = '/poracle-experiments/extra_configs/' for subroot, dirs, files in os.walk(configs_dir): # run('{}/cleanup'.format(root_dir)) for config_file in files: read_file = open(j...
30.315789
71
0.577257
0
0
0
0
0
0
0
0
308
0.267361
8955951f8af9485bbbfe9c8b8031c4f7a7835b68
674
py
Python
tests/test_utils.py
biglocalnews/covid-world-scraper
385f792b32d58dbf67a524c36e60d21f76e463ef
[ "0BSD" ]
null
null
null
tests/test_utils.py
biglocalnews/covid-world-scraper
385f792b32d58dbf67a524c36e60d21f76e463ef
[ "0BSD" ]
11
2020-07-14T02:16:32.000Z
2022-01-31T18:06:49.000Z
tests/test_utils.py
biglocalnews/covid-world-scraper
385f792b32d58dbf67a524c36e60d21f76e463ef
[ "0BSD" ]
null
null
null
import datetime from unittest.mock import patch, MagicMock import pytest from covid_world_scraper.utils import relative_year DEC_31 = datetime.datetime(2020, 12, 31, 12, 59, 1) JAN_1 = datetime.datetime(2020, 1, 1, 1, 1, 1) @pytest.mark.parametrize( 'month,day,current_day,expected', [ [12, 31, DEC...
24.962963
58
0.679525
0
0
0
0
443
0.65727
0
0
65
0.096439
8956065fd228d29e022eb365dffc1354b92e5e48
3,227
py
Python
interface/__init__.py
KauaVicto/igbot
f490540e60643f735cc716f1424cbf087ad98c32
[ "MIT" ]
null
null
null
interface/__init__.py
KauaVicto/igbot
f490540e60643f735cc716f1424cbf087ad98c32
[ "MIT" ]
null
null
null
interface/__init__.py
KauaVicto/igbot
f490540e60643f735cc716f1424cbf087ad98c32
[ "MIT" ]
null
null
null
from PySimpleGUI import PySimpleGUI as sg from sys import exit sg.theme('DarkGray14') # sg.theme_previewer() def layout(): layout = [ [sg.Text('Recomeçar:'), sg.Radio('Sim', 'recomecar', key='rSim', default=True, enable_events=True), sg.Radio('Não', 'recomecar', key='rNao', enable_events...
44.205479
130
0.570189
0
0
0
0
0
0
0
0
839
0.259191
8957faed268950fdd3010d67b51f473dca55db15
13,706
py
Python
src/tests/api/test_episodes.py
DmitryBurnaev/podcast-service
53349a3f9aed22a8024d0c83380f9a02464962a3
[ "MIT" ]
5
2021-07-01T16:31:29.000Z
2022-01-29T14:32:13.000Z
src/tests/api/test_episodes.py
DmitryBurnaev/podcast-service
53349a3f9aed22a8024d0c83380f9a02464962a3
[ "MIT" ]
45
2020-10-25T19:41:26.000Z
2022-03-25T06:31:58.000Z
src/tests/api/test_episodes.py
DmitryBurnaev/podcast-service
53349a3f9aed22a8024d0c83380f9a02464962a3
[ "MIT" ]
1
2022-01-27T11:30:07.000Z
2022-01-27T11:30:07.000Z
import pytest from common.statuses import ResponseStatus from modules.providers.exceptions import SourceFetchError from modules.podcast import tasks from modules.podcast.models import Episode, Podcast from modules.podcast.tasks import DownloadEpisodeTask from tests.api.test_base import BaseTestAPIView from tests.helpe...
40.311765
100
0.670217
12,121
0.884357
0
0
3,649
0.266234
0
0
1,249
0.091128
89587e20404a195d566ade5dd64d8a90d60482b4
3,928
py
Python
IDEAS/Resources/src/fluid/heatpumps/calibration/PythonModel/heatexchangers.py
JavierArroyoBastida/IDEAS
d8df09206d90451f8a5910aa5780f363573ecd8c
[ "BSD-3-Clause" ]
87
2015-01-13T10:48:28.000Z
2022-02-07T12:46:06.000Z
IDEAS/Resources/src/fluid/heatpumps/calibration/PythonModel/heatexchangers.py
JavierArroyoBastida/IDEAS
d8df09206d90451f8a5910aa5780f363573ecd8c
[ "BSD-3-Clause" ]
871
2015-01-02T09:14:43.000Z
2022-03-28T20:22:25.000Z
IDEAS/Resources/src/fluid/heatpumps/calibration/PythonModel/heatexchangers.py
JavierArroyoBastida/IDEAS
d8df09206d90451f8a5910aa5780f363573ecd8c
[ "BSD-3-Clause" ]
45
2015-01-12T13:51:45.000Z
2022-03-14T08:01:40.000Z
from __future__ import division, print_function, absolute_import import numpy as np class EvaporatorCondenser(object): """ Object for heat exchanger based on epsilon-NTU method for a heat transfer fluid exchanging heat with refrigerant experiencing constant temperature phase change. :par...
32.46281
80
0.619399
3,840
0.977597
0
0
0
0
0
0
2,607
0.663697
89588acaf0215f496c8f0209b15ce97ce1c50516
4,806
py
Python
ecosante/inscription/blueprint.py
betagouv/ecosante
cc7dd76bb65405ba44f432197de851dc7e22ed38
[ "MIT" ]
3
2021-09-24T14:07:51.000Z
2021-12-14T13:48:34.000Z
ecosante/inscription/blueprint.py
betagouv/recosante-api
4560b2cf2ff4dc19597792fe15a3805f6259201d
[ "MIT" ]
187
2021-03-25T16:43:49.000Z
2022-03-23T14:40:31.000Z
ecosante/inscription/blueprint.py
betagouv/recosante-api
4560b2cf2ff4dc19597792fe15a3805f6259201d
[ "MIT" ]
2
2020-04-08T11:56:17.000Z
2020-04-09T14:04:15.000Z
from flask import ( abort, render_template, request, jsonify, stream_with_context, ) from .models import Inscription, db from .forms import FormPremiereEtape, FormDeuxiemeEtape from ecosante.utils.decorators import ( admin_capability_url, webhook_capability_url ) from ecosante.utils import B...
33.608392
126
0.6804
0
0
0
0
4,232
0.880566
0
0
795
0.165418
8959bfc6f03789f676832a95e881b497a1ad60ab
2,455
py
Python
broker.py
batuengin/becalm-station
1fa377c4553e92d6ffde7e4d999ed7d4940ecd77
[ "Apache-2.0" ]
2
2020-10-18T08:13:17.000Z
2021-03-12T12:19:45.000Z
broker.py
batuengin/becalm-station
1fa377c4553e92d6ffde7e4d999ed7d4940ecd77
[ "Apache-2.0" ]
5
2020-10-26T15:39:02.000Z
2022-02-27T05:47:30.000Z
broker.py
batuengin/becalm-station
1fa377c4553e92d6ffde7e4d999ed7d4940ecd77
[ "Apache-2.0" ]
3
2020-10-31T08:56:50.000Z
2021-01-25T21:28:37.000Z
#!/usr/bin/python3 # This file is part of becalm-station # https://github.com/idatis-org/becalm-station # Copyright: Copyright (C) 2020 Enrique Melero <enrique.melero@gmail.com> # License: Apache License Version 2.0, January 2004 # The full text of the Apache License is available here # http://w...
29.578313
95
0.682281
0
0
0
0
1,119
0.455804
0
0
1,026
0.417923
895a276f3342205d34c7416b14456a42a8a1a72b
9,404
py
Python
tests/test_geometry.py
TovarnovM/easyvec
25a67a37907140c07feace02dd85d68fc59824a6
[ "MIT" ]
1
2021-06-24T18:12:51.000Z
2021-06-24T18:12:51.000Z
tests/test_geometry.py
TovarnovM/easyvec
25a67a37907140c07feace02dd85d68fc59824a6
[ "MIT" ]
null
null
null
tests/test_geometry.py
TovarnovM/easyvec
25a67a37907140c07feace02dd85d68fc59824a6
[ "MIT" ]
null
null
null
from pytest import approx from easyvec import Vec2, intersect, closest, Mat2 import numpy as np from easyvec.geometry import _sortreduce, Rect, PolyLine, is_in_polygon # TODO add test for arcs def test_polyline_is_selfintersect1(): pl = PolyLine([(0,3), (10,3), (10,0), (0,0)], copy_data=True) assert not pl.i...
30.044728
111
0.549341
0
0
0
0
0
0
0
0
337
0.035836
895b5c7a50aa9cfe925ce6b639fb8f5b69feda61
2,468
py
Python
model/multiscale_HSD.py
hit-nclab/HSD
e0fe95b4a17eb3a261804a194802a95ccd729db0
[ "MIT" ]
null
null
null
model/multiscale_HSD.py
hit-nclab/HSD
e0fe95b4a17eb3a261804a194802a95ccd729db0
[ "MIT" ]
null
null
null
model/multiscale_HSD.py
hit-nclab/HSD
e0fe95b4a17eb3a261804a194802a95ccd729db0
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- # Multi-scales HSD implementataion import numpy as np import networkx as nx import pygsp import multiprocessing from collections import defaultdict from tqdm import tqdm from model import HSD from tools import hierarchy class MultiHSD(HSD): def __init__(self, graph: nx.Graph, graphNam...
30.097561
100
0.628849
2,140
0.864996
0
0
0
0
0
0
181
0.073161
895b7c90cb75da66ff20cbbd6d8d03e20ae0fa6d
10,433
py
Python
src/tournaments/__init__.py
happz/settlers
961a6d2121ab6e89106f17017f026c60c77f16f9
[ "MIT" ]
1
2018-11-16T09:41:31.000Z
2018-11-16T09:41:31.000Z
src/tournaments/__init__.py
happz/settlers
961a6d2121ab6e89106f17017f026c60c77f16f9
[ "MIT" ]
15
2015-01-07T14:17:36.000Z
2019-04-29T13:26:43.000Z
src/tournaments/__init__.py
happz/settlers
961a6d2121ab6e89106f17017f026c60c77f16f9
[ "MIT" ]
null
null
null
__author__ = 'Milos Prchlik' __copyright__ = 'Copyright 2010 - 2014, Milos Prchlik' __contact__ = 'happz@happz.cz' __license__ = 'http://www.php-suit.com/dpl' import collections import threading from collections import OrderedDict import hlib.api import hlib.events import hlib.input import hlib.error import games i...
31.33033
159
0.690501
8,070
0.773507
0
0
335
0.03211
0
0
1,526
0.146267
895bd2e21910859bb3cd7f5f07cedff8bc008454
6,474
py
Python
max2/elo.py
thexa4/Spades
1b6c5003d5bec13421418e1e563db435fac18286
[ "MIT" ]
1
2018-01-27T16:45:51.000Z
2018-01-27T16:45:51.000Z
max2/elo.py
thexa4/Spades
1b6c5003d5bec13421418e1e563db435fac18286
[ "MIT" ]
null
null
null
max2/elo.py
thexa4/Spades
1b6c5003d5bec13421418e1e563db435fac18286
[ "MIT" ]
1
2018-01-27T16:45:56.000Z
2018-01-27T16:45:56.000Z
from game_manager import GameManager from braindead_player import BraindeadPlayer from max.random_player import RandomPlayer from max2.training_player import TrainingPlayer import max2.model import sys import trueskill import random import itertools import math import concurrent.futures import threading from os.path im...
36.167598
124
0.56194
6,133
0.947328
0
0
0
0
0
0
741
0.114458
895d5c7ec5c22176fbc7bef3c30c34da72d63571
2,275
py
Python
examples/density.py
dwbullok/python-colormath
4b218effd53a52da891bbbb60661426ef194d085
[ "BSD-3-Clause" ]
1
2019-06-10T20:06:31.000Z
2019-06-10T20:06:31.000Z
examples/density.py
dwbullok/python-colormath
4b218effd53a52da891bbbb60661426ef194d085
[ "BSD-3-Clause" ]
null
null
null
examples/density.py
dwbullok/python-colormath
4b218effd53a52da891bbbb60661426ef194d085
[ "BSD-3-Clause" ]
null
null
null
""" This module shows you how to perform various kinds of density calculations. """ # Does some sys.path manipulation so we can run examples in-place. # noinspection PyUnresolvedReferences import example_config from colormath.color_objects import SpectralColor from colormath.density_standards import ANSI_STA...
40.625
79
0.712967
0
0
0
0
0
0
0
0
776
0.341099
895ea8c663f4b071e8a2f10939d1693b255ef7ea
1,858
py
Python
connector/python/setup.py
nikolaypavlov/spark-riak-connector
84859aa4d82dd7234fb5c3c21789108d3a6c1094
[ "Apache-2.0" ]
63
2015-09-12T04:10:58.000Z
2022-03-20T16:35:27.000Z
connector/python/setup.py
nikolaypavlov/spark-riak-connector
84859aa4d82dd7234fb5c3c21789108d3a6c1094
[ "Apache-2.0" ]
83
2015-09-11T13:30:50.000Z
2018-11-24T11:13:06.000Z
connector/python/setup.py
nikolaypavlov/spark-riak-connector
84859aa4d82dd7234fb5c3c21789108d3a6c1094
[ "Apache-2.0" ]
34
2015-09-10T15:52:54.000Z
2018-07-03T10:33:43.000Z
""" Copyright 2016 Basho Technologies, Inc. This file is provided to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
32.034483
73
0.728741
0
0
0
0
0
0
0
0
1,246
0.670614
895f39f7683bf346e299eae827e0f17349fa596b
1,310
py
Python
data/download_source.py
mappingvermont/vt-road-names
62665702efb345894b6d6567d4b2790baa8df5f5
[ "MIT" ]
null
null
null
data/download_source.py
mappingvermont/vt-road-names
62665702efb345894b6d6567d4b2790baa8df5f5
[ "MIT" ]
null
null
null
data/download_source.py
mappingvermont/vt-road-names
62665702efb345894b6d6567d4b2790baa8df5f5
[ "MIT" ]
null
null
null
import os import requests import zipfile data_dir = os.path.dirname(__file__) source_dir = os.path.join(data_dir, 'source') if not os.path.exists(source_dir): os.mkdir(source_dir) rds_url = r'http://maps.vcgi.vermont.gov/gisdata/vcgi/packaged_zips/EmergencyE911_RDS.zip' town_boundary_url = r'http://maps.vcgi.vermo...
26.734694
103
0.714504
0
0
0
0
0
0
0
0
353
0.269466
8960f936e80553661cf0be04471dadc4290fc3b4
976
py
Python
src/zeo_connector_defaults/__init__.py
Bystroushaak/zeo_connector_defaults
b54ecb99ddb4665db00fba183ef1d7252b0ca62b
[ "MIT" ]
null
null
null
src/zeo_connector_defaults/__init__.py
Bystroushaak/zeo_connector_defaults
b54ecb99ddb4665db00fba183ef1d7252b0ca62b
[ "MIT" ]
null
null
null
src/zeo_connector_defaults/__init__.py
Bystroushaak/zeo_connector_defaults
b54ecb99ddb4665db00fba183ef1d7252b0ca62b
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: python 2.7 # # Imports ===================================================================== import os.path from environment_generator import tmp_context from environment_generator import tmp_context_name from environment_generator import generat...
34.857143
79
0.615779
0
0
0
0
0
0
0
0
443
0.453893
8961ecebf2ca4b4e071b2aa1e8778032bdcb8a52
576
py
Python
AST/block.py
CorentinGoet/miniC-Compiler
8631b1ce47e9de1c3a3255d7c0a941242ad48292
[ "MIT" ]
null
null
null
AST/block.py
CorentinGoet/miniC-Compiler
8631b1ce47e9de1c3a3255d7c0a941242ad48292
[ "MIT" ]
null
null
null
AST/block.py
CorentinGoet/miniC-Compiler
8631b1ce47e9de1c3a3255d7c0a941242ad48292
[ "MIT" ]
null
null
null
""" @author Corentin Goetghebeur (github.com/CorentinGoet) """ from AST.node import Node class Block(Node): """ Class representation for the Block node. The Block node has the following syntax: Block = {Statements} """ def __init__(self, statements: list = None): """ Constr...
18.580645
54
0.631944
482
0.836806
0
0
0
0
0
0
298
0.517361
8962ba1e70c133d90ad2110d321cabbb28852c18
9,195
py
Python
pysnmp/CISCO-VOICE-IF-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/CISCO-VOICE-IF-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/CISCO-VOICE-IF-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCO-VOICE-IF-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-VOICE-IF-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:03:11 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, ...
133.26087
1,082
0.755628
0
0
0
0
0
0
0
0
2,491
0.270908
89630d0bd0aad54ccd57d39bdeed4934b8f4b4ea
4,812
py
Python
scripts/pre_processing/pre_processing_LOCAL.py
self-improving-agent/SomaticVariantCallingWithDeepLearning
50912dd3c2e88cd05daf5870ab6437d43a16cca8
[ "MIT" ]
null
null
null
scripts/pre_processing/pre_processing_LOCAL.py
self-improving-agent/SomaticVariantCallingWithDeepLearning
50912dd3c2e88cd05daf5870ab6437d43a16cca8
[ "MIT" ]
null
null
null
scripts/pre_processing/pre_processing_LOCAL.py
self-improving-agent/SomaticVariantCallingWithDeepLearning
50912dd3c2e88cd05daf5870ab6437d43a16cca8
[ "MIT" ]
null
null
null
import pysam import vcf from vcf.parser import _Info as VcfInfo, field_counts as vcf_field_counts import math CHR = 22 chr_to_num = lambda x: ''.join([c for c in x if c.isdigit()]) purity = 0.6 # Open files normalSample = pysam.AlignmentFile("../../data/external/HG002.hs37d5.300x.bam", "rb", ignore_truncation=True) t...
30.846154
167
0.687656
0
0
0
0
0
0
0
0
1,633
0.33936
896353bb52dc91b51515cede2f8f6435b1c743a3
1,229
py
Python
getitfixed/lingua_extractor.py
camptocamp/getitfixed
f339ee7ac603ebf6c5938d90b79d709e1c9e3f09
[ "BSD-2-Clause-FreeBSD" ]
4
2021-02-11T15:09:15.000Z
2021-02-23T07:56:49.000Z
getitfixed/lingua_extractor.py
camptocamp/getitfixed
f339ee7ac603ebf6c5938d90b79d709e1c9e3f09
[ "BSD-2-Clause-FreeBSD" ]
4
2021-02-08T12:52:16.000Z
2021-11-25T16:25:05.000Z
getitfixed/lingua_extractor.py
camptocamp/getitfixed
f339ee7ac603ebf6c5938d90b79d709e1c9e3f09
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
from lingua.extractors import Extractor, Message from c2c.template.config import config as configuration class GetItFixedExtractor(Extractor): # pragma: no cover """ GetItFixed extractor (settings: emails subjects and bodys) """ extensions = [".yaml"] def __call__(self, filename, options): ...
39.645161
87
0.617575
1,121
0.912124
951
0.7738
0
0
0
0
551
0.448332
89636af3bcc2dac82bb553831e85121b506753d9
1,577
py
Python
magnify/script_utils.py
jiwoncpark/magnify
04421d43b9f5340989e8614d961ac9f5988bde0c
[ "MIT" ]
null
null
null
magnify/script_utils.py
jiwoncpark/magnify
04421d43b9f5340989e8614d961ac9f5988bde0c
[ "MIT" ]
null
null
null
magnify/script_utils.py
jiwoncpark/magnify
04421d43b9f5340989e8614d961ac9f5988bde0c
[ "MIT" ]
2
2021-09-14T19:14:12.000Z
2021-11-07T10:29:01.000Z
import os import torch def save_state(model, optim, lr_scheduler, kl_scheduler, epoch, train_dir, param_w_scheduler, epoch_i): """Save the state dict of the current training to disk Parameters ---------- train_loss : float current training loss val_loss : float curre...
32.854167
64
0.63792
0
0
0
0
0
0
0
0
407
0.258085
89639c5827d0f48f2821d66cd1c6a72c013d43ba
489
py
Python
test/test_account.py
dheller1/personal-finance
914de3e538515249b510383fd93538693a96d98f
[ "MIT" ]
null
null
null
test/test_account.py
dheller1/personal-finance
914de3e538515249b510383fd93538693a96d98f
[ "MIT" ]
null
null
null
test/test_account.py
dheller1/personal-finance
914de3e538515249b510383fd93538693a96d98f
[ "MIT" ]
null
null
null
from pfin.account import Account from moneyed import Money, EUR, USD import pytest def test_emptyaccount(): a = Account('Giro', 'EUR') assert a.name == 'Giro' assert a.currency == EUR assert a.balance == Money(0, EUR) def test_nonemptyaccount(): u = Account('my Depot', USD, 15.22) assert u.c...
22.227273
53
0.652352
0
0
0
0
0
0
0
0
45
0.092025
8963b9e21a078addbf999be72b2d1e008edfb9e8
2,306
py
Python
preprocess/feature.py
NTHU-CVLab/ActivityProps
68392fb38d87afdc92f6f054e83e9166121401a5
[ "Apache-2.0" ]
1
2017-10-31T15:36:55.000Z
2017-10-31T15:36:55.000Z
preprocess/feature.py
NTHU-CVLab/ActivityProps
68392fb38d87afdc92f6f054e83e9166121401a5
[ "Apache-2.0" ]
null
null
null
preprocess/feature.py
NTHU-CVLab/ActivityProps
68392fb38d87afdc92f6f054e83e9166121401a5
[ "Apache-2.0" ]
null
null
null
import os import re import h5py import numpy as np class FeatureFile: def __init__(self, feature_file, write=False): self.feature_file = feature_file self.h5 = self.open(feature_file, write) self.features_keys = None self.labels_keys = None self.perm = None def open(...
34.939394
87
0.617953
2,035
0.88248
0
0
0
0
0
0
99
0.042931
8963da14cc6badd83963c9d6f04c2a8c84d7a51c
8,162
py
Python
sdks/python/apache_beam/io/fileio_test.py
goldfishy/beam
a956ff77a8448e5f2c12f6695fec608348b5ab60
[ "Apache-2.0", "BSD-3-Clause" ]
2
2019-04-25T22:16:34.000Z
2019-07-11T10:14:15.000Z
sdks/python/apache_beam/io/fileio_test.py
goldfishy/beam
a956ff77a8448e5f2c12f6695fec608348b5ab60
[ "Apache-2.0", "BSD-3-Clause" ]
6
2020-11-13T18:59:17.000Z
2021-08-25T16:11:11.000Z
sdks/python/apache_beam/io/fileio_test.py
goldfishy/beam
a956ff77a8448e5f2c12f6695fec608348b5ab60
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
34.584746
80
0.661725
6,727
0.824185
0
0
965
0.118231
0
0
2,130
0.260965
896461c46e6db21b14443c315d819b33f6df70bd
856
py
Python
pyuaparser/test.py
havocesp/pyuaparser
486d6f19b05f0c8ae0e160b3185f06798b49fce6
[ "Unlicense" ]
2
2019-11-20T02:16:14.000Z
2021-12-17T01:12:41.000Z
pyuaparser/test.py
havocesp/pyuaparser
486d6f19b05f0c8ae0e160b3185f06798b49fce6
[ "Unlicense" ]
null
null
null
pyuaparser/test.py
havocesp/pyuaparser
486d6f19b05f0c8ae0e160b3185f06798b49fce6
[ "Unlicense" ]
null
null
null
# -*- coding:utf-8 -*- from core import UserAgent testing_data = { 'user_agent': { 'family': 'Chrome', 'major': '60', 'minor': '0', 'patch': '3112' }, 'os': { 'family': 'Windows', 'major': '10', 'minor': None, 'patch': None, 'patch_min...
25.939394
131
0.55257
0
0
0
0
0
0
0
0
527
0.615654
8964797fa4b8e72c8fbd72fbf7a0a140ab73619e
347
py
Python
LeetCode/0219. Contains Duplicate II/solution.py
InnoFang/oh-my-algorithms
f559dba371ce725a926725ad28d5e1c2facd0ab2
[ "Apache-2.0" ]
19
2018-08-26T03:10:58.000Z
2022-03-07T18:12:52.000Z
LeetCode/0219. Contains Duplicate II/solution.py
InnoFang/Algorithm-Library
1896b9d8b1fa4cd73879aaecf97bc32d13ae0169
[ "Apache-2.0" ]
null
null
null
LeetCode/0219. Contains Duplicate II/solution.py
InnoFang/Algorithm-Library
1896b9d8b1fa4cd73879aaecf97bc32d13ae0169
[ "Apache-2.0" ]
6
2020-03-16T23:00:06.000Z
2022-01-13T07:02:08.000Z
""" 23 / 23 test cases passed. Runtime: 48 ms Memory Usage: 22.3 MB """ class Solution: def containsNearbyDuplicate(self, nums: List[int], k: int) -> bool: store = {} for i, num in enumerate(nums): if num in store and i - store[num] <= k: return True store[num...
24.785714
71
0.54755
274
0.789625
0
0
0
0
0
0
71
0.204611
8964f69c1d51b707bae8188916bfb506969245ff
5,714
py
Python
src/datalab/notebook/notebook-command/command/api/datahub.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
84
2021-06-30T06:20:23.000Z
2022-03-22T03:05:49.000Z
src/datalab/notebook/notebook-command/command/api/datahub.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
7
2021-06-30T06:21:16.000Z
2022-03-29T07:36:13.000Z
src/datalab/notebook/notebook-command/command/api/datahub.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
40
2021-06-30T06:21:26.000Z
2022-03-29T12:42:26.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ------------------------------------------...
31.744444
118
0.687434
0
0
0
0
0
0
0
0
3,174
0.502374
8965fcb7879e775552cad013b775944c4222f025
3,323
py
Python
openpnm/models/__init__.py
halotudio/openPNM-copy2
d400ec65e9421256a531f6d22a38255b002d5dcb
[ "MIT" ]
1
2021-05-01T11:10:43.000Z
2021-05-01T11:10:43.000Z
openpnm/models/__init__.py
Jimmy-INL/OpenPNM
1546fa1ac2204443bde916f2037fac383c5069ae
[ "MIT" ]
null
null
null
openpnm/models/__init__.py
Jimmy-INL/OpenPNM
1546fa1ac2204443bde916f2037fac383c5069ae
[ "MIT" ]
null
null
null
r""" **openpnm.models** ---- This module contains a selection of pore-scale models for calculating geometrical, thermophysical, and multiphysics transport properties. ---- **Using Prewritten Models from the Library** OpenPNM includes a solid library of pre-written models for most basic and standard scenarios. Th...
40.036145
85
0.539874
0
0
0
0
0
0
0
0
4,205
0.974508
8968f1c206c8bb5c3456179cb46db720666878ac
2,247
py
Python
examples/train_filters.py
shakenes/unsupervised-drl
bb44aa87411e5dde3aa0d049fd721d6fb9da0b7e
[ "MIT" ]
1
2021-04-23T08:36:31.000Z
2021-04-23T08:36:31.000Z
examples/train_filters.py
shakenes/unsupervised-drl
bb44aa87411e5dde3aa0d049fd721d6fb9da0b7e
[ "MIT" ]
null
null
null
examples/train_filters.py
shakenes/unsupervised-drl
bb44aa87411e5dde3aa0d049fd721d6fb9da0b7e
[ "MIT" ]
null
null
null
from __future__ import print_function import tensorflow as tf config = tf.ConfigProto() config.gpu_options.allow_growth = True session = tf.Session(config=config) import keras from keras.preprocessing.image import ImageDataGenerator from keras.models import Model from keras.layers import Dense, Flatten, Conv2D, Permu...
27.740741
99
0.721851
0
0
0
0
0
0
0
0
343
0.152648
8969033413c810fd4ac389308247704b3968aeba
2,346
py
Python
core/infer.py
lvboodvl/smart_sync
be295c0db4cd0b7f3e9ff6f33889c24fa0d1eecd
[ "MIT" ]
3
2020-07-17T13:08:23.000Z
2021-12-23T08:41:30.000Z
core/infer.py
lvboodvl/smart_sync
be295c0db4cd0b7f3e9ff6f33889c24fa0d1eecd
[ "MIT" ]
null
null
null
core/infer.py
lvboodvl/smart_sync
be295c0db4cd0b7f3e9ff6f33889c24fa0d1eecd
[ "MIT" ]
null
null
null
#coding=utf-8 ''' infer module ''' import sys caffe_path = '../caffe/python/' #caffe_path = '/root/caffe/python/' sys.path.insert(0, caffe_path) import caffe caffe.set_device(0) caffe.set_mode_gpu() from caffe.proto import caffe_pb2 from google.protobuf import text_format import numpy as np #import cv2 ''' prepare c...
35.014925
84
0.746377
0
0
0
0
0
0
0
0
1,014
0.432225
896a54ac83d7220e88e21b226080aa932a25b015
44,852
py
Python
pycam/pycam/Plugins/OpenGLWindow.py
pschou/py-sdf
0a269ed155d026e29429d76666fb63c95d2b4b2c
[ "MIT" ]
null
null
null
pycam/pycam/Plugins/OpenGLWindow.py
pschou/py-sdf
0a269ed155d026e29429d76666fb63c95d2b4b2c
[ "MIT" ]
null
null
null
pycam/pycam/Plugins/OpenGLWindow.py
pschou/py-sdf
0a269ed155d026e29429d76666fb63c95d2b4b2c
[ "MIT" ]
null
null
null
""" Copyright 2011 Lars Kruse <devel@sumpfralle.de> This file is part of PyCAM. PyCAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PyCA...
47.262381
99
0.580175
42,793
0.954093
0
0
0
0
0
0
11,427
0.254771
896a9f43a1ddcc85cd7e1204d61e68064fd6890e
20,864
py
Python
scripts/external_libs/scapy-2.4.5/scapy/contrib/scada/iec104/__init__.py
dariusgrassi/trex-core
3b19ddcf67e33934f268b09d3364cd87275d48db
[ "Apache-2.0" ]
250
2016-12-29T02:43:04.000Z
2022-03-31T05:51:23.000Z
scripts/external_libs/scapy-2.4.5/scapy/contrib/scada/iec104/__init__.py
dariusgrassi/trex-core
3b19ddcf67e33934f268b09d3364cd87275d48db
[ "Apache-2.0" ]
2
2017-08-08T06:22:10.000Z
2021-05-22T01:59:43.000Z
scripts/external_libs/scapy-2.4.5/scapy/contrib/scada/iec104/__init__.py
dariusgrassi/trex-core
3b19ddcf67e33934f268b09d3364cd87275d48db
[ "Apache-2.0" ]
86
2016-12-29T06:39:34.000Z
2021-12-12T20:07:39.000Z
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Thomas Tannhaeuser <hecke@naberius.de> # This program is published under a GPLv2 license # # scapy.contrib.description = IEC-60870-5-104 APCI / APDU layer definitions # scapy.contrib.status = loads """ IEC ...
32.651017
86
0.66852
8,934
0.428202
0
0
677
0.032448
0
0
7,290
0.349406
896ab830d31d4ae0126e9da6fffd5ca1f79bc426
241
py
Python
users/admin.py
ananthan-123/react-django
5305649f1d39e1f5b62eb17a4f40f67fe7cfd14b
[ "MIT" ]
null
null
null
users/admin.py
ananthan-123/react-django
5305649f1d39e1f5b62eb17a4f40f67fe7cfd14b
[ "MIT" ]
null
null
null
users/admin.py
ananthan-123/react-django
5305649f1d39e1f5b62eb17a4f40f67fe7cfd14b
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Patient, Doctor, UserInfo,Admin_Users # Register your models here. admin.site.register(UserInfo) admin.site.register(Patient) admin.site.register(Doctor) admin.site.register(Admin_Users)
26.777778
57
0.821577
0
0
0
0
0
0
0
0
28
0.116183
896ac1984700bc7074227418120b14e08af8c05f
474
py
Python
old/pepper2/src/main/python/pepper2like/test.py
andybalaam/pepper
f0d12379c7c6e2d82003c0c1d6130bfac685e1c3
[ "MIT" ]
2
2018-12-19T16:32:46.000Z
2019-01-10T09:00:33.000Z
old/pepper2/src/main/python/pepper2like/test.py
andybalaam/pepper
f0d12379c7c6e2d82003c0c1d6130bfac685e1c3
[ "MIT" ]
null
null
null
old/pepper2/src/main/python/pepper2like/test.py
andybalaam/pepper
f0d12379c7c6e2d82003c0c1d6130bfac685e1c3
[ "MIT" ]
null
null
null
from pepper2like.type_check import type_check from pepper2like.log import Log from pepper2like.string import String from pepper2like.callable import Callable def pl_test(log, name, fn): type_check(Log, log) type_check(String, name) type_check(Callable, fn) log.part_line.info(name + " ... ") fn() ...
23.7
47
0.64135
0
0
0
0
0
0
0
0
29
0.061181
896c2ace62a35c240bb8d02122b9fd8d32e9885a
830
py
Python
xcparse/Xcode/XCSchemeActions/__init__.py
samdmarshall/xcparser
4f78af149127325e60e3785b6e09d6dbfeedc799
[ "BSD-3-Clause" ]
59
2015-02-27T21:45:37.000Z
2021-03-16T04:37:40.000Z
xcparse/Xcode/XCSchemeActions/__init__.py
samdmarshall/xcparser
4f78af149127325e60e3785b6e09d6dbfeedc799
[ "BSD-3-Clause" ]
14
2015-03-02T18:53:51.000Z
2016-07-19T23:20:23.000Z
xcparse/Xcode/XCSchemeActions/__init__.py
samdmarshall/xcparser
4f78af149127325e60e3785b6e09d6dbfeedc799
[ "BSD-3-Clause" ]
8
2015-03-02T02:32:09.000Z
2017-07-31T21:14:51.000Z
# from .Base_Action import * # # from .BuildAction import * # from .TestAction import * # from .LaunchAction import * # from .ProfileAction import * # from .AnalyzeAction import * # from .ArchiveAction import * # # from .BuildActionEntry import * # from .BuildableReference import * # from .BuildableProductRunnable impo...
29.642857
63
0.807229
0
0
0
0
0
0
0
0
768
0.925301
896c42df3aee1153cc88340c843b78ef48002567
367
py
Python
DMGroup/ChangeDMGroupName.py
tungdo0602/Some-Discord-Collection
b14b9bf20261873c5ebf875607f305f5767bd874
[ "MIT" ]
4
2021-12-13T17:32:30.000Z
2022-03-27T21:29:35.000Z
DMGroup/ChangeDMGroupName.py
tungdo0602/Some-Discord-Collection
b14b9bf20261873c5ebf875607f305f5767bd874
[ "MIT" ]
1
2021-11-28T07:03:00.000Z
2021-11-28T07:03:00.000Z
DMGroup/ChangeDMGroupName.py
tungdo0602/Some-Discord-Collection
b14b9bf20261873c5ebf875607f305f5767bd874
[ "MIT" ]
1
2021-11-16T15:45:40.000Z
2021-11-16T15:45:40.000Z
import requests, os token = "" DMGroup_id = "" DMGroup_name = "" group = requests.patch(f'https://discord.com/api/v9/channels/{DMGroup_id}', headers={"authorization": token}, json={"name": DMGroup_name}) if group.status_code == 200: print("Successfully changed the group name!") else: print(f"Failed to cha...
33.363636
139
0.705722
0
0
0
0
0
0
0
0
177
0.482289