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
2caf5d5429d89c7da649be2382fb440d0361ac1a
1,950
py
Python
scrape_twitter.py
Aiyubi/twitter-analyzer
108e4fbf485594a5a9135ca422131423a90302d8
[ "MIT" ]
null
null
null
scrape_twitter.py
Aiyubi/twitter-analyzer
108e4fbf485594a5a9135ca422131423a90302d8
[ "MIT" ]
null
null
null
scrape_twitter.py
Aiyubi/twitter-analyzer
108e4fbf485594a5a9135ca422131423a90302d8
[ "MIT" ]
null
null
null
import database_model as db from database_model import Politician, Tweet, Hashtag import sqlalchemy import twint import arrow if __name__ == "__main__": fill_database()
28.26087
96
0.547179
import database_model as db from database_model import Politician, Tweet, Hashtag import sqlalchemy import twint import arrow def get_tweets(twitter_handle,since,until): c = twint.Config() c.Username = twitter_handle c.Pandas = True c.Hide_output = True #c.Retries_count = 1 c.Retweets = True ...
1,727
0
46
6ab436fc56656bd0a166758dd3675cc7c4ea8e81
153,705
py
Python
Lib/site-packages/IPython/core/interactiveshell.py
hirorin-demon/hirorin-streamlit
03fbb6f03ec94f909d451e708a3b30b177607695
[ "0BSD" ]
3
2021-03-29T19:21:08.000Z
2021-12-31T09:30:11.000Z
Lib/site-packages/IPython/core/interactiveshell.py
hirorin-demon/hirorin-streamlit
03fbb6f03ec94f909d451e708a3b30b177607695
[ "0BSD" ]
2
2021-12-04T12:51:07.000Z
2021-12-04T16:49:18.000Z
Lib/site-packages/IPython/core/interactiveshell.py
hirorin-demon/hirorin-streamlit
03fbb6f03ec94f909d451e708a3b30b177607695
[ "0BSD" ]
1
2021-03-30T05:02:53.000Z
2021-03-30T05:02:53.000Z
# -*- coding: utf-8 -*- """Main IPython class.""" #----------------------------------------------------------------------------- # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> # Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu> # Copyright (C) 2008-2011 The IPython Development Team # # Distribu...
40.236911
147
0.592076
# -*- coding: utf-8 -*- """Main IPython class.""" #----------------------------------------------------------------------------- # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> # Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu> # Copyright (C) 2008-2011 The IPython Development Team # # Distribu...
22,915
14
1,687
c1200136115196f12f5dc1202f6193b76d966255
6,935
py
Python
predict/gpt_predict.py
yyht/gpt2_ml_my
e0a5fae90022ecf97c4f244cfd3aa8a418787296
[ "Apache-2.0" ]
null
null
null
predict/gpt_predict.py
yyht/gpt2_ml_my
e0a5fae90022ecf97c4f244cfd3aa8a418787296
[ "Apache-2.0" ]
null
null
null
predict/gpt_predict.py
yyht/gpt2_ml_my
e0a5fae90022ecf97c4f244cfd3aa8a418787296
[ "Apache-2.0" ]
null
null
null
import sys,os father_path = os.path.join(os.getcwd()) print(father_path, "==father path==") bert_path = find_bert(father_path) # t2t_bert_path = os.path.join(bert_path, "t2t_bert") # sys.path.extend([bert_path, t2t_bert_path]) sys.path.extend([bert_path]) print(sys.path) from predict import AppPredictor from predi...
44.455128
133
0.65119
import sys,os father_path = os.path.join(os.getcwd()) print(father_path, "==father path==") def find_bert(father_path): if father_path.split("/")[-1] == "gpt2_ml_my": return father_path output_path = "" for fi in os.listdir(father_path): if fi == "gpt2_ml_my": output_path = o...
448
3,700
46
ccd87448f7fcf54feb0817a1ca3ee00d9ad0bc89
1,930
py
Python
order-1_voronoi/core/geometry/Ray.py
bzliu94/algorithms
43ccefd7ea1fd88339bf2afa0b35b0a3bdf6acff
[ "MIT" ]
null
null
null
order-1_voronoi/core/geometry/Ray.py
bzliu94/algorithms
43ccefd7ea1fd88339bf2afa0b35b0a3bdf6acff
[ "MIT" ]
null
null
null
order-1_voronoi/core/geometry/Ray.py
bzliu94/algorithms
43ccefd7ea1fd88339bf2afa0b35b0a3bdf6acff
[ "MIT" ]
null
null
null
# constrained version of a line # has direction from Line import * """ ray1 = Ray((0, 0), (0, 1)) print ray1.getBase() print ray1.getDirectionVector() ray2 = Ray((1, 1), (-1, 0)) print ray1.doesIntersectWithRay(ray2) print ray1.intersectWithRay(ray2) """
17.87037
96
0.646632
# constrained version of a line # has direction from Line import * class Ray: def __init__(self, base, direction_vector): self.base = base self.direction_vector = direction_vector self.line = Line(base, direction_vector) def getBase(self): return self.base def setBase...
1,090
526
24
8608d8cb73b28b9b1b106887d5308377e5628df2
6,738
py
Python
tester/VAE_tester.py
y-x-c/electricauth
1c223e9883b9e6382eabbf9a42629e471e039c4e
[ "MIT" ]
1
2021-05-01T16:05:19.000Z
2021-05-01T16:05:19.000Z
tester/VAE_tester.py
y-x-c/electricauth
1c223e9883b9e6382eabbf9a42629e471e039c4e
[ "MIT" ]
null
null
null
tester/VAE_tester.py
y-x-c/electricauth
1c223e9883b9e6382eabbf9a42629e471e039c4e
[ "MIT" ]
null
null
null
import torch from torch import nn import numpy as np import pickle import os from model.VAE import VAE from data.normalization import ChallengeNormalizer from util.utils import iterate_minibatches from util.cache import load_model, save_model from config.general import cache_dir
35.277487
80
0.532057
import torch from torch import nn import numpy as np import pickle import os from model.VAE import VAE from data.normalization import ChallengeNormalizer from util.utils import iterate_minibatches from util.cache import load_model, save_model from config.general import cache_dir class VAETester(object): def ...
6,346
3
108
f704f29d917dfbd51e439f0dd5292f602da50c6f
8,655
py
Python
modelci/experimental/model/model_structure.py
FerdinandZhong/ML-Model-CI
90fa2de056dca05031f0787b96c520dc57dc664d
[ "Apache-2.0" ]
170
2020-06-08T18:30:52.000Z
2022-03-28T12:08:11.000Z
modelci/experimental/model/model_structure.py
FerdinandZhong/ML-Model-CI
90fa2de056dca05031f0787b96c520dc57dc664d
[ "Apache-2.0" ]
146
2020-06-14T18:56:27.000Z
2022-02-27T21:15:59.000Z
modelci/experimental/model/model_structure.py
FerdinandZhong/ML-Model-CI
90fa2de056dca05031f0787b96c520dc57dc664d
[ "Apache-2.0" ]
36
2020-06-08T18:30:56.000Z
2022-03-07T18:10:19.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Author: Li Yuanming Email: yli056@e.ntu.edu.sg Date: 1/27/2021 ML model structure definitions. """ import abc import inspect from enum import Enum from typing import Optional, Union, Tuple, Dict, OrderedDict from pydantic import BaseModel, PositiveInt, conint, Positiv...
34.209486
115
0.669324
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Author: Li Yuanming Email: yli056@e.ntu.edu.sg Date: 1/27/2021 ML model structure definitions. """ import abc import inspect from enum import Enum from typing import Optional, Union, Tuple, Dict, OrderedDict from pydantic import BaseModel, PositiveInt, conint, Positiv...
104
1,864
345
b504e628f2cdcc4f38f3aade7b0ba05e7c24f2f0
1,646
py
Python
A_Web_Crawler_With_asyncio_Coroutines/simple_epoll.py
czs0x55aa/500lines_homework
a67a144181afadae387e2889f5ae29565e76cdad
[ "MIT" ]
null
null
null
A_Web_Crawler_With_asyncio_Coroutines/simple_epoll.py
czs0x55aa/500lines_homework
a67a144181afadae387e2889f5ae29565e76cdad
[ "MIT" ]
null
null
null
A_Web_Crawler_With_asyncio_Coroutines/simple_epoll.py
czs0x55aa/500lines_homework
a67a144181afadae387e2889f5ae29565e76cdad
[ "MIT" ]
null
null
null
# coding=utf8 import socket from selectors2 import DefaultSelector, EVENT_READ, EVENT_WRITE import time url = 'xkcd.com' selector = DefaultSelector() stopped = False res = [] @log_time loop()
25.323077
78
0.58627
# coding=utf8 import socket from selectors2 import DefaultSelector, EVENT_READ, EVENT_WRITE import time url = 'xkcd.com' selector = DefaultSelector() stopped = False res = [] def log_time(func): def wrapper(*args, **kw): start_time = time.time() func(*args, **kw) print(time.time() - start...
1,273
1
175
e3221b92d4c086b255ccba4f1681b82d8200ae10
111
py
Python
plydata/tidy/__init__.py
has2k1/plydata
d9d022def44ade656fbb39c16d2f7fe45e9e96da
[ "BSD-3-Clause" ]
247
2017-05-06T08:56:29.000Z
2022-03-16T00:36:35.000Z
plydata/tidy/__init__.py
sthagen/plydata
7ecbabaae8af68e9d9b094ba1830cf8008746eca
[ "BSD-3-Clause" ]
28
2017-05-19T06:52:32.000Z
2022-02-17T10:41:47.000Z
plydata/tidy/__init__.py
sthagen/plydata
7ecbabaae8af68e9d9b094ba1830cf8008746eca
[ "BSD-3-Clause" ]
14
2017-05-14T11:47:16.000Z
2020-11-20T18:07:49.000Z
from .tidy_verbs import * # noqa from .. import _get_all_imports __all__ = _get_all_imports(globals())
18.5
38
0.720721
from .tidy_verbs import * # noqa from .. import _get_all_imports __all__ = _get_all_imports(globals())
0
0
0
b0d8d503d87f4c7477bf414c0a0b0d08d59bc8a0
321
py
Python
SoftUni-Basic/conditional_statements/exercises/sum_seconds.py
Darkartt/SoftUni
23d65ddb9f1e454c9b1338a60dc52f5a64c30bc9
[ "MIT" ]
null
null
null
SoftUni-Basic/conditional_statements/exercises/sum_seconds.py
Darkartt/SoftUni
23d65ddb9f1e454c9b1338a60dc52f5a64c30bc9
[ "MIT" ]
null
null
null
SoftUni-Basic/conditional_statements/exercises/sum_seconds.py
Darkartt/SoftUni
23d65ddb9f1e454c9b1338a60dc52f5a64c30bc9
[ "MIT" ]
null
null
null
import math time_first = int(input()) time_second = int(input()) time_third = int(input()) time_total = time_first + time_second + time_third minutes = time_total / 60 seconds = time_total % 60 minutes = math.floor(minutes) if seconds < 10: print(f"{minutes}:0{seconds}") else: print(f"{minutes}:{seconds}"...
17.833333
50
0.694704
import math time_first = int(input()) time_second = int(input()) time_third = int(input()) time_total = time_first + time_second + time_third minutes = time_total / 60 seconds = time_total % 60 minutes = math.floor(minutes) if seconds < 10: print(f"{minutes}:0{seconds}") else: print(f"{minutes}:{seconds}"...
0
0
0
1b497317ae49a6c90d84306a0a250f271b310138
1,103
py
Python
arrays/knapsack.py
santoshmano/pybricks
bcb3ab80417e8e896280062494ce6c046329b7e8
[ "MIT" ]
null
null
null
arrays/knapsack.py
santoshmano/pybricks
bcb3ab80417e8e896280062494ce6c046329b7e8
[ "MIT" ]
null
null
null
arrays/knapsack.py
santoshmano/pybricks
bcb3ab80417e8e896280062494ce6c046329b7e8
[ "MIT" ]
null
null
null
""" Problem below is i did not know what is the return, return list of items or return maximum def knapsack(items, cur_items_index, capacity, weights, profits, cur_items, cur_profit, cur_weight, max_items, max_profit): if (cur_items_index > len(items)-1) or \ cur_weight < ca...
19.017241
59
0.572983
""" Problem below is i did not know what is the return, return list of items or return maximum def knapsack(items, cur_items_index, capacity, weights, profits, cur_items, cur_profit, cur_weight, max_items, max_profit): if (cur_items_index > len(items)-1) or \ cur_weight < ca...
448
0
92
9a86321bc99e59584ded292cf3d45149e72fc968
18
py
Python
alphastarmini/core/rl/__init__.py
liuruoze/mini-AlphaStar
cf9de2507d526a5fb8ef67676aab2ffb92738640
[ "Apache-2.0" ]
108
2021-02-10T13:24:56.000Z
2022-03-21T09:58:28.000Z
alphastarmini/core/rl/__init__.py
liuruoze/mini-AlphaStar
cf9de2507d526a5fb8ef67676aab2ffb92738640
[ "Apache-2.0" ]
21
2021-04-09T18:46:05.000Z
2022-03-29T02:44:15.000Z
alphastarmini/core/rl/__init__.py
liuruoze/mini-AlphaStar
cf9de2507d526a5fb8ef67676aab2ffb92738640
[ "Apache-2.0" ]
19
2021-08-03T01:49:02.000Z
2022-03-30T10:21:13.000Z
print("rl init")
9
17
0.611111
print("rl init")
0
0
0
9a09ebfa2f810688ce7260dec841f4fdfca5030f
1,418
py
Python
src/aeat/zeep_plugins.py
initios/aeat-web-services
3e9533c6f5675df679ea6b42b07304ba938ebcb5
[ "MIT" ]
7
2018-01-04T10:57:54.000Z
2021-07-30T09:56:22.000Z
src/aeat/zeep_plugins.py
initios/aeat-web-services
3e9533c6f5675df679ea6b42b07304ba938ebcb5
[ "MIT" ]
18
2018-01-04T10:27:01.000Z
2018-02-20T13:56:19.000Z
src/aeat/zeep_plugins.py
initios/aeat-web-services
3e9533c6f5675df679ea6b42b07304ba938ebcb5
[ "MIT" ]
2
2018-11-07T09:07:50.000Z
2020-12-10T09:47:00.000Z
import logging from lxml import etree from zeep import Plugin from aeat import utils, xml_signing logger = logging.getLogger(__name__) class RawXMLPlugin(object): ''' Stores last request and response as str '''
28.938776
84
0.669958
import logging from lxml import etree from zeep import Plugin from aeat import utils, xml_signing logger = logging.getLogger(__name__) class SignMessagePlugin(Plugin): def __init__(self, cert_path, key_path): self.cert_path = cert_path self.key_path = key_path def egress(self, envelope, ht...
499
587
103
6378199739a1aed1222e18763f9208733ce55447
253
py
Python
handlers/users/help.py
nomadroom/Media_Bot
59f70d1f1cbda254e6cc0f6a10c88dd05456f797
[ "MIT" ]
null
null
null
handlers/users/help.py
nomadroom/Media_Bot
59f70d1f1cbda254e6cc0f6a10c88dd05456f797
[ "MIT" ]
null
null
null
handlers/users/help.py
nomadroom/Media_Bot
59f70d1f1cbda254e6cc0f6a10c88dd05456f797
[ "MIT" ]
1
2020-12-18T08:49:41.000Z
2020-12-18T08:49:41.000Z
from aiogram import types from data import config from loader import dp from utils.misc import rate_limit @rate_limit(5, 'help') @dp.message_handler(commands=['help'])
21.083333
41
0.774704
from aiogram import types from data import config from loader import dp from utils.misc import rate_limit @rate_limit(5, 'help') @dp.message_handler(commands=['help']) async def help(message: types.Message): await message.answer(config.HELP_MSG)
60
0
22
0299cbaad215befbf276c561c700aae7ec4b67af
400
py
Python
ProjectEuler/python/prob5.py
yuriyshapovalov/Prototypes
1fc4af4434440a8f59a4bcb486e79fd53d199a7d
[ "Apache-2.0" ]
null
null
null
ProjectEuler/python/prob5.py
yuriyshapovalov/Prototypes
1fc4af4434440a8f59a4bcb486e79fd53d199a7d
[ "Apache-2.0" ]
1
2015-03-25T22:35:52.000Z
2015-03-25T22:35:52.000Z
ProjectEuler/python/prob5.py
yuriyshapovalov/Prototypes
1fc4af4434440a8f59a4bcb486e79fd53d199a7d
[ "Apache-2.0" ]
null
null
null
# projecteuler.net/problem=5 if __name__ == '__main__': main()
19.047619
32
0.4625
# projecteuler.net/problem=5 def main(): answer = SmallestMultiple() print(answer) def SmallestMultiple(): num = 1 while True: found = True for i in range(1, 20): if num % i != 0: found = False break if found: ...
278
0
50
3c03c6604a634b3a6acbad3e149fefccfb24ec00
4,251
py
Python
src/sardana/taurus/core/tango/sardana/test/test_measgrpstress.py
marc2332/sardana
48dc9191baaa63f6c714d8c025e8f3f96548ad26
[ "CC-BY-3.0" ]
43
2016-11-25T15:21:23.000Z
2021-08-20T06:09:40.000Z
src/sardana/taurus/core/tango/sardana/test/test_measgrpstress.py
marc2332/sardana
48dc9191baaa63f6c714d8c025e8f3f96548ad26
[ "CC-BY-3.0" ]
1,263
2016-11-25T15:58:37.000Z
2021-11-02T22:23:47.000Z
src/sardana/taurus/core/tango/sardana/test/test_measgrpstress.py
marc2332/sardana
48dc9191baaa63f6c714d8c025e8f3f96548ad26
[ "CC-BY-3.0" ]
58
2016-11-21T11:33:55.000Z
2021-09-01T06:21:21.000Z
#!/usr/bin/env python ############################################################################## ## # This file is part of Sardana ## # http://www.sardana-controls.org/ ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Sardana is free software: you can redistribute it and/or modify # it under th...
43.377551
78
0.646201
#!/usr/bin/env python ############################################################################## ## # This file is part of Sardana ## # http://www.sardana-controls.org/ ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Sardana is free software: you can redistribute it and/or modify # it under th...
1,305
39
103
c968e0d7921d29de8adfe7443a130ae7c6d0a721
989
py
Python
bot_functions.py
lozik4/telegram_forward_message_bot
c38938e9cc54c3e460c0da84f62788a028d59a7c
[ "MIT" ]
null
null
null
bot_functions.py
lozik4/telegram_forward_message_bot
c38938e9cc54c3e460c0da84f62788a028d59a7c
[ "MIT" ]
null
null
null
bot_functions.py
lozik4/telegram_forward_message_bot
c38938e9cc54c3e460c0da84f62788a028d59a7c
[ "MIT" ]
null
null
null
import config import telebot bot = telebot.TeleBot(config.BOT_TOKEN) @bot.message_handler(commands=['start']) @bot.message_handler(content_types=["text"]) if __name__ == '__main__': bot.polling(none_stop=True)
32.966667
111
0.613751
import config import telebot bot = telebot.TeleBot(config.BOT_TOKEN) @bot.message_handler(commands=['start']) def welcome(message): if int(message.chat.id) not in config.CHAT_LIST: bot.send_message(config.OWNER_CHAT_ID, str(message.chat.id) + ': ' + f"{message.text} {message.fro...
728
0
44
d3e6742cee38d98b12987dc06da9bcb0ebcd9f0c
1,535
py
Python
src/simulation.py
bok/AI-with-Pyke
f56314679b7ade698237e585152b52a81d8ffbd4
[ "WTFPL" ]
10
2016-03-23T10:14:17.000Z
2022-01-18T09:04:02.000Z
src/simulation.py
mhbashari/AI-with-Pyke
f56314679b7ade698237e585152b52a81d8ffbd4
[ "WTFPL" ]
null
null
null
src/simulation.py
mhbashari/AI-with-Pyke
f56314679b7ade698237e585152b52a81d8ffbd4
[ "WTFPL" ]
3
2016-01-18T04:42:20.000Z
2019-11-09T19:36:23.000Z
#!/usr/bin/python2 # -*- coding: utf-8 -*- ##################################################################### # This program is free software. It comes without any warranty, to # # the extent permitted by applicable law. You can redistribute it # # and/or modify it under the terms of the Do What The Fuck You Wan...
26.465517
72
0.50684
#!/usr/bin/python2 # -*- coding: utf-8 -*- ##################################################################### # This program is free software. It comes without any warranty, to # # the extent permitted by applicable law. You can redistribute it # # and/or modify it under the terms of the Do What The Fuck You Wan...
0
0
0
d23ecf42866090a56ff27064afd591e5b295d316
296
py
Python
exercise063.py
AlissonRaphael/python_exercises
3f1185c4f2fff24c9fa2ffd6b60f90599044c985
[ "MIT" ]
null
null
null
exercise063.py
AlissonRaphael/python_exercises
3f1185c4f2fff24c9fa2ffd6b60f90599044c985
[ "MIT" ]
null
null
null
exercise063.py
AlissonRaphael/python_exercises
3f1185c4f2fff24c9fa2ffd6b60f90599044c985
[ "MIT" ]
null
null
null
n = int(input('---- Sequência Fibonacci ----\nInsira a quantidade de termos: ')) t1 = 0 t2 = 1 print('{} -> {}'.format(t1, t2), end='') contador = 3 while contador <= n+1: t3 = t1 + t2 print(' -> {}'.format(t3) if contador != n+1 else ' -> Fim', end='') t1 = t2 t2 = t3 contador += 1
21.142857
80
0.537162
n = int(input('---- Sequência Fibonacci ----\nInsira a quantidade de termos: ')) t1 = 0 t2 = 1 print('{} -> {}'.format(t1, t2), end='') contador = 3 while contador <= n+1: t3 = t1 + t2 print(' -> {}'.format(t3) if contador != n+1 else ' -> Fim', end='') t1 = t2 t2 = t3 contador += 1
0
0
0
bcea2a15e3045a7bb54691ccb2044393f7af6f60
5,506
py
Python
pages/admin_pages.py
wilsonpe66/server-backend
16665d810fe1829f5dacc67f396b7cecf5af042f
[ "BSD-3-Clause" ]
1
2019-09-26T04:00:55.000Z
2019-09-26T04:00:55.000Z
pages/admin_pages.py
wilsonpe66/server-backend
16665d810fe1829f5dacc67f396b7cecf5af042f
[ "BSD-3-Clause" ]
2
2020-06-05T21:58:55.000Z
2021-06-10T21:45:08.000Z
pages/admin_pages.py
wilsonpe66/server-backend
16665d810fe1829f5dacc67f396b7cecf5af042f
[ "BSD-3-Clause" ]
1
2019-09-26T03:55:06.000Z
2019-09-26T03:55:06.000Z
import json from flask import Blueprint, flash, Markup, redirect, render_template, request,\ session from libs import admin_authentication from libs.admin_authentication import authenticate_admin_login,\ authenticate_admin_study_access, get_admins_allowed_studies, get_admins_allowed_studies_as_query_set,\ ...
37.202703
115
0.710316
import json from flask import Blueprint, flash, Markup, redirect, render_template, request,\ session from libs import admin_authentication from libs.admin_authentication import authenticate_admin_login,\ authenticate_admin_study_access, get_admins_allowed_studies, get_admins_allowed_studies_as_query_set,\ ...
3,511
0
176
2a12aeb72a1c289e7972cf3e45dcc3adfaa7d325
471
py
Python
app/webcamera.py
thomsen85/LegoPokerDealer
89fbf0123d1f4463493801349ad8b5ab06705a83
[ "MIT" ]
4
2021-11-02T11:34:57.000Z
2021-11-23T23:30:30.000Z
app/webcamera.py
thomsen85/LegoPokerDealer
89fbf0123d1f4463493801349ad8b5ab06705a83
[ "MIT" ]
9
2021-11-16T22:59:17.000Z
2021-11-17T16:59:51.000Z
app/webcamera.py
thomsen85/LegoPokerDealer
89fbf0123d1f4463493801349ad8b5ab06705a83
[ "MIT" ]
null
null
null
import cv2
26.166667
61
0.577495
import cv2 class Webcamera: def __init__(self): self.cap = cv2.VideoCapture(0) self.width = self.cap.get(cv2.CAP_PROP_FRAME_WIDTH) self.height = self.cap.get(cv2.CAP_PROP_FRAME_HEIGHT) def get_frame(self): if self.cap.isOpened(): ret, frame = self.cap.read() ...
363
-5
103
b697b66b0470d29f2c00ec28a6bf80479e97e41a
1,047
py
Python
thelma/repositories/rdb/mappers/stocksamplecreationiso.py
fogathmann/TheLMA
ac330a0005da4fea2f1387da9ff9938611ad1481
[ "MIT" ]
1
2020-07-12T22:47:58.000Z
2020-07-12T22:47:58.000Z
thelma/repositories/rdb/mappers/stocksamplecreationiso.py
papagr/TheLMA
d2dc7a478ee5d24ccf3cc680888e712d482321d0
[ "MIT" ]
null
null
null
thelma/repositories/rdb/mappers/stocksamplecreationiso.py
papagr/TheLMA
d2dc7a478ee5d24ccf3cc680888e712d482321d0
[ "MIT" ]
1
2020-07-12T22:40:36.000Z
2020-07-12T22:40:36.000Z
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Stock sample creation ISO mapper. """ from sqlalchemy.orm import relationship from everest.repositories.rdb.utils import mapper from thelma.entities.iso im...
33.774194
80
0.719198
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Stock sample creation ISO mapper. """ from sqlalchemy.orm import relationship from everest.repositories.rdb.utils import mapper from thelma.entities.iso im...
0
0
0
1db8e2d6ecfe2c414d16fb5ab0cc22df65dbf5d1
554
py
Python
plynx/web/state.py
live-wire/plynx
ed29db2b7880ed512974cd98993587886763a5f5
[ "Apache-2.0" ]
null
null
null
plynx/web/state.py
live-wire/plynx
ed29db2b7880ed512974cd98993587886763a5f5
[ "Apache-2.0" ]
null
null
null
plynx/web/state.py
live-wire/plynx
ed29db2b7880ed512974cd98993587886763a5f5
[ "Apache-2.0" ]
null
null
null
from plynx.db.service_state import get_master_state from plynx.utils.common import JSONEncoder from plynx.web.common import app, requires_auth, make_fail_response, handle_errors @app.route('/plynx/api/v0/master_state', methods=['GET']) @handle_errors @requires_auth
30.777778
82
0.689531
from plynx.db.service_state import get_master_state from plynx.utils.common import JSONEncoder from plynx.web.common import app, requires_auth, make_fail_response, handle_errors @app.route('/plynx/api/v0/master_state', methods=['GET']) @handle_errors @requires_auth def master_state(): try: return JSONEnco...
264
0
22
8dd65d8ff868d942dd315277a04f874fe386cf3e
2,154
py
Python
tls.py
0x1F9F1/binja-msvc
be2577c22c8d37fd1e2e211f80b1c9a920705bd2
[ "MIT" ]
9
2019-02-08T10:01:39.000Z
2021-04-29T12:27:34.000Z
tls.py
DatBrick/binja-msvc
751ffc1450c569bad23ac67a761d0f1fbd4ca4c4
[ "MIT" ]
1
2019-07-04T20:09:57.000Z
2019-07-12T11:10:15.000Z
tls.py
DatBrick/binja-msvc
751ffc1450c569bad23ac67a761d0f1fbd4ca4c4
[ "MIT" ]
2
2019-03-03T13:00:14.000Z
2020-05-01T05:35:04.000Z
from binaryninja import Symbol, Type, log from binaryninja.enums import SymbolType from .utils import BinjaStruct, read_pe_header, check_address IMAGE_TLS_DIRECTORY32_t = BinjaStruct('<IIIIII', names = ('StartAddressOfRawData', 'EndAddressOfRawData', 'AddressOfIndex', 'AddressOfCallBacks', 'SizeOfZeroFill', 'Charact...
46.826087
183
0.730269
from binaryninja import Symbol, Type, log from binaryninja.enums import SymbolType from .utils import BinjaStruct, read_pe_header, check_address IMAGE_TLS_DIRECTORY32_t = BinjaStruct('<IIIIII', names = ('StartAddressOfRawData', 'EndAddressOfRawData', 'AddressOfIndex', 'AddressOfCallBacks', 'SizeOfZeroFill', 'Charact...
1,591
0
46
c726280e9627ceab9a71757a18662167f8f69d59
4,097
py
Python
api/modules/categories.py
petrstehlik/pyngShop
61591b9982742bf9aad9a0e270737415e5649fbb
[ "MIT" ]
1
2018-02-07T19:22:38.000Z
2018-02-07T19:22:38.000Z
api/modules/categories.py
petrstehlik/pyngShop
61591b9982742bf9aad9a0e270737415e5649fbb
[ "MIT" ]
null
null
null
api/modules/categories.py
petrstehlik/pyngShop
61591b9982742bf9aad9a0e270737415e5649fbb
[ "MIT" ]
null
null
null
""" Author: Frederik Muller, xmulle20@stud.fit.vutbr.cz Author: Matej Vido, xvidom00@stud.fit.vutbr.cz Date: 04/2017 """ import bcrypt from flask import request from bson import json_util, ObjectId import pymongo from slugify import slugify from api import auth, db from api.module import Module from api.models.mode...
29.056738
93
0.742006
""" Author: Frederik Muller, xmulle20@stud.fit.vutbr.cz Author: Matej Vido, xvidom00@stud.fit.vutbr.cz Date: 04/2017 """ import bcrypt from flask import request from bson import json_util, ObjectId import pymongo from slugify import slugify from api import auth, db from api.module import Module from api.models.mode...
2,673
0
90
4cef688f598302dd4fb8215e03856c14259b75f8
314
py
Python
models/amenity.py
jj131204/AirBnB_clone
c07cc6c08c6d20df3fc0551ce36b7aa4b828e051
[ "MIT" ]
null
null
null
models/amenity.py
jj131204/AirBnB_clone
c07cc6c08c6d20df3fc0551ce36b7aa4b828e051
[ "MIT" ]
null
null
null
models/amenity.py
jj131204/AirBnB_clone
c07cc6c08c6d20df3fc0551ce36b7aa4b828e051
[ "MIT" ]
1
2021-07-07T21:37:54.000Z
2021-07-07T21:37:54.000Z
#!/usr/bin/python3 """ Amenity module """ from models.base_model import BaseModel class Amenity(BaseModel): """ Amenity class implementation """ name = "" def __init__(self, *args, **kwargs): """ Initialize in parent class """ super().__init__(self, *args, **kwargs)
20.933333
48
0.595541
#!/usr/bin/python3 """ Amenity module """ from models.base_model import BaseModel class Amenity(BaseModel): """ Amenity class implementation """ name = "" def __init__(self, *args, **kwargs): """ Initialize in parent class """ super().__init__(self, *args, **kwargs)
0
0
0
90378822fa36a0f7b05207caf56d8e08472ffb30
2,839
py
Python
runner/notes/task.py
makeshmakesh/copper-sdk
c938adb39737822d0bfe17c052ca43898eb2a1c3
[ "MIT" ]
null
null
null
runner/notes/task.py
makeshmakesh/copper-sdk
c938adb39737822d0bfe17c052ca43898eb2a1c3
[ "MIT" ]
1
2021-04-15T00:10:50.000Z
2021-04-15T00:10:50.000Z
runner/notes/task.py
makeshmakesh/copper-sdk
c938adb39737822d0bfe17c052ca43898eb2a1c3
[ "MIT" ]
4
2021-01-07T05:30:49.000Z
2021-09-13T08:08:54.000Z
from copper_sdk.notes import NoteTarget import names_generator import json import shared_procs def create_task_note(copper_client, task_id, user_id): """Create a note for a Task Attributes: copper_client (copper_sdk.copper): The CopperSDK client. task_id (str): The ...
25.123894
69
0.659035
from copper_sdk.notes import NoteTarget import names_generator import json import shared_procs def create_task_note(copper_client, task_id, user_id): """Create a note for a Task Attributes: copper_client (copper_sdk.copper): The CopperSDK client. task_id (str): The ...
453
0
23
224035c0366a11ebad1bfd43ff365d8376f86e1c
328
py
Python
editquality/codegen/tests/test_generate.py
paulkernfeld/editquality
029f21278d89d6e50b0eac7b39d8355f8e4686f4
[ "MIT" ]
18
2019-03-13T23:26:07.000Z
2021-12-31T00:57:16.000Z
editquality/codegen/tests/test_generate.py
paulkernfeld/editquality
029f21278d89d6e50b0eac7b39d8355f8e4686f4
[ "MIT" ]
98
2015-12-13T12:18:24.000Z
2018-08-07T21:10:46.000Z
editquality/codegen/tests/test_generate.py
paulkernfeld/editquality
029f21278d89d6e50b0eac7b39d8355f8e4686f4
[ "MIT" ]
17
2015-09-29T20:52:12.000Z
2018-08-20T11:33:30.000Z
import os.path from .. import generate TEST_PATH = os.path.dirname(__file__)
17.263158
59
0.594512
import os.path from .. import generate TEST_PATH = os.path.dirname(__file__) def test_generate_params(): params = { 'foo': 'abc', 'bar': 'def', } template = "{{ foo }}{{ bar }}" expected = "abcdef\n" actual = generate.generate(params, TEST_PATH, template) assert expected ==...
224
0
23
1419fdc8d5e49e33480adbbeae6baecc459e36d8
2,477
py
Python
test/cli_test/base.py
nprint/nPrintML
69e56036fd7ab6b050cbe81b31309c06f166f0f2
[ "Apache-2.0" ]
13
2020-11-04T14:57:12.000Z
2021-11-18T08:50:00.000Z
test/cli_test/base.py
nprint/nPrintML
69e56036fd7ab6b050cbe81b31309c06f166f0f2
[ "Apache-2.0" ]
60
2020-10-22T16:08:14.000Z
2021-12-14T23:00:36.000Z
test/cli_test/base.py
nprint/nprintml
69e56036fd7ab6b050cbe81b31309c06f166f0f2
[ "Apache-2.0" ]
1
2021-12-16T01:10:18.000Z
2021-12-16T01:10:18.000Z
import contextlib import functools import io import pathlib import sys import typing import unittest from nprintml import cli from test.base import mktestdir TEST_ROOT = pathlib.Path(__file__).parent.parent TEST_DATA = TEST_ROOT / 'data' def testdir(func): """Decorator to wrap given function such that a temp...
27.21978
82
0.603553
import contextlib import functools import io import pathlib import sys import typing import unittest from nprintml import cli from test.base import mktestdir TEST_ROOT = pathlib.Path(__file__).parent.parent TEST_DATA = TEST_ROOT / 'data' def testdir(func): """Decorator to wrap given function such that a temp...
1,597
310
126
490e5c475bc83d2f42ea4de089689f8d1276f355
5,941
py
Python
python/sparkts/datetimeindex.py
ypramos1986/spark-timeseries
e81bebd2d158477c077a5e35d048f4c90b991154
[ "Apache-2.0" ]
1
2018-01-30T18:32:07.000Z
2018-01-30T18:32:07.000Z
python/sparkts/datetimeindex.py
ypramos1986/spark-timeseries
e81bebd2d158477c077a5e35d048f4c90b991154
[ "Apache-2.0" ]
null
null
null
python/sparkts/datetimeindex.py
ypramos1986/spark-timeseries
e81bebd2d158477c077a5e35d048f4c90b991154
[ "Apache-2.0" ]
null
null
null
from py4j.java_gateway import java_import from .utils import datetime_to_nanos import numpy as np import pandas as pd class DateTimeIndex(object): """ A DateTimeIndex maintains a bi-directional mapping between integers and an ordered collection of date-times. Multiple date-times may correspond to the same ...
34.74269
101
0.66504
from py4j.java_gateway import java_import from .utils import datetime_to_nanos import numpy as np import pandas as pd class DateTimeIndex(object): """ A DateTimeIndex maintains a bi-directional mapping between integers and an ordered collection of date-times. Multiple date-times may correspond to the same ...
1,120
4
429
c1e20d70880881a9bc4a9d9ab9bb1e131bcbe8a5
22,838
py
Python
MainWindow.py
Linzecong/ExcelDiffer
97ee053cf29f70e401e9ddc65fc2f79d5da2d923
[ "Apache-2.0" ]
20
2019-03-04T11:11:30.000Z
2022-03-14T06:52:46.000Z
MainWindow.py
hubuyaolian/ExcelDiffer-1
97ee053cf29f70e401e9ddc65fc2f79d5da2d923
[ "Apache-2.0" ]
3
2019-03-04T11:12:44.000Z
2022-01-12T18:06:15.000Z
MainWindow.py
hubuyaolian/ExcelDiffer-1
97ee053cf29f70e401e9ddc65fc2f79d5da2d923
[ "Apache-2.0" ]
8
2019-03-28T11:07:39.000Z
2022-01-03T19:45:52.000Z
#-*- codingg:utf8 -*- from PyQt5.QtWidgets import QMainWindow,QFontDialog, QApplication,QMenu,QAction,QFileDialog,QDockWidget,QMessageBox,QDesktopWidget,QTableWidget from PyQt5.QtGui import QIcon,QFont,QKeySequence from PyQt5.QtCore import Qt,QSettings,QThread,pyqtSignal from ViewWidget import ViewWidget from DiffWidge...
43.500952
193
0.645853
#-*- codingg:utf8 -*- from PyQt5.QtWidgets import QMainWindow,QFontDialog, QApplication,QMenu,QAction,QFileDialog,QDockWidget,QMessageBox,QDesktopWidget,QTableWidget from PyQt5.QtGui import QIcon,QFont,QKeySequence from PyQt5.QtCore import Qt,QSettings,QThread,pyqtSignal from ViewWidget import ViewWidget from DiffWidge...
22,472
102
753
00cc25d42e5c0a922ec20410dc202c6de8269caf
2,130
py
Python
core/layers/convolutional.py
luckylwk/neural-network-theano
420c89e7028fcd9671866918c22a837d04387012
[ "MIT" ]
null
null
null
core/layers/convolutional.py
luckylwk/neural-network-theano
420c89e7028fcd9671866918c22a837d04387012
[ "MIT" ]
null
null
null
core/layers/convolutional.py
luckylwk/neural-network-theano
420c89e7028fcd9671866918c22a837d04387012
[ "MIT" ]
null
null
null
import numpy as np import theano from ..utils.activation import * from ..utils import weights from .base import Layer __all__ = [ "Convolutional2DLayer" ] class Convolutional2DLayer(Layer): ''' Standard Convolutional 2D Layer ''' # -------------------- #
29.178082
119
0.624883
import numpy as np import theano from ..utils.activation import * from ..utils import weights from .base import Layer __all__ = [ "Convolutional2DLayer" ] class Convolutional2DLayer(Layer): ''' Standard Convolutional 2D Layer ''' def __init__( self, kernels=8, kernelSize=(3,3), kernelStride=1, **kwargs )...
1,732
0
121
d1ad0c5bb325cb4499e41ad36a0532ffc37e5ae2
2,613
py
Python
compliments.py
Boijangle/GroupMe-Message-Bot
0b70e5e04de4e5e757f7f2aa540f795a1039f7af
[ "MIT" ]
2
2017-05-14T02:53:02.000Z
2017-05-14T03:12:46.000Z
compliments.py
Boijangle/miniature-octo-happiness
0b70e5e04de4e5e757f7f2aa540f795a1039f7af
[ "MIT" ]
4
2017-07-18T22:24:12.000Z
2018-07-23T01:07:05.000Z
compliments.py
Boijangle/GroupMe-Message-Bot
0b70e5e04de4e5e757f7f2aa540f795a1039f7af
[ "MIT" ]
2
2017-07-25T02:02:15.000Z
2017-07-27T03:07:32.000Z
import random
33.075949
91
0.592423
import random def generate_compliment(): #part1 of the sentence---noun/subject part1 = [ "you", ] #part2 of the sentence--the verb/action part2 = [ "are", ] #part3 of the sentence--the ending(noun) part3 = [ "extremely intuitive", "a searcher of hidden...
2,576
0
23
1f1bf8f5346cc8b928d9001b4cf006dae1340144
10,791
py
Python
sdk/python/pulumi_okta/idp/get_oidc.py
pulumi/pulumi-okta
83f7617a85b3d05213901773fa4e6a151ab6076b
[ "ECL-2.0", "Apache-2.0" ]
5
2019-10-29T21:59:22.000Z
2021-11-08T12:00:24.000Z
sdk/python/pulumi_okta/idp/get_oidc.py
pulumi/pulumi-okta
83f7617a85b3d05213901773fa4e6a151ab6076b
[ "ECL-2.0", "Apache-2.0" ]
109
2020-01-06T10:28:09.000Z
2022-03-25T19:52:40.000Z
sdk/python/pulumi_okta/idp/get_oidc.py
pulumi/pulumi-okta
83f7617a85b3d05213901773fa4e6a151ab6076b
[ "ECL-2.0", "Apache-2.0" ]
2
2020-09-11T16:31:04.000Z
2020-11-24T12:23:17.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
36.456081
349
0.643963
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
4,612
23
75
78649f653658eb525ecfda8006945a0bc03fb895
430
py
Python
python_practice/python_tricks/chp3/decorator/example_5-1.py
sokunmin/deep_learning_practices
49e1a08adbfcd2054adb1c08236d57405fad14d3
[ "Apache-2.0" ]
null
null
null
python_practice/python_tricks/chp3/decorator/example_5-1.py
sokunmin/deep_learning_practices
49e1a08adbfcd2054adb1c08236d57405fad14d3
[ "Apache-2.0" ]
null
null
null
python_practice/python_tricks/chp3/decorator/example_5-1.py
sokunmin/deep_learning_practices
49e1a08adbfcd2054adb1c08236d57405fad14d3
[ "Apache-2.0" ]
null
null
null
# ----------------- Debuggable Decorators ----------------- # # [1] metadata attached to original function is hidden def greet(): """return a friendly greeting. """ return 'Hi, there!' print(greet.__name__) print(greet.__doc__) decorated_greet = uppercase(greet) print(decorated_greet.__name__) print(deco...
19.545455
61
0.651163
# ----------------- Debuggable Decorators ----------------- # def uppercase(func): def wrapper(): return func().upper() return wrapper # [1] metadata attached to original function is hidden def greet(): """return a friendly greeting. """ return 'Hi, there!' print(greet.__name__) print(gree...
67
0
22
34146f89f88df887ca2126f16ca343ed46b8ebce
37,694
py
Python
qiskit/ignis/verification/nonlocality/bell_nonlocality.py
anndero/qiskit-ignis
7e4619dfdcb00e5c601e035083c6ea709b23b075
[ "Apache-2.0" ]
null
null
null
qiskit/ignis/verification/nonlocality/bell_nonlocality.py
anndero/qiskit-ignis
7e4619dfdcb00e5c601e035083c6ea709b23b075
[ "Apache-2.0" ]
null
null
null
qiskit/ignis/verification/nonlocality/bell_nonlocality.py
anndero/qiskit-ignis
7e4619dfdcb00e5c601e035083c6ea709b23b075
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modi...
44.714116
119
0.532048
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modi...
3,598
32,580
24
965c347bd3b26e1f4421f05b0bae79f27969df24
1,491
py
Python
repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/tests/test_load_tasks_rpmtransactionconfigtaskscollector.py
sm00th/leapp-repository
1c171ec3a5f9260a3c6f84a9b15cad78a875ac61
[ "Apache-2.0" ]
21
2018-11-20T15:58:39.000Z
2022-03-15T19:57:24.000Z
repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/tests/test_load_tasks_rpmtransactionconfigtaskscollector.py
sm00th/leapp-repository
1c171ec3a5f9260a3c6f84a9b15cad78a875ac61
[ "Apache-2.0" ]
732
2018-11-21T18:33:26.000Z
2022-03-31T16:16:24.000Z
repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/tests/test_load_tasks_rpmtransactionconfigtaskscollector.py
sm00th/leapp-repository
1c171ec3a5f9260a3c6f84a9b15cad78a875ac61
[ "Apache-2.0" ]
85
2018-11-20T17:55:00.000Z
2022-03-29T09:40:31.000Z
import logging from leapp.libraries.actor.rpmtransactionconfigtaskscollector import load_tasks, load_tasks_file from leapp.libraries.stdlib import api from leapp.models import RPM, InstalledRedHatSignedRPM RH_PACKAGER = 'Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>'
39.236842
106
0.657277
import logging from leapp.libraries.actor.rpmtransactionconfigtaskscollector import load_tasks, load_tasks_file from leapp.libraries.stdlib import api from leapp.models import RPM, InstalledRedHatSignedRPM RH_PACKAGER = 'Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>' def test_load_tasks(tmpdir, monkeypatch): ...
1,167
0
46
9dce34501665a0ef27501cf8445600e0b82ee8e7
819
py
Python
ingenialink/utils/errors.py
ingeniamc/ingenialink-python
6011931697e48456f5638c2848303aac2e5bcb75
[ "MIT" ]
15
2017-08-30T13:43:14.000Z
2022-03-29T07:04:30.000Z
ingenialink/utils/errors.py
ingeniamc/ingenialink-python
6011931697e48456f5638c2848303aac2e5bcb75
[ "MIT" ]
11
2017-08-28T11:23:18.000Z
2022-03-28T23:48:11.000Z
ingenialink/utils/errors.py
ingeniamc/ingenialink-python
6011931697e48456f5638c2848303aac2e5bcb75
[ "MIT" ]
9
2017-09-30T08:28:42.000Z
2022-03-12T19:11:43.000Z
from .._ingenialink import ffi, lib from enum import IntEnum def err_ipb_last(): """Get IPB last last occurred error.""" return int(ffi.cast("int", lib.ilerr_ipb_last())) class CONFIGURATION_ERRORS(IntEnum): """Configuration errors.""" INCORRECT_ACCESS_TYPE = 0x06010000 OBJECT_NOT_EXIST = 0x0602...
31.5
53
0.772894
from .._ingenialink import ffi, lib from enum import IntEnum def err_ipb_last(): """Get IPB last last occurred error.""" return int(ffi.cast("int", lib.ilerr_ipb_last())) class CONFIGURATION_ERRORS(IntEnum): """Configuration errors.""" INCORRECT_ACCESS_TYPE = 0x06010000 OBJECT_NOT_EXIST = 0x0602...
0
0
0
f9303ec44e5a438900ce95e107a1cc6a734b9336
14,078
py
Python
device modeing/split_lib_v1.0.py
RichardNeverGiveup/data_analysis_for_CMOS
62a289bd3367b5d3a9ce9ba7f71e920706eafa4b
[ "MIT" ]
null
null
null
device modeing/split_lib_v1.0.py
RichardNeverGiveup/data_analysis_for_CMOS
62a289bd3367b5d3a9ce9ba7f71e920706eafa4b
[ "MIT" ]
null
null
null
device modeing/split_lib_v1.0.py
RichardNeverGiveup/data_analysis_for_CMOS
62a289bd3367b5d3a9ce9ba7f71e920706eafa4b
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[1]: import re #******************************************************* # user input: # MOSNAME eg: lvnemos4_1p2_lvpw # MOSTYPE eg: _ne_1p2 # LIB_FILENAME = '501per_35_VcA.lib' # MDL_FILENAME = '501per_35_VcA.mdl' #*******************************************************...
38.782369
130
0.525146
#!/usr/bin/env python # coding: utf-8 # In[1]: import re #******************************************************* # user input: # MOSNAME eg: lvnemos4_1p2_lvpw # MOSTYPE eg: _ne_1p2 # LIB_FILENAME = '501per_35_VcA.lib' # MDL_FILENAME = '501per_35_VcA.mdl' #*******************************************************...
2,809
0
92
411c7c1af94a017abfd0a0835864ea506e386df2
1,498
py
Python
check.py
GetYourLocation/Tools
e2d80a088c8b4f43572caff834ee2541eae7a4d5
[ "MIT" ]
null
null
null
check.py
GetYourLocation/Tools
e2d80a088c8b4f43572caff834ee2541eae7a4d5
[ "MIT" ]
null
null
null
check.py
GetYourLocation/Tools
e2d80a088c8b4f43572caff834ee2541eae7a4d5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import print_function import os import sys import matplotlib.pyplot as plt from matplotlib.patches import Rectangle import warnings warnings.filterwarnings("ignore") try: dataset = sys.argv[1] data_dir = os.path.join('data', dataset) except Except...
28.807692
107
0.609479
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import print_function import os import sys import matplotlib.pyplot as plt from matplotlib.patches import Rectangle import warnings warnings.filterwarnings("ignore") try: dataset = sys.argv[1] data_dir = os.path.join('data', dataset) except Except...
0
0
0
5d04d47de01e33c3e1869914561675312dd53ea4
6,405
py
Python
lib/utils.py
pemami4911/symmetric-and-object-centric-world-models
8a03b08fc840d47602afeffba1a106651becd826
[ "MIT" ]
2
2020-12-22T08:11:44.000Z
2022-03-15T21:50:17.000Z
lib/utils.py
pemami4911/symmetric-and-object-centric-world-models
8a03b08fc840d47602afeffba1a106651becd826
[ "MIT" ]
null
null
null
lib/utils.py
pemami4911/symmetric-and-object-centric-world-models
8a03b08fc840d47602afeffba1a106651becd826
[ "MIT" ]
1
2022-03-15T21:50:18.000Z
2022-03-15T21:50:18.000Z
import torch import torch.nn.functional as F from torch.nn import init import numpy as np from scipy.stats import truncnorm def init_weights(net, init_type='normal', init_gain=0.02): """Initialize network weights. Modified from: https://github.com/baudm/MONet-pytorch/blob/master/models/networks.py Param...
37.676471
144
0.609836
import torch import torch.nn.functional as F from torch.nn import init import numpy as np from scipy.stats import truncnorm def truncated_normal_initializer(shape, mean, stddev): # compute threshold at 2 std devs values = truncnorm.rvs(mean - 2 * stddev, mean + 2 * stddev, size=shape) return torch.from_nu...
3,183
0
187
18bbea310b3c36c11d394d4aa36ce9287ac2de2a
49,201
py
Python
data_science_utils/financial/__init__.py
krishnagorrepati/Data_science_utils
15072ae11935800a5d0914b3ff0ccea11ffe4b73
[ "MIT" ]
70
2018-05-02T08:35:16.000Z
2022-03-21T16:46:12.000Z
data_science_utils/financial/__init__.py
krishnagorrepati/Data_science_utils
15072ae11935800a5d0914b3ff0ccea11ffe4b73
[ "MIT" ]
2
2019-06-28T00:19:04.000Z
2020-07-28T14:04:09.000Z
data_science_utils/financial/__init__.py
krishnagorrepati/Data_science_utils
15072ae11935800a5d0914b3ff0ccea11ffe4b73
[ "MIT" ]
75
2018-09-19T18:53:21.000Z
2022-03-26T17:30:19.000Z
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) from stockstats import StockDataFrame import warnings import traceback warnings.filterwarnings('ignore') import argparse import re import sys, os sys.path.append(os.getcwd()) import os import requests from req...
41.310663
202
0.647527
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) from stockstats import StockDataFrame import warnings import traceback warnings.filterwarnings('ignore') import argparse import re import sys, os sys.path.append(os.getcwd()) import os import requests from req...
45,261
0
920
4b9f3f3d538708150e0c79b7764ca9adeb55b1c1
16,982
py
Python
pyTelegramClient/telegram.py
Arjun-M/pyTelegramClient
d6fe2bfaf2f4a5c36c997589d0b4d64b428cd603
[ "MIT" ]
3
2022-03-18T08:00:40.000Z
2022-03-24T15:16:51.000Z
pyTelegramClient/telegram.py
Arjun-M/pyTelegramClient
d6fe2bfaf2f4a5c36c997589d0b4d64b428cd603
[ "MIT" ]
null
null
null
pyTelegramClient/telegram.py
Arjun-M/pyTelegramClient
d6fe2bfaf2f4a5c36c997589d0b4d64b428cd603
[ "MIT" ]
null
null
null
import json , requests , asyncio , logging logging.basicConfig(format='%(asctime)s - %(message)s', datefmt='%d-%b-%y %H:%M:%S')
50.391691
408
0.664822
import json , requests , asyncio , logging logging.basicConfig(format='%(asctime)s - %(message)s', datefmt='%d-%b-%y %H:%M:%S') class Telegram: def __init__(self, client ): self.client = client def sendMessage(self , chat_id , text, disable_web_page_preview=None, reply_to_message_id=No...
15,952
-6
885
e148ccaa2017c9088365c178882f6f4d7c85c4bb
1,886
py
Python
src/server/portal/naws.py
Kelketek/evennia
cc56a7155f4fb975a6fc9e811bd6eadf3d710243
[ "BSD-3-Clause" ]
5
2015-01-30T08:47:59.000Z
2022-01-22T19:27:03.000Z
src/server/portal/naws.py
Kelketek/evennia
cc56a7155f4fb975a6fc9e811bd6eadf3d710243
[ "BSD-3-Clause" ]
2
2017-12-28T21:36:48.000Z
2017-12-28T21:36:57.000Z
src/server/portal/naws.py
Kelketek/evennia
cc56a7155f4fb975a6fc9e811bd6eadf3d710243
[ "BSD-3-Clause" ]
1
2020-02-21T05:30:58.000Z
2020-02-21T05:30:58.000Z
""" NAWS - Negotiate About Window Size This implements the NAWS telnet option as per https://www.ietf.org/rfc/rfc1073.txt NAWS allows telnet clients to report their current window size to the client and update it when the size changes """ from django.conf import settings from src.utils import utils NAWS = chr(31) ...
30.419355
101
0.661188
""" NAWS - Negotiate About Window Size This implements the NAWS telnet option as per https://www.ietf.org/rfc/rfc1073.txt NAWS allows telnet clients to report their current window size to the client and update it when the size changes """ from django.conf import settings from src.utils import utils NAWS = chr(31) ...
360
0
27
7da257725a70d5f7a7926bb43365cc244654dc62
4,026
py
Python
apps/dramas/models.py
ChenCrazy/MacOnline
b954ce85c8d14ef65eb54b365b2573da792b2d2f
[ "MIT" ]
null
null
null
apps/dramas/models.py
ChenCrazy/MacOnline
b954ce85c8d14ef65eb54b365b2573da792b2d2f
[ "MIT" ]
null
null
null
apps/dramas/models.py
ChenCrazy/MacOnline
b954ce85c8d14ef65eb54b365b2573da792b2d2f
[ "MIT" ]
null
null
null
# _*_ encoding:utf-8 _*_ from __future__ import unicode_literals from datetime import datetime # from DjangoUeditor.models import UEditorField from django.db import models from organization.models import DramaOrg, Author
37.981132
115
0.696225
# _*_ encoding:utf-8 _*_ from __future__ import unicode_literals from datetime import datetime # from DjangoUeditor.models import UEditorField from django.db import models from organization.models import DramaOrg, Author class Drama(models.Model): drama_org = models.ForeignKey(DramaOrg, verbose_name=u"团队组织", nu...
475
3,524
115
befa272aee7e1f6568b6b56d01d63869929c48e0
1,199
py
Python
Year1Term1/IntroductionToProgramming/bookcheckout.py
linzexinmasterchief/University-Courseworks
e07b4b117941837108b0922dc0d5e32303cf66a3
[ "Unlicense" ]
null
null
null
Year1Term1/IntroductionToProgramming/bookcheckout.py
linzexinmasterchief/University-Courseworks
e07b4b117941837108b0922dc0d5e32303cf66a3
[ "Unlicense" ]
null
null
null
Year1Term1/IntroductionToProgramming/bookcheckout.py
linzexinmasterchief/University-Courseworks
e07b4b117941837108b0922dc0d5e32303cf66a3
[ "Unlicense" ]
null
null
null
""" This file handles the checkout of books, with log entry added """ import database as db # member_id is a 4-digit numebr and checkout_list is a list containing the full detail of the book being checked out def go(checkout_list = [], member_id = "0"): """ This function takes in a list of books and a member ...
36.333333
116
0.633028
""" This file handles the checkout of books, with log entry added """ import database as db # member_id is a 4-digit numebr and checkout_list is a list containing the full detail of the book being checked out def go(checkout_list = [], member_id = "0"): """ This function takes in a list of books and a member ...
0
0
0
1b6923ea2847cbbc0437e08a871182116547d68d
554
py
Python
modules/dbnd/src/targets/__init__.py
ipattarapong/dbnd
7bd65621c46c73e078eb628f994127ad4c7dbd1a
[ "Apache-2.0" ]
null
null
null
modules/dbnd/src/targets/__init__.py
ipattarapong/dbnd
7bd65621c46c73e078eb628f994127ad4c7dbd1a
[ "Apache-2.0" ]
null
null
null
modules/dbnd/src/targets/__init__.py
ipattarapong/dbnd
7bd65621c46c73e078eb628f994127ad4c7dbd1a
[ "Apache-2.0" ]
null
null
null
import os from targets.base_target import Target from targets.data_target import DataTarget from targets.dir_target import DirTarget from targets.errors import ( FileAlreadyExists, FileSystemException, MissingParentDirectory, NotADirectory, ) from targets.file_target import FileSystemTarget, FileTarget...
30.777778
60
0.84657
import os from targets.base_target import Target from targets.data_target import DataTarget from targets.dir_target import DirTarget from targets.errors import ( FileAlreadyExists, FileSystemException, MissingParentDirectory, NotADirectory, ) from targets.file_target import FileSystemTarget, FileTarget...
0
0
0
1035dcef4699f204f8ec305de84ef466c3c4f6fe
9,168
py
Python
gammapy/stats/counts_statistic.py
Rishank2610/gammapy
3cd64fdb2c53c8e5c697a9b85ef8d0486bff0b76
[ "BSD-3-Clause" ]
1
2017-11-22T17:07:56.000Z
2017-11-22T17:07:56.000Z
gammapy/stats/counts_statistic.py
Rishank2610/gammapy
3cd64fdb2c53c8e5c697a9b85ef8d0486bff0b76
[ "BSD-3-Clause" ]
null
null
null
gammapy/stats/counts_statistic.py
Rishank2610/gammapy
3cd64fdb2c53c8e5c697a9b85ef8d0486bff0b76
[ "BSD-3-Clause" ]
1
2019-09-04T14:03:33.000Z
2019-09-04T14:03:33.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst import abc import numpy as np from scipy.stats import chi2 from gammapy.utils.roots import find_roots from .fit_statistics import cash, wstat __all__ = ["WStatCountsStatistic", "CashCountsStatistic"] class CashCountsStatistic(CountsStatistic): """C...
32.28169
106
0.584751
# Licensed under a 3-clause BSD style license - see LICENSE.rst import abc import numpy as np from scipy.stats import chi2 from gammapy.utils.roots import find_roots from .fit_statistics import cash, wstat __all__ = ["WStatCountsStatistic", "CashCountsStatistic"] class CountsStatistic(abc.ABC): @property def...
1,416
5,049
185
86aeeee5627ee8b07a01f9042f2d7316ad96cdd1
7,123
py
Python
_common/C_mail.py
FNNDSC/cruntesting
d3580a8494f3b3da100669262ec99d9eceb32327
[ "MIT" ]
1
2017-01-17T06:52:17.000Z
2017-01-17T06:52:17.000Z
_common/C_mail.py
FNNDSC/cruntesting
d3580a8494f3b3da100669262ec99d9eceb32327
[ "MIT" ]
null
null
null
_common/C_mail.py
FNNDSC/cruntesting
d3580a8494f3b3da100669262ec99d9eceb32327
[ "MIT" ]
null
null
null
# NAME # # C_mail # # DESCRIPTION # # 'C_mail' is a simple class for handling/abstracting common # email related activities. # # Once setup with address lists, and/or subject text # it sends body text and inline attachments. # # HISTORY # # 11 January 2007 # o Initial development implementation. # # System imports imp...
25.99635
69
0.628527
# NAME # # C_mail # # DESCRIPTION # # 'C_mail' is a simple class for handling/abstracting common # email related activities. # # Once setup with address lists, and/or subject text # it sends body text and inline attachments. # # HISTORY # # 11 January 2007 # o Initial development implementation. # # System imports imp...
5,119
1,274
23
ad24952040f37c4dee236ba5635c947ea8283462
3,018
py
Python
doc/sphinxext/gen_commands.py
stlukyanenko/mne-python
508cfbc13bc2e068efb3bf8b7999b83047851729
[ "BSD-3-Clause" ]
2
2020-06-15T12:25:12.000Z
2020-09-13T11:49:51.000Z
doc/sphinxext/gen_commands.py
Moonshadowzb/mne-python
89647f3363fcb5de306cc18e55e7b9fa89fe0315
[ "BSD-3-Clause" ]
null
null
null
doc/sphinxext/gen_commands.py
Moonshadowzb/mne-python
89647f3363fcb5de306cc18e55e7b9fa89fe0315
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import glob from importlib import import_module import os from os import path as op from mne.utils import _replace_md5, ArgvSetter # Header markings go: # 1. =/= : Page title # 2. = : Command name # 3. -/- : Command description # 4. - : Command sections (Examples, Notes) header = """\...
26.946429
75
0.549702
# -*- coding: utf-8 -*- import glob from importlib import import_module import os from os import path as op from mne.utils import _replace_md5, ArgvSetter def setup(app): app.connect('builder-inited', generate_commands_rst) def setup_module(): # HACK: Stop nosetests running setup() above pass # Head...
2,239
0
69
4a9be3555eaaee67ccdb9ee787c8bae77b9e23da
796
py
Python
2_stack.py
Akshatha-Jagadish/Data_structures
3a2833e4f8ffa26127ba661708b45ccfac141484
[ "MIT" ]
null
null
null
2_stack.py
Akshatha-Jagadish/Data_structures
3a2833e4f8ffa26127ba661708b45ccfac141484
[ "MIT" ]
null
null
null
2_stack.py
Akshatha-Jagadish/Data_structures
3a2833e4f8ffa26127ba661708b45ccfac141484
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Jan 22 15:31:32 2022 @author: Akshatha """ if __name__ == '__main__': my_stack = Stack() my_stack.push(5) my_stack.disp() my_stack.push(10) my_stack.disp() my_stack.push('game') my_stack.disp() print('stack length: ',my_stac...
21.513514
46
0.53392
# -*- coding: utf-8 -*- """ Created on Sat Jan 22 15:31:32 2022 @author: Akshatha """ class Stack(): def __init__(self): self.arr = [] def push(self, value): self.arr.append(value) def pop(self): val = self.arr[-1] self.arr = self.arr[:-1] ...
174
-7
184
317da283fcdc4837339ad34e5ee32af0b8601139
1,090
py
Python
src/python/pants/console/stty_utils.py
lahosken/pants
1b0340987c9b2eab9411416803c75b80736716e4
[ "Apache-2.0" ]
1
2021-11-11T14:04:24.000Z
2021-11-11T14:04:24.000Z
src/python/pants/console/stty_utils.py
lahosken/pants
1b0340987c9b2eab9411416803c75b80736716e4
[ "Apache-2.0" ]
null
null
null
src/python/pants/console/stty_utils.py
lahosken/pants
1b0340987c9b2eab9411416803c75b80736716e4
[ "Apache-2.0" ]
1
2021-11-11T14:04:12.000Z
2021-11-11T14:04:12.000Z
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import subprocess fr...
29.459459
96
0.73945
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import subprocess fr...
276
0
100
fb0177bda93cb54ce6c6923044aa8511c1218c01
1,179
py
Python
flapp/movie/utils.py
rpwagner/tiled-display
52d135bc163360fe55ce5521784b0ef48a8c82c9
[ "Apache-2.0" ]
1
2020-12-11T17:11:45.000Z
2020-12-11T17:11:45.000Z
flapp/movie/utils.py
rpwagner/tiled-display
52d135bc163360fe55ce5521784b0ef48a8c82c9
[ "Apache-2.0" ]
null
null
null
flapp/movie/utils.py
rpwagner/tiled-display
52d135bc163360fe55ce5521784b0ef48a8c82c9
[ "Apache-2.0" ]
null
null
null
from subprocess import Popen, PIPE, STDOUT if __name__=="__main__": import sys path = sys.argv[1] duration = GetMovieDuration(path) FPS = GetMovieFPS(path) print "duration:", duration print "FPS:", FPS
35.727273
132
0.63698
from subprocess import Popen, PIPE, STDOUT def GetMovieFPS(path): #mplayer -vo null -nosound 0_0.mpg -ss 00:10:00 -endpos 00:00:01 output = Popen(["mplayer", "-vo", "null", "-nosound", path, "-endpos", "00:00:01"], stdout=PIPE, stderr=STDOUT).communicate()[0] linestart = output.index("VIDEO: ") lineend...
904
0
46
d1639147923531e200dc36009221eecdaf434140
1,931
py
Python
dkbirdisland/src/scoreboard.py
Murilo-Gruppi/DonkeyKong-BirdIsland
2fe5affe570e9d7c82d0f2e2e8b2c2e1ff49f1df
[ "MIT" ]
null
null
null
dkbirdisland/src/scoreboard.py
Murilo-Gruppi/DonkeyKong-BirdIsland
2fe5affe570e9d7c82d0f2e2e8b2c2e1ff49f1df
[ "MIT" ]
8
2020-11-14T13:06:58.000Z
2021-01-22T14:31:06.000Z
dkbirdisland/src/scoreboard.py
Murilo-Gruppi/DonkeyKong-BirdIsland
2fe5affe570e9d7c82d0f2e2e8b2c2e1ff49f1df
[ "MIT" ]
3
2020-11-13T23:11:28.000Z
2020-12-14T15:41:08.000Z
import shelve import os from . import tools MAIN_DIR = os.path.split(os.path.abspath(__file__))[0] SHELVE_PATH = os.path.join(MAIN_DIR, 'high_score.txt')
31.655738
94
0.588296
import shelve import os from . import tools MAIN_DIR = os.path.split(os.path.abspath(__file__))[0] SHELVE_PATH = os.path.join(MAIN_DIR, 'high_score.txt') class Scoreboard: def __init__(self, screen): self.score = '00000' self.last_score = '00000' self.high_score = '00000' self.fon...
1,595
-4
184
5bd889de96b25a5a3fe57826cba7a42808b9ad07
441
py
Python
chopandmiddle.py
hadoge/simpleScripts_python
bc819dfd73a3fb62444c7915f8dab665930475c8
[ "MIT" ]
null
null
null
chopandmiddle.py
hadoge/simpleScripts_python
bc819dfd73a3fb62444c7915f8dab665930475c8
[ "MIT" ]
null
null
null
chopandmiddle.py
hadoge/simpleScripts_python
bc819dfd73a3fb62444c7915f8dab665930475c8
[ "MIT" ]
null
null
null
#Script made for learn diferences on list modification t = [2,1,3,4,5] p = [2,1,3,4,5] chop(p) print(p) print(chop(p)) middle(t) print(t) print(middle(t))
16.333333
82
0.589569
#Script made for learn diferences on list modification t = [2,1,3,4,5] p = [2,1,3,4,5] def chop(b): a = (len(b)) - 1 del b[a] del b[0] return None #This function returns None, while the list is modified. def middle(b): a = (len(b)) - 1 return b[1:a] #This function returns a n...
219
0
48
ed44fe26c8727b8eefba67eef26c7e2279a0496c
41,686
py
Python
vibrationtesting/signals.py
Vibration-Testing/vibrationtesting
b5b85bc036714e8d8e99a14a4ddc2c427dae80ee
[ "MIT" ]
34
2016-06-21T11:44:26.000Z
2021-09-29T07:28:22.000Z
vibrationtesting/signals.py
bagustris/vibrationtesting
b5b85bc036714e8d8e99a14a4ddc2c427dae80ee
[ "MIT" ]
25
2017-08-26T14:07:16.000Z
2021-07-27T09:57:31.000Z
vibrationtesting/signals.py
bagustris/vibrationtesting
b5b85bc036714e8d8e99a14a4ddc2c427dae80ee
[ "MIT" ]
25
2016-03-08T19:58:11.000Z
2021-08-01T23:03:41.000Z
""" Signal processing, creation and plotting. Analysis of data and generation of simulated experiments. """ __license__ = "Joseph C. Slater" __docformat__ = 'reStructuredText' # import warnings import numpy as np import scipy as sp import scipy.fftpack as fftpack import scipy.linalg as la import matplotlib.pyplot a...
32.849488
208
0.523773
""" Signal processing, creation and plotting. Analysis of data and generation of simulated experiments. """ __license__ = "Joseph C. Slater" __docformat__ = 'reStructuredText' # import warnings import numpy as np import scipy as sp import scipy.fftpack as fftpack import scipy.linalg as la import matplotlib.pyplot a...
0
0
0
db255c8246a0e7204c25b22268d2980bd45f40ed
7,260
py
Python
GUIcode.py
snakerboy1234/Cytomech
69f27e72fc5f771245162b9a9fb63a81baa5b1c7
[ "MIT" ]
null
null
null
GUIcode.py
snakerboy1234/Cytomech
69f27e72fc5f771245162b9a9fb63a81baa5b1c7
[ "MIT" ]
null
null
null
GUIcode.py
snakerboy1234/Cytomech
69f27e72fc5f771245162b9a9fb63a81baa5b1c7
[ "MIT" ]
null
null
null
import serial import time import tkinter import tkinter.font as font from datetime import datetime from PIL import ImageTk, Image import sys import pypylon.pylon as py import matplotlib.pyplot as plt import numpy as np import cv2 # SOME PART OF CAMERA CODE CREATES AN INSTANCE OF TK THAT USES PACK. SO WE ...
35.072464
158
0.684022
import serial import time import tkinter import tkinter.font as font from datetime import datetime from PIL import ImageTk, Image import sys import pypylon.pylon as py import matplotlib.pyplot as plt import numpy as np import cv2 # SOME PART OF CAMERA CODE CREATES AN INSTANCE OF TK THAT USES PACK. SO WE ...
2,869
8
174
6ab64ad7f7106d0ba65d4abb10f71d3123886c67
10,488
py
Python
app/validators/sections/section_validator.py
ONSdigital/eq-questionnaire-validator
7d2f570a31439c3c4e7d60e1894bfdd859e735a9
[ "MIT" ]
1
2021-09-10T12:03:02.000Z
2021-09-10T12:03:02.000Z
app/validators/sections/section_validator.py
ONSdigital/eq-questionnaire-validator
7d2f570a31439c3c4e7d60e1894bfdd859e735a9
[ "MIT" ]
67
2020-02-05T11:54:27.000Z
2022-03-03T12:55:25.000Z
app/validators/sections/section_validator.py
ONSdigital/eq-questionnaire-validator
7d2f570a31439c3c4e7d60e1894bfdd859e735a9
[ "MIT" ]
2
2021-04-11T07:45:45.000Z
2021-04-19T14:52:07.000Z
from collections import defaultdict from app import error_messages from app.validators.answers import get_answer_validator from app.validators.blocks import get_block_validator from app.validators.questionnaire_schema import get_object_containing_key from app.validators.questions import get_question_validator from app...
39.727273
93
0.618993
from collections import defaultdict from app import error_messages from app.validators.answers import get_answer_validator from app.validators.blocks import get_block_validator from app.validators.questionnaire_schema import get_object_containing_key from app.validators.questions import get_question_validator from app...
7,144
2,590
23
47fe2037f0c7cb92585e4d15d11841e6a8393752
1,362
py
Python
examples/selection_input_app.py
zelogik/remi
074f0e856d1634a0a8155626d8dd2135feb99544
[ "Apache-2.0" ]
3,224
2015-10-30T15:35:05.000Z
2022-03-08T19:31:46.000Z
examples/selection_input_app.py
Ksengine/remi
4ccb06581a70c101807b740ef587065aa70b17ce
[ "Apache-2.0" ]
453
2015-10-26T17:39:01.000Z
2022-03-07T13:57:18.000Z
examples/selection_input_app.py
Ksengine/remi
4ccb06581a70c101807b740ef587065aa70b17ce
[ "Apache-2.0" ]
458
2015-11-03T12:08:01.000Z
2022-03-09T00:17:19.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 ...
35.842105
108
0.701909
""" 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 ...
545
-4
49
1e2d84940a05efd0cc8e5fbe8f9be589dfffd985
543
py
Python
Chapter06/B13346_06_01-swap.py
shahidnawazkhan/geog786course
e2d425875d183af3f0d5d54bb7c01033f5b2926f
[ "MIT" ]
97
2019-06-21T21:59:23.000Z
2022-03-30T17:00:46.000Z
Chapter06/B13346_06_01-swap.py
Fall-in-love-with-Kikyo/Learning-Geospatial-Analysis-with-Python-Third-Edition
5f4961837d762cffbf67338e0237313ea89dbb48
[ "MIT" ]
3
2021-10-19T02:31:15.000Z
2022-01-18T04:45:07.000Z
Chapter06/B13346_06_01-swap.py
Fall-in-love-with-Kikyo/Learning-Geospatial-Analysis-with-Python-Third-Edition
5f4961837d762cffbf67338e0237313ea89dbb48
[ "MIT" ]
61
2019-04-07T22:53:30.000Z
2022-03-28T03:01:11.000Z
"""Swap bands in a raster satellite image""" # http://git.io/vqs41 from gdal import gdal_array # name of our source image src = "FalseColor.tif" # load the source image into an array arr = gdal_array.LoadFile(src) # swap bands 1 and 2 for a natural color image. # We will use numpy "advanced slicing" to reorder the...
28.578947
62
0.703499
"""Swap bands in a raster satellite image""" # http://git.io/vqs41 from gdal import gdal_array # name of our source image src = "FalseColor.tif" # load the source image into an array arr = gdal_array.LoadFile(src) # swap bands 1 and 2 for a natural color image. # We will use numpy "advanced slicing" to reorder the...
0
0
0
768377607dcaeb9485796c28ca8047ebf64714e5
2,398
py
Python
analysisTools/plot_builder.py
anastasiia-kornilova/sound_direction
ad7e5eec2d9f3417bb6996d088edd88e1ea5acc0
[ "Apache-2.0" ]
1
2021-02-04T11:02:11.000Z
2021-02-04T11:02:11.000Z
analysisTools/plot_builder.py
anastasiia-kornilova/sound_direction
ad7e5eec2d9f3417bb6996d088edd88e1ea5acc0
[ "Apache-2.0" ]
null
null
null
analysisTools/plot_builder.py
anastasiia-kornilova/sound_direction
ad7e5eec2d9f3417bb6996d088edd88e1ea5acc0
[ "Apache-2.0" ]
1
2018-10-14T16:07:01.000Z
2018-10-14T16:07:01.000Z
import os import matplotlib.pyplot as plt import scipy.io.wavfile as wav from runner import Runner
33.774648
99
0.537114
import os import matplotlib.pyplot as plt import scipy.io.wavfile as wav from runner import Runner class PlotBuilder(object): __angle_plt_name = 'angle_' __plt_ext = '.png' def __init__(self): pass def plot_sensor_out(self, data, params, destdir): test_path = params['input_filenam...
2,160
115
23
5818f6b495fd1bcb0df047fec6725a29b0d28423
131
py
Python
photo/apps.py
ruslan-ok/ruslan
fc402e53d2683581e13f4d6c69a6f21e5c2ca1f8
[ "MIT" ]
null
null
null
photo/apps.py
ruslan-ok/ruslan
fc402e53d2683581e13f4d6c69a6f21e5c2ca1f8
[ "MIT" ]
null
null
null
photo/apps.py
ruslan-ok/ruslan
fc402e53d2683581e13f4d6c69a6f21e5c2ca1f8
[ "MIT" ]
null
null
null
from django.apps import AppConfig from photo.config import app_config
21.833333
35
0.78626
from django.apps import AppConfig from photo.config import app_config class PhotoConfig(AppConfig): name = app_config['name']
0
38
23
6b2947d904a12699c53f85fd20cfcef2e48e9a84
12,015
py
Python
src/testdir/test_channel.py
chestnut1693/vim
bc38f25c021dc4314c77d50a608329a328b0d988
[ "Vim" ]
2
2020-04-13T04:53:59.000Z
2020-06-01T14:41:02.000Z
src/testdir/test_channel.py
chestnut1693/vim
bc38f25c021dc4314c77d50a608329a328b0d988
[ "Vim" ]
null
null
null
src/testdir/test_channel.py
chestnut1693/vim
bc38f25c021dc4314c77d50a608329a328b0d988
[ "Vim" ]
null
null
null
#!/usr/bin/env python # # Server that will accept connections from a Vim channel. # Used by test_channel.vim. # # This requires Python 2.6 or later. from __future__ import print_function import json import socket import sys import time import threading try: # Python 3 import socketserver except ImportError: ...
44.335793
94
0.424303
#!/usr/bin/env python # # Server that will accept connections from a Vim channel. # Used by test_channel.vim. # # This requires Python 2.6 or later. from __future__ import print_function import json import socket import sys import time import threading try: # Python 3 import socketserver except ImportError: ...
11,360
109
119
4fa43d72a0c2f0b29afa1fdf526729a277689f72
4,948
py
Python
edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/templates/utility/CWF_Pacific_Site_MultiPil_Definition.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
null
null
null
edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/templates/utility/CWF_Pacific_Site_MultiPil_Definition.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
null
null
null
edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/templates/utility/CWF_Pacific_Site_MultiPil_Definition.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
1
2021-10-30T00:03:05.000Z
2021-10-30T00:03:05.000Z
## # This software was developed and / or modified by Raytheon Company, # pursuant to Contract DG133W-05-CQ-1067 with the US Government. # # U.S. EXPORT CONTROLLED TECHNICAL DATA # This software product contains export-restricted data whose # export/transfer/disclosure is restricted by U.S. law. Dissemination # to ...
41.233333
103
0.605093
## # This software was developed and / or modified by Raytheon Company, # pursuant to Contract DG133W-05-CQ-1067 with the US Government. # # U.S. EXPORT CONTROLLED TECHNICAL DATA # This software product contains export-restricted data whose # export/transfer/disclosure is restricted by U.S. law. Dissemination # to ...
0
0
0
bbc7cdc6585a469f97577c73e2c29aaa3ad18a36
290
py
Python
market/products/models/category.py
hbvj99/market-api
489c9433556002cb391b93cbd6486da739c2418a
[ "MIT" ]
1
2021-08-28T05:30:40.000Z
2021-08-28T05:30:40.000Z
market/products/models/category.py
hbvj99/market-api
489c9433556002cb391b93cbd6486da739c2418a
[ "MIT" ]
1
2022-01-14T08:57:19.000Z
2022-01-14T08:57:20.000Z
market/products/models/category.py
hbvj99/market-api
489c9433556002cb391b93cbd6486da739c2418a
[ "MIT" ]
1
2022-01-11T10:14:27.000Z
2022-01-11T10:14:27.000Z
from django.db import models from django.utils.translation import ugettext_lazy as _ from ...commons.models import BaseModel
29
67
0.755172
from django.db import models from django.utils.translation import ugettext_lazy as _ from ...commons.models import BaseModel class Category(BaseModel): name = models.CharField(_('name'), max_length=90, blank=False) code = models.CharField(_('code'), max_length=110, blank=False)
0
140
23
966f8e183f43f4d45660343c45bd7a42887ab7e1
22
py
Python
core/constants/not_available.py
eugene-the-red/automata-core
8470232ac17410fb907cb285b8102c1712699740
[ "Unlicense" ]
null
null
null
core/constants/not_available.py
eugene-the-red/automata-core
8470232ac17410fb907cb285b8102c1712699740
[ "Unlicense" ]
null
null
null
core/constants/not_available.py
eugene-the-red/automata-core
8470232ac17410fb907cb285b8102c1712699740
[ "Unlicense" ]
null
null
null
NOT_AVAILABLE = 'N/A'
11
21
0.681818
NOT_AVAILABLE = 'N/A'
0
0
0
c11aa728ef111b13cb8574664ef704a9344ead5d
5,546
py
Python
Sigma_Selection.py
Jamun-Fanatic-Foreva/STADS---Star-Matching
0a96885a168b8de86eb4f51ba401980969023452
[ "MIT" ]
1
2019-10-29T13:13:48.000Z
2019-10-29T13:13:48.000Z
Sigma_Selection.py
Jamun-Fanatic-Foreva/STADS---Star-Matching
0a96885a168b8de86eb4f51ba401980969023452
[ "MIT" ]
null
null
null
Sigma_Selection.py
Jamun-Fanatic-Foreva/STADS---Star-Matching
0a96885a168b8de86eb4f51ba401980969023452
[ "MIT" ]
1
2020-03-09T17:28:18.000Z
2020-03-09T17:28:18.000Z
import numpy as np import pandas as pd import time, gc from GV_Catalogue_Gen import angularDistance def genSigmaCatalogue(CATALOGUE, mag_limit = 6, FOV_limit = 20): ''' Generates the mean of the sigma for each star in the catalogue. Sigma between star A and star B is defined as (1/6) of the a...
37.986301
114
0.624594
import numpy as np import pandas as pd import time, gc from GV_Catalogue_Gen import angularDistance def genSigmaCatalogue(CATALOGUE, mag_limit = 6, FOV_limit = 20): ''' Generates the mean of the sigma for each star in the catalogue. Sigma between star A and star B is defined as (1/6) of the a...
0
0
0
dc3fb8bf5ca7ab124eb669944f953b242d6ee9e0
39,659
py
Python
blender/2.79/scripts/addons/rigify/metarigs/Animals/shark.py
uzairakbar/bpy2.79
3a3e0004ac6783c4e4b89d939e4432de99026a85
[ "MIT" ]
2
2019-11-27T09:05:42.000Z
2020-02-20T01:25:23.000Z
rigify/metarigs/Animals/shark.py
1-MillionParanoidTterabytes/blender-addons-master
acc8fc23a38e6e89099c3e5079bea31ce85da06a
[ "Unlicense" ]
null
null
null
rigify/metarigs/Animals/shark.py
1-MillionParanoidTterabytes/blender-addons-master
acc8fc23a38e6e89099c3e5079bea31ce85da06a
[ "Unlicense" ]
4
2020-02-19T20:02:26.000Z
2022-02-11T18:47:56.000Z
import bpy from mathutils import Color if __name__ == "__main__": create(bpy.context.active_object)
49.948363
270
0.666154
import bpy from mathutils import Color def create(obj): # generated by rigify.utils.write_metarig bpy.ops.object.mode_set(mode='EDIT') arm = obj.data for i in range(6): arm.rigify_colors.add() arm.rigify_colors[0].name = "Root" arm.rigify_colors[0].active = Color((0.549019634723663...
39,529
0
23
ea03b83c85944b32b18ad7b834263f15f47ad00f
2,512
py
Python
checks.d/aws_ebs_burst_balance.py
mounemoi/datadog-aws-burst-balance
58c261b69d23185e5a08f19e7d2ce4e43f950121
[ "MIT" ]
null
null
null
checks.d/aws_ebs_burst_balance.py
mounemoi/datadog-aws-burst-balance
58c261b69d23185e5a08f19e7d2ce4e43f950121
[ "MIT" ]
null
null
null
checks.d/aws_ebs_burst_balance.py
mounemoi/datadog-aws-burst-balance
58c261b69d23185e5a08f19e7d2ce4e43f950121
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from checks import AgentCheck from boto3.session import Session import datetime
36.941176
102
0.480096
# -*- coding: utf-8 -*- from checks import AgentCheck from boto3.session import Session import datetime class EBSBurstBalance(AgentCheck): def check(self, config): if 'region' not in config: self.log.error('no region') return session = Session(region_name=config['region'])...
2,345
13
49
765339d4fc4652eb9c074cc80533af5039fad69c
8,884
py
Python
main/interferometer_testing_LWA.py
nithyanandan/MOFF
c2bd68b792a5269cfffe1d93b4710eae9ba8ca55
[ "MIT" ]
3
2019-12-11T07:14:10.000Z
2020-11-07T19:25:32.000Z
main/interferometer_testing_LWA.py
nithyanandan/MOFF
c2bd68b792a5269cfffe1d93b4710eae9ba8ca55
[ "MIT" ]
8
2015-08-20T19:46:29.000Z
2015-09-19T01:31:43.000Z
main/interferometer_testing_LWA.py
epic-astronomy/EPIC
c2bd68b792a5269cfffe1d93b4710eae9ba8ca55
[ "MIT" ]
1
2019-09-24T19:05:34.000Z
2019-09-24T19:05:34.000Z
import datetime as DT import numpy as NP import matplotlib.pyplot as PLT import matplotlib.colors as PLTC import scipy.constants as FCNST from astropy.io import fits from astropy.io import ascii from astropy.table import Table import progressbar as PGB import antenna_array as AA import geometry as GEOM import my_DSP_mo...
46.757895
219
0.647794
import datetime as DT import numpy as NP import matplotlib.pyplot as PLT import matplotlib.colors as PLTC import scipy.constants as FCNST from astropy.io import fits from astropy.io import ascii from astropy.table import Table import progressbar as PGB import antenna_array as AA import geometry as GEOM import my_DSP_mo...
0
0
0
eb9a9f1b47b096471f29f1f8404752392820034c
1,220
py
Python
convert_to_list.py
HimanchalChandra/visual-relationship-detection
74922fbb8a3dc1a15b539a7178acb48256f3ad0c
[ "Apache-2.0" ]
2
2021-04-16T08:33:24.000Z
2021-10-15T12:21:53.000Z
convert_to_list.py
HimanchalChandra/visual-relationship-detection
74922fbb8a3dc1a15b539a7178acb48256f3ad0c
[ "Apache-2.0" ]
null
null
null
convert_to_list.py
HimanchalChandra/visual-relationship-detection
74922fbb8a3dc1a15b539a7178acb48256f3ad0c
[ "Apache-2.0" ]
null
null
null
import json import os from opts import parse_opts opt = parse_opts() # prepare train.txt with open(os.path.join(opt.dataset_path, 'json_dataset','annotations_train.json'), 'r') as f: annotations = json.load(f) sg_train_images = os.listdir(os.path.join(opt.dataset_path,'sg_dataset','sg_train_images')) sg_test_ima...
27.727273
93
0.686066
import json import os from opts import parse_opts opt = parse_opts() # prepare train.txt with open(os.path.join(opt.dataset_path, 'json_dataset','annotations_train.json'), 'r') as f: annotations = json.load(f) sg_train_images = os.listdir(os.path.join(opt.dataset_path,'sg_dataset','sg_train_images')) sg_test_ima...
0
0
0
f62dc224cc333347c997eb5e3bac4a133452c4ee
4,528
py
Python
ndcube/tests/test_utils_wcs.py
BaptistePellorceAstro/ndcube
eaa2841a6bf90ac2fb2f901747c9a297c0810862
[ "BSD-2-Clause" ]
null
null
null
ndcube/tests/test_utils_wcs.py
BaptistePellorceAstro/ndcube
eaa2841a6bf90ac2fb2f901747c9a297c0810862
[ "BSD-2-Clause" ]
null
null
null
ndcube/tests/test_utils_wcs.py
BaptistePellorceAstro/ndcube
eaa2841a6bf90ac2fb2f901747c9a297c0810862
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import pytest import unittest import numpy as np import astropy.wcs from ndcube import utils from ndcube.tests import helpers ht = {'CTYPE3': 'HPLT-TAN', 'CUNIT3': 'deg', 'CDELT3': 0.5, 'CRPIX3': 0, 'CRVAL3': 0, 'NAXIS3': 2, 'CTYPE2': 'WAVE ', 'CUNIT2': 'Angstrom', 'CDELT2': 0.2, 'C...
38.05042
98
0.612633
# -*- coding: utf-8 -*- import pytest import unittest import numpy as np import astropy.wcs from ndcube import utils from ndcube.tests import helpers ht = {'CTYPE3': 'HPLT-TAN', 'CUNIT3': 'deg', 'CDELT3': 0.5, 'CRPIX3': 0, 'CRVAL3': 0, 'NAXIS3': 2, 'CTYPE2': 'WAVE ', 'CUNIT2': 'Angstrom', 'CDELT2': 0.2, 'C...
1,016
0
198
6ab56e40aa88ffa63c26d960b84a65a830e938f4
174
py
Python
foo/bar/__init__.py
graingert/henbruas_foo_bar_baz
ba68b63e9424db97d6fd14122e8eaef1a0923a05
[ "MIT" ]
1
2020-09-26T12:41:41.000Z
2020-09-26T12:41:41.000Z
foo/bar/__init__.py
graingert/henbruas-foo-bar-baz
ba68b63e9424db97d6fd14122e8eaef1a0923a05
[ "MIT" ]
null
null
null
foo/bar/__init__.py
graingert/henbruas-foo-bar-baz
ba68b63e9424db97d6fd14122e8eaef1a0923a05
[ "MIT" ]
null
null
null
import foo.bar.baz __all__ = ["foo", "baz"] reveal_type(foo) reveal_type(foo.bar) reveal_type(foo.bar.baz) reveal_type(foo.bar.baz.x) reveal_type(baz) reveal_type(bar.baz)
15.818182
26
0.752874
import foo.bar.baz __all__ = ["foo", "baz"] reveal_type(foo) reveal_type(foo.bar) reveal_type(foo.bar.baz) reveal_type(foo.bar.baz.x) reveal_type(baz) reveal_type(bar.baz)
0
0
0
3f9275e231dab92870638e5c2ba019e1d962a073
18,443
py
Python
esphome/components/mqtt/__init__.py
OttoWinter/esphomeyaml
6a85259e4d6d1b0a0f819688b8e555efcb99ecb0
[ "MIT" ]
249
2018-04-07T12:04:11.000Z
2019-01-25T01:11:34.000Z
esphome/components/mqtt/__init__.py
OttoWinter/esphomeyaml
6a85259e4d6d1b0a0f819688b8e555efcb99ecb0
[ "MIT" ]
243
2018-04-11T16:37:11.000Z
2019-01-25T16:50:37.000Z
esphome/components/mqtt/__init__.py
OttoWinter/esphomeyaml
6a85259e4d6d1b0a0f819688b8e555efcb99ecb0
[ "MIT" ]
40
2018-04-10T05:50:14.000Z
2019-01-25T15:20:36.000Z
import re import esphome.codegen as cg import esphome.config_validation as cv from esphome import automation from esphome.automation import Condition from esphome.components import logger from esphome.const import ( CONF_AVAILABILITY, CONF_BIRTH_MESSAGE, CONF_BROKER, CONF_CERTIFICATE_AUTHORITY, CON...
37.034137
88
0.680638
import re import esphome.codegen as cg import esphome.config_validation as cv from esphome import automation from esphome.automation import Condition from esphome.components import logger from esphome.const import ( CONF_AVAILABILITY, CONF_BIRTH_MESSAGE, CONF_BROKER, CONF_CERTIFICATE_AUTHORITY, CON...
9,009
0
226
a1aa629cae29520de03a214cd3415b0e7fc05606
456
py
Python
intermediate problems/Algorithmic Complexity/Wrath.py
doanthinhvo/Codeforces-Solutions-in-Python
92686f3234202ef1049e14c078dcc29b1d5ac225
[ "MIT" ]
4
2021-06-14T10:44:28.000Z
2021-06-26T05:29:07.000Z
intermediate problems/Algorithmic Complexity/Wrath.py
doanthinhvo/Codeforces-Solutions-in-Python
92686f3234202ef1049e14c078dcc29b1d5ac225
[ "MIT" ]
null
null
null
intermediate problems/Algorithmic Complexity/Wrath.py
doanthinhvo/Codeforces-Solutions-in-Python
92686f3234202ef1049e14c078dcc29b1d5ac225
[ "MIT" ]
2
2021-06-22T12:47:53.000Z
2021-06-26T05:29:09.000Z
n = int(input()) a = list(map(int, input().split())) count = 0 j = n - 1 #j là giới hạn bắt đầu của một lần vả: j giúp chống lặp người đã bị giết. #j phải luôn bé hơn i, vì người ở i chỉ vả được những người ở bên trái nó. #last_kill_pos: là giới hạn kết thúc của một lần vả. for i in range(n - 1, -1 , -1): j = min(i...
22.8
74
0.627193
n = int(input()) a = list(map(int, input().split())) count = 0 j = n - 1 #j là giới hạn bắt đầu của một lần vả: j giúp chống lặp người đã bị giết. #j phải luôn bé hơn i, vì người ở i chỉ vả được những người ở bên trái nó. #last_kill_pos: là giới hạn kết thúc của một lần vả. for i in range(n - 1, -1 , -1): j = min(i...
0
0
0
3df08c48b4543e016839229685c6a766d7e87508
4,233
py
Python
multiProc/src/parGALE.py
rahlk/Experimental-Algorithms
d04a2d3ec5a4c54ff3ebff5cf003b93d2a983061
[ "MIT" ]
null
null
null
multiProc/src/parGALE.py
rahlk/Experimental-Algorithms
d04a2d3ec5a4c54ff3ebff5cf003b93d2a983061
[ "MIT" ]
9
2015-09-14T21:07:06.000Z
2015-12-08T01:38:08.000Z
multiProc/src/parGALE.py
rahlk/Experimental-Algorithms
d04a2d3ec5a4c54ff3ebff5cf003b93d2a983061
[ "MIT" ]
null
null
null
""" """ from __future__ import print_function, division import os from demo import * import subprocess import sys sys.path.append(os.path.abspath('../problems/')) # Get the git root directory root=repo_dir = subprocess.Popen(['git' ,'rev-parse' ...
27.666667
77
0.616584
""" """ from __future__ import print_function, division import os from demo import * import subprocess import sys sys.path.append(os.path.abspath('../problems/')) # Get the git root directory root=repo_dir = subprocess.Popen(['git' ,'rev-parse' ...
2,165
0
194
72ff83346d8d3330659ad8dff6135283c056fe91
2,441
py
Python
oauthenticator/tests/test_bitbucket.py
jeff-sternberg/oauthenticator
158eb206dd2b59961442a4d3b67fbbb179a3030a
[ "BSD-3-Clause" ]
4
2019-09-17T08:10:57.000Z
2020-09-03T21:27:21.000Z
oauthenticator/tests/test_bitbucket.py
jeff-sternberg/oauthenticator
158eb206dd2b59961442a4d3b67fbbb179a3030a
[ "BSD-3-Clause" ]
2
2017-05-02T18:44:55.000Z
2017-10-06T15:11:23.000Z
oauthenticator/tests/test_bitbucket.py
jeff-sternberg/oauthenticator
158eb206dd2b59961442a4d3b67fbbb179a3030a
[ "BSD-3-Clause" ]
4
2019-09-27T03:22:44.000Z
2021-01-20T08:47:34.000Z
import os from unittest.mock import patch from pytest import fixture, mark from ..bitbucket import BitbucketOAuthenticator from .mocks import setup_oauth_mock def user_model(username): """Return a user model""" return { 'username': username, } @fixture
29.409639
68
0.669398
import os from unittest.mock import patch from pytest import fixture, mark from ..bitbucket import BitbucketOAuthenticator from .mocks import setup_oauth_mock def user_model(username): """Return a user model""" return { 'username': username, } @fixture def bitbucket_client(client): setup_o...
2,092
0
68
614f2ffc9bfb0c9d3e4e2692c37311ee02f72bbd
2,429
py
Python
stockmarket/tests/test_switchingstrategies.py
lbolla/Agent-Based-Stock-Market-Model
6ff9549b2082371778632f4ad23a12f42c24cccd
[ "MIT" ]
15
2018-06-10T13:08:47.000Z
2022-01-19T05:55:01.000Z
stockmarket/tests/test_switchingstrategies.py
lbolla/Agent-Based-Stock-Market-Model
6ff9549b2082371778632f4ad23a12f42c24cccd
[ "MIT" ]
45
2017-01-26T10:54:40.000Z
2017-09-12T14:23:01.000Z
stockmarket/tests/test_switchingstrategies.py
lbolla/Agent-Based-Stock-Market-Model
6ff9549b2082371778632f4ad23a12f42c24cccd
[ "MIT" ]
5
2018-11-04T17:49:58.000Z
2021-12-23T03:09:36.000Z
import pytest from stockmarket.agent import Trader from stockmarket.switchingstrategies import * from stockmarket.valuationfunctions import * from numpy.testing import assert_equal from numpy.testing import assert_raises @pytest.fixture()
63.921053
120
0.70317
import pytest from stockmarket.agent import Trader from stockmarket.switchingstrategies import * from stockmarket.valuationfunctions import * from numpy.testing import assert_equal from numpy.testing import assert_raises @pytest.fixture() def agents(): return [Trader(name="Agent1", money=1000, bid_ask_spread=0, m...
2,142
0
45
92f64bf7bd58edbbd33babc4dc0d18c33704d313
2,823
py
Python
pmi/pmi_odds.py
rogersprates/word2vec-financial-sentiment
42172b47dc0a5d228e473bd34d15a9aa59c43537
[ "MIT" ]
2
2018-11-16T13:44:24.000Z
2021-09-23T23:54:34.000Z
pmi/pmi_odds.py
dimiiako/word2vec-financial-sentiment
42172b47dc0a5d228e473bd34d15a9aa59c43537
[ "MIT" ]
null
null
null
pmi/pmi_odds.py
dimiiako/word2vec-financial-sentiment
42172b47dc0a5d228e473bd34d15a9aa59c43537
[ "MIT" ]
3
2017-04-12T07:00:23.000Z
2021-11-27T03:43:33.000Z
"""pmi_odds.py: computes the PMI (Pointwise mutual information) with odds """ import json import os from probabilities import pmi_odds __author__ = "Edimar Manica"
33.607143
91
0.680482
"""pmi_odds.py: computes the PMI (Pointwise mutual information) with odds """ import json import os from probabilities import pmi_odds __author__ = "Edimar Manica" def create_vocabulary(news): vocabulary = [] for ide in news: vocabulary = vocabulary + news[ide]["text"] return set(vocabulary...
2,536
0
115
407bdee7a7f86e022e7da89584d22b5150934f0d
2,332
py
Python
hist.py
lclutz/sublime-text-shell-command
846e1d04c20fba7612d8073e8b1b19439f4ab559
[ "MIT" ]
96
2015-01-06T17:37:21.000Z
2022-02-14T11:14:11.000Z
hist.py
lclutz/sublime-text-shell-command
846e1d04c20fba7612d8073e8b1b19439f4ab559
[ "MIT" ]
50
2015-01-01T13:26:24.000Z
2021-12-20T01:04:18.000Z
hist.py
lclutz/sublime-text-shell-command
846e1d04c20fba7612d8073e8b1b19439f4ab559
[ "MIT" ]
27
2015-02-12T18:17:22.000Z
2022-03-31T03:03:27.000Z
# NOTE(kaste): Take from https://github.com/randy3k/AlignTab # Copyright (c) 2015 Randy Lai <randy.cs.lai@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, in...
35.333333
87
0.691681
# NOTE(kaste): Take from https://github.com/randy3k/AlignTab # Copyright (c) 2015 Randy Lai <randy.cs.lai@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, in...
796
192
72
f20ec0d8e0574b5719072252566350a189a75043
336
py
Python
testtools/UART_interface/serial_settings.py
cbauer10/azure-iot-sdk-c
2080c8b537f31b72b8668ba3bb8c6772da55d63a
[ "MIT" ]
545
2016-11-29T18:04:48.000Z
2022-03-28T09:31:06.000Z
testtools/UART_interface/serial_settings.py
cbauer10/azure-iot-sdk-c
2080c8b537f31b72b8668ba3bb8c6772da55d63a
[ "MIT" ]
1,644
2016-11-17T09:49:31.000Z
2022-03-30T18:10:13.000Z
testtools/UART_interface/serial_settings.py
cbauer10/azure-iot-sdk-c
2080c8b537f31b72b8668ba3bb8c6772da55d63a
[ "MIT" ]
826
2016-11-16T16:05:16.000Z
2022-03-18T19:23:22.000Z
baud_rate = 115200 port = "/dev/ttyACM1" input_file=None output_file='log.txt' wait_for_flash = 10 bits_to_cache = 1600 mxchip_file = "/media/newt/AZ31665" setup_string = "Setup complete" skip_setup = False mxchip_buf_pause = .06 serial_comm_timeout = 2 device_type = 'mxchip' test_timeout = None reset_device = False te...
21
35
0.779762
baud_rate = 115200 port = "/dev/ttyACM1" input_file=None output_file='log.txt' wait_for_flash = 10 bits_to_cache = 1600 mxchip_file = "/media/newt/AZ31665" setup_string = "Setup complete" skip_setup = False mxchip_buf_pause = .06 serial_comm_timeout = 2 device_type = 'mxchip' test_timeout = None reset_device = False te...
0
0
0
84807805d4c9e99301ea9459dc3f1a877cc0d1c9
428
py
Python
pulsar/async/_subprocess.py
PyCN/pulsar
fee44e871954aa6ca36d00bb5a3739abfdb89b26
[ "BSD-3-Clause" ]
1,410
2015-01-02T14:55:07.000Z
2022-03-28T17:22:06.000Z
pulsar/async/_subprocess.py
PyCN/pulsar
fee44e871954aa6ca36d00bb5a3739abfdb89b26
[ "BSD-3-Clause" ]
194
2015-01-22T06:18:24.000Z
2020-10-20T21:21:58.000Z
pulsar/async/_subprocess.py
PyCN/pulsar
fee44e871954aa6ca36d00bb5a3739abfdb89b26
[ "BSD-3-Clause" ]
168
2015-01-31T10:29:55.000Z
2022-03-14T10:22:24.000Z
if __name__ == '__main__': import sys import pickle from multiprocessing import current_process from multiprocessing.spawn import import_main_path data = pickle.load(sys.stdin.buffer) current_process().authkey = data['authkey'] sys.path = data['path'] import_main_path(data['main']) ...
25.176471
54
0.705607
if __name__ == '__main__': import sys import pickle from multiprocessing import current_process from multiprocessing.spawn import import_main_path data = pickle.load(sys.stdin.buffer) current_process().authkey = data['authkey'] sys.path = data['path'] import_main_path(data['main']) ...
0
0
0
59627c56bf8f3b4b82db7818b4d48287abf4a605
5,750
py
Python
tests/conftest.py
ilya-e/coordinates
328ef6f07450592524b49c71a0859c3b1d1fd489
[ "MIT" ]
null
null
null
tests/conftest.py
ilya-e/coordinates
328ef6f07450592524b49c71a0859c3b1d1fd489
[ "MIT" ]
4
2019-05-15T10:24:48.000Z
2022-01-28T01:14:55.000Z
tests/conftest.py
ilya-e/coordinates
328ef6f07450592524b49c71a0859c3b1d1fd489
[ "MIT" ]
5
2017-12-23T09:48:07.000Z
2022-03-17T05:52:02.000Z
from io import StringIO import pytest from testlib import mktmp _nav_content_v2 = '''\ 2 NAVIGATION DATA RINEX VERSION / TYPE CCRINEXN V1.6.0 UX CDDIS 12-APR-16 17:31 PGM / RUN BY / DATE IGS BROADCAST EPHEMERIS FILE COMMENT ...
55.288462
80
0.669217
from io import StringIO import pytest from testlib import mktmp _nav_content_v2 = '''\ 2 NAVIGATION DATA RINEX VERSION / TYPE CCRINEXN V1.6.0 UX CDDIS 12-APR-16 17:31 PGM / RUN BY / DATE IGS BROADCAST EPHEMERIS FILE COMMENT ...
179
0
110
dbbcbe484440229c47401ead61b8028c24591e0c
83,613
py
Python
tool/Controllers/TensorFlowParser.py
HornedSungem/SungemSDK-Python
5ce5eb7f84654aecf6840de773188f436219559d
[ "Apache-2.0" ]
14
2018-08-16T09:11:39.000Z
2019-12-07T12:54:32.000Z
movidius/NCSDK/ncsdk-x86_64/tk/Controllers/TensorFlowParser.py
satabios/Yolo-implementation-using-Intel-Movidius-Neural-Compute-Stick-NCS-on-Raspberry-Pi
79b410b5a4c6deea209ef999a97c5e32da58653f
[ "MIT" ]
2
2019-08-23T23:31:10.000Z
2020-06-17T09:21:57.000Z
tool/Controllers/TensorFlowParser.py
HornedSungem/SungemSDK-Python
5ce5eb7f84654aecf6840de773188f436219559d
[ "Apache-2.0" ]
7
2018-10-02T01:46:43.000Z
2021-06-04T19:10:47.000Z
# Copyright 2017 Intel Corporation. # The source code, information and material ("Material") contained herein is # owned by Intel Corporation or its suppliers or licensors, and title to such # Material remains with Intel Corporation or its suppliers or licensors. # The Material contains proprietary information of Intel...
44.784681
186
0.392642
# Copyright 2017 Intel Corporation. # The source code, information and material ("Material") contained herein is # owned by Intel Corporation or its suppliers or licensors, and title to such # Material remains with Intel Corporation or its suppliers or licensors. # The Material contains proprietary information of Intel...
80,713
0
183
090b7c98b12efeb6c22312354186eb599698aef2
316
py
Python
getline/excepts.py
timtadh/getline
c17a3405bde1f2edd2bdfbb9ad4c230d0419ac0b
[ "BSD-3-Clause" ]
4
2015-03-25T04:53:43.000Z
2016-07-17T18:06:42.000Z
getline/excepts.py
timtadh/getline
c17a3405bde1f2edd2bdfbb9ad4c230d0419ac0b
[ "BSD-3-Clause" ]
null
null
null
getline/excepts.py
timtadh/getline
c17a3405bde1f2edd2bdfbb9ad4c230d0419ac0b
[ "BSD-3-Clause" ]
null
null
null
''' Getline - A library to get text from the console Author: Tim Henderson Contact: tim.tadh@hackthology.com Copyright (c) 2010 All Rights Reserved. Licensed under a BSD style license see the LICENSE file. File: __linux_impl Purpose: The linux implementation of getline '''
24.307692
56
0.787975
''' Getline - A library to get text from the console Author: Tim Henderson Contact: tim.tadh@hackthology.com Copyright (c) 2010 All Rights Reserved. Licensed under a BSD style license see the LICENSE file. File: __linux_impl Purpose: The linux implementation of getline ''' class GetlineException(Exception): pass
0
18
23
55d9072e4d504f55d90ff8e9c73484fcf9c7cdd6
528
py
Python
01-python-refresher/problems/05-first-negative-index.py
estimand/python-for-data-science
90178784eb40936054d53f4ebbb67b2cf7fd4087
[ "CC-BY-4.0" ]
null
null
null
01-python-refresher/problems/05-first-negative-index.py
estimand/python-for-data-science
90178784eb40936054d53f4ebbb67b2cf7fd4087
[ "CC-BY-4.0" ]
null
null
null
01-python-refresher/problems/05-first-negative-index.py
estimand/python-for-data-science
90178784eb40936054d53f4ebbb67b2cf7fd4087
[ "CC-BY-4.0" ]
4
2019-03-05T17:53:30.000Z
2019-06-26T11:48:57.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest def first_negative_index(): """ Returns the index of the first negative element in a given list of numbers. """ return if __name__ == "__main__": unittest.main()
22.956522
79
0.668561
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest def first_negative_index(): """ Returns the index of the first negative element in a given list of numbers. """ return class TestFirstNegativeIndex(unittest.TestCase): def test_first_negative_index(self): self.assertIsNone(f...
201
27
49
69396c6f63e0123dbeff5f668a09d4d0ec0ad2c8
9,832
py
Python
src/main.py
autowonderman/2018-JData-Unicom-RiskUser
6ea5d3179aa8ea1a89e9b8fa7e74ce9c9cac4302
[ "MIT" ]
20
2018-05-23T08:39:16.000Z
2021-02-20T04:14:06.000Z
src/main.py
wujx0213/2018-JData-Unicom-RiskUser
6ea5d3179aa8ea1a89e9b8fa7e74ce9c9cac4302
[ "MIT" ]
null
null
null
src/main.py
wujx0213/2018-JData-Unicom-RiskUser
6ea5d3179aa8ea1a89e9b8fa7e74ce9c9cac4302
[ "MIT" ]
17
2018-05-23T07:28:22.000Z
2019-03-20T09:18:28.000Z
# coding: utf-8 from __future__ import division import numpy as np import pandas as pd from sklearn import metrics import lightgbm as lgb import time from multiprocessing import cpu_count import warnings warnings.filterwarnings('ignore') # Constants define ROOT_PATH = '../' ONLINE = 1 target = 'label' train_len = 4...
49.908629
139
0.682465
# coding: utf-8 from __future__ import division import numpy as np import pandas as pd from sklearn import metrics import lightgbm as lgb import time from multiprocessing import cpu_count import warnings warnings.filterwarnings('ignore') # Constants define ROOT_PATH = '../' ONLINE = 1 target = 'label' train_len = 4...
3,735
0
253
4dc2c05150b71590453542cfcd0e517e57e240e9
6,578
py
Python
archivebox/logs.py
backwardn/ArchiveBox
10799e4085b6f0c791135c3df06675618e34aa78
[ "MIT" ]
2
2019-10-17T00:42:41.000Z
2020-11-05T22:41:22.000Z
archivebox/logs.py
backwardn/ArchiveBox
10799e4085b6f0c791135c3df06675618e34aa78
[ "MIT" ]
59
2019-09-25T06:15:31.000Z
2021-07-21T05:29:52.000Z
archivebox/logs.py
backwardn/ArchiveBox
10799e4085b6f0c791135c3df06675618e34aa78
[ "MIT" ]
1
2019-10-22T19:23:21.000Z
2019-10-22T19:23:21.000Z
import sys from datetime import datetime from config import ANSI, REPO_DIR, OUTPUT_DIR # globals are bad, mmkay _LAST_RUN_STATS = { 'skipped': 0, 'succeeded': 0, 'failed': 0, 'parsing_start_ts': 0, 'parsing_end_ts': 0, 'indexing_start_ts': 0, 'indexing_end_ts': 0, 'archiving_start_t...
32.564356
108
0.574187
import sys from datetime import datetime from config import ANSI, REPO_DIR, OUTPUT_DIR # globals are bad, mmkay _LAST_RUN_STATS = { 'skipped': 0, 'succeeded': 0, 'failed': 0, 'parsing_start_ts': 0, 'parsing_end_ts': 0, 'indexing_start_ts': 0, 'indexing_end_ts': 0, 'archiving_start_t...
4,000
0
253
b0b4f8e45c3a89e33030d8d4505d5c8ac2abe457
2,054
py
Python
external/vcm/vcm/testing.py
ai2cm/fv3net
e62038aee0a97d6207e66baabd8938467838cf51
[ "MIT" ]
1
2021-12-14T23:43:35.000Z
2021-12-14T23:43:35.000Z
external/vcm/vcm/testing.py
ai2cm/fv3net
e62038aee0a97d6207e66baabd8938467838cf51
[ "MIT" ]
195
2021-09-16T05:47:18.000Z
2022-03-31T22:03:15.000Z
external/vcm/vcm/testing.py
ai2cm/fv3net
e62038aee0a97d6207e66baabd8938467838cf51
[ "MIT" ]
null
null
null
from typing import Hashable, List, Tuple, Mapping import contextlib import pytest import numpy as np import joblib import xarray import io @contextlib.contextmanager def no_warning(*args): """Raise error if any errors occur. Takes the same arguments as ``pytest.warns``. Example: >>> import warn...
28.527778
123
0.643135
from typing import Hashable, List, Tuple, Mapping import contextlib import pytest import numpy as np import joblib import xarray import io @contextlib.contextmanager def no_warning(*args): """Raise error if any errors occur. Takes the same arguments as ``pytest.warns``. Example: >>> import warn...
575
0
46
f3c271325f8cb951926682f322a1c0dd15800adb
142
py
Python
Aulas/Aulas-Mundo3/Aula016/Aula016c.py
Sofista23/Aula1_Python
129132d977058ac6f23cc95c7bb8b55d8a1bb429
[ "MIT" ]
null
null
null
Aulas/Aulas-Mundo3/Aula016/Aula016c.py
Sofista23/Aula1_Python
129132d977058ac6f23cc95c7bb8b55d8a1bb429
[ "MIT" ]
null
null
null
Aulas/Aulas-Mundo3/Aula016/Aula016c.py
Sofista23/Aula1_Python
129132d977058ac6f23cc95c7bb8b55d8a1bb429
[ "MIT" ]
null
null
null
nome=input("Digite seu nome:") idade=int(input("Digite sua idade:")) sexo=input("Digite seu sexo [m/f]:") tupla=(nome,idade,sexo) print(tupla)
28.4
37
0.711268
nome=input("Digite seu nome:") idade=int(input("Digite sua idade:")) sexo=input("Digite seu sexo [m/f]:") tupla=(nome,idade,sexo) print(tupla)
0
0
0
adca1b751b37f0f6ccdcc090e92f6071104cc127
6,844
py
Python
sentiment_train_model.py
justinli930/Public-Morale-Over-Covid
36fc07e48fe5fcf11cc9c35856f3e2eedc4998ec
[ "Apache-2.0" ]
null
null
null
sentiment_train_model.py
justinli930/Public-Morale-Over-Covid
36fc07e48fe5fcf11cc9c35856f3e2eedc4998ec
[ "Apache-2.0" ]
null
null
null
sentiment_train_model.py
justinli930/Public-Morale-Over-Covid
36fc07e48fe5fcf11cc9c35856f3e2eedc4998ec
[ "Apache-2.0" ]
null
null
null
"""Structure for model trainer loosely taken from https://realpython.com/sentiment-analysis-python mainly for guide on spacy. dataset used is from https://ai.stanford.edu/~amaas/data/sentiment/ using version 2.3.5 of spacy as version 3 includes api issues when trying to use en cor web sm """ import os from random impor...
43.044025
165
0.654004
"""Structure for model trainer loosely taken from https://realpython.com/sentiment-analysis-python mainly for guide on spacy. dataset used is from https://ai.stanford.edu/~amaas/data/sentiment/ using version 2.3.5 of spacy as version 3 includes api issues when trying to use en cor web sm """ import os from random impor...
622
0
23
46067aa1f219db59d6e7a1fd9908d08cbd9fc4da
443
py
Python
files/vuln3/exploit3.py
Lazula/presentation-binary-exploitation-fundamentals
212a27478210faa4c3655e64d8f982775f5dd58b
[ "Unlicense" ]
null
null
null
files/vuln3/exploit3.py
Lazula/presentation-binary-exploitation-fundamentals
212a27478210faa4c3655e64d8f982775f5dd58b
[ "Unlicense" ]
null
null
null
files/vuln3/exploit3.py
Lazula/presentation-binary-exploitation-fundamentals
212a27478210faa4c3655e64d8f982775f5dd58b
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python2 import struct padding = 'A'*28 #Address used with gdb #shellcode_addr = struct.pack("I", 0xffffd040) #Address used for exploit shellcode_addr = struct.pack("I", 0xffffd0b0) #Source: https://www.exploit-db.com/shellcodes/46809 #execve("/bin/sh", NULL, NULL) shellcode = "\x31\xc9\x6a\x0b\x58\x5...
22.15
94
0.733634
#!/usr/bin/env python2 import struct padding = 'A'*28 #Address used with gdb #shellcode_addr = struct.pack("I", 0xffffd040) #Address used for exploit shellcode_addr = struct.pack("I", 0xffffd0b0) #Source: https://www.exploit-db.com/shellcodes/46809 #execve("/bin/sh", NULL, NULL) shellcode = "\x31\xc9\x6a\x0b\x58\x5...
0
0
0
985f29411a166562fbd25509052b0da7b3013412
1,253
py
Python
dp/q11.py
pengfei-chen/algorithm_qa
c2ccdcb77004e88279d61e4e433ee49527fc34d6
[ "MIT" ]
79
2018-03-27T12:37:49.000Z
2022-01-21T10:18:17.000Z
dp/q11.py
pengfei-chen/algorithm_qa
c2ccdcb77004e88279d61e4e433ee49527fc34d6
[ "MIT" ]
null
null
null
dp/q11.py
pengfei-chen/algorithm_qa
c2ccdcb77004e88279d61e4e433ee49527fc34d6
[ "MIT" ]
27
2018-04-08T03:07:06.000Z
2021-10-30T00:01:50.000Z
""" 给定一个二维数组map,含义是一张地图,例如,如下矩阵: -2 -3 3 -5 -10 1 0 30 -5 游戏规则如下: (1)骑士从左上角出发,每次只能向右或者向下走,最后到达右下角见到公主。 (2)地图中每个位置的值代表骑士要遭遇的事情。如果是负数,说明此处有怪兽, 要让骑士掉血。如果是非负数,则代表此处有血瓶,能让骑士回血。 (3)骑士从左上角到右下角的过程中,走到任何一个位置,血量都不能少于1. 为了保证骑士能见到公主,初始血量至少是多少?根据map,返回初始血量。 """ if __name__ == '__main__': my_map = [[-2, -3, 3], [-5, -10, 1]...
27.23913
84
0.533919
""" 给定一个二维数组map,含义是一张地图,例如,如下矩阵: -2 -3 3 -5 -10 1 0 30 -5 游戏规则如下: (1)骑士从左上角出发,每次只能向右或者向下走,最后到达右下角见到公主。 (2)地图中每个位置的值代表骑士要遭遇的事情。如果是负数,说明此处有怪兽, 要让骑士掉血。如果是非负数,则代表此处有血瓶,能让骑士回血。 (3)骑士从左上角到右下角的过程中,走到任何一个位置,血量都不能少于1. 为了保证骑士能见到公主,初始血量至少是多少?根据map,返回初始血量。 """ class DungenonGame: @classmethod def get_min_hp(cls, m): ...
811
41
23
f4190354b682afdd25419c77b14e1ec356a5d810
6,060
py
Python
pandapower/plotting/plotly/vlevel_plotly.py
suzannejanssen/pandapower
8d0d422c28924c85e774e0e357e4abff86ff3c55
[ "BSD-3-Clause" ]
1
2020-10-19T06:39:15.000Z
2020-10-19T06:39:15.000Z
pandapower/plotting/plotly/vlevel_plotly.py
miek770/pandapower
de004efc1b7432a633792af4f551f7635a02db47
[ "BSD-3-Clause" ]
null
null
null
pandapower/plotting/plotly/vlevel_plotly.py
miek770/pandapower
de004efc1b7432a633792af4f551f7635a02db47
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2016-2018 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. import pandas as pd from pandapower.plotting.generic_geodata import create_generic_coordinates from pandapower.plotting.plotly.tr...
45.223881
120
0.679703
# -*- coding: utf-8 -*- # Copyright (c) 2016-2018 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. import pandas as pd from pandapower.plotting.generic_geodata import create_generic_coordinates from pandapower.plotting.plotly.tr...
0
0
0
f0b61d465c43a5af5d164b54e0cfaea6d2ccdac4
139
py
Python
client/bert_serving/client/_py3_var.py
devanshuDesai/bert-as-service
a1d3a225387bfdea15c7721d8493e6005b1c4a1b
[ "MIT" ]
10,342
2018-11-12T11:11:50.000Z
2022-03-23T15:29:27.000Z
client/bert_serving/client/_py3_var.py
worksking/bert-as-service
c57a646796c0c967ffd6d97249bce20c384272e3
[ "MIT" ]
553
2018-11-12T13:41:34.000Z
2022-03-21T06:52:07.000Z
client/bert_serving/client/_py3_var.py
worksking/bert-as-service
c57a646796c0c967ffd6d97249bce20c384272e3
[ "MIT" ]
2,005
2018-11-12T12:52:04.000Z
2022-03-21T10:02:14.000Z
__all__ = ['_py2', '_str', '_buffer', '_raise'] _py2 = False _str = str _buffer = memoryview
13.9
47
0.640288
__all__ = ['_py2', '_str', '_buffer', '_raise'] _py2 = False _str = str _buffer = memoryview def _raise(t_e, _e): raise t_e from _e
21
0
23
9c1291a2693183eb2286818639ecea6b6ba312dc
157
py
Python
covfefe/frameworks/torch/math.py
deepnn/pybrew
1417c910f6663e1c5f3c5eafdf1a34b68dce88a1
[ "MIT" ]
4
2017-06-08T08:59:48.000Z
2020-02-13T18:17:00.000Z
covfefe/frameworks/torch/math.py
deepnn/coffee
1417c910f6663e1c5f3c5eafdf1a34b68dce88a1
[ "MIT" ]
null
null
null
covfefe/frameworks/torch/math.py
deepnn/coffee
1417c910f6663e1c5f3c5eafdf1a34b68dce88a1
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function # This will make all the math functions of torch available from torch import *
26.166667
58
0.834395
from __future__ import absolute_import from __future__ import print_function # This will make all the math functions of torch available from torch import *
0
0
0
5b5e2f28135770e6b8706e5756cc7952341c4122
8,331
py
Python
google/cloud/dlp_v2/types/__init__.py
LaudateCorpus1/python-dlp
e0a51c9254677016f547647848dcbee85ee1bf29
[ "Apache-2.0" ]
32
2020-07-11T02:50:13.000Z
2022-02-10T19:45:59.000Z
google/cloud/dlp_v2/types/__init__.py
LaudateCorpus1/python-dlp
e0a51c9254677016f547647848dcbee85ee1bf29
[ "Apache-2.0" ]
112
2020-02-11T13:24:14.000Z
2022-03-31T20:59:08.000Z
google/cloud/dlp_v2/types/__init__.py
LaudateCorpus1/python-dlp
e0a51c9254677016f547647848dcbee85ee1bf29
[ "Apache-2.0" ]
22
2020-02-03T18:23:38.000Z
2022-01-29T08:09:29.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
24.868657
74
0.716721
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
0
0
0
7b4a4abfc360c91e636d21c2caa530fd56ec84b4
22
py
Python
example/__init__.py
ORIGINALLIFE/ndkale
759a7132afdfcabd2de658a7701673a928992827
[ "BSD-2-Clause" ]
210
2015-03-28T01:00:08.000Z
2022-03-20T15:59:57.000Z
example/__init__.py
ORIGINALLIFE/ndkale
759a7132afdfcabd2de658a7701673a928992827
[ "BSD-2-Clause" ]
32
2015-07-30T22:31:59.000Z
2020-05-15T22:22:07.000Z
example/__init__.py
ORIGINALLIFE/ndkale
759a7132afdfcabd2de658a7701673a928992827
[ "BSD-2-Clause" ]
51
2015-03-26T21:37:46.000Z
2022-01-18T05:36:28.000Z
__author__ = 'wenbin'
11
21
0.727273
__author__ = 'wenbin'
0
0
0
3e1124e492698672a5a250af850c0ab097fc9e18
2,835
py
Python
migrations/versions/e96fe0cc3a92_.py
1ibrary/1ibrary-gzhu
768af1837d6caa185c101cc82ea67efc931865c1
[ "Apache-2.0" ]
4
2017-06-30T01:32:52.000Z
2019-07-03T15:46:24.000Z
migrations/versions/e96fe0cc3a92_.py
1ibrary/1ibrary-gzhu
768af1837d6caa185c101cc82ea67efc931865c1
[ "Apache-2.0" ]
3
2021-03-22T17:13:51.000Z
2021-12-13T19:40:20.000Z
migrations/versions/e96fe0cc3a92_.py
1ibrary/1ibrary-gzhu
768af1837d6caa185c101cc82ea67efc931865c1
[ "Apache-2.0" ]
null
null
null
"""empty message Revision ID: e96fe0cc3a92 Revises: f1ffa6279209 Create Date: 2017-07-19 09:03:31.402092 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'e96fe0cc3a92' down_revision = 'f1ffa6279209' branch_labels = None depends_on = None
38.310811
91
0.672663
"""empty message Revision ID: e96fe0cc3a92 Revises: f1ffa6279209 Create Date: 2017-07-19 09:03:31.402092 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'e96fe0cc3a92' down_revision = 'f1ffa6279209' branch_labels = None depends_on = None def upgrade(): # ...
2,490
0
46
86d571401a990e4296d11560e57a796c4b8e779e
1,155
py
Python
fm/migrations/0013_event_lifecycle.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
84
2017-10-22T11:01:39.000Z
2022-02-27T03:43:48.000Z
fm/migrations/0013_event_lifecycle.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
22
2017-12-11T07:21:56.000Z
2021-09-23T02:53:50.000Z
fm/migrations/0013_event_lifecycle.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
23
2017-12-06T06:59:52.000Z
2022-02-24T00:02:25.000Z
# ---------------------------------------------------------------------- # event lifecycle # ---------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------- # Third-party ...
33.970588
97
0.502165
# ---------------------------------------------------------------------- # event lifecycle # ---------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------- # Third-party ...
673
10
49
d4ef31c2b7a244a3e4dd3ed00d3eae530c14c6e6
3,203
py
Python
mne/io/_read_raw.py
tczhangzhi/mne-python
9fc8623eebd62d31039e90927744e376f5ee611c
[ "BSD-3-Clause" ]
null
null
null
mne/io/_read_raw.py
tczhangzhi/mne-python
9fc8623eebd62d31039e90927744e376f5ee611c
[ "BSD-3-Clause" ]
null
null
null
mne/io/_read_raw.py
tczhangzhi/mne-python
9fc8623eebd62d31039e90927744e376f5ee611c
[ "BSD-3-Clause" ]
null
null
null
"""Generic wrapper function read_raw for specific read_raw_xxx readers.""" # Authors: Clemens Brunner <clemens.brunner@gmail.com> # # License: BSD (3-clause) from pathlib import Path from functools import partial from . import (read_raw_edf, read_raw_bdf, read_raw_gdf, read_raw_brainvision, read_raw_...
33.715789
79
0.638776
"""Generic wrapper function read_raw for specific read_raw_xxx readers.""" # Authors: Clemens Brunner <clemens.brunner@gmail.com> # # License: BSD (3-clause) from pathlib import Path from functools import partial from . import (read_raw_edf, read_raw_bdf, read_raw_gdf, read_raw_brainvision, read_raw_...
324
0
23