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
5e2907c997b123a57a2d0532e669720b4b164172
1,445
py
Python
src/runserver.py
MattGong/flask-apscheduler
7ee070cdc854f094c44a4a22defa0d6be846f90a
[ "BSD-3-Clause" ]
null
null
null
src/runserver.py
MattGong/flask-apscheduler
7ee070cdc854f094c44a4a22defa0d6be846f90a
[ "BSD-3-Clause" ]
null
null
null
src/runserver.py
MattGong/flask-apscheduler
7ee070cdc854f094c44a4a22defa0d6be846f90a
[ "BSD-3-Clause" ]
1
2019-08-29T02:46:08.000Z
2019-08-29T02:46:08.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # ************************************************************************** # Copyright © 2017 jianglin # File Name: runserver.py # Author: jianglin # Email: xiyang0807@gmail.com # Created: 2017-02-02 09:18:53 (CST) # Last Update:星期四 2017-2-16 22:19:49 (CST) # By:...
23.306452
76
0.586159
#!/usr/bin/env python # -*- coding: utf-8 -*- # ************************************************************************** # Copyright © 2017 jianglin # File Name: runserver.py # Author: jianglin # Email: xiyang0807@gmail.com # Created: 2017-02-02 09:18:53 (CST) # Last Update:星期四 2017-2-16 22:19:49 (CST) # By:...
0
484
23
9d614223b6e12612bcebc6423666803c0620567f
522
py
Python
1day/Str08.py
jsjang93/joony
62f7a325094c887212b894932263bf84500e0f03
[ "MIT" ]
null
null
null
1day/Str08.py
jsjang93/joony
62f7a325094c887212b894932263bf84500e0f03
[ "MIT" ]
null
null
null
1day/Str08.py
jsjang93/joony
62f7a325094c887212b894932263bf84500e0f03
[ "MIT" ]
null
null
null
# Str08.py # a1 a2 a3 a4;print(a1, a2, a3, a4) --> Java, C, SQL, Python a1, a2, a3, a4 = 'Java,C,SQL,Python'.split(',') print(a1, a2, a3, a4) b = ['H', 'e', 'l', 'l', 'o'] b = ''.join(b) print(b) a = '' for i in range(0,len(b)): a += b[i] print(a) print('안녕하세요', sep=' ', end='\n') print('안녕하세요', end='') ...
17.4
63
0.482759
# Str08.py # a1 a2 a3 a4;print(a1, a2, a3, a4) --> Java, C, SQL, Python a1, a2, a3, a4 = 'Java,C,SQL,Python'.split(',') print(a1, a2, a3, a4) b = ['H', 'e', 'l', 'l', 'o'] b = ''.join(b) print(b) a = '' for i in range(0,len(b)): a += b[i] print(a) print('안녕하세요', sep=' ', end='\n') print('안녕하세요', end='') ...
0
0
0
89cdd4ec798c3aebc5495f281a35b636986bfa2f
766
py
Python
problems/test_0071.py
chrisxue815/leetcode_python
dec3c160d411a5c19dc8e9d96e7843f0e4c36820
[ "Unlicense" ]
1
2017-06-17T23:47:17.000Z
2017-06-17T23:47:17.000Z
problems/test_0071.py
chrisxue815/leetcode_python
dec3c160d411a5c19dc8e9d96e7843f0e4c36820
[ "Unlicense" ]
null
null
null
problems/test_0071.py
chrisxue815/leetcode_python
dec3c160d411a5c19dc8e9d96e7843f0e4c36820
[ "Unlicense" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
21.277778
47
0.449086
import unittest class Solution: def simplifyPath(self, path): """ :type path: str :rtype: str """ stack = [] for p in path.split('/'): if p == '..': if stack: stack.pop() elif p and p != '.': ...
254
346
99
d123323759b4f192c0f3ad0169dab4a3fa0d5224
309
py
Python
src/mockkeys.py
ChrisPickard/expando
fb4a01e6399994ef910aa58da2bff82600fb55fb
[ "MIT" ]
1
2015-03-04T18:01:53.000Z
2015-03-04T18:01:53.000Z
src/mockkeys.py
ChrisPickard/expando
fb4a01e6399994ef910aa58da2bff82600fb55fb
[ "MIT" ]
null
null
null
src/mockkeys.py
ChrisPickard/expando
fb4a01e6399994ef910aa58da2bff82600fb55fb
[ "MIT" ]
null
null
null
import msgpackrpc from core.expando import ExpandoServer ADDR = SERVER = THREAD = None (ADDR, SERVER, THREAD) = ExpandoServer().serve() client = msgpackrpc.Client(ADDR, unpack_encoding='utf-8') client.call('add_expansion', u'esc', u'a vim user I see') action = client.call('expand', u'esc') print(action)
23.769231
57
0.731392
import msgpackrpc from core.expando import ExpandoServer ADDR = SERVER = THREAD = None (ADDR, SERVER, THREAD) = ExpandoServer().serve() client = msgpackrpc.Client(ADDR, unpack_encoding='utf-8') client.call('add_expansion', u'esc', u'a vim user I see') action = client.call('expand', u'esc') print(action)
0
0
0
004dea4a740ccca409afaaa19b3705d3b398bd68
411
py
Python
rmon/views/urls.py
xizhongzhao/rmon
e7123e9f60a98cc26f34a89a2cd6d9df59937736
[ "BSD-3-Clause" ]
null
null
null
rmon/views/urls.py
xizhongzhao/rmon
e7123e9f60a98cc26f34a89a2cd6d9df59937736
[ "BSD-3-Clause" ]
null
null
null
rmon/views/urls.py
xizhongzhao/rmon
e7123e9f60a98cc26f34a89a2cd6d9df59937736
[ "BSD-3-Clause" ]
null
null
null
""" the urls of rmon.views """ from flask import Blueprint from rmon.views.index import IndexView from rmon.views.server import ServerList,ServerDetail api = Blueprint('api',__name__) api.add_url_rule('/',view_func=IndexView.as_view('index')) api.add_url_rule('/servers/',view_func=ServerList.as_view('server_list')) ap...
41.1
92
0.788321
""" the urls of rmon.views """ from flask import Blueprint from rmon.views.index import IndexView from rmon.views.server import ServerList,ServerDetail api = Blueprint('api',__name__) api.add_url_rule('/',view_func=IndexView.as_view('index')) api.add_url_rule('/servers/',view_func=ServerList.as_view('server_list')) ap...
0
0
0
91ec81f104c484bd3e0eb44610131712acde57d8
1,128
py
Python
WeChatTools/Utils/MailHelper.py
TitusWongCN/WeChatRelativeTools
9307bae8c15e47b5bbf169a95a50be0d107a5bb1
[ "MIT" ]
null
null
null
WeChatTools/Utils/MailHelper.py
TitusWongCN/WeChatRelativeTools
9307bae8c15e47b5bbf169a95a50be0d107a5bb1
[ "MIT" ]
null
null
null
WeChatTools/Utils/MailHelper.py
TitusWongCN/WeChatRelativeTools
9307bae8c15e47b5bbf169a95a50be0d107a5bb1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # encoding: utf-8 import smtplib from email.mime.text import MIMEText from email.utils import formataddr if __name__ == "__main__": mh = MailHelper('shaoz-he@outlook.com', '1992wen1031') mh.sendmail('wzhwno1@163.com,863501159@qq.com, ', 'Python发送邮件', '这只是一个测试邮件,请不要回复!')
36.387097
99
0.628546
# -*- coding: utf-8 -*- # encoding: utf-8 import smtplib from email.mime.text import MIMEText from email.utils import formataddr class MailHelper: def __init__(self, username, password): self.username = username self.password = password def sendmail(self, mail_to, subject, content): ...
946
-4
76
438f9b2c169da028386555c1694bdf805d291af9
4,504
py
Python
setup_softras.py
aimagelab/MCMR
eb3556bffebc734c19e7f3e39dcf018ba28c63b3
[ "MIT" ]
11
2021-10-11T12:48:47.000Z
2022-03-01T02:00:00.000Z
setup_softras.py
aimagelab/MCMR
eb3556bffebc734c19e7f3e39dcf018ba28c63b3
[ "MIT" ]
1
2022-01-19T00:47:58.000Z
2022-01-23T14:52:45.000Z
setup_softras.py
aimagelab/MCMR
eb3556bffebc734c19e7f3e39dcf018ba28c63b3
[ "MIT" ]
1
2022-02-08T14:53:54.000Z
2022-02-08T14:53:54.000Z
from setuptools import setup, find_packages from torch.utils.cpp_extension import BuildExtension, CUDAExtension CUDA_FLAGS = [] ext_modules=[ CUDAExtension('soft_renderer.cuda.load_textures', [ 'soft_renderer/cuda/load_textures_cuda.cpp', 'soft_renderer/cuda/load_textures_cuda_kernel.cu', ...
45.04
91
0.616785
from setuptools import setup, find_packages from torch.utils.cpp_extension import BuildExtension, CUDAExtension CUDA_FLAGS = [] ext_modules=[ CUDAExtension('soft_renderer.cuda.load_textures', [ 'soft_renderer/cuda/load_textures_cuda.cpp', 'soft_renderer/cuda/load_textures_cuda_kernel.cu', ...
0
0
0
68e313981999b7b65068787cd4afed28643400e1
3,129
py
Python
generate_fake_csv.py
sandbernar/anti-corona-crm
e896a2dd0f41d099f7800769badf78e5e521d39a
[ "MIT" ]
null
null
null
generate_fake_csv.py
sandbernar/anti-corona-crm
e896a2dd0f41d099f7800769badf78e5e521d39a
[ "MIT" ]
null
null
null
generate_fake_csv.py
sandbernar/anti-corona-crm
e896a2dd0f41d099f7800769badf78e5e521d39a
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from random import randrange from datetime import timedelta from datetime import datetime import random import string from faker import Faker countries = ["Казахстан", "Россия", "Италия", "Германия", "Китай", "США"] regions = ["Алматы", "Нур-Султан", "Шымкент"] choices = ["да", "...
41.171053
392
0.627037
import pandas as pd import numpy as np from random import randrange from datetime import timedelta from datetime import datetime import random import string from faker import Faker countries = ["Казахстан", "Россия", "Италия", "Германия", "Китай", "США"] regions = ["Алматы", "Нур-Султан", "Шымкент"] choices = ["да", "...
2,450
0
23
2047475e0393f0ac9c79e72b35804525602caac9
996
py
Python
scripts/step-by-step/nearest_neighbor.py
schwille-paint/lbFCS2
06dc47b32128f3455f275c39794a6aaf9ffbe5b9
[ "MIT" ]
null
null
null
scripts/step-by-step/nearest_neighbor.py
schwille-paint/lbFCS2
06dc47b32128f3455f275c39794a6aaf9ffbe5b9
[ "MIT" ]
null
null
null
scripts/step-by-step/nearest_neighbor.py
schwille-paint/lbFCS2
06dc47b32128f3455f275c39794a6aaf9ffbe5b9
[ "MIT" ]
null
null
null
import os import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy import spatial import picasso.io as io ### High density data dir_name = '/fs/pool/pool-schwille-paint/Data/p17.lbFCS2/20-12-09_N1_T23_ibidi_cseries/21-01-19_FS_id180' file_name = 'ibidi_id180_Pm2-05nM_p40uW_1_MMStack_Pos0.ome...
31.125
117
0.771084
import os import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy import spatial import picasso.io as io ### High density data dir_name = '/fs/pool/pool-schwille-paint/Data/p17.lbFCS2/20-12-09_N1_T23_ibidi_cseries/21-01-19_FS_id180' file_name = 'ibidi_id180_Pm2-05nM_p40uW_1_MMStack_Pos0.ome...
0
0
0
28ded526ec050f99dd29f1e5456a8c439be25a61
1,911
py
Python
examples/python3-base64-filtering.py
alexmv/go-camo
7ff92356b0d4da5d38b60ebd32a18959770bef2b
[ "MIT" ]
161
2015-03-07T13:11:23.000Z
2022-03-29T11:52:06.000Z
examples/python3-base64-filtering.py
alexmv/go-camo
7ff92356b0d4da5d38b60ebd32a18959770bef2b
[ "MIT" ]
42
2017-01-04T04:58:52.000Z
2022-03-29T04:09:40.000Z
examples/python3-base64-filtering.py
alexmv/go-camo
7ff92356b0d4da5d38b60ebd32a18959770bef2b
[ "MIT" ]
42
2015-01-27T10:40:33.000Z
2022-03-29T11:55:01.000Z
# Copyright (c) 2012-2019 Eli Janssen # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file. # this example shows how filtering can be done on the url generation side. # this example through https urls (no proxying required), and only allows http # requests over port 80....
39
114
0.722135
# Copyright (c) 2012-2019 Eli Janssen # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file. # this example shows how filtering can be done on the url generation side. # this example through https urls (no proxying required), and only allows http # requests over port 80....
996
0
23
032ef17d36e166cb50b8305092453a3629772ac1
381
py
Python
Darlington/phase1/python Basic 2/day 27 solution/qtn2.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
Darlington/phase1/python Basic 2/day 27 solution/qtn2.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
Darlington/phase1/python Basic 2/day 27 solution/qtn2.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
#program to create a new string with no duplicate consecutive letters from a given string. print(no_consecutive_letters("PPYYYTTHON")) print(no_consecutive_letters("PPyyythonnn")) print(no_consecutive_letters("Java")) print(no_consecutive_letters("PPPHHHPPP"))
47.625
90
0.76378
#program to create a new string with no duplicate consecutive letters from a given string. def no_consecutive_letters (txt): return txt[0] + ''.join(txt[i] for i in range(1,len(txt)) if txt[i] != txt[i-1]) print(no_consecutive_letters("PPYYYTTHON")) print(no_consecutive_letters("PPyyythonnn")) print(no_consecutive...
97
0
22
d6f297d326b2abd001c99188bf171a056b5c5804
3,321
py
Python
src/reference/API.py
Limespy/interp-compression
612d3bde77459d280fd84fc45aaf8dc4a282edbe
[ "MIT" ]
null
null
null
src/reference/API.py
Limespy/interp-compression
612d3bde77459d280fd84fc45aaf8dc4a282edbe
[ "MIT" ]
null
null
null
src/reference/API.py
Limespy/interp-compression
612d3bde77459d280fd84fc45aaf8dc4a282edbe
[ "MIT" ]
null
null
null
import sys import pathlib import numpy as np from collections import namedtuple from scipy import interpolate import math path_package = pathlib.Path(__file__).parent.absolute() sys.path.insert(1,str(path_package.parent)) import API as compression #%%══════════════════════════════════════════════════════════════════...
38.172414
93
0.450166
import sys import pathlib import numpy as np from collections import namedtuple from scipy import interpolate import math path_package = pathlib.Path(__file__).parent.absolute() sys.path.insert(1,str(path_package.parent)) import API as compression #%%══════════════════════════════════════════════════════════════════...
1,446
0
184
37feb10697ba81d8a3b0a560aa8c901a1e1e7d22
191
py
Python
office365/teams/shifts/shift.py
theodoriss/Office365-REST-Python-Client
3bd7a62dadcd3f0a0aceeaff7584fff3fd44886e
[ "MIT" ]
544
2016-08-04T17:10:16.000Z
2022-03-31T07:17:20.000Z
office365/teams/shifts/shift.py
theodoriss/Office365-REST-Python-Client
3bd7a62dadcd3f0a0aceeaff7584fff3fd44886e
[ "MIT" ]
438
2016-10-11T12:24:22.000Z
2022-03-31T19:30:35.000Z
office365/teams/shifts/shift.py
theodoriss/Office365-REST-Python-Client
3bd7a62dadcd3f0a0aceeaff7584fff3fd44886e
[ "MIT" ]
202
2016-08-22T19:29:40.000Z
2022-03-30T20:26:15.000Z
from office365.teams.shifts.change_tracked_entity import ChangeTrackedEntity class Shift(ChangeTrackedEntity): """ Represents a unit of scheduled work in a shifts. """ pass
21.222222
76
0.743455
from office365.teams.shifts.change_tracked_entity import ChangeTrackedEntity class Shift(ChangeTrackedEntity): """ Represents a unit of scheduled work in a shifts. """ pass
0
0
0
6d5c3e3574e5826f1110f971c2411ebdeb4fc8db
416
py
Python
leet/array/sortedSquares.py
Rahul-k25/python-cp-cheatsheet
17ea967f669e4992fba51b26accdd44a01aaac32
[ "Apache-2.0" ]
1
2021-12-16T10:31:50.000Z
2021-12-16T10:31:50.000Z
leet/array/sortedSquares.py
Rahul-k25/python-cp-cheatsheet
17ea967f669e4992fba51b26accdd44a01aaac32
[ "Apache-2.0" ]
null
null
null
leet/array/sortedSquares.py
Rahul-k25/python-cp-cheatsheet
17ea967f669e4992fba51b26accdd44a01aaac32
[ "Apache-2.0" ]
null
null
null
""" time: a space: a """
20.8
55
0.338942
""" time: a space: a """ class Solution: def sortedSquares(self, A: List[int]) -> List[int]: dq = deque() l = 0 r = len(A)-1 while l <= r: ls = A[l] ** 2 rs = A[r] ** 2 if ls >= rs: dq.appendleft(ls) l += 1 ...
337
-6
48
a359aa7158e69c42fc99384df0d7d144916f3d3a
14,438
py
Python
fzfaws/utils/pyfzf.py
kazhala/fawsf
4abefb2301f7b489b11ed3f0b303faafa5941d5b
[ "MIT" ]
66
2020-07-26T12:43:30.000Z
2022-01-25T12:09:40.000Z
fzfaws/utils/pyfzf.py
kazhala/fawsf
4abefb2301f7b489b11ed3f0b303faafa5941d5b
[ "MIT" ]
null
null
null
fzfaws/utils/pyfzf.py
kazhala/fawsf
4abefb2301f7b489b11ed3f0b303faafa5941d5b
[ "MIT" ]
3
2020-07-26T22:09:45.000Z
2020-07-28T01:09:26.000Z
"""This module contains the wrapper class to interacte with fzf. The fzf class should be used for all occasion when fzf needs to be launched. fzfaws comes with 4 fzf binary files and will be used if user doesn't specify to use system fzf in config file. """ import os import subprocess import sys from typing import Any...
36.185464
113
0.584707
"""This module contains the wrapper class to interacte with fzf. The fzf class should be used for all occasion when fzf needs to be launched. fzfaws comes with 4 fzf binary files and will be used if user doesn't specify to use system fzf in config file. """ import os import subprocess import sys from typing import Any...
0
0
0
33ed3c04845480a464b23ad1bb9cc1d4218a408d
2,239
py
Python
pytests/test_basics.py
RedisGears/GearsCli
5fd9b737ca2ace76fd2d055d70534a13d70fd94f
[ "BSD-3-Clause" ]
null
null
null
pytests/test_basics.py
RedisGears/GearsCli
5fd9b737ca2ace76fd2d055d70534a13d70fd94f
[ "BSD-3-Clause" ]
null
null
null
pytests/test_basics.py
RedisGears/GearsCli
5fd9b737ca2ace76fd2d055d70534a13d70fd94f
[ "BSD-3-Clause" ]
null
null
null
from gears_cli import run, install_requirements, export_requirements, import_requirements from click.testing import CliRunner from RLTest import Defaults import os Defaults.decode_responses = True SSL_ARGS = ['--ssl', 'True', '--ssl-keyfile', './tests/tls/redis.key', '--ssl-certfile', './tests/tls/redis.crt', '--ssl-...
38.603448
181
0.715498
from gears_cli import run, install_requirements, export_requirements, import_requirements from click.testing import CliRunner from RLTest import Defaults import os Defaults.decode_responses = True SSL_ARGS = ['--ssl', 'True', '--ssl-keyfile', './tests/tls/redis.key', '--ssl-certfile', './tests/tls/redis.crt', '--ssl-...
1,697
0
161
f9ade6541bd4aeb7043ea8596642a546b2787797
407
py
Python
app/stories/migrations/0011_auto_20200721_0002.py
Sherba/AdventureReader
011ead234118ab13ac1fbe969c00ef91e03d46f5
[ "MIT" ]
null
null
null
app/stories/migrations/0011_auto_20200721_0002.py
Sherba/AdventureReader
011ead234118ab13ac1fbe969c00ef91e03d46f5
[ "MIT" ]
7
2020-07-16T22:24:54.000Z
2022-03-12T00:41:13.000Z
app/stories/migrations/0011_auto_20200721_0002.py
Sherba/AdventureReader
011ead234118ab13ac1fbe969c00ef91e03d46f5
[ "MIT" ]
null
null
null
# Generated by Django 3.0.8 on 2020-07-20 22:02 from django.db import migrations, models
21.421053
73
0.604423
# Generated by Django 3.0.8 on 2020-07-20 22:02 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('stories', '0010_auto_20200721_0000'), ] operations = [ migrations.AlterField( model_name='post', name='genres', ...
0
293
23
49208b0427f5abd701b0fd26b72be005a1c9db85
191
py
Python
out/euler06.py
FardaleM/metalang
171557c540f3e2c051ec39ea150afb740c1f615f
[ "BSD-2-Clause" ]
22
2017-04-24T10:00:45.000Z
2021-04-01T10:11:05.000Z
out/euler06.py
FardaleM/metalang
171557c540f3e2c051ec39ea150afb740c1f615f
[ "BSD-2-Clause" ]
12
2017-03-26T18:34:21.000Z
2019-03-21T19:13:03.000Z
out/euler06.py
FardaleM/metalang
171557c540f3e2c051ec39ea150afb740c1f615f
[ "BSD-2-Clause" ]
7
2017-10-14T13:33:33.000Z
2021-03-18T15:18:50.000Z
import math lim = 100 sum = math.trunc(lim * (lim + 1) / 2) carressum = sum * sum sumcarres = math.trunc(lim * (lim + 1) * (2 * lim + 1) / 6) print("%d" % (carressum - sumcarres), end='')
19.1
59
0.570681
import math lim = 100 sum = math.trunc(lim * (lim + 1) / 2) carressum = sum * sum sumcarres = math.trunc(lim * (lim + 1) * (2 * lim + 1) / 6) print("%d" % (carressum - sumcarres), end='')
0
0
0
2fceddae65aa7e7fa4e4abb14a7fdbb4aa78387b
710
py
Python
rx/__init__.py
AlexMost/RxPY
05cb14c72806dc41e243789c05f498dede11cebd
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
rx/__init__.py
AlexMost/RxPY
05cb14c72806dc41e243789c05f498dede11cebd
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
rx/__init__.py
AlexMost/RxPY
05cb14c72806dc41e243789c05f498dede11cebd
[ "ECL-2.0", "Apache-2.0" ]
1
2021-11-04T11:13:49.000Z
2021-11-04T11:13:49.000Z
try: import asyncio except ImportError: try: import trollius as asyncio except ImportError: asyncio = None try: from threading import RLock as Lock except ImportError: from rx.internal.concurrency import NoLock as Lock try: from asyncio import Future except ImportError: try...
18.684211
54
0.714085
try: import asyncio except ImportError: try: import trollius as asyncio except ImportError: asyncio = None try: from threading import RLock as Lock except ImportError: from rx.internal.concurrency import NoLock as Lock try: from asyncio import Future except ImportError: try...
0
0
0
fab56e81604074a431e05bfba5b606021be545ec
6,355
py
Python
tensorpack/graph_builder/model_desc.py
ChenYuHo/tensorpack
8832ac869159e99ff77630cfbd0a850197003c05
[ "Apache-2.0" ]
null
null
null
tensorpack/graph_builder/model_desc.py
ChenYuHo/tensorpack
8832ac869159e99ff77630cfbd0a850197003c05
[ "Apache-2.0" ]
null
null
null
tensorpack/graph_builder/model_desc.py
ChenYuHo/tensorpack
8832ac869159e99ff77630cfbd0a850197003c05
[ "Apache-2.0" ]
1
2020-04-21T08:37:38.000Z
2020-04-21T08:37:38.000Z
# -*- coding: utf-8 -*- # File: model_desc.py from collections import namedtuple import tensorflow as tf from ..utils.argtools import memoized_method from ..tfutils.common import get_op_tensor_name from ..tfutils.tower import get_current_tower_context from ..compat import backport_tensor_spec, tfv1 TensorSpec = bac...
34.351351
119
0.634618
# -*- coding: utf-8 -*- # File: model_desc.py from collections import namedtuple import tensorflow as tf from ..utils.argtools import memoized_method from ..tfutils.common import get_op_tensor_name from ..tfutils.tower import get_current_tower_context from ..compat import backport_tensor_spec, tfv1 TensorSpec = bac...
78
0
26
04c3dcddb8836bfc98e1ac0a9aaba1b602e54917
2,672
py
Python
tinypkg/general_utils.py
palmhjell/tinypkg
4eb56bb0027ff3ef3abb9e7d249b47288a9a0f8d
[ "MIT" ]
null
null
null
tinypkg/general_utils.py
palmhjell/tinypkg
4eb56bb0027ff3ef3abb9e7d249b47288a9a0f8d
[ "MIT" ]
null
null
null
tinypkg/general_utils.py
palmhjell/tinypkg
4eb56bb0027ff3ef3abb9e7d249b47288a9a0f8d
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd def check_df_col(df, column, name=None): """ Checks for the presence of a column (or columns) in a tidy DataFrame with an informative error message. Passes silently, otherwise raises error. """ if column is not None: if type(column) != list: ...
35.626667
116
0.662425
import numpy as np import pandas as pd def check_df_col(df, column, name=None): """ Checks for the presence of a column (or columns) in a tidy DataFrame with an informative error message. Passes silently, otherwise raises error. """ if column is not None: if type(column) != list: ...
0
0
0
70900917eb9f212abfb35ca7d348fc71ab012206
678
py
Python
direct/single.py
hposborn/isoclassify
9be27b8d1400aff7b955c52968457d5edfe72585
[ "MIT" ]
null
null
null
direct/single.py
hposborn/isoclassify
9be27b8d1400aff7b955c52968457d5edfe72585
[ "MIT" ]
null
null
null
direct/single.py
hposborn/isoclassify
9be27b8d1400aff7b955c52968457d5edfe72585
[ "MIT" ]
null
null
null
import sys import ebf import numpy as np import scipy.interpolate import pdb import asfgrid from astropy.io import ascii from classify_direct import * dnumodel = asfgrid.Seism() bcmodel = h5py.File('bcgrid.h5', 'r') dustmodel = mwdust.Combined15() x=obsdata() x.addspec([5065.,-99.0,-0.1],[120.,0.0,0.2]) x.addsei...
24.214286
77
0.687316
import sys import ebf import numpy as np import scipy.interpolate import pdb import asfgrid from astropy.io import ascii from classify_direct import * dnumodel = asfgrid.Seism() bcmodel = h5py.File('bcgrid.h5', 'r') dustmodel = mwdust.Combined15() x=obsdata() x.addspec([5065.,-99.0,-0.1],[120.,0.0,0.2]) x.addsei...
0
0
0
8122843f4a95c75078a060dcdb0a5eeaef29582d
451
py
Python
app/preprocessor/mixins/kwargstodict.py
Wordseer/wordseer
a45102c1848c93360d3815187783756dc5e16156
[ "Unlicense" ]
38
2015-02-26T02:21:04.000Z
2022-02-03T16:29:00.000Z
app/preprocessor/mixins/kwargstodict.py
Wordseer/wordseer
a45102c1848c93360d3815187783756dc5e16156
[ "Unlicense" ]
106
2015-03-06T20:23:32.000Z
2016-10-04T21:46:51.000Z
app/preprocessor/mixins/kwargstodict.py
Wordseer/wordseer
a45102c1848c93360d3815187783756dc5e16156
[ "Unlicense" ]
18
2015-08-17T02:29:57.000Z
2022-02-03T16:29:30.000Z
""" A mixin to convert kwargs to attributes. """ class KwargsToDict(object): """This mixin converts kwargs passed to the constructor to attributes. """ def __init__(self, **kwargs): """When a class is created, automatically convert its kwargs to attributes. :param dict kwargs: The k...
28.1875
74
0.636364
""" A mixin to convert kwargs to attributes. """ class KwargsToDict(object): """This mixin converts kwargs passed to the constructor to attributes. """ def __init__(self, **kwargs): """When a class is created, automatically convert its kwargs to attributes. :param dict kwargs: The k...
0
0
0
b6791e75000767749141ef22168f4a7d6b883030
2,399
py
Python
shared/uce_utils.py
n-i-x/alu_auto_builder
c4d5e59ce1667742adb00ca08f5500243f551fcf
[ "FTL", "CNRI-Python", "Linux-OpenIB" ]
null
null
null
shared/uce_utils.py
n-i-x/alu_auto_builder
c4d5e59ce1667742adb00ca08f5500243f551fcf
[ "FTL", "CNRI-Python", "Linux-OpenIB" ]
null
null
null
shared/uce_utils.py
n-i-x/alu_auto_builder
c4d5e59ce1667742adb00ca08f5500243f551fcf
[ "FTL", "CNRI-Python", "Linux-OpenIB" ]
null
null
null
#!/usr/bin/env python3 import os import logging import time from shared import common_utils
27.574713
98
0.680283
#!/usr/bin/env python3 import os import logging import time from shared import common_utils def split_uce(input_path): logging.info('Splitting UCE file {0} into main section and save partition'.format(input_path)) data = common_utils.get_file_content(input_path, 'rb') squashfs_etc_data = data[:-4194304]...
2,090
0
207
32531edcccfc96703dcb9e839a58f299781940b1
1,828
py
Python
438.py
wilbertgeng/LeetCode_exercise
f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc
[ "MIT" ]
null
null
null
438.py
wilbertgeng/LeetCode_exercise
f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc
[ "MIT" ]
null
null
null
438.py
wilbertgeng/LeetCode_exercise
f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc
[ "MIT" ]
null
null
null
"""438. Find All Anagrams in a String"""
24.373333
95
0.335339
"""438. Find All Anagrams in a String""" class Solution(object): def findAnagrams(self, s, p): """ :type s: str :type p: str :rtype: List[int] ######## need = {} window = {} for char in p: need[char] = need.get(char, 0) + 1 left = ...
1,736
2
49
82fa6e74190d577507e6e635d6c9fbdd9bc6e456
24,498
py
Python
gui.py
tzaeru/NWNLauncher
1de07b4c503805134112c9e2010aa85b447eaf03
[ "WTFPL" ]
null
null
null
gui.py
tzaeru/NWNLauncher
1de07b4c503805134112c9e2010aa85b447eaf03
[ "WTFPL" ]
null
null
null
gui.py
tzaeru/NWNLauncher
1de07b4c503805134112c9e2010aa85b447eaf03
[ "WTFPL" ]
null
null
null
from tkinter import * from tkinter import ttk from threading import Thread import time import path_finder import os, subprocess from tkinter.filedialog import askdirectory import dependency_manager import config from PIL import Image, ImageTk import webbrowser import utilities import functools import version_c...
41.522034
161
0.73206
from tkinter import * from tkinter import ttk from threading import Thread import time import path_finder import os, subprocess from tkinter.filedialog import askdirectory import dependency_manager import config from PIL import Image, ImageTk import webbrowser import utilities import functools import version_c...
10,991
0
506
669aae83fe8440721ed2294593ce5747ed288a84
1,772
py
Python
tests/test_utils.py
adborden/openFEC
53a0a2b1a56292c5ca8e7a3185832baaed4a63d9
[ "CC0-1.0" ]
null
null
null
tests/test_utils.py
adborden/openFEC
53a0a2b1a56292c5ca8e7a3185832baaed4a63d9
[ "CC0-1.0" ]
null
null
null
tests/test_utils.py
adborden/openFEC
53a0a2b1a56292c5ca8e7a3185832baaed4a63d9
[ "CC0-1.0" ]
1
2020-03-04T00:21:16.000Z
2020-03-04T00:21:16.000Z
import unittest from flask import request from webargs import flaskparser from tests import factories from tests.common import ApiBaseTest from webservices import args from webservices import rest from webservices import sorting from webservices.common import models
34.745098
113
0.681151
import unittest from flask import request from webargs import flaskparser from tests import factories from tests.common import ApiBaseTest from webservices import args from webservices import rest from webservices import sorting from webservices.common import models class TestSort(ApiBaseTest): def test_singl...
1,326
20
154
abf15071a9b5c919b1e12a058199f758a4a686fe
8,058
py
Python
stage2_recall.py
antmachineintelligence/Feedback_1st
a8d201a7d91e967f3df508434f7969ca9f59d0d6
[ "MIT" ]
null
null
null
stage2_recall.py
antmachineintelligence/Feedback_1st
a8d201a7d91e967f3df508434f7969ca9f59d0d6
[ "MIT" ]
null
null
null
stage2_recall.py
antmachineintelligence/Feedback_1st
a8d201a7d91e967f3df508434f7969ca9f59d0d6
[ "MIT" ]
null
null
null
import pickle import math import numpy as np import pandas as pd from tqdm import tqdm df = pickle.load(open('./data/data_6model_offline712_online704_ensemble.pkl','rb')) train_df = pd.read_csv('./data/train.csv') IDS = train_df.id.unique() dic_off_map = df[['id','offset_mapping']].set_index('id')['offset_mapping']....
31.724409
132
0.596798
import pickle import math import numpy as np import pandas as pd from tqdm import tqdm df = pickle.load(open('./data/data_6model_offline712_online704_ensemble.pkl','rb')) train_df = pd.read_csv('./data/train.csv') IDS = train_df.id.unique() dic_off_map = df[['id','offset_mapping']].set_index('id')['offset_mapping']....
2,436
-8
94
b282d8a78adb495fe5daec0e1315f6df69bdca8c
9,652
py
Python
aiida/cmdline/commands/cmd_export.py
xorJane/aiida-core
5c120560fa4d82f1e193c66750efbf13453ac756
[ "MIT", "BSD-3-Clause" ]
null
null
null
aiida/cmdline/commands/cmd_export.py
xorJane/aiida-core
5c120560fa4d82f1e193c66750efbf13453ac756
[ "MIT", "BSD-3-Clause" ]
null
null
null
aiida/cmdline/commands/cmd_export.py
xorJane/aiida-core
5c120560fa4d82f1e193c66750efbf13453ac756
[ "MIT", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
39.557377
120
0.67126
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
0
0
0
1d75c312945351879fbbabbd1205cfd6352d5cc9
1,097
py
Python
tests/model/automation_test.py
aluc-nd/EmmaPython
7368b42ba7b4f1a3eff9fc8dc626551311b1e8de
[ "MIT" ]
10
2015-06-02T13:24:53.000Z
2021-07-16T15:03:45.000Z
tests/model/automation_test.py
aluc-nd/EmmaPython
7368b42ba7b4f1a3eff9fc8dc626551311b1e8de
[ "MIT" ]
11
2015-09-20T01:39:36.000Z
2021-04-14T13:06:25.000Z
tests/model/automation_test.py
aluc-nd/EmmaPython
7368b42ba7b4f1a3eff9fc8dc626551311b1e8de
[ "MIT" ]
12
2015-05-26T23:39:28.000Z
2021-03-15T07:42:48.000Z
from datetime import datetime import unittest from emma.model import SERIALIZED_DATETIME_ALT_FORMAT from emma import exceptions as ex from emma.model.account import Account from emma.model.automation import Workflow from tests.model import MockAdapter class WorkflowTest(unittest.TestCase): """ Tests for the...
29.648649
86
0.625342
from datetime import datetime import unittest from emma.model import SERIALIZED_DATETIME_ALT_FORMAT from emma import exceptions as ex from emma.model.account import Account from emma.model.automation import Workflow from tests.model import MockAdapter class WorkflowTest(unittest.TestCase): """ Tests for the...
138
0
27
bfcaabfc3210814edda553de0dd026b784d41afc
814
py
Python
app/db/init.py
haitwang-cloud/fastapi-alembic-sqlmodel-sample
a8b1e5b069e608702a209b64ddae3c8aff78db88
[ "Apache-2.0" ]
null
null
null
app/db/init.py
haitwang-cloud/fastapi-alembic-sqlmodel-sample
a8b1e5b069e608702a209b64ddae3c8aff78db88
[ "Apache-2.0" ]
null
null
null
app/db/init.py
haitwang-cloud/fastapi-alembic-sqlmodel-sample
a8b1e5b069e608702a209b64ddae3c8aff78db88
[ "Apache-2.0" ]
null
null
null
from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session from sqlalchemy.orm import sessionmaker from configparser import ConfigParser config = ConfigParser() config.read('config.ini') mysql_username = config.get('DATABASE', 'MYSQL_USER') mysql_pwd = config.get('DATABASE', 'MYSQL_PWD') mysql_ho...
25.4375
86
0.740786
from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session from sqlalchemy.orm import sessionmaker from configparser import ConfigParser config = ConfigParser() config.read('config.ini') mysql_username = config.get('DATABASE', 'MYSQL_USER') mysql_pwd = config.get('DATABASE', 'MYSQL_PWD') mysql_ho...
0
0
0
c83a4d2d9774d2b0b0ff8ef6af792ee2ff68be5d
7,475
py
Python
metrics/FP_KT.py
hahahahahzt/DP-Star
8ae5bc0f79b50445e7dfbef9bed54e55c4eafa11
[ "MIT" ]
null
null
null
metrics/FP_KT.py
hahahahahzt/DP-Star
8ae5bc0f79b50445e7dfbef9bed54e55c4eafa11
[ "MIT" ]
null
null
null
metrics/FP_KT.py
hahahahahzt/DP-Star
8ae5bc0f79b50445e7dfbef9bed54e55c4eafa11
[ "MIT" ]
null
null
null
import numpy as np import os pattern = ['Frequent_Pattern_init.txt', 'Frequent_Pattern_sd.txt'] path_list = ['../../data/Geolife Trajectories 1.3/Trajectories7000/', '../../data/Geolife Trajectories ' '1.3/sd/sd_final_MDL1100_ep0.1/', ...
37.189055
118
0.479732
import numpy as np import os pattern = ['Frequent_Pattern_init.txt', 'Frequent_Pattern_sd.txt'] path_list = ['../../data/Geolife Trajectories 1.3/Trajectories7000/', '../../data/Geolife Trajectories ' '1.3/sd/sd_final_MDL1100_ep0.1/', ...
118
0
25
7b3221f4336ece7c481983b28ea2e6003e6688ec
1,335
py
Python
talkpython/100-days-of-code-in-python/my_progress/test_day_012_gold_mining_back_of_envelope.py
djrgit/coursework
2a91da9b76cb1acbd12f3d8049f15d2e71f475a1
[ "MIT" ]
null
null
null
talkpython/100-days-of-code-in-python/my_progress/test_day_012_gold_mining_back_of_envelope.py
djrgit/coursework
2a91da9b76cb1acbd12f3d8049f15d2e71f475a1
[ "MIT" ]
null
null
null
talkpython/100-days-of-code-in-python/my_progress/test_day_012_gold_mining_back_of_envelope.py
djrgit/coursework
2a91da9b76cb1acbd12f3d8049f15d2e71f475a1
[ "MIT" ]
3
2018-08-13T23:14:22.000Z
2019-01-11T22:50:07.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from day_012_gold_mining_back_of_envelope import share_price_calc @pytest.fixture
26.176471
66
0.561049
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from day_012_gold_mining_back_of_envelope import share_price_calc class FakeData: def __init__(self, oz_per_yr=100000, price_per_oz=1750, aisc=900, exchange_rate=1.25, shrs_out=146250000, pe=10): self.oz_per_y...
1,097
-6
95
277d38e04f2185bba5121186177fa1464f6df88f
14,721
py
Python
vra_configure.py
Gayathri-muthu/ansible-module-chaperone
2af8a4c6188872d6a8d1517cdb8acf4796cf2c0b
[ "Apache-2.0" ]
11
2016-05-11T21:13:55.000Z
2019-02-26T14:15:15.000Z
vra_configure.py
Gayathri-muthu/ansible-module-chaperone
2af8a4c6188872d6a8d1517cdb8acf4796cf2c0b
[ "Apache-2.0" ]
7
2016-03-25T18:38:01.000Z
2019-02-13T19:26:09.000Z
vra_configure.py
Gayathri-muthu/ansible-module-chaperone
2af8a4c6188872d6a8d1517cdb8acf4796cf2c0b
[ "Apache-2.0" ]
16
2016-01-12T21:48:22.000Z
2019-04-29T22:50:13.000Z
#!/usr/bin/python __author__ = 'smetta' # Import the module import sys import os import socket import json import httplib import sys import base64 import ssl import sys import xml.etree.ElementTree as ET import xml.dom.minidom as minidom DOCUMENTATION = ''' --- module: vra_configure.py Short_description: Module for co...
46.585443
336
0.586917
#!/usr/bin/python __author__ = 'smetta' # Import the module import sys import os import socket import json import httplib import sys import base64 import ssl import sys import xml.etree.ElementTree as ET import xml.dom.minidom as minidom DOCUMENTATION = ''' --- module: vra_configure.py Short_description: Module for co...
12,118
-3
230
a7d1a3bb4ab5305f986f0cff5d397d3d1c2cd443
1,833
py
Python
app/models.py
Swanand01/collab-edit
53f5636f0f59303313825ce57cae1e77d713e661
[ "MIT" ]
1
2021-12-02T07:16:00.000Z
2021-12-02T07:16:00.000Z
app/models.py
Swanand01/collab-code
53f5636f0f59303313825ce57cae1e77d713e661
[ "MIT" ]
null
null
null
app/models.py
Swanand01/collab-code
53f5636f0f59303313825ce57cae1e77d713e661
[ "MIT" ]
null
null
null
from django.contrib.auth.base_user import AbstractBaseUser from django.db import models from django.contrib.auth.base_user import BaseUserManager from django.contrib.auth.models import PermissionsMixin
30.04918
75
0.678669
from django.contrib.auth.base_user import AbstractBaseUser from django.db import models from django.contrib.auth.base_user import BaseUserManager from django.contrib.auth.models import PermissionsMixin class CustomUserManager(BaseUserManager): use_in_migrations = True def create_user(self, user_name, passwor...
52
1,507
69
d5b9379024102fc747fb78d26ada6b5b4216e21c
6,756
py
Python
facebook_business/adobjects/productfeedupload.py
s-nez/facebook-python-business-sdk
4766644c7585d2e262463862f8aae26d5bea2615
[ "CNRI-Python" ]
1
2020-05-10T20:53:02.000Z
2020-05-10T20:53:02.000Z
facebook_business/adobjects/productfeedupload.py
s-nez/facebook-python-business-sdk
4766644c7585d2e262463862f8aae26d5bea2615
[ "CNRI-Python" ]
null
null
null
facebook_business/adobjects/productfeedupload.py
s-nez/facebook-python-business-sdk
4766644c7585d2e262463862f8aae26d5bea2615
[ "CNRI-Python" ]
1
2018-09-24T14:04:48.000Z
2018-09-24T14:04:48.000Z
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
37.120879
115
0.655861
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
3,647
1,498
23
d4d9136b9fb7c4c7d9cc15f7b983fe966ba1024d
2,804
py
Python
core/data/info.py
google-research/runtime-error-prediction
1eefe57183434a754171dd3db893831d45d12671
[ "Apache-2.0" ]
10
2022-03-09T13:24:35.000Z
2022-03-14T20:29:15.000Z
core/data/info.py
google-research/runtime-error-prediction
1eefe57183434a754171dd3db893831d45d12671
[ "Apache-2.0" ]
null
null
null
core/data/info.py
google-research/runtime-error-prediction
1eefe57183434a754171dd3db893831d45d12671
[ "Apache-2.0" ]
2
2022-03-09T13:25:07.000Z
2022-03-10T18:25:50.000Z
# Copyright (C) 2021 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
30.813187
86
0.736448
# Copyright (C) 2021 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
1,798
140
68
31ba468c74f3e737cab1d7ba6201842e0df7e1f9
3,247
py
Python
atlassian/hip_chat.py
erichaase/atlassian
cac744b27a19dda02caf8e81fad615e0f2ecc9b7
[ "MIT" ]
1
2017-01-03T02:42:05.000Z
2017-01-03T02:42:05.000Z
atlassian/hip_chat.py
erichaase/atlassian
cac744b27a19dda02caf8e81fad615e0f2ecc9b7
[ "MIT" ]
null
null
null
atlassian/hip_chat.py
erichaase/atlassian
cac744b27a19dda02caf8e81fad615e0f2ecc9b7
[ "MIT" ]
null
null
null
import collections import json import re import urllib from bs4 import BeautifulSoup import HTMLParser def get_properties (message): """ Processes a given chat message to identify particular properties: mentions, emoticons and links. See the README.md file for more detailed documentation. Args: ...
35.293478
98
0.59963
import collections import json import re import urllib from bs4 import BeautifulSoup import HTMLParser def get_properties (message): """ Processes a given chat message to identify particular properties: mentions, emoticons and links. See the README.md file for more detailed documentation. Args: ...
0
0
0
b24563c9f07e1956e60e75de386432128f16030b
875
py
Python
useful_tools/ping.py
Westwood-Robotics/PyBEAR-WR
d0a1ecbe03d42821034b2e07fae6df6eaf7eb053
[ "Apache-2.0" ]
1
2020-12-18T00:14:49.000Z
2020-12-18T00:14:49.000Z
useful_tools/ping.py
Westwood-Robotics/PyBEAR-WR
d0a1ecbe03d42821034b2e07fae6df6eaf7eb053
[ "Apache-2.0" ]
3
2020-11-30T07:50:57.000Z
2021-02-22T20:17:04.000Z
useful_tools/ping.py
Westwood-Robotics/PyBEAR-WR
d0a1ecbe03d42821034b2e07fae6df6eaf7eb053
[ "Apache-2.0" ]
2
2020-12-29T04:29:12.000Z
2021-03-11T19:24:01.000Z
#!usr/bin/env python __author__ = "Xiaoguang Zhang" __email__ = "xzhang@westwoodrobotics.io" __copyright__ = "Copyright 2020 Westwood Robotics" __date__ = "Jan 8, 2021" __version__ = "0.1.2" __status__ = "Production" # Ping and search for available BEARs from pybear import Manager # Define port and baud rate bear_por...
25.735294
88
0.691429
#!usr/bin/env python __author__ = "Xiaoguang Zhang" __email__ = "xzhang@westwoodrobotics.io" __copyright__ = "Copyright 2020 Westwood Robotics" __date__ = "Jan 8, 2021" __version__ = "0.1.2" __status__ = "Production" # Ping and search for available BEARs from pybear import Manager # Define port and baud rate bear_por...
0
0
0
35010df4594d63c16d1206457c94fc35d70585f9
5,629
py
Python
belleflopt/tests/test_base_benefit.py
ucd-cws/eflows_optimization
2eb9f13a042ab81541488358ad0724555a5d57fc
[ "MIT" ]
2
2020-04-19T04:05:51.000Z
2021-04-19T02:47:40.000Z
belleflopt/tests/test_base_benefit.py
ucd-cws/eflows_optimization
2eb9f13a042ab81541488358ad0724555a5d57fc
[ "MIT" ]
7
2019-08-31T05:57:30.000Z
2019-11-27T23:58:13.000Z
belleflopt/tests/test_base_benefit.py
ucd-cws/eflows_optimization
2eb9f13a042ab81541488358ad0724555a5d57fc
[ "MIT" ]
null
null
null
from django.test import TestCase import seaborn import pandas from matplotlib import pyplot as plt from belleflopt import benefit, models, load
53.103774
133
0.599218
from django.test import TestCase import seaborn import pandas from matplotlib import pyplot as plt from belleflopt import benefit, models, load class TestPeakBenefit(TestCase): def setUp(self): self.goodyears_bar = 8058513 # set up the DB load.load_flow_components() load.load_flow_metrics() gy_segment =...
5,377
11
94
d96c1dc3eb9050e3767c3f86f7da1071bf2d44f8
2,029
py
Python
dataset/dataset.py
avi33/StyleMelGan-Unofficial
5a7cc99eb0feb8ef443a54d9e8dc3dca95e03b3b
[ "MIT" ]
22
2021-03-26T14:25:22.000Z
2022-01-24T16:26:16.000Z
dataset/dataset.py
avi33/StyleMelGan-Unofficial
5a7cc99eb0feb8ef443a54d9e8dc3dca95e03b3b
[ "MIT" ]
1
2021-10-13T03:11:56.000Z
2021-10-13T05:11:21.000Z
dataset/dataset.py
avi33/StyleMelGan-Unofficial
5a7cc99eb0feb8ef443a54d9e8dc3dca95e03b3b
[ "MIT" ]
1
2022-01-24T16:26:20.000Z
2022-01-24T16:26:20.000Z
import torch import torchaudio import torch.utils.data import torch.nn.functional as F from librosa.core import load, resample from librosa.util import normalize from pathlib import Path import numpy as np import random from modules.helper_functions import files_to_list from dataset.audio_augs import AudioAugs class ...
34.389831
86
0.656974
import torch import torchaudio import torch.utils.data import torch.nn.functional as F from librosa.core import load, resample from librosa.util import normalize from pathlib import Path import numpy as np import random from modules.helper_functions import files_to_list from dataset.audio_augs import AudioAugs class ...
1,085
0
81
915b99e6ec1d6cb4641d8032fa188c61006dfbb3
1,759
py
Python
ppocr/losses/ace_loss.py
edencfc/PaddleOCR
82c5966a642d07f99502d779c70a707fe3edbcb0
[ "Apache-2.0" ]
4
2021-07-29T13:57:22.000Z
2022-03-21T09:47:53.000Z
ppocr/losses/ace_loss.py
tenDay22/PaddleOCR
ca44e5766919b61b0e88513d62b551397703be2c
[ "Apache-2.0" ]
1
2020-12-21T06:06:45.000Z
2020-12-21T06:06:45.000Z
ppocr/losses/ace_loss.py
tenDay22/PaddleOCR
ca44e5766919b61b0e88513d62b551397703be2c
[ "Apache-2.0" ]
1
2022-03-29T07:09:25.000Z
2022-03-29T07:09:25.000Z
# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # 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 applica...
33.188679
74
0.675952
# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # 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 applica...
858
3
76
6cbf7d87a8fd411def685958ca238b3d682e8552
1,450
py
Python
remi/core/checks.py
Qu4n7r01d/remi
6ba6c9cbc5121e00d849ff385966ac7e72e1409f
[ "MIT" ]
1
2021-12-31T08:35:59.000Z
2021-12-31T08:35:59.000Z
remi/core/checks.py
Qu4n7r01d/remi
6ba6c9cbc5121e00d849ff385966ac7e72e1409f
[ "MIT" ]
7
2021-12-19T17:49:58.000Z
2022-02-17T06:52:30.000Z
remi/core/checks.py
Qu4n7r01d/remi
6ba6c9cbc5121e00d849ff385966ac7e72e1409f
[ "MIT" ]
null
null
null
import lightbulb from hikari.permissions import Permissions from lightbulb import checks, context from sqlalchemy import select from remi.db.engine import async_config_session from remi.db.schema.config import StaffRole @lightbulb.Check @lightbulb.Check
30.851064
120
0.731034
import lightbulb from hikari.permissions import Permissions from lightbulb import checks, context from sqlalchemy import select from remi.db.engine import async_config_session from remi.db.schema.config import StaffRole @lightbulb.Check async def is_moderator(ctx: context.Context) -> bool: if await is_administra...
1,147
0
44
74969a8559a9be13bcea15afeeac63a8025d9d8b
1,110
py
Python
mahjong/hand_calculating/yaku_list/yakuman/shosuushi.py
Enerccio/mahjong
903505a7886c31845dfa6b3f54c936a4feb29e6e
[ "MIT" ]
null
null
null
mahjong/hand_calculating/yaku_list/yakuman/shosuushi.py
Enerccio/mahjong
903505a7886c31845dfa6b3f54c936a4feb29e6e
[ "MIT" ]
null
null
null
mahjong/hand_calculating/yaku_list/yakuman/shosuushi.py
Enerccio/mahjong
903505a7886c31845dfa6b3f54c936a4feb29e6e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from mahjong.constants import EAST, SOUTH, WEST, NORTH from mahjong.hand_calculating.yaku import Yaku from mahjong.utils import is_pon, is_pair class Shousuushii(Yaku): """ The hand contains three sets of winds and a pair of the remaining wind """
26.428571
74
0.597297
# -*- coding: utf-8 -*- from mahjong.constants import EAST, SOUTH, WEST, NORTH from mahjong.hand_calculating.yaku import Yaku from mahjong.utils import is_pon, is_pair class Shousuushii(Yaku): """ The hand contains three sets of winds and a pair of the remaining wind """ def __init__(self, yaku_id): ...
743
0
81
237cf067f17f7a8682ac3c20e6bdfbeb3fda0d3e
1,511
py
Python
clean/day01.py
JerryDot/advent-2021-py
c3eb44b5989c276de0b5e721d3b8dfa1698796f1
[ "MIT" ]
null
null
null
clean/day01.py
JerryDot/advent-2021-py
c3eb44b5989c276de0b5e721d3b8dfa1698796f1
[ "MIT" ]
null
null
null
clean/day01.py
JerryDot/advent-2021-py
c3eb44b5989c276de0b5e721d3b8dfa1698796f1
[ "MIT" ]
null
null
null
from collections import deque from typing import List from functools import reduce if __name__ == '__main__': input = get_input() print(part_one(input)) print(part_one_alt(input)) print(part_two(input)) print(part_two_alt(input)) print(part_two_ext(input))
22.220588
58
0.549967
from collections import deque from typing import List from functools import reduce def get_input() -> List[int]: with open('../fast/day01/day01.txt', 'rb') as f: input = list(map(int, f.readlines())) return input def part_one(input: List[int]) -> int: return reduce( lambda acc, pair: int...
1,084
0
138
7cb45296506625f5c94e5672b6c411bf25cde548
36,392
py
Python
homeassistant/components/xiaomi_miio/fan.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
23
2017-11-15T21:03:53.000Z
2021-03-29T21:33:48.000Z
homeassistant/components/xiaomi_miio/fan.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
9
2022-01-27T06:32:10.000Z
2022-03-31T07:07:51.000Z
homeassistant/components/xiaomi_miio/fan.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
10
2018-01-01T00:12:51.000Z
2021-12-21T23:08:05.000Z
"""Support for Xiaomi Mi Air Purifier and Xiaomi Mi Air Humidifier.""" import asyncio from enum import Enum from functools import partial import logging from miio import ( # pylint: disable=import-error AirFresh, AirHumidifier, AirPurifier, Device, DeviceException, ) from miio.airfresh import ( #...
32.697215
88
0.661519
"""Support for Xiaomi Mi Air Purifier and Xiaomi Mi Air Humidifier.""" import asyncio from enum import Enum from functools import partial import logging from miio import ( # pylint: disable=import-error AirFresh, AirHumidifier, AirPurifier, Device, DeviceException, ) from miio.airfresh import ( #...
162
0
26
e12e16d50a5770d564ad36844ad9376725e2cc17
1,149
py
Python
avatar-server.py
th4nhtung/avatars
e302db2b3852ff8910b7ea6ecb98d6662cd4e4f4
[ "MIT" ]
null
null
null
avatar-server.py
th4nhtung/avatars
e302db2b3852ff8910b7ea6ecb98d6662cd4e4f4
[ "MIT" ]
null
null
null
avatar-server.py
th4nhtung/avatars
e302db2b3852ff8910b7ea6ecb98d6662cd4e4f4
[ "MIT" ]
null
null
null
import os from pyfiglet import Figlet from flask import Flask, send_file, jsonify from subprocess import call from sys import platform as _platform if _platform == 'win32' or _platform == 'win64': call('cls', shell=True) elif _platform == 'linux' or _platform == 'linux2': call('clear', shell=True) f = Figlet(...
23.9375
62
0.671889
import os from pyfiglet import Figlet from flask import Flask, send_file, jsonify from subprocess import call from sys import platform as _platform if _platform == 'win32' or _platform == 'win64': call('cls', shell=True) elif _platform == 'linux' or _platform == 'linux2': call('clear', shell=True) f = Figlet(...
378
0
66
85dd50562724e29435112cd558ea5dca84638252
4,760
py
Python
bin/generate_price_database.py
qfoxic/grapher-aws
5e27a743db983f87bcaa9f0f02724053a012d44d
[ "Apache-2.0" ]
null
null
null
bin/generate_price_database.py
qfoxic/grapher-aws
5e27a743db983f87bcaa9f0f02724053a012d44d
[ "Apache-2.0" ]
null
null
null
bin/generate_price_database.py
qfoxic/grapher-aws
5e27a743db983f87bcaa9f0f02724053a012d44d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import csv import enum import os import pprint import re import sqlite3 import sys from functools import partialmethod if __name__ == '__main__': sys.exit(app())
34.492754
115
0.571639
#!/usr/bin/env python3 import csv import enum import os import pprint import re import sqlite3 import sys from functools import partialmethod class PricingField(enum.IntEnum): # The value of a member represent column number of a csv file. InstanceType = 1 LinuxOnDemandPrice = 30 Windo...
1,500
2,921
123
2966f68dac735271a14badabb0ac53cc610ee645
413
py
Python
MyWatchList/migrations/0006_auto_20200411_0333.py
fgl-foundation/MovieDB
17bf065336f52f7f6ef423f85b6aa5315b1d685f
[ "MIT" ]
null
null
null
MyWatchList/migrations/0006_auto_20200411_0333.py
fgl-foundation/MovieDB
17bf065336f52f7f6ef423f85b6aa5315b1d685f
[ "MIT" ]
1
2019-11-01T15:47:04.000Z
2019-11-01T15:47:04.000Z
MyWatchList/migrations/0006_auto_20200411_0333.py
fgl-foundation/MovieDB
17bf065336f52f7f6ef423f85b6aa5315b1d685f
[ "MIT" ]
null
null
null
# Generated by Django 3.0.5 on 2020-04-11 00:33 from django.db import migrations, models
21.736842
69
0.617433
# Generated by Django 3.0.5 on 2020-04-11 00:33 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('MyWatchList', '0005_auto_20200411_0328'), ] operations = [ migrations.AlterField( model_name='movie', name='kinopois...
0
299
23
51664a5af85c9cb4a73e4281ab9f4c0d53cc200d
1,611
py
Python
staff_models/staffs/class_serializers/staff_auth_serializers.py
reimibeta/django-staff-models
ec42cb4ba30e87efeff34f152a5dc68b469f4784
[ "Apache-2.0" ]
null
null
null
staff_models/staffs/class_serializers/staff_auth_serializers.py
reimibeta/django-staff-models
ec42cb4ba30e87efeff34f152a5dc68b469f4784
[ "Apache-2.0" ]
null
null
null
staff_models/staffs/class_serializers/staff_auth_serializers.py
reimibeta/django-staff-models
ec42cb4ba30e87efeff34f152a5dc68b469f4784
[ "Apache-2.0" ]
null
null
null
from collections import OrderedDict from django.contrib.auth.models import User from django.http import JsonResponse from rest_framework_simplejwt.serializers import TokenObtainPairSerializer
33.5625
75
0.61018
from collections import OrderedDict from django.contrib.auth.models import User from django.http import JsonResponse from rest_framework_simplejwt.serializers import TokenObtainPairSerializer class StaffTokenObtainPairSerializer(TokenObtainPairSerializer): default_error_messages = { 'no_active_account': ...
1,107
287
23
cf0e7c36acfe3c65e555b336030119f96cbaa825
258
py
Python
levels/scene.py
EliasFarhan/GBJam
156a003378b8db994d4bd1f9c3a12415ceac7c01
[ "WTFPL" ]
1
2017-01-19T16:25:17.000Z
2017-01-19T16:25:17.000Z
levels/scene.py
EliasFarhan/GBJam
156a003378b8db994d4bd1f9c3a12415ceac7c01
[ "WTFPL" ]
null
null
null
levels/scene.py
EliasFarhan/GBJam
156a003378b8db994d4bd1f9c3a12415ceac7c01
[ "WTFPL" ]
null
null
null
from render_engine.img_manager import img_manager
17.2
49
0.635659
from render_engine.img_manager import img_manager class Scene(): def __init__(self): pass def init(self, loading=False): pass def loop(self, screen): pass def exit(self): img_manager.sanitize_img_manager()
85
-7
130
84fca140120abe3d5dbb8bf5f14e5d465a59a72b
1,150
py
Python
aniwatch_proxy_checker.py
silvershade69/Sakurajima
e2757cca8fcbc4a4292cc7aed1bebba335de714d
[ "MIT" ]
22
2020-06-11T06:59:40.000Z
2021-05-30T13:08:22.000Z
aniwatch_proxy_checker.py
notmarek/Sakurajima
95491fe7a454b3482bed509e34a3db33aa3c1b0d
[ "MIT" ]
33
2020-06-23T19:08:20.000Z
2021-01-28T18:07:02.000Z
aniwatch_proxy_checker.py
notmarek/Sakurajima
95491fe7a454b3482bed509e34a3db33aa3c1b0d
[ "MIT" ]
3
2020-07-01T10:17:48.000Z
2021-01-18T15:18:26.000Z
import requests import threading import sys """Usage: python aniwatch_proxy_checker.py proxy_file max_timeout""" if __name__ == "__main__": good_proxies = [] threads = [] with open(sys.argv[1], "r", encoding="utf-8") as f: lol = [x.replace("\n", "") for x in f.readlines()] lol = list(dict.fr...
30.263158
113
0.624348
import requests import threading import sys """Usage: python aniwatch_proxy_checker.py proxy_file max_timeout""" def check_proxy(proxy, timeout): global good_proxies try: with requests.get("https://aniwatch.me", proxies={"https": proxy}, timeout=timeout) as r: if "The owner of this websit...
366
0
23
ed21c3ef14f32d774ae0d3c108989f13ef7f4f27
2,841
py
Python
tests/unit/protocol/test_line_receiver.py
majacQ/linehaul
7b4a656ce268344b2f98ca71d6f08e18a8b530eb
[ "Apache-2.0" ]
74
2016-07-13T14:53:42.000Z
2022-01-24T12:01:33.000Z
tests/unit/protocol/test_line_receiver.py
majacQ/linehaul
7b4a656ce268344b2f98ca71d6f08e18a8b530eb
[ "Apache-2.0" ]
29
2016-05-04T16:21:29.000Z
2021-11-28T20:22:19.000Z
tests/unit/protocol/test_line_receiver.py
majacQ/linehaul
7b4a656ce268344b2f98ca71d6f08e18a8b530eb
[ "Apache-2.0" ]
33
2016-02-26T20:34:37.000Z
2022-03-21T01:28:21.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
31.21978
86
0.724745
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
982
0
88
8f3122484d019cb4320ac4961a6186a8e21ffc50
60,380
py
Python
quicksip.py
ixkael/QuickSip
79c0ed44494b0369d5ca860418538740be471d8a
[ "MIT" ]
5
2018-01-04T21:48:23.000Z
2022-03-29T17:26:57.000Z
quicksip.py
ixkael/QuickSip
79c0ed44494b0369d5ca860418538740be471d8a
[ "MIT" ]
null
null
null
quicksip.py
ixkael/QuickSip
79c0ed44494b0369d5ca860418538740be471d8a
[ "MIT" ]
3
2016-05-20T15:54:06.000Z
2019-05-27T10:28:28.000Z
import numpy as np import healpy as hp import pyfits from time import time import matplotlib.pyplot as plt from multiprocessing import Pool from multiprocessing.dummy import Pool as ThreadPool import numpy.random import os, errno import subprocess import astropy.wcs import astropy.io.fits as pyfits from astropy.coord...
45.986291
219
0.593806
import numpy as np import healpy as hp import pyfits from time import time import matplotlib.pyplot as plt from multiprocessing import Pool from multiprocessing.dummy import Pool as ThreadPool import numpy.random import os, errno import subprocess import astropy.wcs import astropy.io.fits as pyfits from astropy.coord...
49,614
209
911
45df3ace3bc21da44113d70f868713c25dc2a68a
1,640
py
Python
tests/factories.py
zgrzebnickij/demo-cookiecutter-flask
3031c447dbaa3e819c1638cae79e83ee5869e292
[ "MIT" ]
null
null
null
tests/factories.py
zgrzebnickij/demo-cookiecutter-flask
3031c447dbaa3e819c1638cae79e83ee5869e292
[ "MIT" ]
null
null
null
tests/factories.py
zgrzebnickij/demo-cookiecutter-flask
3031c447dbaa3e819c1638cae79e83ee5869e292
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Factories to help in tests.""" from factory import PostGenerationMethodCall, Sequence from factory.alchemy import SQLAlchemyModelFactory from my_flask_app.database import db from my_flask_app.user.models import User from my_flask_app.quiz.models import Quiz import json class BaseFactory(S...
24.477612
66
0.517683
# -*- coding: utf-8 -*- """Factories to help in tests.""" from factory import PostGenerationMethodCall, Sequence from factory.alchemy import SQLAlchemyModelFactory from my_flask_app.database import db from my_flask_app.user.models import User from my_flask_app.quiz.models import Quiz import json class BaseFactory(S...
0
0
0
ee79a4c9017765fa43dedc938578b2ccb5c7c300
739
py
Python
fcontroller/FController.py
othercodes/fcontroller-py
de6fb6cdc43abf42a99e4c8c5f3f2b6752acdcf2
[ "MIT" ]
null
null
null
fcontroller/FController.py
othercodes/fcontroller-py
de6fb6cdc43abf42a99e4c8c5f3f2b6752acdcf2
[ "MIT" ]
null
null
null
fcontroller/FController.py
othercodes/fcontroller-py
de6fb6cdc43abf42a99e4c8c5f3f2b6752acdcf2
[ "MIT" ]
null
null
null
#!/usr/bin/env python from .Core import Core
29.56
58
0.637348
#!/usr/bin/env python from .Core import Core class FController(Core): def __new__(cls, *parameters): it = cls.__dict__.get("__it__") if it is not None: return it cls.__it__ = it = object.__new__(cls, *parameters) return it def set_module(self, name, module, parame...
586
3
103
ae0df5138202aec6ba9d22ecf0eb7874c420b570
3,292
py
Python
holoai_api/srp.py
arthus-leroy/holoai-api
87656fa3aeda67eaf2bc827600947d60bbe64e8c
[ "MIT" ]
2
2022-01-23T18:43:15.000Z
2022-02-23T00:12:16.000Z
holoai_api/srp.py
arthus-leroy/holoai-api
87656fa3aeda67eaf2bc827600947d60bbe64e8c
[ "MIT" ]
null
null
null
holoai_api/srp.py
arthus-leroy/holoai-api
87656fa3aeda67eaf2bc827600947d60bbe64e8c
[ "MIT" ]
1
2022-02-23T00:12:21.000Z
2022-02-23T00:12:21.000Z
# Port of the tssrp6a library used for authentification # Kudos to Schmitty#5079 for doing a rough translation from Javascript to Python # of the important functions import hashlib import secrets from typing import Tuple N = 21766174458617435773191008891802753781907668374255538511144643224689886235383840957210909013...
31.961165
621
0.715067
# Port of the tssrp6a library used for authentification # Kudos to Schmitty#5079 for doing a rough translation from Javascript to Python # of the important functions import hashlib import secrets from typing import Tuple N = 21766174458617435773191008891802753781907668374255538511144643224689886235383840957210909013...
985
0
276
ba16b9b81d6f8104d733661a21c0e5b752273a5a
3,227
py
Python
deep_translator/mymemory.py
nidhaloff/deep_translator
4379cbabd029515ea1cf0a162808c25534822727
[ "MIT" ]
118
2020-06-09T18:41:47.000Z
2020-08-31T13:08:41.000Z
deep_translator/mymemory.py
vshantam/deep-translator
5df969b04ec489f779932ebc0be210db053fe61f
[ "MIT" ]
15
2020-07-26T15:46:02.000Z
2020-08-24T02:56:43.000Z
deep_translator/mymemory.py
vshantam/deep-translator
5df969b04ec489f779932ebc0be210db053fe61f
[ "MIT" ]
14
2020-06-23T10:25:33.000Z
2020-08-25T17:38:48.000Z
""" mymemory translator API """ from typing import List, Optional, Union import requests from deep_translator.base import BaseTranslator from deep_translator.constants import BASE_URLS from deep_translator.exceptions import ( RequestError, TooManyRequests, TranslationNotFound, ) from deep_translator.valid...
31.028846
92
0.586303
""" mymemory translator API """ from typing import List, Optional, Union import requests from deep_translator.base import BaseTranslator from deep_translator.constants import BASE_URLS from deep_translator.exceptions import ( RequestError, TooManyRequests, TranslationNotFound, ) from deep_translator.valid...
0
0
0
402a84c65ee357bd47e487286cc9ced9143bc0eb
7,264
py
Python
cleartext/models/components.py
cschmidat/cleartext
c99c24792c06aba5b3d3848a4a74768b260188e5
[ "MIT" ]
1
2020-07-09T19:51:18.000Z
2020-07-09T19:51:18.000Z
cleartext/models/components.py
cschmidat/cleartext
c99c24792c06aba5b3d3848a4a74768b260188e5
[ "MIT" ]
null
null
null
cleartext/models/components.py
cschmidat/cleartext
c99c24792c06aba5b3d3848a4a74768b260188e5
[ "MIT" ]
2
2020-06-26T13:55:17.000Z
2020-07-09T19:16:23.000Z
from typing import Tuple import torch from torch import nn as nn, Tensor from torch.nn.functional import softmax from .. import utils class Encoder(nn.Module): """Encoder module. The encoder represents its inputs using fixed, pre-trained GloVe embeddings, which are passed through a bidirectional GRU. ...
33.62963
116
0.632847
from typing import Tuple import torch from torch import nn as nn, Tensor from torch.nn.functional import softmax from .. import utils class Encoder(nn.Module): """Encoder module. The encoder represents its inputs using fixed, pre-trained GloVe embeddings, which are passed through a bidirectional GRU. ...
0
0
0
b9ea8ac43e49c9dd688a744c46ad303d0fd4f7fe
3,329
py
Python
streamr/util/constant.py
streamr-dev/streamr-client-python
8160df6d58cc124369bc47cf56245c7d17bf662f
[ "Apache-2.0" ]
8
2019-06-13T04:02:55.000Z
2022-02-10T04:33:49.000Z
streamr/util/constant.py
streamr-dev/streamr-client-python
8160df6d58cc124369bc47cf56245c7d17bf662f
[ "Apache-2.0" ]
3
2019-01-17T22:59:01.000Z
2021-11-06T16:49:14.000Z
streamr/util/constant.py
streamr-dev/streamr-client-python
8160df6d58cc124369bc47cf56245c7d17bf662f
[ "Apache-2.0" ]
4
2019-01-27T14:02:07.000Z
2021-11-02T15:08:31.000Z
""" constant """ class Addrs: """ Server address """ WS_ADDR = 'wss://www.streamr.com/api/v1/ws' REST_ADDR = 'https://www.streamr.com/api/v1' class RestfullConstant: """ Restful constants """ GET_SESSION_ADDR = Addrs.REST_ADDR + '/login/apikey' GET_SESSION_PARAS = {"Content-...
21.901316
76
0.638931
""" constant """ class Addrs: """ Server address """ WS_ADDR = 'wss://www.streamr.com/api/v1/ws' REST_ADDR = 'https://www.streamr.com/api/v1' class RestfullConstant: """ Restful constants """ GET_SESSION_ADDR = Addrs.REST_ADDR + '/login/apikey' GET_SESSION_PARAS = {"Content-...
0
0
0
76de25a81b07e2495e3cea34469601b1b0e6a69c
358
py
Python
myscripts/projects/thesis/bl/coefficients.py
LSaffin/scripts
100fc442229ea11f8766a6d78b4db8790c607326
[ "MIT" ]
1
2020-03-16T13:54:28.000Z
2020-03-16T13:54:28.000Z
myscripts/projects/thesis/bl/coefficients.py
LSaffin/scripts
100fc442229ea11f8766a6d78b4db8790c607326
[ "MIT" ]
null
null
null
myscripts/projects/thesis/bl/coefficients.py
LSaffin/scripts
100fc442229ea11f8766a6d78b4db8790c607326
[ "MIT" ]
1
2021-01-16T04:54:53.000Z
2021-01-16T04:54:53.000Z
import numpy as np import matplotlib.pyplot as plt Ri = np.linspace(0, 0.25, 26) f_long = 1 / (1 + 10 * Ri) f_sharp = (1 - 5 * Ri)**2 f_sharp[11:] = (1 / (20 * Ri[11:]))**2 print(Ri[11]) plt.plot(Ri, f_long, '-g', label='Land') plt.plot(Ri, f_sharp, '-b', label='Sea') plt.xlabel('Ri') plt.ylabel(r'$f(\mathrm{Ri})$...
17.9
40
0.594972
import numpy as np import matplotlib.pyplot as plt Ri = np.linspace(0, 0.25, 26) f_long = 1 / (1 + 10 * Ri) f_sharp = (1 - 5 * Ri)**2 f_sharp[11:] = (1 / (20 * Ri[11:]))**2 print(Ri[11]) plt.plot(Ri, f_long, '-g', label='Land') plt.plot(Ri, f_sharp, '-b', label='Sea') plt.xlabel('Ri') plt.ylabel(r'$f(\mathrm{Ri})$...
0
0
0
8427fd416cd771d612441d24fa475032b4cb61da
4,928
py
Python
tracker/site/views.py
XOyarz/potato-app
845e69da5bf82e2ebacd0d5488f8a3ce7041751d
[ "Apache-2.0" ]
null
null
null
tracker/site/views.py
XOyarz/potato-app
845e69da5bf82e2ebacd0d5488f8a3ce7041751d
[ "Apache-2.0" ]
null
null
null
tracker/site/views.py
XOyarz/potato-app
845e69da5bf82e2ebacd0d5488f8a3ce7041751d
[ "Apache-2.0" ]
null
null
null
from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404 from django.views.generic import TemplateView, CreateView, UpdateView, ListView, DeleteView from .forms import ProjectForm, TicketForm from .models import Project, Ticke...
29.159763
91
0.680195
from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404 from django.views.generic import TemplateView, CreateView, UpdateView, ListView, DeleteView from .forms import ProjectForm, TicketForm from .models import Project, Ticke...
2,599
1,260
206
bc92d8c2fdfb8a1d5426d5fa0c0f7470454691f2
614
py
Python
python/string-manipulation/sherlock_and_valid_string.py
anishLearnsToCode/hackerrabk-interview-preparation-kit
9d31eefe336e6dbef104ae78f06dd46686c28f84
[ "MIT" ]
2
2020-06-04T09:48:30.000Z
2021-11-28T15:43:00.000Z
python/string-manipulation/sherlock_and_valid_string.py
anishLearnsToCode/hackerrabk-interview-preparation-kit
9d31eefe336e6dbef104ae78f06dd46686c28f84
[ "MIT" ]
null
null
null
python/string-manipulation/sherlock_and_valid_string.py
anishLearnsToCode/hackerrabk-interview-preparation-kit
9d31eefe336e6dbef104ae78f06dd46686c28f84
[ "MIT" ]
1
2020-11-01T01:03:08.000Z
2020-11-01T01:03:08.000Z
from typing import Dict string = input() print('YES' if is_valid(string) else 'NO')
27.909091
106
0.654723
from typing import Dict def get_frequency(iter) -> Dict: frequency = {} for item in iter: frequency[item] = frequency.get(item, 0) + 1 return frequency def is_valid(string: str) -> bool: character_frequency = get_frequency(string) distribution = get_frequency(character_frequency.values()...
480
0
46
a2ecb4cf7e8c3cd52478f1d4f70224ce2ff4d2f0
1,330
py
Python
tools/telemetry/telemetry/core/platform/mac_platform_backend_unittest.py
shaochangbin/chromium-crosswalk
634d34e4cf82b4f7400357c53ec12efaffe94add
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2019-01-16T03:57:28.000Z
2021-01-23T15:29:45.000Z
tools/telemetry/telemetry/core/platform/mac_platform_backend_unittest.py
shaochangbin/chromium-crosswalk
634d34e4cf82b4f7400357c53ec12efaffe94add
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
tools/telemetry/telemetry/core/platform/mac_platform_backend_unittest.py
shaochangbin/chromium-crosswalk
634d34e4cf82b4f7400357c53ec12efaffe94add
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2017-03-15T13:21:38.000Z
2017-03-15T13:21:38.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import unittest from telemetry import test from telemetry.core.platform import factory from telemetry.core.platform import mac_platform_backend
39.117647
74
0.745113
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import unittest from telemetry import test from telemetry.core.platform import factory from telemetry.core.platform import mac_platform_backend ...
889
99
23
7f731e5244262ef1e82c68a94df4dcd9b97c7cf6
454
py
Python
Pure Storage/s-ListMessagesPurityfbAPIVer.py
adrianojiu/Pub
acd52fa3d56b83d3b93b825edb70c6a13eefadc8
[ "MIT" ]
null
null
null
Pure Storage/s-ListMessagesPurityfbAPIVer.py
adrianojiu/Pub
acd52fa3d56b83d3b93b825edb70c6a13eefadc8
[ "MIT" ]
null
null
null
Pure Storage/s-ListMessagesPurityfbAPIVer.py
adrianojiu/Pub
acd52fa3d56b83d3b93b825edb70c6a13eefadc8
[ "MIT" ]
null
null
null
from purity_fb import PurityFb, VersionResponse, rest # Get Pure API version fb = PurityFb("10.70.100.10") # assume the array IP is 10.255.9.28 fb.disable_verify_ssl() try: # no need to login to get API versions res = fb.api_version.list_versions() assert isinstance(res, VersionResponse) print (res.ve...
32.428571
66
0.687225
from purity_fb import PurityFb, VersionResponse, rest # Get Pure API version fb = PurityFb("10.70.100.10") # assume the array IP is 10.255.9.28 fb.disable_verify_ssl() try: # no need to login to get API versions res = fb.api_version.list_versions() assert isinstance(res, VersionResponse) print (res.ve...
0
0
0
f861ffc4bdb67ede0cc959cdc6e3d355f2c94068
1,568
py
Python
helper_extor.py
gislite/maplet
eb2577eea96775861fd20b949cd4d88cbb6cd7d1
[ "MIT" ]
36
2017-04-04T15:20:33.000Z
2021-06-30T09:37:42.000Z
helper_extor.py
gislite/maplet
eb2577eea96775861fd20b949cd4d88cbb6cd7d1
[ "MIT" ]
null
null
null
helper_extor.py
gislite/maplet
eb2577eea96775861fd20b949cd4d88cbb6cd7d1
[ "MIT" ]
16
2017-02-26T01:01:43.000Z
2021-03-17T07:47:57.000Z
# -*- coding: utf-8 -*- import getopt import sys from torcms.model.post_model import MPost from torcms.script.script_init_tabels import create_table from torcms_maplet.model.map_tab import MabGson, MabPost2Gson, MabLayout def run_update_lon(): ''' :return: ''' map_recs = MPost.query_all(limit_num=5...
24.5
72
0.556122
# -*- coding: utf-8 -*- import getopt import sys from torcms.model.post_model import MPost from torcms.script.script_init_tabels import create_table from torcms_maplet.model.map_tab import MabGson, MabPost2Gson, MabLayout def run_init(): create_table(MabGson) create_table(MabLayout) create_table(MabPost2...
660
0
73
46641339a5140acb41a2aa1dd372f214cc634d73
1,686
py
Python
Clase 4/Ejemplos/paf_api/api/serializers.py
GerardoPozzi/Fundamentals
7a391ca3938c63782fd23d8e60177f461fb0ffce
[ "MIT" ]
11
2021-05-12T16:39:02.000Z
2021-09-06T16:46:37.000Z
Clase 4/Ejemplos/paf_api/api/serializers.py
GerardoPozzi/Fundamentals
7a391ca3938c63782fd23d8e60177f461fb0ffce
[ "MIT" ]
1
2021-06-09T14:32:25.000Z
2021-06-09T14:32:25.000Z
Clase 4/Ejemplos/paf_api/api/serializers.py
GerardoPozzi/Fundamentals
7a391ca3938c63782fd23d8e60177f461fb0ffce
[ "MIT" ]
4
2021-05-20T17:38:04.000Z
2021-06-16T03:01:58.000Z
from django.contrib.auth import get_user_model from django.contrib.auth.password_validation import validate_password from rest_framework import serializers from api.models import UserModel, TuitModel class TuitSerializer(serializers.ModelSerializer): ''' Tuit serializer. ''' class UserSerializer(seriali...
22.48
69
0.475682
from django.contrib.auth import get_user_model from django.contrib.auth.password_validation import validate_password from rest_framework import serializers from api.models import UserModel, TuitModel class TuitSerializer(serializers.ModelSerializer): ''' Tuit serializer. ''' class Meta: m...
226
914
112
31d6463af385801e100dbb33f091e57af971d35f
6,762
py
Python
qiskit/tools/file_io.py
niefermar/CuanticaProgramacion
cf066149b4bd769673e83fd774792e9965e5dbc0
[ "Apache-2.0" ]
null
null
null
qiskit/tools/file_io.py
niefermar/CuanticaProgramacion
cf066149b4bd769673e83fd774792e9965e5dbc0
[ "Apache-2.0" ]
null
null
null
qiskit/tools/file_io.py
niefermar/CuanticaProgramacion
cf066149b4bd769673e83fd774792e9965e5dbc0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2017, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """Utilities for File Input/Output.""" import copy import datetime import json import os import numpy from sympy import Bas...
31.305556
79
0.629695
# -*- coding: utf-8 -*- # Copyright 2017, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """Utilities for File Input/Output.""" import copy import datetime import json import os import numpy from sympy import Bas...
510
0
26
7883dd6e2c41626aa8891626686c853a1064f8db
7,484
py
Python
Modules/Mods.py
Skk-nsmt/reina
1b658bfcf4ff35a641c7fe9398652aa36b254d3a
[ "WTFPL" ]
null
null
null
Modules/Mods.py
Skk-nsmt/reina
1b658bfcf4ff35a641c7fe9398652aa36b254d3a
[ "WTFPL" ]
13
2020-12-22T04:35:03.000Z
2021-07-07T07:05:53.000Z
Modules/Mods.py
Skk-nsmt/reina
1b658bfcf4ff35a641c7fe9398652aa36b254d3a
[ "WTFPL" ]
1
2022-02-28T21:40:51.000Z
2022-02-28T21:40:51.000Z
import datetime import time import discord import pytz from discord.ext import commands from Modules import CONSTANT from Modules.CONSTANT import SHOWROOM_ALERT_ROLES from Modules.Checks import check_if_bot_spam JP_TZ: pytz.UTC = pytz.timezone('Asia/Tokyo') UNIVERSAL_TZ: pytz.UTC = pytz.timezone('UTC') PACIFIC_TZ: p...
46.484472
151
0.581908
import datetime import time import discord import pytz from discord.ext import commands from Modules import CONSTANT from Modules.CONSTANT import SHOWROOM_ALERT_ROLES from Modules.Checks import check_if_bot_spam JP_TZ: pytz.UTC = pytz.timezone('Asia/Tokyo') UNIVERSAL_TZ: pytz.UTC = pytz.timezone('UTC') PACIFIC_TZ: p...
346
6,406
23
642d357bac75cc1eb9c820004d0973372e3ba273
6,499
py
Python
deephistory/deephistory.py
iandees/deep-history-py
63557abb22e90f45876cce3bfd2fd467790a4e17
[ "Apache-2.0" ]
null
null
null
deephistory/deephistory.py
iandees/deep-history-py
63557abb22e90f45876cce3bfd2fd467790a4e17
[ "Apache-2.0" ]
2
2022-02-01T13:59:50.000Z
2022-02-16T22:32:53.000Z
deephistory/deephistory.py
iandees/deep-history-py
63557abb22e90f45876cce3bfd2fd467790a4e17
[ "Apache-2.0" ]
null
null
null
import requests from flask import Blueprint, Flask, redirect, render_template, request, url_for from itertools import tee from markupsafe import Markup, escape hist = Blueprint('history', __name__, template_folder='templates', static_folder='static') app = Flask(__name__) API_URL = 'https://api.openstreetmap.org/api/0...
26.100402
105
0.616095
import requests from flask import Blueprint, Flask, redirect, render_template, request, url_for from itertools import tee from markupsafe import Markup, escape hist = Blueprint('history', __name__, template_folder='templates', static_folder='static') app = Flask(__name__) API_URL = 'https://api.openstreetmap.org/api/0...
5,396
24
408
a67348778b9bd155ed5e1dfc496d5245a4f52aed
1,334
py
Python
load_test/locustfile.py
naveen-marthala/ml-monitoring
dd584e21376d297a298909f689a90a7f0fd6f639
[ "MIT" ]
129
2021-01-03T06:01:35.000Z
2022-03-27T16:26:48.000Z
load_test/locustfile.py
vcl990/ml-monitoring
a41deed41cfdd663aac50d5c6dd7fe0116b4ebce
[ "MIT" ]
5
2021-05-05T13:27:51.000Z
2021-12-06T03:00:54.000Z
load_test/locustfile.py
vcl990/ml-monitoring
a41deed41cfdd663aac50d5c6dd7fe0116b4ebce
[ "MIT" ]
29
2021-01-12T11:02:33.000Z
2022-02-09T15:29:15.000Z
""" Run load tests: locust -f load_test/locustfile.py --host http://127.0.0.1:3000 """ from locust import HttpUser, task import pandas as pd import random feature_columns = { "fixed acidity": "fixed_acidity", "volatile acidity": "volatile_acidity", "citric acid": "citric_acid", "residual sugar": "res...
26.156863
101
0.646177
""" Run load tests: locust -f load_test/locustfile.py --host http://127.0.0.1:3000 """ from locust import HttpUser, task import pandas as pd import random feature_columns = { "fixed acidity": "fixed_acidity", "volatile acidity": "volatile_acidity", "citric acid": "citric_acid", "residual sugar": "res...
343
134
23
e09a5652d18ca8c33bd3596b5553f4c0f5e8e725
8,378
pyde
Python
loesungen_in_python/10-vererbung/aufgabe_W_10_10_webseitengenerator/aufgabe_W_10_10_webseitengenerator.pyde
gtuthey/loesungen
31af695adc6b947cbb84749594bf5469dcb37d52
[ "MIT" ]
11
2019-04-24T07:19:00.000Z
2022-03-12T08:30:12.000Z
loesungen_in_python/10-vererbung/aufgabe_W_10_10_webseitengenerator/aufgabe_W_10_10_webseitengenerator.pyde
gtuthey/loesungen
31af695adc6b947cbb84749594bf5469dcb37d52
[ "MIT" ]
3
2018-04-30T07:12:46.000Z
2022-02-02T09:02:10.000Z
loesungen_in_python/10-vererbung/aufgabe_W_10_10_webseitengenerator/aufgabe_W_10_10_webseitengenerator.pyde
gtuthey/loesungen
31af695adc6b947cbb84749594bf5469dcb37d52
[ "MIT" ]
21
2018-04-04T11:27:11.000Z
2022-03-12T08:30:18.000Z
# Import spezieller Python-Funktionalitäten, damit Abstrakte Methoden # definiert werden können from abc import ABCMeta, abstractmethod # Konstanten, mit denen wir die Wetterlage beschreiben SONNE = 0, BEWOELKT = 1 REGEN = 2 # Abstrakte Klasse zur Repräsentation einer Stadt. # Von dieser Klasse kann keine Instanz (= ...
30.915129
69
0.627238
# Import spezieller Python-Funktionalitäten, damit Abstrakte Methoden # definiert werden können from abc import ABCMeta, abstractmethod # Konstanten, mit denen wir die Wetterlage beschreiben SONNE = 0, BEWOELKT = 1 REGEN = 2 # Abstrakte Klasse zur Repräsentation einer Stadt. # Von dieser Klasse kann keine Instanz (= ...
5,813
1,185
267
3ba473579a2944f028097dc85be27da818363762
20
py
Python
tests/__init__.py
jordeu/itab
e0cf32f011d282678266b542a51665287adf3b56
[ "Apache-2.0" ]
null
null
null
tests/__init__.py
jordeu/itab
e0cf32f011d282678266b542a51665287adf3b56
[ "Apache-2.0" ]
1
2015-05-27T10:43:30.000Z
2015-05-27T10:43:30.000Z
tests/__init__.py
bbglab/itab
e0cf32f011d282678266b542a51665287adf3b56
[ "Apache-2.0" ]
null
null
null
__author__ = 'jdeu'
10
19
0.7
__author__ = 'jdeu'
0
0
0
10ae90393a2f526b224615aaf84977e91b989cc7
496
py
Python
content_sync/signals.py
mitodl/ocw-studio
949f96ec0647064f8d495ebdd22d66eea7d024a5
[ "BSD-3-Clause" ]
2
2020-08-07T15:55:41.000Z
2021-08-16T18:28:09.000Z
content_sync/signals.py
mitodl/ocw-studio
949f96ec0647064f8d495ebdd22d66eea7d024a5
[ "BSD-3-Clause" ]
924
2020-08-10T17:54:19.000Z
2022-03-31T21:15:17.000Z
content_sync/signals.py
mitodl/ocw-studio
949f96ec0647064f8d495ebdd22d66eea7d024a5
[ "BSD-3-Clause" ]
null
null
null
"""Signals for content syncing""" from django.db.models.signals import post_save from django.dispatch import receiver from content_sync import api from websites.models import WebsiteContent @receiver( post_save, sender=WebsiteContent, dispatch_uid="sync_state_website_content_upsert", ) def upsert_content...
26.105263
53
0.772177
"""Signals for content syncing""" from django.db.models.signals import post_save from django.dispatch import receiver from content_sync import api from websites.models import WebsiteContent @receiver( post_save, sender=WebsiteContent, dispatch_uid="sync_state_website_content_upsert", ) def upsert_content...
0
0
0
a366831ddbfd855c94eac7c78c5a444dceff462d
6,678
py
Python
ade25/base/imagetool.py
ade25/ade25.base
d30fbdc9e63b66d335b551e54f0261d9d7616f65
[ "MIT" ]
null
null
null
ade25/base/imagetool.py
ade25/ade25.base
d30fbdc9e63b66d335b551e54f0261d9d7616f65
[ "MIT" ]
1
2020-01-08T08:02:07.000Z
2020-01-08T08:02:07.000Z
ade25/base/imagetool.py
ade25/ade25.base
d30fbdc9e63b66d335b551e54f0261d9d7616f65
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Module providing an image scaling factory.""" import os import json import six from plone import api from plone.scale.interfaces import IScaledImageQuality from zope.component import getMultiAdapter, queryUtility from zope.globalrequest import getRequest from ade25.base.utils import get_fil...
35.521277
79
0.518568
# -*- coding: utf-8 -*- """Module providing an image scaling factory.""" import os import json import six from plone import api from plone.scale.interfaces import IScaledImageQuality from zope.component import getMultiAdapter, queryUtility from zope.globalrequest import getRequest from ade25.base.utils import get_fil...
4,002
0
132
3a5c7c8b417bb6dff2bb0a21ebf5f643b15cb7c8
1,045
py
Python
LeetCode/python/211-240/232-implement-queue-using-stacks/solution.py
shootsoft/practice
49f28c2e0240de61d00e4e0291b3c5edd930e345
[ "Apache-2.0" ]
null
null
null
LeetCode/python/211-240/232-implement-queue-using-stacks/solution.py
shootsoft/practice
49f28c2e0240de61d00e4e0291b3c5edd930e345
[ "Apache-2.0" ]
null
null
null
LeetCode/python/211-240/232-implement-queue-using-stacks/solution.py
shootsoft/practice
49f28c2e0240de61d00e4e0291b3c5edd930e345
[ "Apache-2.0" ]
null
null
null
__author__ = 'yinjun' # initialize your data structure here. # @param x, an integer # @return nothing # @return nothing # @return an integer # @return an boolean
18.660714
42
0.478469
__author__ = 'yinjun' class Queue: # initialize your data structure here. def __init__(self): self.s1 = [] self.s2 = [] self.length = 0 # @param x, an integer # @return nothing def push(self, x): self.length +=1 self.s1.append(x) ...
679
-9
154
a5c8a0c2657876eabdecab13a2d4e023bd2a5901
1,715
py
Python
cogs/translator.py
jonigirl/Badb
f737d364c3d1f73821fe629b2fe0327380be0ba1
[ "MIT" ]
1
2022-01-22T16:05:37.000Z
2022-01-22T16:05:37.000Z
cogs/translator.py
jonigirl/Badb
f737d364c3d1f73821fe629b2fe0327380be0ba1
[ "MIT" ]
null
null
null
cogs/translator.py
jonigirl/Badb
f737d364c3d1f73821fe629b2fe0327380be0ba1
[ "MIT" ]
1
2022-01-26T18:53:47.000Z
2022-01-26T18:53:47.000Z
import discord from discord.ext import commands from discord.ext import vbu from subprocess import check_output import goslate class Translator(vbu.Cog): """Translate text using google translate.""" @vbu.group(pass_context=True, invoke_without_command=True, aliases=["tr"]) async def translate(self, ctx...
32.358491
129
0.54519
import discord from discord.ext import commands from discord.ext import vbu from subprocess import check_output import goslate class Translator(vbu.Cog): """Translate text using google translate.""" def __init__(self, bot): self.bot = bot self.gs = goslate.Goslate() @vbu.group(pass_con...
108
0
50
b5f7db5a26676c78bcfcd99ed28f46a6fb85d543
200
py
Python
gym_splendor_code/envs/data/files_paths.py
StanczakDominik/gym-splendor
b7d6b0356d96ad1c528371f52412b81687a0ecc6
[ "MIT" ]
1
2020-03-09T18:56:01.000Z
2020-03-09T18:56:01.000Z
gym_splendor_code/envs/data/files_paths.py
StanczakDominik/gym-splendor
b7d6b0356d96ad1c528371f52412b81687a0ecc6
[ "MIT" ]
null
null
null
gym_splendor_code/envs/data/files_paths.py
StanczakDominik/gym-splendor
b7d6b0356d96ad1c528371f52412b81687a0ecc6
[ "MIT" ]
1
2019-10-25T13:09:40.000Z
2019-10-25T13:09:40.000Z
import os DATA_DIR = os.path.dirname(os.path.abspath(__file__)) CARDS_DATABASE_FILE = os.path.join(DATA_DIR, 'database_cards.csv') NOBLES_DATABASE_FILE = os.path.join(DATA_DIR, 'database_nobles.csv')
40
68
0.8
import os DATA_DIR = os.path.dirname(os.path.abspath(__file__)) CARDS_DATABASE_FILE = os.path.join(DATA_DIR, 'database_cards.csv') NOBLES_DATABASE_FILE = os.path.join(DATA_DIR, 'database_nobles.csv')
0
0
0
29cebe4770c0895dcd1d1b75926016312026aba3
1,628
py
Python
chris_backend/core/middleware.py
jbernal0019/ChRIS_ultron_backEnd
bea8065222d231f626763df2e38b0e046c6a5adf
[ "MIT" ]
26
2016-05-26T14:09:35.000Z
2022-01-28T19:12:43.000Z
chris_backend/core/middleware.py
jbernal0019/ChRIS_ultron_backEnd
bea8065222d231f626763df2e38b0e046c6a5adf
[ "MIT" ]
168
2016-06-24T11:07:15.000Z
2022-03-21T12:33:43.000Z
chris_backend/core/middleware.py
jbernal0019/ChRIS_ultron_backEnd
bea8065222d231f626763df2e38b0e046c6a5adf
[ "MIT" ]
45
2017-08-16T16:41:40.000Z
2022-03-31T18:12:14.000Z
from django.http import HttpResponse from rest_framework import status from rest_framework.renderers import JSONRenderer from collectionjson.renderers import CollectionJsonRenderer class RenderedResponse(HttpResponse): """ An HttpResponse that renders its content into Collection+JSON or JSON. """
33.916667
84
0.658477
from django.http import HttpResponse from rest_framework import status from rest_framework.renderers import JSONRenderer from collectionjson.renderers import CollectionJsonRenderer class RenderedResponse(HttpResponse): """ An HttpResponse that renders its content into Collection+JSON or JSON. """ de...
1,147
12
153
162d58d9a23046f26a83ea40ba3106d9d514e17e
4,926
py
Python
.github/scripts/github_release.py
ScriptBox99/spiceai
f8aa178fed5cc6d6d9397c123bdc869500c5135b
[ "Apache-2.0" ]
713
2021-09-07T19:57:25.000Z
2022-03-21T02:31:02.000Z
.github/scripts/github_release.py
ScriptBox99/spiceai
f8aa178fed5cc6d6d9397c123bdc869500c5135b
[ "Apache-2.0" ]
133
2021-09-07T17:34:16.000Z
2022-02-27T17:34:31.000Z
.github/scripts/github_release.py
ScriptBox99/spiceai
f8aa178fed5cc6d6d9397c123bdc869500c5135b
[ "Apache-2.0" ]
29
2021-09-07T23:46:20.000Z
2022-02-11T21:11:04.000Z
import os import argparse import requests apiHost = "https://api.github.com" token = os.getenv("GITHUB_TOKEN") if token == None: print("ERROR: Specify GITHUB_TOKEN environment variable") exit(1) authHeader = { "Authorization": f"token {token}"} parser = argparse.ArgumentParser() parser.add_argument('--owner...
30.7875
158
0.653674
import os import argparse import requests apiHost = "https://api.github.com" token = os.getenv("GITHUB_TOKEN") if token == None: print("ERROR: Specify GITHUB_TOKEN environment variable") exit(1) authHeader = { "Authorization": f"token {token}"} parser = argparse.ArgumentParser() parser.add_argument('--owner...
4,098
0
230
f75c5b952a3af3b317189be40e2f308e621de8d0
1,079
py
Python
tests/unit/test_pool.py
jwoos/python_digitrecognizer
4a06cc7b7ee32aa6c66a391cd6595a2b5fbad38b
[ "MIT" ]
null
null
null
tests/unit/test_pool.py
jwoos/python_digitrecognizer
4a06cc7b7ee32aa6c66a391cd6595a2b5fbad38b
[ "MIT" ]
8
2019-01-19T19:20:13.000Z
2019-03-27T01:37:08.000Z
tests/unit/test_pool.py
jwoos/python_digitrecognizer
4a06cc7b7ee32aa6c66a391cd6595a2b5fbad38b
[ "MIT" ]
null
null
null
from unittest import TestCase, mock import layers import numpy as np import pytest
21.156863
38
0.327155
from unittest import TestCase, mock import layers import numpy as np import pytest class TestPoolForward(TestCase): def test_max(self): pool = layers.pool.Pool( size=2, stride=2, operation=np.max, ) data = np.zeros((4, 4, 3)) data[:,:,0] = np....
933
11
49
c926042a2b6de891b60edfe671027aa4bded1b7f
6,207
py
Python
tworaven_apps/configurations/views.py
TwoRavens/TwoRavens
e5f820557d6646df525ceed15e17d79f4159cf0a
[ "Apache-2.0" ]
20
2017-12-11T07:26:06.000Z
2021-11-22T16:16:20.000Z
tworaven_apps/configurations/views.py
TwoRavens/TwoRavens
e5f820557d6646df525ceed15e17d79f4159cf0a
[ "Apache-2.0" ]
849
2017-10-20T18:21:18.000Z
2022-02-18T02:45:44.000Z
tworaven_apps/configurations/views.py
TwoRavens/TwoRavens
e5f820557d6646df525ceed15e17d79f4159cf0a
[ "Apache-2.0" ]
1
2020-05-18T06:02:13.000Z
2020-05-18T06:02:13.000Z
"""Views for the D3M configuration module""" import os import json import mimetypes from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render from django.http import FileResponse from django.http import JsonResponse, HttpResponse, Http404 from tworaven_apps.configurations.models_d3m impor...
34.483333
78
0.687289
"""Views for the D3M configuration module""" import os import json import mimetypes from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render from django.http import FileResponse from django.http import JsonResponse, HttpResponse, Http404 from tworaven_apps.configurations.models_d3m impor...
0
0
0
91e504578c3d63b648925a07e81f014e6b9c84d0
269
py
Python
packages/pyre/units/angle.py
BryanRiel/pyre
179359634a7091979cced427b6133dd0ec4726ea
[ "BSD-3-Clause" ]
null
null
null
packages/pyre/units/angle.py
BryanRiel/pyre
179359634a7091979cced427b6133dd0ec4726ea
[ "BSD-3-Clause" ]
null
null
null
packages/pyre/units/angle.py
BryanRiel/pyre
179359634a7091979cced427b6133dd0ec4726ea
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2018 all rights reserved # from math import pi as π from .SI import radian degree = π/180 * radian arcminute = degree / 60 arcsecond = arcminute / 60 deg = degree rad = radian # end of file
12.809524
35
0.665428
# -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2018 all rights reserved # from math import pi as π from .SI import radian degree = π/180 * radian arcminute = degree / 60 arcsecond = arcminute / 60 deg = degree rad = radian # end of file
0
0
0
275f38da79e64c11bf85acf4e8479021c8c538ac
1,761
py
Python
Basic Programming/cost_of_balloons.py
Rounak259/HackerEarth
fb6f950f0b68f1c4ffab0a0c17b2e693700c4cb0
[ "MIT" ]
null
null
null
Basic Programming/cost_of_balloons.py
Rounak259/HackerEarth
fb6f950f0b68f1c4ffab0a0c17b2e693700c4cb0
[ "MIT" ]
null
null
null
Basic Programming/cost_of_balloons.py
Rounak259/HackerEarth
fb6f950f0b68f1c4ffab0a0c17b2e693700c4cb0
[ "MIT" ]
null
null
null
test_cases = int(input()) for test in range(1,test_cases+1): if test%2==1: green, purple = input().split() green = int(green) purple = int(purple) participants = int(input()) cost = 0 for participant in range(0,participants): m, n = map(int,inp...
30.894737
80
0.439523
test_cases = int(input()) for test in range(1,test_cases+1): if test%2==1: green, purple = input().split() green = int(green) purple = int(purple) participants = int(input()) cost = 0 for participant in range(0,participants): m, n = map(int,inp...
0
0
0
123c02d7662c7348e1d9e02d2bb74a8f32b1da99
2,290
py
Python
models/loss_function.py
lapras-inc/disk-embedding
09b2faaa81f7fc8080a3817961b740232cabe8e4
[ "Apache-2.0" ]
13
2019-06-15T11:49:00.000Z
2022-02-14T23:59:01.000Z
models/loss_function.py
lapras-inc/disk-embedding
09b2faaa81f7fc8080a3817961b740232cabe8e4
[ "Apache-2.0" ]
null
null
null
models/loss_function.py
lapras-inc/disk-embedding
09b2faaa81f7fc8080a3817961b740232cabe8e4
[ "Apache-2.0" ]
5
2019-08-11T22:30:05.000Z
2021-03-18T22:18:02.000Z
import numpy as np _loss_functions = {} @_register_name("relu") @_register_name("relu_margin") @_register_name("margin") @_register_name("margin_sq")
27.926829
91
0.571179
import numpy as np _loss_functions = {} def get_loss_function(name, **kwargs): return _loss_functions[name](**kwargs) def _register_name(name): def _registerer(cls): _loss_functions[name] = cls return cls return _registerer class LossFunctionBase(object): def __init__(self, margin=0):...
1,629
74
430
63de06da4e7627877fe6be20ce061f5d6bfbb927
324
py
Python
tests/cxx/fixtures/cancelable.py
sankhesh/tomviz
7116f4eb75b30534a24462f4ddfb1694fe41c308
[ "BSD-3-Clause" ]
284
2015-01-05T08:53:20.000Z
2022-03-31T07:35:16.000Z
tests/cxx/fixtures/cancelable.py
sankhesh/tomviz
7116f4eb75b30534a24462f4ddfb1694fe41c308
[ "BSD-3-Clause" ]
1,579
2015-03-19T15:56:44.000Z
2022-03-21T11:29:04.000Z
tests/cxx/fixtures/cancelable.py
sankhesh/tomviz
7116f4eb75b30534a24462f4ddfb1694fe41c308
[ "BSD-3-Clause" ]
74
2015-01-29T16:24:32.000Z
2022-03-07T21:52:29.000Z
import tomviz.operators import time
21.6
57
0.608025
import tomviz.operators import time class TestOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, data): i = 0 while not self.canceled and i < 5: time.sleep(0.1) i += 1 if self.canceled: raise Exception('Quick let get out of here...
202
35
50
ad04e0e1e21e628ae8ad1f1459120bf7aab0288a
2,351
py
Python
corehq/util/tests/test_itertools.py
kkrampa/commcare-hq
d64d7cad98b240325ad669ccc7effb07721b4d44
[ "BSD-3-Clause" ]
1
2020-05-05T13:10:01.000Z
2020-05-05T13:10:01.000Z
corehq/util/tests/test_itertools.py
kkrampa/commcare-hq
d64d7cad98b240325ad669ccc7effb07721b4d44
[ "BSD-3-Clause" ]
1
2019-12-09T14:00:14.000Z
2019-12-09T14:00:14.000Z
corehq/util/tests/test_itertools.py
MaciejChoromanski/commcare-hq
fd7f65362d56d73b75a2c20d2afeabbc70876867
[ "BSD-3-Clause" ]
5
2015-11-30T13:12:45.000Z
2019-07-01T19:27:07.000Z
from __future__ import absolute_import from __future__ import unicode_literals import doctest from collections import namedtuple from testil import eq from corehq.util import itertools from corehq.util.itertools import zip_with_gaps def test_zip_with_gaps_key_funcs(): """ Specifying a keyfunc should use i...
28.325301
89
0.62484
from __future__ import absolute_import from __future__ import unicode_literals import doctest from collections import namedtuple from testil import eq from corehq.util import itertools from corehq.util.itertools import zip_with_gaps def test_doctests(): results = doctest.testmod(itertools) assert results.f...
100
0
50
1c6e77b189e8f858ca9ecb3bf03e4186fa68a13e
15,178
py
Python
codalab_competition_bundle/AutoDL_starting_kit/AutoDL_ingestion_program/ingestion.py
meta-meta-learning/autodl
11f6b1140cee2f0e5d5c67dfd8667a683bf72e84
[ "Apache-2.0" ]
null
null
null
codalab_competition_bundle/AutoDL_starting_kit/AutoDL_ingestion_program/ingestion.py
meta-meta-learning/autodl
11f6b1140cee2f0e5d5c67dfd8667a683bf72e84
[ "Apache-2.0" ]
null
null
null
codalab_competition_bundle/AutoDL_starting_kit/AutoDL_ingestion_program/ingestion.py
meta-meta-learning/autodl
11f6b1140cee2f0e5d5c67dfd8667a683bf72e84
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Usage: python ingestion.py input_dir output_dir ingestion_program_dir submission_program_dir # data result ingestion code of participants # AS A PARTICIPANT, DO NOT MODIFY THIS CODE. # # This is the "ingestion program" written by the organ...
42.396648
123
0.647648
#!/usr/bin/env python # Usage: python ingestion.py input_dir output_dir ingestion_program_dir submission_program_dir # data result ingestion code of participants # AS A PARTICIPANT, DO NOT MODIFY THIS CODE. # # This is the "ingestion program" written by the organ...
84
0
25
fb5df16addacaee937af7c42cc107a85909416a7
6,222
py
Python
crits/emails/email.py
frbapolkosnik/crits
1278c034f2238e2fe34e65e32ce241128a014df2
[ "MIT" ]
22
2015-01-14T19:49:32.000Z
2022-01-26T12:18:52.000Z
crits/emails/email.py
frbapolkosnik/crits
1278c034f2238e2fe34e65e32ce241128a014df2
[ "MIT" ]
null
null
null
crits/emails/email.py
frbapolkosnik/crits
1278c034f2238e2fe34e65e32ce241128a014df2
[ "MIT" ]
6
2015-01-22T21:25:52.000Z
2021-04-12T23:24:14.000Z
import datetime from dateutil.parser import parse as date_parser from mongoengine import Document, StringField, ListField from django.conf import settings from crits.core.crits_mongoengine import CritsBaseAttributes, CritsSourceDocument from crits.core.crits_mongoengine import CritsActionsDocument from crits.core.fie...
40.666667
125
0.545323
import datetime from dateutil.parser import parse as date_parser from mongoengine import Document, StringField, ListField from django.conf import settings from crits.core.crits_mongoengine import CritsBaseAttributes, CritsSourceDocument from crits.core.crits_mongoengine import CritsActionsDocument from crits.core.fie...
0
0
0
f4cfddea8a047aab9ba9e0ae9eb73d49258d63cd
6,569
py
Python
system/shhistory.py
Aareon/stash
d2cc8fbe0488db025883fd8e729094fb92f824b9
[ "MIT" ]
null
null
null
system/shhistory.py
Aareon/stash
d2cc8fbe0488db025883fd8e729094fb92f824b9
[ "MIT" ]
1
2021-05-19T00:55:31.000Z
2021-05-19T00:55:31.000Z
system/shhistory.py
Aareon/stash
d2cc8fbe0488db025883fd8e729094fb92f824b9
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- """ StaSh input history """ import json from stash.lib.libslog import slog _pyfile_ = __file__.split("/")[-1] slog(f'pyfile: {_pyfile_}') from stash.system.shcommon import ShEventNotFound class ShHistory(object): """ This class is responsible for input history. :param stash: the S...
30.133028
85
0.542701
#-*- coding: utf-8 -*- """ StaSh input history """ import json from stash.lib.libslog import slog _pyfile_ = __file__.split("/")[-1] slog(f'pyfile: {_pyfile_}') from stash.system.shcommon import ShEventNotFound class ShHistory(object): """ This class is responsible for input history. :param stash: the S...
558
0
27
4417a2e1bfa7a8164571f08caaee6a6b3c3f25eb
28
py
Python
graphgallery/gallery/linkpred/pytorch/__init__.py
dongzizhu/GraphGallery
c65eab42daeb52de5019609fe7b368e30863b4ae
[ "MIT" ]
1
2020-07-29T08:00:32.000Z
2020-07-29T08:00:32.000Z
graphgallery/gallery/linkpred/pytorch/__init__.py
dongzizhu/GraphGallery
c65eab42daeb52de5019609fe7b368e30863b4ae
[ "MIT" ]
null
null
null
graphgallery/gallery/linkpred/pytorch/__init__.py
dongzizhu/GraphGallery
c65eab42daeb52de5019609fe7b368e30863b4ae
[ "MIT" ]
null
null
null
from .gae import GAE, VGAE
14
27
0.714286
from .gae import GAE, VGAE
0
0
0
01706257c7fe30c31868466a78135daeaaa7dfd5
1,991
py
Python
test/test_fields_home_page.py
itsova/python_training
04876966fe6e522721b149826699697b4a7963b4
[ "Apache-2.0" ]
null
null
null
test/test_fields_home_page.py
itsova/python_training
04876966fe6e522721b149826699697b4a7963b4
[ "Apache-2.0" ]
null
null
null
test/test_fields_home_page.py
itsova/python_training
04876966fe6e522721b149826699697b4a7963b4
[ "Apache-2.0" ]
null
null
null
import re from random import randrange from model.contact import Contact
38.288462
120
0.649925
import re from random import randrange from model.contact import Contact def test_phones_on_home_page(app, db): contact_from_home_page = sorted(app.contact.get_contact_list(), key=Contact.id_or_max) contact_from_db = db.get_contact_list() a = 0 i = len(db.get_contact_list()) while a < i: a...
1,776
0
138
7c30e2834e106d55558d49186be38229a5dd2215
21,183
py
Python
apgl/graph/DictGraph.py
mathemaphysics/APGL
6ca7c176e04017feeae00c4cee069fd126df0fbc
[ "BSD-3-Clause" ]
13
2015-02-19T14:39:09.000Z
2021-04-12T01:22:32.000Z
apgl/graph/DictGraph.py
mathemaphysics/APGL
6ca7c176e04017feeae00c4cee069fd126df0fbc
[ "BSD-3-Clause" ]
1
2020-07-29T07:09:33.000Z
2020-07-29T07:09:33.000Z
apgl/graph/DictGraph.py
mathemaphysics/APGL
6ca7c176e04017feeae00c4cee069fd126df0fbc
[ "BSD-3-Clause" ]
7
2015-03-16T07:26:49.000Z
2021-01-12T06:57:27.000Z
import numpy import heapq import scipy.sparse from apgl.graph.AbstractSingleGraph import AbstractSingleGraph class DictGraph(AbstractSingleGraph): """ A graph with nodes stored in a dictionary. In particular the graph data structure is a dict of dicts. Edges and vertices can be labeled with anything. ...
34.783251
112
0.588491
import numpy import heapq import scipy.sparse from apgl.graph.AbstractSingleGraph import AbstractSingleGraph class DictGraph(AbstractSingleGraph): """ A graph with nodes stored in a dictionary. In particular the graph data structure is a dict of dicts. Edges and vertices can be labeled with anything. ...
361
0
27
ef3ac15b2c176a3497ff582a262eb531ee8317d7
2,890
py
Python
rubik/index_picker.py
Borsos/rubik
af220a142b81a8f5b5011e4e072be9e3d130e827
[ "Apache-2.0" ]
1
2019-11-13T00:44:09.000Z
2019-11-13T00:44:09.000Z
rubik/index_picker.py
Borsos/rubik
af220a142b81a8f5b5011e4e072be9e3d130e827
[ "Apache-2.0" ]
null
null
null
rubik/index_picker.py
Borsos/rubik
af220a142b81a8f5b5011e4e072be9e3d130e827
[ "Apache-2.0" ]
1
2019-11-13T00:47:16.000Z
2019-11-13T00:47:16.000Z
#!/usr/bin/env python3 # # Copyright 2014 Simone Campagna # # 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 ...
30.421053
78
0.554671
#!/usr/bin/env python3 # # Copyright 2014 Simone Campagna # # 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 ...
1,920
278
23
31e1c8420eb5a4921e67af2b0911a530e41a3f1a
5,165
py
Python
src/kem/newhopenist/upstream/scripts/PQsecurity.py
gabrielgauthier/liboqs-test
1ead2e2b6e89a8dddcdf89393cc00cbbf37a6d23
[ "MIT" ]
null
null
null
src/kem/newhopenist/upstream/scripts/PQsecurity.py
gabrielgauthier/liboqs-test
1ead2e2b6e89a8dddcdf89393cc00cbbf37a6d23
[ "MIT" ]
null
null
null
src/kem/newhopenist/upstream/scripts/PQsecurity.py
gabrielgauthier/liboqs-test
1ead2e2b6e89a8dddcdf89393cc00cbbf37a6d23
[ "MIT" ]
null
null
null
from math import * from decimal import * getcontext().prec = 30 log_infinity = 9999 global_log2_eps = 0 ## The root hermite factor delta of BKZ-b ## log_2 of best plausible Quantum Cost of SVP in dimension b ## log_2 of best plausible Quantum Cost of SVP in dimension b ## log_2 of best known Quantum Cost of SVP...
30.382353
184
0.658858
from math import * from decimal import * getcontext().prec = 30 log_infinity = 9999 global_log2_eps = 0 ## The root hermite factor delta of BKZ-b def delta_BKZ(b): return ( (pi*b)**(1./b) * b / (2*pi*exp(1)))**(1./(2.*b-2.)) ## log_2 of best plausible Quantum Cost of SVP in dimension b def svp_plausible(b): ret...
3,605
0
200
cb5ae017ceb6c55016c18af4c146a8c2500de974
6,124
py
Python
participant_data.py
FrancoisNadeau/cimaqprep
df8b60997546cbe563628c27a24fd147ae2ad397
[ "MIT" ]
null
null
null
participant_data.py
FrancoisNadeau/cimaqprep
df8b60997546cbe563628c27a24fd147ae2ad397
[ "MIT" ]
null
null
null
participant_data.py
FrancoisNadeau/cimaqprep
df8b60997546cbe563628c27a24fd147ae2ad397
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import nibabel as nib import nilearn #from nilearn import masking #from nilearn.plotting import plot_stat_map, plot_anat, plot_img, plot_epi #from nilearn.image import concat_imgs, mean_img #from nilearn.input_data import NiftiMasker import numpy as np import os from typing import Union import p...
48.220472
108
0.596506
#!/usr/bin/env python3 import nibabel as nib import nilearn #from nilearn import masking #from nilearn.plotting import plot_stat_map, plot_anat, plot_img, plot_epi #from nilearn.image import concat_imgs, mean_img #from nilearn.input_data import NiftiMasker import numpy as np import os from typing import Union import p...
3,345
0
49
99bb7a5d56cf6bb27fe5dc96fc18d5c763afea9b
2,278
py
Python
evaulate_tf.py
RsTaK/saarthi-task
c0653b251afba46b0572bd7a16f5933e07ee2541
[ "MIT" ]
null
null
null
evaulate_tf.py
RsTaK/saarthi-task
c0653b251afba46b0572bd7a16f5933e07ee2541
[ "MIT" ]
null
null
null
evaulate_tf.py
RsTaK/saarthi-task
c0653b251afba46b0572bd7a16f5933e07ee2541
[ "MIT" ]
null
null
null
import pickle from numpy.lib.function_base import append import pandas as pd import argparse from torch.utils import data from torch.utils.data import dataset from src.tensorflow.model import TfModel from config.tensorflow.text_config import Config from src.pytorch.label_encoding import get_encoding from src.tensorf...
29.973684
109
0.71115
import pickle from numpy.lib.function_base import append import pandas as pd import argparse from torch.utils import data from torch.utils.data import dataset from src.tensorflow.model import TfModel from config.tensorflow.text_config import Config from src.pytorch.label_encoding import get_encoding from src.tensorf...
944
0
69
c633d6f9a7c19e158ab38c56d1c539fc4e650d0f
1,802
py
Python
open/core/betterself/serializers/food_log_serializers.py
lawrendran/open
d136f694bafab647722c78be6f39ec79d589f774
[ "MIT" ]
105
2019-06-01T08:34:47.000Z
2022-03-15T11:48:36.000Z
open/core/betterself/serializers/food_log_serializers.py
lawrendran/open
d136f694bafab647722c78be6f39ec79d589f774
[ "MIT" ]
111
2019-06-04T15:34:14.000Z
2022-03-12T21:03:20.000Z
open/core/betterself/serializers/food_log_serializers.py
lawrendran/open
d136f694bafab647722c78be6f39ec79d589f774
[ "MIT" ]
26
2019-09-04T06:06:12.000Z
2022-01-03T03:40:11.000Z
from rest_framework.exceptions import ValidationError from rest_framework.fields import UUIDField from open.core.betterself.models.food import Food from open.core.betterself.models.food_logs import FoodLog from open.core.betterself.serializers.mixins import ( BaseCreateUpdateSerializer, BaseModelReadSerializer...
29.064516
86
0.63374
from rest_framework.exceptions import ValidationError from rest_framework.fields import UUIDField from open.core.betterself.models.food import Food from open.core.betterself.models.food_logs import FoodLog from open.core.betterself.serializers.mixins import ( BaseCreateUpdateSerializer, BaseModelReadSerializer...
600
645
46
38a720048d670c13d4523a477856b7bad29e0145
54,711
py
Python
pgpy/packet/packets.py
J08nY/PGPy
934787ae73016ed7204acfe8827a50d1ac06c85a
[ "BSD-3-Clause" ]
null
null
null
pgpy/packet/packets.py
J08nY/PGPy
934787ae73016ed7204acfe8827a50d1ac06c85a
[ "BSD-3-Clause" ]
null
null
null
pgpy/packet/packets.py
J08nY/PGPy
934787ae73016ed7204acfe8827a50d1ac06c85a
[ "BSD-3-Clause" ]
1
2019-02-14T09:54:29.000Z
2019-02-14T09:54:29.000Z
""" packet.py """ import abc import binascii import calendar import copy import hashlib import os import re from datetime import datetime import six from cryptography.hazmat.primitives import constant_time from cryptography.hazmat.primitives.asymmetric import padding from .fields import DSAPriv, DSAPub, DSASignatur...
34.066625
115
0.662938
""" packet.py """ import abc import binascii import calendar import copy import hashlib import os import re from datetime import datetime import six from cryptography.hazmat.primitives import constant_time from cryptography.hazmat.primitives.asymmetric import padding from .fields import DSAPriv, DSAPub, DSASignatur...
23,179
1,907
2,662
26668799d3ba145f4ec2f782495c153ee9579a32
556
py
Python
chapter07/7.1.2_generate_text.py
Myeonghan-Jeong/Deep-learning-from-scratch2
9a6df82b4e0eef89926e59a175b7b8f83754ba2f
[ "MIT" ]
null
null
null
chapter07/7.1.2_generate_text.py
Myeonghan-Jeong/Deep-learning-from-scratch2
9a6df82b4e0eef89926e59a175b7b8f83754ba2f
[ "MIT" ]
1
2021-08-23T20:42:43.000Z
2021-08-23T20:42:43.000Z
chapter07/7.1.2_generate_text.py
Myeonghan-Jeong/Deep-learning-from-scratch2
9a6df82b4e0eef89926e59a175b7b8f83754ba2f
[ "MIT" ]
2
2019-12-29T08:47:08.000Z
2020-07-18T15:24:09.000Z
from datasets import ptb from rnnlm_gen import RNNLMGen corpus, word_to_id, id_to_word = ptb.load_data('train') vocab_size = len(word_to_id) corpus_size = len(corpus) model = RNNLMGen() # model.load_params('./chapter06/RNNLM.pkl') # set start and skip word start_word = 'you' start_id = word_to_id[start_word] skip_wo...
25.272727
55
0.717626
from datasets import ptb from rnnlm_gen import RNNLMGen corpus, word_to_id, id_to_word = ptb.load_data('train') vocab_size = len(word_to_id) corpus_size = len(corpus) model = RNNLMGen() # model.load_params('./chapter06/RNNLM.pkl') # set start and skip word start_word = 'you' start_id = word_to_id[start_word] skip_wo...
0
0
0