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
8bcd980494f45374b1de2cc00e0bbf0dc26ca6bd
18,357
py
Python
kafkaesk/consumer.py
onna/kafkaesk
31480c476a420faebc23cd763b4b039b9378c9f6
[ "BSD-2-Clause" ]
24
2020-05-18T08:46:18.000Z
2021-11-01T12:51:54.000Z
kafkaesk/consumer.py
onna/kafkaesk
31480c476a420faebc23cd763b4b039b9378c9f6
[ "BSD-2-Clause" ]
40
2020-05-18T20:50:46.000Z
2021-08-24T17:28:29.000Z
kafkaesk/consumer.py
onna/kafkaesk
31480c476a420faebc23cd763b4b039b9378c9f6
[ "BSD-2-Clause" ]
3
2020-09-01T12:08:04.000Z
2021-01-05T10:11:22.000Z
from .exceptions import ConsumerUnhealthyException from .exceptions import HandlerTaskCancelled from .exceptions import StopConsumer from .exceptions import UnhandledMessage from .metrics import CONSUMED_MESSAGE_TIME from .metrics import CONSUMED_MESSAGES from .metrics import CONSUMED_MESSAGES_BATCH_SIZE from .metrics ...
36.935614
100
0.611538
from .exceptions import ConsumerUnhealthyException from .exceptions import HandlerTaskCancelled from .exceptions import StopConsumer from .exceptions import UnhandledMessage from .metrics import CONSUMED_MESSAGE_TIME from .metrics import CONSUMED_MESSAGES from .metrics import CONSUMED_MESSAGES_BATCH_SIZE from .metrics ...
15,040
923
218
91abba3d2adc0ce3668a924da98190df043dc094
3,661
py
Python
public_data/migrations/0018_auto_20210926_2332.py
MTES-MCT/sparte
3b8ae6d21da81ca761d64ae9dfe2c8f54487211c
[ "MIT" ]
null
null
null
public_data/migrations/0018_auto_20210926_2332.py
MTES-MCT/sparte
3b8ae6d21da81ca761d64ae9dfe2c8f54487211c
[ "MIT" ]
3
2022-02-10T11:47:58.000Z
2022-02-23T18:50:24.000Z
public_data/migrations/0018_auto_20210926_2332.py
MTES-MCT/sparte
3b8ae6d21da81ca761d64ae9dfe2c8f54487211c
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-09-26 23:32 from django.db import migrations, models
32.114035
85
0.523627
# Generated by Django 3.2.5 on 2021-09-26 23:32 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("public_data", "0017_auto_20210924_2219"), ] operations = [ migrations.RemoveField( model_name="artificielle2018", na...
0
3,551
23
e0a318193742577aceb5a0d3b563ebd2374caeab
11,063
py
Python
chris_backend/plugins/tests/test_models.py
jdtzmn/ChRIS_ultron_backEnd
b6604617c74fa1ecfaca108915c1b61e7a43b55f
[ "MIT" ]
null
null
null
chris_backend/plugins/tests/test_models.py
jdtzmn/ChRIS_ultron_backEnd
b6604617c74fa1ecfaca108915c1b61e7a43b55f
[ "MIT" ]
null
null
null
chris_backend/plugins/tests/test_models.py
jdtzmn/ChRIS_ultron_backEnd
b6604617c74fa1ecfaca108915c1b61e7a43b55f
[ "MIT" ]
null
null
null
import os, shutil from unittest import mock import swiftclient from django.test import TestCase, tag from django.contrib.auth.models import User from django.conf import settings from feeds.models import Feed, FeedFile from plugins.models import Plugin, PluginParameter, PluginInstance from plugins.models import Comp...
48.1
97
0.609057
import os, shutil from unittest import mock import swiftclient from django.test import TestCase, tag from django.contrib.auth.models import User from django.conf import settings from feeds.models import Feed, FeedFile from plugins.models import Plugin, PluginParameter, PluginInstance from plugins.models import Comp...
2,584
8,027
110
1047e9d75e176b88cd65293400cd5447cff92024
15,110
py
Python
ebook_dl/scraper.py
glenlancer/ebook-dl
9a8fa9e700e15727de64ecd4219dcb9c2a09c702
[ "MIT" ]
null
null
null
ebook_dl/scraper.py
glenlancer/ebook-dl
9a8fa9e700e15727de64ecd4219dcb9c2a09c702
[ "MIT" ]
null
null
null
ebook_dl/scraper.py
glenlancer/ebook-dl
9a8fa9e700e15727de64ecd4219dcb9c2a09c702
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- conding:utf-8 -*- from . import config from .thread_manager import ThreadManager from .db import Db from .db import BookInfo import os import re import typer import time import requests import logging import rich from urllib.parse import quote from tomd import Tomd from bs4 import BeautifulSo...
40.509383
131
0.646989
#!/usr/bin/python3 # -*- conding:utf-8 -*- from . import config from .thread_manager import ThreadManager from .db import Db from .db import BookInfo import os import re import typer import time import requests import logging import rich from urllib.parse import quote from tomd import Tomd from bs4 import BeautifulSo...
13,593
1,171
23
72a32d9f04ab8ab4ced9414b1f448ddca45e1b85
108
py
Python
vvsa/abstracts/economic_indicator.py
goncalovf/security-analysis
72b80ea7c0c5c93b6fd80a4e347ecdb401b7667e
[ "MIT" ]
1
2021-09-16T13:36:13.000Z
2021-09-16T13:36:13.000Z
vvsa/abstracts/economic_indicator.py
goncalovf/security-analysis
72b80ea7c0c5c93b6fd80a4e347ecdb401b7667e
[ "MIT" ]
null
null
null
vvsa/abstracts/economic_indicator.py
goncalovf/security-analysis
72b80ea7c0c5c93b6fd80a4e347ecdb401b7667e
[ "MIT" ]
null
null
null
from abc import ABC
15.428571
30
0.675926
from abc import ABC class Economic_Indicator(ABC): def __init__(self, name): self.name = name
29
9
49
d2c0be59550e7842db850111f2cf4186a92e7a8f
87
py
Python
py_proj/__init__.py
maryno-net/py-project
a8db26494087a9a290553ba0bfaa692c9000dde1
[ "MIT" ]
null
null
null
py_proj/__init__.py
maryno-net/py-project
a8db26494087a9a290553ba0bfaa692c9000dde1
[ "MIT" ]
null
null
null
py_proj/__init__.py
maryno-net/py-project
a8db26494087a9a290553ba0bfaa692c9000dde1
[ "MIT" ]
null
null
null
""" py_proj ~~~~~~~ Пустой проект на питоне. """ __version__ = '0.0.0'
7.909091
28
0.471264
""" py_proj ~~~~~~~ Пустой проект на питоне. """ __version__ = '0.0.0'
0
0
0
6f95a6f47ed3c2841f65cdd72753895f142c67aa
7,151
py
Python
tests/test_pybbcsig.py
beyond-blockchain/libbbcsig
865e7069c682f9fdcea01059171d618bd9dd501e
[ "Apache-2.0" ]
null
null
null
tests/test_pybbcsig.py
beyond-blockchain/libbbcsig
865e7069c682f9fdcea01059171d618bd9dd501e
[ "Apache-2.0" ]
null
null
null
tests/test_pybbcsig.py
beyond-blockchain/libbbcsig
865e7069c682f9fdcea01059171d618bd9dd501e
[ "Apache-2.0" ]
1
2021-08-04T10:00:43.000Z
2021-08-04T10:00:43.000Z
import os #import unittest import pybbcsig import binascii def _is_windows(): """ """ return os.name == "nt" sig = pybbcsig.PyBBcSigSecp256k1() in_privkey = b'\xd6Y\xbc#I\xfe\xed\x00\xe1x\xaa\xb4V\xd0\x9c\x01\xe2\x9a\xfd\xd2a\xabf\xcb\x14\xacM\x8e\xca2=\xbb' in_pubkey = b'\x04\x0fd(\xdd\x8fR\xf7@\x86\x...
35.053922
912
0.654734
import os #import unittest import pybbcsig import binascii def _is_windows(): """ """ return os.name == "nt" sig = pybbcsig.PyBBcSigSecp256k1() in_privkey = b'\xd6Y\xbc#I\xfe\xed\x00\xe1x\xaa\xb4V\xd0\x9c\x01\xe2\x9a\xfd\xd2a\xabf\xcb\x14\xacM\x8e\xca2=\xbb' in_pubkey = b'\x04\x0fd(\xdd\x8fR\xf7@\x86\x...
0
0
0
9e046cf6fd37e43d4432e2c93cba27b61ffda4e6
28
py
Python
mic/__init__.py
1x-eng/PROTON
2f27352f7eb9b46642325d800fcdb98ba5c99596
[ "BSD-3-Clause" ]
31
2018-09-28T05:00:02.000Z
2021-11-09T11:06:57.000Z
config/__init__.py
PruthviKumarBK/fitbit_webservice
68ff427311d888b951d48c98ac35f7b181d416c7
[ "MIT" ]
23
2019-05-17T08:48:07.000Z
2020-01-20T22:34:28.000Z
nucleus/istore/__init__.py
1x-eng/PROTON
2f27352f7eb9b46642325d800fcdb98ba5c99596
[ "BSD-3-Clause" ]
7
2018-09-28T16:57:35.000Z
2019-11-23T07:36:41.000Z
__author__ = 'pruthvi kumar'
28
28
0.785714
__author__ = 'pruthvi kumar'
0
0
0
d297f8860252eee12e4a3665b01d5afa296e7b75
4,542
py
Python
goss-testing/scripts/python/pyTest-ips-in-dnsmasq_d-in-correct-order.py
Cray-HPE/csm-testing
9d72e4a8a11102a037b729afbae0bfdefb4e2805
[ "MIT" ]
2
2021-12-03T20:56:33.000Z
2022-01-25T06:57:59.000Z
goss-testing/scripts/python/pyTest-ips-in-dnsmasq_d-in-correct-order.py
Cray-HPE/csm-testing
9d72e4a8a11102a037b729afbae0bfdefb4e2805
[ "MIT" ]
25
2021-11-12T18:46:06.000Z
2022-03-30T20:01:35.000Z
goss-testing/scripts/python/pyTest-ips-in-dnsmasq_d-in-correct-order.py
Cray-HPE/csm-testing
9d72e4a8a11102a037b729afbae0bfdefb4e2805
[ "MIT" ]
1
2022-02-23T18:10:46.000Z
2022-02-23T18:10:46.000Z
#!/usr/bin/env python3 # # MIT License # # (C) Copyright 2022 Hewlett Packard Enterprise Development LP # # 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 withou...
43.673077
132
0.655218
#!/usr/bin/env python3 # # MIT License # # (C) Copyright 2022 Hewlett Packard Enterprise Development LP # # 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 withou...
90
0
23
6cef0f6f343a55bfefa8c00a31e48c45f56fc66b
94
py
Python
src/lingrex/__init__.py
lingpy/lingrex
e0a560fd58006caa7a3a82f1a8d25f75f9f6649c
[ "MIT" ]
3
2019-02-14T15:06:45.000Z
2021-12-30T22:51:49.000Z
src/lingrex/__init__.py
lingpy/lingrex
e0a560fd58006caa7a3a82f1a8d25f75f9f6649c
[ "MIT" ]
19
2018-10-13T09:12:20.000Z
2021-11-09T07:53:01.000Z
src/lingrex/__init__.py
lingpy/lingrex
e0a560fd58006caa7a3a82f1a8d25f75f9f6649c
[ "MIT" ]
null
null
null
from lingrex.copar import CoPaR, density assert CoPaR and density __version__ = "1.1.2.dev0"
18.8
40
0.776596
from lingrex.copar import CoPaR, density assert CoPaR and density __version__ = "1.1.2.dev0"
0
0
0
fc29719d78085111882522fb969efafc9ce3d058
7,379
py
Python
westclass/gen.py
JohnGiorgi/WeSTClass
647ab2a4fe1b45e94e40caa4f2f9a50bc5e9d406
[ "Apache-2.0" ]
null
null
null
westclass/gen.py
JohnGiorgi/WeSTClass
647ab2a4fe1b45e94e40caa4f2f9a50bc5e9d406
[ "Apache-2.0" ]
2
2019-01-03T17:58:58.000Z
2019-01-04T00:31:14.000Z
westclass/gen.py
JohnGiorgi/WeSTClass
647ab2a4fe1b45e94e40caa4f2f9a50bc5e9d406
[ "Apache-2.0" ]
1
2019-01-03T18:31:39.000Z
2019-01-03T18:31:39.000Z
import os import numpy as np from spherecluster import VonMisesFisherMixture, sample_vMF np.random.seed(1234)
42.653179
118
0.622171
import os import numpy as np from spherecluster import VonMisesFisherMixture, sample_vMF np.random.seed(1234) def seed_expansion(word_sup_array, prob_sup_array, sz, write_path, vocabulary_inv, embedding_mat): expanded_seed = [] vocab_sz = len(vocabulary_inv) for j, word_class in enumerate(word_sup_array...
7,171
0
92
c5fcc1853db1ba4d840554f6658634f833033af9
7,452
py
Python
tests/test_squeues_request.py
FingerCrunch/scrapy
3225de725720bba246ba8c9845fe4b84bc0c82e7
[ "BSD-3-Clause" ]
41,267
2015-01-01T07:39:25.000Z
2022-03-31T20:09:40.000Z
tests/test_squeues_request.py
FingerCrunch/scrapy
3225de725720bba246ba8c9845fe4b84bc0c82e7
[ "BSD-3-Clause" ]
4,420
2015-01-02T09:35:38.000Z
2022-03-31T22:53:32.000Z
tests/test_squeues_request.py
FingerCrunch/scrapy
3225de725720bba246ba8c9845fe4b84bc0c82e7
[ "BSD-3-Clause" ]
11,080
2015-01-01T18:11:30.000Z
2022-03-31T15:33:19.000Z
import shutil import tempfile import unittest import queuelib from scrapy.squeues import ( PickleFifoDiskQueue, PickleLifoDiskQueue, MarshalFifoDiskQueue, MarshalLifoDiskQueue, FifoMemoryQueue, LifoMemoryQueue, ) from scrapy.http import Request from scrapy.spiders import Spider from scrapy.uti...
34.660465
112
0.637815
import shutil import tempfile import unittest import queuelib from scrapy.squeues import ( PickleFifoDiskQueue, PickleLifoDiskQueue, MarshalFifoDiskQueue, MarshalLifoDiskQueue, FifoMemoryQueue, LifoMemoryQueue, ) from scrapy.http import Request from scrapy.spiders import Spider from scrapy.uti...
6,003
375
679
4056c2a32274bdf16ec752628c55c728c461ea14
104
py
Python
logya/__init__.py
yaph/logya
9647f58a0b8653b56ad64332e235a76cab3acda9
[ "MIT" ]
12
2015-03-04T03:23:56.000Z
2020-11-17T08:09:17.000Z
logya/__init__.py
elaOnMars/logya
a9f256ac8840e21b348ac842b35683224e25b613
[ "MIT" ]
78
2015-01-05T11:40:41.000Z
2022-01-23T21:05:39.000Z
logya/__init__.py
elaOnMars/logya
a9f256ac8840e21b348ac842b35683224e25b613
[ "MIT" ]
6
2015-04-20T06:58:42.000Z
2022-01-31T00:36:29.000Z
# -*- coding: utf-8 -*- __author__ = 'Ramiro Gómez' __email__ = 'code@ramiro.org' __version__ = '5.0.0'
20.8
29
0.644231
# -*- coding: utf-8 -*- __author__ = 'Ramiro Gómez' __email__ = 'code@ramiro.org' __version__ = '5.0.0'
0
0
0
bcca9df667a8ef58947ffa37f575e51e1d6c54dc
966
py
Python
code.py
jamesbowman/py-eve
dd2dc7cdd9c5e5ef82f84132ec9a05d989788112
[ "BSD-3-Clause" ]
17
2020-01-29T04:24:48.000Z
2021-07-13T18:03:42.000Z
code.py
jamesbowman/py-eve
dd2dc7cdd9c5e5ef82f84132ec9a05d989788112
[ "BSD-3-Clause" ]
3
2020-12-28T00:48:06.000Z
2021-05-30T17:46:15.000Z
code.py
jamesbowman/py-eve
dd2dc7cdd9c5e5ef82f84132ec9a05d989788112
[ "BSD-3-Clause" ]
4
2020-03-08T01:19:14.000Z
2021-09-08T13:26:46.000Z
import bteve as eve gd = eve.Gameduino() gd.init() import pong import fruit import temperature demos = (pong, fruit, temperature) # demos[0].run(gd) sel = 0 prev_touch = False while True: gd.finish() c = gd.controllers()[0] if not prev_touch: if c['bdu']: sel = (sel - 1) if c[...
22.465116
95
0.564182
import bteve as eve gd = eve.Gameduino() gd.init() import pong import fruit import temperature demos = (pong, fruit, temperature) # demos[0].run(gd) sel = 0 prev_touch = False while True: gd.finish() c = gd.controllers()[0] if not prev_touch: if c['bdu']: sel = (sel - 1) if c[...
0
0
0
76166cf62baee4f8bac11d60a8d34ccfd53070aa
8,382
py
Python
pyDNase/scripts/wellington_bootstrap.py
zoi-mibtp/pyDNase
047d2f89af6109a530505b370782c4841d710cbf
[ "MIT" ]
34
2015-05-28T17:16:18.000Z
2022-03-04T11:54:37.000Z
pyDNase/scripts/wellington_bootstrap.py
zoi-mibtp/pyDNase
047d2f89af6109a530505b370782c4841d710cbf
[ "MIT" ]
39
2015-05-14T09:03:07.000Z
2020-05-13T11:40:28.000Z
pyDNase/scripts/wellington_bootstrap.py
zoi-mibtp/pyDNase
047d2f89af6109a530505b370782c4841d710cbf
[ "MIT" ]
24
2015-09-24T07:39:53.000Z
2021-07-13T02:37:24.000Z
#!/usr/bin/env python import pyDNase, pyDNase.footprinting import numpy as np from clint.textui import progress import multiprocessing as mp import argparse __version__ = "0.1.0" parser = argparse.ArgumentParser(description='Scores Differential Footprints using Wellington-Bootstrap.') parser.add_argument("-fp", ...
42.548223
125
0.605703
#!/usr/bin/env python import pyDNase, pyDNase.footprinting import numpy as np from clint.textui import progress import multiprocessing as mp import argparse __version__ = "0.1.0" def write_treat_to_disk(item): if item.results: for i in item.results: print(i, file=treatment_output) def write_...
2,740
1,712
92
09dfd928cdee8310a84bd1f6f85c08f272b1e928
623
py
Python
t1.py
dongmeng168/raspi_robot_car
893698cd8649ec7d51a4716f5acf415fe2f2d2f5
[ "BSD-2-Clause" ]
null
null
null
t1.py
dongmeng168/raspi_robot_car
893698cd8649ec7d51a4716f5acf415fe2f2d2f5
[ "BSD-2-Clause" ]
null
null
null
t1.py
dongmeng168/raspi_robot_car
893698cd8649ec7d51a4716f5acf415fe2f2d2f5
[ "BSD-2-Clause" ]
null
null
null
ms1 = MyShow() ms1.showName()
20.766667
43
0.532905
def catch(origin_func): def wrapper(self, *args, **kwargs): print("catch start") # print(self.name) origin_func(self, *args, **kwargs) print(self.name) print("catch end") return wrapper class Decorator(object): def __init__(self, f): self.f =...
416
43
126
e4e9eb18487f687ece7b0a8c1f2f0fdfa4595ebf
6,956
py
Python
v0/aia_eis_v0/utils/visualize_utils/two_vertical_contour.py
DreamBoatOve/aia_eis
458b4d29846669b10db4da1b3e86c0b394614ceb
[ "MIT" ]
1
2022-03-02T12:57:19.000Z
2022-03-02T12:57:19.000Z
v0/aia_eis_v0/utils/visualize_utils/two_vertical_contour.py
DreamBoatOve/aia_eis
458b4d29846669b10db4da1b3e86c0b394614ceb
[ "MIT" ]
null
null
null
v0/aia_eis_v0/utils/visualize_utils/two_vertical_contour.py
DreamBoatOve/aia_eis
458b4d29846669b10db4da1b3e86c0b394614ceb
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import BoundaryNorm from matplotlib.ticker import MaxNLocator from matplotlib import ticker, cm from playground.laiZhaoGui.goa.get_lai_manual_fitting_res import read_lai_manual_fitting_res, read_lai_test_coordinate, pack_lai_manual_fitting_res, ...
48.985915
172
0.679845
import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import BoundaryNorm from matplotlib.ticker import MaxNLocator from matplotlib import ticker, cm from playground.laiZhaoGui.goa.get_lai_manual_fitting_res import read_lai_manual_fitting_res, read_lai_test_coordinate, pack_lai_manual_fitting_res, ...
0
0
0
055971b4d0f7c1b8931618e17e88c3c031984606
384
py
Python
use_decorater.py
silenceFei/singleton
970aeacea3541ef215f3a92b83662f3d6243995f
[ "Apache-2.0" ]
null
null
null
use_decorater.py
silenceFei/singleton
970aeacea3541ef215f3a92b83662f3d6243995f
[ "Apache-2.0" ]
null
null
null
use_decorater.py
silenceFei/singleton
970aeacea3541ef215f3a92b83662f3d6243995f
[ "Apache-2.0" ]
null
null
null
@SingleTon test1 = TestClass() test2 = TestClass() print test1.a, test2.a test1.a = 2 print test1.a, test2.a print id(test1), id(test2)
18.285714
48
0.625
def SingleTon(cls, *args, **kwargs): instance = {} def _singleton(): if cls not in instance: instance[cls] = cls(*args, **kwargs) return instance[cls] return _singleton @SingleTon class TestClass(object): a = 1 test1 = TestClass() test2 = TestClass() print test1.a, test2....
188
13
44
e6e5d499d771424e99b0cd46ef0c30546e830d9b
1,623
py
Python
exercises/13_ransom/solution2.py
AnnieBrunton/biosystems-analytics-2020
219e961b07e62dae6c27675e1de94cb56c9adb8e
[ "MIT" ]
1
2021-05-19T19:07:56.000Z
2021-05-19T19:07:56.000Z
exercises/13_ransom/solution2.py
AnnieBrunton/biosystems-analytics-2020
219e961b07e62dae6c27675e1de94cb56c9adb8e
[ "MIT" ]
1
2020-02-11T20:15:59.000Z
2020-02-11T20:15:59.000Z
exercises/13_ransom/solution2.py
AnnieBrunton/biosystems-analytics-2020
219e961b07e62dae6c27675e1de94cb56c9adb8e
[ "MIT" ]
24
2020-01-15T17:34:40.000Z
2021-08-23T05:57:24.000Z
#!/usr/bin/env python3 """Ransom note""" import argparse import os import random # -------------------------------------------------- def get_args(): """Get command-line arguments""" parser = argparse.ArgumentParser( description='Ransom Note', formatter_class=argparse.ArgumentDefaultsHelpFor...
22.859155
73
0.473814
#!/usr/bin/env python3 """Ransom note""" import argparse import os import random # -------------------------------------------------- def get_args(): """Get command-line arguments""" parser = argparse.ArgumentParser( description='Ransom Note', formatter_class=argparse.ArgumentDefaultsHelpFor...
0
0
0
9bcde1745ec8d892e2b966bda42ec9ead442fb6b
970
py
Python
tests/test_yourcar.py
SebRut/python-yourcar
fa4b1e52381dd0a96f62dd633409667c6ecd10ef
[ "MIT" ]
null
null
null
tests/test_yourcar.py
SebRut/python-yourcar
fa4b1e52381dd0a96f62dd633409667c6ecd10ef
[ "MIT" ]
8
2020-06-12T04:37:37.000Z
2020-08-24T04:51:06.000Z
tests/test_yourcar.py
SebRut/python-yourcar
fa4b1e52381dd0a96f62dd633409667c6ecd10ef
[ "MIT" ]
null
null
null
import pytest from yourcar import YourCarAPIClient, Place LAT_ROSTOCK = 54.0833 LON_ROSTOCK = 12.1333 @pytest.fixture @pytest.fixture @pytest.fixture(scope="module", autouse=True) @pytest.mark.vcr() def test_places_successful(client): """Tests an API call to get places near a location in a given range""" ...
23.658537
75
0.707216
import pytest from yourcar import YourCarAPIClient, Place LAT_ROSTOCK = 54.0833 LON_ROSTOCK = 12.1333 @pytest.fixture def api_key(): import os return os.environ.get("YOURCAR_API_KEY", "YEK-IPA") @pytest.fixture def client(api_key): return YourCarAPIClient(api_key) @pytest.fixture(scope="module", au...
160
0
66
dc4ae7a785c1e22a2bfd63f37d10be3734760c8f
487
py
Python
pystratis/api/wallet/requestmodels/extpubkeyrequest.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
8
2021-06-30T20:44:22.000Z
2021-12-07T14:42:22.000Z
pystratis/api/wallet/requestmodels/extpubkeyrequest.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
2
2021-07-01T11:50:18.000Z
2022-01-25T18:39:49.000Z
pystratis/api/wallet/requestmodels/extpubkeyrequest.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
4
2021-07-01T04:36:42.000Z
2021-09-17T10:54:19.000Z
from typing import Optional from pydantic import Field from pystratis.api import Model # noinspection PyUnresolvedReferences class ExtPubKeyRequest(Model): """A request model for the wallet/extpubkey endpoint. Args: wallet_name (str): The wallet name. account_name (str, optional): The account...
30.4375
81
0.722793
from typing import Optional from pydantic import Field from pystratis.api import Model # noinspection PyUnresolvedReferences class ExtPubKeyRequest(Model): """A request model for the wallet/extpubkey endpoint. Args: wallet_name (str): The wallet name. account_name (str, optional): The account...
0
0
0
4b71e32eb21cadefd433af3f99d102a77a149de7
2,094
py
Python
DIL/crypto/AES256.py
HanSooLim/DIL-Project
069fa7e35a2e1edfff30dc2540d9b87f5db95dde
[ "MIT", "BSD-3-Clause" ]
2
2021-10-16T15:08:05.000Z
2021-10-16T15:59:57.000Z
DIL/crypto/AES256.py
HanSooLim/DIL-Project
069fa7e35a2e1edfff30dc2540d9b87f5db95dde
[ "MIT", "BSD-3-Clause" ]
8
2021-10-21T04:48:12.000Z
2021-11-07T03:09:25.000Z
DIL/crypto/AES256.py
HanSooLim/DIL-Project
069fa7e35a2e1edfff30dc2540d9b87f5db95dde
[ "MIT", "BSD-3-Clause" ]
3
2021-05-02T13:39:14.000Z
2021-05-31T14:05:56.000Z
import pandas, hashlib, base64 from Crypto import Random from Crypto.Cipher import AES from util import DataSetting DataFrame = pandas.DataFrame class AES256(DataSetting): """ | 암호화 기술 중 양방향 암호화(AES-256)를 구현한 클래스 | 모든 메소드는 생성자에 원본 데이터를 인자 값으로 넣으면 원본 데이터를 수정한다. Args: datas (pandas.DataFrame)...
24.348837
82
0.536772
import pandas, hashlib, base64 from Crypto import Random from Crypto.Cipher import AES from util import DataSetting DataFrame = pandas.DataFrame class AES256(DataSetting): """ | 암호화 기술 중 양방향 암호화(AES-256)를 구현한 클래스 | 모든 메소드는 생성자에 원본 데이터를 인자 값으로 넣으면 원본 데이터를 수정한다. Args: datas (pandas.DataFrame)...
292
0
80
7cb58a9fccba2b4158d2532461d1075653bc4ddf
789
py
Python
tests/check.py
denik/cython-ifdef
218162db1c1bd9afe4e06aac1de996fea1ba5bf3
[ "MIT" ]
3
2015-11-22T19:42:13.000Z
2020-02-10T08:16:00.000Z
tests/check.py
denik/cython-ifdef
218162db1c1bd9afe4e06aac1de996fea1ba5bf3
[ "MIT" ]
null
null
null
tests/check.py
denik/cython-ifdef
218162db1c1bd9afe4e06aac1de996fea1ba5bf3
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys import testmodule config = int(sys.argv[1]) if config == 0: not_debug() not_windows() elif config == 1: not_debug() windows() elif config == 2: debug() not_windows() elif config == 3: debug() windows() else: sys.exit('Invalid argument') print 'check...
18.785714
54
0.653992
#!/usr/bin/python import sys import testmodule def windows(): assert testmodule.X().windows_only() == 5 assert not hasattr(testmodule.X, 'unix_only') assert not hasattr(testmodule.X(), 'unix_only') def not_windows(): assert testmodule.X().unix_only() == 6 assert not hasattr(testmodule.X, 'window...
365
0
92
e025ba47e89fa915062db3b001e151b6e658b49d
3,362
py
Python
hatchet/tests/node.py
slabasan/llnl-hatchet
5fce542f435952ad93248feac8b0c47c44649b47
[ "MIT" ]
55
2017-10-06T18:50:15.000Z
2022-03-10T19:15:52.000Z
hatchet/tests/node.py
slabasan/llnl-hatchet
5fce542f435952ad93248feac8b0c47c44649b47
[ "MIT" ]
172
2018-02-01T01:02:04.000Z
2022-03-11T19:15:21.000Z
hatchet/tests/node.py
slabasan/llnl-hatchet
5fce542f435952ad93248feac8b0c47c44649b47
[ "MIT" ]
28
2017-11-22T14:27:22.000Z
2022-02-22T00:25:33.000Z
# Copyright 2017-2021 Lawrence Livermore National Security, LLC and other # Hatchet Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: MIT import pytest from hatchet.node import Node, MultiplePathError from hatchet.frame import Frame from hatchet.graph import Graph
26.896
85
0.560976
# Copyright 2017-2021 Lawrence Livermore National Security, LLC and other # Hatchet Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: MIT import pytest from hatchet.node import Node, MultiplePathError from hatchet.frame import Frame from hatchet.graph import Graph def test...
2,812
0
230
1285a695be87fef4d88cbfbcfbca608ee51ac83b
7,173
py
Python
applications/incompressible_fluid_application/python_scripts/trilinos_monolithic_solver_eulerian.py
lcirrott/Kratos
8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea
[ "BSD-4-Clause" ]
2
2019-10-25T09:28:10.000Z
2019-11-21T12:51:46.000Z
applications/incompressible_fluid_application/python_scripts/trilinos_monolithic_solver_eulerian.py
lcirrott/Kratos
8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea
[ "BSD-4-Clause" ]
13
2019-10-07T12:06:51.000Z
2020-02-18T08:48:33.000Z
applications/incompressible_fluid_application/python_scripts/trilinos_monolithic_solver_eulerian.py
lcirrott/Kratos
8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea
[ "BSD-4-Clause" ]
null
null
null
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 from KratosMultiphysics import * from KratosMultiphysics.mpi import * from KratosMultiphysics.MetisApplication import * from KratosMultiphysics.IncompressibleFluidApplication import * f...
38.358289
210
0.72048
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 from KratosMultiphysics import * from KratosMultiphysics.mpi import * from KratosMultiphysics.MetisApplication import * from KratosMultiphysics.IncompressibleFluidApplication import * f...
6,530
2
174
d38e1cb36595014c00e80605a97ca80995c9ac7a
777
py
Python
tests/integration/test_github_actions.py
vikasbhatia/asyncpraw
8b9e1bd72945023f6eb4567ff69ba13aa428a2d2
[ "BSD-2-Clause" ]
null
null
null
tests/integration/test_github_actions.py
vikasbhatia/asyncpraw
8b9e1bd72945023f6eb4567ff69ba13aa428a2d2
[ "BSD-2-Clause" ]
null
null
null
tests/integration/test_github_actions.py
vikasbhatia/asyncpraw
8b9e1bd72945023f6eb4567ff69ba13aa428a2d2
[ "BSD-2-Clause" ]
1
2020-12-13T05:10:35.000Z
2020-12-13T05:10:35.000Z
"""A test that is run only by Github Actions This test makes real network requests, so environment variables should be specified in Github Actions. """ import os import pytest from asyncpraw import Reddit from asyncpraw.models import Submission @pytest.mark.skipif( not os.getenv("NETWORK_TEST_CLIENT_ID"), ...
27.75
77
0.732304
"""A test that is run only by Github Actions This test makes real network requests, so environment variables should be specified in Github Actions. """ import os import pytest from asyncpraw import Reddit from asyncpraw.models import Submission @pytest.mark.skipif( not os.getenv("NETWORK_TEST_CLIENT_ID"), ...
359
0
22
8b11b60ed5c0f29b6f6ce3c11d65a04193edc4fe
216
py
Python
src/tacotron/app/defaults.py
stefantaubert/tacotron
9ac37fbf8789b4e7fe1067212a736074181b6fd8
[ "MIT" ]
null
null
null
src/tacotron/app/defaults.py
stefantaubert/tacotron
9ac37fbf8789b4e7fe1067212a736074181b6fd8
[ "MIT" ]
1
2021-11-11T08:50:32.000Z
2021-11-19T12:39:06.000Z
src/tacotron/app/defaults.py
stefantaubert/tacotron
9ac37fbf8789b4e7fe1067212a736074181b6fd8
[ "MIT" ]
null
null
null
from pathlib import Path DEFAULT_SEED = None DEFAULT_REPETITIONS = 1 DEFAULT_MAX_DECODER_STEPS = 3000 DEFAULT_SAVE_MEL_INFO_COPY_PATH = Path("/tmp/mel_out.json") # from paper DEFAULT_MCD_NO_OF_COEFFS_PER_FRAME = 16
24
59
0.833333
from pathlib import Path DEFAULT_SEED = None DEFAULT_REPETITIONS = 1 DEFAULT_MAX_DECODER_STEPS = 3000 DEFAULT_SAVE_MEL_INFO_COPY_PATH = Path("/tmp/mel_out.json") # from paper DEFAULT_MCD_NO_OF_COEFFS_PER_FRAME = 16
0
0
0
7b921be17fa34c3ac24248e5fc07fa00295c30e7
730
py
Python
commong-bang-pre/submit.py
a414351664/TRAB-IKE
3dd07221e1854c974127d7f6d0d95779a25166c0
[ "MIT" ]
null
null
null
commong-bang-pre/submit.py
a414351664/TRAB-IKE
3dd07221e1854c974127d7f6d0d95779a25166c0
[ "MIT" ]
null
null
null
commong-bang-pre/submit.py
a414351664/TRAB-IKE
3dd07221e1854c974127d7f6d0d95779a25166c0
[ "MIT" ]
null
null
null
# coding:utf-8 import numpy as np import json import pandas as pd pred_file = 'sort_hypo_glge_xsum_ck20_bsz1.txt.dedup' sub_example = 'test_submission_example.jsonl' save_file = 'submit.jsonl' features = [] pred = [] example = [] with open(pred_file, 'r', encoding='utf-8') as infle: for line in infle.readlines():...
26.071429
66
0.694521
# coding:utf-8 import numpy as np import json import pandas as pd pred_file = 'sort_hypo_glge_xsum_ck20_bsz1.txt.dedup' sub_example = 'test_submission_example.jsonl' save_file = 'submit.jsonl' features = [] pred = [] example = [] with open(pred_file, 'r', encoding='utf-8') as infle: for line in infle.readlines():...
0
0
0
1c05a5e22add0bc09a7d9d6125322faf1956609c
1,839
py
Python
tests/generators.py
ppedemon/fplib
61c221e967e924b3fd0a3014e80b331574d45f0c
[ "MIT" ]
null
null
null
tests/generators.py
ppedemon/fplib
61c221e967e924b3fd0a3014e80b331574d45f0c
[ "MIT" ]
null
null
null
tests/generators.py
ppedemon/fplib
61c221e967e924b3fd0a3014e80b331574d45f0c
[ "MIT" ]
null
null
null
import itertools import operator import random import string from fplib.ident import Id from fplib.list import List from fplib.maybe import (Just, Nothing) from fplib.reader import Reader from fplib.state import State
22.156627
78
0.685699
import itertools import operator import random import string from fplib.ident import Id from fplib.list import List from fplib.maybe import (Just, Nothing) from fplib.reader import Reader from fplib.state import State def repeatfunc(func, times=None, *args): if times is None: return itertools.starmap(fun...
1,216
-9
398
a06e1acc2651b527e61ef2935b70ffd5915ad8a5
908
py
Python
tests/test_settings.py
Learning-and-Intelligent-Systems/predicators
0b2e71cacf86ba2bfdc1d9059c3a78016d0a4d7e
[ "MIT" ]
24
2021-11-20T16:35:41.000Z
2022-03-30T03:49:52.000Z
tests/test_settings.py
Learning-and-Intelligent-Systems/predicators
0b2e71cacf86ba2bfdc1d9059c3a78016d0a4d7e
[ "MIT" ]
214
2021-10-12T01:17:50.000Z
2022-03-31T20:18:36.000Z
tests/test_settings.py
Learning-and-Intelligent-Systems/predicators
0b2e71cacf86ba2bfdc1d9059c3a78016d0a4d7e
[ "MIT" ]
1
2022-02-15T20:24:17.000Z
2022-02-15T20:24:17.000Z
"""Test cases for some parts of the settings.py file.""" from predicators.src import utils from predicators.src.settings import get_allowed_query_type_names def test_get_allowed_query_type_names(): """Test the get_allowed_query_type_names method.""" utils.reset_config() assert get_allowed_query_type_name...
32.428571
73
0.693833
"""Test cases for some parts of the settings.py file.""" from predicators.src import utils from predicators.src.settings import get_allowed_query_type_names def test_get_allowed_query_type_names(): """Test the get_allowed_query_type_names method.""" utils.reset_config() assert get_allowed_query_type_name...
0
0
0
0219508ed6580e7eef295d7b66dd00023ec36692
3,421
py
Python
data/cloudnet_dataset.py
aRI0U/cloudnet
2bc7fd0f90898dc360b1e7ce4ff826bf79d75ec3
[ "BSD-3-Clause" ]
null
null
null
data/cloudnet_dataset.py
aRI0U/cloudnet
2bc7fd0f90898dc360b1e7ce4ff826bf79d75ec3
[ "BSD-3-Clause" ]
null
null
null
data/cloudnet_dataset.py
aRI0U/cloudnet
2bc7fd0f90898dc360b1e7ce4ff826bf79d75ec3
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import os from PIL import Image import torch from torch.utils.data import Dataset from data.base_dataset import get_posenet_transform
34.21
105
0.58404
import numpy as np import os from PIL import Image import torch from torch.utils.data import Dataset from data.base_dataset import get_posenet_transform def qlog(q): n = np.minimum(np.linalg.norm(q[:,1:], axis=1), 1e-8) log = q[:,:1] * np.arccos(np.clip(q[:,1:], -1, 1)) return log/n[:,np.newaxis] class...
2,475
744
46
46bb17e9bbf8bbd95ddfa29336b52f227f47c75e
2,515
py
Python
common/imagebusutil.py
eusholli/imagebus
79ef67cb5305e3bda7131d5c85a16b985b80c673
[ "MIT" ]
1
2020-01-20T11:45:57.000Z
2020-01-20T11:45:57.000Z
common/imagebusutil.py
eusholli/imagebus
79ef67cb5305e3bda7131d5c85a16b985b80c673
[ "MIT" ]
18
2019-12-27T01:44:12.000Z
2022-03-12T00:07:25.000Z
common/imagebusutil.py
eusholli/imagebus
79ef67cb5305e3bda7131d5c85a16b985b80c673
[ "MIT" ]
2
2019-12-14T04:07:07.000Z
2019-12-26T18:19:50.000Z
from enum import Enum import datetime import base64 if __name__ == "__main__": print("Welcome to imagebusutil module")
26.473684
153
0.555865
from enum import Enum import datetime import base64 class ImagebusTopic(Enum): SOURCE_FRAME = 1 IMAGEAI_FRAME = 2 REDACTION_FRAME = 3 def __str__(self): return self.name class FrameDetails: def __init__( self, name, topic, frameRate=1, url=None, ...
1,904
438
46
0c7b858125e1e9c10ccae3e2ccc6d902b5722252
894
py
Python
azdev/operations/linter/rules/command_group_rules.py
qwordy/azure-cli-dev-tools
cb0349814fa3a32744af214a3e0e8607287104fc
[ "MIT" ]
1
2020-03-24T13:33:25.000Z
2020-03-24T13:33:25.000Z
azdev/operations/linter/rules/command_group_rules.py
qwordy/azure-cli-dev-tools
cb0349814fa3a32744af214a3e0e8607287104fc
[ "MIT" ]
null
null
null
azdev/operations/linter/rules/command_group_rules.py
qwordy/azure-cli-dev-tools
cb0349814fa3a32744af214a3e0e8607287104fc
[ "MIT" ]
1
2019-06-01T15:00:27.000Z
2019-06-01T15:00:27.000Z
# ----------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ----------------------------------------------------------------------------- fr...
40.636364
119
0.646532
# ----------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ----------------------------------------------------------------------------- fr...
408
0
44
0fae0ccbf45216853e271858a6b4207da029286b
779
py
Python
Python/general/delegation.py
J0shu4B0y/Practice
ea6af3773520f12afcf72f25952a80614d0c13ef
[ "MIT" ]
1
2021-07-18T08:40:05.000Z
2021-07-18T08:40:05.000Z
Python/general/delegation.py
J0shu4B0y/Practice
ea6af3773520f12afcf72f25952a80614d0c13ef
[ "MIT" ]
3
2020-02-21T13:43:44.000Z
2020-02-21T13:54:57.000Z
Python/general/delegation.py
J0shu4B0y/Practice-Python
ea6af3773520f12afcf72f25952a80614d0c13ef
[ "MIT" ]
2
2019-07-19T10:09:08.000Z
2020-09-20T08:07:36.000Z
# Процесс делегирования в Python file = File() instance = Upcase(file) instance.write('test') instance.open() print(instance._outfile) #print(instance.hello()) #print(instance.hello()) #print(instance.write('test')) #print(instance._outfile) #print(instance.write('asd')) #print(instance._outfile) #print(instance._ou...
20.5
46
0.639281
# Процесс делегирования в Python class Upcase(): def __init__(self, out): self._out = out def write(self, s): self._outfile = s.upper() def __getattr__(self, name): print('Looking up', name) return getattr(self._out, name) class File(): def __init__(self): s...
261
-14
206
0cfb8ed596ae8e7e5a700f718c6059fbb62623dd
766
py
Python
GoogleSheetLocalizationExport.py
muzle/GoogleSheetLocalizationExport
2fdd5bce7790409b0550db9b8450f3703e7a4e04
[ "MIT" ]
2
2021-12-29T00:03:58.000Z
2021-12-29T19:20:24.000Z
GoogleSheetLocalizationExport.py
muzle/GoogleSheetLocalizationExport
2fdd5bce7790409b0550db9b8450f3703e7a4e04
[ "MIT" ]
null
null
null
GoogleSheetLocalizationExport.py
muzle/GoogleSheetLocalizationExport
2fdd5bce7790409b0550db9b8450f3703e7a4e04
[ "MIT" ]
null
null
null
import sys from yamlSupport.YamlConfigurationSupport import YamlConfigurationSupport from googleSheetSupport.GoogleSheetSupport import GoogleSheetSupport from iosSupport.iOSLocalizationSettings import iOSLocalizationSettings if __name__ == '__main__': args = sys.argv if len(args) < 2: log_menu() ...
31.916667
100
0.72846
import sys from yamlSupport.YamlConfigurationSupport import YamlConfigurationSupport from googleSheetSupport.GoogleSheetSupport import GoogleSheetSupport from iosSupport.iOSLocalizationSettings import iOSLocalizationSettings def log_menu(): menu = """commands:\n1. cnfg - create default localization.yml\n2. fetch ...
111
0
23
db8cdf360eb4b2f9f9181c8aab45f97a431cb628
3,005
py
Python
ds_discovery/sample/map_us_phone_code.py
project-hadron/discovery-transition-ds
08229ca3b7617b42ce2dd8e47ff93876c0843810
[ "BSD-3-Clause" ]
2
2020-09-21T17:24:16.000Z
2021-05-28T18:02:54.000Z
ds_discovery/sample/map_us_phone_code.py
project-hadron/discovery-transition-ds
08229ca3b7617b42ce2dd8e47ff93876c0843810
[ "BSD-3-Clause" ]
null
null
null
ds_discovery/sample/map_us_phone_code.py
project-hadron/discovery-transition-ds
08229ca3b7617b42ce2dd8e47ff93876c0843810
[ "BSD-3-Clause" ]
1
2021-07-23T13:52:04.000Z
2021-07-23T13:52:04.000Z
data={'State': ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana',...
1,502.5
3,004
0.465225
data={'State': ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana',...
0
0
0
f68c5286b6e457069b84e1113796f3322531cc37
1,070
py
Python
PersianSwear.py
amirshnll/Persian-Swear-Words
8aa6df8b55262b8cb85731342e78c769d974dff9
[ "MIT" ]
180
2020-09-22T11:40:11.000Z
2022-03-25T18:39:37.000Z
PersianSwear.py
Nimaw/Persian-Swear-Words
8aa6df8b55262b8cb85731342e78c769d974dff9
[ "MIT" ]
9
2020-11-16T13:19:39.000Z
2021-08-29T09:34:10.000Z
PersianSwear.py
Nimaw/Persian-Swear-Words
8aa6df8b55262b8cb85731342e78c769d974dff9
[ "MIT" ]
38
2020-11-16T12:58:21.000Z
2022-02-19T11:48:06.000Z
""" swearWords Class Author : Sorosh Safari @coci created date : 7 October, 2021 updated date : 11 October, 2021 """ # return string # return boolean # return nothing # return nothing # return boolean # return boolean # return string
19.107143
42
0.657009
""" swearWords Class Author : Sorosh Safari @coci created date : 7 October, 2021 updated date : 11 October, 2021 """ class PersianSwear(object): def __init__(self): self.data = json.load(open('data.json')) # return string def filter_words(self, text, symbol="*"): if(self.is_empty()): return text text = t...
609
6
208
c1e74d087d61927f3b6d66fade602932fce137bd
858
py
Python
centralreport/test.py
Ninir/CentralReport
655b060ae0aa7df404f3799824e7635f5997e662
[ "Apache-2.0", "ZPL-2.0" ]
1
2015-11-03T14:32:01.000Z
2015-11-03T14:32:01.000Z
centralreport/test.py
Ninir/CentralReport
655b060ae0aa7df404f3799824e7635f5997e662
[ "Apache-2.0", "ZPL-2.0" ]
null
null
null
centralreport/test.py
Ninir/CentralReport
655b060ae0aa7df404f3799824e7635f5997e662
[ "Apache-2.0", "ZPL-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ CentralReport - Test script Launchs CentralReport in debug mode, without installation. Please verify CR is not installed on your host before launch this script. https://github.com/miniche/CentralReport/ """ import centralreport import sys import o...
26.8125
121
0.632867
#!/usr/bin/python # -*- coding: utf-8 -*- """ CentralReport - Test script Launchs CentralReport in debug mode, without installation. Please verify CR is not installed on your host before launch this script. https://github.com/miniche/CentralReport/ """ import centralreport import sys import o...
0
0
0
429da5a042a803a782ed7b16c9d0971a3455252e
15,452
py
Python
mayan/apps/sources/models/email_sources.py
O2Graphics/Mayan-EDMS
e11e6f47240f3c536764be66828dbe6428dceb41
[ "Apache-2.0" ]
null
null
null
mayan/apps/sources/models/email_sources.py
O2Graphics/Mayan-EDMS
e11e6f47240f3c536764be66828dbe6428dceb41
[ "Apache-2.0" ]
5
2021-03-19T22:56:45.000Z
2022-03-12T00:08:43.000Z
mayan/apps/sources/models/email_sources.py
halsten/mayan-edms
10372daede6e6dea0bea67eb98767e3be6fbf86f
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import imaplib import logging import poplib from django.core.exceptions import ValidationError from django.core.files.base import ContentFile from django.db import models from django.utils.encoding import force_bytes from django.utils.translation import ugettext_lazy as _ from...
39.218274
120
0.563357
from __future__ import unicode_literals import imaplib import logging import poplib from django.core.exceptions import ValidationError from django.core.files.base import ContentFile from django.db import models from django.utils.encoding import force_bytes from django.utils.translation import ugettext_lazy as _ from...
9,793
2,131
152
c1ffdd25bfab325deac866b7520b17bf16ab3879
8,678
py
Python
maskrcnn_benchmark/modeling/roi_heads/mask_head/roi_mask_feature_extractors.py
SIAAAAAA/MMT-PSM
0835c01c5010d3337778f452e9d96416e0f8a11a
[ "MIT" ]
41
2020-07-22T03:55:08.000Z
2022-02-27T12:04:41.000Z
maskrcnn_benchmark/modeling/roi_heads/mask_head/roi_mask_feature_extractors.py
SIAAAAAA/MMT-PSM
0835c01c5010d3337778f452e9d96416e0f8a11a
[ "MIT" ]
5
2020-11-08T08:47:34.000Z
2021-07-09T03:53:42.000Z
maskrcnn_benchmark/modeling/roi_heads/mask_head/roi_mask_feature_extractors.py
SIAAAAAA/MMT-PSM
0835c01c5010d3337778f452e9d96416e0f8a11a
[ "MIT" ]
5
2020-10-13T11:09:53.000Z
2021-07-28T12:41:53.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from torch import nn from torch.nn import functional as F import torch from ..box_head.roi_box_feature_extractors import ResNet50Conv5ROIFeatureExtractor from maskrcnn_benchmark.modeling.poolers import Pooler from maskrcnn_benchmark.layers import C...
38.229075
114
0.623992
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from torch import nn from torch.nn import functional as F import torch from ..box_head.roi_box_feature_extractors import ResNet50Conv5ROIFeatureExtractor from maskrcnn_benchmark.modeling.poolers import Pooler from maskrcnn_benchmark.layers import C...
5,958
27
305
86ef09b59f097db29d65d7707c8004ca9296f45c
1,802
py
Python
auditing/db/Service.py
dolfandringa/rolaguard_data-collectors
e212857a5e50ac84ded4059ff40f5c1744fdc614
[ "Apache-2.0" ]
1
2021-07-29T21:57:07.000Z
2021-07-29T21:57:07.000Z
auditing/db/Service.py
dolfandringa/rolaguard_data-collectors
e212857a5e50ac84ded4059ff40f5c1744fdc614
[ "Apache-2.0" ]
1
2021-02-02T15:10:59.000Z
2021-02-02T15:10:59.000Z
auditing/db/Service.py
dolfandringa/rolaguard_data-collectors
e212857a5e50ac84ded4059ff40f5c1744fdc614
[ "Apache-2.0" ]
1
2021-01-28T05:47:10.000Z
2021-01-28T05:47:10.000Z
from auditing.db.Models import Packet import datetime, json import dateutil.parser as dp
33.37037
61
0.617647
from auditing.db.Models import Packet import datetime, json import dateutil.parser as dp def save(jsonPacket): data = json.loads(jsonPacket) new_packet = Packet( date = dp.parse(data.get('date', None)), topic = data.get('topic', None), data_collector_id = data.get('data_collector_id', None), organizati...
1,664
0
46
acc2fe39f661fb7f70cd2a0a0c3f78c6b23bdeb5
491
py
Python
test_fmi/_nbdev.py
asvcode/test_fmi
43111ef3e88625addd6e2609ea588f425841537d
[ "Apache-2.0" ]
null
null
null
test_fmi/_nbdev.py
asvcode/test_fmi
43111ef3e88625addd6e2609ea588f425841537d
[ "Apache-2.0" ]
3
2021-05-01T06:54:19.000Z
2022-02-26T10:17:44.000Z
test_fmi/_nbdev.py
asvcode/test_fmi
43111ef3e88625addd6e2609ea588f425841537d
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"instance_sort": "02_explore.ipynb", "instance_dcmread": "02_explore.ipynb", "instance_show": "02_explore.ipynb", "get_dicom_image": "02_explore.ipynb"} modules = ["one.py", ...
27.277778
61
0.668024
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"instance_sort": "02_explore.ipynb", "instance_dcmread": "02_explore.ipynb", "instance_show": "02_explore.ipynb", "get_dicom_image": "02_explore.ipynb"} modules = ["one.py", ...
18
0
23
9374d8166bff6d7bca40d0073aa64863e3ce4784
1,131
py
Python
Q3/q3.py
Xascoria/AdventOfCode2021
869d6f292f6444fe6bb26bf37049a0949bf49019
[ "MIT" ]
null
null
null
Q3/q3.py
Xascoria/AdventOfCode2021
869d6f292f6444fe6bb26bf37049a0949bf49019
[ "MIT" ]
null
null
null
Q3/q3.py
Xascoria/AdventOfCode2021
869d6f292f6444fe6bb26bf37049a0949bf49019
[ "MIT" ]
null
null
null
f = open("Q3/inputs.txt","r") z = f.readlines() f.close() a = "" b = "" for i in zip(*z): lst = list(i) if lst.count("1") > len(lst)//2: a += "1" b += "0" else: a += "0" b += "1" print(int(a,2)*int(b,2)) f = open("Q3/inputs.txt","r") z = f.readlines() f.close() current_ind...
22.62
53
0.50221
f = open("Q3/inputs.txt","r") z = f.readlines() f.close() a = "" b = "" for i in zip(*z): lst = list(i) if lst.count("1") > len(lst)//2: a += "1" b += "0" else: a += "0" b += "1" print(int(a,2)*int(b,2)) f = open("Q3/inputs.txt","r") z = f.readlines() f.close() current_ind...
0
0
0
5412dc36e7ca007a4c859648cda01115d199a51d
449
py
Python
Section 4/source/cgi-bin/wav2json.py
PacktPublishing/-Deep-Learning-Projects-with-JavaScript
6842ab1b7611b34735029df47a35790f588e2d8c
[ "MIT" ]
11
2019-01-11T11:37:59.000Z
2021-10-02T03:20:02.000Z
Section 4/source/cgi-bin/wav2json.py
PacktPublishing/-Deep-Learning-Projects-with-JavaScript
6842ab1b7611b34735029df47a35790f588e2d8c
[ "MIT" ]
null
null
null
Section 4/source/cgi-bin/wav2json.py
PacktPublishing/-Deep-Learning-Projects-with-JavaScript
6842ab1b7611b34735029df47a35790f588e2d8c
[ "MIT" ]
6
2019-01-03T18:43:44.000Z
2020-12-29T10:25:34.000Z
#!/usr/bin/env python3 import librosa import sys import numpy as np from os import path, listdir import json print('Content-Type: application/json\n\n') print(wav2json('./test.wav'))
26.411765
74
0.697105
#!/usr/bin/env python3 import librosa import sys import numpy as np from os import path, listdir import json def wav2json(wav, dtype='train'): x, _=librosa.load(wav, res_type='kaiser_fast', duration=3, offset=0.5) mx=librosa.feature.mfcc(y=x, n_mfcc=25) mfccs=np.mean(mx, axis=0) mfccs=[-(mfccs/100)] ...
243
0
23
cb016f676082c29f82bfac8bc0749261eb089730
679
py
Python
src/mfactcheck/models/sent_mbert.py
D-Roberts/multilingual_nli_ECIR
e7466f5e6c6b6246ae37c1c951003c13f56d84c8
[ "Apache-2.0" ]
2
2021-02-13T22:57:33.000Z
2021-03-29T09:41:08.000Z
src/mfactcheck/models/sent_mbert.py
D-Roberts/multilingual_nli_ECIR
e7466f5e6c6b6246ae37c1c951003c13f56d84c8
[ "Apache-2.0" ]
null
null
null
src/mfactcheck/models/sent_mbert.py
D-Roberts/multilingual_nli_ECIR
e7466f5e6c6b6246ae37c1c951003c13f56d84c8
[ "Apache-2.0" ]
null
null
null
import os from mfactcheck.utils.log_helper import LogHelper from mfactcheck.multi_retriever.sentences.data import SentProcessor from .mbert import MBert LogHelper.setup() logger = LogHelper.get_logger(os.path.splitext(os.path.basename(__file__))[0])
33.95
79
0.734904
import os from mfactcheck.utils.log_helper import LogHelper from mfactcheck.multi_retriever.sentences.data import SentProcessor from .mbert import MBert LogHelper.setup() logger = LogHelper.get_logger(os.path.splitext(os.path.basename(__file__))[0]) class SentMBert(MBert): def __init__(self, output_dir, module=...
375
2
49
c3f66128e610e020af5a629e0b4aa0c08ad30f77
2,481
py
Python
ecmdb/ecmserver.py
sethtroisi/ecm-db
731196842c411ba12512336ac242c7b1d5ae8220
[ "Apache-2.0" ]
null
null
null
ecmdb/ecmserver.py
sethtroisi/ecm-db
731196842c411ba12512336ac242c7b1d5ae8220
[ "Apache-2.0" ]
null
null
null
ecmdb/ecmserver.py
sethtroisi/ecm-db
731196842c411ba12512336ac242c7b1d5ae8220
[ "Apache-2.0" ]
null
null
null
import contextlib import datetime import os import logging import re import time from enum import Enum import gmpy2 import sqlite3 class EcmServer: """ECM Server Responsible for recording what curves have been run. """ SCHEMA_FILE = "schema.sql"
24.81
102
0.580814
import contextlib import datetime import os import logging import re import time from enum import Enum import gmpy2 import sqlite3 class EcmServer: """ECM Server Responsible for recording what curves have been run. """ SCHEMA_FILE = "schema.sql" class Status(Enum): P = 1 PRP = ...
1,893
72
243
7423fea9e86c8e28e9deff5e6e14b0bb00592b33
1,376
py
Python
editregions/contrib/textfiles/models.py
kezabelle/django-editregions
961ddeffb37d30d40fb4e3e9224bc3f956b7a5b5
[ "BSD-2-Clause-FreeBSD" ]
1
2015-01-11T18:21:27.000Z
2015-01-11T18:21:27.000Z
editregions/contrib/textfiles/models.py
kezabelle/django-editregions
961ddeffb37d30d40fb4e3e9224bc3f956b7a5b5
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
editregions/contrib/textfiles/models.py
kezabelle/django-editregions
961ddeffb37d30d40fb4e3e9224bc3f956b7a5b5
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from CommonMark import DocParser from CommonMark import HTMLRenderer from django.template import TemplateDoesNotExist from django.template.loader import render_to_string from django.utils.encoding import python_2_unicode_compatible from djan...
30.577778
79
0.719477
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from CommonMark import DocParser from CommonMark import HTMLRenderer from django.template import TemplateDoesNotExist from django.template.loader import render_to_string from django.utils.encoding import python_2_unicode_compatible from djan...
381
365
22
f6adc038e85b2f7df73be52ab4cbbdeaccb0f94a
21,374
py
Python
examples/my_mecrlp_problemv3.py
hdchantre/jMetalPy
dba62a865c01c9ab77465706bc498efbe59c3bc4
[ "MIT" ]
null
null
null
examples/my_mecrlp_problemv3.py
hdchantre/jMetalPy
dba62a865c01c9ab77465706bc498efbe59c3bc4
[ "MIT" ]
null
null
null
examples/my_mecrlp_problemv3.py
hdchantre/jMetalPy
dba62a865c01c9ab77465706bc498efbe59c3bc4
[ "MIT" ]
null
null
null
from jmetal.core.problem import FloatProblem from jmetal.core.solution import FloatSolution import numpy as np import math import datameclpps260421v1
45.476596
300
0.495883
from jmetal.core.problem import FloatProblem from jmetal.core.solution import FloatSolution import numpy as np import math import datameclpps260421v1 class MyProblem(FloatProblem): def __init__(self, U1,V1,K1,N1,Psi_u1,Psi_u2,Phi_u1,Phi_u2,B_u1,B_u2,r_u1,tau_v1,tau_v2,sigma_v1,sigma_v2,b_v1,b_v2,L_v1,...
21,039
9
150
ebe36ecfc0a182de69b399ff3cccedb98db61cdf
21
py
Python
src/msdss_base_api/__init__.py
rrwen/msdss-base-api
f2b05c3064dd375762b43335adcf360d6b40eb31
[ "MIT" ]
null
null
null
src/msdss_base_api/__init__.py
rrwen/msdss-base-api
f2b05c3064dd375762b43335adcf360d6b40eb31
[ "MIT" ]
null
null
null
src/msdss_base_api/__init__.py
rrwen/msdss-base-api
f2b05c3064dd375762b43335adcf360d6b40eb31
[ "MIT" ]
null
null
null
from .core import API
21
21
0.809524
from .core import API
0
0
0
cef7b3d2334bb46f89d544ad87c82f3b738b72db
1,007
py
Python
tests/python/pants_test/backend/python/tasks/checkstyle/test_new_style_classes.py
qma/pants
604f58a366b66bc5cfa83e7250cb8af8130832cf
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/backend/python/tasks/checkstyle/test_new_style_classes.py
qma/pants
604f58a366b66bc5cfa83e7250cb8af8130832cf
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/backend/python/tasks/checkstyle/test_new_style_classes.py
qma/pants
604f58a366b66bc5cfa83e7250cb8af8130832cf
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.p...
27.972222
96
0.706058
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.p...
414
88
23
78a08b1094138b77ca2c90ed9e478ef2099e432f
2,842
py
Python
main.py
asa-leholland/TaskmasterDataAcquisition
1e40f8320053ceb3c4f1119562139556f430fbcc
[ "MIT" ]
null
null
null
main.py
asa-leholland/TaskmasterDataAcquisition
1e40f8320053ceb3c4f1119562139556f430fbcc
[ "MIT" ]
null
null
null
main.py
asa-leholland/TaskmasterDataAcquisition
1e40f8320053ceb3c4f1119562139556f430fbcc
[ "MIT" ]
null
null
null
import urllib.request from pprint import pprint from html_table_parser.parser import HTMLTableParser import pandas as pd import os from parse import parse_taskmaster_csv if __name__ == "__main__": dir_path_to_temp_csvs="temp_csvs" dir_path_final_csvs="final_season_csvs" create_final_raw_csv(dir_path_to_...
35.974684
104
0.692822
import urllib.request from pprint import pprint from html_table_parser.parser import HTMLTableParser import pandas as pd import os from parse import parse_taskmaster_csv def url_get_contents(url): req = urllib.request.Request(url=url) f = urllib.request.urlopen(req) return f.read() def scrape_tm_detail...
2,279
0
138
708386fb48531f9d717c745431894bfffde53abf
9,715
py
Python
assignments/ps01/ps1.py
jperuggia/ComputerVision
6a36cf96dec40fe4cd5584fbc2d8e384a74a66cf
[ "MIT" ]
null
null
null
assignments/ps01/ps1.py
jperuggia/ComputerVision
6a36cf96dec40fe4cd5584fbc2d8e384a74a66cf
[ "MIT" ]
null
null
null
assignments/ps01/ps1.py
jperuggia/ComputerVision
6a36cf96dec40fe4cd5584fbc2d8e384a74a66cf
[ "MIT" ]
2
2020-11-02T08:36:01.000Z
2022-01-05T19:08:53.000Z
import math import numpy as np import cv2 import sys # # Implement the functions below. def extract_red(image): """ Returns the red channel of the input image. It is highly recommended to make a copy of the input image in order to avoid modifying the original array. You can do this by calling: temp_image...
37.509653
113
0.68142
import math import numpy as np import cv2 import sys # # Implement the functions below. def extract_red(image): """ Returns the red channel of the input image. It is highly recommended to make a copy of the input image in order to avoid modifying the original array. You can do this by calling: temp_image...
0
0
0
4c4a0f16906d029c85e9f42492e9b35e756b606c
1,287
py
Python
src/fixed_prob_counter.py
MarioCSilva/Approximate_Counting
77ba5f5a87755bddabb5b0a8bb16d0ab7976a5a3
[ "MIT" ]
null
null
null
src/fixed_prob_counter.py
MarioCSilva/Approximate_Counting
77ba5f5a87755bddabb5b0a8bb16d0ab7976a5a3
[ "MIT" ]
null
null
null
src/fixed_prob_counter.py
MarioCSilva/Approximate_Counting
77ba5f5a87755bddabb5b0a8bb16d0ab7976a5a3
[ "MIT" ]
null
null
null
from collections import defaultdict import re from utils import open_file from random import random, seed class FixedProbCounter(): '''Reads file in chunks counts the letters and stores the event gets the dictionary with the number of occurrences of each letter using a fixed probability of...
27.978261
92
0.609946
from collections import defaultdict import re from utils import open_file from random import random, seed class FixedProbCounter(): def __init__(self, fname="../datasets/it_book.txt"): seed(93430) self.fname = fname self.fixed_probability = 1 / 8 def __str__(self): retu...
840
0
111
72bbc3885b283ceb98305b72a26a6cdb3e96e915
1,850
py
Python
booksim2/utils/plot_reconfig_overhead.py
jyhuang91/flyover
952a0fffee952c9f88b93017b6bba65a84d562cb
[ "MIT" ]
3
2020-11-01T08:23:10.000Z
2021-12-21T02:53:36.000Z
booksim2/utils/plot_reconfig_overhead.py
jyhuang91/flyover
952a0fffee952c9f88b93017b6bba65a84d562cb
[ "MIT" ]
null
null
null
booksim2/utils/plot_reconfig_overhead.py
jyhuang91/flyover
952a0fffee952c9f88b93017b6bba65a84d562cb
[ "MIT" ]
1
2020-12-07T00:57:30.000Z
2020-12-07T00:57:30.000Z
#!/usr/bin/python import sys import numpy as np import matplotlib.pyplot as plt from easypyplot import pdf, color from easypyplot import format as fmt if __name__ == '__main__': main()
27.205882
72
0.564324
#!/usr/bin/python import sys import numpy as np import matplotlib.pyplot as plt from easypyplot import pdf, color from easypyplot import format as fmt def main(): schemes = ['RP', 'FLOV'] latencies = [] filename = '../results/reconfig/latency.txt' infile = open(filename) for l, line in enumerat...
1,634
0
23
d8a8055897358a6f2081ccf724dd6e593ed1588a
1,450
py
Python
nipyapi/webui/nifi_web/migrations/0003_auto_20191105_1616.py
achristianson/nipyapi-ds
d027433abf0c2fd08a35b5ec95534346e205c681
[ "Apache-2.0" ]
3
2019-10-11T02:58:04.000Z
2022-02-26T06:48:24.000Z
nipyapi/webui/nifi_web/migrations/0003_auto_20191105_1616.py
achristianson/nipyapi-ds
d027433abf0c2fd08a35b5ec95534346e205c681
[ "Apache-2.0" ]
2
2021-03-09T19:35:35.000Z
2021-05-10T16:46:23.000Z
nipyapi/webui/nifi_web/migrations/0003_auto_20191105_1616.py
achristianson/nipyapi-ds
d027433abf0c2fd08a35b5ec95534346e205c681
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.6 on 2019-11-05 16:16 from django.db import migrations, models import django.db.models.deletion
37.179487
118
0.590345
# Generated by Django 2.2.6 on 2019-11-05 16:16 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('nifi_web', '0002_nifiinstance_hostname'), ] operations = [ migrations.CreateModel( name='NifiIm...
0
1,303
23
7a49b5a24a8d918efad9ff2cfdfd4e6763f07d4f
27,448
py
Python
Scripts/build/lib.linux-x86_64-2.7/rdpy/protocol/rdp/sec.py
FurqanKhan1/Dictator
74e29c12a8f92292ab3275661622c0632cdd0a7b
[ "Unlicense" ]
5
2019-03-14T10:17:22.000Z
2019-10-23T14:04:12.000Z
Scripts/build/lib.linux-x86_64-2.7/rdpy/protocol/rdp/sec.py
FurqanKhan1/Dictator
74e29c12a8f92292ab3275661622c0632cdd0a7b
[ "Unlicense" ]
null
null
null
Scripts/build/lib.linux-x86_64-2.7/rdpy/protocol/rdp/sec.py
FurqanKhan1/Dictator
74e29c12a8f92292ab3275661622c0632cdd0a7b
[ "Unlicense" ]
14
2019-03-14T10:34:02.000Z
2021-10-31T17:34:13.000Z
# # Copyright (c) 2014-2015 Sylvain Peyrefitte # # This file is part of rdpy. # # rdpy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
37.497268
196
0.652579
# # Copyright (c) 2014-2015 Sylvain Peyrefitte # # This file is part of rdpy. # # rdpy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
2,403
0
104
25c0f6f874faa9aa47653224c9fd47dbdd6c61ee
4,474
py
Python
scripts/sync.py
bastionhost/dbhub
825ce53f0b1c0e3c2e033ebe2c92bfcfbf51bd9e
[ "MIT" ]
15
2018-09-13T00:53:57.000Z
2022-03-28T02:13:01.000Z
scripts/sync.py
bastionhost/dbhub
825ce53f0b1c0e3c2e033ebe2c92bfcfbf51bd9e
[ "MIT" ]
1
2018-12-17T05:52:53.000Z
2018-12-17T05:52:53.000Z
scripts/sync.py
huifenqi/dbhub
825ce53f0b1c0e3c2e033ebe2c92bfcfbf51bd9e
[ "MIT" ]
3
2018-11-16T08:56:24.000Z
2019-01-26T03:51:42.000Z
import pymongo from django.conf import settings from sqlalchemy import create_engine, inspect from sqlalchemy import MetaData from pymongo_schema.extract import extract_pymongo_client_schema from pymongo_schema.tosql import mongo_schema_to_mapping from apps.schema.models import Database, Table, Column, Index if ...
37.915254
97
0.601475
import pymongo from django.conf import settings from sqlalchemy import create_engine, inspect from sqlalchemy import MetaData from pymongo_schema.extract import extract_pymongo_client_schema from pymongo_schema.tosql import mongo_schema_to_mapping from apps.schema.models import Database, Table, Column, Index class R...
3,799
176
145
c47f4ce83c15b758edbdd15a5d99eac73f06c99d
1,969
py
Python
examples/pick_and_place_CGO.py
bgheneti/rai-python
2956004853525795dfde210266d9bbf3292d27ee
[ "MIT" ]
null
null
null
examples/pick_and_place_CGO.py
bgheneti/rai-python
2956004853525795dfde210266d9bbf3292d27ee
[ "MIT" ]
null
null
null
examples/pick_and_place_CGO.py
bgheneti/rai-python
2956004853525795dfde210266d9bbf3292d27ee
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import sys sys.path.append('../ry') from libry import * K = Config() D = K.view() K.addFile('../test/kitchen.g') K.addFile('../rai-robotModels/pr2/pr2.g') K.addFrame('item1', 'sink1', 'type:ssBox Q:<t(-.1 -.1 .52)> size:[.1 .1 .25 .02] color:[1. 0. 0.], contact' ) K.addFrame('item2', 'sink1', 'typ...
30.292308
127
0.681056
#!/usr/bin/python3 import sys sys.path.append('../ry') from libry import * K = Config() D = K.view() K.addFile('../test/kitchen.g') K.addFile('../rai-robotModels/pr2/pr2.g') K.addFrame('item1', 'sink1', 'type:ssBox Q:<t(-.1 -.1 .52)> size:[.1 .1 .25 .02] color:[1. 0. 0.], contact' ) K.addFrame('item2', 'sink1', 'typ...
0
0
0
5d0d73e2287292f6ef347ee205eff50261f050ca
185
py
Python
tests/sorting/conftest.py
dieb/algorithms.py
da657002cb35395bab547a9f29ca2c8a171e986d
[ "MIT" ]
null
null
null
tests/sorting/conftest.py
dieb/algorithms.py
da657002cb35395bab547a9f29ca2c8a171e986d
[ "MIT" ]
null
null
null
tests/sorting/conftest.py
dieb/algorithms.py
da657002cb35395bab547a9f29ca2c8a171e986d
[ "MIT" ]
null
null
null
import pytest @pytest.fixture
20.555556
64
0.713514
import pytest @pytest.fixture def assert_sorted(): def assert_fun(original, sort_function): assert sorted(original[:]) == sort_function(original[:]) return assert_fun
131
0
22
91285f0c3a7a9c77f819019ebc7ea7e3b259c995
5,902
py
Python
app/__init__.py
winlongit/shop_pc_server
376fa5c0504e50a863aad68ead67e0a149ef5dd2
[ "Apache-2.0" ]
1
2021-12-08T13:59:32.000Z
2021-12-08T13:59:32.000Z
app/__init__.py
winlongit/shop_pc_server
376fa5c0504e50a863aad68ead67e0a149ef5dd2
[ "Apache-2.0" ]
null
null
null
app/__init__.py
winlongit/shop_pc_server
376fa5c0504e50a863aad68ead67e0a149ef5dd2
[ "Apache-2.0" ]
1
2021-12-08T13:59:34.000Z
2021-12-08T13:59:34.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ------------------------------------------------- @ Author : pengj @ date : 2019/11/25 21:07 @ IDE : PyCharm @ GitHub : https://github.com/JackyPJB @ Contact : pengjianbiao@hotmail.com ---------------...
40.986111
230
0.596069
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ------------------------------------------------- @ Author : pengj @ date : 2019/11/25 21:07 @ IDE : PyCharm @ GitHub : https://github.com/JackyPJB @ Contact : pengjianbiao@hotmail.com ---------------...
5,997
0
23
93e92d07bd7ae1362f4f38832f8ccfdd0576d278
173
py
Python
tasks.py
MinchinWeb/prjct
182c4b5c849c920fcc1d84fd7431aaae36bd8760
[ "MIT" ]
1
2020-05-29T00:26:52.000Z
2020-05-29T00:26:52.000Z
tasks.py
MinchinWeb/prjct
182c4b5c849c920fcc1d84fd7431aaae36bd8760
[ "MIT" ]
46
2016-10-18T00:57:24.000Z
2022-01-01T17:22:29.000Z
tasks.py
MinchinWeb/prjct
182c4b5c849c920fcc1d84fd7431aaae36bd8760
[ "MIT" ]
1
2018-09-17T14:30:09.000Z
2018-09-17T14:30:09.000Z
import invoke #import minchin.releaser try: from minchin.releaser import make_release, vendorize except ImportError: print("[WARN] minchin.releaser not installed")
21.625
56
0.780347
import invoke #import minchin.releaser try: from minchin.releaser import make_release, vendorize except ImportError: print("[WARN] minchin.releaser not installed")
0
0
0
7ad5d1bd4a4bcd3a0020da28df929a858e7a36db
1,421
py
Python
rpi-rgb-led-matrix-master/snappsvisa1.py
hammal/macapar
05fb84b8f5e967ed6d3edb0891ac58674e6b60bc
[ "MIT" ]
null
null
null
rpi-rgb-led-matrix-master/snappsvisa1.py
hammal/macapar
05fb84b8f5e967ed6d3edb0891ac58674e6b60bc
[ "MIT" ]
null
null
null
rpi-rgb-led-matrix-master/snappsvisa1.py
hammal/macapar
05fb84b8f5e967ed6d3edb0891ac58674e6b60bc
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- from __future__ import unicode_literals import Image import ImageDraw import time import ImageFont from rgbmatrix import Adafruit_RGBmatrix # Rows and chain length are both required parameters: matrix = Adafruit_RGBmatrix(32, 4) font=ImageFont.load_default() font=ImageFont.truetype("DejaVuSerif....
26.811321
54
0.701619
#-*- coding: utf-8 -*- from __future__ import unicode_literals import Image import ImageDraw import time import ImageFont from rgbmatrix import Adafruit_RGBmatrix # Rows and chain length are both required parameters: matrix = Adafruit_RGBmatrix(32, 4) font=ImageFont.load_default() font=ImageFont.truetype("DejaVuSerif....
0
0
0
2a2404f29f3a92e6c43d59dd176c1c34c49e5597
1,478
py
Python
projects/pico/deployment/plates/plates-consumer.py
henriwoodcock/developer
7ddd7f0b56564c0c13d5505c16b6f89c0c29886a
[ "CC-BY-4.0" ]
47
2020-08-10T12:58:13.000Z
2022-03-18T18:11:44.000Z
projects/pico/deployment/plates/plates-consumer.py
henriwoodcock/developer
7ddd7f0b56564c0c13d5505c16b6f89c0c29886a
[ "CC-BY-4.0" ]
7
2021-02-13T02:13:52.000Z
2021-08-18T14:03:49.000Z
projects/pico/deployment/plates/plates-consumer.py
henriwoodcock/developer
7ddd7f0b56564c0c13d5505c16b6f89c0c29886a
[ "CC-BY-4.0" ]
27
2020-08-07T19:44:52.000Z
2022-03-08T19:16:46.000Z
# coding: utf-8 # In[17]: import datetime from kafka import KafkaConsumer import boto3 import json import base64 # Fire up the Kafka Consumer topic = "testpico" brokers = ["35.189.130.4:9092"] # Initialising Kafka consumer(Lambda) with topic consumer = KafkaConsumer( topic, bootstrap_servers=brokers, ...
24.229508
93
0.675237
# coding: utf-8 # In[17]: import datetime from kafka import KafkaConsumer import boto3 import json import base64 # Fire up the Kafka Consumer topic = "testpico" brokers = ["35.189.130.4:9092"] # Initialising Kafka consumer(Lambda) with topic consumer = KafkaConsumer( topic, bootstrap_servers=brokers, ...
0
0
0
feb0301eab01f99751323c1174bb62d39c474c2d
7,475
py
Python
tests/test_compositealgo.py
AurelienGasser/substra-tools
2e90f1224eb6c9bc1c620713738b645b2951693e
[ "Apache-2.0" ]
17
2019-10-25T13:35:59.000Z
2021-01-06T09:18:07.000Z
tests/test_compositealgo.py
AurelienGasser/substra-tools
2e90f1224eb6c9bc1c620713738b645b2951693e
[ "Apache-2.0" ]
21
2019-11-05T20:39:47.000Z
2020-07-17T17:15:42.000Z
tests/test_compositealgo.py
AurelienGasser/substra-tools
2e90f1224eb6c9bc1c620713738b645b2951693e
[ "Apache-2.0" ]
5
2021-06-03T11:52:17.000Z
2022-02-22T21:21:58.000Z
import json import pathlib from substratools import algo, exceptions from substratools.workspace import CompositeAlgoWorkspace import pytest @pytest.fixture(autouse=True) @pytest.fixture @pytest.fixture @pytest.fixture @pytest.mark.parametrize("fake_data,n_fake_samples,expected_pred", [ (False,...
29.662698
89
0.697525
import json import pathlib from substratools import algo, exceptions from substratools.workspace import CompositeAlgoWorkspace import pytest @pytest.fixture(autouse=True) def setup(valid_opener): pass class DummyCompositeAlgo(algo.CompositeAlgo): def train(self, X, y, head_model, trunk_model, rank): ...
6,028
172
728
0a0e643e3f48f6fc458be3375ed09d7479d57e9a
53,021
py
Python
msgraph/cli/command_modules/devicescorpmgt/azext_devicescorpmgt/generated/action.py
microsoftgraph/msgraph-cli-archived
489f70bf4ede1ce67b84bfb31e66da3e4db76062
[ "MIT" ]
null
null
null
msgraph/cli/command_modules/devicescorpmgt/azext_devicescorpmgt/generated/action.py
microsoftgraph/msgraph-cli-archived
489f70bf4ede1ce67b84bfb31e66da3e4db76062
[ "MIT" ]
22
2022-03-29T22:54:37.000Z
2022-03-29T22:55:27.000Z
msgraph/cli/command_modules/devicescorpmgt/azext_devicescorpmgt/generated/action.py
microsoftgraph/msgraph-cli-archived
489f70bf4ede1ce67b84bfb31e66da3e4db76062
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incor...
35.370914
120
0.534486
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incor...
49,128
971
2,280
3ed27044adeb49e0f6f0eacd3dfe8a1f38c4d1a1
24,701
py
Python
Reinforcement Learning/examples/envs/mobile_robot_vrep_env.py
HusseinLezzaik/Consensus-Algorithm-for-2-Mobile-Robots
0109c78106dff7640a8fc5601e0333b5397f5b4e
[ "MIT" ]
9
2021-04-20T08:12:47.000Z
2022-02-18T02:25:29.000Z
Reinforcement Learning/examples/envs/mobile_robot_vrep_env.py
HusseinLezzaik/Deep-Learning-for-Multi-Robotics
ecdb28793cc1f5fa6cded752908105ec37e9bfc7
[ "MIT" ]
null
null
null
Reinforcement Learning/examples/envs/mobile_robot_vrep_env.py
HusseinLezzaik/Deep-Learning-for-Multi-Robotics
ecdb28793cc1f5fa6cded752908105ec37e9bfc7
[ "MIT" ]
1
2021-11-16T08:16:36.000Z
2021-11-16T08:16:36.000Z
""" Defining Class of custom environment for V-Rep @author: hussein """ import vrep_env from vrep_env import vrep import os vrep_scenes_path = os.environ['/home/hussein/Desktop/Multi-agent-path-planning/Reinforcement Learning/examples/scenes'] import rclpy from rclpy.node import Node from tf2_msgs.msg import TFMes...
39.1458
271
0.52759
""" Defining Class of custom environment for V-Rep @author: hussein """ import vrep_env from vrep_env import vrep import os vrep_scenes_path = os.environ['/home/hussein/Desktop/Multi-agent-path-planning/Reinforcement Learning/examples/scenes'] import rclpy from rclpy.node import Node from tf2_msgs.msg import TFMes...
22,314
396
46
f723f8c5703335b1a0fa5a181861df8ecc2a13f8
6,240
py
Python
python/istio_api/mixer/v1/config/client/service_pb2.py
mt-inside/api
3197d4dee332beb55f830899f37091c9899833f9
[ "Apache-2.0" ]
3
2020-11-30T15:35:37.000Z
2022-01-06T14:17:18.000Z
python/istio_api/mixer/v1/config/client/service_pb2.py
mt-inside/api
3197d4dee332beb55f830899f37091c9899833f9
[ "Apache-2.0" ]
54
2020-06-23T17:34:04.000Z
2022-03-31T02:04:06.000Z
python/istio_api/mixer/v1/config/client/service_pb2.py
mt-inside/api
3197d4dee332beb55f830899f37091c9899833f9
[ "Apache-2.0" ]
12
2020-07-14T23:59:57.000Z
2022-03-22T09:59:18.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: mixer/v1/config/client/service.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message f...
41.6
624
0.747276
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: mixer/v1/config/client/service.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message f...
0
0
0
89707121790cc25aa1f25ca1fe56ce628f54fe0a
548
py
Python
src/consensus/weight_verifier.py
nondejus/chia-blockchain
67373400e7f88adff0c86e3bae2ddeadb49429ae
[ "Apache-2.0" ]
null
null
null
src/consensus/weight_verifier.py
nondejus/chia-blockchain
67373400e7f88adff0c86e3bae2ddeadb49429ae
[ "Apache-2.0" ]
null
null
null
src/consensus/weight_verifier.py
nondejus/chia-blockchain
67373400e7f88adff0c86e3bae2ddeadb49429ae
[ "Apache-2.0" ]
null
null
null
from typing import List from src.types.header_block import HeaderBlock def verify_weight( tip: HeaderBlock, proof_blocks: List[HeaderBlock], fork_point: HeaderBlock ) -> bool: """ Verifies whether the weight of the tip is valid or not. Naively, looks at every block from genesis, verifying proof of sp...
28.842105
89
0.698905
from typing import List from src.types.header_block import HeaderBlock def verify_weight( tip: HeaderBlock, proof_blocks: List[HeaderBlock], fork_point: HeaderBlock ) -> bool: """ Verifies whether the weight of the tip is valid or not. Naively, looks at every block from genesis, verifying proof of sp...
0
0
0
86730fd27a0440e8d0df28be564156a50855e775
9,755
py
Python
honeybot/lib/utils.py
RogerDeng/HoneyBot
3843ec6d684786091ced053857d1718ef1fa495c
[ "MIT" ]
67
2019-08-16T05:03:19.000Z
2021-11-25T01:48:23.000Z
honeybot/lib/utils.py
RogerDeng/HoneyBot
3843ec6d684786091ced053857d1718ef1fa495c
[ "MIT" ]
null
null
null
honeybot/lib/utils.py
RogerDeng/HoneyBot
3843ec6d684786091ced053857d1718ef1fa495c
[ "MIT" ]
16
2020-02-20T12:38:40.000Z
2022-03-22T17:45:25.000Z
""" __author__: Jamin Becker (jamin@packettotal.com) """ import os import sys import time import socket import logging import pathlib import warnings from hashlib import md5 import psutil import pyshark import progressbar from magic import from_buffer from terminaltables import AsciiTable from packettotal_sdk.packet...
34.348592
115
0.476371
""" __author__: Jamin Becker (jamin@packettotal.com) """ import os import sys import time import socket import logging import pathlib import warnings from hashlib import md5 import psutil import pyshark import progressbar from magic import from_buffer from terminaltables import AsciiTable from packettotal_sdk.packet...
1,810
0
69
8a5c676db35ceafbfa87c565e021037cd2bb5456
5,969
py
Python
test/test_shape_map_format.py
DaniFdezAlvarez/dbpedia-shexer
e2c0685b167810e13411b592b6bdd4acfc11e8c1
[ "Apache-2.0" ]
16
2019-03-18T21:32:36.000Z
2022-03-28T17:53:57.000Z
test/test_shape_map_format.py
DaniFdezAlvarez/shexer
4f4dffc95bcad038cbc1bd85b58e5558c7c0a6d1
[ "Apache-2.0" ]
67
2019-02-27T12:58:55.000Z
2022-03-28T20:38:48.000Z
test/test_shape_map_format.py
DaniFdezAlvarez/dbpedia-shexer
e2c0685b167810e13411b592b6bdd4acfc11e8c1
[ "Apache-2.0" ]
2
2019-03-09T00:30:28.000Z
2020-01-09T18:04:14.000Z
import unittest from shexer.shaper import Shaper from test.const import G1, BASE_FILES, default_namespaces from shexer.consts import JSON, FIXED_SHAPE_MAP from test.t_utils import file_vs_str_tunned_comparison import os.path as pth from shexer.consts import TURTLE _BASE_DIR = BASE_FILES + "shape_map" + pth.sep
50.584746
118
0.54716
import unittest from shexer.shaper import Shaper from test.const import G1, BASE_FILES, default_namespaces from shexer.consts import JSON, FIXED_SHAPE_MAP from test.t_utils import file_vs_str_tunned_comparison import os.path as pth from shexer.consts import TURTLE _BASE_DIR = BASE_FILES + "shape_map" + pth.sep class ...
5,420
23
212
0fc5bc4b5bbfcf8687ba770ac9a21a8952ebdebb
143
py
Python
ecommerce_api/data/admin.py
khaledmontaser20/Ecommerce_Backend
fc245e2a381d0b7e7b47220fa23623c64abac997
[ "MIT" ]
null
null
null
ecommerce_api/data/admin.py
khaledmontaser20/Ecommerce_Backend
fc245e2a381d0b7e7b47220fa23623c64abac997
[ "MIT" ]
null
null
null
ecommerce_api/data/admin.py
khaledmontaser20/Ecommerce_Backend
fc245e2a381d0b7e7b47220fa23623c64abac997
[ "MIT" ]
1
2021-12-17T18:12:54.000Z
2021-12-17T18:12:54.000Z
from django.contrib import admin from .models import * admin.site.register(Product) admin.site.register(Category) admin.site.register(Review)
20.428571
32
0.811189
from django.contrib import admin from .models import * admin.site.register(Product) admin.site.register(Category) admin.site.register(Review)
0
0
0
7f4653337e7137db4574c3ae8da4f111e668e483
7,478
py
Python
tests/distributions_test.py
danhey/exoplanet
bc82756dfa1b084e82cbcfa6185800833415e847
[ "MIT" ]
80
2018-10-28T09:55:34.000Z
2020-01-19T20:54:08.000Z
tests/distributions_test.py
danhey/exoplanet
bc82756dfa1b084e82cbcfa6185800833415e847
[ "MIT" ]
56
2018-11-18T20:08:51.000Z
2020-01-20T17:18:33.000Z
tests/distributions_test.py
danhey/exoplanet
bc82756dfa1b084e82cbcfa6185800833415e847
[ "MIT" ]
26
2018-11-30T17:07:33.000Z
2020-01-16T04:07:52.000Z
# -*- coding: utf-8 -*- import logging from collections import namedtuple import aesara_theano_fallback.tensor as tt import numpy as np import pymc3 as pm import pytest from pymc3.tests.test_distributions import R, Unit, Vector from pymc3.tests.test_transforms import check_transform, get_values from scipy.stats impor...
29.32549
76
0.537577
# -*- coding: utf-8 -*- import logging from collections import namedtuple import aesara_theano_fallback.tensor as tt import numpy as np import pymc3 as pm import pytest from pymc3.tests.test_distributions import R, Unit, Vector from pymc3.tests.test_transforms import check_transform, get_values from scipy.stats impor...
6,047
756
115
41bb8f8efbe2c21cd44cc434cadb92d66fd2ca08
2,554
py
Python
bambu_webhooks/forms.py
iamsteadman/bambu-webhooks
91c2517430cb1e82e60dc1533796b60c9774faa4
[ "Apache-2.0" ]
1
2022-03-31T23:12:18.000Z
2022-03-31T23:12:18.000Z
bambu_webhooks/forms.py
amarksteadman/bambu-webhooks
91c2517430cb1e82e60dc1533796b60c9774faa4
[ "Apache-2.0" ]
null
null
null
bambu_webhooks/forms.py
amarksteadman/bambu-webhooks
91c2517430cb1e82e60dc1533796b60c9774faa4
[ "Apache-2.0" ]
null
null
null
from django import forms from django.core.validators import URLValidator from django.core.exceptions import ValidationError from bambu_webhooks.models import Receiver from bambu_webhooks import site
32.74359
84
0.459671
from django import forms from django.core.validators import URLValidator from django.core.exceptions import ValidationError from bambu_webhooks.models import Receiver from bambu_webhooks import site class ReceiverForm(forms.Form): def __init__(self, *args, **kwargs): self.user = kwargs.pop('user') ...
2,235
10
111
2dd045f1f78168cc8d91f81b6b9efa0da474a6d2
2,886
py
Python
roles/openshift_health_checker/openshift_checks/ovs_version.py
baileyvw/openshift-ansible
b1184a1544a1cd13fc2623bfa468759cb9bff4ba
[ "Apache-2.0" ]
null
null
null
roles/openshift_health_checker/openshift_checks/ovs_version.py
baileyvw/openshift-ansible
b1184a1544a1cd13fc2623bfa468759cb9bff4ba
[ "Apache-2.0" ]
null
null
null
roles/openshift_health_checker/openshift_checks/ovs_version.py
baileyvw/openshift-ansible
b1184a1544a1cd13fc2623bfa468759cb9bff4ba
[ "Apache-2.0" ]
null
null
null
""" Ansible module for determining if an installed version of Open vSwitch is incompatible with the currently installed version of OpenShift. """ from openshift_checks import OpenShiftCheck, OpenShiftCheckException, get_var from openshift_checks.mixins import NotContainerizedMixin class OvsVersion(NotContainerizedMi...
36.531646
104
0.66736
""" Ansible module for determining if an installed version of Open vSwitch is incompatible with the currently installed version of OpenShift. """ from openshift_checks import OpenShiftCheck, OpenShiftCheckException, get_var from openshift_checks.mixins import NotContainerizedMixin class OvsVersion(NotContainerizedMi...
1,009
0
81
ca66dfc36676c0e005f6d50e7becb184769fea76
90
py
Python
flask_filealchemy/__init__.py
calpt/flask-filealchemy
b3575299f0230d5a64865af8066122c2e0c485ec
[ "MIT" ]
null
null
null
flask_filealchemy/__init__.py
calpt/flask-filealchemy
b3575299f0230d5a64865af8066122c2e0c485ec
[ "MIT" ]
null
null
null
flask_filealchemy/__init__.py
calpt/flask-filealchemy
b3575299f0230d5a64865af8066122c2e0c485ec
[ "MIT" ]
null
null
null
from .filealchemy import FileAlchemy, LoadError # NOQA from .common import ColumnMapping
30
55
0.822222
from .filealchemy import FileAlchemy, LoadError # NOQA from .common import ColumnMapping
0
0
0
0ddc35f02a21b4ce96b0c521c0282ae967dda2d7
1,293
py
Python
punting/twodim/twonormalization.py
microprediction/punting
5de62913f8eb9777df1d465db0f2d606a3d19c42
[ "MIT" ]
null
null
null
punting/twodim/twonormalization.py
microprediction/punting
5de62913f8eb9777df1d465db0f2d606a3d19c42
[ "MIT" ]
null
null
null
punting/twodim/twonormalization.py
microprediction/punting
5de62913f8eb9777df1d465db0f2d606a3d19c42
[ "MIT" ]
null
null
null
from punting.twodim.twodimensions import to_flat_exacta,from_flat_exacta,to_flat_quinella, from_flat_quinella from punting.onedim.onenormalization import to_normalized_dividends, to_normalized_probabilities def to_normalized_quinella_probabilities(q,scr=-1): """ :param q: 2-d representation :param scr: ...
26.9375
109
0.721578
from punting.twodim.twodimensions import to_flat_exacta,from_flat_exacta,to_flat_quinella, from_flat_quinella from punting.onedim.onenormalization import to_normalized_dividends, to_normalized_probabilities def to_normalized_quinella_probabilities(q,scr=-1): """ :param q: 2-d representation :param scr: ...
0
0
0
f4e18f6021386ba5dffdfdf479fa308f4411e811
1,939
py
Python
AD2/FunctionGenerator.py
holla2040/ad2
38abe08ba0d2e65fad3a7a7914d1bf567045d614
[ "MIT" ]
5
2018-06-25T05:12:48.000Z
2021-11-22T23:14:26.000Z
AD2/FunctionGenerator.py
holla2040/ad2
38abe08ba0d2e65fad3a7a7914d1bf567045d614
[ "MIT" ]
null
null
null
AD2/FunctionGenerator.py
holla2040/ad2
38abe08ba0d2e65fad3a7a7914d1bf567045d614
[ "MIT" ]
null
null
null
#!/usr/bin/env python from ctypes import * from dwfconstants import * import time,sys
34.625
110
0.698814
#!/usr/bin/env python from ctypes import * from dwfconstants import * import time,sys class FunctionGenerator(object): def __init__(self,dwf,hdwf,channel): self.dwf = dwf self.hdwf = hdwf self.channel = c_int(channel) self.dwf.FDwfAnalogOutNodeEnableSet(self.hdwf, self.channel, A...
1,450
377
23
3da7d3d604f3f675f9665b51dc88bf37cd90e5bc
67
py
Python
backend/consts.py
roechsli/planhub
aaf6cb6fded6d1c124ec32c03a9dc23b80c7b9aa
[ "MIT" ]
1
2021-09-25T09:38:03.000Z
2021-09-25T09:38:03.000Z
backend/consts.py
roechsli/planhub
aaf6cb6fded6d1c124ec32c03a9dc23b80c7b9aa
[ "MIT" ]
null
null
null
backend/consts.py
roechsli/planhub
aaf6cb6fded6d1c124ec32c03a9dc23b80c7b9aa
[ "MIT" ]
null
null
null
MINUTE_TIME_UNIT_MULTIPLIER = { "hours": 60, "minutes": 1 }
16.75
31
0.626866
MINUTE_TIME_UNIT_MULTIPLIER = { "hours": 60, "minutes": 1 }
0
0
0
a621f79cb80d81894fd07f221871293abdc639f4
8,386
py
Python
models/baseline.py
DoubtedSteam/MPANet
fe4f3f1d83c45485b1498786f89ace96c634f187
[ "MIT" ]
25
2021-06-25T03:37:21.000Z
2022-03-11T02:21:06.000Z
models/baseline.py
DoubtedSteam/MPANet
fe4f3f1d83c45485b1498786f89ace96c634f187
[ "MIT" ]
6
2021-06-25T06:46:03.000Z
2022-03-25T06:47:12.000Z
models/baseline.py
DoubtedSteam/MPANet
fe4f3f1d83c45485b1498786f89ace96c634f187
[ "MIT" ]
2
2021-12-14T07:40:59.000Z
2021-12-20T02:40:58.000Z
import math import torch import torch.nn as nn from torch.nn import init from torch.nn import functional as F from torch.nn import Parameter import numpy as np import cv2 from models.resnet import resnet50 from utils.calc_acc import calc_acc from layers import TripletLoss from layers import CenterTripletLoss from la...
41.721393
145
0.61543
import math import torch import torch.nn as nn from torch.nn import init from torch.nn import functional as F from torch.nn import Parameter import numpy as np import cv2 from models.resnet import resnet50 from utils.calc_acc import calc_acc from layers import TripletLoss from layers import CenterTripletLoss from la...
7,876
5
103
c6947747816547467c9afc2ee5856aad33e82f28
623
py
Python
p645_set_mismatch.py
feigaochn/leetcode
abf0877fae02aa9c2549051f0b68df0ace952512
[ "MIT" ]
null
null
null
p645_set_mismatch.py
feigaochn/leetcode
abf0877fae02aa9c2549051f0b68df0ace952512
[ "MIT" ]
null
null
null
p645_set_mismatch.py
feigaochn/leetcode
abf0877fae02aa9c2549051f0b68df0ace952512
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 if __name__ == '__main__': sol = Solution() print(sol.findErrorNums([1, 2, 2, 4])) print(sol.findErrorNums([2, 2]))
24.92
104
0.499197
#!/usr/bin/env python # coding: utf-8 class Solution(object): def findErrorNums(self, nums): """ :type nums: List[int] :rtype: List[int] """ n = len(nums) minus = n * (n + 1) // 2 - sum(nums) # miss - dup minus2 = sum(i * i for i in range(1, n + 1)) - sum(m...
0
431
23
69b669dec472fa3555c9d25213f71d5da0489450
6,338
py
Python
tests/framework_graphql/_target_application.py
lrafeei/newrelic-python-agent
3dbf080d4104514e49ad8e1d06abac75b6914ee1
[ "Apache-2.0" ]
null
null
null
tests/framework_graphql/_target_application.py
lrafeei/newrelic-python-agent
3dbf080d4104514e49ad8e1d06abac75b6914ee1
[ "Apache-2.0" ]
1
2021-07-30T18:31:14.000Z
2021-07-30T18:31:14.000Z
tests/framework_graphql/_target_application.py
lrafeei/newrelic-python-agent
3dbf080d4104514e49ad8e1d06abac75b6914ee1
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 New Relic, Inc. # # 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 writ...
25.869388
83
0.630956
# Copyright 2010 New Relic, Inc. # # 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 writ...
458
0
161
ade73391147394a210ab7e939baae2a264e0589f
3,964
py
Python
templatestore/models.py
ackotech/django-templatestore
ec96f9b1f5b3d129bea0b2e8f3773bfcea440f36
[ "Apache-2.0" ]
null
null
null
templatestore/models.py
ackotech/django-templatestore
ec96f9b1f5b3d129bea0b2e8f3773bfcea440f36
[ "Apache-2.0" ]
2
2021-06-02T05:06:54.000Z
2022-02-28T07:02:25.000Z
templatestore/models.py
ackotech/django-templatestore
ec96f9b1f5b3d129bea0b2e8f3773bfcea440f36
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.contrib.postgres.fields import JSONField from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from templatestore import app_settings as ts_settings import re
38.115385
88
0.687689
from django.db import models from django.contrib.postgres.fields import JSONField from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from templatestore import app_settings as ts_settings import re class Template(models.Model): def attributes_default(): ...
1,103
2,513
92
1553588cdb6125b7a8404633ab139fc78c91675e
4,469
py
Python
rudetox/seq2seq/predict.py
IlyaGusev/rudetox
e1c6334744bf9d28639efbb61c3605be51642ce9
[ "Apache-2.0" ]
1
2022-03-02T15:50:10.000Z
2022-03-02T15:50:10.000Z
rudetox/seq2seq/predict.py
IlyaGusev/rudetox
e1c6334744bf9d28639efbb61c3605be51642ce9
[ "Apache-2.0" ]
null
null
null
rudetox/seq2seq/predict.py
IlyaGusev/rudetox
e1c6334744bf9d28639efbb61c3605be51642ce9
[ "Apache-2.0" ]
null
null
null
import argparse import json import copy import torch import razdel from tqdm import tqdm from transformers import AutoTokenizer, AutoModelForSeq2SeqLM from rudetox.util.io import read_jsonl, write_jsonl from rudetox.util.dl import gen_batch, set_random_seed from rudetox.ranker import Ranker if __name__ == "__main_...
35.468254
100
0.658984
import argparse import json import copy import torch import razdel from tqdm import tqdm from transformers import AutoTokenizer, AutoModelForSeq2SeqLM from rudetox.util.io import read_jsonl, write_jsonl from rudetox.util.dl import gen_batch, set_random_seed from rudetox.ranker import Ranker def predict( model_n...
2,869
0
23
8ec2d573ab0ceaac64cdb9c39985ee065ca71da5
1,944
py
Python
bamboo/tests/core/test_calculator.py
pld/bamboo
a0fc77aebd6ff6b1087ba46896b0ce705fbb25a3
[ "BSD-3-Clause" ]
27
2015-01-14T15:57:54.000Z
2020-12-27T19:34:41.000Z
bamboo/tests/core/test_calculator.py
biswapanda/bamboo
72fc260822a27ce52cbe65de178f8fa1b60311f3
[ "BSD-3-Clause" ]
2
2015-08-06T15:23:28.000Z
2016-01-28T00:05:25.000Z
bamboo/tests/core/test_calculator.py
biswapanda/bamboo
72fc260822a27ce52cbe65de178f8fa1b60311f3
[ "BSD-3-Clause" ]
10
2015-08-07T01:50:39.000Z
2019-05-15T21:41:18.000Z
from bamboo.core.parser import Parser from bamboo.core.calculator import calculate_columns from bamboo.lib.datetools import now, recognize_dates from bamboo.models.calculation import Calculation from bamboo.models.dataset import Dataset from bamboo.tests.test_base import TestBase
35.345455
77
0.652778
from bamboo.core.parser import Parser from bamboo.core.calculator import calculate_columns from bamboo.lib.datetools import now, recognize_dates from bamboo.models.calculation import Calculation from bamboo.models.dataset import Dataset from bamboo.tests.test_base import TestBase class TestCalculator(TestBase): ...
1,548
10
104
96ed8b33dab9bb069a735a68ce4463baaee67e58
371
py
Python
users/urls.py
flaviofontes29/online-course-platform
2cebacce58b7ee8ca004b4b70581d51f827869d5
[ "MIT" ]
null
null
null
users/urls.py
flaviofontes29/online-course-platform
2cebacce58b7ee8ca004b4b70581d51f827869d5
[ "MIT" ]
null
null
null
users/urls.py
flaviofontes29/online-course-platform
2cebacce58b7ee8ca004b4b70581d51f827869d5
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path("registration/", views.registration, name="registration"), path("login/", views.login, name="login"), path("valid_registry", views.valid_registry, name="valid_registry"), path("valid_login", views.valid_login, name="valid_login"), ...
30.916667
72
0.698113
from django.urls import path from . import views urlpatterns = [ path("registration/", views.registration, name="registration"), path("login/", views.login, name="login"), path("valid_registry", views.valid_registry, name="valid_registry"), path("valid_login", views.valid_login, name="valid_login"), ...
0
0
0
f34d1f1fdb44abb6e5ea8015474e49216be4b0b3
2,967
py
Python
powerstrip/utils/utils.py
keans/powerstrip
fb5ba4d19b60d4404d68fd9b4af739afc64a161c
[ "MIT" ]
null
null
null
powerstrip/utils/utils.py
keans/powerstrip
fb5ba4d19b60d4404d68fd9b4af739afc64a161c
[ "MIT" ]
null
null
null
powerstrip/utils/utils.py
keans/powerstrip
fb5ba4d19b60d4404d68fd9b4af739afc64a161c
[ "MIT" ]
null
null
null
from hashlib import sha3_256 from typing import Union, BinaryIO from pathlib import Path from importlib_metadata import pathlib def ensure_path( path: Union[str, Path], must_exist: bool = False ) -> Path: """ ensures that given path is of type Path and that HOME directory is resolved """ path...
26.256637
70
0.634648
from hashlib import sha3_256 from typing import Union, BinaryIO from pathlib import Path from importlib_metadata import pathlib def ensure_path( path: Union[str, Path], must_exist: bool = False ) -> Path: """ ensures that given path is of type Path and that HOME directory is resolved """ path...
0
0
0
2b57936d0ac7bfbb6b3535903ca37ced53fa3380
20,247
py
Python
dtr_code/shared/pt_trial_util.py
merrymercy/dtr-prototype
bf40e182453a7d8d23581ea68f32a9d7d2037d62
[ "Linux-OpenIB" ]
1
2021-08-02T02:42:58.000Z
2021-08-02T02:42:58.000Z
dtr_code/shared/pt_trial_util.py
merrymercy/dtr-prototype
bf40e182453a7d8d23581ea68f32a9d7d2037d62
[ "Linux-OpenIB" ]
null
null
null
dtr_code/shared/pt_trial_util.py
merrymercy/dtr-prototype
bf40e182453a7d8d23581ea68f32a9d7d2037d62
[ "Linux-OpenIB" ]
1
2021-08-05T08:58:53.000Z
2021-08-05T08:58:53.000Z
""" Utilities for setting up PyTorch memory usage experiments. """ import csv from itertools import product as iter_product import os import subprocess import time import numpy as np from common import (check_file_exists, prepare_out_file, read_json, render_exception, write_json) MEASURED_KEYS = ...
40.332669
180
0.604089
""" Utilities for setting up PyTorch memory usage experiments. """ import csv from itertools import product as iter_product import os import subprocess import time import numpy as np from common import (check_file_exists, prepare_out_file, read_json, render_exception, write_json) MEASURED_KEYS = ...
4,478
0
214
7060bd715ab72e7b9f69d15367cada6ec0d11942
2,857
py
Python
sac_release/scripts/plot_traces.py
anonymouscode114/iclr2021_rlreg
142566f4316bfed9e3858b92f87a792b7c7b8b1b
[ "MIT" ]
1
2021-05-17T16:40:59.000Z
2021-05-17T16:40:59.000Z
sac_release/scripts/plot_traces.py
anonymouscode114/iclr2021_rlreg
142566f4316bfed9e3858b92f87a792b7c7b8b1b
[ "MIT" ]
null
null
null
sac_release/scripts/plot_traces.py
anonymouscode114/iclr2021_rlreg
142566f4316bfed9e3858b92f87a792b7c7b8b1b
[ "MIT" ]
null
null
null
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import seaborn as sns import argparse import numpy as np import joblib import tensorflow as tf import os from sac.misc import utils from sac.policies.hierarchical_policy import FixedOptionPolicy from sac.misc.sampler import rollouts if __name__ =...
40.239437
108
0.561078
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import seaborn as sns import argparse import numpy as np import joblib import tensorflow as tf import os from sac.misc import utils from sac.policies.hierarchical_policy import FixedOptionPolicy from sac.misc.sampler import rollouts if __name__ =...
0
0
0
1b35a6a437b8cb176fd083149154bbbac97c60bb
4,657
py
Python
src/pyams_layer/interfaces.py
Py-AMS/pyams-layer
815652091bb137d3b6bf48c476a17e7ae9c4bbe9
[ "ZPL-2.1" ]
null
null
null
src/pyams_layer/interfaces.py
Py-AMS/pyams-layer
815652091bb137d3b6bf48c476a17e7ae9c4bbe9
[ "ZPL-2.1" ]
null
null
null
src/pyams_layer/interfaces.py
Py-AMS/pyams-layer
815652091bb137d3b6bf48c476a17e7ae9c4bbe9
[ "ZPL-2.1" ]
null
null
null
# # Copyright (c) 2015-2019 Thierry Florac <tflorac AT ulthar.net> # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRAN...
32.117241
98
0.640971
# # Copyright (c) 2015-2019 Thierry Florac <tflorac AT ulthar.net> # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRAN...
0
0
0
cb86014120f9b3abdecf38c0897bbbd5da882129
383
py
Python
juno/resources/routes/plan_routes.py
leogregianin/juno-python
0be2b70516b0dde713ff36cdb40888f06cc538f5
[ "MIT" ]
2
2022-03-25T21:08:46.000Z
2022-03-31T21:10:17.000Z
juno/resources/routes/plan_routes.py
leogregianin/juno-python
0be2b70516b0dde713ff36cdb40888f06cc538f5
[ "MIT" ]
null
null
null
juno/resources/routes/plan_routes.py
leogregianin/juno-python
0be2b70516b0dde713ff36cdb40888f06cc538f5
[ "MIT" ]
null
null
null
from ..handler_request import get_resource_url
21.277778
53
0.754569
from ..handler_request import get_resource_url def get_base_url(): return f"{get_resource_url()}/plans" def get_specific_plan_by_id_url(plan_id): return f"{get_base_url()}/{plan_id}" def get_deactivation_plan_url(plan_id): return f"{get_base_url()}/{plan_id}/deactivation" def get_activation_plan_url...
240
0
92
8517208114b4255485d8d12bb384924a3f34b6b4
1,080
py
Python
ex045.py
natancordeiro/python
a4b82847640bd7d2f8ed9aff83a9afabe57bc37d
[ "MIT" ]
null
null
null
ex045.py
natancordeiro/python
a4b82847640bd7d2f8ed9aff83a9afabe57bc37d
[ "MIT" ]
null
null
null
ex045.py
natancordeiro/python
a4b82847640bd7d2f8ed9aff83a9afabe57bc37d
[ "MIT" ]
null
null
null
from random import randint itens = ('Pedra', 'Papel', 'Tesoura') pc = randint(0, 2) print('''Suas opções: [ 0 ] PEDRA [ 1 ] PAPEL [ 2 ] TESOURA ''') op = int(input('Qual é a sua jogada: ')) print('-=' * 11) print('Computador jogou {}'.format(itens[pc])) print('jogador jogou {}'.format(itens[op])) print('-=' * 11) if ...
25.714286
57
0.551852
from random import randint itens = ('Pedra', 'Papel', 'Tesoura') pc = randint(0, 2) print('''Suas opções: [ 0 ] PEDRA [ 1 ] PAPEL [ 2 ] TESOURA ''') op = int(input('Qual é a sua jogada: ')) print('-=' * 11) print('Computador jogou {}'.format(itens[pc])) print('jogador jogou {}'.format(itens[op])) print('-=' * 11) if ...
0
0
0
1cb755c1b899160b38a043a452f7aa868561f139
7,609
py
Python
biostar/pdf_layer/migrations/0003_auto__add_unique_publication_cluster_id.py
AshwinParanjape/mugap
753c61c537bcc36ed6d6ccf593fb0d91015275e4
[ "MIT" ]
null
null
null
biostar/pdf_layer/migrations/0003_auto__add_unique_publication_cluster_id.py
AshwinParanjape/mugap
753c61c537bcc36ed6d6ccf593fb0d91015275e4
[ "MIT" ]
6
2020-02-11T21:45:21.000Z
2021-06-01T21:41:38.000Z
biostar/pdf_layer/migrations/0003_auto__add_unique_publication_cluster_id.py
AshwinParanjape/mugap
753c61c537bcc36ed6d6ccf593fb0d91015275e4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models
71.783019
168
0.554212
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'Publication', fields ['cluster_id'] db.cre...
293
7,128
23
3312115a01e53b52755173edd27063a999926ad7
660
py
Python
examples/dagster_examples_tests/pyspark_pagerank_tests/test_original.py
shahvineet98/dagster
2471d39c52f660e23e8c0d8e8ded873ddc3df036
[ "Apache-2.0" ]
3
2020-09-09T04:10:23.000Z
2021-11-08T02:10:42.000Z
examples/dagster_examples_tests/pyspark_pagerank_tests/test_original.py
shahvineet98/dagster
2471d39c52f660e23e8c0d8e8ded873ddc3df036
[ "Apache-2.0" ]
2
2021-05-11T13:36:27.000Z
2021-09-03T01:53:11.000Z
examples/dagster_examples_tests/pyspark_pagerank_tests/test_original.py
shahvineet98/dagster
2471d39c52f660e23e8c0d8e8ded873ddc3df036
[ "Apache-2.0" ]
1
2021-02-21T12:16:47.000Z
2021-02-21T12:16:47.000Z
import os from dagster_examples.pyspark_pagerank.original import ( computeContribs, execute_pagerank, parseNeighbors, ) from .util import checks_for_helper_functions
25.384615
72
0.721212
import os from dagster_examples.pyspark_pagerank.original import ( computeContribs, execute_pagerank, parseNeighbors, ) from .util import checks_for_helper_functions def test_helpers(): checks_for_helper_functions(computeContribs, parseNeighbors) def test_execute_pagerank(): cwd = os.path.dirn...
432
0
46
753157c552d6a43cec2d453e8e22e61d47e8c0b1
3,587
py
Python
pygtfs/schedule.py
olalid/pygtfs
2f097effe9bb31ca9699d95eabf39d1496ea5c10
[ "MIT" ]
49
2015-01-12T17:49:25.000Z
2022-03-27T10:48:01.000Z
pygtfs/schedule.py
olalid/pygtfs
2f097effe9bb31ca9699d95eabf39d1496ea5c10
[ "MIT" ]
43
2015-07-15T06:32:54.000Z
2022-02-19T17:42:04.000Z
pygtfs/schedule.py
olalid/pygtfs
2f097effe9bb31ca9699d95eabf39d1496ea5c10
[ "MIT" ]
46
2015-02-13T18:33:08.000Z
2022-02-19T17:16:46.000Z
from __future__ import (division, absolute_import, print_function, unicode_literals) import sqlalchemy import sqlalchemy.orm from .gtfs_entities import gtfs_all, Feed, Base class Schedule: """Represents the full database. The schedule is the most important object in pygtfs. It repre...
38.98913
120
0.686367
from __future__ import (division, absolute_import, print_function, unicode_literals) import sqlalchemy import sqlalchemy.orm from .gtfs_entities import gtfs_all, Feed, Base class Schedule: """Represents the full database. The schedule is the most important object in pygtfs. It repre...
1,400
0
96
c2a6137a992f38d7a2604a9015b1f9156504fe6a
644
py
Python
hexa/plugins/connector_airflow/migrations/0012_remove_airflow_run_message.py
qgerome/openhexa-app
8c9377b2ad972121d8e9575f5d52420212b52ed4
[ "MIT" ]
4
2021-07-19T12:53:21.000Z
2022-01-26T17:45:02.000Z
hexa/plugins/connector_airflow/migrations/0012_remove_airflow_run_message.py
qgerome/openhexa-app
8c9377b2ad972121d8e9575f5d52420212b52ed4
[ "MIT" ]
20
2021-05-17T12:27:06.000Z
2022-03-30T11:35:26.000Z
hexa/plugins/connector_airflow/migrations/0012_remove_airflow_run_message.py
qgerome/openhexa-app
8c9377b2ad972121d8e9575f5d52420212b52ed4
[ "MIT" ]
2
2021-09-07T04:19:59.000Z
2022-02-08T15:33:29.000Z
# Generated by Django 3.2.7 on 2021-10-11 12:43 from django.db import migrations
24.769231
73
0.569876
# Generated by Django 3.2.7 on 2021-10-11 12:43 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("connector_airflow", "0011_alter_dagrun_options"), ] operations = [ migrations.AlterModelOptions( name="dagconfig", options={...
0
538
23
bae54090a3727a76745b4b316ac38f161ed1caa4
3,683
py
Python
matrix/plugin.program.openwizard/resources/libs/test.py
nzmodbox/repo.modbox
5a5d77089f94f2fdde755ccc2e5f93e81f54f261
[ "Apache-2.0" ]
null
null
null
matrix/plugin.program.openwizard/resources/libs/test.py
nzmodbox/repo.modbox
5a5d77089f94f2fdde755ccc2e5f93e81f54f261
[ "Apache-2.0" ]
null
null
null
matrix/plugin.program.openwizard/resources/libs/test.py
nzmodbox/repo.modbox
5a5d77089f94f2fdde755ccc2e5f93e81f54f261
[ "Apache-2.0" ]
null
null
null
################################################################################ # Copyright (C) 2019 drinfernoo # # # # This Program is free software; you can redistribute it and/or modify ...
37.20202
184
0.553353
################################################################################ # Copyright (C) 2019 drinfernoo # # # # This Program is free software; you can redistribute it and/or modify ...
1,887
0
161
2f756ce131e3d8539e389b9a570b87b3a3b29ccb
2,905
py
Python
2018/day07/part2.py
zagura/aoc-2017
bfd38fb6fbe4211017a306d218b32ecff741e006
[ "MIT" ]
2
2018-12-09T16:00:09.000Z
2018-12-09T17:56:15.000Z
2018/day07/part2.py
zagura/aoc-2017
bfd38fb6fbe4211017a306d218b32ecff741e006
[ "MIT" ]
null
null
null
2018/day07/part2.py
zagura/aoc-2017
bfd38fb6fbe4211017a306d218b32ecff741e006
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # Example line: Step A must be finished before step L can begin. edges = [(ord(x[1]) - ord('A'), ord(x[7]) - ord('A')) for x in map(lambda x: x.split(), open('input.in').readlines())] workers = 5 for e in edges: print('{} → {}'.format(chr(ord('A') + e[0]),chr(ord('A') + e[1]))) graph = {} # for ...
35.426829
111
0.532186
#!/usr/bin/python3 # Example line: Step A must be finished before step L can begin. edges = [(ord(x[1]) - ord('A'), ord(x[7]) - ord('A')) for x in map(lambda x: x.split(), open('input.in').readlines())] workers = 5 for e in edges: print('{} → {}'.format(chr(ord('A') + e[0]),chr(ord('A') + e[1]))) class Node(object...
369
-2
129
00d19d569ee8948072fd77d26286654501cb8321
569
py
Python
backend_rest/tracking/migrations/0006_auto_20200620_1535.py
ezrankayamba/twiga_distribution
ac4fd3d4f6b111e734a932398be564c863582be2
[ "MIT" ]
null
null
null
backend_rest/tracking/migrations/0006_auto_20200620_1535.py
ezrankayamba/twiga_distribution
ac4fd3d4f6b111e734a932398be564c863582be2
[ "MIT" ]
16
2020-03-23T13:24:11.000Z
2022-03-12T00:17:58.000Z
backend_rest/tracking/migrations/0006_auto_20200620_1535.py
ezrankayamba/twiga_distribution
ac4fd3d4f6b111e734a932398be564c863582be2
[ "MIT" ]
null
null
null
# Generated by Django 3.0.2 on 2020-06-20 12:35 from django.db import migrations, models
23.708333
62
0.585237
# Generated by Django 3.0.2 on 2020-06-20 12:35 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tracking', '0005_auto_20200620_1521'), ] operations = [ migrations.AddField( model_name='contact', name='email_alt',...
0
455
23
708616fb52ff53ea202e769ba39d75481910a2d1
3,812
py
Python
utilities/prune_infreq.py
ShadenSmith/parse-tools
dc6e52821184729bf694e26e45a4b3eace5d4bc8
[ "MIT" ]
null
null
null
utilities/prune_infreq.py
ShadenSmith/parse-tools
dc6e52821184729bf694e26e45a4b3eace5d4bc8
[ "MIT" ]
2
2017-01-13T03:27:25.000Z
2017-03-23T15:50:03.000Z
utilities/prune_infreq.py
ShadenSmith/parse-tools
dc6e52821184729bf694e26e45a4b3eace5d4bc8
[ "MIT" ]
1
2017-07-06T17:40:17.000Z
2017-07-06T17:40:17.000Z
#!/usr/bin/env python3 import sys import argparse from collections import Counter my_description = ''' Prune empty (or infrequent) slices from a tensor. With default options, this script scans a tensor file and removes empty slices. Those slices are then specified with "mode-X-gaps.map" files which map the old dime...
28.661654
79
0.672875
#!/usr/bin/env python3 import sys import argparse from collections import Counter my_description = ''' Prune empty (or infrequent) slices from a tensor. With default options, this script scans a tensor file and removes empty slices. Those slices are then specified with "mode-X-gaps.map" files which map the old dime...
0
0
0
755f967e61125ac5cfadb640c0e1d4eef7cfafe6
574
py
Python
books/PythonCleanCode/ch4_solid/lsp_1.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonCleanCode/ch4_solid/lsp_1.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonCleanCode/ch4_solid/lsp_1.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""Clean Code in Python - Chater 4, The SOLID Principles > Liskov's Substitution Principle (LSP) Detecting violatinos os LSP through tools (mypy, pylint, etc.) """
22.076923
88
0.655052
"""Clean Code in Python - Chater 4, The SOLID Principles > Liskov's Substitution Principle (LSP) Detecting violatinos os LSP through tools (mypy, pylint, etc.) """ class Event: ... def meets_condition(self, event_data: dict) -> bool: return False class LoginEvent(Event): def meets_condition(s...
251
33
121