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
4eeba8c507dbd8f435dcd16c1fc5b07ff0fd0417
818
py
Python
src/uglier/colored_logger.py
MonliH/uglier
0922ddfab52677f959290400de578953b59e4597
[ "MIT" ]
1
2022-02-14T02:54:50.000Z
2022-02-14T02:54:50.000Z
src/uglier/colored_logger.py
MonliH/uglier
0922ddfab52677f959290400de578953b59e4597
[ "MIT" ]
null
null
null
src/uglier/colored_logger.py
MonliH/uglier
0922ddfab52677f959290400de578953b59e4597
[ "MIT" ]
null
null
null
# Credits to https://stackoverflow.com/a/56944256/9470078 # I wanted a colored logger without dependencies, so here it is! import logging class ColoredFormatter(logging.Formatter): grey = "\x1b[38;20m" yellow = "\x1b[33;20m" red = "\x1b[31;20m" blue = "\x1b[34;20m" bold_red = "\x1b[31;1m" rese...
30.296296
64
0.625917
677
0.827628
0
0
0
0
0
0
233
0.284841
4eec746d820c53cfe1acfbbe561209eb0112a801
207
py
Python
tests/SHA256/run.py
weikengchen/Virgo
73b924f33e18c017bafa3ed37da84a7b0d80ec5d
[ "Apache-2.0" ]
9
2020-06-02T04:54:08.000Z
2021-12-07T12:54:09.000Z
tests/SHA256/run.py
weikengchen/Virgo
73b924f33e18c017bafa3ed37da84a7b0d80ec5d
[ "Apache-2.0" ]
2
2021-01-07T18:34:10.000Z
2021-03-22T20:29:43.000Z
tests/SHA256/run.py
weikengchen/Virgo
73b924f33e18c017bafa3ed37da84a7b0d80ec5d
[ "Apache-2.0" ]
5
2020-06-08T09:11:37.000Z
2021-07-29T12:15:47.000Z
import os os.system('mkdir -p LOG') for i in range(8): os.system('./zk_proof SHA256_64_merkle_' + str(i + 1) + '_circuit.txt SHA256_64_merkle_' + str(i + 1) + '_meta.txt LOG/SHA256_' + str(i + 1) + '.txt')
41.4
151
0.647343
0
0
0
0
0
0
0
0
105
0.507246
4eee40c453e96ec4d8088f99f82cf3eed41c437d
1,539
py
Python
projects/07/src/Parser.py
danibachar/Nand2Tetris
fdce0e87a4869213f3eeb0004ba2af688ea1b1cc
[ "MIT" ]
null
null
null
projects/07/src/Parser.py
danibachar/Nand2Tetris
fdce0e87a4869213f3eeb0004ba2af688ea1b1cc
[ "MIT" ]
null
null
null
projects/07/src/Parser.py
danibachar/Nand2Tetris
fdce0e87a4869213f3eeb0004ba2af688ea1b1cc
[ "MIT" ]
null
null
null
from Lex import Lex, ARITHMETIC_COMMANDS, PUSH_OR_POP_COMMANDS class Parser: def __init__(self, src_file_name): self._line_index = 0 self._line_index = 0 self._lines = [] f = open(src_file_name) # First assesment of the Assembler for line in f.readlines(): ...
29.596154
80
0.591293
1,474
0.957765
0
0
0
0
0
0
230
0.149448
4eef1320c0e0691a8298a782442f1c3ab4a42e10
40
py
Python
testing/examples/import_error.py
dry-python/dependencies
1a8bba41ab42d0b5249b36471f5300d9faba81e7
[ "BSD-2-Clause" ]
175
2018-07-21T13:04:44.000Z
2020-05-27T15:31:06.000Z
tests/helpers/examples/import_error.py
proofit404/dependencies
204e0cfadca801d64857f24aa4c74e7939ed9af0
[ "BSD-2-Clause" ]
325
2016-05-16T11:16:11.000Z
2022-03-04T00:45:57.000Z
testing/examples/import_error.py
dry-python/dependencies
1a8bba41ab42d0b5249b36471f5300d9faba81e7
[ "BSD-2-Clause" ]
18
2018-06-17T09:33:16.000Z
2020-05-20T18:12:30.000Z
from astral import Vision # noqa: F401
20
39
0.75
0
0
0
0
0
0
0
0
12
0.3
4eef83ede604e40066824025d8e5da2b23f0f80b
1,297
py
Python
pywxwork/contact/async.py
renqiukai/pywxwork
980283b4c89bf60f998071f30551b8802f1cdbf9
[ "MIT" ]
2
2021-05-22T11:16:47.000Z
2021-05-27T12:42:38.000Z
pywxwork/contact/async.py
renqiukai/pywxwork
980283b4c89bf60f998071f30551b8802f1cdbf9
[ "MIT" ]
null
null
null
pywxwork/contact/async.py
renqiukai/pywxwork
980283b4c89bf60f998071f30551b8802f1cdbf9
[ "MIT" ]
null
null
null
from loguru import logger from ..base import base class async(base): def __init__(self, token) -> None: super().__init__(token) def syncuser(self, data): api_name = "batch/syncuser" response = self.request( api_name=api_name, method="post", json=data) logger.debug(...
28.822222
65
0.59522
1,284
0.960359
0
0
0
0
0
0
398
0.297681
4eefbfc6df35a9a798314233bdb1d9a5b18867b2
551
py
Python
saleor/University/migrations/0012_auto_20191220_1226.py
pandeyroshan/Saleor
9f391d7a9d58626d3696781c169b2c8a059f1c0b
[ "CC-BY-4.0" ]
null
null
null
saleor/University/migrations/0012_auto_20191220_1226.py
pandeyroshan/Saleor
9f391d7a9d58626d3696781c169b2c8a059f1c0b
[ "CC-BY-4.0" ]
null
null
null
saleor/University/migrations/0012_auto_20191220_1226.py
pandeyroshan/Saleor
9f391d7a9d58626d3696781c169b2c8a059f1c0b
[ "CC-BY-4.0" ]
null
null
null
# Generated by Django 2.2 on 2019-12-20 06:56 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('University', '0011_auto_20191219_1913'), ] operations = [ migrations.RemoveField( model_name='university', name='user', ...
21.192308
50
0.555354
468
0.849365
0
0
0
0
0
0
146
0.264973
4ef0b50ef3594f7350bca88a70048229aa579679
1,539
py
Python
app/places/migrations/0001_initial.py
aykutgk/nearapp-web
469b9878cf7434278c78a733eeac40713dcc40a4
[ "MIT" ]
null
null
null
app/places/migrations/0001_initial.py
aykutgk/nearapp-web
469b9878cf7434278c78a733eeac40713dcc40a4
[ "MIT" ]
null
null
null
app/places/migrations/0001_initial.py
aykutgk/nearapp-web
469b9878cf7434278c78a733eeac40713dcc40a4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-06 23:40 from __future__ import unicode_literals from django.conf import settings import django.contrib.gis.db.models.fields from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = ...
43.971429
141
0.660169
1,272
0.826511
0
0
0
0
0
0
310
0.201429
4ef201c0a10d56d741c0b5148b73d6e3ae7ebce4
143
py
Python
acmgnyr2011/b.py
AnAverageHuman/competitive
4c4b9bdbe91fde1c52f731426f9a53bff97796e1
[ "BSD-3-Clause" ]
null
null
null
acmgnyr2011/b.py
AnAverageHuman/competitive
4c4b9bdbe91fde1c52f731426f9a53bff97796e1
[ "BSD-3-Clause" ]
null
null
null
acmgnyr2011/b.py
AnAverageHuman/competitive
4c4b9bdbe91fde1c52f731426f9a53bff97796e1
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python P = int(input()) for _ in range(P): N, n, m = [int(i) for i in input().split()] print(f"{N} {(n - m) * m + 1}")
20.428571
47
0.48951
0
0
0
0
0
0
0
0
45
0.314685
4ef25edc19b260d4a3119393c3b4c0a16a1f9130
462
py
Python
preprocessing/importlib_read.py
Kunal614/Machine-Learning
26b3e0f3397ddb524c96c5b6c99b173b6fc80501
[ "MIT" ]
null
null
null
preprocessing/importlib_read.py
Kunal614/Machine-Learning
26b3e0f3397ddb524c96c5b6c99b173b6fc80501
[ "MIT" ]
null
null
null
preprocessing/importlib_read.py
Kunal614/Machine-Learning
26b3e0f3397ddb524c96c5b6c99b173b6fc80501
[ "MIT" ]
null
null
null
#importing lib import pandas as pd import numpy as np #Take data df = pd.DataFrame({"Name":['Kunal' , 'Mohit' , 'Rohit' ] ,"age":[np.nan , 23, 45] , "sex":['M' , np.nan , 'M']}) #check for nnull value print(df.isnull().sum()) print(df.describe()) # ignore the nan rows print(len(df.dropna()) , df.dropna()) #for ...
15.931034
112
0.634199
0
0
0
0
0
0
0
0
155
0.335498
4ef2b218f2e39c030635631f9cea78b7d43ed7b8
2,774
py
Python
isw2-master/src/app/ui/ajustarReloj.py
marlanbar/academic-projects
bcdc8ca36b6984ab3f83c10b8a3ed45576ecfca1
[ "MIT" ]
null
null
null
isw2-master/src/app/ui/ajustarReloj.py
marlanbar/academic-projects
bcdc8ca36b6984ab3f83c10b8a3ed45576ecfca1
[ "MIT" ]
null
null
null
isw2-master/src/app/ui/ajustarReloj.py
marlanbar/academic-projects
bcdc8ca36b6984ab3f83c10b8a3ed45576ecfca1
[ "MIT" ]
null
null
null
import datetime from .consola import Consola from .uiscreen import UIScreen from ..core.reloj import Reloj class AjustarReloj(UIScreen): def __init__(self, unMain, unUsuario): super().__init__(unMain) self.usuario = unUsuario def run(self): self.consola.prnt("") self.consola.prnt(" Ahora: %s" %...
37.486486
115
0.612112
2,667
0.960043
0
0
0
0
0
0
859
0.309215
4ef40c95ccc6546b171182631d74d1be2a580530
2,359
py
Python
signin/jd.py
nujabse/simpleSignin
e818f9880d97d39beddcadccb53dc23e18fe6d8e
[ "MIT" ]
11
2018-03-07T04:13:05.000Z
2019-11-28T04:43:55.000Z
signin/jd.py
nujabse/simpleSignin
e818f9880d97d39beddcadccb53dc23e18fe6d8e
[ "MIT" ]
2
2018-03-04T15:08:01.000Z
2018-05-28T07:42:47.000Z
signin/jd.py
nujabse/simpleSignin
e818f9880d97d39beddcadccb53dc23e18fe6d8e
[ "MIT" ]
15
2018-01-25T10:54:06.000Z
2019-11-05T07:09:20.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import traceback from selenium.webdriver import ChromeOptions from signin.chrome import find_chrome_driver_path, JdSession from signin.jd_job import jobs_all from lib.log import logger from lib.settings import PC_UA from lib.settings import MOBILE_UA class JDUser: ...
30.24359
92
0.561679
2,082
0.857849
0
0
0
0
0
0
501
0.206428
4ef48cca62f034a2764603154909770a46970bca
284
py
Python
tests/tasks/test_aws_athena_task.py
jezd-axyl/platsec-aws-scanner
bc2b064c87ac2f77fab49c1e1eb3782d6de685b2
[ "Apache-2.0" ]
null
null
null
tests/tasks/test_aws_athena_task.py
jezd-axyl/platsec-aws-scanner
bc2b064c87ac2f77fab49c1e1eb3782d6de685b2
[ "Apache-2.0" ]
4
2021-05-06T12:36:46.000Z
2022-02-11T09:47:57.000Z
tests/tasks/test_aws_athena_task.py
jezd-axyl/platsec-aws-scanner
bc2b064c87ac2f77fab49c1e1eb3782d6de685b2
[ "Apache-2.0" ]
2
2021-04-21T04:48:47.000Z
2022-01-14T04:29:17.000Z
from unittest import TestCase from unittest.mock import Mock from tests.test_types_generator import athena_task class TestAwsAthenaTask(TestCase): def test_run_task(self) -> None: with self.assertRaises(NotImplementedError): athena_task()._run_task(Mock())
25.818182
52
0.757042
168
0.591549
0
0
0
0
0
0
0
0
4ef53f10b384a2cdfc48e2d923372b8c68776225
1,966
py
Python
Post-Exploitation/LaZagne/Linux/lazagne/softwares/wallet/gnome.py
FOGSEC/TID3xploits
b57d8bae454081a3883a5684679e2a329e72d6e5
[ "MIT" ]
5
2018-01-15T13:58:40.000Z
2022-02-17T02:38:58.000Z
Post-Exploitation/LaZagne/Linux/lazagne/softwares/wallet/gnome.py
bhattsameer/TID3xploits
b57d8bae454081a3883a5684679e2a329e72d6e5
[ "MIT" ]
null
null
null
Post-Exploitation/LaZagne/Linux/lazagne/softwares/wallet/gnome.py
bhattsameer/TID3xploits
b57d8bae454081a3883a5684679e2a329e72d6e5
[ "MIT" ]
4
2019-06-21T07:51:11.000Z
2020-11-04T05:20:09.000Z
#!/usr/bin/env python import os from lazagne.config.write_output import print_debug from lazagne.config.moduleInfo import ModuleInfo class Gnome(ModuleInfo): def __init__(self): options = {'command': '-g', 'action': 'store_true', 'dest': 'gnomeKeyring', 'help': 'Gnome Keyring'} ModuleInfo.__init__(self, 'gnomeKey...
31.206349
102
0.619023
1,828
0.929807
0
0
0
0
0
0
505
0.256867
4ef55661668508edfc12cbfc3fabe43b080c3a01
810
py
Python
clearsky/main.py
NathanStern/ClearSky
979583de2c44dcd3f62b96b9b43ba6369dff8a71
[ "MIT" ]
null
null
null
clearsky/main.py
NathanStern/ClearSky
979583de2c44dcd3f62b96b9b43ba6369dff8a71
[ "MIT" ]
null
null
null
clearsky/main.py
NathanStern/ClearSky
979583de2c44dcd3f62b96b9b43ba6369dff8a71
[ "MIT" ]
null
null
null
from . import db from flask import Flask, current_app from . import create_app import os from . import db app = create_app() with app.app_context(): if os.path.exists("clearsky/config.json"): pass else: with open('clearsky/config.json', 'w') as configuration: print("Opened config ...
28.928571
141
0.630864
0
0
0
0
0
0
0
0
416
0.51358
4ef5f5eab5f2ada2e47d1bb10c80337bb76665c1
6,966
py
Python
logger.py
despargy/Shade
8ed54c80154448c2cdc29623c2798a01d594995e
[ "MIT" ]
3
2019-12-28T09:04:09.000Z
2020-04-19T15:04:49.000Z
logger.py
despargy/Shade
8ed54c80154448c2cdc29623c2798a01d594995e
[ "MIT" ]
null
null
null
logger.py
despargy/Shade
8ed54c80154448c2cdc29623c2798a01d594995e
[ "MIT" ]
1
2022-03-25T14:10:45.000Z
2022-03-25T14:10:45.000Z
import logging from abc import ABC, abstractmethod from file_read_backwards import FileReadBackwards import threading import os class Logger(ABC): def __init__(self,filename): self.lock = threading.Lock() self.dir = "Logs" if(not os.path.isdir(self.dir)): os.mkdir(self.dir) ...
27.864
83
0.557852
6,747
0.968562
0
0
171
0.024548
0
0
2,164
0.310652
4ef6051cf73af32c482601c57498a5943fed63f6
5,387
py
Python
nydus/db/base.py
Elec/nydus
9b505840da47a34f758a830c3992fa5dcb7bb7ad
[ "Apache-2.0" ]
102
2015-01-12T20:07:37.000Z
2022-02-21T10:00:07.000Z
nydus/db/base.py
Elec/nydus
9b505840da47a34f758a830c3992fa5dcb7bb7ad
[ "Apache-2.0" ]
4
2015-02-18T04:04:47.000Z
2021-06-09T12:14:50.000Z
nydus/db/base.py
Elec/nydus
9b505840da47a34f758a830c3992fa5dcb7bb7ad
[ "Apache-2.0" ]
9
2015-07-28T15:16:04.000Z
2021-06-08T20:31:04.000Z
""" nydus.db.base ~~~~~~~~~~~~~ :copyright: (c) 2011-2012 DISQUS. :license: Apache License 2.0, see LICENSE for more details. """ __all__ = ('LazyConnectionHandler', 'BaseCluster') import collections from nydus.db.map import DistributedContextManager from nydus.db.routers import BaseRouter, routing_params from nydus...
32.451807
108
0.633748
4,196
0.778912
85
0.015779
181
0.033599
0
0
1,059
0.196584
4ef8c03f9234184a71c8d62d34f7bd0e16bc0579
1,212
py
Python
pytest_voluptuous/plugin.py
F-Secure/pytest-voluptuous
d71da445e49d3c17c959391d56857a468d344f4b
[ "Apache-2.0" ]
27
2018-01-11T09:21:40.000Z
2021-11-17T06:23:49.000Z
pytest_voluptuous/plugin.py
F-Secure/pytest-voluptuous
d71da445e49d3c17c959391d56857a468d344f4b
[ "Apache-2.0" ]
8
2018-02-16T10:56:36.000Z
2020-06-12T12:35:49.000Z
pytest_voluptuous/plugin.py
F-Secure/pytest-voluptuous
d71da445e49d3c17c959391d56857a468d344f4b
[ "Apache-2.0" ]
7
2018-02-13T23:05:15.000Z
2020-05-18T11:59:46.000Z
from __future__ import absolute_import from voluptuous import MultipleInvalid from pytest_voluptuous.voluptuous import S def pytest_assertrepr_compare(op, left, right): if isinstance(left, S) and (op == '<=' or op == '==') or isinstance(right, S) and op == '==': if isinstance(left, S): sourc...
24.24
97
0.55198
0
0
0
0
0
0
0
0
86
0.070957
4ef95f448285155ef51a0543042976937c9cfbc9
1,487
py
Python
amftrack/pipeline/scripts/post_processing/make_small_exp.py
Cocopyth/MscThesis
60162bc779a3a668e7447b60bb9a4b2a616b8093
[ "MIT" ]
1
2021-06-10T02:51:53.000Z
2021-06-10T02:51:53.000Z
amftrack/pipeline/scripts/post_processing/make_small_exp.py
Cocopyth/MscThesis
60162bc779a3a668e7447b60bb9a4b2a616b8093
[ "MIT" ]
null
null
null
amftrack/pipeline/scripts/post_processing/make_small_exp.py
Cocopyth/MscThesis
60162bc779a3a668e7447b60bb9a4b2a616b8093
[ "MIT" ]
null
null
null
from path import path_code_dir import sys sys.path.insert(0, path_code_dir) from amftrack.pipeline.functions.image_processing.extract_width_fun import * from amftrack.pipeline.functions.image_processing.experiment_class_surf import Experiment, save_graphs, load_graphs from amftrack.util import get_dates_datetime...
36.268293
116
0.778749
0
0
0
0
0
0
0
0
171
0.114997
4efaee537f830f9cc1209c150188c0e51e4634b7
12,476
py
Python
src/style_transfer/style_transfer_v2_gluon.py
gilbertfrancois/mxnet-cookbook
95add0415d7c1ddfc4bcdd3d3a41c2e44162f888
[ "Apache-2.0" ]
1
2020-02-28T03:00:19.000Z
2020-02-28T03:00:19.000Z
src/style_transfer/style_transfer_v2_gluon.py
gilbertfrancois/mxnet-cookbook
95add0415d7c1ddfc4bcdd3d3a41c2e44162f888
[ "Apache-2.0" ]
null
null
null
src/style_transfer/style_transfer_v2_gluon.py
gilbertfrancois/mxnet-cookbook
95add0415d7c1ddfc4bcdd3d3a41c2e44162f888
[ "Apache-2.0" ]
1
2020-10-14T20:26:19.000Z
2020-10-14T20:26:19.000Z
# Copyright 2019 Gilbert Francois Duivesteijn # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
41.311258
143
0.636181
6,536
0.523886
0
0
588
0.04713
0
0
1,622
0.13001
4efc7761548ac36e29fdc7dad0bfff5e1335bdbc
6,980
py
Python
torncache/connection.py
shipci/torncache-sample
790a46812f3a503d2f30eefdd89c974a929c2a4a
[ "Apache-2.0" ]
null
null
null
torncache/connection.py
shipci/torncache-sample
790a46812f3a503d2f30eefdd89c974a929c2a4a
[ "Apache-2.0" ]
null
null
null
torncache/connection.py
shipci/torncache-sample
790a46812f3a503d2f30eefdd89c974a929c2a4a
[ "Apache-2.0" ]
null
null
null
# -*- mode: python; coding: utf-8 -*- """ Torncache Connection """ from __future__ import absolute_import import os import stat import socket import time import numbers import logging import functools from tornado import iostream from tornado import stack_context from tornado.ioloop import IOLoop from tornado.platf...
31.441441
79
0.593123
6,620
0.948424
0
0
0
0
0
0
1,144
0.163897
4efd701d6b8e98e84a695daad78682b43535205a
10,025
py
Python
rl-toolkit/rlf/rl/model.py
clvrai/goal_prox_il
7c809b2ee575a69a14997068db06f3c1f3c8bd08
[ "MIT" ]
4
2021-11-17T20:19:34.000Z
2022-03-31T04:21:26.000Z
rl-toolkit/rlf/rl/model.py
clvrai/goal_prox_il
7c809b2ee575a69a14997068db06f3c1f3c8bd08
[ "MIT" ]
null
null
null
rl-toolkit/rlf/rl/model.py
clvrai/goal_prox_il
7c809b2ee575a69a14997068db06f3c1f3c8bd08
[ "MIT" ]
null
null
null
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from rlf.rl.loggers import sanity_checker def weight_init(module, weight_init, bias_init, gain=1): weight_init(module.weight.data, gain=gain) bias_init(module.bias.data) return module def no_bias_weight_init(m): if...
27.924791
88
0.569875
9,270
0.924688
0
0
627
0.062544
0
0
999
0.099651
4efe3309dbe459b7936bf0bef1d7d022f2a55e49
4,407
py
Python
pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/apphosting/verify.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
94
2018-04-30T20:29:15.000Z
2022-03-29T13:40:31.000Z
pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/apphosting/verify.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
67
2018-12-06T21:08:09.000Z
2022-03-29T18:00:46.000Z
pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/apphosting/verify.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
49
2018-06-29T18:59:03.000Z
2022-03-10T02:07:59.000Z
''' Common Verify functions for IOX / app-hosting ''' import logging import time log = logging.getLogger(__name__) # Import parser from genie.utils.timeout import Timeout from genie.metaparser.util.exceptions import SchemaEmptyParserError def verify_app_requested_state(device, app_list=None, requested_st...
33.386364
109
0.568187
0
0
0
0
0
0
0
0
1,653
0.375085
4efef6a46d52e7f4dd5e178790df0f2e99b29bf4
15,350
py
Python
memo/models/neural_nets.py
feloundou/memo
dc988d38dc6bcbcbb6851b78fb90ac77da4ad1b5
[ "Apache-2.0" ]
null
null
null
memo/models/neural_nets.py
feloundou/memo
dc988d38dc6bcbcbb6851b78fb90ac77da4ad1b5
[ "Apache-2.0" ]
null
null
null
memo/models/neural_nets.py
feloundou/memo
dc988d38dc6bcbcbb6851b78fb90ac77da4ad1b5
[ "Apache-2.0" ]
null
null
null
# import scipy.signal from gym.spaces import Box, Discrete import numpy as np import torch from torch import nn import IPython # from torch.nn import Parameter import torch.nn.functional as F from torch.distributions import Independent, OneHotCategorical, Categorical from torch.distributions.normal import Normal # # fr...
36.032864
127
0.641238
14,358
0.935375
0
0
0
0
0
0
3,184
0.207427
4eff2ab37a18ee36fb3fd5444900984659555e54
855
py
Python
sprocket/util/extfrm.py
zhouming-hfut/sprocket
68d4005284b72a891d0c0f81afabea087fc45960
[ "MIT" ]
500
2017-09-25T14:04:50.000Z
2022-03-24T22:21:51.000Z
sprocket/util/extfrm.py
zhouming-hfut/sprocket
68d4005284b72a891d0c0f81afabea087fc45960
[ "MIT" ]
73
2017-09-25T13:59:38.000Z
2022-01-12T11:35:58.000Z
sprocket/util/extfrm.py
zhouming-hfut/sprocket
68d4005284b72a891d0c0f81afabea087fc45960
[ "MIT" ]
116
2017-09-26T15:54:13.000Z
2022-03-05T08:40:14.000Z
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import numpy as np def extfrm(data, npow, power_threshold=-20): """Extract frame over the power threshold Parameters ---------- data: array, shape (`T`, `dim`) Array of input data npow : array, shap...
22.5
64
0.607018
0
0
0
0
0
0
0
0
517
0.604678
f60095130f09208c0cc014869141663b3698d4a5
9,317
py
Python
tickets_handler/models.py
ChanTerelLy/partnerweb3
4f37f032242cbc67d57b7161ecb5960d9cfde76d
[ "MIT" ]
null
null
null
tickets_handler/models.py
ChanTerelLy/partnerweb3
4f37f032242cbc67d57b7161ecb5960d9cfde76d
[ "MIT" ]
null
null
null
tickets_handler/models.py
ChanTerelLy/partnerweb3
4f37f032242cbc67d57b7161ecb5960d9cfde76d
[ "MIT" ]
null
null
null
import uuid from django.db import models from partnerweb_parser.manager import NewDesign, Ticket import re from partnerweb_parser import system, mail, manager import json import datetime from partnerweb_parser.date_func import dmYHM_to_datetime from tickets_handler.tasks import update_date_for_assigned class Modify(m...
37.568548
107
0.651819
9,010
0.964152
0
0
5,356
0.573141
0
0
275
0.029428
f6029db9fa8774e3c51f5cd2c301f93c77ad18fa
1,184
py
Python
photos/views.py
Otybrian/personal-gallery
d9492b5d29600da4a2999a9cc4914279e55f87ee
[ "MIT" ]
null
null
null
photos/views.py
Otybrian/personal-gallery
d9492b5d29600da4a2999a9cc4914279e55f87ee
[ "MIT" ]
null
null
null
photos/views.py
Otybrian/personal-gallery
d9492b5d29600da4a2999a9cc4914279e55f87ee
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse import datetime as dt from django.views import View from photos.models import Image, category # Create your views here. def welcome(request): return render(request, 'welcome.html') def display_page(request): image = Image.objects.all()...
27.534884
105
0.699324
0
0
0
0
0
0
0
0
258
0.217905
f602a97c790f5ae9f623af20f687cb178aa58aa5
2,530
py
Python
sem/constants.py
YoannDupont/SEM
ff21c5dc9a8e99eda81dc266e67cfa97dec7c243
[ "MIT" ]
22
2016-11-13T21:08:58.000Z
2021-04-26T07:04:54.000Z
sem/constants.py
Raphencoder/SEM
ff21c5dc9a8e99eda81dc266e67cfa97dec7c243
[ "MIT" ]
15
2016-11-15T10:21:07.000Z
2021-11-08T10:08:05.000Z
sem/constants.py
Raphencoder/SEM
ff21c5dc9a8e99eda81dc266e67cfa97dec7c243
[ "MIT" ]
8
2016-11-15T10:21:41.000Z
2022-03-04T21:28:05.000Z
# -*- coding: utf-8 -*- """ file: constants.py Description: some useful constants that could be of some use in SEM and beyond. author: Yoann Dupont MIT License Copyright (c) 2018 Yoann Dupont Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation...
32.857143
89
0.705929
0
0
0
0
0
0
0
0
1,936
0.765217
f6039a035e0c79c81407aabe0db10a251b036b44
2,383
py
Python
newsbreak.py
mitchsmith/news_munger
e9c8362dd3085acb2b1f0cfd4cb313ef9f6bf06d
[ "MIT" ]
null
null
null
newsbreak.py
mitchsmith/news_munger
e9c8362dd3085acb2b1f0cfd4cb313ef9f6bf06d
[ "MIT" ]
null
null
null
newsbreak.py
mitchsmith/news_munger
e9c8362dd3085acb2b1f0cfd4cb313ef9f6bf06d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This module provides a command line interface to news_munger. """ import datetime import random import argparse from munger import DocumentCatalog, Munger parser = argparse.ArgumentParser() parser.parse_args() ## Classes ## class MadLib(Munger): """Real soo...
26.775281
77
0.586655
2,015
0.845573
0
0
0
0
0
0
688
0.288712
f6076a72ecf2f080ef45e72da4240a2e7661a299
8,246
py
Python
pipeline/dag.py
OpenSourceEconomics/pipeline
cdd9679c62af32f52a07aba800b752e90af08396
[ "BSD-3-Clause" ]
3
2020-03-23T12:15:19.000Z
2020-05-12T11:52:21.000Z
pipeline/dag.py
OpenSourceEconomics/pipeline
cdd9679c62af32f52a07aba800b752e90af08396
[ "BSD-3-Clause" ]
22
2020-04-06T22:24:18.000Z
2020-05-13T11:44:57.000Z
pipeline/dag.py
OpenSourceEconomics/pipeline
cdd9679c62af32f52a07aba800b752e90af08396
[ "BSD-3-Clause" ]
null
null
null
"""This module contains the code related to the DAG and the scheduler.""" from pathlib import Path import matplotlib.pyplot as plt import networkx as nx import numpy as np from matplotlib.colors import LinearSegmentedColormap from mpl_toolkits.axes_grid1 import make_axes_locatable from networkx.drawing import nx_pydot...
31.96124
88
0.642251
3,604
0.43706
0
0
113
0.013704
0
0
2,955
0.358356
f607f4917d87af5bd9f2a106689f14808e678707
2,459
py
Python
windyquery/validator/fullname_json.py
bluerelay/windyquery
049dc624f4c4a3210d455352b1495db6bd1ff441
[ "MIT" ]
51
2019-05-13T10:51:23.000Z
2021-09-12T08:11:56.000Z
windyquery/validator/fullname_json.py
bluerelay/windyquery
049dc624f4c4a3210d455352b1495db6bd1ff441
[ "MIT" ]
2
2020-10-08T16:28:45.000Z
2021-06-23T03:27:42.000Z
windyquery/validator/fullname_json.py
bluerelay/windyquery
049dc624f4c4a3210d455352b1495db6bd1ff441
[ "MIT" ]
3
2021-05-10T13:08:21.000Z
2021-06-20T19:58:30.000Z
from windyquery.provider._base import JSONB from ._base import _rule from .fullname import Fullname from .number import Number from .operators.minus import Minus class FullnameJson(Fullname, Number, Minus): reserved = {**Fullname.reserved, **Number.reserved, **Minus.reserved} tokens = Fullname.tokens + Number...
30.7375
73
0.542497
2,294
0.9329
0
0
1,881
0.764945
0
0
467
0.189915
f609ea1edf133c69b084cabfbd8b3cb1f4199f52
37
py
Python
heatmap/__init__.py
Bilal-Yousaf/heatmap
789907301f9663feca72fb84dffbe2de08869975
[ "MIT" ]
5
2020-03-25T20:31:48.000Z
2021-04-23T09:53:50.000Z
heatmap/__init__.py
Bilal-Yousaf/HeatMap
789907301f9663feca72fb84dffbe2de08869975
[ "MIT" ]
null
null
null
heatmap/__init__.py
Bilal-Yousaf/HeatMap
789907301f9663feca72fb84dffbe2de08869975
[ "MIT" ]
null
null
null
from .heatmap import generate_heatmap
37
37
0.891892
0
0
0
0
0
0
0
0
0
0
f60a3f4c653a3d461182600bc1efb2e3052bf960
1,575
py
Python
download-files.py
CrowderSoup/download-files
2abc35aecd010dd246e0b9b8af7880f51ea47b7e
[ "Unlicense" ]
null
null
null
download-files.py
CrowderSoup/download-files
2abc35aecd010dd246e0b9b8af7880f51ea47b7e
[ "Unlicense" ]
null
null
null
download-files.py
CrowderSoup/download-files
2abc35aecd010dd246e0b9b8af7880f51ea47b7e
[ "Unlicense" ]
null
null
null
import os, os.path, urllib.request, sys, getopt def main(argv): print(argv) input_file = '' download_dir = '' try: opts, args = getopt.getopt(argv, "hi:d:", ["input-file=","download-dir="]) except getopt.GetoptError as ...
30.288462
78
0.510476
0
0
0
0
0
0
0
0
392
0.248889
f60af4235aef343759e761d60c46b44ec31d12af
929
py
Python
pynif3d/pipeline/base_pipeline.py
pfnet/pynif3d
da3680cce7e8fc4c194f13a1528cddbad9a18ab0
[ "MIT" ]
66
2021-08-18T01:30:17.000Z
2022-02-19T10:35:52.000Z
pynif3d/pipeline/base_pipeline.py
pfnet/pynif3d
da3680cce7e8fc4c194f13a1528cddbad9a18ab0
[ "MIT" ]
6
2021-08-18T01:36:31.000Z
2021-09-02T11:18:01.000Z
pynif3d/pipeline/base_pipeline.py
pfnet/pynif3d
da3680cce7e8fc4c194f13a1528cddbad9a18ab0
[ "MIT" ]
3
2021-11-22T23:06:20.000Z
2022-02-10T06:24:40.000Z
import os import gdown import torch import yaml from pynif3d.common.verification import check_in_options, check_path_exists from pynif3d.log.log_funcs import func_logger class BasePipeline(torch.nn.Module): @func_logger def __init__(self): super().__init__() def load_pretrained_model(self, yaml...
28.151515
80
0.698601
754
0.811625
0
0
63
0.067815
0
0
48
0.051668
f60b7b13f9cee75fd4af4cab97ad49f4feeb9a82
392
py
Python
search.py
joyfulflyer/billboard-spotify
a6561e4718ea671721b2a8f900ecfbf49a9f6c1b
[ "MIT" ]
null
null
null
search.py
joyfulflyer/billboard-spotify
a6561e4718ea671721b2a8f900ecfbf49a9f6c1b
[ "MIT" ]
null
null
null
search.py
joyfulflyer/billboard-spotify
a6561e4718ea671721b2a8f900ecfbf49a9f6c1b
[ "MIT" ]
null
null
null
from spotify_auth import auth from urllib import parse import json def search(track_name, artist, type='track'): parsed = parse.quote_plus(query) query = "artist:{}%20track:{}".format(artist, track_name) response = auth.get( 'https://api.spotify.com/v1/search?q={}&type={}'.format(query, type)) ...
30.153846
77
0.701531
0
0
0
0
0
0
0
0
77
0.196429
f60b96e5a2ce996ad44a1fdf8fb2152dfc983fc2
9,910
py
Python
fastccd_support_ioc/fastccd_support_ioc.py
lbl-camera/fastccd_support_ioc
80b3820744e9aec7923af6adec0a66a0c51b2c21
[ "BSD-3-Clause" ]
null
null
null
fastccd_support_ioc/fastccd_support_ioc.py
lbl-camera/fastccd_support_ioc
80b3820744e9aec7923af6adec0a66a0c51b2c21
[ "BSD-3-Clause" ]
1
2020-08-07T22:22:25.000Z
2020-08-07T22:22:25.000Z
fastccd_support_ioc/fastccd_support_ioc.py
lbl-camera/fastccd_support_ioc
80b3820744e9aec7923af6adec0a66a0c51b2c21
[ "BSD-3-Clause" ]
1
2021-02-08T22:06:05.000Z
2021-02-08T22:06:05.000Z
from caproto.server import PVGroup, SubGroup, pvproperty, get_pv_pair_wrapper from caproto import ChannelType from . import utils, pvproperty_with_rbv, wrap_autosave, FastAutosaveHelper from textwrap import dedent import sys from caproto.server import ioc_arg_parser, run from caproto.sync.client import write, read fro...
43.656388
157
0.629566
8,955
0.903633
0
0
8,505
0.858224
6,430
0.64884
1,926
0.194349
f60c351db3d540f17c4848153f58c4bf3898b80c
241
py
Python
infrastructure-dashboard/nccid-redirect/lambda/lambda-handler.py
uk-gov-mirror/NHSX.covid-chest-imaging-database
77799a97193d09e9267182d18fbb79d604bbb038
[ "MIT" ]
56
2020-04-08T12:40:28.000Z
2021-10-02T22:57:16.000Z
infrastructure-dashboard/nccid-redirect/lambda/lambda-handler.py
uk-gov-mirror/NHSX.covid-chest-imaging-database
77799a97193d09e9267182d18fbb79d604bbb038
[ "MIT" ]
111
2020-04-02T13:23:06.000Z
2022-03-30T13:23:28.000Z
infrastructure-dashboard/nccid-redirect/lambda/lambda-handler.py
uk-gov-mirror/NHSX.covid-chest-imaging-database
77799a97193d09e9267182d18fbb79d604bbb038
[ "MIT" ]
10
2020-05-05T14:07:11.000Z
2022-01-11T15:47:27.000Z
def handler(event, context): return { "statusCode": 302, "headers": { "Location": "https://www.nhsx.nhs.uk/covid-19-response/data-and-covid-19/national-covid-19-chest-imaging-database-nccid/" }, }
30.125
133
0.589212
0
0
0
0
0
0
0
0
140
0.580913
f60c8d54e5e796dde011b4726884df78f2198799
1,529
py
Python
MachineLearning/SparkPREDICT_E2E_MLFLOW_Xgboost.py
AjAgr/Synapse
b009b6479c3b9797a12e24dcd110b71ca8566212
[ "MIT" ]
null
null
null
MachineLearning/SparkPREDICT_E2E_MLFLOW_Xgboost.py
AjAgr/Synapse
b009b6479c3b9797a12e24dcd110b71ca8566212
[ "MIT" ]
null
null
null
MachineLearning/SparkPREDICT_E2E_MLFLOW_Xgboost.py
AjAgr/Synapse
b009b6479c3b9797a12e24dcd110b71ca8566212
[ "MIT" ]
1
2022-02-22T11:24:41.000Z
2022-02-22T11:24:41.000Z
#!/usr/bin/env python # coding: utf-8 # ## E2E Xgboost MLFLOW # In[45]: from pyspark.sql import SparkSession from pyspark.sql.functions import col, pandas_udf,udf,lit import azure.synapse.ml.predict as pcontext import azure.synapse.ml.predict.utils._logger as synapse_predict_logger import numpy as np import panda...
15.602041
75
0.666449
0
0
0
0
0
0
0
0
527
0.34467
f60d8908048f4ecdd577d5074d14eeb34f78c5bb
2,930
py
Python
models/gaze_rnn77.py
yj-yu/Recurrent_Gaze_Prediction
cf366095f19cd8c9ce271930d194db12a7d45018
[ "MIT" ]
9
2019-06-06T14:55:56.000Z
2022-01-27T09:35:17.000Z
models/gaze_rnn77.py
yj-yu/Recurrent_Gaze_Prediction
cf366095f19cd8c9ce271930d194db12a7d45018
[ "MIT" ]
1
2021-06-01T22:34:37.000Z
2021-06-01T22:34:37.000Z
models/gaze_rnn77.py
yj-yu/Recurrent_Gaze_Prediction
cf366095f19cd8c9ce271930d194db12a7d45018
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- """ gaze_rnn7.py Implement a simple recurrent gaze prediction model based on RNN(GRU). In this version, the gaze DIM is REDUCED to 7x7 dimension. """ # TODO separate pupil from gazemaps, AWFUL design import numpy as np import os import sys import time from PIL import Image import tensorflow ...
28.173077
84
0.713652
1,790
0.610922
0
0
0
0
0
0
542
0.184983
f60df9264d987445f7433e60e82a4593c3bbdb6a
1,218
py
Python
py/dcp/problems/graph/max_edges.py
bmoretz/Daily-Coding-Problem
f79e062e9f6e7b18b7e95c071fbe71ad104affcb
[ "MIT" ]
1
2020-06-26T13:28:43.000Z
2020-06-26T13:28:43.000Z
py/dcp/problems/graph/max_edges.py
bmoretz/Daily-Coding-Problem
f79e062e9f6e7b18b7e95c071fbe71ad104affcb
[ "MIT" ]
7
2021-11-18T19:46:08.000Z
2022-03-12T01:03:01.000Z
py/dcp/problems/graph/max_edges.py
bmoretz/Daily-Coding-Problem
f79e062e9f6e7b18b7e95c071fbe71ad104affcb
[ "MIT" ]
null
null
null
from collections import defaultdict from .common import IGraph ''' Remove edges to create even trees. You are given a tree with an even number of nodes. Consider each connection between a parent and child node to be an "edge". You would like to remove some of these edges, such that the disconnected subtrees that rem...
28.325581
128
0.656814
0
0
0
0
0
0
0
0
645
0.529557
f60e8f8a52c502e39de2e2fbda338251bd902c5a
1,362
py
Python
test_pytrain/test_KNN/test_KNN.py
pytrain/pytrain-shallow
c873a6f11f1dd940da12e7c9a3c961507d064d9a
[ "MIT" ]
20
2016-09-03T10:56:06.000Z
2020-08-21T01:43:47.000Z
test_pytrain/test_KNN/test_KNN.py
pytrain/pytrain
c873a6f11f1dd940da12e7c9a3c961507d064d9a
[ "MIT" ]
8
2016-11-14T12:33:38.000Z
2017-07-14T15:43:53.000Z
test_pytrain/test_KNN/test_KNN.py
pytrain/pytrain
c873a6f11f1dd940da12e7c9a3c961507d064d9a
[ "MIT" ]
7
2017-02-09T16:50:37.000Z
2022-01-02T01:18:56.000Z
# # test KNN # # @ author becxer # @ email becxer87@gmail.com # from test_pytrain import test_Suite from pytrain.KNN import KNN from pytrain.lib import autotest from pytrain.lib import dataset import numpy as np class test_KNN_iris(test_Suite): def __init__(self, logging = True): test_Suite.__init__(self,...
34.05
95
0.709251
1,136
0.834068
0
0
0
0
0
0
259
0.190162
f60f32aa489881ec2e8225930b221b8c8e96f54f
2,416
py
Python
python_data_utils/spark/ml/randomforest.py
surajiyer/python-data-utils
d6e9bf81204a01545a3edb165c5724eb24f37c18
[ "MIT" ]
4
2019-01-06T00:09:21.000Z
2022-01-28T06:03:13.000Z
python_data_utils/spark/ml/randomforest.py
surajiyer/python-data-utils
d6e9bf81204a01545a3edb165c5724eb24f37c18
[ "MIT" ]
null
null
null
python_data_utils/spark/ml/randomforest.py
surajiyer/python-data-utils
d6e9bf81204a01545a3edb165c5724eb24f37c18
[ "MIT" ]
null
null
null
__all__ = ['RandomForestBinaryModel'] from pyspark.sql import DataFrame from pyspark.ml.classification import RandomForestClassifier from python_data_utils.spark.evaluation.multiclass import MulticlassEvaluator from python_data_utils.spark.ml.base import BinaryClassCVModel, Metrics class RandomForestBinaryModel(Bin...
39.606557
101
0.657699
2,128
0.880795
0
0
409
0.169288
0
0
632
0.261589
f610b3662a3cf10a10d6b9f3bf736444d51ee13b
2,815
py
Python
predict.py
zahrabashir98/SmileDetection
66700dfbd2809f057d224d438a75bef99edffc56
[ "MIT" ]
17
2019-02-19T15:14:43.000Z
2021-07-09T14:36:19.000Z
predict.py
zahrabashir98/SmileDetection
66700dfbd2809f057d224d438a75bef99edffc56
[ "MIT" ]
1
2021-01-07T02:51:35.000Z
2021-01-07T02:51:35.000Z
predict.py
zahrabashir98/SmileDetection
66700dfbd2809f057d224d438a75bef99edffc56
[ "MIT" ]
2
2019-02-01T17:46:39.000Z
2020-06-17T12:10:52.000Z
import sys import cv2 from keras.models import load_model from matplotlib import pyplot as plt import time model = load_model("models/model.h5") def find_faces(image): face_cascade = cv2.CascadeClassifier('data/haarcascade_frontalface_default.xml') face_rects = face_cascade.detectMultiScale( image,...
26.308411
110
0.621314
0
0
779
0.276732
0
0
0
0
236
0.083837
f612b87c818bc244cde8457fdae9a749fd1f7f0f
1,088
py
Python
src/brute_force.py
tcysin/tsp-solver
5361aefb7e2dc4d851320cd1cc8ac33aad50d76b
[ "MIT" ]
2
2020-10-10T18:21:33.000Z
2021-05-29T12:53:45.000Z
src/brute_force.py
DishanMdr/tsp-solver
5361aefb7e2dc4d851320cd1cc8ac33aad50d76b
[ "MIT" ]
4
2019-10-01T19:31:54.000Z
2019-10-07T09:53:16.000Z
src/brute_force.py
AlekseiTcysin/tsp-solver
5361aefb7e2dc4d851320cd1cc8ac33aad50d76b
[ "MIT" ]
1
2021-05-29T12:53:47.000Z
2021-05-29T12:53:47.000Z
""" Implementation of Brute Force algorithm. Checks all possible tours and selects the shortest one. """ from itertools import permutations def brute_force(graph): """Calculates and returns shortest tour using brute force approach. Runs in O(n!). Provides exact solution. Args: graph: instance ...
23.652174
71
0.613051
0
0
0
0
0
0
0
0
493
0.453125
f6141ec62f73733e8e0035ee98f16f938d62b41d
5,414
py
Python
web_app.py
akshitagupta23/Udacity_DS_ND_Capstone_Project
1c500765f84160312935c48f9c1432256cf5df06
[ "MIT" ]
null
null
null
web_app.py
akshitagupta23/Udacity_DS_ND_Capstone_Project
1c500765f84160312935c48f9c1432256cf5df06
[ "MIT" ]
null
null
null
web_app.py
akshitagupta23/Udacity_DS_ND_Capstone_Project
1c500765f84160312935c48f9c1432256cf5df06
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # coding=utf-8 import streamlit as st import numpy as np import pandas as pd import joblib from sklearn.ensemble import RandomForestClassifier from sklearn.pipeline import Pipeline, FeatureUnion from sklearn.compose import ColumnTransformer from sklearn.impute import SimpleImpute...
42.629921
152
0.634281
0
0
0
0
0
0
0
0
1,473
0.272072
f614a355b5c9fc85356cc143f4b8958e225a2420
9,315
py
Python
evaluation.py
Sockeye-Project/decl-power-seq
b3eed4b7abfdac647b8ff7653806665436e3e54d
[ "MIT" ]
null
null
null
evaluation.py
Sockeye-Project/decl-power-seq
b3eed4b7abfdac647b8ff7653806665436e3e54d
[ "MIT" ]
null
null
null
evaluation.py
Sockeye-Project/decl-power-seq
b3eed4b7abfdac647b8ff7653806665436e3e54d
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 import argparse import random import timeit import copy from sequence_generation import State_Search_Flags, Topology, topological_sort from enzian_descriptions import enzian_nodes, enzian_wires, enzian_nodes_EVAL3 problems = [ ("p1", {"cpu" : "POWERED_ON", "fpga": "POWERED_ON"}, {"vdd_ddr...
45.661765
198
0.620183
0
0
0
0
0
0
0
0
2,738
0.293935
f614d1aa5bffc66394d94ec1d27b271cbd750435
3,647
py
Python
venv/Lib/site-packages/gensim/test/test_probability_estimation.py
arnoyu-hub/COMP0016miemie
59af664dcf190eab4f93cefb8471908717415fea
[ "MIT" ]
null
null
null
venv/Lib/site-packages/gensim/test/test_probability_estimation.py
arnoyu-hub/COMP0016miemie
59af664dcf190eab4f93cefb8471908717415fea
[ "MIT" ]
null
null
null
venv/Lib/site-packages/gensim/test/test_probability_estimation.py
arnoyu-hub/COMP0016miemie
59af664dcf190eab4f93cefb8471908717415fea
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Automated tests for probability estimation algorithms in the probability_estimation module. """ import logging import un...
35.754902
94
0.587332
3,035
0.832191
0
0
0
0
0
0
630
0.172745
f6157ffabb60051dc58e33f25b48c08c00d0742e
5,877
py
Python
src/geomm/centering.py
stxinsite/geomm
05ce2404614e3a594c5d5e059b957140f4983bc3
[ "MIT" ]
3
2018-05-01T16:26:15.000Z
2019-06-19T21:17:47.000Z
src/geomm/centering.py
stxinsite/geomm
05ce2404614e3a594c5d5e059b957140f4983bc3
[ "MIT" ]
null
null
null
src/geomm/centering.py
stxinsite/geomm
05ce2404614e3a594c5d5e059b957140f4983bc3
[ "MIT" ]
1
2021-09-28T15:17:16.000Z
2021-09-28T15:17:16.000Z
import numpy as np from geomm.centroid import centroid def center(coords, center_point): """Center coordinates at the origin based on a center point. If idxs are given the center of mass is computed only from those coordinates and if weights are given a weighted center of mass is computed. Param...
31.095238
90
0.680619
0
0
0
0
0
0
0
0
3,846
0.654416
f61742ad1e6b7bd4951030a62b2c0b4b421ab907
4,082
py
Python
xigt/exporters/itsdb.py
lizcconrad/xigt
2fd3e107dc2b5e8bf6fa4e6b13cf67028ff89093
[ "MIT" ]
null
null
null
xigt/exporters/itsdb.py
lizcconrad/xigt
2fd3e107dc2b5e8bf6fa4e6b13cf67028ff89093
[ "MIT" ]
null
null
null
xigt/exporters/itsdb.py
lizcconrad/xigt
2fd3e107dc2b5e8bf6fa4e6b13cf67028ff89093
[ "MIT" ]
null
null
null
import logging from os.path import isfile, join as pjoin from os import environ try: from delphin import tsdb except ImportError: raise ImportError( 'Could not import pyDelphin module. Get it from here:\n' ' https://github.com/goodmami/pydelphin' ) # ECC 2021-07-26: the lambda for i-comm...
40.415842
316
0.638902
0
0
0
0
0
0
0
0
2,061
0.5049
f6185b7b68831ed7849329b53e5d282146c91eaa
1,072
py
Python
spectrum_test.py
PeiKaLunCi/rectangular_RIE
29afdde1798ac8c4fb5f162c2033269ac18e1583
[ "MIT" ]
2
2022-03-19T08:07:00.000Z
2022-03-22T08:35:06.000Z
spectrum_test.py
PeiKaLunCi/rectangular_RIE
29afdde1798ac8c4fb5f162c2033269ac18e1583
[ "MIT" ]
null
null
null
spectrum_test.py
PeiKaLunCi/rectangular_RIE
29afdde1798ac8c4fb5f162c2033269ac18e1583
[ "MIT" ]
1
2022-03-19T08:06:51.000Z
2022-03-19T08:06:51.000Z
import numpy as np import matplotlib.pyplot as plt import g_functions as g_f R1 = 2 R2 = .6 M = 500 Delta = .1 NB_POINTS = 2**10 EPSILON_IMAG = 1e-8 parameters = { 'M' : M, 'R1' : R1, 'R2' : R2, 'NB_POINTS' : NB_POINTS, 'EPSILON_IMAG' : EPSILON_IMAG, 've...
23.822222
90
0.655784
0
0
0
0
0
0
0
0
386
0.360075
f618776d83cae749bd8dfd7a18734f7ba04c9b06
1,129
py
Python
Part_2_intermediate/mod_2/lesson_2/homework_1/homework.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_2_intermediate/mod_2/lesson_2/homework_1/homework.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_2_intermediate/mod_2/lesson_2/homework_1/homework.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
# Utwórz klasy do reprezentacji Produktu, Zamówienia, Jabłek i Ziemniaków. # Stwórz po kilka obiektów typu jabłko i ziemniak i wypisz ich typ za pomocą funkcji wbudowanej type. # Stwórz listę zawierającą 5 zamówień oraz słownik, w którym kluczami będą nazwy produktów # a wartościami instancje klasy produkt. class Pr...
22.58
101
0.644818
87
0.075652
0
0
0
0
0
0
521
0.453043
f61930fbe75a973bf027da1a6d037d44481d82ff
2,625
py
Python
examples/validate_ndc.py
almarklein/visvis2
728a4b7434879d3606f32836eda3971ed73905f8
[ "BSD-2-Clause" ]
7
2019-12-20T14:15:53.000Z
2020-05-03T17:43:02.000Z
examples/validate_ndc.py
almarklein/visvis2
728a4b7434879d3606f32836eda3971ed73905f8
[ "BSD-2-Clause" ]
30
2020-02-10T08:59:30.000Z
2020-06-16T21:21:33.000Z
examples/validate_ndc.py
almarklein/visvis2
728a4b7434879d3606f32836eda3971ed73905f8
[ "BSD-2-Clause" ]
null
null
null
""" Example (and test) for the NDC coordinates. Draws a square that falls partly out of visible range. * The scene should show a band from the bottom left to the upper right. * The bottom-left (NDC -1 -1) must be green, the upper-right (NDC 1 1) blue. * The other corners must be black, cut off at exactly half way: the...
28.225806
123
0.602667
1,297
0.494095
0
0
477
0.181714
0
0
1,413
0.538286
f61a2ffd3ec4c8094b826196a15aa36e177ad663
122
py
Python
myy/accounts/admin.py
ramadevim/Travel-website
b2bec8d7ea847b5105c181fe1099bb85950dbd76
[ "MIT" ]
null
null
null
myy/accounts/admin.py
ramadevim/Travel-website
b2bec8d7ea847b5105c181fe1099bb85950dbd76
[ "MIT" ]
null
null
null
myy/accounts/admin.py
ramadevim/Travel-website
b2bec8d7ea847b5105c181fe1099bb85950dbd76
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from .models import Register admin.site.register(Register)
20.333333
32
0.811475
0
0
0
0
0
0
0
0
28
0.229508
f61b418707bd8d1c9d2bec14e8a8db0e5f4a45ab
12,572
py
Python
ipy/nuisancelib.py
chrispycheng/nuisance
4ba140b2b8760a45a594cd49451b6d4a7e1cc3db
[ "Apache-2.0" ]
null
null
null
ipy/nuisancelib.py
chrispycheng/nuisance
4ba140b2b8760a45a594cd49451b6d4a7e1cc3db
[ "Apache-2.0" ]
8
2020-06-29T13:01:22.000Z
2021-01-21T02:05:24.000Z
ipy/nuisancelib.py
chrispycheng/nuisance
4ba140b2b8760a45a594cd49451b6d4a7e1cc3db
[ "Apache-2.0" ]
1
2020-08-11T14:09:25.000Z
2020-08-11T14:09:25.000Z
import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import statsmodels.api as sm import datetime as dt from statsmodels.stats.multitest import fdrcorrection from pylab import savefig # FUNCTIONS YOU CAN USE: # analyses(filepath) spits out a nifty heatmap to let you check ...
35.817664
124
0.613427
0
0
0
0
0
0
0
0
4,849
0.385698
f61b72c600c72677f6d1712bc62795a8c1da3213
7,482
py
Python
tests/test_config_defaults.py
nmichlo/eunomia
5c6ef13b5af5335d4437867953b5eaa872ac56bb
[ "MIT" ]
3
2021-02-07T17:55:46.000Z
2021-02-15T11:58:36.000Z
tests/test_config_defaults.py
nmichlo/eunomia
5c6ef13b5af5335d4437867953b5eaa872ac56bb
[ "MIT" ]
null
null
null
tests/test_config_defaults.py
nmichlo/eunomia
5c6ef13b5af5335d4437867953b5eaa872ac56bb
[ "MIT" ]
null
null
null
import pytest from eunomia.config._default import Default from eunomia.config.nodes import ConfigNode from tests.test_backend_obj import _make_config_group # ========================================================================= # # Test YAML & Custom Tags # # ===...
66.212389
189
0.62911
0
0
0
0
0
0
0
0
2,838
0.37931
f61ba368dd6ce3592ab58a543cda6b7e4d14ce8d
3,499
py
Python
rj_gameplay/stp/coordinator.py
RoboJackets/robocup-software
ae2920b8b98213e625d0565dd67005e7a8595fac
[ "Apache-2.0" ]
200
2015-01-26T01:45:34.000Z
2022-03-19T13:05:31.000Z
rj_gameplay/stp/coordinator.py
RoboJackets/robocup-software
ae2920b8b98213e625d0565dd67005e7a8595fac
[ "Apache-2.0" ]
1,254
2015-01-03T01:57:35.000Z
2022-03-16T06:32:21.000Z
rj_gameplay/stp/coordinator.py
RoboJackets/robocup-software
ae2920b8b98213e625d0565dd67005e7a8595fac
[ "Apache-2.0" ]
206
2015-01-21T02:03:18.000Z
2022-02-01T17:57:46.000Z
"""This module contains the implementation of the coordinator.""" from typing import Any, Dict, Optional, Type, List, Callable import stp.play import stp.rc as rc import stp.role.assignment as assignment import stp.situation import stp.skill from rj_msgs import msg NUM_ROBOTS = 16 class Coordinator: """The coor...
36.447917
98
0.654473
3,212
0.917977
0
0
0
0
0
0
1,053
0.300943
f61c2aa8d4b0c6d527e4128c6b11bb2329c17ab9
651
py
Python
apf/core/templates/step/package/step.py
alercebroker/APF
d71cec49ee7f4a1667210b70c48501d036d5c08b
[ "MIT" ]
2
2020-03-12T17:27:11.000Z
2020-05-28T21:21:51.000Z
apf/core/templates/step/package/step.py
alercebroker/APF
d71cec49ee7f4a1667210b70c48501d036d5c08b
[ "MIT" ]
15
2019-11-25T19:51:39.000Z
2022-03-04T19:00:31.000Z
apf/core/templates/step/package/step.py
alercebroker/APF
d71cec49ee7f4a1667210b70c48501d036d5c08b
[ "MIT" ]
2
2020-06-21T07:55:58.000Z
2022-02-08T11:09:05.000Z
from apf.core.step import GenericStep import logging class {{step_name}}(GenericStep): """{{step_name}} Description Parameters ---------- consumer : GenericConsumer Description of parameter `consumer`. **step_args : type Other args passed to step (DB connections, API requests, etc...
26.04
87
0.560676
0
0
0
0
0
0
0
0
334
0.513057
f61d22ab24870ca8c56c224b5de2063d76fef120
5,107
py
Python
NLPFeatures.py
Nik0l/UTemPr
cc8c64dd01910194d1f18530a687595dceff30df
[ "MIT" ]
2
2016-02-24T19:36:12.000Z
2017-08-04T07:46:06.000Z
NLPFeatures.py
Nik0l/UTemPr
cc8c64dd01910194d1f18530a687595dceff30df
[ "MIT" ]
1
2016-03-03T09:18:07.000Z
2016-03-03T09:18:07.000Z
NLPFeatures.py
Nik0l/UTemPr
cc8c64dd01910194d1f18530a687595dceff30df
[ "MIT" ]
2
2017-04-18T09:56:30.000Z
2019-11-22T01:40:10.000Z
__author__ = 'nb254' #requires question_title_length.csv for processing: TITLE, BODY, POSTID, USERID import nltk, csv import pandas as pd import Features as features #test = "<p>I have an original Arduino UNO R3 that I bought and an <a href='http://arduino.cc/en/Main/ArduinoBoardSerialSingleSided3' rel='nofollow'>Ardui...
45.598214
1,568
0.649305
0
0
0
0
0
0
0
0
2,693
0.527315
f61e64e60bae831530e8e51ff7a2f490426146d5
4,925
py
Python
Linux/.local/share/ulauncher/extensions/com.github.ulauncher.ulauncher-kill/main.py
altdx/dotfiles
ff058d343fc2c247f6cb3dfa53edd43f36c279cd
[ "MIT" ]
null
null
null
Linux/.local/share/ulauncher/extensions/com.github.ulauncher.ulauncher-kill/main.py
altdx/dotfiles
ff058d343fc2c247f6cb3dfa53edd43f36c279cd
[ "MIT" ]
null
null
null
Linux/.local/share/ulauncher/extensions/com.github.ulauncher.ulauncher-kill/main.py
altdx/dotfiles
ff058d343fc2c247f6cb3dfa53edd43f36c279cd
[ "MIT" ]
null
null
null
import os import logging import gi gi.require_version('Gtk', '3.0') gi.require_version('Notify', '0.7') from locale import atof, setlocale, LC_NUMERIC from gi.repository import Notify from itertools import islice from subprocess import check_output, check_call, CalledProcessError from ulauncher.api.client.Extension i...
38.476563
120
0.596954
3,398
0.689949
1,671
0.339289
0
0
0
0
552
0.112081
f61eff0aa27ea8fbb3e6d4a3ba4c910c4db8c5f0
2,037
py
Python
toutiao-backend/toutiao/resources/user/profile.py
weiyunfei520/toutiao
f1fdb4dd88aff0f67d11e19b13bd1a90a26ac642
[ "MIT" ]
null
null
null
toutiao-backend/toutiao/resources/user/profile.py
weiyunfei520/toutiao
f1fdb4dd88aff0f67d11e19b13bd1a90a26ac642
[ "MIT" ]
null
null
null
toutiao-backend/toutiao/resources/user/profile.py
weiyunfei520/toutiao
f1fdb4dd88aff0f67d11e19b13bd1a90a26ac642
[ "MIT" ]
null
null
null
from flask import current_app from flask import g from flask import request from flask_restful.reqparse import RequestParser from flask_restful import Resource from models import db from models.user import User from utils.decorators import login_required from utils.parser import image_file from utils.storage import up...
31.338462
86
0.634757
1,906
0.835598
0
0
0
0
0
0
700
0.306883
f620b14338e61be682d35b0543506d9c7f9a1c6d
905
py
Python
manim/utils/unit.py
PhotonSpheres/manim
7399c24b33095e29633fd75460d13eae5703cba9
[ "MIT" ]
9,497
2020-05-19T04:05:51.000Z
2022-03-31T19:00:02.000Z
manim/utils/unit.py
PhotonSpheres/manim
7399c24b33095e29633fd75460d13eae5703cba9
[ "MIT" ]
2,052
2020-05-19T03:35:26.000Z
2022-03-31T16:18:06.000Z
manim/utils/unit.py
PhotonSpheres/manim
7399c24b33095e29633fd75460d13eae5703cba9
[ "MIT" ]
1,016
2020-05-20T01:16:11.000Z
2022-03-30T16:47:14.000Z
"""Implement the Unit class.""" import numpy as np from .. import config, constants __all__ = ["Pixels", "Degrees", "Munits", "Percent"] class _PixelUnits: def __mul__(self, val): return val * config.frame_width / config.pixel_width def __rmul__(self, val): return val * config.frame_width ...
24.459459
70
0.653039
694
0.766851
0
0
0
0
0
0
96
0.106077
f6228da345431023f7834e4201a3bb44d8f2ebe1
112
py
Python
backend/auth_app/serializers/__init__.py
nitinmehra/TodoApp
e1e8938330df6b59b8b064ac1a2dde61744d8392
[ "MIT" ]
null
null
null
backend/auth_app/serializers/__init__.py
nitinmehra/TodoApp
e1e8938330df6b59b8b064ac1a2dde61744d8392
[ "MIT" ]
null
null
null
backend/auth_app/serializers/__init__.py
nitinmehra/TodoApp
e1e8938330df6b59b8b064ac1a2dde61744d8392
[ "MIT" ]
null
null
null
from .auth_serializer import MyTokenObtainPairSerializer from .register_serializer import UserRegisterSerializer
56
56
0.919643
0
0
0
0
0
0
0
0
0
0
f6232a7604d0160345749d0571f7cdfb8e44d3c3
3,137
py
Python
src/sensors.py
andrew-chang-dewitt/rpi-pir2mqtt-docker
3da860fed40cd0ec7395ac4864e38d5eb38e0634
[ "MIT" ]
1
2020-04-13T13:20:50.000Z
2020-04-13T13:20:50.000Z
src/sensors.py
andrew-chang-dewitt/rpi-security-gpio2mqtt
3da860fed40cd0ec7395ac4864e38d5eb38e0634
[ "MIT" ]
17
2020-01-31T21:07:31.000Z
2020-02-11T15:16:58.000Z
src/sensors.py
andrew-chang-dewitt/rpi-security-gpio2mqtt
3da860fed40cd0ec7395ac4864e38d5eb38e0634
[ "MIT" ]
null
null
null
"""A module for defining Sensor types. Classes: Sensor -- Base Sensor class, all unknown types default to this. MotionSensor -- Subclass of Sensor, for HC-SR501 type PIR sensors. ReedSwitch -- Subclass of Sensor, for basic door/window reed switches. Functions: build_sensor -- Build & return a ...
31.37
79
0.634364
2,256
0.719158
0
0
356
0.113484
0
0
1,975
0.629582
f62464c4d4e238629f145959573630850492be9a
1,940
py
Python
main.py
TwoShock/Graphics-Card-Web-Scraper
7161a63dca103826906388c61dbaecaff2f73238
[ "MIT" ]
null
null
null
main.py
TwoShock/Graphics-Card-Web-Scraper
7161a63dca103826906388c61dbaecaff2f73238
[ "MIT" ]
null
null
null
main.py
TwoShock/Graphics-Card-Web-Scraper
7161a63dca103826906388c61dbaecaff2f73238
[ "MIT" ]
null
null
null
from urllib.request import urlopen from bs4 import BeautifulSoup as soup import re import pandas as pd def getContainerInfo(container): name = container.img['title'] itemInfo = container.find('div',class_='item-info') itemBranding = itemInfo.find('div',class_ = 'item-branding') brandName = itemBranding...
40.416667
135
0.655155
0
0
0
0
0
0
0
0
400
0.206186
f62731a6aa290c859ecde18b54feaa791a6e0a5d
1,228
py
Python
python/qisrc/actions/checkout.py
aldebaran/qibuild
efea6fa3744664348717fe5e8df708a3cf392072
[ "BSD-3-Clause" ]
51
2015-01-05T14:35:13.000Z
2021-07-27T06:46:59.000Z
python/qisrc/actions/checkout.py
aldebaran/qibuild
efea6fa3744664348717fe5e8df708a3cf392072
[ "BSD-3-Clause" ]
104
2015-04-09T10:48:42.000Z
2020-09-16T16:33:29.000Z
python/qisrc/actions/checkout.py
aldebaran/qibuild
efea6fa3744664348717fe5e8df708a3cf392072
[ "BSD-3-Clause" ]
46
2015-01-05T14:35:16.000Z
2022-02-13T20:39:36.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved. # Use of this source code is governed by a BSD-style license (see the COPYING file). """ Change the branch of the manifest Also, checkout the correct branch for every git project in the worktree """ from __fu...
31.487179
84
0.717427
0
0
0
0
0
0
0
0
453
0.368893
f62827a67ce6f1302ffe03104ae4a729a1a0c806
961
py
Python
experiments/calc_avg_bohb_time.py
automl/learning_environments
c1c7cec4506ba140b19c215f4bf7a8bd222b32a0
[ "MIT" ]
11
2021-02-06T15:26:12.000Z
2022-03-05T11:24:17.000Z
experiments/calc_avg_bohb_time.py
automl/learning_environments
c1c7cec4506ba140b19c215f4bf7a8bd222b32a0
[ "MIT" ]
2
2022-02-10T00:01:37.000Z
2022-03-12T01:07:59.000Z
experiments/calc_avg_bohb_time.py
automl/learning_environments
c1c7cec4506ba140b19c215f4bf7a8bd222b32a0
[ "MIT" ]
1
2022-03-14T02:37:48.000Z
2022-03-14T02:37:48.000Z
import statistics import hpbandster.core.result as hpres # smallest value is best -> reverse_loss = True # largest value is best -> reverse_loss = False REVERSE_LOSS = True EXP_LOSS = 1 OUTLIER_PERC_WORST = 0.1 OUTLIER_PERC_BEST = 0.0 def analyze_bohb(log_dir): # load the example run from the log files res...
25.972973
102
0.680541
0
0
0
0
0
0
0
0
304
0.316337
f62b330cff46dc5c4c549afab05c1b96b01df850
2,926
py
Python
radio/preprocessing/augmented_batch.py
dmitrysarov/radio-1
c0162e7e2f39018d6ca8cf7d8ef2e37c22dd40fc
[ "Apache-2.0" ]
null
null
null
radio/preprocessing/augmented_batch.py
dmitrysarov/radio-1
c0162e7e2f39018d6ca8cf7d8ef2e37c22dd40fc
[ "Apache-2.0" ]
null
null
null
radio/preprocessing/augmented_batch.py
dmitrysarov/radio-1
c0162e7e2f39018d6ca8cf7d8ef2e37c22dd40fc
[ "Apache-2.0" ]
null
null
null
""" Contains CTImagesAugmentedBatch: masked ct-batch with some augmentation actions """ import numpy as np from .ct_masked_batch import CTImagesMaskedBatch from ..dataset.dataset import action, Sampler # pylint: disable=no-name-in-module from .mask import insert_cropped class CTImagesAugmentedBatch(CTImagesMaskedBa...
37.512821
115
0.598086
2,650
0.905673
0
0
2,461
0.84108
0
0
1,459
0.498633
f62d98d9378ef48e987146d478ae9033a3dcf113
9,155
py
Python
tf2/ThickCylinder_DEM.py
ISM-Weimar/DeepEnergyMethods
3a51131e0827446bf5986d698aaac396c7fa5037
[ "MIT" ]
15
2019-09-11T01:35:03.000Z
2022-03-25T03:17:59.000Z
tf2/ThickCylinder_DEM.py
ISM-Weimar/DeepEnergyMethods
3a51131e0827446bf5986d698aaac396c7fa5037
[ "MIT" ]
2
2020-10-16T19:06:07.000Z
2022-01-06T16:23:49.000Z
tf2/ThickCylinder_DEM.py
ISM-Weimar/DeepEnergyMethods
3a51131e0827446bf5986d698aaac396c7fa5037
[ "MIT" ]
15
2019-09-11T01:35:05.000Z
2022-02-18T21:18:55.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 2D linear elasticity example Solve the equilibrium equation -\nabla \cdot \sigma(x) = f(x) for x\in\Omega with the strain-displacement equation: \epsilon = 1/2(\nabla u + \nabla u^T) and the constitutive law: \sigma = 2*\mu*\epsilon + \lambda*(\nabla\cdot u)I,...
37.830579
103
0.72343
642
0.070126
0
0
286
0.03124
0
0
2,975
0.324959
f62fd3c1a6c3577c375970042756089fd3f9e611
1,224
py
Python
src/trw/utils/clamp_n.py
civodlu/trw
b9a1cf045f61d6df9c65c014ef63b4048972dcdc
[ "MIT" ]
3
2019-07-04T01:20:41.000Z
2020-01-27T02:36:12.000Z
src/trw/utils/clamp_n.py
civodlu/trw
b9a1cf045f61d6df9c65c014ef63b4048972dcdc
[ "MIT" ]
null
null
null
src/trw/utils/clamp_n.py
civodlu/trw
b9a1cf045f61d6df9c65c014ef63b4048972dcdc
[ "MIT" ]
2
2020-10-19T13:46:06.000Z
2021-12-27T02:18:10.000Z
from typing import Sequence, Any import torch def clamp_n(tensor: torch.Tensor, min_values: Sequence[Any], max_values: Sequence[Any]) -> torch.Tensor: """ Clamp a tensor with axis dependent values. Args: tensor: a N-d torch.Tensor min_values: a 1D torch.Tensor. Min value is axis dependent...
37.090909
104
0.660131
0
0
0
0
0
0
0
0
631
0.515523
f6300d71500ac859671e30287246eb5ec27f0524
437
py
Python
bin2dec.py
Alba3k/BinToDec
4a4874b40cdd69b732532308484eeb976e158d35
[ "MIT" ]
null
null
null
bin2dec.py
Alba3k/BinToDec
4a4874b40cdd69b732532308484eeb976e158d35
[ "MIT" ]
null
null
null
bin2dec.py
Alba3k/BinToDec
4a4874b40cdd69b732532308484eeb976e158d35
[ "MIT" ]
null
null
null
def bin2dec(binNumber): decNumber = 0 index = 1 binNumber = binNumber[::-1] for i in binNumber: number = int(i) * index decNumber = decNumber + number index = index * 2 return decNumber print('ВВЕДИТЕ ДВОИЧНОЕ 8-БИТНОЕ ЧИСЛО') binNumber = input('>') if len(binNumber) != 8: print('ВВЕДИТЕ ПРАВИЛЬНОЕ 8-БИТН...
23
43
0.71167
0
0
0
0
0
0
0
0
188
0.362235
f6302daf57e1897d3b623be1dae10ac2892a5ddb
1,227
py
Python
taskmanager/src/modules/tasks/domain/task.py
acostapazo/event-manager
614c91af19fad39f766ffa1b9a3d1e783f06c72e
[ "MIT" ]
null
null
null
taskmanager/src/modules/tasks/domain/task.py
acostapazo/event-manager
614c91af19fad39f766ffa1b9a3d1e783f06c72e
[ "MIT" ]
1
2020-04-20T11:20:22.000Z
2020-04-20T11:20:22.000Z
taskmanager/src/modules/tasks/domain/task.py
acostapazo/event-manager
614c91af19fad39f766ffa1b9a3d1e783f06c72e
[ "MIT" ]
null
null
null
from typing import Any, Dict from meiga import Result, Error, Success from petisco import AggregateRoot from datetime import datetime from taskmanager.src.modules.tasks.domain.description import Description from taskmanager.src.modules.tasks.domain.events import TaskCreated from taskmanager.src.modules.tasks.domain.t...
31.461538
81
0.682967
822
0.669927
0
0
216
0.176039
0
0
41
0.033415
f630f6ea5762c04cfcd310931e443ab55f0888fb
4,085
py
Python
CSD_API/get_from_author.py
andrewtarzia/cage_collect
e5e68dc23ec197eceff3b56de6725d996730b8ac
[ "MIT" ]
null
null
null
CSD_API/get_from_author.py
andrewtarzia/cage_collect
e5e68dc23ec197eceff3b56de6725d996730b8ac
[ "MIT" ]
null
null
null
CSD_API/get_from_author.py
andrewtarzia/cage_collect
e5e68dc23ec197eceff3b56de6725d996730b8ac
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Distributed under the terms of the MIT License. """ Script to search for and collect CIFs using a list of authors. Author: Andrew Tarzia Date Created: 1 Mar 2019 """ import ccdc.search import sys import CSD_f def write_entry(file, author, number, DOI, CSD, solvent,...
28.566434
68
0.520685
0
0
0
0
0
0
0
0
1,315
0.321909
f6316922d218565500b02ad1c78331fdf583ec07
641
py
Python
src/datastructure/stacks_ex1.py
Valeeswaran/tutorials
71b43cad46f4d7d2d67d3ff4be61bdaaade2a36a
[ "MIT" ]
null
null
null
src/datastructure/stacks_ex1.py
Valeeswaran/tutorials
71b43cad46f4d7d2d67d3ff4be61bdaaade2a36a
[ "MIT" ]
null
null
null
src/datastructure/stacks_ex1.py
Valeeswaran/tutorials
71b43cad46f4d7d2d67d3ff4be61bdaaade2a36a
[ "MIT" ]
null
null
null
import stacks1 def is_match(ch1, ch2): match_dict = { ")": "(", "]": "[", "}": "{" } return match_dict[ch1] == ch2 def is_balanced(s): stack = stacks1.Stack() for ch in s: if ch == '(' or ch == '{' or ch == '[': stack.push(ch) if ch == ')' or...
20.677419
47
0.447738
0
0
0
0
0
0
0
0
82
0.127925
f631fd5dc1a814f372da186dbc180a4eadeb0274
2,100
py
Python
recommend.py
Srini96/Market-Basket-Analysis-with-Customer-Profiling-and-Exploratory-Analysis-using-Python
293291157a4d91c217c4008e058e01b1b930b923
[ "MIT" ]
1
2021-02-01T02:15:48.000Z
2021-02-01T02:15:48.000Z
recommend.py
Srini96/Market-Basket-Analysis-with-Customer-Profiling-and-Exploratory-Analysis-using-Python
293291157a4d91c217c4008e058e01b1b930b923
[ "MIT" ]
null
null
null
recommend.py
Srini96/Market-Basket-Analysis-with-Customer-Profiling-and-Exploratory-Analysis-using-Python
293291157a4d91c217c4008e058e01b1b930b923
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu May 3 18:30:29 2018 @author: Koushik """ import pandas as pd from IPython.display import display import sys # -*- coding: utf-8 -*- """ Created on Sun Apr 29 19:04:35 2018 @author: Koushik """ #Python 2.x program for Speech Recognition import re #ent...
30.882353
91
0.7
0
0
0
0
0
0
0
0
1,298
0.618095
f6321b2979bddd05bf08689d0cd5e7faac1097ef
584
py
Python
image_pipeline/stages/__init__.py
MarcoGlauser/image_pipeline
a33b8a64773e8a0189155ae625d3060e15fb8def
[ "MIT" ]
null
null
null
image_pipeline/stages/__init__.py
MarcoGlauser/image_pipeline
a33b8a64773e8a0189155ae625d3060e15fb8def
[ "MIT" ]
null
null
null
image_pipeline/stages/__init__.py
MarcoGlauser/image_pipeline
a33b8a64773e8a0189155ae625d3060e15fb8def
[ "MIT" ]
null
null
null
from image_pipeline.stages.crop_stage import CropStage from image_pipeline.stages.jpeg_lossless_compression import JPEGLossLessCompressionStage from image_pipeline.stages.jpeg_lossy_compression import JPEGLossyCompressionStage from image_pipeline.stages.resize_stage import ResizeStage pre_stages = [ ResizeStage, ...
27.809524
88
0.813356
0
0
0
0
0
0
0
0
71
0.121575
f634dcfcb0026b1b4daab85dd3790ec59612e959
538
py
Python
pyunitwizard/tests/test_get_form.py
dprada/pyunitwizard
dbfd0c015f9359c76e7e59a5c16ab469b86aed34
[ "MIT" ]
2
2021-07-01T14:33:58.000Z
2022-03-19T19:19:09.000Z
pyunitwizard/tests/test_get_form.py
dprada/pyunitwizard
dbfd0c015f9359c76e7e59a5c16ab469b86aed34
[ "MIT" ]
15
2021-02-11T18:54:16.000Z
2022-03-18T17:38:03.000Z
pyunitwizard/tests/test_get_form.py
dprada/pyunitwizard
dbfd0c015f9359c76e7e59a5c16ab469b86aed34
[ "MIT" ]
2
2021-06-17T18:56:02.000Z
2022-03-08T05:02:17.000Z
import pytest import pyunitwizard as puw def test_string(): puw.configure.reset() assert puw.get_form('1 meter')=='string' def test_pint_quantity(): puw.configure.reset() puw.configure.load_library(['pint']) ureg = puw.forms.api_pint.ureg q = ureg.Quantity(1.0,'meter') assert puw.get_form(...
24.454545
45
0.678439
0
0
0
0
0
0
0
0
55
0.10223
f63545e957985ca6c1cbcde078c84fd5739a594f
4,393
py
Python
package/awesome_panel/express/bootstrap/modal.py
slamer59/awesome-panel
91c30bd6d6859eadf9c65b1e143952f7e64d5290
[ "Apache-2.0" ]
179
2019-12-04T14:54:53.000Z
2022-03-30T09:08:38.000Z
package/awesome_panel/express/bootstrap/modal.py
slamer59/awesome-panel
91c30bd6d6859eadf9c65b1e143952f7e64d5290
[ "Apache-2.0" ]
62
2019-12-14T16:51:28.000Z
2022-03-19T18:47:12.000Z
package/awesome_panel/express/bootstrap/modal.py
slamer59/awesome-panel
91c30bd6d6859eadf9c65b1e143952f7e64d5290
[ "Apache-2.0" ]
35
2019-12-08T13:19:53.000Z
2022-03-25T10:33:02.000Z
"""In this module we provide the functionality of a Modal. The Modal can be used to focus some kind of information like text, images, chart or an interactive dashboard. The implementation is inspired by - https://css-tricks.com/considerations-styling-modal/ - https://codepen.io/henchmen/embed/preview/PzQ...
27.117284
99
0.572046
3,256
0.741179
0
0
1,269
0.288869
0
0
2,585
0.588436
f636a313757854652da404412374580257d3fe53
5,696
py
Python
python/paddle/distributed/fleet/meta_optimizers/fp16_allreduce_optimizer.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
17,085
2016-11-18T06:40:52.000Z
2022-03-31T22:52:32.000Z
python/paddle/distributed/fleet/meta_optimizers/fp16_allreduce_optimizer.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
29,769
2016-11-18T06:35:22.000Z
2022-03-31T16:46:15.000Z
python/paddle/distributed/fleet/meta_optimizers/fp16_allreduce_optimizer.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
4,641
2016-11-18T07:43:33.000Z
2022-03-31T15:15:02.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
38.228188
76
0.59849
4,994
0.876756
0
0
3,435
0.603055
0
0
1,309
0.22981
f636a882b94f8b074d76f3398dd62f93844dc2ba
245
py
Python
factory_djoy/__about__.py
jamescooke/factory_djoy
97cf68a068b831f2830688a91e7b143b97bc1326
[ "MIT" ]
26
2016-05-27T19:00:34.000Z
2022-02-14T14:22:20.000Z
factory_djoy/__about__.py
jamescooke/factory_djoy
97cf68a068b831f2830688a91e7b143b97bc1326
[ "MIT" ]
37
2016-05-27T18:58:51.000Z
2021-10-10T11:35:08.000Z
factory_djoy/__about__.py
jamescooke/factory_djoy
97cf68a068b831f2830688a91e7b143b97bc1326
[ "MIT" ]
null
null
null
__name__ = 'factory_djoy' __version__ = '2.2.0' __author__ = 'James Cooke' __copyright__ = '2021, {}'.format(__author__) __description__ = 'Factories for Django, creating valid model instances every time.' __email__ = 'github@jamescooke.info'
27.222222
84
0.755102
0
0
0
0
0
0
0
0
134
0.546939
f6385c22b94a6e2e267dcaa60df50ad19fa4a166
3,928
py
Python
garageofcode/sat/fifteen_puzzle.py
tpi12jwe/garageofcode
3cfaf01f6d77130bb354887e6ed9921c791db849
[ "MIT" ]
2
2020-02-11T10:32:06.000Z
2020-02-11T17:00:47.000Z
garageofcode/sat/fifteen_puzzle.py
tpi12jwe/garageofcode
3cfaf01f6d77130bb354887e6ed9921c791db849
[ "MIT" ]
null
null
null
garageofcode/sat/fifteen_puzzle.py
tpi12jwe/garageofcode
3cfaf01f6d77130bb354887e6ed9921c791db849
[ "MIT" ]
null
null
null
from collections import defaultdict from sugarrush.solver import SugarRush from garageofcode.common.utils import flatten_simple N = 3 def get_state(solver): # one-hot encoding X = [[[solver.var() for _ in range(N**2)] for _ in range(N)] for _ in range(N)] ...
30.6875
70
0.470468
0
0
0
0
0
0
0
0
629
0.160132
f639470dab223c0a61d56c8eec0fdc664b9c6792
3,435
py
Python
normalize.py
Zoomerhimmer/NT-Textual-Toolkit
c7b236972f6dcef45fd0596b06f113c503dda6d2
[ "MIT" ]
null
null
null
normalize.py
Zoomerhimmer/NT-Textual-Toolkit
c7b236972f6dcef45fd0596b06f113c503dda6d2
[ "MIT" ]
null
null
null
normalize.py
Zoomerhimmer/NT-Textual-Toolkit
c7b236972f6dcef45fd0596b06f113c503dda6d2
[ "MIT" ]
null
null
null
import re import sys import os # Lists of same characters alpha_equiv = ['Α','Ά','ά','ὰ','ά','ἀ','ἁ','ἂ','ἃ','ἄ','ἅ','ἆ','ἇ','Ἀ','Ἁ','Ἂ','Ἃ','Ἄ','Ἅ','Ἆ','Ἇ','ᾶ','Ᾰ','Ᾱ','Ὰ','Ά','ᾰ','ᾱ'] #Converts to α alpha_subscripted = ['ᾀ','ᾁ','ᾂ','ᾃ','ᾄ','ᾅ','ᾆ','ᾇ','ᾈ','ᾉ','ᾊ','ᾋ','ᾌ','ᾍ','ᾎ','ᾏ','ᾲ','ᾴ','ᾷ','ᾼ','ᾳ'] #Converts to...
43.481013
165
0.52198
0
0
0
0
0
0
0
0
1,844
0.466363
f63a003b49d1a2ecd8e8f98df7bb4d1aa0a1fd33
10,756
py
Python
tests/test_conveniences.py
CSC-DPR/eopf-cpm
6af10c0905eec876e8ab884ce62d5b74d52cb5a3
[ "Apache-2.0" ]
null
null
null
tests/test_conveniences.py
CSC-DPR/eopf-cpm
6af10c0905eec876e8ab884ce62d5b74d52cb5a3
[ "Apache-2.0" ]
171
2022-01-29T09:38:27.000Z
2022-03-30T08:17:35.000Z
tests/test_conveniences.py
CSC-DPR/eopf-cpm
6af10c0905eec876e8ab884ce62d5b74d52cb5a3
[ "Apache-2.0" ]
null
null
null
import datetime import os import sys from cmath import inf from typing import Any import hypothesis.extra.numpy as xps import hypothesis.strategies as st import numpy import pytest from hypothesis import assume, given from eopf.product.utils import ( apply_xpath, conv, convert_to_unix_time, is_date, ...
37.873239
119
0.676088
0
0
0
0
10,338
0.961138
0
0
2,487
0.23122
f63a76556115387c030b8e4755467f5a63c5c6d2
1,227
py
Python
src/controller/src/depth_hold.py
Fzeak/sauvc-2019
573dcb351d0f87f9b7605667c570a5003bedb224
[ "MIT" ]
null
null
null
src/controller/src/depth_hold.py
Fzeak/sauvc-2019
573dcb351d0f87f9b7605667c570a5003bedb224
[ "MIT" ]
null
null
null
src/controller/src/depth_hold.py
Fzeak/sauvc-2019
573dcb351d0f87f9b7605667c570a5003bedb224
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy from std_msgs.msgs import UInt16, Float32, String from mavros_msgs.msg import Mavlink from struct import pack, unpack def listener(): rospy.init_node('depth_listener', anonymous=True) pub_pressure = rospy.Publisher("depth_listener/pressure_diff", Float32, queue_size=10) pub_throt...
32.289474
87
0.740831
0
0
0
0
0
0
0
0
393
0.320293
f63af088aba40e29ad224e5c65268768345c6e09
6,354
py
Python
energy/lopy_serial_external_sd/LoPy4_sd/main.py
niclabs/water-monitoring
d18405e7536c985a400816263e80f73318e304b6
[ "Apache-2.0" ]
2
2020-05-21T03:47:12.000Z
2021-02-01T16:48:01.000Z
energy/lopy_serial_external_sd/LoPy4_sd/main.py
niclabs/water-monitoring
d18405e7536c985a400816263e80f73318e304b6
[ "Apache-2.0" ]
9
2021-03-19T16:09:25.000Z
2021-05-24T22:55:16.000Z
energy/lopy_serial_external_sd/LoPy4_sd/main.py
niclabs/water-monitoring
d18405e7536c985a400816263e80f73318e304b6
[ "Apache-2.0" ]
1
2021-01-13T14:45:14.000Z
2021-01-13T14:45:14.000Z
def get_lorawan_maximum_payload_size(dr): mac_payload_size_dic = {'0':59, '1':59, '2':59, '3':123, '4':230, '5':230, '6':230} fhdr_size = 7 #in bytes. Assuming that FOpts length is zero fport_size = 1 #in bytes frm_payload_size = mac_payload_size_dic.get(str(dr)) - fhdr_size - fport_size ret...
37.597633
125
0.586245
0
0
0
0
0
0
0
0
1,885
0.296477
f63c2ee035cc31867910d8a464ee16f8c9b19ab6
741
py
Python
forms_app/views.py
cs-fullstack-fall-2018/django-forms2-bachmanryan
e0318516f86afe99e991e6796b5e66d8b3e7a728
[ "Apache-2.0" ]
null
null
null
forms_app/views.py
cs-fullstack-fall-2018/django-forms2-bachmanryan
e0318516f86afe99e991e6796b5e66d8b3e7a728
[ "Apache-2.0" ]
null
null
null
forms_app/views.py
cs-fullstack-fall-2018/django-forms2-bachmanryan
e0318516f86afe99e991e6796b5e66d8b3e7a728
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render, redirect from .models import FormModel from datetime import datetime def index(request): form_list = FormModel.objects.all() context = {'form_list': form_list} return render(request, 'forms_app/index.html', context) def post_new(request): if request.method == "PO...
28.5
59
0.626181
0
0
0
0
0
0
0
0
68
0.091768
f63c8b35a69bb35bff0b3baecdbc71a71d1a0a8f
342
py
Python
figurefirst/__init__.py
clbarnes/figurefirst
ed38e246a96f28530bf663eb6920da1c3ccee610
[ "MIT" ]
1
2020-05-07T01:17:51.000Z
2020-05-07T01:17:51.000Z
figurefirst/__init__.py
clbarnes/figurefirst
ed38e246a96f28530bf663eb6920da1c3ccee610
[ "MIT" ]
1
2020-05-07T01:25:27.000Z
2020-05-28T08:10:19.000Z
figurefirst/__init__.py
clbarnes/figurefirst
ed38e246a96f28530bf663eb6920da1c3ccee610
[ "MIT" ]
null
null
null
from . import svg_to_axes #reload(svg_to_axes) from . import mpl_functions from .svg_to_axes import FigureLayout from . import mpl_fig_to_figurefirst_svg from . import svg_util from . import deprecated_regenerate import sys if sys.version_info[0] > 2: # regenerate uses importlib.utils, which requires python 3? fro...
28.5
87
0.804094
0
0
0
0
0
0
0
0
79
0.230994
f63eceb66bf981ddf69e6d539baa4da5ebac9226
3,152
py
Python
dedsecuritybot.py
dedsecurity/DedSecuritySearch
294e2e1ed9254499fecc3db7b419f283027361fa
[ "MIT" ]
null
null
null
dedsecuritybot.py
dedsecurity/DedSecuritySearch
294e2e1ed9254499fecc3db7b419f283027361fa
[ "MIT" ]
null
null
null
dedsecuritybot.py
dedsecurity/DedSecuritySearch
294e2e1ed9254499fecc3db7b419f283027361fa
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- import tensorflow as tf import numpy as np import pandas as pd import json import nltk from tensorflow.keras.preprocessing.text import Tokenizer from tensorflow.keras.layers import Input, Embedding, LSTM , Dense,GlobalMaxPooling1D,Flatten from tensorflow.keras.preprocessing.s...
30.901961
114
0.745876
0
0
0
0
0
0
0
0
399
0.126586
f641186c18365ae96c79dd45058d2e7e2b96430d
5,069
py
Python
tests/html/inline_builder_test.py
a-pompom/Python-markdownParser
2525ba9c25dc3f77fb70af4ba9af423114940077
[ "MIT" ]
null
null
null
tests/html/inline_builder_test.py
a-pompom/Python-markdownParser
2525ba9c25dc3f77fb70af4ba9af423114940077
[ "MIT" ]
29
2021-07-25T02:06:16.000Z
2022-03-20T10:55:16.000Z
tests/html/inline_builder_test.py
a-pompom/Python-markdownParser
2525ba9c25dc3f77fb70af4ba9af423114940077
[ "MIT" ]
null
null
null
import pytest from app.html.inline_builder import InlineBuilder, LinkBuilder, CodeBuilder, ImageBuilder from app.markdown.inline_parser import InlineParser, LinkParser, CodeParser, ImageParser from app.settings import setting class TestInlineBuilder: """ Inline要素からHTML文字列が得られるか検証 """ # HTML組み立て @pytest....
29.300578
102
0.50582
5,126
0.955452
0
0
4,488
0.836533
0
0
1,944
0.362349
f6414d22c3496a2fc287bc2eb9d1d63bb35b880e
5,728
py
Python
lab8/src/main.py
YaelBenShalom/Intro-to-AI
37df1fc9316544338b8acfa5264316c4d5ce5915
[ "MIT" ]
null
null
null
lab8/src/main.py
YaelBenShalom/Intro-to-AI
37df1fc9316544338b8acfa5264316c4d5ce5915
[ "MIT" ]
null
null
null
lab8/src/main.py
YaelBenShalom/Intro-to-AI
37df1fc9316544338b8acfa5264316c4d5ce5915
[ "MIT" ]
null
null
null
import common import student_code import array class bcolors: RED = "\x1b[31m" GREEN = "\x1b[32m" NORMAL = "\x1b[0m" def read_data(training_data, test_data1, gold_data1, filename): data = array.array('f') test = array.array('f') with open(filename, 'rb') as fd: data....
36.025157
86
0.622905
84
0.014665
0
0
0
0
0
0
848
0.148045
f64190e807ca83a7c40b302396ec9aa0416a19ee
7,670
py
Python
webapp/api/Model/basic.py
SCcagg5/My_Youtube
6234b655ceb18a85d9bdd2c5837ce625c495d07b
[ "MIT" ]
3
2020-05-16T19:24:42.000Z
2020-09-26T17:05:19.000Z
webapp/api/Model/basic.py
SCcagg5/My_Youtube
6234b655ceb18a85d9bdd2c5837ce625c495d07b
[ "MIT" ]
30
2020-05-16T16:01:17.000Z
2020-10-08T23:05:08.000Z
webapp/api/Model/basic.py
SCcagg5/My_Youtube
6234b655ceb18a85d9bdd2c5837ce625c495d07b
[ "MIT" ]
null
null
null
from bottle import request, response, HTTPResponse import os, datetime, re import json as JSON import jwt class auth: def gettoken(mypass): secret = str(os.getenv('API_SCRT', '!@ws4RT4ws212@#%')) password = str(os.getenv('API_PASS', 'password')) if mypass == password: ...
32.638298
104
0.484876
7,541
0.983181
0
0
0
0
0
0
899
0.11721
f6429da6a835c587318716d02c57de897093290c
304
py
Python
data_sniffer/urls.py
thefedoration/django-data-sniffer
c691dbf42e69d6190ab8fb4fe3bfc3cb646716f3
[ "MIT" ]
null
null
null
data_sniffer/urls.py
thefedoration/django-data-sniffer
c691dbf42e69d6190ab8fb4fe3bfc3cb646716f3
[ "MIT" ]
null
null
null
data_sniffer/urls.py
thefedoration/django-data-sniffer
c691dbf42e69d6190ab8fb4fe3bfc3cb646716f3
[ "MIT" ]
null
null
null
from django.conf.urls import include, url from django.conf import settings from .views import data_sniffer_health_check if settings.DATA_SNIFFER_ENABLED: urlpatterns = [ url(r'^(?P<key>[-\w]+)', data_sniffer_health_check, name="data_sniffer_health_check"), ] else: urlpatterns = []
25.333333
94
0.726974
0
0
0
0
0
0
0
0
46
0.151316
f642c7514997e4f67f9ec1097b2c4722eab6d372
2,430
py
Python
crtauth/client.py
spotify/crtauth
5df8960f81f0c3a7ae3119b59221390707749cac
[ "Apache-2.0" ]
90
2015-01-30T16:19:38.000Z
2022-03-26T17:53:03.000Z
crtauth/client.py
spotify/crtauth
5df8960f81f0c3a7ae3119b59221390707749cac
[ "Apache-2.0" ]
14
2015-04-23T08:08:00.000Z
2020-09-29T12:15:04.000Z
crtauth/client.py
spotify/crtauth
5df8960f81f0c3a7ae3119b59221390707749cac
[ "Apache-2.0" ]
20
2015-01-25T07:02:18.000Z
2022-03-19T10:23:21.000Z
# Copyright (c) 2011-2017 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
33.75
78
0.702058
0
0
0
0
0
0
0
0
1,015
0.417695
f643843dc611bf1e9914238b418113f9bed6e4cd
836
py
Python
editor/api/terminal/endpoints/terminal.py
dporr/skf-editor
51b660d1356f283629a7f9e9121fa948830b5579
[ "MIT" ]
3
2021-08-23T16:32:21.000Z
2021-09-04T02:40:59.000Z
editor/api/terminal/endpoints/terminal.py
dporr/skf-editor
51b660d1356f283629a7f9e9121fa948830b5579
[ "MIT" ]
null
null
null
editor/api/terminal/endpoints/terminal.py
dporr/skf-editor
51b660d1356f283629a7f9e9121fa948830b5579
[ "MIT" ]
1
2021-07-08T13:40:01.000Z
2021-07-08T13:40:01.000Z
from flask import request from flask_restplus import Resource from editor.api.terminal.business import get_terminal_output from editor.api.terminal.serializers import terminal_response, terminal_cmd from editor.api.restplus import api ns = api.namespace('terminal', description='Operations related to terminal') @ns.ro...
34.833333
76
0.720096
419
0.501196
0
0
522
0.624402
0
0
195
0.233254
f64680efdbc765125c942cd42b9be9b6e892d55e
400
py
Python
mediumwave/migrations/0011_transmitter_iso.py
soundelec/mwradio
b1a7f6d8c24469c13c5336e292cc316980fdea2d
[ "BSD-3-Clause" ]
null
null
null
mediumwave/migrations/0011_transmitter_iso.py
soundelec/mwradio
b1a7f6d8c24469c13c5336e292cc316980fdea2d
[ "BSD-3-Clause" ]
null
null
null
mediumwave/migrations/0011_transmitter_iso.py
soundelec/mwradio
b1a7f6d8c24469c13c5336e292cc316980fdea2d
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 2.1.2 on 2018-10-19 14:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mediumwave', '0010_auto_20181017_1937'), ] operations = [ migrations.AddField( model_name='transmitter', name='iso',...
21.052632
61
0.605
307
0.7675
0
0
0
0
0
0
102
0.255
f647836ba9f9d26035e89229613150a256f9838c
953
py
Python
3_MapReduce Programming on MovieLens Data/solution/MapReduce/code/userReducer.py
minakoyang/YY_Distributed_Cluster_Computing
0284569e4a6d0312590acf9ead5cf23bbcd167c9
[ "MIT" ]
null
null
null
3_MapReduce Programming on MovieLens Data/solution/MapReduce/code/userReducer.py
minakoyang/YY_Distributed_Cluster_Computing
0284569e4a6d0312590acf9ead5cf23bbcd167c9
[ "MIT" ]
null
null
null
3_MapReduce Programming on MovieLens Data/solution/MapReduce/code/userReducer.py
minakoyang/YY_Distributed_Cluster_Computing
0284569e4a6d0312590acf9ead5cf23bbcd167c9
[ "MIT" ]
null
null
null
#!/usr/bin/env python import sys import csv import json mostRatingUser = None mostRatingCount = 0 mostRatingInfo = None for line in sys.stdin: line = line.strip() user, genreString = line.split("\t", 1) genreInfo = json.loads(genreString) if not mostRatingUser or len(genreInfo) > mostRatingCount: ...
25.078947
135
0.672613
0
0
0
0
0
0
0
0
109
0.114376
f64788dcdb43c2e6980587df505c8707237a9135
2,901
py
Python
src/MockingBirdOnlyForUse/logger.py
Diaosi1111/MockingBirdOnlyForUse
243092621eff36c13418e2648b3909bed6b1ae2d
[ "MIT" ]
null
null
null
src/MockingBirdOnlyForUse/logger.py
Diaosi1111/MockingBirdOnlyForUse
243092621eff36c13418e2648b3909bed6b1ae2d
[ "MIT" ]
null
null
null
src/MockingBirdOnlyForUse/logger.py
Diaosi1111/MockingBirdOnlyForUse
243092621eff36c13418e2648b3909bed6b1ae2d
[ "MIT" ]
null
null
null
import logging import os import sys import time LOG_LEVEL = logging.INFO OPEN_CONSOLE_LOG = True OPEN_FILE_LOG = False LOG_FILE_PATH = None LOG_NAME = "null" ############################################################################################################### # 初始化日志 def _create_logger( level=LOG_LE...
25.226087
111
0.541537
1,582
0.543456
0
0
0
0
0
0
267
0.091721
f647a1e251a956e51f190c8dadc2f437ea0fcb0e
2,083
py
Python
tools/GetImages.py
vicyangworld/WaterDispenserEye
6b2191f99d85dfe89dc9ec4161959e8f908dd16f
[ "MIT" ]
null
null
null
tools/GetImages.py
vicyangworld/WaterDispenserEye
6b2191f99d85dfe89dc9ec4161959e8f908dd16f
[ "MIT" ]
null
null
null
tools/GetImages.py
vicyangworld/WaterDispenserEye
6b2191f99d85dfe89dc9ec4161959e8f908dd16f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import cv2 import sys import os # 定义旋转rotate函数 def rotate(image, angle, center=None, scale=1.0): # 获取图像尺寸 (h, w) = image.shape[:2] print(image.shape) # 若未指定旋转中心,则将图像中心设为旋转中心 if center is None: center = (w / 2, h / 2) # 执行旋转 M = cv2.getRotationMatrix2D(cen...
27.051948
118
0.670667
0
0
0
0
0
0
0
0
625
0.276426
f6483079842b52a30927c51d2b4ba1bbe9984614
503
py
Python
tests/test_padondehoy.py
kengru/Giru
93f1b8dc6db35109a58a350218f7a69dcf2e788d
[ "MIT" ]
3
2018-05-29T16:44:14.000Z
2021-01-13T12:46:05.000Z
tests/test_padondehoy.py
kengru/Giru
93f1b8dc6db35109a58a350218f7a69dcf2e788d
[ "MIT" ]
52
2018-05-29T17:07:03.000Z
2021-09-01T18:33:17.000Z
tests/test_padondehoy.py
kengru/Giru
93f1b8dc6db35109a58a350218f7a69dcf2e788d
[ "MIT" ]
2
2018-06-02T22:06:16.000Z
2018-06-03T19:01:31.000Z
from unittest import TestCase from giru.core.commands import PaDondeHoy from tests.mocks import MockBot, MockUpdate class TestPaDondeHoy(TestCase): def test_catalogue_response_same_chat_same_day(self): bot = MockBot() update = MockUpdate() PaDondeHoy(bot, update) response_1 = bot...
26.473684
61
0.723658
383
0.761431
0
0
0
0
0
0
0
0
f649717f99a11da8f0544eda17de8a09d6562732
2,395
py
Python
ircConnection.py
mutexlox/NO-FIFTH-GLYPH
4acb5b8e584093ae7faa9f03c86c0e8d686df8f9
[ "MIT" ]
1
2019-04-16T10:59:38.000Z
2019-04-16T10:59:38.000Z
ircConnection.py
mutexlox/NO-FIFTH-GLYPH
4acb5b8e584093ae7faa9f03c86c0e8d686df8f9
[ "MIT" ]
null
null
null
ircConnection.py
mutexlox/NO-FIFTH-GLYPH
4acb5b8e584093ae7faa9f03c86c0e8d686df8f9
[ "MIT" ]
null
null
null
import socket import select import config class IRCConnection: def __init__(self, serverName, port=6667): self.connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.connection.connect((serverName, port)) self.connection.setblocking(0) def sendMessage(self, toSend): ...
31.103896
79
0.548643
2,350
0.981211
0
0
0
0
0
0
622
0.259708
f64a19aff3d9a4d44aac824d38c6aaef4eeb9f77
99
py
Python
lesson-08/test_m.py
rafaelmartinsbuck/ai-for-trading
51234e408c94ccdeee9b06301a2f63bd170243e3
[ "MIT" ]
1
2020-05-15T09:41:14.000Z
2020-05-15T09:41:14.000Z
lesson-08/test_m.py
rafaelmartinsbuck/ai-for-trading
51234e408c94ccdeee9b06301a2f63bd170243e3
[ "MIT" ]
null
null
null
lesson-08/test_m.py
rafaelmartinsbuck/ai-for-trading
51234e408c94ccdeee9b06301a2f63bd170243e3
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np df = pd.DataFrame({"A":[1,2,3,4], "B":[5,6,7,8]}) print(df)
19.8
49
0.616162
0
0
0
0
0
0
0
0
6
0.060606
f64b72c278e266e29f2b5f8013262577a44a9069
1,314
py
Python
services/swimmer_service.py
Design-Patterns-Project-Group/swimming-mangement-in-python
c0acd0efb5f5536d7890801eed3a7bf995744bde
[ "MIT" ]
null
null
null
services/swimmer_service.py
Design-Patterns-Project-Group/swimming-mangement-in-python
c0acd0efb5f5536d7890801eed3a7bf995744bde
[ "MIT" ]
null
null
null
services/swimmer_service.py
Design-Patterns-Project-Group/swimming-mangement-in-python
c0acd0efb5f5536d7890801eed3a7bf995744bde
[ "MIT" ]
null
null
null
import sys, os.path sys.path.append(os.path.abspath('..')) from models import * from . import AbstractSwimmerService class SwimmerService(AbstractSwimmerService): def __init__(self): # assume this is a database self._data_store = [ { 'swimmer_id': 1, '...
26.28
100
0.444444
1,188
0.90411
0
0
0
0
0
0
338
0.25723