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
32833472f753245d568128df8a1f79f7efbe1fb7
549
py
Python
Scripts/hello_world.py
hasauino/Python
c94ea3a15f8310c95b7aaabaaa82f59dbf748a85
[ "MIT" ]
null
null
null
Scripts/hello_world.py
hasauino/Python
c94ea3a15f8310c95b7aaabaaa82f59dbf748a85
[ "MIT" ]
null
null
null
Scripts/hello_world.py
hasauino/Python
c94ea3a15f8310c95b7aaabaaa82f59dbf748a85
[ "MIT" ]
null
null
null
print "Salam Alaikom !" import sys # if statement ------------------------------- if False: print "hi" print "Hello Wolrd!" if True: print "1" print "2" # array -------------------------------------- days = ["Monday", 'Tuesday', 'Wednesday', 'Thursday', 'Friday'] print days[0]; a=1; b=2 # -----------------...
14.837838
46
0.500911
print "Salam Alaikom !" import sys # if statement ------------------------------- if False: print "hi" print "Hello Wolrd!" if True: print "1" print "2" # array -------------------------------------- days = ["Monday", 'Tuesday', 'Wednesday', 'Thursday', 'Friday'] print days[0]; a=1; b=2 # -----------------...
0
0
0
a365a4252c5d814005389ed06e5f4dcda0f48f17
504
py
Python
tests/test.py
rose-okoth/News-API
1c19fe74903105599a40c53e68de61eccd993a46
[ "Unlicense", "MIT" ]
null
null
null
tests/test.py
rose-okoth/News-API
1c19fe74903105599a40c53e68de61eccd993a46
[ "Unlicense", "MIT" ]
null
null
null
tests/test.py
rose-okoth/News-API
1c19fe74903105599a40c53e68de61eccd993a46
[ "Unlicense", "MIT" ]
null
null
null
import unittest from app.models import News News=news.News class NewsTest(unittest.TestCase): ''' Test class to test the behaviour of the news class ''' if __name__ == '__main__': unittest.main()
26.526316
180
0.68254
import unittest from app.models import News News=news.News class NewsTest(unittest.TestCase): ''' Test class to test the behaviour of the news class ''' def setUp(self): self.new_news = News('CNN','CNN','Surviving in a pandemic','Effects of Covid 19 in the past year',2021-2-22,'https://cnn.co...
235
0
54
b155700b84e2bb0d3b9d155501dd2186f8955f11
2,095
py
Python
pygraph/functions/searching/astar.py
schlpbch/pygraph
037bb2f32503fecb60d62921f9766d54109f15e2
[ "MIT" ]
62
2015-08-24T14:51:17.000Z
2021-08-03T03:19:15.000Z
pygraph/functions/searching/astar.py
schlpbch/pygraph
037bb2f32503fecb60d62921f9766d54109f15e2
[ "MIT" ]
3
2017-10-31T16:41:51.000Z
2020-04-13T20:49:39.000Z
pygraph/functions/searching/astar.py
schlpbch/pygraph
037bb2f32503fecb60d62921f9766d54109f15e2
[ "MIT" ]
30
2017-04-18T01:42:56.000Z
2021-09-06T09:49:07.000Z
"""Implements A* Search functionality.""" from ...helpers import PriorityQueue from ...exceptions import NonexistentNodeError def a_star_search(graph, start, goal): """Runs an A* search on the specified graph to find a path from the ''start'' node to the ''goal'' node. Returns a list of nodes specifying a min...
31.742424
108
0.663962
"""Implements A* Search functionality.""" from ...helpers import PriorityQueue from ...exceptions import NonexistentNodeError def a_star_search(graph, start, goal): """Runs an A* search on the specified graph to find a path from the ''start'' node to the ''goal'' node. Returns a list of nodes specifying a min...
186
0
45
e1d9d2d9a20f6919f3eaa0b19980f164fdc47b5f
30,254
py
Python
addons/survey/models/survey_question.py
SHIVJITH/Odoo_Machine_Test
310497a9872db7844b521e6dab5f7a9f61d365a4
[ "Apache-2.0" ]
null
null
null
addons/survey/models/survey_question.py
SHIVJITH/Odoo_Machine_Test
310497a9872db7844b521e6dab5f7a9f61d365a4
[ "Apache-2.0" ]
null
null
null
addons/survey/models/survey_question.py
SHIVJITH/Odoo_Machine_Test
310497a9872db7844b521e6dab5f7a9f61d365a4
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import collections import json import itertools import operator from odoo import api, fields, models, tools, _ from odoo.exceptions import ValidationError class SurveyQuestion(models.Model): """ Questions that wil...
53.928699
162
0.658888
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import collections import json import itertools import operator from odoo import api, fields, models, tools, _ from odoo.exceptions import ValidationError class SurveyQuestion(models.Model): """ Questions that wil...
7,456
0
401
64bcde3e3778f24206da1450da29a5bf8fcaeb50
1,448
py
Python
gcloud_dataproc/submit.py
macarthur-lab/hail-elasticsearch-pipelines
7082681fd125e4f23a512aeff49853c5fc0f3136
[ "MIT" ]
15
2017-11-22T14:48:04.000Z
2020-10-05T18:22:24.000Z
gcloud_dataproc/submit.py
macarthur-lab/hail-elasticsearch-pipelines
7082681fd125e4f23a512aeff49853c5fc0f3136
[ "MIT" ]
86
2017-12-14T23:45:29.000Z
2020-10-13T18:15:54.000Z
gcloud_dataproc/submit.py
macarthur-lab/hail-elasticsearch-pipelines
7082681fd125e4f23a512aeff49853c5fc0f3136
[ "MIT" ]
7
2019-01-29T09:08:10.000Z
2020-02-25T16:22:57.000Z
#!/usr/bin/env python import argparse import os import subprocess import tempfile if __name__ == '__main__': p = argparse.ArgumentParser() p.add_argument("-c", "--cluster", default="no-vep") p.add_argument("script") args, unparsed_args = p.parse_known_args() submit(args.script, unparsed_args, ...
33.674419
148
0.674724
#!/usr/bin/env python import argparse import os import subprocess import tempfile def submit(script, script_args_list, cluster='no-vep', wait_for_job=True, use_existing_scripts_zip=False, region=None, spark_env=None, job_id=None): script_args = " ".join(['"%s"' % arg for arg in script_args_list]) hail_scrip...
1,083
0
23
309813fa77ab295af0296cf9deb86684b7f31eaa
1,827
py
Python
wavelet/compression/compressor_magnitude.py
AP-Atul/wavelets-ext
00ced22462c369584ebd32f9b5f357f092de0142
[ "MIT" ]
4
2021-02-01T07:43:10.000Z
2021-04-27T06:58:54.000Z
wavelet/compression/compressor_magnitude.py
AP-Atul/wavelets-ext
00ced22462c369584ebd32f9b5f357f092de0142
[ "MIT" ]
null
null
null
wavelet/compression/compressor_magnitude.py
AP-Atul/wavelets-ext
00ced22462c369584ebd32f9b5f357f092de0142
[ "MIT" ]
null
null
null
""" Compression using the average of signal as a magnitude """ import numpy as np from .compressor import Compressor class CompressorMagnitude: """ The average of the signal is used to perform the compression on the input data signal. Check the Compressor class on how the thresholding is done with t...
25.375
84
0.605911
""" Compression using the average of signal as a magnitude """ import numpy as np from .compressor import Compressor class CompressorMagnitude: """ The average of the signal is used to perform the compression on the input data signal. Check the Compressor class on how the thresholding is done with t...
69
0
27
96186744d6789db434bb6817cc7c93a3fee17ace
2,246
py
Python
mkcloud.py
JunhoYeo/mkcloud
2a4629fdbbf954a55283f8d3ba5e430a221e4b94
[ "MIT" ]
1
2018-08-13T23:51:57.000Z
2018-08-13T23:51:57.000Z
mkcloud.py
JunhoYeo/mkcloud
2a4629fdbbf954a55283f8d3ba5e430a221e4b94
[ "MIT" ]
null
null
null
mkcloud.py
JunhoYeo/mkcloud
2a4629fdbbf954a55283f8d3ba5e430a221e4b94
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from wordcloud import WordCloud, ImageColorGenerator from PIL import Image import numpy as np import random if __name__ == '__main__': import re import multidict as multidict text = getFrequencyDictForText(open('lorem-ipsum.txt').read()) mkcloud('lor...
35.09375
94
0.601514
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from wordcloud import WordCloud, ImageColorGenerator from PIL import Image import numpy as np import random def mkcloud(filename, dic, theme_start, theme_end): def linear_gradient(n=10): ''' returns a gradient list of (n) colors between two hex colors...
1,833
0
50
8119d973649690caaf8fc15259c7a1f12bccb05a
289
py
Python
fe_cipher/constants/areas.py
uakihir0/fecipher
dd5c2a0d47d2701570b43f4906bdec993f4d571c
[ "MIT" ]
3
2020-01-16T10:53:26.000Z
2020-01-16T10:53:40.000Z
fe_cipher/constants/areas.py
uakihir0/fecipher
dd5c2a0d47d2701570b43f4906bdec993f4d571c
[ "MIT" ]
null
null
null
fe_cipher/constants/areas.py
uakihir0/fecipher
dd5c2a0d47d2701570b43f4906bdec993f4d571c
[ "MIT" ]
1
2020-01-16T11:08:15.000Z
2020-01-16T11:08:15.000Z
# -*- coding: utf-8 -*- from enum import Enum # エリア定義
11.56
23
0.435986
# -*- coding: utf-8 -*- from enum import Enum # エリア定義 class Areas(Enum): # デッキ Deck = 1 # 手札 Hand = 2 # 絆 Bond = 3 # 前衛 FrontLine = 4 # 後衛 BackLine = 5 # 退避 Retreat = 6 # 支援 Support = 7 # オーブ Orb = 8 # 無限 Mugen = 9
0
249
22
395b142680f5cde9c72f9f6f5f6119c63915dae1
4,052
py
Python
attention.py
dsj96/TITS
c84f04bdb9f1f0af5f6cca1e6a10151e4dae162d
[ "MIT" ]
2
2021-12-05T16:34:05.000Z
2021-12-30T00:25:29.000Z
attention.py
dsj96/CTVI-master
ea9c4dc812ff871c7ccb2e3748e35d3b634920d0
[ "MIT" ]
null
null
null
attention.py
dsj96/CTVI-master
ea9c4dc812ff871c7ccb2e3748e35d3b634920d0
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.functional import softmax import torch.optim as optim from torch.autograd import Variable import math import numpy as np from utils import write_pkl, read_pkl if __name__ == "__main__": '''self-attention''' ...
37.174312
121
0.628825
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.functional import softmax import torch.optim as optim from torch.autograd import Variable import math import numpy as np from utils import write_pkl, read_pkl class SelfAttention(nn.Module): def __init__(self, num...
2,776
45
276
9bf0c5caf42b14da0e2cf82be9da2e2e41b653cd
840
py
Python
sqlite_dissect/tests/case_export_test.py
Defense-Cyber-Crime-Center/sqlite-dissect
e1a6c19928bc092bf7aeaff71072634f77a452ea
[ "MIT" ]
12
2021-10-21T21:23:51.000Z
2022-03-13T03:01:53.000Z
sqlite_dissect/tests/case_export_test.py
Defense-Cyber-Crime-Center/sqlite-dissect
e1a6c19928bc092bf7aeaff71072634f77a452ea
[ "MIT" ]
21
2021-09-13T17:00:33.000Z
2022-03-31T12:56:56.000Z
sqlite_dissect/tests/case_export_test.py
kchason/sqlite-dissect
e1a6c19928bc092bf7aeaff71072634f77a452ea
[ "MIT" ]
1
2021-10-21T22:00:07.000Z
2021-10-21T22:00:07.000Z
import os import unittest from main import main from sqlite_dissect.utilities import DotDict class TestCASEExport(unittest.TestCase): """ This class tests a parsing of a file and ensuring that it properly generates a CASE export file. """
27.096774
100
0.627381
import os import unittest from main import main from sqlite_dissect.utilities import DotDict class TestCASEExport(unittest.TestCase): """ This class tests a parsing of a file and ensuring that it properly generates a CASE export file. """ def test_case_output(self): # Build the arguments for...
559
0
27
f2f782820b6e0361ff854c10c04a57c67e53f14a
3,489
py
Python
bot.py
victor-tsai/discord-bot
44ef9bcaa69c5ea682be56efe88df091dc0784c3
[ "MIT" ]
null
null
null
bot.py
victor-tsai/discord-bot
44ef9bcaa69c5ea682be56efe88df091dc0784c3
[ "MIT" ]
null
null
null
bot.py
victor-tsai/discord-bot
44ef9bcaa69c5ea682be56efe88df091dc0784c3
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import requests from discord.ext import commands TOKEN = "Your Discord token here" OWNER_ID = 0 # Your user ID here RTT_USERNAME = "Realtime Trains API username" RTT_PASSWORD = "Realtime Trains API password" ## BOT SETUP bot = commands.Bot(command_prefix = ">") # Comment to respond to messages from...
37.117021
109
0.518487
#!/usr/bin/python3 import requests from discord.ext import commands TOKEN = "Your Discord token here" OWNER_ID = 0 # Your user ID here RTT_USERNAME = "Realtime Trains API username" RTT_PASSWORD = "Realtime Trains API password" ## BOT SETUP bot = commands.Bot(command_prefix = ">") # Comment to respond to messages from...
2,935
0
110
42e8e2aaaeb8d0c7280bc8c0f0d4326303a7a369
558
py
Python
Mundo_1/aula07.py
GabrielProdi/Python_CursoEmVideo
8bfff1b9a73d09c8f42dc3778f895525f1bc946d
[ "MIT" ]
null
null
null
Mundo_1/aula07.py
GabrielProdi/Python_CursoEmVideo
8bfff1b9a73d09c8f42dc3778f895525f1bc946d
[ "MIT" ]
null
null
null
Mundo_1/aula07.py
GabrielProdi/Python_CursoEmVideo
8bfff1b9a73d09c8f42dc3778f895525f1bc946d
[ "MIT" ]
null
null
null
#Operadores Aritmeticos n1 = int( input('Digite um número: ' ) ) n2 = int( input('Digite outro número: ' ) ) soma = n1 + n2 prod = n1 * n2 div = n1 / n2 divint = n1 // n2 exp = n1 ** n2 resto = n1 % n2 # {: } os dois pontos formatam o valor da mascara conforme as diretrizes #quebra de linha é \n # end= escrever o ...
32.823529
112
0.629032
#Operadores Aritmeticos n1 = int( input('Digite um número: ' ) ) n2 = int( input('Digite outro número: ' ) ) soma = n1 + n2 prod = n1 * n2 div = n1 / n2 divint = n1 // n2 exp = n1 ** n2 resto = n1 % n2 # {: } os dois pontos formatam o valor da mascara conforme as diretrizes #quebra de linha é \n # end= escrever o ...
0
0
0
596d64b56e4d8d8991ebc5da5fab0164bcddc3e1
3,156
py
Python
regression/gallery/contour9.py
b8raoult/magics
eb2c86ec6e392e89c90044128dc671f22283d6ad
[ "ECL-2.0", "Apache-2.0" ]
41
2018-12-07T23:10:50.000Z
2022-02-19T03:01:49.000Z
regression/gallery/contour9.py
b8raoult/magics
eb2c86ec6e392e89c90044128dc671f22283d6ad
[ "ECL-2.0", "Apache-2.0" ]
59
2019-01-04T15:43:30.000Z
2022-03-31T09:48:15.000Z
regression/gallery/contour9.py
b8raoult/magics
eb2c86ec6e392e89c90044128dc671f22283d6ad
[ "ECL-2.0", "Apache-2.0" ]
13
2019-01-07T14:36:33.000Z
2021-09-06T14:48:36.000Z
# (C) Copyright 1996-2016 ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its status as an intergov...
43.232877
709
0.606781
# (C) Copyright 1996-2016 ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its status as an intergov...
0
0
0
2a71651e70b4a7528bd63355ddd1957a197426fa
154,019
py
Python
ui/psychsim_rc.py
richardyang/psychsim
191497d72077fe95cde94a2004a8be6e926c121f
[ "MIT" ]
1
2016-07-19T16:56:46.000Z
2016-07-19T16:56:46.000Z
ui/psychsim_rc.py
richardyang/psychsim
191497d72077fe95cde94a2004a8be6e926c121f
[ "MIT" ]
1
2018-08-27T22:31:16.000Z
2018-08-27T22:31:16.000Z
ui/psychsim_rc.py
richardyang/psychsim
191497d72077fe95cde94a2004a8be6e926c121f
[ "MIT" ]
1
2019-09-06T03:05:35.000Z
2019-09-06T03:05:35.000Z
# -*- coding: utf-8 -*- # Resource object code # # Created: Mon Dec 22 15:59:06 2014 # by: The Resource Compiler for PyQt (Qt v4.8.6) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x91\x12\ \x47\ \x49\x46\x38\x39\x61\xca\x00\xec\x00\xe7\xe7\x00\x...
65.317642
96
0.727274
# -*- coding: utf-8 -*- # Resource object code # # Created: Mon Dec 22 15:59:06 2014 # by: The Resource Compiler for PyQt (Qt v4.8.6) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x91\x12\ \x47\ \x49\x46\x38\x39\x61\xca\x00\xec\x00\xe7\xe7\x00\x...
195
0
46
ec4441541b2c6be31fc394effb8172bbc4f5104c
457
py
Python
moreover/base/config.py
moriW/moreover
330b49f4888211d2502208c13c3fff49a24124ad
[ "MIT" ]
null
null
null
moreover/base/config.py
moriW/moreover
330b49f4888211d2502208c13c3fff49a24124ad
[ "MIT" ]
null
null
null
moreover/base/config.py
moriW/moreover
330b49f4888211d2502208c13c3fff49a24124ad
[ "MIT" ]
null
null
null
#! /bin/python # config store & parse # # @file: config # @time: 2022/02/05 # @author: Mori # import json from tornado.util import ObjectDict global_config = ObjectDict()
19.041667
50
0.691466
#! /bin/python # config store & parse # # @file: config # @time: 2022/02/05 # @author: Mori # import json from tornado.util import ObjectDict global_config = ObjectDict() def define(config: str, default_value: str): if config in global_config: raise KeyError(f"{config} already exists") global_config...
236
0
46
536db5165bdc70a8820e97cc1b002c271c3566b3
4,824
py
Python
noolite/noolite/noolite.py
andvikt/ha_addons
98343e6465516b821008abd58c38f5f4306e0d41
[ "Apache-2.0" ]
null
null
null
noolite/noolite/noolite.py
andvikt/ha_addons
98343e6465516b821008abd58c38f5f4306e0d41
[ "Apache-2.0" ]
null
null
null
noolite/noolite/noolite.py
andvikt/ha_addons
98343e6465516b821008abd58c38f5f4306e0d41
[ "Apache-2.0" ]
null
null
null
import asyncio from datetime import datetime import serial from logger import root_logger from . import const from .typing import NooliteCommand, BaseNooliteRemote, MotionSensor from typing import Dict, Callable import typing lg = root_logger.getChild('noolite') def _get_tty(tty_name) -> serial.Serial: """ ...
33.041096
119
0.583126
import asyncio from datetime import datetime import serial from logger import root_logger from . import const from .typing import NooliteCommand, BaseNooliteRemote, MotionSensor from typing import Dict, Callable import typing lg = root_logger.getChild('noolite') class NotApprovedError(Exception): pass class ...
600
4,056
46
9aee6f1dfe827e83a81f5a8a41f450caac1713ea
5,555
py
Python
tests/test_fixtures.py
eSchwander/airbyte-tentacle
da1957d9150fccb4ea8fdcd6567e2fb5aa62853d
[ "Unlicense" ]
null
null
null
tests/test_fixtures.py
eSchwander/airbyte-tentacle
da1957d9150fccb4ea8fdcd6567e2fb5aa62853d
[ "Unlicense" ]
null
null
null
tests/test_fixtures.py
eSchwander/airbyte-tentacle
da1957d9150fccb4ea8fdcd6567e2fb5aa62853d
[ "Unlicense" ]
null
null
null
import pytest from airbyte_dto_factory import * from airbyte_config_model import * @pytest.fixture def dummy_source_dto(): """ Creates a dummy SourceDto """ source = SourceDto() source.source_definition_id = 'ef69ef6e-aa7f-4af1-a01d-ef775033524e' source.source_id = '7d95ec85-47c6-42d4-a7a2-8e5c...
35.83871
130
0.607381
import pytest from airbyte_dto_factory import * from airbyte_config_model import * @pytest.fixture def dummy_source_dto(): """ Creates a dummy SourceDto """ source = SourceDto() source.source_definition_id = 'ef69ef6e-aa7f-4af1-a01d-ef775033524e' source.source_id = '7d95ec85-47c6-42d4-a7a2-8e5c...
289
0
22
2de2341754414a1f6e7e2477849cb8c74ee43b69
2,109
py
Python
qubot/config/config.py
anthonykrivonos/qubot
0cc9623a22fe75a0c8d4a08ac8adc96184dc2ae7
[ "MIT" ]
2
2021-02-14T03:53:50.000Z
2021-03-23T17:59:20.000Z
qubot/config/config.py
anthonykrivonos/qubot
0cc9623a22fe75a0c8d4a08ac8adc96184dc2ae7
[ "MIT" ]
null
null
null
qubot/config/config.py
anthonykrivonos/qubot
0cc9623a22fe75a0c8d4a08ac8adc96184dc2ae7
[ "MIT" ]
null
null
null
from typing import List class QubotConfigTerminalInfo: """ Abstracts information on the terminal nodes to find. """ class QubotConfigModelParameters: """ Abstracts information on the Q-Learning model parameters. """ def __init__(self, alpha=0.5, gamma=0.6, epsilon=1, decay=0.01, train_ep...
42.18
133
0.688004
from typing import List class QubotConfigTerminalInfo: """ Abstracts information on the terminal nodes to find. """ def __init__(self, terminal_ids: List[str] = None, terminal_classes: List[str] = None, terminal_contains_text: List[str] = None): self.terminal_ids = terminal_ids if terminal_ids...
381
0
26
07baeeac2fe71021abc2ba135d5e09a36888cf1c
2,416
py
Python
jom/freq.py
JoM-Lab/JoM
cd03fd401ebbd8133c8b4816115bb87e2fd24690
[ "MIT" ]
1
2016-03-10T04:52:56.000Z
2016-03-10T04:52:56.000Z
jom/freq.py
JoM-Lab/JoM
cd03fd401ebbd8133c8b4816115bb87e2fd24690
[ "MIT" ]
null
null
null
jom/freq.py
JoM-Lab/JoM
cd03fd401ebbd8133c8b4816115bb87e2fd24690
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals, print_function from collections import Counter from .db import new_session, Tweet import string import re zh = re.compile(r"[\u4e00-\u9fa5]+") other = re.compile(r"[a-zA-Z0-9_]+") bad = ("_ 1 2 3 4 5 I O RT The a and are be bit co com for ...
34.514286
88
0.579056
#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals, print_function from collections import Counter from .db import new_session, Tweet import string import re zh = re.compile(r"[\u4e00-\u9fa5]+") other = re.compile(r"[a-zA-Z0-9_]+") bad = ("_ 1 2 3 4 5 I O RT The a and are be bit co com for ...
0
0
0
6fdd4da2f419ff8d134e23b97de8a08353bf1a3a
429
py
Python
utils/sms.py
ljygit/12306
3de32a7046a2cfef35c1a2793172607237bc7ef7
[ "MIT" ]
1
2020-06-22T10:18:09.000Z
2020-06-22T10:18:09.000Z
utils/sms.py
ljygit/12306
3de32a7046a2cfef35c1a2793172607237bc7ef7
[ "MIT" ]
8
2021-03-19T03:19:50.000Z
2022-03-11T23:58:15.000Z
utils/sms.py
Mr-Mei/12306-
ff6f027497962c34c8ad6df0138e617a7dc8be71
[ "MIT" ]
1
2019-11-18T23:17:07.000Z
2019-11-18T23:17:07.000Z
from twilio.rest import Client if __name__ == '__main__': from configure import ACCOUNT_SID,AUTO_TOKEN,FROM_NUM,TO_NUM msg = '测试一下,亲爱的路人' send_sms(ACCOUNT_SID,AUTO_TOKEN,FROM_NUM,TO_NUM,msg)
30.642857
64
0.72028
from twilio.rest import Client def send_sms(account_sid,auth_token,from_man,to_man,msg): client = Client(account_sid, auth_token) message = client.messages.create( to=to_man, from_=from_man, body=msg) return message.sid if __name__ == '__main__': from configure import ACCOUNT_S...
203
0
23
a8b0a4469467b3bf1e3dba6386f211a25e5876c2
1,513
py
Python
revolve.py
safsaf150/revolve
ff12ac6992c99116b9d571dc277165362d8d5602
[ "Apache-2.0" ]
null
null
null
revolve.py
safsaf150/revolve
ff12ac6992c99116b9d571dc277165362d8d5602
[ "Apache-2.0" ]
null
null
null
revolve.py
safsaf150/revolve
ff12ac6992c99116b9d571dc277165362d8d5602
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import os import sys from pyrevolve import parser from pyrevolve.util import Supervisor here = os.path.dirname(os.path.abspath(__file__)) rvpath = os.path.abspath(os.path.join(here, '..', 'revolve')) sys.path.append(os.path.dirname(os.path.abspath(__file__))) class OnlineEvolutionSupervisor(S...
27.509091
72
0.636484
#!/usr/bin/env python3 import os import sys from pyrevolve import parser from pyrevolve.util import Supervisor here = os.path.dirname(os.path.abspath(__file__)) rvpath = os.path.abspath(os.path.join(here, '..', 'revolve')) sys.path.append(os.path.dirname(os.path.abspath(__file__))) class OnlineEvolutionSupervisor(S...
116
0
27
5a6c067c4c899f822dcfbcf61b4d8154e18f0052
509
py
Python
src/jvm/io/fsq/twofishes/scripts/refresh-store.py
jglesner/fsqio
436dd3a7667fd23f638bf96bdcd9ec83266a2319
[ "Apache-2.0" ]
252
2016-01-08T23:12:13.000Z
2022-01-17T16:31:49.000Z
src/jvm/io/fsq/twofishes/scripts/refresh-store.py
jglesner/fsqio
436dd3a7667fd23f638bf96bdcd9ec83266a2319
[ "Apache-2.0" ]
67
2016-01-13T17:34:12.000Z
2021-08-04T18:50:24.000Z
src/jvm/io/fsq/twofishes/scripts/refresh-store.py
jglesner/fsqio
436dd3a7667fd23f638bf96bdcd9ec83266a2319
[ "Apache-2.0" ]
59
2016-03-25T20:49:03.000Z
2021-08-04T05:36:38.000Z
#!/usr/bin/python import urllib2 import json import sys from optparse import OptionParser usage = "usage: %prog [options] host" parser = OptionParser(usage = usage) parser.add_option("-t", "--token", dest="token", default="", type='string', help="token") (options, args) = parser.parse_args() if len(args) != 1: p...
24.238095
78
0.695481
#!/usr/bin/python import urllib2 import json import sys from optparse import OptionParser usage = "usage: %prog [options] host" parser = OptionParser(usage = usage) parser.add_option("-t", "--token", dest="token", default="", type='string', help="token") (options, args) = parser.parse_args() if len(args) != 1: p...
0
0
0
9dbd5ad7e1294e12a9fb2519e92fbb06c8562dc1
4,723
py
Python
eplist/web_sources/anidb.py
djt5019/episode_renamer
84d3dda24b54c70a489c2a6bcb9c7c2c2dadfba9
[ "Unlicense" ]
null
null
null
eplist/web_sources/anidb.py
djt5019/episode_renamer
84d3dda24b54c70a489c2a6bcb9c7c2c2dadfba9
[ "Unlicense" ]
null
null
null
eplist/web_sources/anidb.py
djt5019/episode_renamer
84d3dda24b54c70a489c2a6bcb9c7c2c2dadfba9
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import difflib import logging import functools from string import punctuation as punct from eplist import utils from eplist.episode import Episode from eplist.settings import Settings try: from bs4 import BeautifulSoup Soup = functoo...
27.619883
109
0.629261
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import difflib import logging import functools from string import punctuation as punct from eplist import utils from eplist.episode import Episode from eplist.settings import Settings try: from bs4 import BeautifulSoup Soup = functoo...
650
0
46
d2fdf77b2d8c1bb4d3bf7464c2a44161dda68f02
1,284
py
Python
replot.py
MQSchleich/dylightful
6abbb690c8387c522c9bff21c72b5c66aab77ede
[ "MIT" ]
null
null
null
replot.py
MQSchleich/dylightful
6abbb690c8387c522c9bff21c72b5c66aab77ede
[ "MIT" ]
5
2022-02-05T12:47:42.000Z
2022-03-16T11:42:20.000Z
replot.py
MQSchleich/dylightful
6abbb690c8387c522c9bff21c72b5c66aab77ede
[ "MIT" ]
null
null
null
import os import numpy as np from dylightful.utilities import load_parsed_dyno, get_dir from dylightful.parser import load_env_partners_mixed from dylightful.bar_plot import make_barplot dirname = os.path.dirname(__file__) save_dir = "/media/julian/INTENSO/ZIKV/" name = "ZIKV-Pro-427-1_dynophore" traj_path = save_dir...
29.181818
61
0.760125
import os import numpy as np from dylightful.utilities import load_parsed_dyno, get_dir from dylightful.parser import load_env_partners_mixed from dylightful.bar_plot import make_barplot dirname = os.path.dirname(__file__) save_dir = "/media/julian/INTENSO/ZIKV/" name = "ZIKV-Pro-427-1_dynophore" traj_path = save_dir...
0
0
0
bda70b28893b7d71639ed4e417576078ac6f4740
733
py
Python
opta/commands/help.py
pecigonzalo/opta
0259f128ad3cfc4a96fe1f578833de28b2f19602
[ "Apache-2.0" ]
null
null
null
opta/commands/help.py
pecigonzalo/opta
0259f128ad3cfc4a96fe1f578833de28b2f19602
[ "Apache-2.0" ]
null
null
null
opta/commands/help.py
pecigonzalo/opta
0259f128ad3cfc4a96fe1f578833de28b2f19602
[ "Apache-2.0" ]
null
null
null
from typing import Optional import click from click import Context from opta.exceptions import UserErrors @click.command() @click.pass_context @click.argument("command", required=False) def help(context: Context, command: Optional[str]) -> None: """ Get help for Opta. Example: opta help opta ...
23.645161
97
0.661664
from typing import Optional import click from click import Context from opta.exceptions import UserErrors @click.command() @click.pass_context @click.argument("command", required=False) def help(context: Context, command: Optional[str]) -> None: """ Get help for Opta. Example: opta help opta ...
0
0
0
05c583400c5f51e6d3818158d9d2a62630174a12
1,286
py
Python
codereviewr/urls.py
percyperez/codereviewr
d7bc927455559389354f615cf7c130e7122e04ef
[ "MIT" ]
2
2015-12-08T13:40:32.000Z
2016-05-08T06:22:14.000Z
codereviewr/urls.py
na/codereviewr
c1045f2e9a16d64398306dbf9124b4f59ef2fdbb
[ "MIT" ]
null
null
null
codereviewr/urls.py
na/codereviewr
c1045f2e9a16d64398306dbf9124b4f59ef2fdbb
[ "MIT" ]
null
null
null
from django.conf.urls.defaults import * from django.contrib.comments.feeds import LatestCommentsFeed from django.views.generic.simple import direct_to_template, redirect_to from codereviewr.settings import PROJECT_PATH, DEBUG from codereviewr.feeds import * #feeds dictionary feeds = { 'code': CodeFeed, 'comments': ...
30.619048
105
0.662519
from django.conf.urls.defaults import * from django.contrib.comments.feeds import LatestCommentsFeed from django.views.generic.simple import direct_to_template, redirect_to from codereviewr.settings import PROJECT_PATH, DEBUG from codereviewr.feeds import * #feeds dictionary feeds = { 'code': CodeFeed, 'comments': ...
0
0
0
41c0d02a489f00ea9b52cab70a55f753870dba52
2,483
py
Python
save_preds.py
somepago/dbViz
aeea84c42a32efafebbb29c3d944204aa74963cf
[ "Apache-2.0" ]
22
2022-03-16T10:04:43.000Z
2022-03-24T22:57:23.000Z
save_preds.py
somepago/dbViz
aeea84c42a32efafebbb29c3d944204aa74963cf
[ "Apache-2.0" ]
null
null
null
save_preds.py
somepago/dbViz
aeea84c42a32efafebbb29c3d944204aa74963cf
[ "Apache-2.0" ]
2
2022-03-19T07:13:39.000Z
2022-03-29T06:09:53.000Z
'''Train CIFAR10 with PyTorch.''' import torch import random import os import argparse from model import get_model from data import get_data, make_planeloader from utils import get_loss_function, get_scheduler, get_random_images, produce_plot, get_noisy_images, AttackPGD from evaluation import decision_boundary from ...
37.059701
147
0.664921
'''Train CIFAR10 with PyTorch.''' import torch import random import os import argparse from model import get_model from data import get_data, make_planeloader from utils import get_loss_function, get_scheduler, get_random_images, produce_plot, get_noisy_images, AttackPGD from evaluation import decision_boundary from ...
0
0
0
aa2541d0b8aba2e6c7ed95ea73a4a7d1006eb805
7,820
py
Python
data_preprocessing/flatten.py
billylegota/ECE-380L-Term-Project
9838449e7e4b40e4444fdcb0f7e23cf43e87e0f1
[ "MIT" ]
null
null
null
data_preprocessing/flatten.py
billylegota/ECE-380L-Term-Project
9838449e7e4b40e4444fdcb0f7e23cf43e87e0f1
[ "MIT" ]
null
null
null
data_preprocessing/flatten.py
billylegota/ECE-380L-Term-Project
9838449e7e4b40e4444fdcb0f7e23cf43e87e0f1
[ "MIT" ]
null
null
null
"""flatten.py -- Flattens HDF5 dataset. """ import glob import math import os import h5py import numpy as np import scipy.io def flatten(source: str, dest: str, packets_per_chunk: int = 1000, synthetic: bool = False, silent: bool = True, constant_features_path: str = 'constant_features.mat') -> (int, in...
42.27027
120
0.649105
"""flatten.py -- Flattens HDF5 dataset. """ import glob import math import os import h5py import numpy as np import scipy.io def flatten(source: str, dest: str, packets_per_chunk: int = 1000, synthetic: bool = False, silent: bool = True, constant_features_path: str = 'constant_features.mat') -> (int, in...
509
0
23
79f8e6aa646486ac4177d50c3694c1c7632c0a4a
461
py
Python
lpbm/lib/slugify.py
fmichea/lpbm
172772d562e2f1aa4aba72599150f95f89bdf6ce
[ "BSD-3-Clause" ]
1
2015-11-09T11:30:41.000Z
2015-11-09T11:30:41.000Z
lpbm/lib/slugify.py
fmichea/lpbm
172772d562e2f1aa4aba72599150f95f89bdf6ce
[ "BSD-3-Clause" ]
1
2015-04-28T07:02:21.000Z
2016-01-23T19:12:11.000Z
lpbm/lib/slugify.py
fmichea/lpbm
172772d562e2f1aa4aba72599150f95f89bdf6ce
[ "BSD-3-Clause" ]
2
2016-01-11T17:55:42.000Z
2018-03-19T19:03:15.000Z
import string import unicodedata SLUG_CHARS_DISPLAY = '[a-z0-9-]' _SLUG_CHARS = string.ascii_lowercase + string.digits + '-' _SLUG_SIZE = 50 def slugify(text): '''Returns the slug of a string (that can be used in an URL for example.''' slug = unicodedata.normalize('NFKD', text).encode('ascii', 'ignore') ...
27.117647
79
0.668113
import string import unicodedata SLUG_CHARS_DISPLAY = '[a-z0-9-]' _SLUG_CHARS = string.ascii_lowercase + string.digits + '-' _SLUG_SIZE = 50 def slugify(text): '''Returns the slug of a string (that can be used in an URL for example.''' slug = unicodedata.normalize('NFKD', text).encode('ascii', 'ignore') ...
0
0
0
5427b466a12fe41de8c9198002e141c9edef8f1f
610
py
Python
Chapter09/wifi-sniff.py
PacktPublishing/Python-Penetration-Testing-Cookbook
74eba54a5d9921db0c4679cb4374a742118d4be8
[ "MIT" ]
48
2017-12-08T16:38:09.000Z
2022-03-20T12:49:31.000Z
Chapter09/wifi-sniff.py
shamiul94/Python-Penetration-Testing-Cookbook
a152f14bf7eb1fde2612808f47d7609b58d48980
[ "MIT" ]
null
null
null
Chapter09/wifi-sniff.py
shamiul94/Python-Penetration-Testing-Cookbook
a152f14bf7eb1fde2612808f47d7609b58d48980
[ "MIT" ]
34
2017-12-28T14:01:10.000Z
2022-03-16T15:54:30.000Z
from scapy.all import * ap_list = [] sniff(iface='en0', prn=ssid, count=10, timeout=3, store=0) # for packet in sniff(offline='sample.pcap', prn=changePacketParameters): # packets.append(packet) # for packet in packets: # if packet.haslayer(TCP): # writeToPcapFile(packet) # print(packet.show(...
30.5
73
0.595082
from scapy.all import * ap_list = [] def ssid(pkt): # print(pkt.show()) if pkt.haslayer(Dot11): print(pkt.show()) if pkt.type == 0 and pkt.subtype == 8: if pkt.addr2 not in ap_list: ap_list.append(pkt.addr2) print("AP: %s SSID: %s" % (pkt.addr2, pkt.i...
266
0
22
072d438eba683fe36f066d77044cc9fbcf982237
6,298
py
Python
python/rain/client/data.py
aimof/rain
86b77666e1310888ad483c7976c2c99f3d5bfeaa
[ "MIT" ]
null
null
null
python/rain/client/data.py
aimof/rain
86b77666e1310888ad483c7976c2c99f3d5bfeaa
[ "MIT" ]
null
null
null
python/rain/client/data.py
aimof/rain
86b77666e1310888ad483c7976c2c99f3d5bfeaa
[ "MIT" ]
null
null
null
import capnp import tarfile import io from .session import get_active_session from ..common import RainException, ids, ID from ..common.attributes import attributes_to_capnp from ..common.content_type import check_content_type, encode_value from ..common import DataType def blob(value, label="const", content_type=N...
31.49
93
0.618292
import capnp import tarfile import io from .session import get_active_session from ..common import RainException, ids, ID from ..common.attributes import attributes_to_capnp from ..common.content_type import check_content_type, encode_value from ..common import DataType class DataObject: id = None # Flag i...
1,689
1,925
46
0e8a820f45484929c8266b2b20f11189f4b1fe60
3,211
py
Python
legate/pandas/core/bitmask.py
marcinz/legate.pandas
94c21c436f59c06cfba454c6569e9f5d7109d839
[ "Apache-2.0" ]
67
2021-04-12T18:06:55.000Z
2022-03-28T06:51:05.000Z
legate/pandas/core/bitmask.py
marcinz/legate.pandas
94c21c436f59c06cfba454c6569e9f5d7109d839
[ "Apache-2.0" ]
2
2021-06-22T00:30:36.000Z
2021-07-01T22:12:43.000Z
legate/pandas/core/bitmask.py
marcinz/legate.pandas
94c21c436f59c06cfba454c6569e9f5d7109d839
[ "Apache-2.0" ]
6
2021-04-14T21:28:00.000Z
2022-03-22T09:45:25.000Z
# Copyright 2021 NVIDIA Corporation # # 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 wr...
28.669643
74
0.678293
# Copyright 2021 NVIDIA Corporation # # 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 wr...
1,721
730
23
0a2586d7e1874e8ca79ba94674abca86141dfa90
5,066
py
Python
backend/config/settings/base.py
code-for-canada/django-nginx-reactjs-docker
12b2f79872273bb0ac4736d709b8e0904bc54258
[ "MIT" ]
3
2019-01-04T10:53:03.000Z
2020-01-29T16:20:38.000Z
backend/config/settings/base.py
code-for-canada/django-nginx-reactjs-docker
12b2f79872273bb0ac4736d709b8e0904bc54258
[ "MIT" ]
215
2019-01-04T11:34:03.000Z
2019-07-22T13:36:18.000Z
backend/config/settings/base.py
code-for-canada/django-nginx-reactjs-docker
12b2f79872273bb0ac4736d709b8e0904bc54258
[ "MIT" ]
8
2019-01-08T22:45:11.000Z
2020-01-29T16:20:40.000Z
""" Django settings for backend project. Generated by 'django-admin startproject' using Django 2.1.4. Since the start of the project, we have upgraded the version to 2.1.7 For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their va...
32.267516
91
0.681603
""" Django settings for backend project. Generated by 'django-admin startproject' using Django 2.1.4. Since the start of the project, we have upgraded the version to 2.1.7 For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their va...
0
0
0
c01ab772ffcdea63e59f9b9d308e786b82109257
433
py
Python
openrec/tf1/recommenders/__init__.py
pbaiz/openrec
a00de2345844858194ef43ab6845342114a5be93
[ "Apache-2.0" ]
399
2018-01-04T15:24:02.000Z
2022-03-31T09:39:05.000Z
openrec/tf1/recommenders/__init__.py
pbaiz/openrec
a00de2345844858194ef43ab6845342114a5be93
[ "Apache-2.0" ]
26
2018-01-14T04:01:28.000Z
2022-02-09T23:36:32.000Z
openrec/tf1/recommenders/__init__.py
pbaiz/openrec
a00de2345844858194ef43ab6845342114a5be93
[ "Apache-2.0" ]
97
2017-12-22T07:07:35.000Z
2022-01-24T19:04:02.000Z
from openrec.tf1.recommenders.recommender import Recommender from openrec.tf1.recommenders.bpr import BPR from openrec.tf1.recommenders.pmf import PMF from openrec.tf1.recommenders.ucml import UCML from openrec.tf1.recommenders.vbpr import VBPR from openrec.tf1.recommenders.vanilla_youtube_rec import VanillaYouTubeRec ...
43.3
74
0.86836
from openrec.tf1.recommenders.recommender import Recommender from openrec.tf1.recommenders.bpr import BPR from openrec.tf1.recommenders.pmf import PMF from openrec.tf1.recommenders.ucml import UCML from openrec.tf1.recommenders.vbpr import VBPR from openrec.tf1.recommenders.vanilla_youtube_rec import VanillaYouTubeRec ...
0
0
0
708f01c2e192ca13b47544b19668cfceb08b35f7
18,306
py
Python
project/src/main/python/backTest/factorAnalysis/updateStockPool.py
daifengqi/big-data-hft
013747ca3c2ca984eeac723fd5d8f8e3458b840c
[ "MIT" ]
1
2022-03-07T09:32:40.000Z
2022-03-07T09:32:40.000Z
project/src/main/python/backTest/factorAnalysis/updateStockPool.py
daifengqi/big-data-hft
013747ca3c2ca984eeac723fd5d8f8e3458b840c
[ "MIT" ]
null
null
null
project/src/main/python/backTest/factorAnalysis/updateStockPool.py
daifengqi/big-data-hft
013747ca3c2ca984eeac723fd5d8f8e3458b840c
[ "MIT" ]
1
2022-03-03T16:22:37.000Z
2022-03-03T16:22:37.000Z
import copy import itertools import os import time import numpy as np import pandas as pd import scipy.io as scio import yaml import factorAnalysisIOTools as IOTools from factorAnalysisCalTools import prepare_RET_dict, time_horizon_dict if __name__ == '__main__': config_path = r"D:\HX_proj\factorAnalysi...
54.159763
149
0.689282
import copy import itertools import os import time import numpy as np import pandas as pd import scipy.io as scio import yaml import factorAnalysisIOTools as IOTools from factorAnalysisCalTools import prepare_RET_dict, time_horizon_dict def save_df(this: pd.DataFrame,config: dict,file_name): file_path = os.path....
14,104
3,919
201
5dd0ee9d6513012c54587e1dc2268e195652a1f7
2,585
py
Python
examples/PyGame/orientation_control_osc.py
elsuizo/abr_control
d7d47a1c152dfcb8d1a3093083d53f19cc4922d6
[ "BSD-3-Clause" ]
1
2021-07-07T13:26:38.000Z
2021-07-07T13:26:38.000Z
examples/PyGame/orientation_control_osc.py
elsuizo/abr_control
d7d47a1c152dfcb8d1a3093083d53f19cc4922d6
[ "BSD-3-Clause" ]
null
null
null
examples/PyGame/orientation_control_osc.py
elsuizo/abr_control
d7d47a1c152dfcb8d1a3093083d53f19cc4922d6
[ "BSD-3-Clause" ]
null
null
null
""" Running operational space control with the PyGame display. The arm will move the end-effector to a target orientation, which can be changed by pressing the left/right arrow keys. """ import numpy as np from os import environ environ['PYGAME_HIDE_SUPPORT_PROMPT'] = '1' import pygame from abr_control.arms import thr...
30.05814
76
0.670019
""" Running operational space control with the PyGame display. The arm will move the end-effector to a target orientation, which can be changed by pressing the left/right arrow keys. """ import numpy as np from os import environ environ['PYGAME_HIDE_SUPPORT_PROMPT'] = '1' import pygame from abr_control.arms import thr...
551
0
23
ec3070556999b4b313c77a9f09b9213babe68567
419
py
Python
test/test_utils/test_next_version/test_get_current_calver_tags.py
132nd-etcher/epab
5226d3a36580f8cc50cf5dcac426adb1350a2c9b
[ "MIT" ]
2
2018-12-13T06:49:10.000Z
2018-12-13T07:37:49.000Z
test/test_utils/test_next_version/test_get_current_calver_tags.py
etcher-be/epab
5226d3a36580f8cc50cf5dcac426adb1350a2c9b
[ "MIT" ]
109
2018-08-22T04:25:56.000Z
2019-10-17T05:10:21.000Z
test/test_utils/test_next_version/test_get_current_calver_tags.py
etcher-be/epab
5226d3a36580f8cc50cf5dcac426adb1350a2c9b
[ "MIT" ]
1
2018-02-25T05:53:18.000Z
2018-02-25T05:53:18.000Z
# coding=utf-8 import pytest import epab.utils from epab.utils import _next_version as nv @pytest.mark.long
26.1875
56
0.72315
# coding=utf-8 import pytest import epab.utils from epab.utils import _next_version as nv @pytest.mark.long def test_get_current_calver_tags(repo: epab.utils.Repo): calver = '2018.1.1' assert len(nv._get_current_calver_tags(calver)) == 0 repo.tag(f'{calver}.1') assert len(nv._get_current_calver_tags(...
286
0
22
ff5902120c035db34bdcd8cb1814c2eb99ed8af1
3,843
py
Python
irods/rule.py
MaastrichtUniversity/python-irodsclient
e6e8b37205edeb94c57f3d30786b56cccd91d985
[ "Xnet", "X11" ]
null
null
null
irods/rule.py
MaastrichtUniversity/python-irodsclient
e6e8b37205edeb94c57f3d30786b56cccd91d985
[ "Xnet", "X11" ]
null
null
null
irods/rule.py
MaastrichtUniversity/python-irodsclient
e6e8b37205edeb94c57f3d30786b56cccd91d985
[ "Xnet", "X11" ]
null
null
null
from __future__ import absolute_import from irods.message import iRODSMessage, StringStringMap, RodsHostAddress, STR_PI, MsParam, MsParamArray, RuleExecutionRequest from irods.api_number import api_number from io import open as io_open from irods.message import Message, StringProperty
38.049505
148
0.577934
from __future__ import absolute_import from irods.message import iRODSMessage, StringStringMap, RodsHostAddress, STR_PI, MsParam, MsParamArray, RuleExecutionRequest from irods.api_number import api_number from io import open as io_open from irods.message import Message, StringProperty class RemoveRuleMessage(Message):...
3,237
166
153
8a090a8ec15b5e802b163d342a26be6e4d9b7783
786
py
Python
guitab_knn/midi.py
bestvibes/guitab
b3491bab9bc7390eb3722ada44e0284731abf521
[ "MIT" ]
1
2022-03-02T09:36:28.000Z
2022-03-02T09:36:28.000Z
guitab_container/webapp/webapp/midi.py
bestvibes/guitab
b3491bab9bc7390eb3722ada44e0284731abf521
[ "MIT" ]
3
2020-02-12T00:40:58.000Z
2021-06-10T20:15:45.000Z
guitab_container/webapp/webapp/midi.py
bestvibes/guitab
b3491bab9bc7390eb3722ada44e0284731abf521
[ "MIT" ]
2
2020-09-23T16:26:46.000Z
2022-02-16T23:57:39.000Z
# Array showing guitar string's relative pitches, in semi-tones, with "0" being low E # ["Low E", "A", "D", "G", "B", "High E"] strings = [40, 45, 50, 55, 60, 65];
30.230769
93
0.577608
# Array showing guitar string's relative pitches, in semi-tones, with "0" being low E # ["Low E", "A", "D", "G", "B", "High E"] strings = [40, 45, 50, 55, 60, 65]; def midi_to_label(midi): if (midi < strings[0]): raise ValueError("Note " + note + " is not playable on a guitar in standard tuning.") ide...
577
0
46
6521a65a212f3bc8e3643ac8cc5a646502debdc4
2,029
py
Python
kalliope/core/EventManager.py
Z3RO1/KalliopeZERO
4a9d4660e561f43387e8de4616f530ecf36cbbae
[ "MIT" ]
1
2017-10-09T18:02:32.000Z
2017-10-09T18:02:32.000Z
kalliope/core/EventManager.py
ngoales/kalliope
b1e58f2d1e949f572d48026603159992c0ce20ca
[ "MIT" ]
null
null
null
kalliope/core/EventManager.py
ngoales/kalliope
b1e58f2d1e949f572d48026603159992c0ce20ca
[ "MIT" ]
1
2021-11-21T19:08:15.000Z
2021-11-21T19:08:15.000Z
from apscheduler.schedulers.background import BackgroundScheduler from apscheduler.triggers.cron import CronTrigger from kalliope.core.ConfigurationManager import BrainLoader from kalliope.core.SynapseLauncher import SynapseLauncher from kalliope.core import Utils from kalliope.core.Models import Event
40.58
110
0.576639
from apscheduler.schedulers.background import BackgroundScheduler from apscheduler.triggers.cron import CronTrigger from kalliope.core.ConfigurationManager import BrainLoader from kalliope.core.SynapseLauncher import SynapseLauncher from kalliope.core import Utils from kalliope.core.Models import Event class EventMa...
197
1,503
23
9a8f0064512347b712e42bdfed88fe249599ba83
6,616
py
Python
Lib/turtledemo/nim.py
sireliah/polish-python
605df4944c2d3bc25f8bf6964b274c0a0d297cc3
[ "PSF-2.0" ]
1
2018-06-21T18:21:24.000Z
2018-06-21T18:21:24.000Z
Lib/turtledemo/nim.py
sireliah/polish-python
605df4944c2d3bc25f8bf6964b274c0a0d297cc3
[ "PSF-2.0" ]
null
null
null
Lib/turtledemo/nim.py
sireliah/polish-python
605df4944c2d3bc25f8bf6964b274c0a0d297cc3
[ "PSF-2.0" ]
null
null
null
""" turtle-example-suite: tdemo_nim.py Play nim against the computer. The player who takes the last stick jest the winner. Implements the model-view-controller design pattern. """ zaimportuj turtle zaimportuj random zaimportuj time SCREENWIDTH = 640 SCREENHEIGHT = 480 MINSTICKS = 7 MAXSTICKS = 3...
29.145374
83
0.57104
""" turtle-example-suite: tdemo_nim.py Play nim against the computer. The player who takes the last stick jest the winner. Implements the model-view-controller design pattern. """ zaimportuj turtle zaimportuj random zaimportuj time SCREENWIDTH = 640 SCREENHEIGHT = 480 MINSTICKS = 7 MAXSTICKS = 3...
2,372
0
308
528cf1b59e68183f561c087b20046483ff243394
918
py
Python
port_scanner.py
nemzyxt/port-scanner
52378c2d5e5c6ff7f7b74018a27a6dee1f566c54
[ "MIT" ]
null
null
null
port_scanner.py
nemzyxt/port-scanner
52378c2d5e5c6ff7f7b74018a27a6dee1f566c54
[ "MIT" ]
null
null
null
port_scanner.py
nemzyxt/port-scanner
52378c2d5e5c6ff7f7b74018a27a6dee1f566c54
[ "MIT" ]
null
null
null
#Author : Nemuel Wainaina import socket from colorama import init, Fore #some color, haha init() GREEN = Fore.GREEN BLUE = Fore.BLUE RED = Fore.RED GRAY = Fore.LIGHTBLACK_EX RESET = Fore.RESET def is_port_open(target, port): ''' This function simply attempts to create a connection to the ...
24.810811
79
0.611111
#Author : Nemuel Wainaina import socket from colorama import init, Fore #some color, haha init() GREEN = Fore.GREEN BLUE = Fore.BLUE RED = Fore.RED GRAY = Fore.LIGHTBLACK_EX RESET = Fore.RESET def is_port_open(target, port): ''' This function simply attempts to create a connection to the ...
0
0
0
a83c3aaee2d1d702fdd7e9f3c5ea7dd431a4b156
2,290
py
Python
generate_split.py
ruoyunz/caltech-ee148-spring2020-hw02
671b08cd914134f06db2c1eeec3fa4d4d3e0cd5f
[ "MIT" ]
null
null
null
generate_split.py
ruoyunz/caltech-ee148-spring2020-hw02
671b08cd914134f06db2c1eeec3fa4d4d3e0cd5f
[ "MIT" ]
null
null
null
generate_split.py
ruoyunz/caltech-ee148-spring2020-hw02
671b08cd914134f06db2c1eeec3fa4d4d3e0cd5f
[ "MIT" ]
null
null
null
import numpy as np import os import json import cv2 import sys np.random.seed(2020) # to ensure you always get the same train/test split data_path = '../data/RedLights2011_Medium' gts_path = '../data/hw02_annotations' split_path = '../data/hw02_splits' os.makedirs(split_path, exist_ok=True) # create directory if nee...
30.945946
86
0.676419
import numpy as np import os import json import cv2 import sys np.random.seed(2020) # to ensure you always get the same train/test split data_path = '../data/RedLights2011_Medium' gts_path = '../data/hw02_annotations' split_path = '../data/hw02_splits' os.makedirs(split_path, exist_ok=True) # create directory if nee...
403
0
22
d56872c67420ffe628e90c16e0f0ea52e9d094f4
1,738
py
Python
src/utils/pythonSrc/watchFaceParser/models/elements/common/clockHandElement.py
chm-dev/amazfitGTSwatchfaceBundle
4cb04be5215de16628418e9b38152a35d5372d3e
[ "MIT" ]
49
2019-12-18T11:24:56.000Z
2022-03-28T09:56:27.000Z
src/utils/pythonSrc/watchFaceParser/models/elements/common/clockHandElement.py
chm-dev/amazfitGTSwatchfaceBundle
4cb04be5215de16628418e9b38152a35d5372d3e
[ "MIT" ]
6
2020-01-08T21:31:15.000Z
2022-03-25T19:13:26.000Z
src/utils/pythonSrc/watchFaceParser/models/elements/common/clockHandElement.py
chm-dev/amazfitGTSwatchfaceBundle
4cb04be5215de16628418e9b38152a35d5372d3e
[ "MIT" ]
6
2019-12-27T17:30:24.000Z
2021-09-30T08:11:01.000Z
import logging from watchFaceParser.models.elements.basic.compositeElement import CompositeElement
31.035714
118
0.664557
import logging from watchFaceParser.models.elements.basic.compositeElement import CompositeElement class ClockHandElement(CompositeElement): def __init__(self, parameter, parent, name = None): self._onlyBorder = False self._color = None self._center = None self._shape = [] ...
1,371
20
238
1431c36367740490b243f3436653ce18816364f6
2,356
py
Python
src/ygopro/urldecode.py
o7878x/pytoolk
eb5edfbd5a8907b9705c4042013bf7c828e2fdf3
[ "MIT" ]
null
null
null
src/ygopro/urldecode.py
o7878x/pytoolk
eb5edfbd5a8907b9705c4042013bf7c828e2fdf3
[ "MIT" ]
null
null
null
src/ygopro/urldecode.py
o7878x/pytoolk
eb5edfbd5a8907b9705c4042013bf7c828e2fdf3
[ "MIT" ]
null
null
null
import logging import time import typing from urllib.parse import urlparse, parse_qs import fire YGO_SCHEME = 'ygo' YGO_NETLOC = 'deck' DEFAULT_HEADER = '#created by ...\n' CARD_SEP_SYM = '_' CARD_MULTI_SYM = '*' DEFAULT_SYM = '#' NO_SYM = '!' MAIN_HEADER = 'main\n' EXTRA_HEADER = 'extra\n' SIDE_HEADER = 'side\n' ...
23.79798
91
0.64983
import logging import time import typing from urllib.parse import urlparse, parse_qs import fire YGO_SCHEME = 'ygo' YGO_NETLOC = 'deck' DEFAULT_HEADER = '#created by ...\n' CARD_SEP_SYM = '_' CARD_MULTI_SYM = '*' DEFAULT_SYM = '#' NO_SYM = '!' MAIN_HEADER = 'main\n' EXTRA_HEADER = 'extra\n' SIDE_HEADER = 'side\n' ...
1,797
0
115
7b1edf412d6711b1edca18fb5738889669261b6e
21,465
py
Python
tests/test_page.py
crempp/mdweb
ce3c26e4b7b2dfba0ac793534a06581a8c214570
[ "MIT" ]
12
2015-07-31T07:53:57.000Z
2021-08-09T18:05:55.000Z
tests/test_page.py
crempp/mdweb
ce3c26e4b7b2dfba0ac793534a06581a8c214570
[ "MIT" ]
59
2015-07-31T07:44:16.000Z
2020-08-20T19:54:22.000Z
tests/test_page.py
crempp/mdweb
ce3c26e4b7b2dfba0ac793534a06581a8c214570
[ "MIT" ]
1
2016-02-22T22:57:17.000Z
2016-02-22T22:57:17.000Z
# -*- coding: utf-8 -*- """Tests for the MDWeb Navigation parser. Tests to write * Handle symlinks * File already open * Non supported extension (.xls) * Permissions Maybe test? * atime, mtime * large file """ import datetime from pyfakefs import fake_filesystem_unittest from unittest import skip try: ...
29.283765
259
0.646261
# -*- coding: utf-8 -*- """Tests for the MDWeb Navigation parser. Tests to write * Handle symlinks * File already open * Non supported extension (.xls) * Permissions Maybe test? * atime, mtime * large file """ import datetime from pyfakefs import fake_filesystem_unittest from unittest import skip try: ...
0
0
0
2d857a8f033972ecd5bd933956e549a665614872
1,080
py
Python
day13/shuttlebus2.py
fpeterek/aoc-2020
ae08a96c2213e94d204fc11051e2a9f535d62973
[ "MIT" ]
null
null
null
day13/shuttlebus2.py
fpeterek/aoc-2020
ae08a96c2213e94d204fc11051e2a9f535d62973
[ "MIT" ]
null
null
null
day13/shuttlebus2.py
fpeterek/aoc-2020
ae08a96c2213e94d204fc11051e2a9f535d62973
[ "MIT" ]
null
null
null
if __name__ == '__main__': run()
26.341463
96
0.591667
class Bus: def __init__(self, number: int, offset: int, begin: int = 0): self.number = number self.offset = offset self.begin = begin def load_file(filename: str) -> tuple[int, list[int]]: with open(filename) as f: timestamp = int(f.readline()) buses = f.readline().spl...
905
-11
142
2467cce351ee3950d6051b279111c2511b02732a
76
py
Python
pytest_harvest/tests_raw/conftest.py
keszybz/python-pytest-harvest
ef11d3addeae51168ab892b7806c2b4c270e2a82
[ "BSD-3-Clause" ]
36
2018-11-07T19:32:08.000Z
2022-03-19T10:24:48.000Z
pytest_harvest/tests_raw/conftest.py
keszybz/python-pytest-harvest
ef11d3addeae51168ab892b7806c2b4c270e2a82
[ "BSD-3-Clause" ]
55
2018-11-13T10:58:30.000Z
2022-01-06T10:32:53.000Z
pytest_harvest/tests_raw/conftest.py
keszybz/python-pytest-harvest
ef11d3addeae51168ab892b7806c2b4c270e2a82
[ "BSD-3-Clause" ]
4
2019-10-05T09:50:09.000Z
2021-03-31T20:33:16.000Z
# This is actually not even needed apparently # pytest_plugins = ["harvest"]
38
45
0.763158
# This is actually not even needed apparently # pytest_plugins = ["harvest"]
0
0
0
0cab310479ab3cc6d73dc8671b51f36e59625a28
456
py
Python
fly/ModelCreate.py
cheburakshu/fly
d452af4b83e4cb0f8d0094bf1e0c1b407d39bdf5
[ "Apache-2.0" ]
null
null
null
fly/ModelCreate.py
cheburakshu/fly
d452af4b83e4cb0f8d0094bf1e0c1b407d39bdf5
[ "Apache-2.0" ]
null
null
null
fly/ModelCreate.py
cheburakshu/fly
d452af4b83e4cb0f8d0094bf1e0c1b407d39bdf5
[ "Apache-2.0" ]
null
null
null
#fly from .ModelIO import ModelIO from .ModelConfig import ModelConfig
26.823529
81
0.64693
#fly from .ModelIO import ModelIO from .ModelConfig import ModelConfig class ModelCreate(object): def __init__(self,*args,**kwargs): self._ModelConfig = ModelConfig(kwargs.get('filename')) #*args,**kwargs) self._modelNames = self._ModelConfig.getModels() self._model = None de...
265
5
110
d4aeef5e3912b8f3cd0610d8270c456d1f413716
17,328
py
Python
pedal/core/feedback.py
acbart/python-analysis
3cd2cc22d50a414ae6b62c74d2643be4742238d4
[ "MIT" ]
14
2019-08-22T03:40:23.000Z
2022-03-13T00:30:53.000Z
pedal/core/feedback.py
pedal-edu/pedal
3cd2cc22d50a414ae6b62c74d2643be4742238d4
[ "MIT" ]
74
2019-09-12T04:35:56.000Z
2022-01-26T19:21:32.000Z
pedal/core/feedback.py
acbart/python-analysis
3cd2cc22d50a414ae6b62c74d2643be4742238d4
[ "MIT" ]
2
2018-09-16T22:39:15.000Z
2018-09-17T12:53:28.000Z
""" Simple data classes for storing feedback to present to learners. """ __all__ = ['Feedback', 'FeedbackKind', 'FeedbackCategory', "CompositeFeedbackFunction", "FeedbackResponse"] from pedal.core.formatting import FeedbackFieldWrapper from pedal.core.location import Location from pedal.core.rep...
39.381818
118
0.627539
""" Simple data classes for storing feedback to present to learners. """ __all__ = ['Feedback', 'FeedbackKind', 'FeedbackCategory', "CompositeFeedbackFunction", "FeedbackResponse"] from pedal.core.formatting import FeedbackFieldWrapper from pedal.core.location import Location from pedal.core.rep...
4,740
0
162
25d93ebd57650e95d922e302d78dcc9e2626544e
1,501
py
Python
oops_fhir/r4/code_system/precision_estimate_type.py
Mikuana/oops_fhir
77963315d123756b7d21ae881f433778096a1d25
[ "MIT" ]
null
null
null
oops_fhir/r4/code_system/precision_estimate_type.py
Mikuana/oops_fhir
77963315d123756b7d21ae881f433778096a1d25
[ "MIT" ]
null
null
null
oops_fhir/r4/code_system/precision_estimate_type.py
Mikuana/oops_fhir
77963315d123756b7d21ae881f433778096a1d25
[ "MIT" ]
null
null
null
from pathlib import Path from fhir.resources.codesystem import CodeSystem from oops_fhir.utils import CodeSystemConcept __all__ = ["PrecisionEstimateType"] _resource = CodeSystem.parse_file(Path(__file__).with_suffix(".json")) class PrecisionEstimateType: """ PrecisionEstimateType Method of reportin...
19.493506
84
0.588274
from pathlib import Path from fhir.resources.codesystem import CodeSystem from oops_fhir.utils import CodeSystemConcept __all__ = ["PrecisionEstimateType"] _resource = CodeSystem.parse_file(Path(__file__).with_suffix(".json")) class PrecisionEstimateType: """ PrecisionEstimateType Method of reportin...
0
19
27
b9dac44e185c9b124e9894a09b40bf74c9e25e50
43,059
py
Python
onezone/zone.py
aemerick/onezone
3a3c9a6542d0d8b9de7d18b94f866205dd3210b6
[ "MIT" ]
null
null
null
onezone/zone.py
aemerick/onezone
3a3c9a6542d0d8b9de7d18b94f866205dd3210b6
[ "MIT" ]
null
null
null
onezone/zone.py
aemerick/onezone
3a3c9a6542d0d8b9de7d18b94f866205dd3210b6
[ "MIT" ]
1
2021-05-10T20:15:16.000Z
2021-05-10T20:15:16.000Z
""" Author : A. Emerick Date : May 2016 Purpose: """ __author__ = "aemerick <emerick@astro.columbia.edu>" # external import numpy as np #from collections import OrderedDict import os, h5py from scipy.interpolate import interp1d try: import dill as pickle except: print("WARNING: Dill unavail...
37.837434
167
0.564853
""" Author : A. Emerick Date : May 2016 Purpose: """ __author__ = "aemerick <emerick@astro.columbia.edu>" # external import numpy as np #from collections import OrderedDict import os, h5py from scipy.interpolate import interp1d try: import dill as pickle except: print("WARNING: Dill unavail...
8,130
0
396
5613da50aa1d3dd12fedcbd4b7b022564dee7bea
5,965
py
Python
graph.py
cbsteh/PySawit
fcec4f19270b9ddef0530c3e22f41aea2dd0153e
[ "MIT" ]
15
2017-10-20T23:57:57.000Z
2021-09-04T00:34:27.000Z
graph.py
cbsteh/PySawit
fcec4f19270b9ddef0530c3e22f41aea2dd0153e
[ "MIT" ]
3
2017-10-23T14:47:26.000Z
2019-02-22T00:37:20.000Z
graph.py
cbsteh/PySawit
fcec4f19270b9ddef0530c3e22f41aea2dd0153e
[ "MIT" ]
6
2019-01-13T02:20:26.000Z
2021-11-02T15:55:09.000Z
""" Graphing the program flow module. This module aids in understanding the flow of program by creating a visual map (network graph or map) of the program flow path. The graph map is in DOT and GML (XML) types. !!! warning "Required installation" * pycallgraph (run `pip install pycallgraph`) * [Graphviz](http...
29.529703
99
0.555407
""" Graphing the program flow module. This module aids in understanding the flow of program by creating a visual map (network graph or map) of the program flow path. The graph map is in DOT and GML (XML) types. !!! warning "Required installation" * pycallgraph (run `pip install pycallgraph`) * [Graphviz](http...
0
0
0
ef2e3c6b09aa1fe3a4d3f5db2221c153a8e6b8df
5,728
py
Python
main.py
HJaen/dad-bot
7ccfa7cf84f0eb5e6c42e8a4cbef56aeb11520b0
[ "MIT" ]
null
null
null
main.py
HJaen/dad-bot
7ccfa7cf84f0eb5e6c42e8a4cbef56aeb11520b0
[ "MIT" ]
null
null
null
main.py
HJaen/dad-bot
7ccfa7cf84f0eb5e6c42e8a4cbef56aeb11520b0
[ "MIT" ]
null
null
null
# A Discord bot that does typical dad things # By Jason Saini and James Nguyen # Created: January 31, 2021 # Modified: January 20, 2022 import discord from os import getenv from requests import get, Session from dadjokes import Dadjoke from pyowm import OWM from dotenv import load_dotenv import yfinance as yf # setup...
30.306878
181
0.678247
# A Discord bot that does typical dad things # By Jason Saini and James Nguyen # Created: January 31, 2021 # Modified: January 20, 2022 import discord from os import getenv from requests import get, Session from dadjokes import Dadjoke from pyowm import OWM from dotenv import load_dotenv import yfinance as yf # setup...
4,754
0
182
85051de1f6a5e87b6148a3d81c6e5f3a6fea82ef
3,160
py
Python
dogbot/bot/listeners/material.py
moondropx/dogbot
4883b558e92c8fdcdbef97240cfa8252ec343eb4
[ "Apache-2.0" ]
6
2017-08-01T09:06:59.000Z
2018-06-23T11:28:51.000Z
dogbot/bot/listeners/material.py
moondropx/dogbot
4883b558e92c8fdcdbef97240cfa8252ec343eb4
[ "Apache-2.0" ]
null
null
null
dogbot/bot/listeners/material.py
moondropx/dogbot
4883b558e92c8fdcdbef97240cfa8252ec343eb4
[ "Apache-2.0" ]
2
2017-08-14T04:35:57.000Z
2019-05-26T05:57:58.000Z
import getopt import shlex from config import config from dogbot.cqsdk.utils import reply from dogbot.models import * def material(bot, message): """用法: -material [-h] [-r [-o]] 职业 -h : 打印本帮助 -r : 逆查 -o : 珠子逆查 职业 : 职业名, 可以是日文原文或者黑话. 原文一概采用未cc的初始职业名. 也接受单位的日文原文或者黑话. 例: -matrial...
25.691057
108
0.496203
import getopt import shlex from config import config from dogbot.cqsdk.utils import reply from dogbot.models import * def material(bot, message): """用法: -material [-h] [-r [-o]] 职业 -h : 打印本帮助 -r : 逆查 -o : 珠子逆查 职业 : 职业名, 可以是日文原文或者黑话. 原文一概采用未cc的初始职业名. 也接受单位的日文原文或者黑话. 例: -matrial...
0
0
0
74dd66fe68b737ebf12160e8d8200121aab64bd4
7,981
py
Python
controlimcap/decoders/cfattention.py
SikandarBakht/asg2cap
d8a6360eaccdb8c3add5f9c4f6fd72764e47e762
[ "MIT" ]
169
2020-03-15T08:41:39.000Z
2022-03-30T09:36:17.000Z
controlimcap/decoders/cfattention.py
wtr850/asg2cap
97a1d866d4a2b86c1f474bb168518f97eb2f8b96
[ "MIT" ]
25
2020-05-23T15:14:00.000Z
2022-03-10T06:20:31.000Z
controlimcap/decoders/cfattention.py
wtr850/asg2cap
97a1d866d4a2b86c1f474bb168518f97eb2f8b96
[ "MIT" ]
25
2020-04-02T10:08:01.000Z
2021-12-09T12:10:10.000Z
import torch import torch.nn as nn import torch.nn.functional as F import caption.utils.inference import caption.decoders.vanilla from framework.modules.embeddings import Embedding from framework.modules.global_attention import GlobalAttention
40.719388
109
0.712943
import torch import torch.nn as nn import torch.nn.functional as F import caption.utils.inference import caption.decoders.vanilla from framework.modules.embeddings import Embedding from framework.modules.global_attention import GlobalAttention class ContentFlowAttentionDecoder(caption.decoders.attention.BUTDAttnDec...
3,279
4,432
23
4efa79d9536678c909e0b8038a228049bf6499be
662
py
Python
2_parameters/test_params.py
fwph/pytest-examples
720b1002e43e5986db808395c9d4bdc1ca5b1638
[ "MIT" ]
4
2016-07-20T14:29:01.000Z
2017-12-07T09:23:51.000Z
2_parameters/test_params.py
fwph/pytest-examples
720b1002e43e5986db808395c9d4bdc1ca5b1638
[ "MIT" ]
null
null
null
2_parameters/test_params.py
fwph/pytest-examples
720b1002e43e5986db808395c9d4bdc1ca5b1638
[ "MIT" ]
null
null
null
import pytest @pytest.mark.parametrize(['x', 'y', 'ans'], [(1, 1, 2), (1, 2, 3), (1, 3, 4), (1, 4, 5)]) @pytest.mark.parametrize(['x', 'y', 'ans'], [(1, 1, 2), py...
31.52381
74
0.350453
import pytest @pytest.mark.parametrize(['x', 'y', 'ans'], [(1, 1, 2), (1, 2, 3), (1, 3, 4), (1, 4, 5)]) def test_addition(x, y, ans): assert x + y == ans @pytest.mark.parametrize(['x', 'y', 'ans'], ...
70
0
44
35dd4db4651fde50d5a6898decf9c51ba241f80d
713
py
Python
xml/parse_xml.py
bruce-webber/python-intro
78881eb65951e2c4451df1d62da1b7d79f5b1970
[ "CC-BY-4.0" ]
null
null
null
xml/parse_xml.py
bruce-webber/python-intro
78881eb65951e2c4451df1d62da1b7d79f5b1970
[ "CC-BY-4.0" ]
null
null
null
xml/parse_xml.py
bruce-webber/python-intro
78881eb65951e2c4451df1d62da1b7d79f5b1970
[ "CC-BY-4.0" ]
null
null
null
""" This is a demonstration of xml.etree (part of the standard library), which is used to parse, modify and create XML files. """ import xml.etree.ElementTree as ET tree = ET.parse('country_data.xml') root = tree.getroot() # The top level tag. print(root.tag) # The tag of the first sub-element. print(root[0].tag) #...
25.464286
82
0.650771
""" This is a demonstration of xml.etree (part of the standard library), which is used to parse, modify and create XML files. """ import xml.etree.ElementTree as ET tree = ET.parse('country_data.xml') root = tree.getroot() # The top level tag. print(root.tag) # The tag of the first sub-element. print(root[0].tag) #...
0
0
0
d1757e88944234f1f3f71b7e8f9c445336ae06cf
618
py
Python
schedule/models/event.py
rankrh/soli
8f19945a175106064591d09a53d07fcbfa26b7da
[ "MIT" ]
null
null
null
schedule/models/event.py
rankrh/soli
8f19945a175106064591d09a53d07fcbfa26b7da
[ "MIT" ]
null
null
null
schedule/models/event.py
rankrh/soli
8f19945a175106064591d09a53d07fcbfa26b7da
[ "MIT" ]
2
2019-09-07T15:10:14.000Z
2020-09-04T01:51:19.000Z
from django.db import models from django.db.models import CASCADE from schedule.models.calendar import Calendar from schedule.models.eventType import EventType
34.333333
75
0.749191
from django.db import models from django.db.models import CASCADE from schedule.models.calendar import Calendar from schedule.models.eventType import EventType class Event(models.Model): class Meta: db_table = "event" app_label = "schedule" calendar = models.ForeignKey(Calendar, on_delete=CAS...
0
434
23
0f1243eea047ef5906118e7ffee57622af60818f
719
py
Python
examples/read_eeprom.py
Galch/pysoem
7dbc6c2aec9f26c7cff911c3aeef0fc73f6c71cc
[ "MIT" ]
48
2018-05-17T09:25:59.000Z
2022-03-18T08:54:36.000Z
examples/read_eeprom.py
Galch/pysoem
7dbc6c2aec9f26c7cff911c3aeef0fc73f6c71cc
[ "MIT" ]
52
2019-07-26T06:54:55.000Z
2022-03-31T09:42:20.000Z
examples/read_eeprom.py
Galch/pysoem
7dbc6c2aec9f26c7cff911c3aeef0fc73f6c71cc
[ "MIT" ]
23
2019-03-07T02:37:47.000Z
2022-03-18T08:53:45.000Z
"""Prints name and description of available network adapters.""" import sys import pysoem if __name__ == '__main__': print('script started') if len(sys.argv) > 1: read_eeprom_of_first_slave(sys.argv[1]) else: print('give ifname as script argument')
21.147059
83
0.585535
"""Prints name and description of available network adapters.""" import sys import pysoem def read_eeprom_of_first_slave(ifname): master = pysoem.Master() master.open(ifname) if master.config_init() > 0: first_slave = master.slaves[0] for i in range(0, 0x80, 2): ...
413
0
23
8129a772f7f24252ee1ca4c2af3fd32a8236f8a3
380
py
Python
scan_lib/neros.py
Lannix/ScanNet
3a2783017ff7b9d53fd3610b28f46370c01b9145
[ "Apache-2.0" ]
null
null
null
scan_lib/neros.py
Lannix/ScanNet
3a2783017ff7b9d53fd3610b28f46370c01b9145
[ "Apache-2.0" ]
null
null
null
scan_lib/neros.py
Lannix/ScanNet
3a2783017ff7b9d53fd3610b28f46370c01b9145
[ "Apache-2.0" ]
null
null
null
from scan_lib import nero as n CONSTANT_EPOH = 100 CONSTANT_EPOH_1 = 10
22.352941
80
0.715789
from scan_lib import nero as n CONSTANT_EPOH = 100 CONSTANT_EPOH_1 = 10 def go_to_HELL(): n.save_model(n.trening_model(0, CONSTANT_EPOH)) # предобучение и сохранение for i in range(1,2000): n.save_model(n.trening_model(1, CONSTANT_EPOH_1)) n.save_model(n.trening_model(2, CONSTANT_EPOH_1)) ...
302
0
23
9a8c6517db70701e563affe64146a10b0e74c08e
2,034
py
Python
tklife/__main__.py
Aesonus/TkLife
8e8f585be7f522134b9a5746b22185c2394d3d8d
[ "MIT" ]
null
null
null
tklife/__main__.py
Aesonus/TkLife
8e8f585be7f522134b9a5746b22185c2394d3d8d
[ "MIT" ]
4
2021-05-02T17:33:19.000Z
2021-05-16T18:53:51.000Z
tklife/__main__.py
Aesonus/TkLife
8e8f585be7f522134b9a5746b22185c2394d3d8d
[ "MIT" ]
null
null
null
"""Shows a sample tklife application""" from tkinter import StringVar, Widget from tkinter.constants import END from tkinter.ttk import Button, Entry, Label from .widgets import NewTable from .constants import COLUMNSPAN, PADX, PADY from .mixins import generate_event_for from . import Main from .arrange import Autogri...
33.9
150
0.657325
"""Shows a sample tklife application""" from tkinter import StringVar, Widget from tkinter.constants import END from tkinter.ttk import Button, Entry, Label from .widgets import NewTable from .constants import COLUMNSPAN, PADX, PADY from .mixins import generate_event_for from . import Main from .arrange import Autogri...
1,190
300
23
8cc875fd00221a9cb482a6ff240319c6dd13b16b
9,868
py
Python
aiida/tools/dbexporters/tcod_plugins/__init__.py
astamminger/aiida_core
b01ad8236f21804f273c9d2a0365ecee62255cbb
[ "BSD-2-Clause" ]
null
null
null
aiida/tools/dbexporters/tcod_plugins/__init__.py
astamminger/aiida_core
b01ad8236f21804f273c9d2a0365ecee62255cbb
[ "BSD-2-Clause" ]
null
null
null
aiida/tools/dbexporters/tcod_plugins/__init__.py
astamminger/aiida_core
b01ad8236f21804f273c9d2a0365ecee62255cbb
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
34.027586
90
0.631334
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
0
0
0
d14b244e69a897030f5533e366ea8b8c35a26b69
11,778
py
Python
edgedb/asyncio_client.py
ambv/edgedb-python
28de03948f1281110f8d11884683e08e2b593e91
[ "Apache-2.0" ]
null
null
null
edgedb/asyncio_client.py
ambv/edgedb-python
28de03948f1281110f8d11884683e08e2b593e91
[ "Apache-2.0" ]
null
null
null
edgedb/asyncio_client.py
ambv/edgedb-python
28de03948f1281110f8d11884683e08e2b593e91
[ "Apache-2.0" ]
null
null
null
# # This source file is part of the EdgeDB open source project. # # Copyright 2019-present MagicStack Inc. and the EdgeDB authors. # # 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...
30.434109
79
0.616403
# # This source file is part of the EdgeDB open source project. # # Copyright 2019-present MagicStack Inc. and the EdgeDB authors. # # 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...
7,257
2,160
300
19ede42cce4f823c3fdc894067745de7b0edc547
181
py
Python
mobie/validation/__init__.py
mobie-org/mobie-utils-python
0281db2bf3726103b762a50e40849e30942dd6ec
[ "MIT" ]
1
2020-03-03T01:33:06.000Z
2020-03-03T01:33:06.000Z
mobie/validation/__init__.py
platybrowser/mmb-python
0281db2bf3726103b762a50e40849e30942dd6ec
[ "MIT" ]
4
2020-05-15T09:27:59.000Z
2020-05-29T19:15:00.000Z
mobie/validation/__init__.py
platybrowser/mmb-python
0281db2bf3726103b762a50e40849e30942dd6ec
[ "MIT" ]
2
2020-06-08T07:06:01.000Z
2020-06-08T07:08:08.000Z
from .dataset import validate_dataset from .metadata import validate_source_metadata, validate_view_metadata from .project import validate_project from .views import validate_views
36.2
70
0.878453
from .dataset import validate_dataset from .metadata import validate_source_metadata, validate_view_metadata from .project import validate_project from .views import validate_views
0
0
0
86965314682fe859926efa3c62312c76b8803870
1,918
py
Python
examples/test_trading.py
testnet-exchange/python-viabtc-api
be7be15944004498be8da9e4435020d97408a352
[ "Apache-2.0" ]
33
2018-07-31T07:50:15.000Z
2020-08-04T13:51:40.000Z
examples/test_trading.py
urantialife/python-viabtc-api
be7be15944004498be8da9e4435020d97408a352
[ "Apache-2.0" ]
7
2018-08-23T14:48:11.000Z
2019-07-15T02:17:12.000Z
examples/test_trading.py
urantialife/python-viabtc-api
be7be15944004498be8da9e4435020d97408a352
[ "Apache-2.0" ]
20
2018-08-08T16:29:41.000Z
2020-08-04T13:51:43.000Z
import sys from ViaBTCAPI.ViaBTCAPI import ViaBTCAPI EXCHANGE_URL = "http://localhost:8080/" USER_ID = 1 USER_ID_2 = 2 UPDATE_MONEY = 0.1 ORDER_PRICE = 0.1 if len(sys.argv) > 1: EXCHANGE_URL = sys.argv[1] api = ViaBTCAPI(EXCHANGE_URL) # get consts from exchange resp = api.market_list() m = resp["result"][0] mar...
31.442623
91
0.717935
import sys from ViaBTCAPI.ViaBTCAPI import ViaBTCAPI EXCHANGE_URL = "http://localhost:8080/" USER_ID = 1 USER_ID_2 = 2 UPDATE_MONEY = 0.1 ORDER_PRICE = 0.1 if len(sys.argv) > 1: EXCHANGE_URL = sys.argv[1] api = ViaBTCAPI(EXCHANGE_URL) # get consts from exchange resp = api.market_list() m = resp["result"][0] mar...
0
0
0
ea5282e356e5e5fd276625a31e5b9590f02122ed
1,066
py
Python
Speech Synthesis/SS.py
saber1malek/HelpMate
d69ee6cc1e67fca3e87fa6ea132a0569e4667994
[ "MIT" ]
3
2020-06-07T08:56:40.000Z
2020-06-07T13:00:21.000Z
Speech Synthesis/SS.py
saber1malek/HelpMate
d69ee6cc1e67fca3e87fa6ea132a0569e4667994
[ "MIT" ]
1
2020-06-07T09:06:12.000Z
2020-06-07T09:06:12.000Z
Speech Synthesis/SS.py
saber1malek/HelpMate
d69ee6cc1e67fca3e87fa6ea132a0569e4667994
[ "MIT" ]
1
2020-06-07T07:13:55.000Z
2020-06-07T07:13:55.000Z
# HelpMate Speech Synthesis Connection 2020 from google.cloud import texttospeech # Instantiates a client client = texttospeech.TextToSpeechClient() # Set the text input to be synthesized synthesis_input = texttospeech.types.SynthesisInput(text="Hello, World!") # Build the voice request, select the language code ("...
35.533333
74
0.77955
# HelpMate Speech Synthesis Connection 2020 from google.cloud import texttospeech # Instantiates a client client = texttospeech.TextToSpeechClient() # Set the text input to be synthesized synthesis_input = texttospeech.types.SynthesisInput(text="Hello, World!") # Build the voice request, select the language code ("...
0
0
0
45ea4555c4079a2cc54d9816af5099cce9311f97
4,128
py
Python
triggerflow/dags/dag.py
Dahk/triggerflow-examples
c492942ab911615d144a1375f4bc7933831203bd
[ "Apache-2.0" ]
38
2020-06-11T08:05:21.000Z
2022-03-17T10:21:18.000Z
triggerflow/dags/dag.py
Dahk/triggerflow-examples
c492942ab911615d144a1375f4bc7933831203bd
[ "Apache-2.0" ]
1
2020-07-07T15:47:56.000Z
2020-07-07T15:47:56.000Z
triggerflow/dags/dag.py
Dahk/triggerflow-examples
c492942ab911615d144a1375f4bc7933831203bd
[ "Apache-2.0" ]
7
2020-05-18T16:32:06.000Z
2021-11-30T17:11:12.000Z
import re import json from typing import Optional, List, Dict from . import operators from .models.baseoperator import BaseOperator from .dagrun import DAGRun from ..cache import TriggerflowCache from .other.notebook import display_graph
35.895652
115
0.637355
import re import json from typing import Optional, List, Dict from . import operators from .models.baseoperator import BaseOperator from .dagrun import DAGRun from ..cache import TriggerflowCache from .other.notebook import display_graph class DAG: def __init__(self, dag_id): """ Initialize an e...
2,957
907
23
53010981e0eedacff4461e5e4a9beb5fada6a61c
7,649
py
Python
arbitrage/private_markets/anxpro.py
queenvictoria/bitcoin-arbitrage
12b6304684416fa2a7b2bb61c19e87b4572577c1
[ "Unlicense" ]
2
2016-02-27T03:52:01.000Z
2017-10-23T18:47:31.000Z
arbitrage/private_markets/anxpro.py
queenvictoria/bitcoin-arbitrage
12b6304684416fa2a7b2bb61c19e87b4572577c1
[ "Unlicense" ]
null
null
null
arbitrage/private_markets/anxpro.py
queenvictoria/bitcoin-arbitrage
12b6304684416fa2a7b2bb61c19e87b4572577c1
[ "Unlicense" ]
null
null
null
# Copyright (C) 2013, Maxime Biais <maxime@biais.org> from .market import Market import time import base64 import hmac import urllib.request import urllib.parse import urllib.error import urllib.request import urllib.error import urllib.parse import hashlib import sys import json import re import logging import config...
39.225641
95
0.577723
# Copyright (C) 2013, Maxime Biais <maxime@biais.org> from .market import Market import time import base64 import hmac import urllib.request import urllib.parse import urllib.error import urllib.request import urllib.error import urllib.parse import hashlib import sys import json import re import logging import config...
6,761
41
525
f3f1716e28d3670b76dc0d585daaea68d8eeab2d
2,442
py
Python
zeus/migrations/0f81e9efc84a_add_pending_artifact.py
conrad-kronos/zeus
ddb6bc313e51fb22222b30822b82d76f37dbbd35
[ "Apache-2.0" ]
221
2017-07-03T17:29:21.000Z
2021-12-07T19:56:59.000Z
zeus/migrations/0f81e9efc84a_add_pending_artifact.py
conrad-kronos/zeus
ddb6bc313e51fb22222b30822b82d76f37dbbd35
[ "Apache-2.0" ]
298
2017-07-04T18:08:14.000Z
2022-03-03T22:24:51.000Z
zeus/migrations/0f81e9efc84a_add_pending_artifact.py
conrad-kronos/zeus
ddb6bc313e51fb22222b30822b82d76f37dbbd35
[ "Apache-2.0" ]
24
2017-07-15T13:46:45.000Z
2020-08-16T16:14:45.000Z
"""add_pending_artifact Revision ID: 0f81e9efc84a Revises: 61a1763b9c8d Create Date: 2019-10-24 15:13:36.705288 """ import zeus.db.types from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "0f81e9efc84a" down_revision = "61a1763b9c8d" branch_labels = () depends_on = No...
32.56
85
0.638411
"""add_pending_artifact Revision ID: 0f81e9efc84a Revises: 61a1763b9c8d Create Date: 2019-10-24 15:13:36.705288 """ import zeus.db.types from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "0f81e9efc84a" down_revision = "61a1763b9c8d" branch_labels = () depends_on = No...
2,071
0
46
04fc4ab0e7caeb7ba6bcedac53f83e0735e59840
5,148
py
Python
fixed_width.py
supakeen/fixed-width
57e9ae06ee5d77f2390f8377a9b7842f3596b04e
[ "MIT" ]
null
null
null
fixed_width.py
supakeen/fixed-width
57e9ae06ee5d77f2390f8377a9b7842f3596b04e
[ "MIT" ]
null
null
null
fixed_width.py
supakeen/fixed-width
57e9ae06ee5d77f2390f8377a9b7842f3596b04e
[ "MIT" ]
null
null
null
""" Copyright 2021 supakeen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicens...
27.677419
80
0.698718
""" Copyright 2021 supakeen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicens...
1,189
1,106
373
67cbdb578387f31a0a05cd7f49b7dda4d7c9a62c
172
py
Python
16-coroutine/example_16_1.py
hua372494277/fluent_python_example-code
07577e3e3ca822ab0e769bbaa22477fd988edb36
[ "MIT" ]
null
null
null
16-coroutine/example_16_1.py
hua372494277/fluent_python_example-code
07577e3e3ca822ab0e769bbaa22477fd988edb36
[ "MIT" ]
null
null
null
16-coroutine/example_16_1.py
hua372494277/fluent_python_example-code
07577e3e3ca822ab0e769bbaa22477fd988edb36
[ "MIT" ]
null
null
null
my_coro = simple_coroutine() next(my_coro) my_coro.send(42)
21.5
39
0.674419
def simple_coroutine(): print('-> coroutine started') x = yield print('-> coroutine received: ', x) my_coro = simple_coroutine() next(my_coro) my_coro.send(42)
90
0
22
a6bb3f10026fd14c5e3cb38dc7884cfc0cad2c28
193
py
Python
example_project/urls.py
justquick/django-sentry
07988759144524ba49bc63b308663244d1a69d04
[ "BSD-3-Clause" ]
1
2016-03-21T18:56:31.000Z
2016-03-21T18:56:31.000Z
example_project/urls.py
justquick/django-sentry
07988759144524ba49bc63b308663244d1a69d04
[ "BSD-3-Clause" ]
null
null
null
example_project/urls.py
justquick/django-sentry
07988759144524ba49bc63b308663244d1a69d04
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls.defaults import * urlpatterns = patterns('', url(r'^trigger-500$', 'sentry.tests.views.raise_exc', name='sentry-raise-exc'), url(r'^', include('sentry.urls')), )
27.571429
83
0.668394
from django.conf.urls.defaults import * urlpatterns = patterns('', url(r'^trigger-500$', 'sentry.tests.views.raise_exc', name='sentry-raise-exc'), url(r'^', include('sentry.urls')), )
0
0
0
6ffdeaa033eaf21fe518e29893f1e57af448e9e1
2,012
py
Python
cruft/_commands/utils/diff.py
appunni-dishq/cruft
afa89a2856008bec49b31a90b6e3dd3c1eee24a9
[ "MIT" ]
null
null
null
cruft/_commands/utils/diff.py
appunni-dishq/cruft
afa89a2856008bec49b31a90b6e3dd3c1eee24a9
[ "MIT" ]
null
null
null
cruft/_commands/utils/diff.py
appunni-dishq/cruft
afa89a2856008bec49b31a90b6e3dd3c1eee24a9
[ "MIT" ]
null
null
null
from pathlib import Path from subprocess import PIPE, run # nosec from typing import List from cruft import exceptions def get_diff(repo0: Path, repo1: Path) -> str: """Compute the raw diff between two repositories.""" try: diff = run( _git_diff("--no-ext-diff", "--no-color", str(repo0)...
42.808511
100
0.656064
from pathlib import Path from subprocess import PIPE, run # nosec from typing import List from cruft import exceptions def _git_diff(*args: str) -> List[str]: # https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---binary support for binary patch return ["git", "-c", "diff.noprefix=", "diff", "--no...
217
0
23
fe150d05608dcd1ad34cb5b7bf40af7c9cb0ade8
6,990
py
Python
octopus/modules/doaj/models.py
CottageLabs/magnificent-octopus-oacwellcome-fork
b1c8c412cf9a3fe66fca1c8e92ed074c9821663e
[ "Apache-2.0" ]
2
2016-02-22T04:31:30.000Z
2021-08-03T23:58:36.000Z
octopus/modules/doaj/models.py
CottageLabs/magnificent-octopus-oacwellcome-fork
b1c8c412cf9a3fe66fca1c8e92ed074c9821663e
[ "Apache-2.0" ]
9
2015-01-04T14:00:05.000Z
2021-12-13T19:35:07.000Z
octopus/modules/doaj/models.py
CottageLabs/magnificent-octopus-oacwellcome-fork
b1c8c412cf9a3fe66fca1c8e92ed074c9821663e
[ "Apache-2.0" ]
3
2016-09-09T13:39:45.000Z
2018-02-19T14:23:12.000Z
from octopus.lib import dataobj BASE_ARTICLE_STRUCT = { "fields": { "id": {"coerce": "unicode"}, # Note that we'll leave these in for ease of use by the "created_date": {"coerce": "utcdatetime"}, # caller, but we'll need to ignore them on the conversion "last_updated": {"coe...
34.097561
109
0.425322
from octopus.lib import dataobj BASE_ARTICLE_STRUCT = { "fields": { "id": {"coerce": "unicode"}, # Note that we'll leave these in for ease of use by the "created_date": {"coerce": "utcdatetime"}, # caller, but we'll need to ignore them on the conversion "last_updated": {"coe...
2,057
39
336
e33d9c4b1e510869e7210b59656c9fa8baeead13
959
py
Python
h3m/rmg/dispatch_gen.py
dmitrystril/homm3tools
5687f581a4eb5e7b0e8f48794d7be4e3b0a8cc8b
[ "MIT" ]
113
2015-08-09T08:36:55.000Z
2022-03-21T10:42:46.000Z
h3m/rmg/dispatch_gen.py
dmitrystril/homm3tools
5687f581a4eb5e7b0e8f48794d7be4e3b0a8cc8b
[ "MIT" ]
40
2015-08-23T06:36:34.000Z
2022-01-03T21:19:40.000Z
h3m/rmg/dispatch_gen.py
dmitrystril/homm3tools
5687f581a4eb5e7b0e8f48794d7be4e3b0a8cc8b
[ "MIT" ]
27
2015-08-09T08:40:39.000Z
2022-03-28T08:03:12.000Z
import sys from random import * def dispatch_gen(settings, rmgseed = 0): """ Short function that prepares map generation and then dispatches to generation modules """ # Seed with a specific seed if one was provided if rmgseed != 0: print("seed:" + str(rmgseed)) seed(rmgseed) module_name = "modules.%s._...
31.966667
134
0.713243
import sys from random import * def dispatch_gen(settings, rmgseed = 0): """ Short function that prepares map generation and then dispatches to generation modules """ # Seed with a specific seed if one was provided if rmgseed != 0: print("seed:" + str(rmgseed)) seed(rmgseed) module_name = "modules.%s._...
0
0
0
82c564532f62f466d26f2f89f9095a93136b4581
1,793
py
Python
openff/benchmark/analysis/metrics.py
openforcefield/openff-benchmark
e27320922e7583e313eaf32119de863d23842217
[ "MIT" ]
6
2021-01-27T14:06:57.000Z
2022-03-01T12:54:42.000Z
openff/benchmark/analysis/metrics.py
openforcefield/openff-benchmark
e27320922e7583e313eaf32119de863d23842217
[ "MIT" ]
83
2020-07-31T18:10:47.000Z
2022-03-07T22:59:24.000Z
openff/benchmark/analysis/metrics.py
openforcefield/openff-benchmark
e27320922e7583e313eaf32119de863d23842217
[ "MIT" ]
1
2022-03-03T04:06:32.000Z
2022-03-03T04:06:32.000Z
#!/usr/bin/env python """ metrics.py Metrics calculation for the analysis/report part of the openff-benchmark workflow By: David F. Hahn Version: Nov 25 2020 """ import numpy as np from rdkit import Chem from rdkit.Chem import TorsionFingerprints def calc_tfd(ref_mol, query_mol): """ Calculate Torsio...
26.761194
82
0.636921
#!/usr/bin/env python """ metrics.py Metrics calculation for the analysis/report part of the openff-benchmark workflow By: David F. Hahn Version: Nov 25 2020 """ import numpy as np from rdkit import Chem from rdkit.Chem import TorsionFingerprints def calc_tfd(ref_mol, query_mol): """ Calculate Torsio...
0
0
0
54f7bd38aa77922afb64699b585c50bd6c3ab6db
2,429
py
Python
simple_rest_client_example/resources.py
allisson/pythonbrasil-2018-exemplos
e106ba6d4833185566d4d306e8c108c97987350c
[ "MIT" ]
3
2018-10-17T12:34:12.000Z
2021-06-18T01:00:33.000Z
simple_rest_client_example/resources.py
allisson/pythonbrasil-2018-exemplos
e106ba6d4833185566d4d306e8c108c97987350c
[ "MIT" ]
null
null
null
simple_rest_client_example/resources.py
allisson/pythonbrasil-2018-exemplos
e106ba6d4833185566d4d306e8c108c97987350c
[ "MIT" ]
1
2018-10-22T12:52:34.000Z
2018-10-22T12:52:34.000Z
from simple_rest_client.resource import AsyncResource, Resource films_actions = { 'list': { 'method': 'GET', 'url': 'films' }, 'retrieve': { 'method': 'GET', 'url': 'films/{}', }, 'schema': { 'method': 'GET', 'url': 'films/schema', }, } people_a...
17.22695
63
0.532318
from simple_rest_client.resource import AsyncResource, Resource films_actions = { 'list': { 'method': 'GET', 'url': 'films' }, 'retrieve': { 'method': 'GET', 'url': 'films/{}', }, 'schema': { 'method': 'GET', 'url': 'films/schema', }, } people_a...
0
552
276
2924a841e050929bf5200ad6aa6ce38ce0e83e43
2,035
py
Python
examples/OLX/gen.py
godber/banky
a3c41b810b16cce737f0ca7e2f1a10a32c3a5d66
[ "MIT" ]
null
null
null
examples/OLX/gen.py
godber/banky
a3c41b810b16cce737f0ca7e2f1a10a32c3a5d66
[ "MIT" ]
null
null
null
examples/OLX/gen.py
godber/banky
a3c41b810b16cce737f0ca7e2f1a10a32c3a5d66
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' Generates an EdX style XML question from the provided YAML question file. ''' from pathlib import Path from random import sample import click import yaml from lxml import etree @click.command() @click.argument('file_name') if __name__ == '__main__': gen()
31.796875
85
0.69828
#!/usr/bin/env python ''' Generates an EdX style XML question from the provided YAML question file. ''' from pathlib import Path from random import sample import click import yaml from lxml import etree @click.command() @click.argument('file_name') def gen(file_name): # Read and parse the YAML file containing th...
1,721
0
22
e31990aebb31cb9c87884c60bbda3ef72156d0f7
695
py
Python
AveriguaNBisiestosRangoTiempo.py
brown9804/Python_DiversosAlgortimos
e9ff0fbe761f24a49a30a513d50824ca56cafaa3
[ "Apache-2.0" ]
3
2018-06-28T21:06:53.000Z
2018-07-01T20:39:30.000Z
AveriguaNBisiestosRangoTiempo.py
brown9804/Python_DiversosAlgortimos
e9ff0fbe761f24a49a30a513d50824ca56cafaa3
[ "Apache-2.0" ]
null
null
null
AveriguaNBisiestosRangoTiempo.py
brown9804/Python_DiversosAlgortimos
e9ff0fbe761f24a49a30a513d50824ca56cafaa3
[ "Apache-2.0" ]
null
null
null
#Python3 #Permite calcular cuantos años han sido bisiestos en un rango de años ###### DEFINICIONES ###### ###### IMPLEMENTACION ###### an1 = int(input("Digite el año mayor que desea comparar ")) an2 = int(input("Digite el año menor ")) dif = an1 - an2 cont = 0 for indice in range (an2, an1+1): if...
26.730769
71
0.617266
#Python3 #Permite calcular cuantos años han sido bisiestos en un rango de años ###### DEFINICIONES ###### def bisiesto(year): if (year % 400 == 0) or ((year % 4 == 0) and (year % 100 != 0)): return True else: return False ###### IMPLEMENTACION ###### an1 = int(input("Digite el año mayor que ...
100
0
22
401ef2ec5e7636f6f94cccb2e06d145d92e2d554
2,792
py
Python
supriya/commands/GroupFreeAllRequest.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
supriya/commands/GroupFreeAllRequest.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
supriya/commands/GroupFreeAllRequest.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
import supriya.osc from supriya.commands.Request import Request from supriya.enums import RequestId class GroupFreeAllRequest(Request): """ A /g_freeAll request. :: >>> import supriya >>> server = supriya.Server.default().boot() >>> group = supriya.Group().allocate() >>> ...
27.372549
95
0.493911
import supriya.osc from supriya.commands.Request import Request from supriya.enums import RequestId class GroupFreeAllRequest(Request): """ A /g_freeAll request. :: >>> import supriya >>> server = supriya.Server.default().boot() >>> group = supriya.Group().allocate() >>> ...
288
0
80
617d920f815b114aee02c2dc33fc7ac71fb36f20
3,426
py
Python
code/agents/on_policy/ppo.py
arjunchandra/continuous-rl
8f3c655c6a4b2e9d15a6b052e5466c0a75191a08
[ "MIT" ]
17
2019-03-29T18:30:36.000Z
2021-10-17T15:38:22.000Z
code/agents/on_policy/ppo.py
arjunchandra/continuous-rl
8f3c655c6a4b2e9d15a6b052e5466c0a75191a08
[ "MIT" ]
1
2019-04-22T22:40:30.000Z
2019-04-24T21:45:07.000Z
code/agents/on_policy/ppo.py
ctallec/continuous-rl
8f3c655c6a4b2e9d15a6b052e5466c0a75191a08
[ "MIT" ]
5
2019-04-29T16:26:18.000Z
2020-01-23T07:17:49.000Z
from itertools import chain from logging import info import torch from mylog import log from memory.trajectory import Trajectory from optimizer import setup_optimizer from agents.on_policy.online_agent import OnlineAgent from actors.on_policy.online_actor import OnlineActor from critics.on_policy.online_critic impor...
39.37931
100
0.643608
from itertools import chain from logging import info import torch from mylog import log from memory.trajectory import Trajectory from optimizer import setup_optimizer from agents.on_policy.online_agent import OnlineAgent from actors.on_policy.online_actor import OnlineActor from critics.on_policy.online_critic impor...
2,601
0
53
db4f23ef884783a4a230a932eac3a80a44e8dffd
4,569
py
Python
code/tasks/REGEX/trainers/executor.py
khanhptnk/iliad
3eb4f11c1d3cdb6784fd2f78a83ce07f984d3825
[ "MIT" ]
7
2021-06-10T22:17:13.000Z
2022-03-03T05:58:55.000Z
code/tasks/REGEX/trainers/executor.py
khanhptnk/iliad
3eb4f11c1d3cdb6784fd2f78a83ce07f984d3825
[ "MIT" ]
null
null
null
code/tasks/REGEX/trainers/executor.py
khanhptnk/iliad
3eb4f11c1d3cdb6784fd2f78a83ce07f984d3825
[ "MIT" ]
null
null
null
import logging import os import sys sys.path.append('..') import itertools import json import random import torch from misc import util
29.101911
78
0.516743
import logging import os import sys sys.path.append('..') import itertools import json import random import torch from misc import util class ExecutorTrainer(object): def __init__(self, config): self.config = config self.random = random.Random(self.config.seed) def do_rollout(self, batch, ...
4,262
9
158
d5d37258f5db0c94fe2805ed35fc6221e3fda39b
11,999
py
Python
DICOM/ParametricMapsDictionary.py
QIB-Sheffield/WEASEL
e4dad345fd6f347cfac990708252844a7cbcd025
[ "Apache-2.0" ]
2
2021-02-10T09:07:15.000Z
2021-03-16T17:05:24.000Z
DICOM/ParametricMapsDictionary.py
QIB-Sheffield/WEASEL
e4dad345fd6f347cfac990708252844a7cbcd025
[ "Apache-2.0" ]
102
2021-01-20T11:14:21.000Z
2021-12-12T17:34:42.000Z
DICOM/ParametricMapsDictionary.py
QIB-Sheffield/WEASEL
e4dad345fd6f347cfac990708252844a7cbcd025
[ "Apache-2.0" ]
1
2021-01-29T09:28:05.000Z
2021-01-29T09:28:05.000Z
""" This module is used in `SaveDICOM_Image.py` and used as the optional argument `parametric_map` in write functions of `Classes.py` and in "writeNewPixelArray" of `DeveloperTools.py`. The functions in this module capture special versions of DICOM with unique parameters/attributes/values. **How to use:** provide the...
51.497854
215
0.685557
""" This module is used in `SaveDICOM_Image.py` and used as the optional argument `parametric_map` in write functions of `Classes.py` and in "writeNewPixelArray" of `DeveloperTools.py`. The functions in this module capture special versions of DICOM with unique parameters/attributes/values. **How to use:** provide the...
9,657
9
258
4f5dc02bbb6371303a2f5b9a9f2436c462178b54
670
py
Python
templates/dags/example_dag.py
dfedde/terraform-aws-ecs-airflow
e928c9272d8735809341e1225551e00cb83270de
[ "MIT" ]
42
2020-10-30T11:54:08.000Z
2022-03-21T11:02:32.000Z
templates/dags/example_dag.py
dfedde/terraform-aws-ecs-airflow
e928c9272d8735809341e1225551e00cb83270de
[ "MIT" ]
20
2020-11-18T15:12:08.000Z
2022-02-07T15:36:54.000Z
templates/dags/example_dag.py
dfedde/terraform-aws-ecs-airflow
e928c9272d8735809341e1225551e00cb83270de
[ "MIT" ]
24
2020-11-19T21:00:57.000Z
2022-03-21T11:02:36.000Z
from datetime import timedelta, datetime from airflow import DAG from airflow.operators.dummy_operator import DummyOperator from airflow import AirflowException args = { "owner": "dataroots", "start_date": datetime(2020, 10, 12), } with DAG( dag_id="example_dag", catchup=False, max_active_runs=1,...
19.142857
58
0.638806
from datetime import timedelta, datetime from airflow import DAG from airflow.operators.dummy_operator import DummyOperator from airflow import AirflowException args = { "owner": "dataroots", "start_date": datetime(2020, 10, 12), } with DAG( dag_id="example_dag", catchup=False, max_active_runs=1,...
0
0
0
541ef5d535e996184c73e8580bacc44fd0c90d6d
1,582
py
Python
tests/operation/test_bump_sequence.py
Shaptic/py-stellar-base
f5fa47f4d96f215889d99249fb25c7be002f5cf3
[ "Apache-2.0" ]
null
null
null
tests/operation/test_bump_sequence.py
Shaptic/py-stellar-base
f5fa47f4d96f215889d99249fb25c7be002f5cf3
[ "Apache-2.0" ]
27
2022-01-12T10:55:38.000Z
2022-03-28T01:38:24.000Z
tests/operation/test_bump_sequence.py
Shaptic/py-stellar-base
f5fa47f4d96f215889d99249fb25c7be002f5cf3
[ "Apache-2.0" ]
2
2021-12-02T12:42:03.000Z
2021-12-07T20:53:10.000Z
import pytest from stellar_sdk import BumpSequence, Operation from . import *
32.958333
99
0.569532
import pytest from stellar_sdk import BumpSequence, Operation from . import * class TestBumpSequence: @pytest.mark.parametrize( "bump_to, source, xdr", [ pytest.param( 1234567890, None, "AAAAAAAAAAsAAAAASZYC0g==", id="without_source" ), pytest....
281
1,197
23
d2d300c5b67883d38f70b2c1b58d33ec2b7b239c
6,778
py
Python
solver.py
aelkouk/rainfall_runoff
7ab984c77abbef38c768fea9993b0cfecaca3e67
[ "MIT" ]
null
null
null
solver.py
aelkouk/rainfall_runoff
7ab984c77abbef38c768fea9993b0cfecaca3e67
[ "MIT" ]
null
null
null
solver.py
aelkouk/rainfall_runoff
7ab984c77abbef38c768fea9993b0cfecaca3e67
[ "MIT" ]
null
null
null
# Purpose: Implement time stepping scheme to solve individual and coupled state equations # Record of revisions: # Date Programmer Description of change # ======== ============= ===================== # 09-2020 A. Elkouk Original code import numpy as np # --------------------------------...
30.669683
121
0.482001
# Purpose: Implement time stepping scheme to solve individual and coupled state equations # Record of revisions: # Date Programmer Description of change # ======== ============= ===================== # 09-2020 A. Elkouk Original code import numpy as np # --------------------------------...
0
0
0
2ec73a56298eb3c73e3a8b581f56a8d1965c7550
1,260
py
Python
specs/env/when.py
bitgn/ml-pipelines
904b6fa200aac1638491658c2d51ea40c33cbffa
[ "BSD-2-Clause" ]
7
2019-07-25T05:36:21.000Z
2020-08-23T18:04:53.000Z
specs/env/when.py
bitgn/ml-pipelines
904b6fa200aac1638491658c2d51ea40c33cbffa
[ "BSD-2-Clause" ]
1
2019-08-18T14:05:49.000Z
2019-08-18T17:51:39.000Z
specs/env/when.py
bitgn/ml-pipelines
904b6fa200aac1638491658c2d51ea40c33cbffa
[ "BSD-2-Clause" ]
4
2019-08-18T13:42:45.000Z
2021-04-04T11:15:21.000Z
from typing import Optional, Callable, Any import grpc import requests as r import env import urllib.parse as url import inspect from client import ml_pipelines as cl import test_api as api
24.705882
90
0.692857
from typing import Optional, Callable, Any import grpc import requests as r import env import urllib.parse as url import inspect from client import ml_pipelines as cl import test_api as api def view_dataset(project, dataset): return _get_page("view_dataset", env.urls.view_dataset(project, dataset)) def search...
901
0
161
e7600c142bd7e27a405fac85062163bfc718090f
134
py
Python
mybitbank/libs/jsonrpc/authproxy.py
zonedoutspace/mybitbank
85d28726117a3c1ca76be5772d30c9edae1df7f4
[ "MIT" ]
15
2015-08-29T12:35:59.000Z
2018-02-06T06:26:26.000Z
mybitbank/libs/jsonrpc/authproxy.py
FireWalkerX/mybitbank
945e604e5fee3914c7c98a25c2c34831ba0ad946
[ "MIT" ]
null
null
null
mybitbank/libs/jsonrpc/authproxy.py
FireWalkerX/mybitbank
945e604e5fee3914c7c98a25c2c34831ba0ad946
[ "MIT" ]
19
2015-02-03T21:32:51.000Z
2021-11-06T12:08:26.000Z
from mybitbank.libs.bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException __all__ = ['AuthServiceProxy', 'JSONRPCException']
44.666667
82
0.843284
from mybitbank.libs.bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException __all__ = ['AuthServiceProxy', 'JSONRPCException']
0
0
0
c316d4e0585be0a5ee8136f55d032f0e3e48ad80
51,673
py
Python
pineboolib/plugins/sql/flmysql_myisam2.py
deavid/pineboo
acc96ab6d5b8bb182990af6dea4bf0986af15549
[ "MIT" ]
2
2015-09-19T16:54:49.000Z
2016-09-12T08:06:29.000Z
pineboolib/plugins/sql/flmysql_myisam2.py
deavid/pineboo
acc96ab6d5b8bb182990af6dea4bf0986af15549
[ "MIT" ]
1
2017-08-14T17:07:14.000Z
2017-08-15T00:22:47.000Z
pineboolib/plugins/sql/flmysql_myisam2.py
deavid/pineboo
acc96ab6d5b8bb182990af6dea4bf0986af15549
[ "MIT" ]
9
2015-01-15T18:15:42.000Z
2019-05-05T18:53:00.000Z
""" Module for MYISAM2 driver. """ from PyQt5.Qt import qWarning, QApplication, QRegExp # type: ignore from PyQt5.QtXml import QDomDocument # type: ignore from PyQt5.QtWidgets import QMessageBox, QWidget # type: ignore from pineboolib.core.utils.utils_base import auto_qt_translate_text from pineboolib.application.u...
33.751143
128
0.482147
""" Module for MYISAM2 driver. """ from PyQt5.Qt import qWarning, QApplication, QRegExp # type: ignore from PyQt5.QtXml import QDomDocument # type: ignore from PyQt5.QtWidgets import QMessageBox, QWidget # type: ignore from pineboolib.core.utils.utils_base import auto_qt_translate_text from pineboolib.application.u...
297
0
54
93d72bc6802337a6844119c8802b8bf664d50346
2,501
py
Python
doit/support/cmd/errors.py
i386x/doit
61892904940b7ecf29af8ea815b731e242a945f7
[ "MIT" ]
null
null
null
doit/support/cmd/errors.py
i386x/doit
61892904940b7ecf29af8ea815b731e242a945f7
[ "MIT" ]
null
null
null
doit/support/cmd/errors.py
i386x/doit
61892904940b7ecf29af8ea815b731e242a945f7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- #! \file ./doit/support/cmd/errors.py #! \author Jiří Kučera, <sanczes@gmail.com> #! \stamp 2016-02-15 13:19:12 (UTC+01:00, DST+00:00) #! \project DoIt!: Tools and Libraries for Building DSLs #! \license MIT #! \version 0.0.0 #! \fdes...
29.081395
79
0.652139
# -*- coding: utf-8 -*- #! \file ./doit/support/cmd/errors.py #! \author Jiří Kučera, <sanczes@gmail.com> #! \stamp 2016-02-15 13:19:12 (UTC+01:00, DST+00:00) #! \project DoIt!: Tools and Libraries for Building DSLs #! \license MIT #! \version 0.0.0 #! \fdes...
0
0
0
bc4091829f8438988183491e40582e30250e0759
4,364
py
Python
nototools/notoconfig.py
dedbbs1/nototools
428f149d7c235ac45fb9255414c77a3529e0c8bf
[ "Apache-2.0" ]
156
2015-06-11T00:03:49.000Z
2019-03-12T10:05:14.000Z
nototools/notoconfig.py
dedbbs1/nototools
428f149d7c235ac45fb9255414c77a3529e0c8bf
[ "Apache-2.0" ]
323
2015-06-09T21:26:40.000Z
2019-04-09T11:09:52.000Z
nototools/notoconfig.py
twardoch/nototools
546beddb96e8eb4d93fa0f4c60793bee56e346ac
[ "Apache-2.0" ]
63
2015-06-09T19:21:58.000Z
2019-03-27T21:52:30.000Z
#!/usr/bin/env python # Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
32.81203
78
0.681714
#!/usr/bin/env python # Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
41
0
23
e0b252fafdf6487f16fd80918000aa7a03e2b15b
541
py
Python
src/assets/svg/clear_fill.py
Pure-Peace/vue-adaptive-template
a3f39258ac748eff84c894510cce0f8227358b88
[ "MIT" ]
7
2020-10-27T15:16:05.000Z
2022-02-15T08:01:21.000Z
src/assets/svg/clear_fill.py
Pure-Peace/vue3-vite-ssr
650b4aa24e4684b6a1d93fcf27bf744dfae60215
[ "MIT" ]
3
2021-03-10T19:59:12.000Z
2021-08-31T19:46:45.000Z
src/assets/svg/clear_fill.py
Pure-Peace/vue-adaptive-template
a3f39258ac748eff84c894510cce0f8227358b88
[ "MIT" ]
1
2021-12-21T14:14:51.000Z
2021-12-21T14:14:51.000Z
import os import re for svg in [file for file in os.listdir(os.getcwd()) if '.svg' in file]: file_path = '{}/{}'.format(os.getcwd(), svg) with open (file_path, 'r', encoding='utf-8') as svg_file: content = svg_file.read() target = re.search('fill=".*?"', content) if target != None: ...
38.642857
72
0.578558
import os import re for svg in [file for file in os.listdir(os.getcwd()) if '.svg' in file]: file_path = '{}/{}'.format(os.getcwd(), svg) with open (file_path, 'r', encoding='utf-8') as svg_file: content = svg_file.read() target = re.search('fill=".*?"', content) if target != None: ...
0
0
0
86bcb532ed51c6b1843ed22a561ca6db0f664b44
246
py
Python
util.py
mabruckner/rsstastic
ae00deb9bf9276df5b41be9d95b221c13ba7bf7e
[ "MIT" ]
null
null
null
util.py
mabruckner/rsstastic
ae00deb9bf9276df5b41be9d95b221c13ba7bf7e
[ "MIT" ]
null
null
null
util.py
mabruckner/rsstastic
ae00deb9bf9276df5b41be9d95b221c13ba7bf7e
[ "MIT" ]
null
null
null
import base64
20.5
57
0.727642
import base64 def b64_to_key(data): return base64.urlsafe_b64decode(data).decode('ascii') def key_to_b64(key): return base64.urlsafe_b64encode(key.encode('ascii')) def get_url(key): return '/item/'+key_to_b64(key).decode('ascii')
162
0
69
cf2818a4a563783db22a4d4eba9f7f379db5d084
419
py
Python
decorators.py
oramirezperera/closures
17aa68642448eaa607872e871d8785ecdfe23d8b
[ "MIT" ]
null
null
null
decorators.py
oramirezperera/closures
17aa68642448eaa607872e871d8785ecdfe23d8b
[ "MIT" ]
null
null
null
decorators.py
oramirezperera/closures
17aa68642448eaa607872e871d8785ecdfe23d8b
[ "MIT" ]
null
null
null
from datetime import datetime @execution_time random_func()
22.052632
88
0.653938
from datetime import datetime def execution_time(func): def wrapper(): initial_time = datetime.now() func() final_time = datetime.now() time_elapsed = final_time - initial_time print('The execution time was ' + str(time_elapsed.total_seconds()) + 'seconds') return wrappe...
311
0
45
44016d8febc11f65a98a21222676ac994b234bb7
5,863
py
Python
pyzoo/zoo/chronos/model/prophet.py
cabuliwallah/analytics-zoo
5e662bd01c5fc7eed412973119594cf2ecea8b11
[ "Apache-2.0" ]
1
2021-06-16T11:42:32.000Z
2021-06-16T11:42:32.000Z
pyzoo/zoo/chronos/model/prophet.py
cabuliwallah/analytics-zoo
5e662bd01c5fc7eed412973119594cf2ecea8b11
[ "Apache-2.0" ]
null
null
null
pyzoo/zoo/chronos/model/prophet.py
cabuliwallah/analytics-zoo
5e662bd01c5fc7eed412973119594cf2ecea8b11
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Analytics Zoo Authors. # # 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 i...
40.157534
99
0.656149
# Copyright 2018 Analytics Zoo Authors. # # 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 i...
367
4,627
46
450ca3987d19aeeb31e66048ea9f05f4707a6a4e
2,182
py
Python
mdptools/utils/highlight.py
mholdg16/py-mdptools
ae986edc2097e97cb73331d66f0051ca9f5bd15c
[ "MIT" ]
1
2021-12-15T13:22:48.000Z
2021-12-15T13:22:48.000Z
mdptools/utils/highlight.py
mholdg16/py-mdptools
ae986edc2097e97cb73331d66f0051ca9f5bd15c
[ "MIT" ]
2
2021-11-09T23:43:48.000Z
2021-11-13T20:41:12.000Z
mdptools/utils/highlight.py
mholdg16/py-mdptools
ae986edc2097e97cb73331d66f0051ca9f5bd15c
[ "MIT" ]
null
null
null
# pylint: disable=too-few-public-methods,missing-docstring highlight = Highlight()
22.968421
58
0.579285
# pylint: disable=too-few-public-methods,missing-docstring class COLORS_ENABLED: RESET = "\033[0m" BOLD = "\033[01m" BLACK = "\033[30m" RED = "\033[31m" GREEN = "\033[32m" ORANGE = "\033[33m" BLUE = "\033[34m" PURPLE = "\033[35m" CYAN = "\033[36m" LIGHTGREY = "\033[37m" DARK...
940
683
472
ef71623e2adac2944868d6fb2d5158e9f125310e
35,571
py
Python
interpro7dw/ebi/interpro/ftp/xmlfiles.py
ProteinsWebTeam/interpro7-dw
5ff1886bb767964658574bd39b812d822a894163
[ "Apache-2.0" ]
null
null
null
interpro7dw/ebi/interpro/ftp/xmlfiles.py
ProteinsWebTeam/interpro7-dw
5ff1886bb767964658574bd39b812d822a894163
[ "Apache-2.0" ]
1
2020-08-14T23:15:24.000Z
2020-08-14T23:15:24.000Z
interpro7dw/ebi/interpro/ftp/xmlfiles.py
ProteinsWebTeam/interpro7-dw
5ff1886bb767964658574bd39b812d822a894163
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import json import gzip import math import multiprocessing as mp import os import re import shutil from tempfile import mkstemp from typing import Optional, Sequence from xml.dom.minidom import getDOMImplementation, parseString from xml.parsers.expat import ExpatError import cx_Oracle import M...
39.132013
79
0.519103
# -*- coding: utf-8 -*- import json import gzip import math import multiprocessing as mp import os import re import shutil from tempfile import mkstemp from typing import Optional, Sequence from xml.dom.minidom import getDOMImplementation, parseString from xml.parsers.expat import ExpatError import cx_Oracle import M...
34,377
0
230
6857bd448442ddfa8d293e203ac7bc287e7f8c42
4,119
py
Python
code/plotter_tests.py
twf2360/Newtons_Cradle
84cab9b81765146d1453a68ee0f50f2a7e511c6b
[ "MIT" ]
null
null
null
code/plotter_tests.py
twf2360/Newtons_Cradle
84cab9b81765146d1453a68ee0f50f2a7e511c6b
[ "MIT" ]
null
null
null
code/plotter_tests.py
twf2360/Newtons_Cradle
84cab9b81765146d1453a68ee0f50f2a7e511c6b
[ "MIT" ]
null
null
null
import pytest import math import numpy as np from ball import ball import matplotlib.pyplot as plt import copy from itertools import combinations import sys import pandas as pd from calculator import calculator import json import dataframes from plotter import plotter from random import random ''' in order...
41.606061
190
0.704783
import pytest import math import numpy as np from ball import ball import matplotlib.pyplot as plt import copy from itertools import combinations import sys import pandas as pd from calculator import calculator import json import dataframes from plotter import plotter from random import random ''' in order...
548
0
23
c67414731c3470e8d42acae5cbdf0fa8ded1e0a9
676
py
Python
example/functions/add.py
osblinnikov/pytorch-binary
61842542c94766ffa21b0fa3ea86a435f802b95f
[ "MIT" ]
293
2018-08-17T14:29:28.000Z
2022-02-28T12:35:48.000Z
example/functions/add.py
osblinnikov/pytorch-binary
61842542c94766ffa21b0fa3ea86a435f802b95f
[ "MIT" ]
1
2018-08-21T14:48:38.000Z
2018-08-21T14:48:38.000Z
example/functions/add.py
osblinnikov/pytorch-binary
61842542c94766ffa21b0fa3ea86a435f802b95f
[ "MIT" ]
70
2018-08-21T03:39:38.000Z
2022-03-01T07:21:08.000Z
# functions/add.py import torch from torch.autograd import Function from _ext import my_lib
29.391304
68
0.674556
# functions/add.py import torch from torch.autograd import Function from _ext import my_lib class MyAddFunction(Function): def forward(self, input1, input2): output = input1.new() if not input1.is_cuda: my_lib.my_lib_add_forward(input1, input2, output) else: my_lib....
498
9
76