hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
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
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
4f3fd3a39f6f8344f7edaf6e766a2be377b027be
1,561
py
Python
ooobuild/lo/animations/animation_transform_type.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/animations/animation_transform_type.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/animations/animation_transform_type.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
26.913793
153
0.696989
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
0
0
0
4493ab87a277ae9aeceaa08ea8afc483f266aa67
1,709
py
Python
algorithm_analysis/highest_value_palindrome/benchmarking.py
gshaikov/python-uprojects
79b92d600ecfb71e78731982894238fd12fcd348
[ "MIT" ]
null
null
null
algorithm_analysis/highest_value_palindrome/benchmarking.py
gshaikov/python-uprojects
79b92d600ecfb71e78731982894238fd12fcd348
[ "MIT" ]
null
null
null
algorithm_analysis/highest_value_palindrome/benchmarking.py
gshaikov/python-uprojects
79b92d600ecfb71e78731982894238fd12fcd348
[ "MIT" ]
null
null
null
import random import timeit import time import re from pathlib import Path from typing import Tuple from solution import ( highest_value_palindrome_suboptimal, highest_value_palindrome_optimal, ) TEST_DIR = Path(__file__).parent random.seed(13) def run(data_length): """ *data_length* is n in O(n)...
29.465517
79
0.697484
import random import timeit import time import re from pathlib import Path from typing import Tuple from solution import ( highest_value_palindrome_suboptimal, highest_value_palindrome_optimal, ) TEST_DIR = Path(__file__).parent random.seed(13) def benchmark(benched_function, number=None) -> Tuple[int, in...
1,090
0
73
eb5d5d1319eb1558645cba95437f6f3e36e1bc65
3,117
py
Python
lib/utils.py
SudeepSarkar/equilibrium-propagation
ba6d9ee5426445e9ad91c96c816fa5287ff97258
[ "MIT" ]
18
2020-01-07T11:25:45.000Z
2022-01-24T18:25:13.000Z
lib/utils.py
SudeepSarkar/equilibrium-propagation
ba6d9ee5426445e9ad91c96c816fa5287ff97258
[ "MIT" ]
null
null
null
lib/utils.py
SudeepSarkar/equilibrium-propagation
ba6d9ee5426445e9ad91c96c816fa5287ff97258
[ "MIT" ]
5
2020-06-26T23:37:22.000Z
2021-09-04T12:22:49.000Z
# MIT License # Copyright (c) 2020 Simon Schug, João Sacramento # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, ...
33.159574
80
0.68367
# MIT License # Copyright (c) 2020 Simon Schug, João Sacramento # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, ...
68
0
60
53eab20428f2bfc80ff63f633f203e5206010ba6
8,558
py
Python
Lib/glyphsLib/writer.py
jenskutilek/glyphsLib
9271c32e5135dbaebfb852c3d40246967fbe232d
[ "Apache-2.0" ]
80
2019-04-17T19:30:16.000Z
2022-03-25T17:00:48.000Z
Lib/glyphsLib/writer.py
jenskutilek/glyphsLib
9271c32e5135dbaebfb852c3d40246967fbe232d
[ "Apache-2.0" ]
227
2019-04-19T07:03:21.000Z
2022-03-26T21:06:25.000Z
Lib/glyphsLib/writer.py
jenskutilek/glyphsLib
9271c32e5135dbaebfb852c3d40246967fbe232d
[ "Apache-2.0" ]
22
2019-05-15T15:13:24.000Z
2022-03-17T09:12:16.000Z
# Copyright 2016 Georg Seifert. 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 law o...
23.255435
86
0.534704
# Copyright 2016 Georg Seifert. 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 law o...
5,392
-8
311
9d08b2f99ac10d617f01d45314d7e6c4e254f812
1,890
py
Python
main.py
mallocc/PythonRPG
6f8ae053f61d1b5070706276b850e96a27a10fe3
[ "Apache-2.0" ]
1
2019-11-11T10:01:59.000Z
2019-11-11T10:01:59.000Z
main.py
mallocc/PythonRPG
6f8ae053f61d1b5070706276b850e96a27a10fe3
[ "Apache-2.0" ]
null
null
null
main.py
mallocc/PythonRPG
6f8ae053f61d1b5070706276b850e96a27a10fe3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import pygame import sys import os from pygame.locals import * from context import * from imagemanager import * from sprite import * from animation import * from entity import * from player import * from npc import * from random import randint game = Game() game.addEntity(NPC((0, 0), game.context....
25.540541
79
0.592063
#!/usr/bin/python import pygame import sys import os from pygame.locals import * from context import * from imagemanager import * from sprite import * from animation import * from entity import * from player import * from npc import * from random import randint class Game: def __init__(self): self.contex...
1,088
-10
130
c9f228e98789ae2415e7a262bb24aaee24aa5133
602
py
Python
kisensum/openadr/openadr/vtn/migrations/0047_auto_20171122_1739.py
ChargePoint/volttron-applications
8d99c01a93f7c1ea98d4e4b0cfcefe85fe26320b
[ "BSD-3-Clause" ]
null
null
null
kisensum/openadr/openadr/vtn/migrations/0047_auto_20171122_1739.py
ChargePoint/volttron-applications
8d99c01a93f7c1ea98d4e4b0cfcefe85fe26320b
[ "BSD-3-Clause" ]
4
2021-03-19T23:36:34.000Z
2021-12-13T19:45:54.000Z
kisensum/openadr/openadr/vtn/migrations/0047_auto_20171122_1739.py
ChargePoint/volttron-applications
8d99c01a93f7c1ea98d4e4b0cfcefe85fe26320b
[ "BSD-3-Clause" ]
1
2020-05-25T05:03:55.000Z
2020-05-25T05:03:55.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-22 17:39 from __future__ import unicode_literals from django.db import migrations
25.083333
89
0.61794
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-22 17:39 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('vtn', '0046_remove_site_reporting_status'), ] operations = [ migrations.AlterModelO...
0
431
23
d71492cb94fa7ad72d79c38a0e0a8119462e9e42
5,464
py
Python
data_processing/src/data_processor.py
BarrySunderland/HackZurich2021
860b3a9ad1c1ec59343429d9489edc3d4a2b09b0
[ "MIT" ]
null
null
null
data_processing/src/data_processor.py
BarrySunderland/HackZurich2021
860b3a9ad1c1ec59343429d9489edc3d4a2b09b0
[ "MIT" ]
null
null
null
data_processing/src/data_processor.py
BarrySunderland/HackZurich2021
860b3a9ad1c1ec59343429d9489edc3d4a2b09b0
[ "MIT" ]
null
null
null
import pandas as pd import tqdm from paths import PATHS import os if __name__ == "__main__": main()
33.521472
98
0.57284
import pandas as pd import tqdm from paths import PATHS import os class DataProcessor: @staticmethod def gen_proc_file_name(file_name): return os.path.join(PATHS.data, "processed", file_name) @staticmethod def add_rssi_fields_to_disruptions(save: bool = True): """This methods perform ...
1,791
3,519
46
1aff004c20676f19d8e2025960660d5b01dc9a38
6,688
py
Python
lib/kb_escher/kb_escher_utils.py
janakagithub/kb_escher
023c9d4d8c74d70a419e0e8dc9ed264b8cc731e4
[ "MIT" ]
null
null
null
lib/kb_escher/kb_escher_utils.py
janakagithub/kb_escher
023c9d4d8c74d70a419e0e8dc9ed264b8cc731e4
[ "MIT" ]
null
null
null
lib/kb_escher/kb_escher_utils.py
janakagithub/kb_escher
023c9d4d8c74d70a419e0e8dc9ed264b8cc731e4
[ "MIT" ]
null
null
null
import json import escher import modelseed_escher import cobrakbase from cobrakbase.core.converters import KBaseFBAModelToCobraBuilder from modelseed_escher.convert_utils import move_to_compartment #{'workspace_id': 37534, 'map_ids': ['dfsdfsdf'], 'grid_x': '1', 'grid_y': '1', 'model_objects': [{'object_ids': ['37534/9...
38.217143
336
0.619767
import json import escher import modelseed_escher import cobrakbase from cobrakbase.core.converters import KBaseFBAModelToCobraBuilder from modelseed_escher.convert_utils import move_to_compartment #{'workspace_id': 37534, 'map_ids': ['dfsdfsdf'], 'grid_x': '1', 'grid_y': '1', 'model_objects': [{'object_ids': ['37534/9...
5,965
0
185
2e36b8ccbbb6c24b6057bc58fbc6eff45f8d865c
892
py
Python
examples/most_shared.py
fossabot/pynytimes
96aeb5878f45a3ca9e8528980d3022de2f3c8bc4
[ "MIT" ]
22
2020-02-08T22:10:02.000Z
2022-01-25T02:07:46.000Z
examples/most_shared.py
fossabot/pynytimes
96aeb5878f45a3ca9e8528980d3022de2f3c8bc4
[ "MIT" ]
6
2020-02-21T16:36:42.000Z
2022-01-06T04:02:39.000Z
examples/most_shared.py
fossabot/pynytimes
96aeb5878f45a3ca9e8528980d3022de2f3c8bc4
[ "MIT" ]
10
2020-03-25T08:44:11.000Z
2022-02-11T11:03:37.000Z
from pynytimes import NYTAPI # Make sure to set parse dates to True so that the dates # are parsed into datetime.datetime or datetime.date objects nyt = NYTAPI( key="Your API Key", # Get your API Key at https://developer.nytimes.com parse_dates=True, ) # Get most shared articles of today most_shared = nyt.mo...
34.307692
77
0.773543
from pynytimes import NYTAPI # Make sure to set parse dates to True so that the dates # are parsed into datetime.datetime or datetime.date objects nyt = NYTAPI( key="Your API Key", # Get your API Key at https://developer.nytimes.com parse_dates=True, ) # Get most shared articles of today most_shared = nyt.mo...
0
0
0
ddd6dac3f6edac94995420fbf926471fcc3bdbf8
998
py
Python
getStockRecommendations.py
armstjc/stock_self_deployment
61abdeca948542679b9bdb7956125d255b828790
[ "MIT" ]
null
null
null
getStockRecommendations.py
armstjc/stock_self_deployment
61abdeca948542679b9bdb7956125d255b828790
[ "MIT" ]
null
null
null
getStockRecommendations.py
armstjc/stock_self_deployment
61abdeca948542679b9bdb7956125d255b828790
[ "MIT" ]
null
null
null
import pandas as pd import yfinance as yf #from tqdm import tqdm from RefreshStockAbv import getStockList from datetime import datetime stockList = pd.read_csv('Stock_List.csv') stockListLen = len(stockList) if __name__ == "__main__": main()
24.95
97
0.628257
import pandas as pd import yfinance as yf #from tqdm import tqdm from RefreshStockAbv import getStockList from datetime import datetime stockList = pd.read_csv('Stock_List.csv') stockListLen = len(stockList) def getStockRecommendations(): print('') arr = stockList['Symbol'].to_numpy() start = datetime.now...
704
0
46
9c1dd96ad54821d861f87d1cbea67c4e7ab318bb
961
py
Python
django-celery-progress-sample/data/models.py
radugaf/converter
ff6339e602d9dd4e9edf3f21cd485062c8dafd96
[ "MIT" ]
null
null
null
django-celery-progress-sample/data/models.py
radugaf/converter
ff6339e602d9dd4e9edf3f21cd485062c8dafd96
[ "MIT" ]
null
null
null
django-celery-progress-sample/data/models.py
radugaf/converter
ff6339e602d9dd4e9edf3f21cd485062c8dafd96
[ "MIT" ]
null
null
null
from django.db import models from multiselectfield import MultiSelectField # Create your models here. PRODUCT_NAME = ( ("Product-A", "Product A"), ("Product-B", "Product B"), ("Product-C", "Product C"), )
25.972973
81
0.644121
from django.db import models from multiselectfield import MultiSelectField # Create your models here. PRODUCT_NAME = ( ("Product-A", "Product A"), ("Product-B", "Product B"), ("Product-C", "Product C"), ) class FileInfo(models.Model): file = models.FileField() status = models.CharField( m...
0
695
46
24f89f9fcfd6e5f2a71560ee2214cab1b66e740b
7,262
py
Python
run_train.py
mr4msm/ai_edge_seg
0917d58603eae0290e41ccfe307f25cb8180e57c
[ "MIT" ]
null
null
null
run_train.py
mr4msm/ai_edge_seg
0917d58603eae0290e41ccfe307f25cb8180e57c
[ "MIT" ]
null
null
null
run_train.py
mr4msm/ai_edge_seg
0917d58603eae0290e41ccfe307f25cb8180e57c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import multiprocessing as mp import os import sys from argparse import ArgumentParser from chainer import optimizers as optims from chainer import serializers as S from chainer.optimizer import GradientClipping, WeightDecay from batch_generator import BatchGenerator from loss import Loss from...
33.009091
79
0.610025
# -*- coding: utf-8 -*- import multiprocessing as mp import os import sys from argparse import ArgumentParser from chainer import optimizers as optims from chainer import serializers as S from chainer.optimizer import GradientClipping, WeightDecay from batch_generator import BatchGenerator from loss import Loss from...
6,805
0
23
e799cc0ae12f93dcc95fc13743f0d32a689d7492
9,606
py
Python
testcases/testcase.py
Superalvin1123/wcs-python3-sdk
a18fb6194707935e7e9fb28c662a62dcd341cf02
[ "MIT" ]
null
null
null
testcases/testcase.py
Superalvin1123/wcs-python3-sdk
a18fb6194707935e7e9fb28c662a62dcd341cf02
[ "MIT" ]
null
null
null
testcases/testcase.py
Superalvin1123/wcs-python3-sdk
a18fb6194707935e7e9fb28c662a62dcd341cf02
[ "MIT" ]
1
2022-02-07T09:26:19.000Z
2022-02-07T09:26:19.000Z
#!/usr/bin/python # -*-coding:utf-8-*- import os,sys import unittest from os.path import expanduser sys.path.append('../') from wcs.commons.config import Config from wcs.services.client import Client from wcs.commons.putpolicy import PutPolicy from wcs.commons.logme import debug from wcs.commons.util import urlsafe_ba...
34.6787
124
0.630127
#!/usr/bin/python # -*-coding:utf-8-*- import os,sys import unittest from os.path import expanduser sys.path.append('../') from wcs.commons.config import Config from wcs.services.client import Client from wcs.commons.putpolicy import PutPolicy from wcs.commons.logme import debug from wcs.commons.util import urlsafe_ba...
7,995
17
676
537fe9ec1b4225b677ace32d53e56f0672156914
1,854
py
Python
httprunner2jmeter/ext/har2case/__init__.py
BSTester/httprunner2jmeter
b7f18dbb6b6b36719ce8952239f6d0c1dfc75e4a
[ "Apache-2.0" ]
null
null
null
httprunner2jmeter/ext/har2case/__init__.py
BSTester/httprunner2jmeter
b7f18dbb6b6b36719ce8952239f6d0c1dfc75e4a
[ "Apache-2.0" ]
null
null
null
httprunner2jmeter/ext/har2case/__init__.py
BSTester/httprunner2jmeter
b7f18dbb6b6b36719ce8952239f6d0c1dfc75e4a
[ "Apache-2.0" ]
null
null
null
""" Convert HAR (HTTP Archive) to YAML/JSON testcase for HttpRunner. Usage: # convert to JSON format testcase $ hrun har2case demo.har # convert to YAML format testcase $ hrun har2case demo.har -2y """ from httprunner2jmeter.ext.har2case.core import HarParser from sentry_sdk import capture_message ...
28.090909
94
0.651564
""" Convert HAR (HTTP Archive) to YAML/JSON testcase for HttpRunner. Usage: # convert to JSON format testcase $ hrun har2case demo.har # convert to YAML format testcase $ hrun har2case demo.har -2y """ from httprunner2jmeter.ext.har2case.core import HarParser from sentry_sdk import capture_message ...
361
0
23
80b212116a284ff861135dacb00207507749fa8e
88
py
Python
qaoalib/qaoa/__init__.py
xenoicwyce/qaoalib
1c4889548ae94733091b562bab35f6b34c7c4992
[ "MIT" ]
null
null
null
qaoalib/qaoa/__init__.py
xenoicwyce/qaoalib
1c4889548ae94733091b562bab35f6b34c7c4992
[ "MIT" ]
null
null
null
qaoalib/qaoa/__init__.py
xenoicwyce/qaoalib
1c4889548ae94733091b562bab35f6b34c7c4992
[ "MIT" ]
null
null
null
from .qmc import Qmc, QmcFastKron from .layerwise import Layerwise from .utils import *
22
33
0.795455
from .qmc import Qmc, QmcFastKron from .layerwise import Layerwise from .utils import *
0
0
0
2db77b940ee672a4b9d7248883e87d6c60a6f824
15,317
py
Python
tests/beos_plugin_tests/beos_test_utils/beosnode.py
terradacs/beos-core
31e19170bcad573b1d498811284e62babd478f92
[ "MIT" ]
9
2019-04-04T18:46:14.000Z
2022-03-03T16:22:56.000Z
tests/beos_plugin_tests/beos_test_utils/beosnode.py
terradacs/beos-core
31e19170bcad573b1d498811284e62babd478f92
[ "MIT" ]
null
null
null
tests/beos_plugin_tests/beos_test_utils/beosnode.py
terradacs/beos-core
31e19170bcad573b1d498811284e62babd478f92
[ "MIT" ]
3
2019-03-19T17:45:08.000Z
2021-03-22T21:45:35.000Z
import os import sys import time import random import string import datetime import collections try: from beos_test_utils import run except Exception as _ex: print("Faild to import run.py script. Please make sure that run ./deploy.py --build-beos. Aborting.") exit(1) import beos_test_utils.beosactionpatt...
47.421053
178
0.643729
import os import sys import time import random import string import datetime import collections try: from beos_test_utils import run except Exception as _ex: print("Faild to import run.py script. Please make sure that run ./deploy.py --build-beos. Aborting.") exit(1) import beos_test_utils.beosactionpatt...
13,653
910
23
719709584da1e07e58c9bd58392d0adc1bb2c4ee
1,658
py
Python
sct_custom/unit_testing/test_utils.py
nidebroux/lumbosacral_segmentation
3217960c6f0f5c3886dfdf46e1286ad2f737f4aa
[ "Unlicense", "MIT" ]
1
2021-09-07T08:52:21.000Z
2021-09-07T08:52:21.000Z
sct_custom/unit_testing/test_utils.py
nidebroux/lumbosacral_segmentation
3217960c6f0f5c3886dfdf46e1286ad2f737f4aa
[ "Unlicense", "MIT" ]
null
null
null
sct_custom/unit_testing/test_utils.py
nidebroux/lumbosacral_segmentation
3217960c6f0f5c3886dfdf46e1286ad2f737f4aa
[ "Unlicense", "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 # pytest unit tests for utils import pytest from spinalcordtoolbox import utils def test_sct_argument_parser(capsys): """Test extra argparse functionality added by SCTArgumentParser subclass.""" # Check that new defaults can still be overridden (setting add_help vi...
36.844444
119
0.702654
#!/usr/bin/env python # -*- coding: utf-8 # pytest unit tests for utils import pytest from spinalcordtoolbox import utils def test_parse_num_list_inv(): assert utils.parse_num_list_inv([1, 2, 3, 5, 6, 9]) == '1:3;5:6;9' assert utils.parse_num_list_inv([3, 2, 1, 5]) == '1:3;5' assert utils.parse_num_list...
187
0
23
fe045c5343a727ea1cacb5fd6253239d05f5337b
5,336
py
Python
functions/metrics.py
cainmagi/MDNT
4affd8a83698ce6786c04dddacdcf7415f8c5f90
[ "MIT" ]
14
2019-09-24T07:33:13.000Z
2021-03-04T16:27:29.000Z
functions/metrics.py
cainmagi/MDNT
4affd8a83698ce6786c04dddacdcf7415f8c5f90
[ "MIT" ]
1
2020-02-28T04:24:09.000Z
2020-03-03T08:55:31.000Z
functions/metrics.py
cainmagi/MDNT
4affd8a83698ce6786c04dddacdcf7415f8c5f90
[ "MIT" ]
6
2020-08-24T03:35:41.000Z
2021-02-10T08:02:16.000Z
''' ################################################################ # Functions - Metrics # @ Modern Deep Network Toolkits for Tensorflow-Keras # Yuchen Jin @ cainmagi@gmail.com # Requirements: (Pay attention to version) # python 3.6+ # tensorflow r1.13+ # Extend metrics. These functions should not be used as trai...
52.313725
123
0.701462
''' ################################################################ # Functions - Metrics # @ Modern Deep Network Toolkits for Tensorflow-Keras # Yuchen Jin @ cainmagi@gmail.com # Requirements: (Pay attention to version) # python 3.6+ # tensorflow r1.13+ # Extend metrics. These functions should not be used as trai...
0
0
0
e84a278c0eeb538e35f49840e27139eb36c6438e
12,236
py
Python
examples/lorenz.py
josephbakarji/deep-delay-autoencoder
eed23447f930aac140b0f37b888ccab688aa6294
[ "MIT" ]
2
2022-03-08T20:26:07.000Z
2022-03-28T21:22:00.000Z
examples/lorenz.py
josephbakarji/deep-delay-autoencoder
eed23447f930aac140b0f37b888ccab688aa6294
[ "MIT" ]
null
null
null
examples/lorenz.py
josephbakarji/deep-delay-autoencoder
eed23447f930aac140b0f37b888ccab688aa6294
[ "MIT" ]
1
2022-03-28T21:22:23.000Z
2022-03-28T21:22:23.000Z
import numpy as np from scipy.integrate import odeint from scipy.special import legendre, chebyt import sys sys.path.append('../src') from sindy_utils import library_size from data_manage import DataStruct import pdb ################################# ################################ ###############################...
40.923077
143
0.538003
import numpy as np from scipy.integrate import odeint from scipy.special import legendre, chebyt import sys sys.path.append('../src') from sindy_utils import library_size from data_manage import DataStruct import pdb class Lorenz: def __init__(self, option='delay', coefficients=[10, 8/3,...
593
8,976
23
43a61b412fd3f3362900d8f61060bf01a5c105a7
5,142
py
Python
autoyt/images.py
JacobHP/AutoYT
da87773bdd2eea1d688a8c003d61d31888dbf3e5
[ "MIT" ]
1
2022-02-03T13:21:48.000Z
2022-02-03T13:21:48.000Z
autoyt/images.py
JacobHP/AutoYT
da87773bdd2eea1d688a8c003d61d31888dbf3e5
[ "MIT" ]
null
null
null
autoyt/images.py
JacobHP/AutoYT
da87773bdd2eea1d688a8c003d61d31888dbf3e5
[ "MIT" ]
null
null
null
''' Author: Jacob Howard-Parker Functions for writing on images. Text args should be layed out as specified in data/templates/image_configuration.json ''' from PIL import Image from PIL import ImageFont from PIL import ImageDraw import textwrap import re import pandas as pd def create_base_image(background=(26,26,2...
32.544304
79
0.570012
''' Author: Jacob Howard-Parker Functions for writing on images. Text args should be layed out as specified in data/templates/image_configuration.json ''' from PIL import Image from PIL import ImageFont from PIL import ImageDraw import textwrap import re import pandas as pd def create_base_image(background=(26,26,2...
0
0
0
229ecd07ca05535989bc2af6b068986d3e701d65
6,476
py
Python
tests/db/test_client.py
Veritaris/fastapi_contrib
081670603917b1b7e9646c75fba5614b09823a3e
[ "MIT" ]
504
2019-08-26T18:14:03.000Z
2022-03-25T13:49:50.000Z
tests/db/test_client.py
Veritaris/fastapi_contrib
081670603917b1b7e9646c75fba5614b09823a3e
[ "MIT" ]
100
2019-08-23T07:52:30.000Z
2022-03-20T06:13:10.000Z
tests/db/test_client.py
identixone/fastapi_contrib
e61ecaa3fc114aebb89f4ced28b75bb6dfd21f05
[ "MIT" ]
32
2019-10-01T12:46:14.000Z
2022-02-01T13:44:53.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from fastapi import FastAPI from fastapi_contrib.db.client import MongoDBClient from fastapi_contrib.db.models import MongoDBModel, MongoDBTimeStampedModel from tests.mock import MongoDBMock from tests.utils import override_settings, AsyncMock, AsyncIterator...
27.913793
76
0.683138
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from fastapi import FastAPI from fastapi_contrib.db.client import MongoDBClient from fastapi_contrib.db.models import MongoDBModel, MongoDBTimeStampedModel from tests.mock import MongoDBMock from tests.utils import override_settings, AsyncMock, AsyncIterator...
4,793
55
287
ba827c49e3526517c097653d7d372a40097b7233
3,402
py
Python
demo.py
MostafaGazar/temperature_scaling
a474b23f6958be9629b70341a85f5b53fcfb0ec8
[ "MIT" ]
724
2017-08-03T14:35:06.000Z
2022-03-30T20:58:39.000Z
demo.py
MostafaGazar/temperature_scaling
a474b23f6958be9629b70341a85f5b53fcfb0ec8
[ "MIT" ]
28
2017-08-04T15:01:04.000Z
2022-03-16T22:44:11.000Z
demo.py
MostafaGazar/temperature_scaling
a474b23f6958be9629b70341a85f5b53fcfb0ec8
[ "MIT" ]
121
2017-12-08T02:19:35.000Z
2022-03-09T07:37:39.000Z
import fire import os import torch import torchvision as tv from torch.utils.data.sampler import SubsetRandomSampler from models import DenseNet from temperature_scaling import ModelWithTemperature def demo(data, save, depth=40, growth_rate=12, batch_size=256): """ Applies temperature scaling to a trained mod...
38.659091
97
0.708113
import fire import os import torch import torchvision as tv from torch.utils.data.sampler import SubsetRandomSampler from models import DenseNet from temperature_scaling import ModelWithTemperature def demo(data, save, depth=40, growth_rate=12, batch_size=256): """ Applies temperature scaling to a trained mod...
0
0
0
f9758037fff13223db9d17907e8825f9598c281c
2,269
py
Python
Spy/SpyPipe/SpyPipeServer.py
Cesare-TT/Svt_py_vif
98f05857c65ea13b065d41119ffb2e256e237be1
[ "Apache-2.0" ]
2
2021-04-08T12:51:06.000Z
2021-04-24T10:08:19.000Z
Spy/SpyPipe/SpyPipeServer.py
Cesare-TT/svt_py_vif
98f05857c65ea13b065d41119ffb2e256e237be1
[ "Apache-2.0" ]
null
null
null
Spy/SpyPipe/SpyPipeServer.py
Cesare-TT/svt_py_vif
98f05857c65ea13b065d41119ffb2e256e237be1
[ "Apache-2.0" ]
null
null
null
import time from concurrent import futures from multiprocessing import Queue,Process from threading import Event import grpc from . import SpyPipeGRPC_pb2 as proto_pb2 from . import SpyPipeGRPC_pb2_grpc as proto_pb2_grpc #def stop_process(self): # print('run stop process') if __name__ ==...
28.3625
101
0.639048
import time from concurrent import futures from multiprocessing import Queue,Process from threading import Event import grpc from . import SpyPipeGRPC_pb2 as proto_pb2 from . import SpyPipeGRPC_pb2_grpc as proto_pb2_grpc class RemoteStorage(proto_pb2_grpc.SpyPipeGRPCServicer): def __init__(self...
1,067
43
181
5bec0e0fdcc88704d18da64eca876a9a87d678f6
1,434
py
Python
openregister_client/django_compat/fields.py
ministryofjustice/openregister-client
28e73394d6d814b449fc85d2154e2ce4a53a5125
[ "MIT" ]
2
2018-07-28T11:08:18.000Z
2018-11-19T12:33:25.000Z
openregister_client/django_compat/fields.py
ministryofjustice/openregister-client
28e73394d6d814b449fc85d2154e2ce4a53a5125
[ "MIT" ]
1
2022-01-24T17:20:50.000Z
2022-01-24T17:20:50.000Z
openregister_client/django_compat/fields.py
ministryofjustice/openregister-client
28e73394d6d814b449fc85d2154e2ce4a53a5125
[ "MIT" ]
1
2021-04-11T06:31:45.000Z
2021-04-11T06:31:45.000Z
import json from django.db import models from .model_factory import RegisterJSONEncoder # TODO: require register field parameter to enable type coercion; Field needs to be deconstructable # TODO: base code on django.contrib.postgres.fields.array.ArrayField # TODO: add form field
31.866667
103
0.635286
import json from django.db import models from .model_factory import RegisterJSONEncoder class ListField(models.CharField): # TODO: require register field parameter to enable type coercion; Field needs to be deconstructable # TODO: base code on django.contrib.postgres.fields.array.ArrayField # TODO: add ...
968
13
158
960abd72c3af48754c70915c9583f00167061f89
900
py
Python
stubs/ev3_pybricks_v1_0_0/umqtt/simple.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/ev3_pybricks_v1_0_0/umqtt/simple.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/ev3_pybricks_v1_0_0/umqtt/simple.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
""" Module: 'umqtt.simple' on LEGO EV3 v1.0.0 """ # MCU: sysname=ev3, nodename=ev3, release=('v1.0.0',), version=('0.0.0',), machine=ev3 # Stubber: 1.3.2 - updated from typing import Any class MQTTClient: """""" class MQTTException(Exception): """""" socket = None struct = None
16.071429
86
0.546667
""" Module: 'umqtt.simple' on LEGO EV3 v1.0.0 """ # MCU: sysname=ev3, nodename=ev3, release=('v1.0.0',), version=('0.0.0',), machine=ev3 # Stubber: 1.3.2 - updated from typing import Any class MQTTClient: """""" def _recv_len(self, *argv) -> Any: pass def _send_str(self, *argv) -> Any: p...
286
0
320
285d269052487416104191179ac4d238b0511c2b
1,333
py
Python
references/test_code/test_source/scripts/test.py
qoopen0815/ADS-AutomaticDartScorer-
9c287aa2b2db71ac7e15085d88dff4cf83c3a7c9
[ "Apache-2.0" ]
null
null
null
references/test_code/test_source/scripts/test.py
qoopen0815/ADS-AutomaticDartScorer-
9c287aa2b2db71ac7e15085d88dff4cf83c3a7c9
[ "Apache-2.0" ]
1
2020-09-26T05:55:21.000Z
2020-09-26T05:55:21.000Z
references/test_code/test_source/scripts/test.py
calm0815/ADS-AutomaticDartScorer-
9c287aa2b2db71ac7e15085d88dff4cf83c3a7c9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import cv2 # トラックバーの値を変更する度にRGBを出力する # 画像の読み込み # img = cv2.imread("../../../../resources/capture_l_plane.png", 1) img = cv2.imread("../../../../resources/result.png", 1) # img = cv2.resize(img , (int(img.shape[1]*0.5), int(img.shape[0]*0.5))) # ウィンドウのサイズを変更可能にする cv2.namedWindow("img", cv2.WIND...
35.078947
99
0.663916
# -*- coding: utf-8 -*- import cv2 # トラックバーの値を変更する度にRGBを出力する def changeColor(val): r_min = cv2.getTrackbarPos("R_min", "img") r_max = cv2.getTrackbarPos("R_max", "img") g_min = cv2.getTrackbarPos("G_min", "img") g_max = cv2.getTrackbarPos("G_max", "img") b_min = cv2.getTrackbarPos("B_min", "img") ...
518
0
22
ec2992cf74bd952128a373125505ff1e8aab1f87
126,215
py
Python
pysnmp-with-texts/DLSW-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/DLSW-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/DLSW-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 DLSW-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DLSW-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:07:01 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:1...
178.269774
9,756
0.788575
# # PySNMP MIB module DLSW-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DLSW-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:07:01 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:1...
0
4,211
158
1967d13c3f768e829c80718e3dba109dbd9aa06d
4,522
py
Python
src/WikiDetector.py
bharat-suri/ComplexEmbeddings
f9fd76dd22ab5f4fcccc31e61b6a9a86e6de9ff0
[ "MIT" ]
1
2018-05-09T09:28:15.000Z
2018-05-09T09:28:15.000Z
src/WikiDetector.py
tramplingWillow/ComplexEmbeddings
f9fd76dd22ab5f4fcccc31e61b6a9a86e6de9ff0
[ "MIT" ]
4
2021-03-18T20:33:00.000Z
2022-01-13T00:46:20.000Z
src/WikiDetector.py
bharat-suri/ComplexEmbeddings
f9fd76dd22ab5f4fcccc31e61b6a9a86e6de9ff0
[ "MIT" ]
null
null
null
import os import re import sys import time import tempfile from joblib import Parallel, delayed from urllib.parse import unquote from collections import Counter def upcase_first_letter(s): """ Capitalize the string. """ return s[0].upper() + s[1:] def replaceAnchorText(filename): """ Given the input file, th...
27.077844
136
0.639982
import os import re import sys import time import tempfile from joblib import Parallel, delayed from urllib.parse import unquote from collections import Counter def upcase_first_letter(s): """ Capitalize the string. """ return s[0].upper() + s[1:] def replaceAnchorText(filename): """ Given the input file, th...
0
0
0
3aab30f84514f366abf8ccb4ddb25329d9e6ab4f
778
py
Python
python_learning/basic_learning/lesson01.py
suncht/sun-python
b02cba75c142adc44438192577cae171cb4837d4
[ "Apache-2.0" ]
null
null
null
python_learning/basic_learning/lesson01.py
suncht/sun-python
b02cba75c142adc44438192577cae171cb4837d4
[ "Apache-2.0" ]
null
null
null
python_learning/basic_learning/lesson01.py
suncht/sun-python
b02cba75c142adc44438192577cae171cb4837d4
[ "Apache-2.0" ]
null
null
null
words = ['car', 'window', 'ddd'] print('------一般遍历------------') for w in words[1:-1]: print(w, len(w)) print('------带索引的遍历1------------') for index, w in enumerate(words): print(index, w) print('------带索引的遍历2------------') for index, w in enumerate(words, start=1): print(index, w) maps = {'10': 'sun'...
19.948718
47
0.484576
words = ['car', 'window', 'ddd'] print('------一般遍历------------') for w in words[1:-1]: print(w, len(w)) print('------带索引的遍历1------------') for index, w in enumerate(words): print(index, w) print('------带索引的遍历2------------') for index, w in enumerate(words, start=1): print(index, w) maps = {'10': 'sun'...
0
0
0
8283124bb8ae178fd38985032f44e4cce556c9a5
3,720
py
Python
data_prep.py
AlexTheM8/keras-frcnn
2e70679865385dcd861b4be8cac1a6c8ad0e3455
[ "Apache-2.0" ]
null
null
null
data_prep.py
AlexTheM8/keras-frcnn
2e70679865385dcd861b4be8cac1a6c8ad0e3455
[ "Apache-2.0" ]
1
2022-01-17T21:42:03.000Z
2022-01-17T21:42:03.000Z
data_prep.py
AlexTheM8/keras-frcnn
2e70679865385dcd861b4be8cac1a6c8ad0e3455
[ "Apache-2.0" ]
null
null
null
import argparse import os import cv2 # initialize the list of reference points refPt = [] r = None # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-p", "--path", required=True, help="Path to the images") ap.add_argument("-a", "--annotate", required=False, h...
35.769231
119
0.541398
import argparse import os import cv2 # initialize the list of reference points refPt = [] r = None def ResizeWithAspectRatio(image, width=None, height=None, inter=cv2.INTER_AREA): dim = None (h, w) = image.shape[:2] global r if width is None and height is None: return image if width is N...
1,080
0
69
b798273ce1f1b9a4a531453f3e36c04301dc8cc3
1,454
py
Python
util/manual_checks.py
RealA10N/wikiquote
c8daddd38d6d59744309f60a2bf911262e46988d
[ "MIT" ]
55
2015-02-06T11:06:01.000Z
2018-04-19T19:09:30.000Z
util/manual_checks.py
RealA10N/wikiquote
c8daddd38d6d59744309f60a2bf911262e46988d
[ "MIT" ]
17
2015-02-14T19:07:57.000Z
2018-04-27T03:06:30.000Z
util/manual_checks.py
RealA10N/wikiquote
c8daddd38d6d59744309f60a2bf911262e46988d
[ "MIT" ]
24
2015-02-08T04:15:38.000Z
2018-09-09T14:48:29.000Z
import wikiquote # manual_checks.py # A short script to manually test wikiquote's functionality MAX_QUOTE_LEN = 70 articles = [ 'Barack Obama', 'Albert Einstein', 'Ada Lovelace', 'Leonard Cohen' ] for lang in wikiquote.supported_languages(): print('\n---------------------------------------------...
28.509804
79
0.462173
import wikiquote # manual_checks.py # A short script to manually test wikiquote's functionality MAX_QUOTE_LEN = 70 articles = [ 'Barack Obama', 'Albert Einstein', 'Ada Lovelace', 'Leonard Cohen' ] for lang in wikiquote.supported_languages(): print('\n---------------------------------------------...
0
0
0
8da94531cabea94207c2a7225f8dc11dfe2a2af3
1,133
py
Python
src/Modules/Web/web_configMenu.py
bopopescu/PyHouse_1
6444ed0b4c38ab59b9e419e4d54d65d598e6a54e
[ "MIT" ]
1
2016-09-21T19:30:21.000Z
2016-09-21T19:30:21.000Z
src/Modules/Web/web_configMenu.py
bopopescu/PyHouse_1
6444ed0b4c38ab59b9e419e4d54d65d598e6a54e
[ "MIT" ]
null
null
null
src/Modules/Web/web_configMenu.py
bopopescu/PyHouse_1
6444ed0b4c38ab59b9e419e4d54d65d598e6a54e
[ "MIT" ]
1
2020-07-23T11:13:36.000Z
2020-07-23T11:13:36.000Z
""" -*- test-case-name: PyHouse.src.Modules.Web.test.test_web_configMenu -*- @name: PyHouse/src/Modules/Web/web_configMenu.py @author: D. Brian Kimmel @contact: D.BrianKimmel@gmail.com @copyright: (c) 2015-2015 by D. Brian Kimmel @license: MIT License @note: Created on Aug 23, 2015 @Summary: ...
27.634146
87
0.701677
""" -*- test-case-name: PyHouse.src.Modules.Web.test.test_web_configMenu -*- @name: PyHouse/src/Modules/Web/web_configMenu.py @author: D. Brian Kimmel @contact: D.BrianKimmel@gmail.com @copyright: (c) 2015-2015 by D. Brian Kimmel @license: MIT License @note: Created on Aug 23, 2015 @Summary: ...
167
0
29
800995b599b0b3eb588f67b3f508e080f4b132b3
647
py
Python
Minor Projects/record_sound.py
AMARTYA2020/nppy
7f750534bb5faa4e661447ca132077de0ce0a0ed
[ "MIT" ]
4
2020-12-07T10:15:08.000Z
2021-11-17T11:21:07.000Z
Minor Projects/record_sound.py
AMARTYA2020/nppy
7f750534bb5faa4e661447ca132077de0ce0a0ed
[ "MIT" ]
null
null
null
Minor Projects/record_sound.py
AMARTYA2020/nppy
7f750534bb5faa4e661447ca132077de0ce0a0ed
[ "MIT" ]
1
2021-02-17T07:53:13.000Z
2021-02-17T07:53:13.000Z
import soundfile import sounddevice if __name__ == '__main__': record = Record_Sound() record.record_sound()
30.809524
129
0.616692
import soundfile import sounddevice class Record_Sound: def __init__(self, name='Reocrd.wav', rate=40000, duration=60): self.name = name # .wav (extension) self.rate = rate # Hertz self.duration = duration # Seconds def record_sound(self): '''R...
188
307
24
32d27a9635f1f287ff943814b3bdebbce0ef1a4a
101
py
Python
deep_gw_pe_followup/restricted_prior/__init__.py
avivajpeyi/gw_pe_judge
151d597fdd6128a278e1d4cff65d3e6776e1fa83
[ "MIT" ]
null
null
null
deep_gw_pe_followup/restricted_prior/__init__.py
avivajpeyi/gw_pe_judge
151d597fdd6128a278e1d4cff65d3e6776e1fa83
[ "MIT" ]
null
null
null
deep_gw_pe_followup/restricted_prior/__init__.py
avivajpeyi/gw_pe_judge
151d597fdd6128a278e1d4cff65d3e6776e1fa83
[ "MIT" ]
null
null
null
from .placeholder_prior import PlaceholderDelta, PlaceholderPrior from .prior import RestrictedPrior
33.666667
65
0.881188
from .placeholder_prior import PlaceholderDelta, PlaceholderPrior from .prior import RestrictedPrior
0
0
0
f8f7d1c2e739391af520fbdd2477c31b86272739
18,741
py
Python
boxsdk/object/search.py
bipsterbot/box-python-sdk
a55cbc6d8e2af6d51c30b795ad240bf8e45e922d
[ "Apache-2.0" ]
367
2015-02-10T05:55:45.000Z
2022-03-16T23:39:58.000Z
boxsdk/object/search.py
bipsterbot/box-python-sdk
a55cbc6d8e2af6d51c30b795ad240bf8e45e922d
[ "Apache-2.0" ]
686
2015-02-10T01:21:28.000Z
2022-03-31T11:40:22.000Z
boxsdk/object/search.py
bipsterbot/box-python-sdk
a55cbc6d8e2af6d51c30b795ad240bf8e45e922d
[ "Apache-2.0" ]
260
2015-02-16T17:35:06.000Z
2022-03-20T17:45:28.000Z
# coding: utf-8 from __future__ import unicode_literals, absolute_import import json from .base_endpoint import BaseEndpoint from ..pagination.limit_offset_based_object_collection import LimitOffsetBasedObjectCollection from ..pagination.marker_based_object_collection import MarkerBasedObjectCollection from ..util.a...
35.629278
134
0.588496
# coding: utf-8 from __future__ import unicode_literals, absolute_import import json from .base_endpoint import BaseEndpoint from ..pagination.limit_offset_based_object_collection import LimitOffsetBasedObjectCollection from ..pagination.marker_based_object_collection import MarkerBasedObjectCollection from ..util.a...
25
0
26
542147158cd8469f8c735caf9e061a417df66d13
90
py
Python
graphs/word_ladder_problem.py
gcvalderrama/python_foundations
5ac045085dcc6c906729b481f833fa6a7889bd19
[ "MIT" ]
null
null
null
graphs/word_ladder_problem.py
gcvalderrama/python_foundations
5ac045085dcc6c906729b481f833fa6a7889bd19
[ "MIT" ]
null
null
null
graphs/word_ladder_problem.py
gcvalderrama/python_foundations
5ac045085dcc6c906729b481f833fa6a7889bd19
[ "MIT" ]
null
null
null
import unittest
11.25
30
0.677778
import unittest class Test(unittest.TestCase): def test_case_a(self): pass
14
9
50
937387e12ccefb14cba396ae5fd45c6a4b37f34d
1,006
py
Python
kq/job.py
Semo/kq
024cc52b10b2af0c2999a20920faa460442bcbd6
[ "MIT" ]
582
2016-10-31T04:26:28.000Z
2022-03-30T12:57:14.000Z
kq/job.py
Semo/kq
024cc52b10b2af0c2999a20920faa460442bcbd6
[ "MIT" ]
17
2016-11-01T16:37:16.000Z
2022-02-10T06:47:36.000Z
kq/job.py
Semo/kq
024cc52b10b2af0c2999a20920faa460442bcbd6
[ "MIT" ]
26
2016-11-01T05:06:02.000Z
2022-02-04T12:44:36.000Z
from dataclasses import dataclass from typing import Any, Callable, Dict, Optional, Sequence, Union @dataclass(frozen=True)
27.944444
65
0.682903
from dataclasses import dataclass from typing import Any, Callable, Dict, Optional, Sequence, Union @dataclass(frozen=True) class Job: # KQ job UUID id: Optional[str] = None # Unix timestamp indicating when the job was queued. timestamp: Optional[int] = None # Name of the Kafka topic. topic...
0
858
22
c3f525a433e2a6d4ca2d9c1ef91bbd4e3b476655
17,629
py
Python
toast_planck/preproc_modules/taudeconvolve.py
planck-npipe/toast-npipe
ca3e92ea3a81a6146e246ec1d0c5bdcaea3b49f2
[ "BSD-2-Clause" ]
1
2021-04-20T08:09:35.000Z
2021-04-20T08:09:35.000Z
toast_planck/preproc_modules/taudeconvolve.py
planck-npipe/toast-npipe
ca3e92ea3a81a6146e246ec1d0c5bdcaea3b49f2
[ "BSD-2-Clause" ]
null
null
null
toast_planck/preproc_modules/taudeconvolve.py
planck-npipe/toast-npipe
ca3e92ea3a81a6146e246ec1d0c5bdcaea3b49f2
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2015-2018 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. from scipy import optimize from scipy.signal import fftconvolve from toast.mpi import MPI import numpy as np import toast.tim...
42.997561
201
0.512054
# Copyright (c) 2015-2018 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. from scipy import optimize from scipy.signal import fftconvolve from toast.mpi import MPI import numpy as np import toast.tim...
352
16,884
23
dcaa38dffec7b18b21d57d14b209e0915d096ecf
10,860
py
Python
workshop_material/tools.py
nrupatunga/pyimageconf2018
2f4c83a78206106b50835730749028a03fbbc565
[ "BSL-1.0" ]
106
2018-08-30T01:45:38.000Z
2021-06-03T11:05:15.000Z
workshop_material/tools.py
nrupatunga/pyimageconf2018
2f4c83a78206106b50835730749028a03fbbc565
[ "BSL-1.0" ]
3
2019-04-12T02:03:25.000Z
2019-05-07T00:16:55.000Z
workshop_material/tools.py
nrupatunga/pyimageconf2018
2f4c83a78206106b50835730749028a03fbbc565
[ "BSL-1.0" ]
36
2018-08-30T04:08:31.000Z
2021-05-18T07:02:10.000Z
import numpy as np from math import pi,cos,sin,sqrt from dlib import point, get_rect, center import dlib ########################################################################################### ########################################################################################### ########################...
35.032258
117
0.53628
import numpy as np from math import pi,cos,sin,sqrt from dlib import point, get_rect, center import dlib ########################################################################################### class hough_transform: def __init__(self, size): self.size = size def perform_generic_hough_transform(s...
9,204
1
241
89654d5c3e8a017c193c6680270df4ae459a11ff
4,099
py
Python
main.py
kishorepv/Neural-Calculator
196cc95aa0ddb43893aebd989340db4bed916653
[ "Apache-2.0" ]
3
2019-06-25T08:16:33.000Z
2020-01-30T05:10:59.000Z
main.py
kishorepv/Neural-Calculator
196cc95aa0ddb43893aebd989340db4bed916653
[ "Apache-2.0" ]
null
null
null
main.py
kishorepv/Neural-Calculator
196cc95aa0ddb43893aebd989340db4bed916653
[ "Apache-2.0" ]
null
null
null
import os from flask import Flask, flash, redirect, render_template, request, session, abort, url_for, make_response, Response import sys import yaml import os.path import base64 from predict_digit import * from matplotlib import image as mplimg import cv2 import numpy as np #from flask_json import FlaskJSON, JsonError...
26.967105
116
0.645035
import os from flask import Flask, flash, redirect, render_template, request, session, abort, url_for, make_response, Response import sys import yaml import os.path import base64 from predict_digit import * from matplotlib import image as mplimg import cv2 import numpy as np #from flask_json import FlaskJSON, JsonError...
3,212
0
212
7d115feb5a97142ac2b56cded232bdf84bcc2ff0
2,317
py
Python
src/lamplib/src/genny/tasks/genny_runner.py
jordist/genny
6a8cdbb98eea3c35b2a67e3627bece5d1efee733
[ "Apache-2.0" ]
30
2019-01-30T17:21:44.000Z
2022-01-21T00:05:33.000Z
src/lamplib/src/genny/tasks/genny_runner.py
jordist/genny
6a8cdbb98eea3c35b2a67e3627bece5d1efee733
[ "Apache-2.0" ]
358
2019-01-15T21:51:57.000Z
2022-03-30T16:10:42.000Z
src/lamplib/src/genny/tasks/genny_runner.py
jordist/genny
6a8cdbb98eea3c35b2a67e3627bece5d1efee733
[ "Apache-2.0" ]
50
2019-01-15T20:01:15.000Z
2022-03-24T16:19:52.000Z
from typing import List import structlog import tempfile import shutil import os from genny.cmd_runner import run_command from genny.curator import poplar_grpc from genny.tasks import preprocess SLOG = structlog.get_logger(__name__) def main_genny_runner( genny_args: List[str], genny_repo_root: str, cl...
31.310811
94
0.596893
from typing import List import structlog import tempfile import shutil import os from genny.cmd_runner import run_command from genny.curator import poplar_grpc from genny.tasks import preprocess SLOG = structlog.get_logger(__name__) def main_genny_runner( genny_args: List[str], genny_repo_root: str, cl...
0
0
0
1626418bf281d9d52bb39d181c8430b2beca0bad
2,374
py
Python
telesurvideos/cms_plugins.py
dreglad/telesurvideos
626ac2e4e1a158b50e847fe6753485f1d9c72fcf
[ "MIT" ]
null
null
null
telesurvideos/cms_plugins.py
dreglad/telesurvideos
626ac2e4e1a158b50e847fe6753485f1d9c72fcf
[ "MIT" ]
null
null
null
telesurvideos/cms_plugins.py
dreglad/telesurvideos
626ac2e4e1a158b50e847fe6753485f1d9c72fcf
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # """telesurvideos CMS plugins""" from __future__ import unicode_literals from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext_lazy as _ from .models import ProgramaListPluginModel, VideoListPluginModel class Programa...
29.675
92
0.545914
# -*- coding: utf-8 -*- # """telesurvideos CMS plugins""" from __future__ import unicode_literals from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext_lazy as _ from .models import ProgramaListPluginModel, VideoListPluginModel class Programa...
0
0
0
1c4e3d57f90816dbc19b8d30bb28fc13d0e022c9
2,793
py
Python
test_cmd_app/test_polishing.py
ntnguyen63/ares
a09ca91ed43007946f489c48b8c22f3a80d8a069
[ "MIT" ]
null
null
null
test_cmd_app/test_polishing.py
ntnguyen63/ares
a09ca91ed43007946f489c48b8c22f3a80d8a069
[ "MIT" ]
null
null
null
test_cmd_app/test_polishing.py
ntnguyen63/ares
a09ca91ed43007946f489c48b8c22f3a80d8a069
[ "MIT" ]
null
null
null
import os import shutil import subprocess from pathlib import Path from ..lib.polisher import ( PolishPipeline, create_sorted_aln, pilon, ShortReadPolishRunner, ) draft = Path("test_data/drafts/assembly.fasta") r1, r2 = ["test_data/r1.fastq", "test_data/r2.fastq"] long_reads = "test_data/long.fastq" ...
25.162162
65
0.694952
import os import shutil import subprocess from pathlib import Path from ..lib.polisher import ( PolishPipeline, create_sorted_aln, pilon, ShortReadPolishRunner, ) draft = Path("test_data/drafts/assembly.fasta") r1, r2 = ["test_data/r1.fastq", "test_data/r2.fastq"] long_reads = "test_data/long.fastq" ...
2,079
0
161
30f427df8e935168a3306f6e515597316050143a
219
py
Python
Emmanuel ANENE/Phase 1/Python Basic 1/Day5/task7.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
Emmanuel ANENE/Phase 1/Python Basic 1/Day5/task7.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
Emmanuel ANENE/Phase 1/Python Basic 1/Day5/task7.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
fname = input("Enter your first name: ") lname = input("Enter your last name: ") age = int(input("Enter your age: ")) print('''First name: {0} Last name: {1} Age: {2}'''.format(fname.capitalize(), lname.upper(), age))
27.375
59
0.639269
fname = input("Enter your first name: ") lname = input("Enter your last name: ") age = int(input("Enter your age: ")) print('''First name: {0} Last name: {1} Age: {2}'''.format(fname.capitalize(), lname.upper(), age))
0
0
0
4802b03aa9efe968b78419bc86c831ac9abff6b0
2,104
py
Python
tests/b017.py
cricalix/flake8-bugbear
752a60df73f98e60231d4877e2a33fa3b9931ca1
[ "MIT" ]
null
null
null
tests/b017.py
cricalix/flake8-bugbear
752a60df73f98e60231d4877e2a33fa3b9931ca1
[ "MIT" ]
null
null
null
tests/b017.py
cricalix/flake8-bugbear
752a60df73f98e60231d4877e2a33fa3b9931ca1
[ "MIT" ]
null
null
null
""" Should emit: B017 - on lines 15, 20, 25 All tests are valid unittest syntax, and will work if this code is executed. """ import asyncio import unittest # None of these should trigger the With visitor. CONSTANT = True # This may trigger the visitor, but it shouldn't match the filters with Foo() as a: p...
29.633803
75
0.672053
""" Should emit: B017 - on lines 15, 20, 25 All tests are valid unittest syntax, and will work if this code is executed. """ import asyncio import unittest class AssertRaisesThatShouldTrigger(unittest.TestCase): def test_bare_Exception(self) -> None: """The use of Exception like this will catch everythin...
371
1,212
145
ac83689e53eaa3778b0752aa47228c1d884d7453
1,451
py
Python
setup.py
NiklasHoltmeyer/sentiment-analysis
705c3a5ebe75fd89b2fe9c38c9611cae3695c8db
[ "MIT" ]
null
null
null
setup.py
NiklasHoltmeyer/sentiment-analysis
705c3a5ebe75fd89b2fe9c38c9611cae3695c8db
[ "MIT" ]
null
null
null
setup.py
NiklasHoltmeyer/sentiment-analysis
705c3a5ebe75fd89b2fe9c38c9611cae3695c8db
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('LICENSE') as f: license = f.read() #with open('README.rst') as f: #readme = f.read() setup( name='DeepSentiment', version='0.1.0', description='Deep Learning for Sentiment Analysis', #long_description=read...
28.45098
64
0.562371
# -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('LICENSE') as f: license = f.read() #with open('README.rst') as f: #readme = f.read() setup( name='DeepSentiment', version='0.1.0', description='Deep Learning for Sentiment Analysis', #long_description=read...
0
0
0
b45d40200f29a502282da356feff14ba69526f79
435
py
Python
dash/admin.py
CMPUT404W17T00/CMPUT404-project
870e1844885906f8b48eac9a888e4874d28b3745
[ "Apache-2.0" ]
2
2017-03-02T01:46:36.000Z
2018-11-01T20:36:58.000Z
dash/admin.py
CMPUT404W17T00/CMPUT404-project
870e1844885906f8b48eac9a888e4874d28b3745
[ "Apache-2.0" ]
47
2017-01-23T00:00:17.000Z
2017-04-12T21:22:23.000Z
dash/admin.py
CMPUT404W17T00/CMPUT404-project
870e1844885906f8b48eac9a888e4874d28b3745
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from .models import Post, Comment, Author, Category, CanSee, FriendRequest, \ Follow, RemoteCommentAuthor # Register your models here. admin.site.register(Author) admin.site.register(RemoteCommentAuthor) admin.site.register(Post) admin.site.register(Comment) admin....
29
77
0.781609
from django.contrib import admin from .models import Post, Comment, Author, Category, CanSee, FriendRequest, \ Follow, RemoteCommentAuthor # Register your models here. admin.site.register(Author) admin.site.register(RemoteCommentAuthor) admin.site.register(Post) admin.site.register(Comment) admin....
0
0
0
471a5abbb901cd7e4469624d81045db786180f14
143
py
Python
botaclan/player/__init__.py
bataclanofficial/botaclan
93f8ccab4f29c50a395a588b7779431eab8625e8
[ "Apache-2.0" ]
null
null
null
botaclan/player/__init__.py
bataclanofficial/botaclan
93f8ccab4f29c50a395a588b7779431eab8625e8
[ "Apache-2.0" ]
null
null
null
botaclan/player/__init__.py
bataclanofficial/botaclan
93f8ccab4f29c50a395a588b7779431eab8625e8
[ "Apache-2.0" ]
null
null
null
# This package had a lot of inspiration and snippes from the following Gist # https://gist.github.com/vbe0201/ade9b80f2d3b64643d854938d40a0a2d
47.666667
75
0.825175
# This package had a lot of inspiration and snippes from the following Gist # https://gist.github.com/vbe0201/ade9b80f2d3b64643d854938d40a0a2d
0
0
0
e81dbd23afaf25d2cb8a21092aedb2236f38b279
17,573
py
Python
lib/matplotlib/tests/test_colors.py
yuvallanger/matplotlib
e0020d318a9a9685594c6bff4631f74599321459
[ "MIT", "BSD-3-Clause" ]
8
2017-04-11T08:55:30.000Z
2022-03-25T04:31:26.000Z
lib/matplotlib/tests/test_colors.py
epgauss/matplotlib
c9898ea9a30c67c579ab27cd61b68e2abae0fb0e
[ "MIT", "BSD-3-Clause" ]
null
null
null
lib/matplotlib/tests/test_colors.py
epgauss/matplotlib
c9898ea9a30c67c579ab27cd61b68e2abae0fb0e
[ "MIT", "BSD-3-Clause" ]
14
2015-10-05T04:15:46.000Z
2020-06-11T18:06:02.000Z
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import itertools from distutils.version import LooseVersion as V from nose.tools import assert_raises import numpy as np from numpy.testing.utils import assert_array_equal, assert_array_almost_equa...
39.051111
79
0.521937
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import itertools from distutils.version import LooseVersion as V from nose.tools import assert_raises import numpy as np from numpy.testing.utils import assert_array_equal, assert_array_almost_equa...
5,089
0
209
e4ea4c4a24c17086538cd21bb2c6bfd5a1d14c23
1,958
py
Python
application/preprocessing/stopwords.py
danorel/CD-Inverted-Index
88a4eee855fe32fdb41602112ded24a66618431a
[ "MIT" ]
1
2021-05-19T10:07:09.000Z
2021-05-19T10:07:09.000Z
application/preprocessing/stopwords.py
danorel/CD-Inverted-Index
88a4eee855fe32fdb41602112ded24a66618431a
[ "MIT" ]
null
null
null
application/preprocessing/stopwords.py
danorel/CD-Inverted-Index
88a4eee855fe32fdb41602112ded24a66618431a
[ "MIT" ]
null
null
null
import enum
26.106667
148
0.508682
import enum class Languages(enum.Enum): ukrainian = 1 class StopwordsCleaner: @classmethod def __choose_language(cls, language) -> list: """ Lemmatizer choosing :type language: str """ # NOT DONE YET if language == Languages.ukrai...
0
1,898
46
4971af2ccef80f51f5261674f9c7be7869a55aa6
753
py
Python
certn-python/certn/api/auth.py
livebungalow/certn-python-public
aa411626a2918e37c3bbe26023b1b97014860414
[ "MIT" ]
null
null
null
certn-python/certn/api/auth.py
livebungalow/certn-python-public
aa411626a2918e37c3bbe26023b1b97014860414
[ "MIT" ]
null
null
null
certn-python/certn/api/auth.py
livebungalow/certn-python-public
aa411626a2918e37c3bbe26023b1b97014860414
[ "MIT" ]
1
2019-07-04T00:19:15.000Z
2019-07-04T00:19:15.000Z
from certn.api.api import API
27.888889
89
0.612218
from certn.api.api import API class Auth(API): path = '/api/v1' def login(self): '''basic authentication returns the user id and token''' response = self.client.post( path=f'{self.path}/authenticate/', data={'expires': None}, is_authenticated=False, ...
159
540
23
0f358cfd4138a54754752990868e328e80ac937b
442
py
Python
examples/migrations/0005_advancedfields_file_field_two.py
sayanjap/DynamicForms
071707de36d109fe3a17ae5df239240ea5ba707f
[ "BSD-3-Clause" ]
42
2018-01-18T14:50:05.000Z
2022-03-24T18:34:19.000Z
examples/migrations/0005_advancedfields_file_field_two.py
sayanjap/DynamicForms
071707de36d109fe3a17ae5df239240ea5ba707f
[ "BSD-3-Clause" ]
14
2018-12-05T21:39:23.000Z
2022-02-27T06:43:48.000Z
examples/migrations/0005_advancedfields_file_field_two.py
sayanjap/DynamicForms
071707de36d109fe3a17ae5df239240ea5ba707f
[ "BSD-3-Clause" ]
5
2018-01-18T16:32:20.000Z
2021-06-07T10:15:18.000Z
# Generated by Django 3.0.10 on 2020-09-15 07:07 from django.db import migrations, models
23.263158
82
0.628959
# Generated by Django 3.0.10 on 2020-09-15 07:07 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('examples', '0004_basicfields_password_field'), ] operations = [ migrations.AddField( model_name='advancedfields', n...
0
327
23
6ccf625c3351d592e09c1eca0c6a727ba7e80593
19,012
py
Python
website/ctrl/forum.py
Kapzy9r/wwmmo
67038053613d714a50653001ddd05021a13b6949
[ "MIT" ]
1
2020-04-14T11:32:58.000Z
2020-04-14T11:32:58.000Z
website/ctrl/forum.py
Kapzy9r/wwmmo
67038053613d714a50653001ddd05021a13b6949
[ "MIT" ]
null
null
null
website/ctrl/forum.py
Kapzy9r/wwmmo
67038053613d714a50653001ddd05021a13b6949
[ "MIT" ]
null
null
null
import datetime import re import logging import random from google.appengine.api import memcache from google.appengine.api import mail from google.appengine.api import search from google.appengine.api import users from google.appengine.ext import db from google.appengine.ext import deferred import ctrl import ctr...
34.504537
152
0.688828
import datetime import re import logging import random from google.appengine.api import memcache from google.appengine.api import mail from google.appengine.api import search from google.appengine.api import users from google.appengine.ext import db from google.appengine.ext import deferred import ctrl import ctr...
3,860
0
208
cce48155feb12e9de28b4f26e2575e40dcc0f875
2,408
py
Python
modules/animals.py
jvicu2001/alexis-bot
6b10377e3ec61aaa6051220ae9684b2f8f73b36e
[ "MIT" ]
7
2017-05-01T01:06:02.000Z
2017-09-07T18:58:37.000Z
modules/animals.py
jvicu2001/alexis-bot
6b10377e3ec61aaa6051220ae9684b2f8f73b36e
[ "MIT" ]
67
2017-12-03T21:38:00.000Z
2022-03-11T23:14:11.000Z
modules/animals.py
jvicu2001/alexis-bot
6b10377e3ec61aaa6051220ae9684b2f8f73b36e
[ "MIT" ]
8
2017-05-01T01:06:07.000Z
2017-09-16T10:34:19.000Z
import random from bot import Command, utils, categories url_settings = { 'cat': ['http://aws.random.cat/meow', ['gato', 'gatito', 'neko'], 'file'], 'dog': ['https://dog.ceo/api/breeds/image/random', ['perro', 'perrito', 'doggo'], 'message'], 'shiba': ['http://shibe.online/api/shibes', ['shibe', 'shibainu...
37.046154
120
0.519934
import random from bot import Command, utils, categories url_settings = { 'cat': ['http://aws.random.cat/meow', ['gato', 'gatito', 'neko'], 'file'], 'dog': ['https://dog.ceo/api/breeds/image/random', ['perro', 'perrito', 'doggo'], 'message'], 'shiba': ['http://shibe.online/api/shibes', ['shibe', 'shibainu...
1,535
112
23
e8adfc21f8912426bbba47effb9094816853c2f0
1,837
py
Python
website/server/codenames/generators/connector.py
mderijk/codenames
7133a8e85243550dddf4a64e90c9550f3b9e2cb4
[ "MIT" ]
2
2021-06-10T20:53:06.000Z
2021-06-11T10:45:16.000Z
website/server/codenames/generators/connector.py
mderijk/codenames
7133a8e85243550dddf4a64e90c9550f3b9e2cb4
[ "MIT" ]
null
null
null
website/server/codenames/generators/connector.py
mderijk/codenames
7133a8e85243550dddf4a64e90c9550f3b9e2cb4
[ "MIT" ]
1
2021-07-26T07:05:38.000Z
2021-07-26T07:05:38.000Z
import multiprocessing.connection import os import socket import sys import socket from .protocol import Protocol # a small hack to make the listener support non-blocking and timeout mode # Connector class
25.513889
100
0.722918
import multiprocessing.connection import os import socket import sys import socket from .protocol import Protocol # a small hack to make the listener support non-blocking and timeout mode class Listener(multiprocessing.connection.Listener): def accept(self, *args, timeout=None, **kwargs): if timeout: self._lis...
1,386
26
215
00735001c2f39a08534459a63e1b76e4dfd190da
904
py
Python
generator/substitutor.py
rddunphy/pwg
47ed13d3a8120e2c21e4ff28af08deeddbbb9d66
[ "MIT" ]
null
null
null
generator/substitutor.py
rddunphy/pwg
47ed13d3a8120e2c21e4ff28af08deeddbbb9d66
[ "MIT" ]
null
null
null
generator/substitutor.py
rddunphy/pwg
47ed13d3a8120e2c21e4ff28af08deeddbbb9d66
[ "MIT" ]
null
null
null
import random
26.588235
65
0.639381
import random def _toggle_case(ch): if ch == ch.lower(): return ch.upper() return ch.lower() def _substitute_char(ch, substitutions): ch = ch.lower() if ch in substitutions: return random.choice(substitutions[ch]) else: return _toggle_case(ch) def substitute(string, con...
818
0
69
43829f8e584c907fdf6af75c4560e9e3478ef2a0
10,836
py
Python
scripts/run_tests.py
JorisHerbots/aioquic
a3d95020078939d7ec7d5768e06db9fa53cbf287
[ "BSD-3-Clause" ]
1
2022-01-08T03:07:40.000Z
2022-01-08T03:07:40.000Z
scripts/run_tests.py
JorisHerbots/aioquic
a3d95020078939d7ec7d5768e06db9fa53cbf287
[ "BSD-3-Clause" ]
null
null
null
scripts/run_tests.py
JorisHerbots/aioquic
a3d95020078939d7ec7d5768e06db9fa53cbf287
[ "BSD-3-Clause" ]
1
2020-04-30T21:00:00.000Z
2020-04-30T21:00:00.000Z
import subprocess # need to run setup.py first to make sure all our changes are compiled before running # if you didn't make changes to aioquic, you can comment this step out # need to run this from inside the root dir # so do python3 scripts/run_tests.py print("Compiling...") process = subprocess.run("{}".format("...
55.85567
272
0.66842
import subprocess # need to run setup.py first to make sure all our changes are compiled before running # if you didn't make changes to aioquic, you can comment this step out # need to run this from inside the root dir # so do python3 scripts/run_tests.py print("Compiling...") process = subprocess.run("{}".format("...
1,862
-6
164
078c266bfb0d03456b4eacc54cbb665b4eebd7ca
232
py
Python
homeassistant/components/advantage_air/const.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
1
2020-12-17T19:05:31.000Z
2020-12-17T19:05:31.000Z
homeassistant/components/advantage_air/const.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
56
2020-08-03T07:30:54.000Z
2022-03-31T06:02:04.000Z
homeassistant/components/advantage_air/const.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
1
2021-04-30T01:57:13.000Z
2021-04-30T01:57:13.000Z
"""Constants used by Advantage Air integration.""" DOMAIN = "advantage_air" ADVANTAGE_AIR_RETRY = 5 ADVANTAGE_AIR_STATE_OPEN = "open" ADVANTAGE_AIR_STATE_CLOSE = "close" ADVANTAGE_AIR_STATE_ON = "on" ADVANTAGE_AIR_STATE_OFF = "off"
29
50
0.797414
"""Constants used by Advantage Air integration.""" DOMAIN = "advantage_air" ADVANTAGE_AIR_RETRY = 5 ADVANTAGE_AIR_STATE_OPEN = "open" ADVANTAGE_AIR_STATE_CLOSE = "close" ADVANTAGE_AIR_STATE_ON = "on" ADVANTAGE_AIR_STATE_OFF = "off"
0
0
0
0f9c09f8348b4f07928bc6ec571811ec5e2db857
172
py
Python
03 Bit Manipulation/3.7 Longest consecutive one.py
MrNevil/GeeksForGeeks-DSA-2
cb53912a2bfea5e04ce1b2c10e103a61ae1d903b
[ "MIT" ]
1
2021-04-03T06:23:42.000Z
2021-04-03T06:23:42.000Z
03 Bit Manipulation/3.7 Longest consecutive one.py
MrNevil/GeeksForGeeks-DSA-2
cb53912a2bfea5e04ce1b2c10e103a61ae1d903b
[ "MIT" ]
null
null
null
03 Bit Manipulation/3.7 Longest consecutive one.py
MrNevil/GeeksForGeeks-DSA-2
cb53912a2bfea5e04ce1b2c10e103a61ae1d903b
[ "MIT" ]
2
2021-03-08T21:13:22.000Z
2021-06-16T12:32:05.000Z
print(maxConsecutiveOnes(14)) # Output = 3 as binary(14) = 1110
19.111111
65
0.552326
def maxConsecutiveOnes(x): cnt = 0 while x: x = x&(x>>1) cnt += 1 return cnt print(maxConsecutiveOnes(14)) # Output = 3 as binary(14) = 1110
83
0
22
3189556b27e7fd6f0a8a9a78cb41b4b0730acf5f
204
py
Python
Ranmath/MatrixNormalizers/AbstractNormalizer.py
pawel-ta/ranmath
f52a15b10bdb5830a50c43da11fed5f182026587
[ "MIT" ]
null
null
null
Ranmath/MatrixNormalizers/AbstractNormalizer.py
pawel-ta/ranmath
f52a15b10bdb5830a50c43da11fed5f182026587
[ "MIT" ]
null
null
null
Ranmath/MatrixNormalizers/AbstractNormalizer.py
pawel-ta/ranmath
f52a15b10bdb5830a50c43da11fed5f182026587
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod
15.692308
47
0.666667
from abc import ABC, abstractmethod class AbstractNormalizer(ABC): def __init__(self): super().__init__() @abstractmethod def normalize(self, matrix, verbose=False): pass
60
83
23
ea2b01aea886d2f37de71471f383795fb6766619
1,888
py
Python
WeatherDash/Forecast_IO_py/forecastiopy/FIOMinutely.py
Rcarballo2222/ENGI-301
341f7e76ec842e1e1f449b2206633150abab1b31
[ "MIT" ]
null
null
null
WeatherDash/Forecast_IO_py/forecastiopy/FIOMinutely.py
Rcarballo2222/ENGI-301
341f7e76ec842e1e1f449b2206633150abab1b31
[ "MIT" ]
null
null
null
WeatherDash/Forecast_IO_py/forecastiopy/FIOMinutely.py
Rcarballo2222/ENGI-301
341f7e76ec842e1e1f449b2206633150abab1b31
[ "MIT" ]
1
2019-04-17T19:27:56.000Z
2019-04-17T19:27:56.000Z
# -*- coding: utf-8 -*- """ This module recieves an ForecastIO object and holds the minutely weather conditions. It has one class for this purpose. """ class FIOMinutely(object): """ This class recieves an ForecastIO object and holds the minutely weather conditions. It has one class for this purpose. "...
33.122807
81
0.597987
# -*- coding: utf-8 -*- """ This module recieves an ForecastIO object and holds the minutely weather conditions. It has one class for this purpose. """ class FIOMinutely(object): """ This class recieves an ForecastIO object and holds the minutely weather conditions. It has one class for this purpose. "...
0
0
0
03bd722265b3aa46494aea9bb9451e7c637cfa8d
2,100
py
Python
backup.py
lucapericlp/kohonen
c6e84cc95b0468e49d258d3e40843b8090dcd3a0
[ "MIT" ]
1
2020-04-07T06:59:41.000Z
2020-04-07T06:59:41.000Z
backup.py
lucapericlp/kohonen
c6e84cc95b0468e49d258d3e40843b8090dcd3a0
[ "MIT" ]
null
null
null
backup.py
lucapericlp/kohonen
c6e84cc95b0468e49d258d3e40843b8090dcd3a0
[ "MIT" ]
null
null
null
import math import random import pandas as pd from Neuron import Neuron from Neuron import getNormalised from Visualiser import Visualiser if __name__ == '__main__': main() # if 4 neurons are used then one is left unused as a cluster i.e it is extra # if 3 neurons all are used
30.882353
99
0.74
import math import random import pandas as pd from Neuron import Neuron from Neuron import getNormalised from Visualiser import Visualiser class Network(): def __init__(self,numNeurons): self.neurons = [] for i in range(numNeurons): self.neurons.append(Neuron(weights=[random.uniform(0,1), random.un...
1,658
-5
166
3b2595ebe0280acb97edd20ead3f07705eb3012c
345
py
Python
genomicode/timer.py
jefftc/changlab
11da8c415afefcba0b0216238387c75aeb3a56ac
[ "MIT" ]
9
2017-01-13T02:38:41.000Z
2021-04-08T00:44:39.000Z
genomicode/timer.py
jefftc/changlab
11da8c415afefcba0b0216238387c75aeb3a56ac
[ "MIT" ]
null
null
null
genomicode/timer.py
jefftc/changlab
11da8c415afefcba0b0216238387c75aeb3a56ac
[ "MIT" ]
4
2017-01-05T16:25:25.000Z
2019-12-12T20:07:38.000Z
""" Functions: wait """ TIMERS = {} # name -> time
15
56
0.556522
""" Functions: wait """ TIMERS = {} # name -> time def wait(delay, name=None): global TIMERS import time if delay is None: delay = 2 if name is None: name = "default" how_long = TIMERS.get(name, 0) + delay - time.time() if how_long > 0: time.sleep(how_long) TI...
266
0
23
d3000724ed087c837edb4323a518186e089d5ac4
1,117
py
Python
scripts/practice/FB-reRun/QueueUsingLinkedList.py
bhimeshchauhan/competitive_programming
e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5
[ "MIT" ]
null
null
null
scripts/practice/FB-reRun/QueueUsingLinkedList.py
bhimeshchauhan/competitive_programming
e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5
[ "MIT" ]
8
2020-09-05T16:04:31.000Z
2022-02-27T09:57:51.000Z
scripts/practice/FB-reRun/QueueUsingLinkedList.py
bhimeshchauhan/competitive_programming
e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5
[ "MIT" ]
null
null
null
""" Queue Using Linked List """ # Python3 program to demonstrate linked list # based implementation of queue # A linked list (LL) node # to store a queue entry # A class to represent a queue # The queue, front stores the front node # of LL and rear stores the last node of LL # Method to add an item to the queu...
17.184615
44
0.664279
""" Queue Using Linked List """ # Python3 program to demonstrate linked list # based implementation of queue # A linked list (LL) node # to store a queue entry class Node: def __init__(self, data): self.data = data self.next = None # A class to represent a queue # The queue, front stores the front node # o...
356
-19
164
2a3e82a35acbab969c1df2af10edbfb6bd0c9e8f
4,791
py
Python
python_modules/libraries/dagster-pandas/dagster_pandas/data_frame.py
pseudoPixels/dagster
ac78bdbec54754d35f51d706fc5b0bacfe49f2bf
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-pandas/dagster_pandas/data_frame.py
pseudoPixels/dagster
ac78bdbec54754d35f51d706fc5b0bacfe49f2bf
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-pandas/dagster_pandas/data_frame.py
pseudoPixels/dagster
ac78bdbec54754d35f51d706fc5b0bacfe49f2bf
[ "Apache-2.0" ]
null
null
null
import pandas as pd from dagster_pandas.constraints import ConstraintViolationException from dagster_pandas.validation import validate_collection_schema from dagster import ( DagsterInvariantViolationError, EventMetadataEntry, Field, Materialization, Path, String, TypeCheck, as_dagster_...
33.978723
98
0.675433
import pandas as pd from dagster_pandas.constraints import ConstraintViolationException from dagster_pandas.validation import validate_collection_schema from dagster import ( DagsterInvariantViolationError, EventMetadataEntry, Field, Materialization, Path, String, TypeCheck, as_dagster_...
3,202
0
113
320c82319d7caa371edf71cad37b302372b728d6
321
py
Python
tools/boneck/boneck.py
6vasia/ii-base
a36ea24040c24f5c3159b022670d49ffd68de638
[ "BSD-3-Clause" ]
1
2021-07-28T21:34:45.000Z
2021-07-28T21:34:45.000Z
tools/boneck/boneck.py
6vasia/ii-base
a36ea24040c24f5c3159b022670d49ffd68de638
[ "BSD-3-Clause" ]
null
null
null
tools/boneck/boneck.py
6vasia/ii-base
a36ea24040c24f5c3159b022670d49ffd68de638
[ "BSD-3-Clause" ]
null
null
null
cfg = open('config.user').read().splitlines() bonecho = open('bone.echo').read().strip() el = open('echo/%s' % bonecho).read().splitlines() lastbone = open('msg/%s' % el[-1]).read().splitlines()[8:] if lastbone: open('bone.echo','w').write(lastbone[0]) open('config.cfg','w').write('\n'.join(cfg+lastbone+['']))...
35.666667
62
0.613707
cfg = open('config.user').read().splitlines() bonecho = open('bone.echo').read().strip() el = open('echo/%s' % bonecho).read().splitlines() lastbone = open('msg/%s' % el[-1]).read().splitlines()[8:] if lastbone: open('bone.echo','w').write(lastbone[0]) open('config.cfg','w').write('\n'.join(cfg+lastbone+['']))...
0
0
0
f1343917f3d52976f0620a8993ab397c596d873e
321
py
Python
dialogos/quotes/urls.py
bertucho/epic-movie-quotes-quiz
09e4ec58a441ab74c1ce6e0fde4e71b08a4d7250
[ "MIT" ]
null
null
null
dialogos/quotes/urls.py
bertucho/epic-movie-quotes-quiz
09e4ec58a441ab74c1ce6e0fde4e71b08a4d7250
[ "MIT" ]
null
null
null
dialogos/quotes/urls.py
bertucho/epic-movie-quotes-quiz
09e4ec58a441ab74c1ce6e0fde4e71b08a4d7250
[ "MIT" ]
null
null
null
from django.conf.urls import patterns, url from quotes import views from views import * urlpatterns = patterns('', url(r'^sdf$', index, name='index'), url(r'^$', GameView.as_view(), name='game'), url(r'^post$', AnswerView.as_view(), name='answer'), url(r'^edit$', QuoteUpdate.as_view(), name='update'), ) ...
29.181818
55
0.65109
from django.conf.urls import patterns, url from quotes import views from views import * urlpatterns = patterns('', url(r'^sdf$', index, name='index'), url(r'^$', GameView.as_view(), name='game'), url(r'^post$', AnswerView.as_view(), name='answer'), url(r'^edit$', QuoteUpdate.as_view(), name='update'), ) ...
0
0
0
865a4f01f0d87df969a23aa8aff7cef597e09010
1,315
py
Python
readthedocs/payments/utils.py
yarons/readthedocs.org
05c99a0adc222a1d48654d305b492ec142c3026b
[ "MIT" ]
2,092
2019-06-29T07:47:30.000Z
2022-03-31T14:54:59.000Z
readthedocs/payments/utils.py
yarons/readthedocs.org
05c99a0adc222a1d48654d305b492ec142c3026b
[ "MIT" ]
2,389
2019-06-29T04:22:55.000Z
2022-03-31T22:57:49.000Z
readthedocs/payments/utils.py
yarons/readthedocs.org
05c99a0adc222a1d48654d305b492ec142c3026b
[ "MIT" ]
1,185
2019-06-29T21:49:31.000Z
2022-03-30T09:57:15.000Z
# -*- coding: utf-8 -*- """ Payment utility functions. These are mostly one-off functions. Define the bulk of Stripe operations on :py:class:`readthedocs.payments.forms.StripeResourceMixin`. """ import structlog import stripe from django.conf import settings stripe.api_key = settings.STRIPE_SECRET log = structlo...
28.586957
86
0.696578
# -*- coding: utf-8 -*- """ Payment utility functions. These are mostly one-off functions. Define the bulk of Stripe operations on :py:class:`readthedocs.payments.forms.StripeResourceMixin`. """ import structlog import stripe from django.conf import settings stripe.api_key = settings.STRIPE_SECRET log = structlo...
0
0
0
0f5142437d1335663663b0990f48013726117758
13,770
py
Python
firewall/__init__.py
dechainers/dechainy_plugin_firewall
53327f60880bdaf8a1d5ffe85662c46f7a8b44d4
[ "Apache-2.0" ]
null
null
null
firewall/__init__.py
dechainers/dechainy_plugin_firewall
53327f60880bdaf8a1d5ffe85662c46f7a8b44d4
[ "Apache-2.0" ]
null
null
null
firewall/__init__.py
dechainers/dechainy_plugin_firewall
53327f60880bdaf8a1d5ffe85662c46f7a8b44d4
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 DeChainers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
40.739645
122
0.59557
# Copyright 2022 DeChainers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
1,668
0
169
3427cff3c40bf62d3968f67131ef4ac40d2b5e58
1,174
py
Python
examples/rules/PropertiesTagsRequired.py
obobrova/cfn-python-lint
42c0cd89577a39e903e5ef8a337926cc7ff6822c
[ "MIT-0" ]
null
null
null
examples/rules/PropertiesTagsRequired.py
obobrova/cfn-python-lint
42c0cd89577a39e903e5ef8a337926cc7ff6822c
[ "MIT-0" ]
1
2020-04-15T16:36:10.000Z
2020-04-15T16:36:10.000Z
examples/rules/PropertiesTagsRequired.py
obobrova/cfn-python-lint
42c0cd89577a39e903e5ef8a337926cc7ff6822c
[ "MIT-0" ]
1
2020-01-05T01:05:55.000Z
2020-01-05T01:05:55.000Z
""" Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0 """ from cfnlint.rules import CloudFormationLintRule from cfnlint.rules import RuleMatch class PropertiesTagsRequired(CloudFormationLintRule): """Check if Tags have required keys""" id = 'E9000' shor...
32.611111
92
0.584327
""" Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0 """ from cfnlint.rules import CloudFormationLintRule from cfnlint.rules import RuleMatch class PropertiesTagsRequired(CloudFormationLintRule): """Check if Tags have required keys""" id = 'E9000' shor...
0
0
0
bc7a93bfaac1d5f34fa4f91b691e774c1559b5da
5,227
py
Python
neko/modules/mongodb/warns_db.py
itzrexmodz/Carla-1
c775063a0ef0d144649ace6f428c37e6e8d2c092
[ "MIT" ]
4
2021-12-26T11:42:45.000Z
2021-12-27T05:18:17.000Z
neko/modules/mongodb/warns_db.py
itzrexmodz/Carla-1
c775063a0ef0d144649ace6f428c37e6e8d2c092
[ "MIT" ]
null
null
null
neko/modules/mongodb/warns_db.py
itzrexmodz/Carla-1
c775063a0ef0d144649ace6f428c37e6e8d2c092
[ "MIT" ]
7
2021-12-26T14:49:37.000Z
2022-01-31T09:32:07.000Z
import datetime from .. import db, dt_delta warns = db.warn_s settings = db.warn_settings
25.748768
88
0.521523
import datetime from .. import db, dt_delta warns = db.warn_s settings = db.warn_settings def warn_user(user_id, chat_id, reason=""): _warn = warns.find_one({"chat_id": chat_id, "user_id": user_id}) if _warn: reasons = _warn.get("reasons") or [] reasons.append(reason) num_warns = _wa...
4,847
0
276
b080b624d3d62e4c09ba172f0c46e7190732c3cd
345
py
Python
CondTools/L1Trigger/python/L1UniformTags_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
CondTools/L1Trigger/python/L1UniformTags_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
CondTools/L1Trigger/python/L1UniformTags_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
# print i, initL1UniformTags.tagBaseVec[ i ]
34.5
61
0.727536
def initL1UniformTags( tagBase = "IDEAL" ): import FWCore.ParameterSet.Config as cms from CondTools.L1Trigger.L1CondEnum_cfi import L1CondEnum initL1UniformTags.tagBaseVec = [] for i in range( 0, L1CondEnum.NumL1Cond ): initL1UniformTags.tagBaseVec.append( tagBase ) # print i, initL1Uni...
271
0
22
672442e7754fca2ff308af5c61785d64cbe504b0
1,398
py
Python
examples/example4.py
ZimmermanGroup/conformer-rl
beb98cbee6ba6efba686d7c6eebbf33fd737f279
[ "MIT" ]
9
2021-09-03T18:46:46.000Z
2022-03-22T05:47:20.000Z
examples/example4.py
ZimmermanGroup/conformer-rl
beb98cbee6ba6efba686d7c6eebbf33fd737f279
[ "MIT" ]
4
2021-07-15T03:57:26.000Z
2021-08-03T06:27:28.000Z
examples/example4.py
ZimmermanGroup/conformer-rl
beb98cbee6ba6efba686d7c6eebbf33fd737f279
[ "MIT" ]
1
2022-03-17T01:59:36.000Z
2022-03-17T01:59:36.000Z
import numpy as np import torch from conformer_rl import utils from conformer_rl.agents import A2CAgent from conformer_rl.config import Config from conformer_rl.environments import Task from conformer_rl.models import RTGN from conformer_rl.molecule_generation import test_alkane device = torch.device("cuda:0" if tor...
33.285714
170
0.752504
import numpy as np import torch from conformer_rl import utils from conformer_rl.agents import A2CAgent from conformer_rl.config import Config from conformer_rl.environments import Task from conformer_rl.models import RTGN from conformer_rl.molecule_generation import test_alkane device = torch.device("cuda:0" if tor...
0
0
0
525a8b00826a337a4c293642d7c027ab056d2b82
2,259
py
Python
nlp/router.py
kirollosHossam/MachineLearningTask
3780513af04cf7bb97432436b4714c32d1c271e6
[ "MIT" ]
null
null
null
nlp/router.py
kirollosHossam/MachineLearningTask
3780513af04cf7bb97432436b4714c32d1c271e6
[ "MIT" ]
null
null
null
nlp/router.py
kirollosHossam/MachineLearningTask
3780513af04cf7bb97432436b4714c32d1c271e6
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import Dict, List, Optional, Union from fastapi import FastAPI, HTTPException from pydantic import BaseModel from nlp.nlp import Trainer app = FastAPI() trainer = Trainer() #BaseModel is used as data validator when using fast api it cares all about exception handilng and ...
30.527027
107
0.715803
from __future__ import annotations from typing import Dict, List, Optional, Union from fastapi import FastAPI, HTTPException from pydantic import BaseModel from nlp.nlp import Trainer app = FastAPI() trainer = Trainer() #BaseModel is used as data validator when using fast api it cares all about exception handilng and ...
1,035
240
247
5e0c029a0d28d903e75c0e982a55151bc9d0cc84
720
py
Python
piecrust/__init__.py
ludovicchabant/PieCrust2
89b2bf268bfdaae24ff6cf6d8c29c0b1239be739
[ "Apache-2.0" ]
43
2015-04-24T05:30:04.000Z
2022-02-03T17:47:35.000Z
piecrust/__init__.py
ludovicchabant/PieCrust2
89b2bf268bfdaae24ff6cf6d8c29c0b1239be739
[ "Apache-2.0" ]
54
2015-01-03T01:58:44.000Z
2021-05-06T21:56:26.000Z
piecrust/__init__.py
ludovicchabant/PieCrust2
89b2bf268bfdaae24ff6cf6d8c29c0b1239be739
[ "Apache-2.0" ]
8
2015-05-10T01:50:46.000Z
2016-12-26T20:53:15.000Z
CACHE_DIR = '_cache' ASSETS_DIR = 'assets' TEMPLATES_DIR = 'templates' THEME_DIR = 'theme' THEMES_DIR = 'themes' PLUGINS_DIR = 'plugins' CONFIG_PATH = 'config.yml' THEME_CONFIG_PATH = 'theme_config.yml' THEME_INFO_PATH = 'theme_info.yml' ASSET_DIR_SUFFIX = '-assets' DEFAULT_FORMAT = 'markdown' DEFAULT_TEMPLATE_ENGIN...
22.5
68
0.754167
CACHE_DIR = '_cache' ASSETS_DIR = 'assets' TEMPLATES_DIR = 'templates' THEME_DIR = 'theme' THEMES_DIR = 'themes' PLUGINS_DIR = 'plugins' CONFIG_PATH = 'config.yml' THEME_CONFIG_PATH = 'theme_config.yml' THEME_INFO_PATH = 'theme_info.yml' ASSET_DIR_SUFFIX = '-assets' DEFAULT_FORMAT = 'markdown' DEFAULT_TEMPLATE_ENGIN...
0
0
0
c7dc32f321e6e4a28ef4432c2172548e6b4b2753
709
py
Python
installib/obfuscation_checker.py
ivanprjcts/installib
2baa4b34cad1672b3e11700c2e3c5ea17a4dbc53
[ "Apache-2.0" ]
null
null
null
installib/obfuscation_checker.py
ivanprjcts/installib
2baa4b34cad1672b3e11700c2e3c5ea17a4dbc53
[ "Apache-2.0" ]
null
null
null
installib/obfuscation_checker.py
ivanprjcts/installib
2baa4b34cad1672b3e11700c2e3c5ea17a4dbc53
[ "Apache-2.0" ]
null
null
null
import os import hashlib
29.541667
108
0.603667
import os import hashlib def _hashfile(filepath): sha1 = hashlib.sha1() f = open(filepath, 'rb') try: sha1.update(f.read()) finally: f.close() return sha1.hexdigest() def _equal_hash(file1, file2): return _hashfile(file1) == _hashfile(file2) def assert_not_equal_hash(path_t...
612
0
69
15018b8b4e7500f24e9cb9d0490678a32711cf09
23,199
py
Python
kopf/reactor/handling.py
damc-dev/kopf
7c344fc682759bbf0647da60933021a75b3862d3
[ "MIT" ]
null
null
null
kopf/reactor/handling.py
damc-dev/kopf
7c344fc682759bbf0647da60933021a75b3862d3
[ "MIT" ]
null
null
null
kopf/reactor/handling.py
damc-dev/kopf
7c344fc682759bbf0647da60933021a75b3862d3
[ "MIT" ]
null
null
null
""" Conversion of low-level events to high-level causes, and handling them. These functions are invoked from the queueing module `kopf.reactor.queueing`, which are the actual event loop of the operator process. The conversion of the low-level events to the high-level causes is done by checking the object's state and ...
44.357553
116
0.687357
""" Conversion of low-level events to high-level causes, and handling them. These functions are invoked from the queueing module `kopf.reactor.queueing`, which are the actual event loop of the operator process. The conversion of the low-level events to the high-level causes is done by checking the object's state and ...
175
0
26
2bb069623fadcbb035f2202aa16c63ec3c42a1ed
448
py
Python
snipy/scope_factory.py
dade-u/snipy
408520867179f99b3158b57520e2619f3fecd69b
[ "MIT" ]
1
2017-08-09T09:29:22.000Z
2017-08-09T09:29:22.000Z
snipy/scope_factory.py
dade-u/snipy
408520867179f99b3158b57520e2619f3fecd69b
[ "MIT" ]
null
null
null
snipy/scope_factory.py
dade-u/snipy
408520867179f99b3158b57520e2619f3fecd69b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from contextlib import contextmanager # from snipy.odict import odict _stack = [None] @contextmanager
14.933333
37
0.631696
# -*- coding: utf-8 -*- from contextlib import contextmanager # from snipy.odict import odict _stack = [None] class Scope(object): def __init__(self, name): self.name = name @contextmanager def vscope(name): # get current scope or new scope # append hierachical information sc = Scope(name)...
223
-1
94
10334a7fe4170894486c6af95188eedeca86ef92
55
py
Python
listener/normal/custom/__init__.py
andymckay/arecibo
eb6787ea0a276047ef5add2df67a4dd051e5c961
[ "Apache-2.0" ]
6
2016-01-26T04:47:52.000Z
2022-01-24T19:55:04.000Z
listener/normal/custom/__init__.py
andymckay/arecibo
eb6787ea0a276047ef5add2df67a4dd051e5c961
[ "Apache-2.0" ]
6
2017-02-12T05:11:25.000Z
2017-02-12T05:12:15.000Z
listener/normal/custom/__init__.py
andymckay/arecibo
eb6787ea0a276047ef5add2df67a4dd051e5c961
[ "Apache-2.0" ]
2
2015-12-09T22:37:58.000Z
2021-09-09T17:04:33.000Z
try: import listeners except ImportError: pass
11
20
0.709091
try: import listeners except ImportError: pass
0
0
0
bb668dcb39e4acf30a4628fb7b8d11525437ea6c
1,212
py
Python
setup.py
philip-hash/MTN
ce9b3bf585ceb8342261313ab527ffbcdf34c0b5
[ "MIT" ]
null
null
null
setup.py
philip-hash/MTN
ce9b3bf585ceb8342261313ab527ffbcdf34c0b5
[ "MIT" ]
null
null
null
setup.py
philip-hash/MTN
ce9b3bf585ceb8342261313ab527ffbcdf34c0b5
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages, Extension from pathlib import Path this_directory = Path(__file__).parent long_description = (this_directory / "README.md").read_text() VERSION = '0.0.6' DESCRIPTION = 'Library used to Normalize numerical time-series data' LONG_DESCRIPTION = 'A package that allows ...
37.875
191
0.688944
from setuptools import setup, find_packages, Extension from pathlib import Path this_directory = Path(__file__).parent long_description = (this_directory / "README.md").read_text() VERSION = '0.0.6' DESCRIPTION = 'Library used to Normalize numerical time-series data' LONG_DESCRIPTION = 'A package that allows ...
0
0
0
ed4d6ecf028e692369dd51a8ba6206a33a31e1bf
536
py
Python
app/grandchallenge/hanging_protocols/urls.py
comic/comic-django
4f534fae2c7d2102e94991667398aef12394e32e
[ "Apache-2.0" ]
7
2016-11-05T07:16:30.000Z
2017-11-23T03:38:03.000Z
app/grandchallenge/hanging_protocols/urls.py
comic/comic-django
4f534fae2c7d2102e94991667398aef12394e32e
[ "Apache-2.0" ]
113
2015-05-26T09:27:59.000Z
2018-03-21T10:45:56.000Z
app/grandchallenge/hanging_protocols/urls.py
comic/comic-django
4f534fae2c7d2102e94991667398aef12394e32e
[ "Apache-2.0" ]
7
2015-07-16T20:11:22.000Z
2017-06-06T02:41:24.000Z
from django.urls import path from grandchallenge.hanging_protocols.views import ( HangingProtocolCreate, HangingProtocolDetail, HangingProtocolList, HangingProtocolUpdate, ) app_name = "hanging-protocols" urlpatterns = [ path("", HangingProtocolList.as_view(), name="list"), path(...
29.777778
76
0.699627
from django.urls import path from grandchallenge.hanging_protocols.views import ( HangingProtocolCreate, HangingProtocolDetail, HangingProtocolList, HangingProtocolUpdate, ) app_name = "hanging-protocols" urlpatterns = [ path("", HangingProtocolList.as_view(), name="list"), path(...
0
0
0
4850fded809f5c4c03a4fe3d475ebddb547c8910
12,026
py
Python
train.py
taowenyin/PatchNetVLAD
b0f63c8de7677bc27c8fa7760c1bdfb89bc0cfec
[ "MIT" ]
1
2021-08-10T02:24:00.000Z
2021-08-10T02:24:00.000Z
train.py
taowenyin/PatchNetVLAD
b0f63c8de7677bc27c8fa7760c1bdfb89bc0cfec
[ "MIT" ]
null
null
null
train.py
taowenyin/PatchNetVLAD
b0f63c8de7677bc27c8fa7760c1bdfb89bc0cfec
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' MIT License Copyright (c) 2021 Stephen Hausler, Sourav Garg, Ming Xu, Michael Milford and Tobias Fischer 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 restric...
45.041199
142
0.651339
#!/usr/bin/env python ''' MIT License Copyright (c) 2021 Stephen Hausler, Sourav Garg, Ming Xu, Michael Milford and Tobias Fischer 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 restric...
0
0
0
428ecb59ce2f80850126f403f67d8d5fd1d223cb
133
py
Python
output/models/sun_data/attr_decl/ad_name/ad_name00104m/ad_name00104m5_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_name00104m/ad_name00104m5_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_name00104m/ad_name00104m5_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.sun_data.attr_decl.ad_name.ad_name00104m.ad_name00104m5_xsd.ad_name00104m5 import Root __all__ = [ "Root", ]
22.166667
105
0.796992
from output.models.sun_data.attr_decl.ad_name.ad_name00104m.ad_name00104m5_xsd.ad_name00104m5 import Root __all__ = [ "Root", ]
0
0
0
2299642d6845e185f37f34afaad6bf76d5e12526
4,075
py
Python
generated-libraries/python/netapp/aggr/filter_attrs_info.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
2
2017-03-28T15:31:26.000Z
2018-08-16T22:15:18.000Z
generated-libraries/python/netapp/aggr/filter_attrs_info.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
generated-libraries/python/netapp/aggr/filter_attrs_info.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
from netapp.netapp_object import NetAppObject class FilterAttrsInfo(NetAppObject): """ List of filters based on attributes of an aggregate. """ _is_local = None @property def is_local(self): """ If true, returns aggregates owned by the local node. It includes ta...
28.900709
91
0.554847
from netapp.netapp_object import NetAppObject class FilterAttrsInfo(NetAppObject): """ List of filters based on attributes of an aggregate. """ _is_local = None @property def is_local(self): """ If true, returns aggregates owned by the local node. It includes ta...
1,582
0
265
365e5102b4767a425fd536cf993ba62a742ed401
600
py
Python
bdshare/__init__.py
rochi88/dshare
9dc46baff822be2ae7a7541fa10535a0299fbb5e
[ "MIT" ]
10
2020-04-09T06:34:48.000Z
2022-02-07T09:39:22.000Z
bdshare/__init__.py
rochi88/dshare
9dc46baff822be2ae7a7541fa10535a0299fbb5e
[ "MIT" ]
null
null
null
bdshare/__init__.py
rochi88/dshare
9dc46baff822be2ae7a7541fa10535a0299fbb5e
[ "MIT" ]
5
2020-08-06T06:54:04.000Z
2021-09-06T12:28:23.000Z
from ._version import __version__ __author__ = 'Raisul Islam' """ for trading data """ from bdshare.stock.trading import (get_current_trade_data, get_dsex_data, get_current_trading_code, get_hist_data, get_basic_hist_data, get_close_price_data, ge...
27.272727
113
0.72
from ._version import __version__ __author__ = 'Raisul Islam' """ for trading data """ from bdshare.stock.trading import (get_current_trade_data, get_dsex_data, get_current_trading_code, get_hist_data, get_basic_hist_data, get_close_price_data, ge...
0
0
0
c906a64412a8e14097c66c2644b8082b4f66a812
8,800
py
Python
tests/io/test_io_base.py
culebron/erde
9bbaaa1df46629a182c355413a120aa33dc6b377
[ "BSD-3-Clause" ]
16
2021-08-24T05:59:04.000Z
2021-11-16T12:30:34.000Z
tests/io/test_io_base.py
culebron/erde
9bbaaa1df46629a182c355413a120aa33dc6b377
[ "BSD-3-Clause" ]
null
null
null
tests/io/test_io_base.py
culebron/erde
9bbaaa1df46629a182c355413a120aa33dc6b377
[ "BSD-3-Clause" ]
2
2021-08-30T10:27:13.000Z
2021-08-31T09:46:49.000Z
from contextlib import contextmanager from erde.io.base import BaseReader, BaseWriter, BaseDriver from shapely.geometry import Point, LineString, Polygon from time import sleep from unittest import mock from unittest.mock import patch, Mock import geopandas as gpd import pytest import sys import traceback as tb d = '...
29.23588
164
0.731932
from contextlib import contextmanager from erde.io.base import BaseReader, BaseWriter, BaseDriver from shapely.geometry import Point, LineString, Polygon from time import sleep from unittest import mock from unittest.mock import patch, Mock import geopandas as gpd import pytest import sys import traceback as tb d = '...
7,889
0
410
db4d07d0bd1c5381b9d97e2518fec054d7c83526
641
py
Python
bildungslogin-plugin/tests/unittests/test_models.py
univention/bildungslogin
29bebe858a5445dd5566aad594b33b9dd716eca4
[ "MIT" ]
null
null
null
bildungslogin-plugin/tests/unittests/test_models.py
univention/bildungslogin
29bebe858a5445dd5566aad594b33b9dd716eca4
[ "MIT" ]
null
null
null
bildungslogin-plugin/tests/unittests/test_models.py
univention/bildungslogin
29bebe858a5445dd5566aad594b33b9dd716eca4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pytest from bildungslogin_plugin.models import User @pytest.mark.parametrize( "test_data", ( ("id", ""), ("first_name", ""), ("last_name", ""), ("licenses", {""}), ("context", {}), ), )
22.103448
65
0.616225
# -*- coding: utf-8 -*- import pytest from bildungslogin_plugin.models import User def test_user_with_valid_attributes(valid_user_kwargs): kwargs = valid_user_kwargs() user = User(**kwargs) assert user.dict() == kwargs @pytest.mark.parametrize( "test_data", ( ("id", ""), ("first...
323
0
45
3d55315ed70523b663daf7176ef0b6850f78bd5a
270
bzl
Python
example_http_archive_locked_constrained/upgraded_LOCKFILE.bzl
fenollp/bazel_lock
bc5f8edeb5523502552c2f11221e2b8b38e92c1a
[ "Apache-2.0" ]
null
null
null
example_http_archive_locked_constrained/upgraded_LOCKFILE.bzl
fenollp/bazel_lock
bc5f8edeb5523502552c2f11221e2b8b38e92c1a
[ "Apache-2.0" ]
null
null
null
example_http_archive_locked_constrained/upgraded_LOCKFILE.bzl
fenollp/bazel_lock
bc5f8edeb5523502552c2f11221e2b8b38e92c1a
[ "Apache-2.0" ]
null
null
null
locked = {} locked["http_archive> tar.gz github.com/bazelbuild/bazel-skylib ~=0.8 "] = {"sha256": "1dde365491125a3db70731e25658dfdd3bc5dbdfd11b840b3e987ecf043c7ca0", "url": "https://github.com/bazelbuild/bazel-skylib/releases/download/0.9.0/bazel_skylib-0.9.0.tar.gz"}
90
257
0.77037
locked = {} locked["http_archive> tar.gz github.com/bazelbuild/bazel-skylib ~=0.8 "] = {"sha256": "1dde365491125a3db70731e25658dfdd3bc5dbdfd11b840b3e987ecf043c7ca0", "url": "https://github.com/bazelbuild/bazel-skylib/releases/download/0.9.0/bazel_skylib-0.9.0.tar.gz"}
0
0
0
a054bd267afac311974d3a9c46078464614a0c09
628
py
Python
p046.py
yehnan/project_euler_python
9c8a50e992b71c1c313b08a16ea24298ce5cf020
[ "MIT" ]
1
2017-03-29T19:30:32.000Z
2017-03-29T19:30:32.000Z
p046.py
yehnan/project_euler_python
9c8a50e992b71c1c313b08a16ea24298ce5cf020
[ "MIT" ]
null
null
null
p046.py
yehnan/project_euler_python
9c8a50e992b71c1c313b08a16ea24298ce5cf020
[ "MIT" ]
1
2018-10-29T02:40:06.000Z
2018-10-29T02:40:06.000Z
# Problem 46: Goldbach's other conjecture # https://projecteuler.net/problem=46 # if __name__ == '__main__': import sys if len(sys.argv) >= 2 and sys.argv[1] == 'test': print(test()) else: print(main())
18.470588
68
0.469745
# Problem 46: Goldbach's other conjecture # https://projecteuler.net/problem=46 def goc(): n = 5 flag = +1 primes = set([2, 3]) while True: if all(n%p!=0 for p in primes): primes.add(n) else: if not any((n - 2*i*i) in primes for i in range(1,...
305
0
73
c7d141b05d1b2740dfa05cc9ef4888a3baa96d01
681
py
Python
setup.py
zbindenp/ch.zbindenonline.picture
780b6099537038c0f54f5401b7388527ab7cad02
[ "MIT" ]
null
null
null
setup.py
zbindenp/ch.zbindenonline.picture
780b6099537038c0f54f5401b7388527ab7cad02
[ "MIT" ]
null
null
null
setup.py
zbindenp/ch.zbindenonline.picture
780b6099537038c0f54f5401b7388527ab7cad02
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup, find_packages try: long_description = open("README.md").read() except IOError: long_description = "" setup( name="ch.zbindenonline.picture", version="0.0.3a", description="A library to handle pictures", license="MIT", author="Patrick Zb...
24.321429
53
0.637298
# -*- coding: utf-8 -*- from setuptools import setup, find_packages try: long_description = open("README.md").read() except IOError: long_description = "" setup( name="ch.zbindenonline.picture", version="0.0.3a", description="A library to handle pictures", license="MIT", author="Patrick Zb...
0
0
0
309efa05ea0c3fc33bb125345a4877e75b1e302a
11,782
py
Python
tests/graphs/algorithms/test_paths.py
ref-humbold/AlgoLib_Python
05f725504656ec93b879374a8cd87464d88fff77
[ "Apache-2.0" ]
null
null
null
tests/graphs/algorithms/test_paths.py
ref-humbold/AlgoLib_Python
05f725504656ec93b879374a8cd87464d88fff77
[ "Apache-2.0" ]
null
null
null
tests/graphs/algorithms/test_paths.py
ref-humbold/AlgoLib_Python
05f725504656ec93b879374a8cd87464d88fff77
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Tests: Algorithms for shortest paths""" import unittest from assertpy import assert_that from algolib.graphs import DirectedSimpleGraph, UndirectedSimpleGraph from algolib.graphs.algorithms import Paths, bellman_ford, dijkstra, floyd_warshall
56.917874
99
0.566627
# -*- coding: utf-8 -*- """Tests: Algorithms for shortest paths""" import unittest from assertpy import assert_that from algolib.graphs import DirectedSimpleGraph, UndirectedSimpleGraph from algolib.graphs.algorithms import Paths, bellman_ford, dijkstra, floyd_warshall def _from_list(graph, distances): return {...
11,079
359
69
0dd67ee07bafa26ffbfa3c77b3c517631eb548ca
6,441
py
Python
moler/cmd/unix/ip_link.py
jochenparm/moler
0253d677e0ef150206758c7991197ba5687d0965
[ "BSD-3-Clause" ]
57
2018-02-20T08:16:47.000Z
2022-03-28T10:36:57.000Z
moler/cmd/unix/ip_link.py
jochenparm/moler
0253d677e0ef150206758c7991197ba5687d0965
[ "BSD-3-Clause" ]
377
2018-07-19T11:56:27.000Z
2021-07-09T13:08:12.000Z
moler/cmd/unix/ip_link.py
jochenparm/moler
0253d677e0ef150206758c7991197ba5687d0965
[ "BSD-3-Clause" ]
24
2018-04-14T20:49:40.000Z
2022-03-29T10:44:26.000Z
# -*- coding: utf-8 -*- """ Ip link command module. """ __author__ = 'Julia Patacz' __copyright__ = 'Copyright (C) 2018, Nokia' __email__ = 'julia.patacz@nokia.com' import re from moler.cmd.unix.genericunix import GenericUnixCommand from moler.exceptions import ParsingDone COMMAND_OUTPUT = """ host:~ # ip link sh...
43.52027
201
0.620866
# -*- coding: utf-8 -*- """ Ip link command module. """ __author__ = 'Julia Patacz' __copyright__ = 'Copyright (C) 2018, Nokia' __email__ = 'julia.patacz@nokia.com' import re from moler.cmd.unix.genericunix import GenericUnixCommand from moler.exceptions import ParsingDone class IpLink(GenericUnixCommand): def...
3,904
1,116
23
6f494cab63080c693b2c3527d3e1b6dabae2dbb0
2,718
py
Python
paddle_ds/extras/srt_to_textfile.py
dalonlobo/asr
56d08017a69dd2c80a03310cbf2e3690ca287b96
[ "MIT" ]
null
null
null
paddle_ds/extras/srt_to_textfile.py
dalonlobo/asr
56d08017a69dd2c80a03310cbf2e3690ca287b96
[ "MIT" ]
1
2021-06-01T21:56:54.000Z
2021-06-01T21:56:54.000Z
paddle_ds/extras/srt_to_textfile.py
dalonlobo/asr
56d08017a69dd2c80a03310cbf2e3690ca287b96
[ "MIT" ]
1
2019-02-15T12:08:06.000Z
2019-02-15T12:08:06.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed Jan 17 15:06:25 2018 @author: dalonlobo """ from __future__ import absolute_import, division, \ print_function, unicode_literals import os import sys import argparse import logging import pysrt import glob from custom_utils imp...
37.232877
107
0.635394
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed Jan 17 15:06:25 2018 @author: dalonlobo """ from __future__ import absolute_import, division, \ print_function, unicode_literals import os import sys import argparse import logging import pysrt import glob from custom_utils imp...
0
0
0
638f39f37cb1887ac6653a6ebf222892d957f435
3,439
py
Python
hydrodynamics/hydrodynamicsbase.py
saridut/FloriPy
0117d358b9c2362ea32ecf9ec719fdaed87d3e14
[ "MIT" ]
null
null
null
hydrodynamics/hydrodynamicsbase.py
saridut/FloriPy
0117d358b9c2362ea32ecf9ec719fdaed87d3e14
[ "MIT" ]
null
null
null
hydrodynamics/hydrodynamicsbase.py
saridut/FloriPy
0117d358b9c2362ea32ecf9ec719fdaed87d3e14
[ "MIT" ]
null
null
null
#!/usr/bin/env python from abc import ABCMeta, abstractmethod import numpy as np from scipy import linalg as sla
29.904348
81
0.575749
#!/usr/bin/env python from abc import ABCMeta, abstractmethod import numpy as np from scipy import linalg as sla class HydrodynamicsBase: __metaclass__ = ABCMeta @abstractmethod def _calc_grm(self): pass @abstractmethod def _calc_gmm(self): pass @abstractmethod def upda...
39
3,262
23
932de32de77c81ff44b954e310c1d7815e13ecce
16,443
py
Python
modules/FIC_Github.py
Akhliskun/firefox-infra-changelog
5ca76e0be012acbea29d703c7728ecd92aff6f89
[ "MIT" ]
null
null
null
modules/FIC_Github.py
Akhliskun/firefox-infra-changelog
5ca76e0be012acbea29d703c7728ecd92aff6f89
[ "MIT" ]
74
2018-07-13T00:34:36.000Z
2018-12-17T16:23:24.000Z
modules/FIC_Github.py
Akhliskun/firefox-infra-changelog
5ca76e0be012acbea29d703c7728ecd92aff6f89
[ "MIT" ]
7
2018-07-14T15:51:17.000Z
2018-11-29T01:14:11.000Z
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import github3 from modules.FIC_FileHandler import FICFileHandler from modules.FIC_DataVault import FICDataVault from mod...
40.301471
156
0.614669
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import github3 from modules.FIC_FileHandler import FICFileHandler from modules.FIC_DataVault import FICDataVault from mod...
3,567
0
620
e33d55bf18910e145547acf32449abfce2faec4d
143
py
Python
tests/.ipynb_checkpoints/test_clocklike_reconstruction-checkpoint.py
mroctavious/Phylogeny
014461b5ec6323f42cf1c913f6a9bdba42e3bc05
[ "MIT" ]
2
2020-01-17T17:19:15.000Z
2021-04-18T22:27:59.000Z
tests/.ipynb_checkpoints/test_clocklike_reconstruction-checkpoint.py
mroctavious/Phylogeny
014461b5ec6323f42cf1c913f6a9bdba42e3bc05
[ "MIT" ]
null
null
null
tests/.ipynb_checkpoints/test_clocklike_reconstruction-checkpoint.py
mroctavious/Phylogeny
014461b5ec6323f42cf1c913f6a9bdba42e3bc05
[ "MIT" ]
2
2018-08-30T20:57:37.000Z
2020-09-09T06:29:02.000Z
from phylogeny.clocklike_reconstruction import simpledistance
35.75
61
0.748252
from phylogeny.clocklike_reconstruction import simpledistance def test_simpledistance(): assert simpledistance([0]*10, [1]*4 + [0]*6) == 4
59
0
23
b79293430cd9bd198caf3f11984b1aef0fd80517
235
py
Python
crawler/yhs_crawler/yhs_data_analyze.py
ArseneLupinhb/py_al
e2e4d25a00cb13d68da26c17f86f9cf1e47a79e1
[ "MIT" ]
1
2020-04-14T03:32:56.000Z
2020-04-14T03:32:56.000Z
crawler/yhs_crawler/yhs_data_analyze.py
ArseneLupinhb/py_al
e2e4d25a00cb13d68da26c17f86f9cf1e47a79e1
[ "MIT" ]
null
null
null
crawler/yhs_crawler/yhs_data_analyze.py
ArseneLupinhb/py_al
e2e4d25a00cb13d68da26c17f86f9cf1e47a79e1
[ "MIT" ]
null
null
null
# 导入库 import os import pandas as pd os.getcwd() source_path = os.getcwd() + r'/crawler/yhs_crawler/data/' # 读入数据 df_1 = pd.read_csv(source_path + 'yhs弹幕.csv', encoding='utf-8', engine='python') df_1.head(20) df_1.info() df_1.shape
15.666667
80
0.702128
# 导入库 import os import pandas as pd os.getcwd() source_path = os.getcwd() + r'/crawler/yhs_crawler/data/' # 读入数据 df_1 = pd.read_csv(source_path + 'yhs弹幕.csv', encoding='utf-8', engine='python') df_1.head(20) df_1.info() df_1.shape
0
0
0
66e7059707f09e1697e34f01e13af035f5eb1282
161
py
Python
PyRssReader/converter/convertertype.py
mohi/PyRssReader
9c1b07fa7574af9acd827946702e69e0ab2c5fab
[ "MIT" ]
4
2021-05-24T12:10:12.000Z
2021-08-04T14:29:47.000Z
PyRssReader/converter/convertertype.py
mohi/PyRssReader
9c1b07fa7574af9acd827946702e69e0ab2c5fab
[ "MIT" ]
null
null
null
PyRssReader/converter/convertertype.py
mohi/PyRssReader
9c1b07fa7574af9acd827946702e69e0ab2c5fab
[ "MIT" ]
null
null
null
from enum import Enum class ConverterType(Enum): """ Implments naming for type of convert operations """ NONE = 0 CUT = 1 REPLACE = 2
13.416667
51
0.608696
from enum import Enum class ConverterType(Enum): """ Implments naming for type of convert operations """ NONE = 0 CUT = 1 REPLACE = 2
0
0
0
073344b2c4b77653eeb9ec24d9ddb7b328ac702a
461
py
Python
pyfinder/theories/poset.py
punkdit/pyfinder
b59e5ecc4e8b10b3e4365750834090473b873ff6
[ "BSD-2-Clause" ]
null
null
null
pyfinder/theories/poset.py
punkdit/pyfinder
b59e5ecc4e8b10b3e4365750834090473b873ff6
[ "BSD-2-Clause" ]
null
null
null
pyfinder/theories/poset.py
punkdit/pyfinder
b59e5ecc4e8b10b3e4365750834090473b873ff6
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python from pyfinder.expr import * #______________________________________________________________________________ # Poset theory. element = Sort('element') le = Function('le', [element, element], BOOL) a = Variable('a', element) b = Variable('b', element) c = Variable('c', element) theory = Theory...
17.074074
79
0.642082
#!/usr/bin/env python from pyfinder.expr import * #______________________________________________________________________________ # Poset theory. element = Sort('element') le = Function('le', [element, element], BOOL) a = Variable('a', element) b = Variable('b', element) c = Variable('c', element) theory = Theory...
0
0
0
92e5cf0d3f91ede077fb779a1a97cbf351754b1f
11,755
py
Python
tests/select_test.py
BryanCutler/graph_def_editor
e8c44fe003df4f0e2c9791507abae556ee70bd71
[ "Apache-2.0" ]
13
2020-06-20T15:27:45.000Z
2021-08-30T21:12:52.000Z
tests/select_test.py
BryanCutler/graph_def_editor
e8c44fe003df4f0e2c9791507abae556ee70bd71
[ "Apache-2.0" ]
null
null
null
tests/select_test.py
BryanCutler/graph_def_editor
e8c44fe003df4f0e2c9791507abae556ee70bd71
[ "Apache-2.0" ]
4
2020-11-03T08:20:22.000Z
2020-12-27T17:45:41.000Z
# Copyright 2018 IBM. All Rights Reserved. # Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
36.058282
80
0.642365
# Copyright 2018 IBM. All Rights Reserved. # Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
5,292
5,418
23