hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
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
130
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
130
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.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
7291ac4c6404121ed688cb756ac95e7bc65b9fde
7,645
py
Python
tests/test_cassandra3.py
criteo-forks/testing.cassandra
f25bc20e0679849daae073c41281607e756e4d56
[ "Apache-2.0" ]
1
2021-02-18T04:58:04.000Z
2021-02-18T04:58:04.000Z
tests/test_cassandra3.py
criteo-forks/testing.cassandra
f25bc20e0679849daae073c41281607e756e4d56
[ "Apache-2.0" ]
null
null
null
tests/test_cassandra3.py
criteo-forks/testing.cassandra
f25bc20e0679849daae073c41281607e756e4d56
[ "Apache-2.0" ]
1
2018-07-10T13:06:46.000Z
2018-07-10T13:06:46.000Z
# -*- coding: utf-8 -*- import sys if sys.version_info < (2, 7): import unittest2 as unittest else:
34.75
114
0.650098
# -*- coding: utf-8 -*- import os import sys import signal import cassandra.cluster as cassandra_cluster import tempfile import testing.cassandra3 from mock import patch from time import sleep from shutil import rmtree if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest class Te...
0
1,535
0
5,776
0
0
0
2
226
f32d576af2373b821cd21cbecd7889f472c37d1f
8,254
py
Python
ding/reward_model/rnd_reward_model.py
jayyoung0802/DI-engine
efbb35ddaf184d1009291e6842fbbae09f193492
[ "Apache-2.0" ]
null
null
null
ding/reward_model/rnd_reward_model.py
jayyoung0802/DI-engine
efbb35ddaf184d1009291e6842fbbae09f193492
[ "Apache-2.0" ]
null
null
null
ding/reward_model/rnd_reward_model.py
jayyoung0802/DI-engine
efbb35ddaf184d1009291e6842fbbae09f193492
[ "Apache-2.0" ]
null
null
null
import torch.nn as nn import torch.optim as optim
46.370787
118
0.663194
from typing import Union, Tuple, List, Dict, Any from easydict import EasyDict import random import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from ding.utils import SequenceType, REWARD_MODEL_REGISTRY from ding.model import FCEncoder, ConvEncoder from .base_reward_model i...
0
6,573
0
1,050
0
116
0
149
313
9705b305739f77edfc4d4a38d56f9a475f434e5b
4,830
py
Python
pychron/classifier/isotope_trainer.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
31
2016-03-07T02:38:17.000Z
2022-02-14T18:23:43.000Z
pychron/classifier/isotope_trainer.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
1,626
2015-01-07T04:52:35.000Z
2022-03-25T19:15:59.000Z
pychron/classifier/isotope_trainer.py
UIllinoisHALPychron/pychron
f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc
[ "Apache-2.0" ]
26
2015-05-23T00:10:06.000Z
2022-03-07T16:51:57.000Z
# =============================================================================== # Copyright 2015 Jake Ross # # 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...
32.416107
86
0.52029
# =============================================================================== # Copyright 2015 Jake Ross # # 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...
0
0
0
3,319
0
0
0
175
158
72d434e21fa91e7cedeb6a72ca4b69bf41ba142f
7,173
py
Python
dataedit.py
dnsbob/password-dongle
a2e04ec4bd370401a14d55fedf2ea9da065fc4cf
[ "Apache-2.0" ]
null
null
null
dataedit.py
dnsbob/password-dongle
a2e04ec4bd370401a14d55fedf2ea9da065fc4cf
[ "Apache-2.0" ]
null
null
null
dataedit.py
dnsbob/password-dongle
a2e04ec4bd370401a14d55fedf2ea9da065fc4cf
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 ''' dataedit.py menu password edit for passworddongle.py ''' import getpass import json # all printable ascii chars, plus space, except double quote, tab, backslash mychars="`aZ0+nM<bY1!oL>cX2@pK;dW3#qJ:eV4$rI'fU5%sH[gT6^tG]hS7&uF{iR8*vE}jQ9(wD-kP,)xC=lO.~yB_mN/ zA" mylen=len(mychars) # directio...
32.753425
101
0.500209
#!/usr/bin/env python3 ''' dataedit.py menu password edit for passworddongle.py ''' import time import random import getpass import json # all printable ascii chars, plus space, except double quote, tab, backslash mychars="`aZ0+nM<bY1!oL>cX2@pK;dW3#qJ:eV4$rI'fU5%sH[gT6^tG]hS7&uF{iR8*vE}jQ9(wD-kP,)xC=lO.~yB_mN/ zA" my...
0
0
0
0
0
4,244
0
-18
183
1ffcc5a067d5b5c360ec8a38fa4992ad81a61a36
929
py
Python
34/__init__.py
sc4599/LeetCode
a2ce242e20e485cc8f6cc6083f4993332d414bbf
[ "MIT" ]
null
null
null
34/__init__.py
sc4599/LeetCode
a2ce242e20e485cc8f6cc6083f4993332d414bbf
[ "MIT" ]
null
null
null
34/__init__.py
sc4599/LeetCode
a2ce242e20e485cc8f6cc6083f4993332d414bbf
[ "MIT" ]
null
null
null
import unittest if __name__ == "__main__": unittest.main()
24.447368
51
0.53606
class Solution(object): def searchRange(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ count = 0 first_position = -1 last_position = -1 if target in nums: first_position = nums.index(target) ...
0
0
0
817
0
0
0
0
45
c458f982932f71bc17123edf426223766b7d5c2f
147
py
Python
test/factorial.py
radiilab/Rad-lang
39eb4762c5bfea8537f4f269a2e8457dd5409e3a
[ "BSD-3-Clause" ]
1
2019-07-18T23:30:38.000Z
2019-07-18T23:30:38.000Z
test/factorial.py
radiilab/Rad-lang
39eb4762c5bfea8537f4f269a2e8457dd5409e3a
[ "BSD-3-Clause" ]
null
null
null
test/factorial.py
radiilab/Rad-lang
39eb4762c5bfea8537f4f269a2e8457dd5409e3a
[ "BSD-3-Clause" ]
null
null
null
end print factorial(5) # should output 120
14.7
40
0.557823
def factorial(n): if n < 1: return 1 else: return n * factorial(n-1) end end print factorial(5) # should output 120
0
0
0
0
0
79
0
0
22
bf27071cdd5a17a6a5d80fc5d40d8393c9bb5247
4,537
py
Python
src/sleuthdeck/actions.py
sleuth-io/sleuth-deck
289b9967e7d395de8aa05268eb5e686b67285c1e
[ "Apache-2.0" ]
null
null
null
src/sleuthdeck/actions.py
sleuth-io/sleuth-deck
289b9967e7d395de8aa05268eb5e686b67285c1e
[ "Apache-2.0" ]
null
null
null
src/sleuthdeck/actions.py
sleuth-io/sleuth-deck
289b9967e7d395de8aa05268eb5e686b67285c1e
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations
29.083333
93
0.638748
from __future__ import annotations import signal import subprocess from time import sleep from typing import Optional, Union, Tuple from PIL.Image import Image from pyautogui import hotkey from sleuthdeck.deck import Action from sleuthdeck.deck import ClickType from sleuthdeck.deck import Key from sleuthdeck.deck imp...
0
0
0
3,776
0
0
0
126
587
59f02b823d905cf3630bb0e8dff47036b37d5821
1,582
py
Python
pages/insights.py
illicitDev/kepler-observations
c520632f8abc091511259cea83dacdb4aa0d6a4a
[ "MIT" ]
null
null
null
pages/insights.py
illicitDev/kepler-observations
c520632f8abc091511259cea83dacdb4aa0d6a4a
[ "MIT" ]
null
null
null
pages/insights.py
illicitDev/kepler-observations
c520632f8abc091511259cea83dacdb4aa0d6a4a
[ "MIT" ]
null
null
null
# Imports from 3rd party libraries import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html # Imports from this application # 1 column layout # https://dash-bootstrap-components.opensource.faculty.ai/l/components/layout column1 = dbc.Col( [ dcc.Markdow...
36.790698
134
0.639697
# Imports from 3rd party libraries import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output # Imports from this application from app import app # 1 column layout # https://dash-bootstrap-components.opensource...
0
0
0
0
0
0
0
10
66
9bae94530088cda6422abe15142ca4a38cf8641a
2,551
py
Python
code.py
Moreyash/olympic-hero
091ee3a95fd128060c1781922d027ee02a06e7ce
[ "MIT" ]
null
null
null
code.py
Moreyash/olympic-hero
091ee3a95fd128060c1781922d027ee02a06e7ce
[ "MIT" ]
null
null
null
code.py
Moreyash/olympic-hero
091ee3a95fd128060c1781922d027ee02a06e7ce
[ "MIT" ]
null
null
null
# -------------- #Importing header files import pandas as pd import numpy as np import matplotlib.pyplot as plt #Path of the file path data=pd.read_csv(path).rename(columns={'Total':'Total_Medals'}) data.head(10) #Code starts here # -------------- #Code starts here data['Better_Event']=np.whe...
22.182609
163
0.693062
# -------------- #Importing header files import pandas as pd import numpy as np import matplotlib.pyplot as plt #Path of the file path data=pd.read_csv(path).rename(columns={'Total':'Total_Medals'}) data.head(10) #Code starts here # -------------- #Code starts here data['Better_Event']=np.whe...
0
0
0
0
0
111
0
0
25
321be22ce44c5c5bcb005091a744cd129736f3a8
48
py
Python
code/main.py
famaxth/Random.py
f8806ecf5b73be2cafe7e956d52bd8da54d715ac
[ "Unlicense" ]
null
null
null
code/main.py
famaxth/Random.py
f8806ecf5b73be2cafe7e956d52bd8da54d715ac
[ "Unlicense" ]
null
null
null
code/main.py
famaxth/Random.py
f8806ecf5b73be2cafe7e956d52bd8da54d715ac
[ "Unlicense" ]
null
null
null
import random print(random.randint(1, 100))
12
30
0.708333
import random print(random.randint(1, 100))
0
0
0
0
0
0
0
0
0
ac84f7fdf5aaab9edad6d5a0f1b53873e9010961
283
py
Python
web/autoapp.py
ChristoferHuynh/web
a7b92e5c8c3a85c6ab8182571cc4186a50b67df6
[ "BSD-3-Clause" ]
null
null
null
web/autoapp.py
ChristoferHuynh/web
a7b92e5c8c3a85c6ab8182571cc4186a50b67df6
[ "BSD-3-Clause" ]
null
null
null
web/autoapp.py
ChristoferHuynh/web
a7b92e5c8c3a85c6ab8182571cc4186a50b67df6
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Create an application instance.""" from web.app import create_app from web.settings import DevConfig #CONFIG = DevConfig if get_debug_flag() else ProdConfig CONFIG = DevConfig app = create_app(CONFIG)
25.727273
55
0.770318
# -*- coding: utf-8 -*- """Create an application instance.""" from flask.helpers import get_debug_flag from web.app import create_app from web.settings import DevConfig, ProdConfig #CONFIG = DevConfig if get_debug_flag() else ProdConfig CONFIG = DevConfig app = create_app(CONFIG)
0
0
0
0
0
0
0
31
22
74e0b709e83e18377aa4305b9ecdb1dfc071a640
510
py
Python
30-days-of-code/day8-dictionaries.py
kasimte/hackerrank
d43e6bb91428488b35fc344893612da631e0e770
[ "MIT" ]
null
null
null
30-days-of-code/day8-dictionaries.py
kasimte/hackerrank
d43e6bb91428488b35fc344893612da631e0e770
[ "MIT" ]
null
null
null
30-days-of-code/day8-dictionaries.py
kasimte/hackerrank
d43e6bb91428488b35fc344893612da631e0e770
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/30-dictionaries-and-maps/problem # Enter your code here. Read input from STDIN. Print output to STDOUT n = int(input()) book = {} for x in range(0,n): line = input().split() book[line[0]] = line[1] while True: try: line = input().split() name = lin...
22.173913
72
0.558824
# https://www.hackerrank.com/challenges/30-dictionaries-and-maps/problem # Enter your code here. Read input from STDIN. Print output to STDOUT n = int(input()) book = {} for x in range(0,n): line = input().split() book[line[0]] = line[1] while True: try: line = input().split() name = lin...
0
0
0
0
0
0
0
0
0
70ddec5a00a2079779e22798a547a9b46b167c08
14,937
py
Python
lorentz.py
theSage21/lorentz-embeddings
deb57587af284087045dcb9f4c6d4b140965d172
[ "MIT" ]
66
2019-02-20T06:29:29.000Z
2022-03-07T21:58:59.000Z
lorentz.py
theSage21/lorentz-embeddings
deb57587af284087045dcb9f4c6d4b140965d172
[ "MIT" ]
6
2019-02-17T16:10:44.000Z
2021-07-29T12:46:46.000Z
lorentz.py
theSage21/lorentz-embeddings
deb57587af284087045dcb9f4c6d4b140965d172
[ "MIT" ]
14
2019-02-13T09:03:35.000Z
2021-11-08T15:25:03.000Z
import os import sys import torch import numpy as np from tqdm import tqdm from collections import Counter from datetime import datetime from tensorboardX import SummaryWriter from torch.utils.data import DataLoader import matplotlib matplotlib.use("Agg") # this needs to come before other matplotlib imports import m...
34.656613
88
0.54991
import os import sys import torch import random import numpy as np from torch import nn from torch import optim from tqdm import trange, tqdm from collections import Counter from datetime import datetime from tensorboardX import SummaryWriter from torch.utils.data import Dataset, DataLoader import matplotlib matplotl...
42
0
0
5,547
0
906
0
10
273
27881eb6fa948140af012299c81579cdcda82f22
519
py
Python
Python/retest.py
yutakakn/MyScript
cb40e0077fdce1d64f658227952ae1654e7510ae
[ "BSD-3-Clause" ]
null
null
null
Python/retest.py
yutakakn/MyScript
cb40e0077fdce1d64f658227952ae1654e7510ae
[ "BSD-3-Clause" ]
null
null
null
Python/retest.py
yutakakn/MyScript
cb40e0077fdce1d64f658227952ae1654e7510ae
[ "BSD-3-Clause" ]
2
2017-07-19T15:26:19.000Z
2017-07-19T15:50:59.000Z
# coding: utf-8 # # Python # # Update: 2018/3/21 # # textdata = ''' Welcome to Infra workshop! Kusotsui Hikariare Misogi Misogi999 Misogi9999 '''.strip() # print m.groups(0) # if __name__ == "__main__": main()
12.658537
34
0.635838
# coding: utf-8 # # Pythonでの正規表現サンプル # # Update: 2018/3/21 # import re # 検索対象のテキスト textdata = ''' Welcome to Infra workshop! Kusotsui Hikariare Misogi Misogi999 Misogi9999 '''.strip() def displaymatch(m): if (m is None): print('No match') else: print('Match: %r, groups=%r' % (m.group(), m.groups()) ) # ...
90
0
0
0
0
211
0
-12
69
5ea1c26b7f60345f58e78ab7f9520a367c9920ad
1,313
py
Python
caching.py
kudep/df_addon_turn_caching
f70bba0a8c60a92fab836605431b2bd8a4f6bc83
[ "Apache-2.0" ]
null
null
null
caching.py
kudep/df_addon_turn_caching
f70bba0a8c60a92fab836605431b2bd8a4f6bc83
[ "Apache-2.0" ]
null
null
null
caching.py
kudep/df_addon_turn_caching
f70bba0a8c60a92fab836605431b2bd8a4f6bc83
[ "Apache-2.0" ]
null
null
null
""" Caching --------------------------- """
26.795918
79
0.620716
""" Caching --------------------------- """ import functools from df_engine.core import Actor, Context from df_engine.core.types import ActorStage class OneTurnCache: """ Class that caches the information from the last turn. """ def __init__(self): self.wrappers = [] def update_actor_h...
0
191
0
949
0
0
0
37
90
85d5dd82fb31e2230af5808895e2ef4990361f83
4,854
py
Python
multiple_pattern_durations/code/filter_results.py
INM-6/SPADE_applications
1633907a5c8c295f758a07fe4d594efbfa94155e
[ "BSD-3-Clause" ]
2
2020-04-10T08:47:32.000Z
2020-10-10T01:30:18.000Z
multiple_pattern_durations/code/filter_results.py
INM-6/SPADE_applications
1633907a5c8c295f758a07fe4d594efbfa94155e
[ "BSD-3-Clause" ]
1
2020-10-10T10:08:43.000Z
2021-02-05T06:57:11.000Z
multiple_pattern_durations/code/filter_results.py
INM-6/SPADE_applications
1633907a5c8c295f758a07fe4d594efbfa94155e
[ "BSD-3-Clause" ]
2
2020-10-10T05:21:28.000Z
2021-08-25T09:56:50.000Z
import numpy as np import elephant.spade as spade import argparse import yaml from yaml import Loader # Function to filter patterns when the output format of spade function # is 'patterns' def _pattern_spectrum_filter(patterns, ns_signature, spectrum, winlen): """ Filter to select concept which signature is s...
42.578947
83
0.54965
import numpy as np import elephant.spade as spade import argparse import yaml from yaml import Loader # Function to filter patterns when the output format of spade function # is 'patterns' def _pattern_spectrum_filter(patterns, ns_signature, spectrum, winlen): """ Filter to select concept which signature is s...
0
0
0
0
0
0
0
0
0
ed71b3a65a656d7d6424d6da1dcc78046962b2fd
4,635
py
Python
OAparser.py
mickolaine/OAstats
6d8f8677fb9f807cfcd4f18f894d983c872983bf
[ "Unlicense" ]
null
null
null
OAparser.py
mickolaine/OAstats
6d8f8677fb9f807cfcd4f18f894d983c872983bf
[ "Unlicense" ]
null
null
null
OAparser.py
mickolaine/OAstats
6d8f8677fb9f807cfcd4f18f894d983c872983bf
[ "Unlicense" ]
null
null
null
""" Parser handles reading and interpreting the OA logfile """
30.493421
142
0.480475
""" Parser handles reading and interpreting the OA logfile """ from player import Player class Parser: def __init__(self, logfile): self.logfile = logfile self.loglist = [] self.log = [] self.players = {} self.open() self.get_timecodes() self.get_comm...
0
646
0
3,877
0
0
0
4
46
c1741bf2d02de78900fad92c0710ae53ffbbf44b
528
py
Python
cla_backend/apps/legalaid/migrations/0009_remove_case_old_eod_details.py
uk-gov-mirror/ministryofjustice.cla_backend
4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6
[ "MIT" ]
3
2019-10-02T15:31:03.000Z
2022-01-13T10:15:53.000Z
cla_backend/apps/legalaid/migrations/0009_remove_case_old_eod_details.py
uk-gov-mirror/ministryofjustice.cla_backend
4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6
[ "MIT" ]
206
2015-01-02T16:50:11.000Z
2022-02-16T20:16:05.000Z
cla_backend/apps/legalaid/migrations/0009_remove_case_old_eod_details.py
uk-gov-mirror/ministryofjustice.cla_backend
4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6
[ "MIT" ]
6
2015-03-23T23:08:42.000Z
2022-02-15T17:04:44.000Z
# coding=utf-8 from __future__ import unicode_literals
26.4
87
0.660985
# coding=utf-8 from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [("legalaid", "0008_eod_data_migration")] operations = [ migrations.RemoveField(model_name="case", name="old_eod_details"), migrations.AlterF...
0
0
0
407
0
0
0
19
46
edc0c4f5c8e1beb9abd5438d714fc99b83402b63
702
py
Python
tests/internet_search_demo.py
xiaobuguilaile/service-oriented-chatbot
3966b4fa1c2ee9bf5544b11a0241df9f3fa6ec2a
[ "MIT" ]
null
null
null
tests/internet_search_demo.py
xiaobuguilaile/service-oriented-chatbot
3966b4fa1c2ee9bf5544b11a0241df9f3fa6ec2a
[ "MIT" ]
null
null
null
tests/internet_search_demo.py
xiaobuguilaile/service-oriented-chatbot
3966b4fa1c2ee9bf5544b11a0241df9f3fa6ec2a
[ "MIT" ]
null
null
null
# -*-coding:utf-8 -*- ''' @File : internet_search_demo.py @Author : HW Shen @Date : 2020/5/26 @Desc : ''' from ServiceOrientedChatbot.search_dialog import SearchEngine from ServiceOrientedChatbot.utils import logger if __name__ == '__main__': engine = SearchEngine() logger.debug(engi...
21.9375
61
0.632479
# -*-coding:utf-8 -*- ''' @File : internet_search_demo.py @Author : HW Shen @Date : 2020/5/26 @Desc : ''' from ServiceOrientedChatbot.search_dialog import SearchEngine from ServiceOrientedChatbot.utils import logger if __name__ == '__main__': engine = SearchEngine() logger.debug(engi...
111
0
0
0
0
0
0
0
0
ba66223be12038ddd3602f3150abab92c7d6c0c4
5,502
py
Python
openmdao/devtools/iprof_utils.py
hwangjt/blue
609defbe476c86a4a2eddd12977b47e649ea7f50
[ "Apache-2.0" ]
null
null
null
openmdao/devtools/iprof_utils.py
hwangjt/blue
609defbe476c86a4a2eddd12977b47e649ea7f50
[ "Apache-2.0" ]
null
null
null
openmdao/devtools/iprof_utils.py
hwangjt/blue
609defbe476c86a4a2eddd12977b47e649ea7f50
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import ast from inspect import getmembers from fnmatch import fnmatchcase from collections import defaultdict from openmdao.core.system import System from openmdao.core.problem import Problem from openmdao.core.driver import Driver from openmdao.solvers.solver import Solver from ...
30.230769
108
0.614686
from __future__ import print_function import os import sys import ast from inspect import getmembers from fnmatch import fnmatchcase from collections import defaultdict from openmdao.core.system import System from openmdao.core.problem import Problem from openmdao.core.driver import Driver from openmdao.solvers.solv...
0
0
0
759
0
545
0
-17
146
7539d6048376b2a8eb5311e0e53339fd000755eb
1,261
py
Python
tests/heap_profiler_test.py
ROCmSoftwarePlatform/jax
be34a14dc40384ac8876fad2b23b5e205ccfe22e
[ "Apache-2.0" ]
7
2020-12-04T16:54:54.000Z
2022-02-15T07:26:56.000Z
tests/heap_profiler_test.py
ROCmSoftwarePlatform/jax
be34a14dc40384ac8876fad2b23b5e205ccfe22e
[ "Apache-2.0" ]
20
2021-08-17T20:31:56.000Z
2022-03-31T11:56:24.000Z
tests/heap_profiler_test.py
ROCmSoftwarePlatform/jax
be34a14dc40384ac8876fad2b23b5e205ccfe22e
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
28.659091
78
0.750991
# Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
0
0
0
401
0
0
0
3
68
538398ac392be8d56ff9a45cc270efad1b75ff36
1,378
py
Python
HANDWRITING/model.py
MacuXavier/S1_ML_Practices
4cd29c5537c95cfd940e13e741db8d363c57ab1d
[ "Apache-2.0" ]
null
null
null
HANDWRITING/model.py
MacuXavier/S1_ML_Practices
4cd29c5537c95cfd940e13e741db8d363c57ab1d
[ "Apache-2.0" ]
null
null
null
HANDWRITING/model.py
MacuXavier/S1_ML_Practices
4cd29c5537c95cfd940e13e741db8d363c57ab1d
[ "Apache-2.0" ]
null
null
null
''' Author: MJ.XU Date: 2021-11-29 17:16:33 LastEditTime: 2021-12-18 23:28:25 LastEditors: MJ.XU Description: Tech4better FilePath: \Tutorial-HandWriting-Cls-master\model.py Personal URL: https://www.squirrelled.cn/ ''' # pytorch related packages import torch.nn as nn # Model Definition
29.956522
79
0.576923
''' Author: MJ.XU Date: 2021-11-29 17:16:33 LastEditTime: 2021-12-18 23:28:25 LastEditors: MJ.XU Description: Tech4better FilePath: \Tutorial-HandWriting-Cls-master\model.py Personal URL: https://www.squirrelled.cn/ ''' # pytorch related packages import torch import torch.nn as nn import torch.nn.functional as F # Mo...
0
0
0
1,021
0
0
0
1
66
34f33bc559f7e13b93d515ea080396c7ef24cad3
1,973
py
Python
test/test_connection.py
abudarevsky/solrcloudpy
8ba59f1079d9b4efab03ddc892337a467c9671b2
[ "BSD-3-Clause" ]
null
null
null
test/test_connection.py
abudarevsky/solrcloudpy
8ba59f1079d9b4efab03ddc892337a467c9671b2
[ "BSD-3-Clause" ]
null
null
null
test/test_connection.py
abudarevsky/solrcloudpy
8ba59f1079d9b4efab03ddc892337a467c9671b2
[ "BSD-3-Clause" ]
null
null
null
import unittest solrprocess = None if __name__ == "__main__": unittest.main()
29.447761
78
0.671566
import os import time import unittest from solr_instance import SolrInstance from solrcloudpy import SolrCollection, SolrConnection solrprocess = None class TestConnection(unittest.TestCase): def setUp(self): self.conn = SolrConnection(version=os.getenv("SOLR_VERSION", "6.1.0")) self.collparams ...
0
0
0
1,410
0
289
0
28
158
a28f6c929b4e051e721250e8f3d1e7cb4d98de6a
1,252
py
Python
docs/conf.py
LevinZ2016/pyvinecopulib
e8fc0e6805daa71ab3fa1e03fd257a9f4063605d
[ "MIT" ]
null
null
null
docs/conf.py
LevinZ2016/pyvinecopulib
e8fc0e6805daa71ab3fa1e03fd257a9f4063605d
[ "MIT" ]
null
null
null
docs/conf.py
LevinZ2016/pyvinecopulib
e8fc0e6805daa71ab3fa1e03fd257a9f4063605d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # pyvinecopulib documentation build configuration file # Sphinx extension modules from pkg_resources import get_distribution # -- General configuration ------------------------------------------------ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.githubpages', 'sphinx.ext.mat...
21.964912
78
0.683706
# -*- coding: utf-8 -*- # # pyvinecopulib documentation build configuration file # Sphinx extension modules from pkg_resources import get_distribution # -- General configuration ------------------------------------------------ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.githubpages', 'sphinx.ext.mat...
0
0
0
0
0
0
0
0
0
602b7684bce5d19dfcadd0ec598781b30fb4448c
14,439
py
Python
src/parse_args.py
dertilo/MultiHopKG
ee103c10c633ab808f063b0d3d8a4b3388b21aa5
[ "BSD-3-Clause" ]
null
null
null
src/parse_args.py
dertilo/MultiHopKG
ee103c10c633ab808f063b0d3d8a4b3388b21aa5
[ "BSD-3-Clause" ]
null
null
null
src/parse_args.py
dertilo/MultiHopKG
ee103c10c633ab808f063b0d3d8a4b3388b21aa5
[ "BSD-3-Clause" ]
1
2020-02-03T09:39:44.000Z
2020-02-03T09:39:44.000Z
""" Copyright (c) 2018, salesforce.com, inc. All rights reserved. SPDX-License-Identifier: BSD-3-Clause For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause Experiment Hyperparameters. """ import argparse import os parser = argparse.ArgumentParser( d...
26.689464
109
0.689037
""" Copyright (c) 2018, salesforce.com, inc. All rights reserved. SPDX-License-Identifier: BSD-3-Clause For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause Experiment Hyperparameters. """ import argparse import os parser = argparse.ArgumentParser( d...
0
0
0
0
0
0
0
0
0
8aab240ab7b20f968d87a6141bb0f294e611b3d5
329
py
Python
Algorithms/DynamicProgramming/maximum-difference-zeros-ones-binary-string-set-2-time.py
Sangeerththan/pythonDSA
d126b3a7a8acc1e202107e20a21ed96fb4ab144e
[ "MIT" ]
1
2021-09-12T20:40:37.000Z
2021-09-12T20:40:37.000Z
Algorithms/DynamicProgramming/maximum-difference-zeros-ones-binary-string-set-2-time.py
Sangeerththan/pythonDataStructure
d126b3a7a8acc1e202107e20a21ed96fb4ab144e
[ "MIT" ]
null
null
null
Algorithms/DynamicProgramming/maximum-difference-zeros-ones-binary-string-set-2-time.py
Sangeerththan/pythonDataStructure
d126b3a7a8acc1e202107e20a21ed96fb4ab144e
[ "MIT" ]
null
null
null
s = "11000010001" n = 11 print(findLength(s, n))
21.933333
54
0.583587
def findLength(string, n): current_sum = 0 max_sum = 0 for i in range(n): current_sum += (1 if string[i] == '0' else -1) if current_sum < 0: current_sum = 0 max_sum = max(current_sum, max_sum) return max_sum if max_sum else 0 s = "11000010001" n = 11 print(findLengt...
0
0
0
0
0
256
0
0
22
4e619c206ae0df10192fe968b3a3efbb68e98129
94
py
Python
src/mlb/models/app_mode.py
benbrandt22/MagTagMLB
1ec347743bc7df9339fb8e3de0f86ea037b7694f
[ "MIT" ]
null
null
null
src/mlb/models/app_mode.py
benbrandt22/MagTagMLB
1ec347743bc7df9339fb8e3de0f86ea037b7694f
[ "MIT" ]
null
null
null
src/mlb/models/app_mode.py
benbrandt22/MagTagMLB
1ec347743bc7df9339fb8e3de0f86ea037b7694f
[ "MIT" ]
null
null
null
# (doesn't seem to be any official Enum support in Circuitpython) Schedule = 1 ScoreBoard = 2
23.5
65
0.755319
# (doesn't seem to be any official Enum support in Circuitpython) Schedule = 1 ScoreBoard = 2
0
0
0
0
0
0
0
0
0
3c4e0e95661b4e2c5aca203fb3b2a20b1b33339b
731
py
Python
src/caterpillar/variants.py
overhacked/caterpillar
dc51e551a938705f5e200087720caa15b4a31371
[ "MIT" ]
37
2017-12-27T03:41:59.000Z
2022-02-05T04:11:07.000Z
src/caterpillar/variants.py
overhacked/caterpillar
dc51e551a938705f5e200087720caa15b4a31371
[ "MIT" ]
7
2019-01-25T18:39:52.000Z
2020-11-11T03:57:54.000Z
src/caterpillar/variants.py
overhacked/caterpillar
dc51e551a938705f5e200087720caa15b4a31371
[ "MIT" ]
7
2020-04-25T03:06:18.000Z
2021-10-30T21:24:10.000Z
# Rate variant stream by resolution, average bandwidth, and bandwidth. # Select the best variant stream (best effort). # # Assumption: m3u8 object has one or more variants.
31.782609
73
0.740082
import m3u8 from typing import Tuple # Rate variant stream by resolution, average bandwidth, and bandwidth. def variant_score(variant: m3u8.Playlist) -> Tuple[int, int, int, int]: stream_info = variant.stream_info if stream_info.resolution: width, height = stream_info.resolution else: wid...
0
0
0
0
0
472
0
-7
89
d33307b24d598e56c3104322bb0aa7d9d0d9c14a
748
py
Python
unsdgbot/config.py
btaba/UN-SDG-bot
46fde9a866cefe37b8e600e87b37ed0f73bc94a2
[ "MIT" ]
null
null
null
unsdgbot/config.py
btaba/UN-SDG-bot
46fde9a866cefe37b8e600e87b37ed0f73bc94a2
[ "MIT" ]
null
null
null
unsdgbot/config.py
btaba/UN-SDG-bot
46fde9a866cefe37b8e600e87b37ed0f73bc94a2
[ "MIT" ]
null
null
null
import os basedir = os.path.abspath(os.path.dirname(__file__))
22
62
0.657754
import os import logging basedir = os.path.abspath(os.path.dirname(__file__)) class Config(object): DEBUG = False TESTING = False CSRF_ENABLED = True FB_API_VERSION = 2.7 FB_ACCESS_TOKEN = 'this-is-in-local-config' FB_VERIFY_TOKEN = 'this-is-in-local-config' FB_WEBHOOK_URL = 'this-is-in-...
0
0
0
597
0
0
0
-7
91
fae3809523280baaf1bed07b85c14642416d98e2
2,458
py
Python
yahoo_quote_download/validater.py
manniealfaro/yahoo_quote_download
31fd8a3a239712764cc1da48251fb94fee9a1313
[ "BSD-2-Clause" ]
153
2017-05-21T13:24:00.000Z
2022-03-18T00:56:13.000Z
yahoo_quote_download/validater.py
manniealfaro/yahoo_quote_download
31fd8a3a239712764cc1da48251fb94fee9a1313
[ "BSD-2-Clause" ]
15
2017-05-25T19:23:50.000Z
2021-07-26T17:06:28.000Z
yahoo_quote_download/validater.py
manniealfaro/yahoo_quote_download
31fd8a3a239712764cc1da48251fb94fee9a1313
[ "BSD-2-Clause" ]
77
2017-05-21T13:24:11.000Z
2021-06-22T10:58:18.000Z
# -*- coding: utf-8 -*- """ validate.py - Trivial data validater Created on December 24, 2019 @author: c0redumb """ # To make print working for Python2/3 from __future__ import print_function def validate(ticker, data, begindate='1920-01-01', verbose=0): ''' This function perform a query and extract the matc...
28.581395
76
0.463792
# -*- coding: utf-8 -*- """ validate.py - Trivial data validater Created on December 24, 2019 @author: c0redumb """ # To make print working for Python2/3 from __future__ import print_function def validate(ticker, data, begindate='1920-01-01', verbose=0): ''' This function perform a query and extract the matc...
0
0
0
0
0
0
0
0
0
1d73f68f5fdde19e76c3d09d7604ff232b8d082d
1,261
py
Python
icarus_simulator/sat_core/coordinate_util.py
RubenFr/ICARUS-framework
e57a1f50c3bb9522b2a279fee6b625628afd056f
[ "MIT" ]
5
2021-08-31T08:07:41.000Z
2022-01-04T02:09:25.000Z
icarus_simulator/sat_core/coordinate_util.py
RubenFr/ICARUS-framework
e57a1f50c3bb9522b2a279fee6b625628afd056f
[ "MIT" ]
3
2021-09-23T09:06:35.000Z
2021-12-08T04:53:01.000Z
icarus_simulator/sat_core/coordinate_util.py
RubenFr/ICARUS-framework
e57a1f50c3bb9522b2a279fee6b625628afd056f
[ "MIT" ]
2
2022-01-19T17:50:56.000Z
2022-03-06T18:59:41.000Z
# 2020 Tommaso Ciussani and Giacomo Giuliari """ This file contains the type definitions and conversions between coordinate schemes. All length values in m """ import numpy as np from typing import Tuple from icarus_simulator.sat_core.planetary_const import EARTH_RADIUS CartCoords = Tuple[float, float, float] ...
25.22
83
0.681205
# 2020 Tommaso Ciussani and Giacomo Giuliari """ This file contains the type definitions and conversions between coordinate schemes. All length values in m """ import numpy as np from typing import Tuple from typing_extensions import TypedDict from icarus_simulator.sat_core.planetary_const import EARTH_RADIUS cla...
0
0
0
162
0
0
0
18
68
0a0267d5dc5af5883c61f4d96b1b3eaeb3197231
220
py
Python
src/cmd_help.py
parsecmonkey/RepoMainForPy
e07ef5358723c384ca8d233e42dc8580e761867e
[ "MIT" ]
6
2021-11-26T21:57:35.000Z
2022-01-23T12:40:35.000Z
src/cmd_help.py
parsecmonkey/RepoMainForPy
e07ef5358723c384ca8d233e42dc8580e761867e
[ "MIT" ]
46
2021-11-18T17:32:47.000Z
2022-01-10T12:26:56.000Z
src/cmd_help.py
parsecmonkey/RepoMainForPy
e07ef5358723c384ca8d233e42dc8580e761867e
[ "MIT" ]
1
2021-11-19T03:16:16.000Z
2021-11-19T03:16:16.000Z
# help
22
33
0.590909
# help def run(): print("help : コマンド一覧を表示") print("clone: リポジトリをクローン") print("log : ログを確認") print("diff : ファイルの差分を確認") print("plot : グラフを描画") print("message:コミットメッセージを解析") print("exit : 終了")
165
0
0
0
0
136
0
0
23
09d701a9f15c22b38883e7c39e11f536f6754a18
104
py
Python
entity/cards/LETLT_060/__init__.py
x014/lushi_script
edab2b88e3f0de8139de2541ab2daa331f777c0e
[ "MIT" ]
102
2021-10-20T09:06:39.000Z
2022-03-28T13:35:11.000Z
entity/cards/LETLT_060/__init__.py
x014/lushi_script
edab2b88e3f0de8139de2541ab2daa331f777c0e
[ "MIT" ]
98
2021-10-19T16:13:27.000Z
2022-03-27T13:27:49.000Z
entity/cards/LETLT_060/__init__.py
x014/lushi_script
edab2b88e3f0de8139de2541ab2daa331f777c0e
[ "MIT" ]
55
2021-10-19T03:56:50.000Z
2022-03-25T08:25:26.000Z
# -*- coding: utf-8 -*- import entity.cards.LETLT_060.LETLT_060
26
39
0.769231
# -*- coding: utf-8 -*- import entity.cards.LETLT_060.LETLT_060 import entity.cards.LETLT_060.LETLT_060
0
0
0
0
0
0
0
18
22
7752f4522648507d97542e729853ad5868334402
1,503
py
Python
blog_app/blog/migrations/0011_auto_20190216_1124.py
flxj/Django_blog
01eb12553335115fee5faecafe8cacf2f0615135
[ "MIT" ]
1
2019-03-27T02:24:22.000Z
2019-03-27T02:24:22.000Z
blog_app/blog/migrations/0011_auto_20190216_1124.py
flxj/Django_blog
01eb12553335115fee5faecafe8cacf2f0615135
[ "MIT" ]
null
null
null
blog_app/blog/migrations/0011_auto_20190216_1124.py
flxj/Django_blog
01eb12553335115fee5faecafe8cacf2f0615135
[ "MIT" ]
null
null
null
# Generated by Django 2.1.5 on 2019-02-16 03:24
27.833333
65
0.540253
# Generated by Django 2.1.5 on 2019-02-16 03:24 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0010_auto_20190213_1925'), ] operations = [ migrations.AlterField( model_name='book', name='created_time', ...
0
0
0
1,389
0
0
0
19
46
429ee136ee6e644765bfba03ee4ed907a9f58777
416
py
Python
rules/LineTooLongRule.py
rvben/galaxy-lint-rules
aa014ea79ce1eaf3a5e6be187fd6d3cc1617fea4
[ "Apache-2.0" ]
null
null
null
rules/LineTooLongRule.py
rvben/galaxy-lint-rules
aa014ea79ce1eaf3a5e6be187fd6d3cc1617fea4
[ "Apache-2.0" ]
null
null
null
rules/LineTooLongRule.py
rvben/galaxy-lint-rules
aa014ea79ce1eaf3a5e6be187fd6d3cc1617fea4
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 Ansible, Inc. # All Rights Reserved.
26
62
0.661058
# Copyright (c) 2018 Ansible, Inc. # All Rights Reserved. from ansiblelint import AnsibleLintRule class LineTooLongRule(AnsibleLintRule): id = '204' shortdesc = 'Lines should be no longer than 120 chars' description = 'Long lines make code harder to read and ' \ 'code review more diffic...
0
0
0
293
0
0
0
18
46
bd43ad78f3ba7e5d3ac09df61846ff56d8bd6cec
827
py
Python
recruiter/convertPDFToText.py
bhagvank/BankingChatbot
0a320176cdef41605ed8cbe3471a61815a769f29
[ "Apache-2.0" ]
null
null
null
recruiter/convertPDFToText.py
bhagvank/BankingChatbot
0a320176cdef41605ed8cbe3471a61815a769f29
[ "Apache-2.0" ]
null
null
null
recruiter/convertPDFToText.py
bhagvank/BankingChatbot
0a320176cdef41605ed8cbe3471a61815a769f29
[ "Apache-2.0" ]
null
null
null
#from nltk.tokenize import word_tokenize #from nltk.corpus import stopwords
41.35
163
0.708585
import PyPDF2 import textract #from nltk.tokenize import word_tokenize #from nltk.corpus import stopwords def convertPDFToText(path): filename = path #open allows you to read the file pdfFileObj = open(filename,'rb')#The pdfReader variable is a readable object that will be parsed pdfReader = PyPDF2.PdfFi...
0
0
0
0
0
698
0
-14
68
860ae04a58c63c4e628e9f219b834f014c47ea76
2,174
py
Python
coreRelback/urls.py
supernoi/relback
b4f04d7ed5cb315e9c862fbd82291ada8fb5af08
[ "MIT" ]
null
null
null
coreRelback/urls.py
supernoi/relback
b4f04d7ed5cb315e9c862fbd82291ada8fb5af08
[ "MIT" ]
null
null
null
coreRelback/urls.py
supernoi/relback
b4f04d7ed5cb315e9c862fbd82291ada8fb5af08
[ "MIT" ]
1
2019-06-25T13:27:40.000Z
2019-06-25T13:27:40.000Z
from django.contrib import admin from django.urls import path from coreRelback import views app_name = 'coreRelback' urlpatterns = [ path('', views.index, name='index'), path('admin/', admin.site.urls), path('creators/', views.creators, name='creators'), # Routes - Clients path('client/', views....
46.255319
134
0.699632
from django.contrib import admin from django.urls import path from coreRelback import views app_name = 'coreRelback' urlpatterns = [ path('', views.index, name='index'), path('admin/', admin.site.urls), path('creators/', views.creators, name='creators'), # Routes - Clients path('client/', views....
0
0
0
0
0
0
0
0
0
b900d8747d0d6c2c0034ef9bc48889dd61f44eaa
1,181
py
Python
angr/analyses/reaching_definitions/__init__.py
Will03/angr
2a3a67f38aaeb4dbd5cc4ed0d5b9057c8739ca80
[ "BSD-2-Clause" ]
1
2021-05-21T02:41:28.000Z
2021-05-21T02:41:28.000Z
angr/analyses/reaching_definitions/__init__.py
FDlucifer/angr
598f18a39c98d853a91f6880d25df2c528d3b312
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/reaching_definitions/__init__.py
FDlucifer/angr
598f18a39c98d853a91f6880d25df2c528d3b312
[ "BSD-2-Clause" ]
null
null
null
from typing import TYPE_CHECKING from .. import register_analysis from .reaching_definitions import ReachingDefinitionsAnalysis if TYPE_CHECKING: register_analysis(ReachingDefinitionsAnalysis, 'ReachingDefinitions')
33.742857
76
0.73497
from typing import Set, Optional, TYPE_CHECKING from ...knowledge_plugins.key_definitions import LiveDefinitions from .. import register_analysis from .reaching_definitions import ReachingDefinitionsAnalysis if TYPE_CHECKING: from angr.knowledge_plugins.key_definitions.definition import Definition from angr....
0
0
0
0
0
586
0
224
150
145812906c5f285067f65f7a95625e19b7a51831
6,009
py
Python
okcupyd/profile_copy.py
sphericalcow/okcupyd
ae0a99d248c515eea9a6d21a9c89f51e299b33f5
[ "MIT" ]
89
2015-01-09T19:58:07.000Z
2022-03-03T21:56:50.000Z
okcupyd/profile_copy.py
sphericalcow/okcupyd
ae0a99d248c515eea9a6d21a9c89f51e299b33f5
[ "MIT" ]
51
2015-01-18T23:09:35.000Z
2017-04-24T03:16:03.000Z
okcupyd/profile_copy.py
sphericalcow/okcupyd
ae0a99d248c515eea9a6d21a9c89f51e299b33f5
[ "MIT" ]
24
2015-01-16T17:43:21.000Z
2020-09-18T12:19:15.000Z
import logging log = logging.getLogger(__name__)
41.157534
80
0.579963
import logging import time from .profile import Profile from .question import Questions log = logging.getLogger(__name__) class Copy(object): """Copy photos, essays and other attributes from one profile to another.""" copy_methods = ['photos', 'essays', 'looking_for', 'details', 'questions'] def __in...
0
0
0
5,860
0
0
0
7
90
fb07d1f256a2f6d7a6cc9dbdf801ef7f4558d52a
323
py
Python
TP_ALGO_3/convert.py
PierreLeGuen/ALGO_S5
9067e887d14fe997c6944292a0cff23ceda47b6e
[ "MIT" ]
null
null
null
TP_ALGO_3/convert.py
PierreLeGuen/ALGO_S5
9067e887d14fe997c6944292a0cff23ceda47b6e
[ "MIT" ]
null
null
null
TP_ALGO_3/convert.py
PierreLeGuen/ALGO_S5
9067e887d14fe997c6944292a0cff23ceda47b6e
[ "MIT" ]
null
null
null
print(convert(10,2)) print(convert_inv(10,2))
16.15
49
0.544892
def convert(n,base): if n < base: res = str(n) else: res = convert(n//base,base) + str(n%base) return res print(convert(10,2)) def convert_inv(n,base): if n < base: res = str(n) else: res = str(n%base) + convert(n//base,base) return res print(convert_inv(10,2...
0
0
0
0
0
228
0
0
45
87c1757d37d96b9139b1f04cc9caf72ffd1cad94
208
py
Python
{{cookiecutter.repo_name}}/tests/conftest.py
digitalr00ts/cookiecutter-sphinx-docs
0311e0de0978662fa4f129a4598ffe6dfc2340ea
[ "Apache-2.0" ]
1
2018-11-10T23:45:10.000Z
2018-11-10T23:45:10.000Z
{{cookiecutter.repo_name}}/tests/conftest.py
digitalr00ts/cookiecutter-sphinx-docs
0311e0de0978662fa4f129a4598ffe6dfc2340ea
[ "Apache-2.0" ]
null
null
null
{{cookiecutter.repo_name}}/tests/conftest.py
digitalr00ts/cookiecutter-sphinx-docs
0311e0de0978662fa4f129a4598ffe6dfc2340ea
[ "Apache-2.0" ]
3
2019-03-15T20:28:29.000Z
2020-10-10T04:32:53.000Z
"""Configuration for tests.""" import {{ cookiecutter.project_slug }} def pytest_report_header(): """Additional report header.""" return f"version: { {{- cookiecutter.project_slug -}}.__version__}"
26
71
0.697115
"""Configuration for tests.""" import {{ cookiecutter.project_slug }} def pytest_report_header(): """Additional report header.""" return f"version: { {{- cookiecutter.project_slug -}}.__version__}"
0
0
0
0
0
0
0
0
0
fcbd9e1e6136d72f930126d932e00b32886b9ef2
30
py
Python
bluespot/guest/settings.py
unifispot/unifispot-free
186c906aa79e8671e03d0808469a3f27d67e34e1
[ "MIT" ]
21
2015-11-10T11:40:39.000Z
2021-12-02T22:58:45.000Z
bluespot/guest/settings.py
unifispot/unifispot-free
186c906aa79e8671e03d0808469a3f27d67e34e1
[ "MIT" ]
null
null
null
bluespot/guest/settings.py
unifispot/unifispot-free
186c906aa79e8671e03d0808469a3f27d67e34e1
[ "MIT" ]
10
2016-02-03T14:45:41.000Z
2019-11-08T08:21:25.000Z
GUEST_URL_PREFIX = '/guest'
7.5
27
0.7
GUEST_URL_PREFIX = '/guest'
0
0
0
0
0
0
0
0
0
e2f86cad37bb3bfbf46641c1ad6cb78d3514bb2b
957
py
Python
python/tour/asyncio/lib01.py
supeterlau/bedev
c134875eae37d265936199fda278416e2a3c1224
[ "MIT" ]
null
null
null
python/tour/asyncio/lib01.py
supeterlau/bedev
c134875eae37d265936199fda278416e2a3c1224
[ "MIT" ]
null
null
null
python/tour/asyncio/lib01.py
supeterlau/bedev
c134875eae37d265936199fda278416e2a3c1224
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright 2021 Peter Lau <superpeterlau@outlook.com> # # Distributed under terms of the MIT license. import asyncio # method 1 # asyncio.run(main()) # print(main()) # asyncio.run(main2()) asyncio.run(main3())
19.530612
56
0.634274
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2021 Peter Lau <superpeterlau@outlook.com> # # Distributed under terms of the MIT license. import time import asyncio async def main1(): print("Hello") await asyncio.sleep(1) print("DONE") # method 1 # asyncio.run(main()) # ...
2
0
569
0
0
0
0
-10
115
2e123e19d0b2552573d4e4c4cd2e18ff38b0b711
1,212
py
Python
prpe9/collect_prpe_ne.py
zuters/prpene
d76d6203e366c91efc1d1ae7ecee4c73e80e38d2
[ "MIT" ]
1
2020-12-02T09:00:49.000Z
2020-12-02T09:00:49.000Z
prpe9/collect_prpe_ne.py
zuters/prpene
d76d6203e366c91efc1d1ae7ecee4c73e80e38d2
[ "MIT" ]
null
null
null
prpe9/collect_prpe_ne.py
zuters/prpene
d76d6203e366c91efc1d1ae7ecee4c73e80e38d2
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: Jnis Zuters from __future__ import unicode_literals, division import argparse from io import open argparse.open = open from prpe_ne import collect_ne_pairs if __name__ == '__main__': parser = create_parser() args = parser.parse_args() collect_ne_pair...
28.186047
91
0.65429
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: Jānis Zuters from __future__ import unicode_literals, division import sys import argparse from io import open argparse.open = open from prpe_ne import collect_ne_pairs def create_parser(): parser = argparse.ArgumentParser( formatter_class=argparse.Raw...
2
0
0
0
0
783
0
-11
46
0d87be926ab4f43c42524a34778fe6bbfbd0404e
4,188
py
Python
versions/2.0/karma/python/geo.py
Lituta/dig-alignment
812ab0e4a181953d23024ef9df92eec1d40559cb
[ "Apache-2.0" ]
5
2015-04-26T19:39:44.000Z
2018-12-24T13:17:42.000Z
versions/2.0/karma/python/geo.py
Lituta/dig-alignment
812ab0e4a181953d23024ef9df92eec1d40559cb
[ "Apache-2.0" ]
7
2016-03-23T16:52:32.000Z
2018-07-24T03:08:05.000Z
versions/2.0/karma/python/geo.py
Lituta/dig-alignment
812ab0e4a181953d23024ef9df92eec1d40559cb
[ "Apache-2.0" ]
28
2015-04-08T22:39:07.000Z
2021-12-25T22:16:36.000Z
def gn_place_uri(geonamesid,fcode,country,admin1,admin2,admin3,admin4): "Return URI of place from a geonames id" if fcode=="PCLI": return "geonames/place/Country/"+country elif fcode=="ADM1": return "geonames/place/State1stDiv/"+country+"_"+admin1 elif fcode=="ADM2": return "geo...
37.392857
133
0.724928
def gn_place_uri(geonamesid,fcode,country,admin1,admin2,admin3,admin4): "Return URI of place from a geonames id" if fcode=="PCLI": return "geonames/place/Country/"+country elif fcode=="ADM1": return "geonames/place/State1stDiv/"+country+"_"+admin1 elif fcode=="ADM2": return "geo...
0
0
0
0
0
0
0
0
0
b9aee1236e3f5bb69bd587db78f5680abfa332d5
11,346
py
Python
volttrontesting/fixtures/volttron_platform_fixtures.py
rmay-intwine/volttron
a449f70e32f73ff0136a838d0feddb928ede6298
[ "Apache-2.0" ]
null
null
null
volttrontesting/fixtures/volttron_platform_fixtures.py
rmay-intwine/volttron
a449f70e32f73ff0136a838d0feddb928ede6298
[ "Apache-2.0" ]
null
null
null
volttrontesting/fixtures/volttron_platform_fixtures.py
rmay-intwine/volttron
a449f70e32f73ff0136a838d0feddb928ede6298
[ "Apache-2.0" ]
null
null
null
import pytest from volttron.platform import is_rabbitmq_available PRINT_LOG_ON_SHUTDOWN = False HAS_RMQ = is_rabbitmq_available() rmq_skipif = pytest.mark.skipif(not HAS_RMQ, reason='RabbitMQ is not setup') # IPC testing is removed since it is not used from VOLTTRON 6.0 # Generic fixtures. Ideally we want to...
35.679245
108
0.632822
import os import pytest from random import randint import socket import uuid from volttrontesting.utils.platformwrapper import PlatformWrapper from volttrontesting.utils.utils import get_hostname_and_random_port, get_rand_vip, get_rand_ip_and_port from volttron.platform import is_rabbitmq_available PRINT_LOG_ON_SHUTD...
0
8,725
0
0
0
1,192
0
102
427
a705e3342019f5dbc9e7c2702cdad80b86ca87ab
592
py
Python
touches/migrations/0002_auto_20170713_0001.py
brains-on-art/touch-helsinki-web
87d12d1f0a4d0b0d2754bd7ccb7a19b4b0f68061
[ "MIT" ]
null
null
null
touches/migrations/0002_auto_20170713_0001.py
brains-on-art/touch-helsinki-web
87d12d1f0a4d0b0d2754bd7ccb7a19b4b0f68061
[ "MIT" ]
null
null
null
touches/migrations/0002_auto_20170713_0001.py
brains-on-art/touch-helsinki-web
87d12d1f0a4d0b0d2754bd7ccb7a19b4b0f68061
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-07-12 21:01 from __future__ import unicode_literals
26.909091
164
0.66723
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-07-12 21:01 from __future__ import unicode_literals import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('touches', '0001_initial'), ] operations = [ ...
0
0
0
375
0
0
0
35
68
670fba351ef929c641d2ec1a4368fad39a96acf1
6,869
py
Python
tests/test_genome_tools.py
Wang-Cankun/lisa2
2407cc3c12f43bf41f0e14b2a8a5fcdfe07ff310
[ "MIT" ]
17
2020-09-21T20:04:43.000Z
2022-01-15T11:25:41.000Z
tests/test_genome_tools.py
Wang-Cankun/lisa2
2407cc3c12f43bf41f0e14b2a8a5fcdfe07ff310
[ "MIT" ]
5
2020-09-24T22:08:54.000Z
2021-07-24T02:45:53.000Z
tests/test_genome_tools.py
Wang-Cankun/lisa2
2407cc3c12f43bf41f0e14b2a8a5fcdfe07ff310
[ "MIT" ]
5
2021-02-16T13:16:34.000Z
2022-03-08T16:15:25.000Z
import unittest if __name__ == '__main__': unittest.main()
32.709524
146
0.596885
import unittest from lisa.core import genome_tools import numpy as np class TestRegionObject(unittest.TestCase): def test_invalid_region(self): with self.assertRaises(AssertionError): genome_tools.Region('chr1',10, 5) def test_overlap_different_chr(self): self.assertFalse( ...
0
0
0
6,681
0
0
0
10
113
fc2712a021a30d0196ad358b3f8763ba6dee7663
1,982
py
Python
examples/filter_examples/run_rotate_MNIST_example.py
ohtu-projekti-dataproblemsemulator/dataproblemsemulator
58170716b44c4e4dee639451977f352b3c68053c
[ "MIT" ]
2
2019-12-13T09:58:49.000Z
2020-02-10T10:37:17.000Z
examples/filter_examples/run_rotate_MNIST_example.py
ohtu-projekti-dataproblemsemulator/dataproblemsemulator
58170716b44c4e4dee639451977f352b3c68053c
[ "MIT" ]
199
2019-05-19T17:48:39.000Z
2022-03-11T23:56:15.000Z
examples/filter_examples/run_rotate_MNIST_example.py
thalvari/dpEmu-AutoML
b24eac686fae4147264c1ccc8169fd96b1875577
[ "MIT" ]
5
2019-10-02T23:14:05.000Z
2020-05-28T16:23:22.000Z
# MIT License # # Copyright (c) 2019 Tuomas Halvari, Juha Harviainen, Juha Myllri, Antti Rysk, Juuso Silvennoinen # # 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, includ...
38.115385
100
0.729566
# MIT License # # Copyright (c) 2019 Tuomas Halvari, Juha Harviainen, Juha Mylläri, Antti Röyskö, Juuso Silvennoinen # # 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, inc...
6
0
0
0
0
0
0
0
0
fc5338c0a141643d797fc75f3db3886647efd1e0
2,091
py
Python
observation/tests/StoreObsTest.py
CUrW-SL/cfcwm-cms
3888e724800395c478f1b63dab9f77d0afa3b2c4
[ "Apache-2.0" ]
null
null
null
observation/tests/StoreObsTest.py
CUrW-SL/cfcwm-cms
3888e724800395c478f1b63dab9f77d0afa3b2c4
[ "Apache-2.0" ]
null
null
null
observation/tests/StoreObsTest.py
CUrW-SL/cfcwm-cms
3888e724800395c478f1b63dab9f77d0afa3b2c4
[ "Apache-2.0" ]
null
null
null
import logging
35.440678
106
0.599235
import datetime import json import logging import logging.config import os import sys import traceback from os.path import join as pjoin from subprocess import Popen, PIPE import unittest2 as unittest class StoreObsTest(unittest.TestCase): @classmethod def setUpClass(cls): try: cls.root_d...
0
849
0
1,016
0
0
0
-12
222
92e9b61ef393b8e0b1994c6564135ea55fd6308a
3,896
py
Python
emmet/workflows/tests/test_property_workflows.py
kmu/emmet
97d48616da5890ad3d44c9bfd6e65696449105b4
[ "BSD-3-Clause-LBNL" ]
2
2020-04-08T19:01:16.000Z
2020-04-26T04:09:53.000Z
emmet/workflows/tests/test_property_workflows.py
kmu/emmet
97d48616da5890ad3d44c9bfd6e65696449105b4
[ "BSD-3-Clause-LBNL" ]
null
null
null
emmet/workflows/tests/test_property_workflows.py
kmu/emmet
97d48616da5890ad3d44c9bfd6e65696449105b4
[ "BSD-3-Clause-LBNL" ]
1
2021-09-30T16:57:19.000Z
2021-09-30T16:57:19.000Z
import os import unittest __author__ = "Joseph Montoya" __email__ = "montoyjh@lbl.gov" module_dir = os.path.join(os.path.dirname(os.path.abspath(__file__))) if __name__ == "__main__": unittest.main()
36.411215
113
0.665041
import os import unittest from maggma.stores import MemoryStore from maggma.runner import Runner from maggma.builders import Builder from emmet.workflows.property_workflows import PropertyWorkflowBuilder,\ get_elastic_wf_builder from pymatgen.util.testing import PymatgenTest from atomate.vasp.workflows.presets.cor...
0
523
0
2,691
0
0
0
251
222
0a95d4a1567f2240b60061ccfe32a3b346555780
57
py
Python
p97.py
brandonpelfrey/project-euler
2004720e1545e554bdefc0de3898f6dbddf731f8
[ "MIT" ]
null
null
null
p97.py
brandonpelfrey/project-euler
2004720e1545e554bdefc0de3898f6dbddf731f8
[ "MIT" ]
null
null
null
p97.py
brandonpelfrey/project-euler
2004720e1545e554bdefc0de3898f6dbddf731f8
[ "MIT" ]
null
null
null
n = 28433 * pow(2,7830457,10**10) + 1 print str(n)[-10:]
19
37
0.578947
n = 28433 * pow(2,7830457,10**10) + 1 print str(n)[-10:]
0
0
0
0
0
0
0
0
0
2e620c4667c5e606e3b7a171d1cd8ca4819552f8
4,848
py
Python
backend/app/core/routers/logic/tag_logic.py
Hawangledt/template-projeto-selecao-back
2c90236ebac48c7018b8a36562aec1eb3b200825
[ "MIT" ]
null
null
null
backend/app/core/routers/logic/tag_logic.py
Hawangledt/template-projeto-selecao-back
2c90236ebac48c7018b8a36562aec1eb3b200825
[ "MIT" ]
null
null
null
backend/app/core/routers/logic/tag_logic.py
Hawangledt/template-projeto-selecao-back
2c90236ebac48c7018b8a36562aec1eb3b200825
[ "MIT" ]
null
null
null
from fastapi import HTTPException from sqlalchemy.orm import Session from core.models.table import TagDB, TagInRepoDB, RepoDB from core.models.schema import TagInRepoCreate def _create_tag(db: Session, tag_name: str, user_id: int): """ Creates a new tag in the database Args: db (Session): sqlAlchemy ...
28.186047
76
0.634901
from fastapi import HTTPException from sqlalchemy.orm import Session from core.models.table import TagDB, TagInRepoDB, RepoDB from core.models.schema import TagCreate from core.models.schema import TagInRepoCreate def _create_tag(db: Session, tag_name: str, user_id: int): """ Creates a new tag in the database ...
0
0
0
0
0
0
0
19
22
b1b4d73668dbdada7333dd77a3679b727c4d1bf8
840
py
Python
prefs.py
filippobuletto/DropLink
6a2dcaaf6fef071df23b32ee1ced09df526448a6
[ "MIT" ]
1
2017-08-08T10:49:28.000Z
2017-08-08T10:49:28.000Z
prefs.py
filippobuletto/DropLink
6a2dcaaf6fef071df23b32ee1ced09df526448a6
[ "MIT" ]
null
null
null
prefs.py
filippobuletto/DropLink
6a2dcaaf6fef071df23b32ee1ced09df526448a6
[ "MIT" ]
null
null
null
#!/usr/bin/python # This sample code is for use with Dropbox desktop client # versions 1.2 and below. It is likely to be deprecated in all # other future releases. Use it at your own risk. # Read more at http://www.dropbox.com/developers/desktop_apps import base64 import os.path import platform if platform.syste...
28
67
0.684524
#!/usr/bin/python # This sample code is for use with Dropbox desktop client # versions 1.2 and below. It is likely to be deprecated in all # other future releases. Use it at your own risk. # Read more at http://www.dropbox.com/developers/desktop_apps import base64 import os.path import platform if platform.syste...
0
0
0
0
0
279
0
0
25
be9445878d8d1a7d3745931c73412eb85d987bda
9,851
py
Python
seafileapi/files.py
vincentrou/python-seafile
e75afb1618203e120b43ba3ab1b40e3736aac320
[ "Apache-2.0" ]
null
null
null
seafileapi/files.py
vincentrou/python-seafile
e75afb1618203e120b43ba3ab1b40e3736aac320
[ "Apache-2.0" ]
null
null
null
seafileapi/files.py
vincentrou/python-seafile
e75afb1618203e120b43ba3ab1b40e3736aac320
[ "Apache-2.0" ]
null
null
null
ZERO_OBJ_ID = '0000000000000000000000000000000000000000'
34.086505
101
0.607857
import io import os import posixpath import re from urllib import urlencode from seafileapi.utils import querystr, utf8lize,raise_does_not_exist ZERO_OBJ_ID = '0000000000000000000000000000000000000000' class _SeafDirentBase(object): """Base class for :class:`SeafFile` and :class:`SeafDir`. It provides implem...
0
1,014
0
8,562
0
0
0
13
201
7173ecd00afa5901a031f66d359c45f5c9dc2ffd
7,584
py
Python
Predictive models/Product/predictive_Models.py
Shelbyyyy/Python
4bb6d9025f1fa7d066cecd0849cc561a5432d7cd
[ "Apache-2.0" ]
null
null
null
Predictive models/Product/predictive_Models.py
Shelbyyyy/Python
4bb6d9025f1fa7d066cecd0849cc561a5432d7cd
[ "Apache-2.0" ]
null
null
null
Predictive models/Product/predictive_Models.py
Shelbyyyy/Python
4bb6d9025f1fa7d066cecd0849cc561a5432d7cd
[ "Apache-2.0" ]
null
null
null
import pandas as p# data_train = '../homework/train.csv' # data_train = p.read_csv(data_train)# print(data_train.info())# print(data_train.describe())# ### import matplotlib.pyplot as pt pt.rcParams['font.sans-serif']=['Simhei'] # pt.rcParams['axes.unicode_minus'] = False # fig = pt.figure() fig.s...
29.509728
126
0.692906
import pandas as p#导入目前所需要的库并给与简称 data_train = '../homework/train.csv' #查看基本数据 data_train = p.read_csv(data_train)#导入训练模型 print(data_train.info())#查看数据类型 print(data_train.describe())#粗略查看基本数据 ###导入并且查看原始数据 import matplotlib.pyplot as pt import numpy as n pt.rcParams['font.sans-serif']=['Simhei'] #解决...
2,694
0
0
0
0
1,798
0
30
222
2230f1c0b0526112ff87b859b1aa753e56ca180b
685
py
Python
chemreg/substance/urls.py
Chemical-Curation/chemcurator
bcd7fab84e407f06502e6873c38820724d4e54e7
[ "MIT" ]
1
2020-10-05T18:02:24.000Z
2020-10-05T18:02:24.000Z
chemreg/substance/urls.py
Chemical-Curation/chemcurator_django
bcd7fab84e407f06502e6873c38820724d4e54e7
[ "MIT" ]
207
2020-01-30T19:17:44.000Z
2021-02-24T19:45:29.000Z
chemreg/substance/urls.py
Chemical-Curation/chemcurator_django
bcd7fab84e407f06502e6873c38820724d4e54e7
[ "MIT" ]
null
null
null
from django.urls import include, path from chemreg.jsonapi.routers import SimpleRouter from chemreg.substance import views # Create a router and register our viewsets with it. router = SimpleRouter() router.register(views.QCLevelsTypeViewSet, "qcLevels") router.register(views.RelationshipTypeViewSet) router.register(...
31.136364
71
0.830657
from django.urls import include, path from chemreg.jsonapi.routers import SimpleRouter from chemreg.substance import views # Create a router and register our viewsets with it. router = SimpleRouter() router.register(views.QCLevelsTypeViewSet, "qcLevels") router.register(views.RelationshipTypeViewSet) router.register(...
0
0
0
0
0
0
0
0
0
d33d27398db1a78287309315d309d2df91c6dc08
4,889
py
Python
plugins/sign-in/utils.py
fz6m/tomon-naixue
dfbdd69836f26d160cece34e204f9fb2ed731607
[ "MIT" ]
3
2020-08-23T17:43:09.000Z
2020-08-31T04:43:42.000Z
plugins/sign-in/utils.py
fz6m/tomon-naixue
dfbdd69836f26d160cece34e204f9fb2ed731607
[ "MIT" ]
null
null
null
plugins/sign-in/utils.py
fz6m/tomon-naixue
dfbdd69836f26d160cece34e204f9fb2ed731607
[ "MIT" ]
null
null
null
try: import ujson as json except:
26.284946
133
0.566578
import os import random import datetime import aiofiles from enum import Enum from dateutil.parser import parse import aiohttp try: import ujson as json except: import json class Model(Enum): ALL = '_all' BLURRY = '_blurry' SEND_AT = '_send_at' SEND_DEFAULT = '_send_default' class...
0
3,672
0
913
0
0
0
-37
298
f01ecbdf7e1871505f0a10215d7b342df4553e67
3,669
py
Python
carplay/generate_index.py
waha0506/keras_yolo_v2
3575201fd09bec7dee6abf956d737d08c17c6086
[ "MIT" ]
null
null
null
carplay/generate_index.py
waha0506/keras_yolo_v2
3575201fd09bec7dee6abf956d737d08c17c6086
[ "MIT" ]
4
2020-09-25T22:32:42.000Z
2022-02-09T23:34:48.000Z
carplay/generate_index.py
waha0506/keras_yolo_v2
3575201fd09bec7dee6abf956d737d08c17c6086
[ "MIT" ]
null
null
null
import cv2 import argparse from itertools import permutations ap=argparse.ArgumentParser() ap.add_argument('-i', '--image', type=str) args=vars(ap.parse_args()) image = cv2.imread(args['image']) source = image.copy() target = image.copy() phone=source[101:286,209:394] music=source[101:286,479:664] maps=source[101:286...
30.322314
99
0.676751
import cv2 import numpy as np from matplotlib import pyplot as plt import argparse from itertools import permutations from lxml import etree as ET ap=argparse.ArgumentParser() ap.add_argument('-i', '--image', type=str) args=vars(ap.parse_args()) image = cv2.imread(args['image']) source = image.copy() target = image.c...
0
0
0
0
0
1,908
0
19
112
fad4b0e4d3b1b5fdd64fe0d2b39bf829079b205e
7,749
py
Python
data/external/repositories_2to3/163451/kaggle_diabetic_retinopathy-master/utils.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories_2to3/163451/kaggle_diabetic_retinopathy-master/utils.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories_2to3/163451/kaggle_diabetic_retinopathy-master/utils.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
1
2019-12-04T08:23:33.000Z
2019-12-04T08:23:33.000Z
# TODO clean this mess up # TODO: very ugly stuff here, can probably be done a lot better
34.44
77
0.550136
import re import glob import os import sys import skimage import numpy as np import theano.tensor as T from sklearn.cross_validation import StratifiedShuffleSplit import string import lasagne as nn def padtosquare(im): w, l = im.shape if w < l: pad_size = (l - w) / 2.0 im...
0
0
0
0
0
7,175
0
-22
480
1c7f325c5890cb1a60510f4fab30b2de39a8c405
1,109
py
Python
server.py
Guozhongyuan/insurtechapp
e7591944d9d2f0dfc447be5d2d71240f67b4661f
[ "MIT" ]
201
2018-10-25T06:17:48.000Z
2022-03-30T08:41:27.000Z
server.py
Guozhongyuan/insurtechapp
e7591944d9d2f0dfc447be5d2d71240f67b4661f
[ "MIT" ]
10
2019-04-07T22:44:49.000Z
2021-07-03T03:52:53.000Z
server.py
Guozhongyuan/insurtechapp
e7591944d9d2f0dfc447be5d2d71240f67b4661f
[ "MIT" ]
69
2018-10-25T20:28:25.000Z
2021-12-22T01:27:50.000Z
# Dash app initialization import dash # User management initialization import os from flask_login import LoginManager from users_mgt import db from config import config app = dash.Dash( __name__, meta_tags=[ { 'charset': 'utf-8', }, { 'name': 'viewport', ...
21.326923
78
0.707845
# Dash app initialization import dash # User management initialization import os from flask_login import LoginManager, UserMixin from users_mgt import db, User as base from config import config app = dash.Dash( __name__, meta_tags=[ { 'charset': 'utf-8', }, { 'n...
0
69
0
16
0
0
0
25
44
d241f7c6226d200d83a89227e0cf209a29c2c07b
634
py
Python
heuristic/functions/remove_empty_routes.py
N-Wouda/OR-Analysis
2070e2dee49f1556fcaa00044d3512e4ba08550f
[ "MIT" ]
7
2020-04-12T14:02:08.000Z
2021-10-09T07:52:08.000Z
heuristic/functions/remove_empty_routes.py
N-Wouda/OR-Analysis
2070e2dee49f1556fcaa00044d3512e4ba08550f
[ "MIT" ]
11
2020-02-16T22:15:28.000Z
2020-03-28T09:35:38.000Z
heuristic/functions/remove_empty_routes.py
N-Wouda/OR-Analysis
2070e2dee49f1556fcaa00044d3512e4ba08550f
[ "MIT" ]
2
2020-05-21T23:19:44.000Z
2020-09-04T05:22:45.000Z
from typing import Callable from heuristic.classes import Solution def remove_empty_routes(operator: Callable[..., Solution]): """ Wrapper function that removes empty routes from the returned solution instance. These routes may come into existence because all customers have been removed by e.g. a des...
28.818182
77
0.676656
from functools import wraps from typing import Callable from heuristic.classes import Solution def remove_empty_routes(operator: Callable[..., Solution]): """ Wrapper function that removes empty routes from the returned solution instance. These routes may come into existence because all customers have ...
0
215
0
0
0
0
0
6
48
dcb952173008ca18cc782038e7b5a875d693a727
1,893
py
Python
utilities/foto-files/manage-duplicates.py
davemungo/various
ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce
[ "MIT" ]
1
2020-01-19T01:21:56.000Z
2020-01-19T01:21:56.000Z
utilities/foto-files/manage-duplicates.py
davemungo/various
ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce
[ "MIT" ]
null
null
null
utilities/foto-files/manage-duplicates.py
davemungo/various
ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce
[ "MIT" ]
1
2021-07-02T14:40:01.000Z
2021-07-02T14:40:01.000Z
''' Compare File Contents and remove duplicate files get sha256 hash for each file found use dictionary to check for duplicates delete duplicates Dave Cuthbert (C) 2021-02-12 MIT License ''' if "__main__" == __name__: find_duplicates() #EOF
25.581081
78
0.56841
''' Compare File Contents and remove duplicate files get sha256 hash for each file found use dictionary to check for duplicates delete duplicates Dave Cuthbert (C) 2021-02-12 MIT License ''' import os from collections import defaultdict import hashlib import sys def get_hash(file_name): BLOCK_SIZE =...
0
0
0
0
0
1,404
0
-16
213
7a1e0e617105d2a68e3ed32c5ac41dc253446f33
1,855
py
Python
utils/prepare_models.py
kerryeon/rust-sbert
067c35008368a9e4c0cd130cffd65d26f4d5d47b
[ "Apache-2.0" ]
null
null
null
utils/prepare_models.py
kerryeon/rust-sbert
067c35008368a9e4c0cd130cffd65d26f4d5d47b
[ "Apache-2.0" ]
null
null
null
utils/prepare_models.py
kerryeon/rust-sbert
067c35008368a9e4c0cd130cffd65d26f4d5d47b
[ "Apache-2.0" ]
null
null
null
if __name__ == "__main__": url = "https://public.ukp.informatik.tu-darmstadt.de/reimers/sentence-transformers/v0.2/distiluse-base-multilingual-cased.zip" path = download_model(url, "distiluse-base-multilingual-cased") convert_to_c_array(path + '/0_DistilBERT', prefix='distilbert.') convert_to...
28.984375
130
0.661995
import sys import os import numpy as np import torch import subprocess from pathlib import Path import requests import zipfile import shutil def download_model(url, filename): print("Downloading model...") r = requests.get(url, allow_redirects=True) zip_filename = filename + ".zip" open(zip_filename...
0
0
0
0
0
1,306
0
-57
245
38e031fb87b91426c92e51eed33e29d1f187058b
6,347
py
Python
gallery/test_models.py
guzalv/myks-gallery
7944edfcaf12233a5a82e42298e42428170c1e54
[ "BSD-3-Clause" ]
null
null
null
gallery/test_models.py
guzalv/myks-gallery
7944edfcaf12233a5a82e42298e42428170c1e54
[ "BSD-3-Clause" ]
null
null
null
gallery/test_models.py
guzalv/myks-gallery
7944edfcaf12233a5a82e42298e42428170c1e54
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 from __future__ import unicode_literals
46.669118
96
0.728533
# coding: utf-8 from __future__ import unicode_literals import datetime from django.contrib.auth.models import Group, User from django.test import TestCase from .models import Album, AlbumAccessPolicy, Photo, PhotoAccessPolicy class AccessPolicyTests(TestCase): def setUp(self): today = datetime.date....
0
0
0
6,092
0
0
0
83
114
3fb2560ef5f528ddb57bd0876a99c324cf70c2a9
1,262
py
Python
PortScanner/bannerofport.py
saadhaxxan/Python-For-Ethical-Hacking
87ef18b2c2876bf1711442a5f00ddb7d2dacfd43
[ "MIT" ]
26
2020-09-16T18:26:00.000Z
2022-02-09T15:18:34.000Z
PortScanner/bannerofport.py
saadhaxxan/Python-For-Ethical-Hacking
87ef18b2c2876bf1711442a5f00ddb7d2dacfd43
[ "MIT" ]
null
null
null
PortScanner/bannerofport.py
saadhaxxan/Python-For-Ethical-Hacking
87ef18b2c2876bf1711442a5f00ddb7d2dacfd43
[ "MIT" ]
3
2020-11-27T20:30:22.000Z
2022-02-16T05:57:16.000Z
#!/usr/bin/python from termcolor import colored print(colored("Select Option"),"blue") print(colored("1. Single Port\n2. Multi Port"),"blue") option = int(input()) if option == 1: print(colored("Enter Host IP Address:","green")) host = input() print(colored("Enter port number to scan:","green")) port...
26.851064
94
0.574485
#!/usr/bin/python import socket from termcolor import colored print(colored("Select Option"),"blue") print(colored("1. Single Port\n2. Multi Port"),"blue") option = int(input()) if option == 1: print(colored("Enter Host IP Address:","green")) host = input() print(colored("Enter port number to scan:","gr...
0
0
0
0
0
590
0
-8
69
e2cc10f2d72e46b6a67147d41bced89c93856a14
188
py
Python
Ofpp/__init__.py
Timothy-Edward-Kendon/ofpp
2c105ad74d5f0276bab38993162ec6f0b4b6b86f
[ "MIT" ]
26
2017-11-23T09:16:00.000Z
2020-03-09T13:18:35.000Z
openfoamparser/__init__.py
emanuel-raad/openfoamparser
f67031c90109932c38a299bad8f42fe34fdb8c4a
[ "MIT" ]
4
2017-11-24T10:20:11.000Z
2019-07-23T13:42:58.000Z
openfoamparser/__init__.py
emanuel-raad/openfoamparser
f67031c90109932c38a299bad8f42fe34fdb8c4a
[ "MIT" ]
12
2018-02-27T06:58:13.000Z
2019-10-23T18:47:19.000Z
from __future__ import print_function
26.857143
86
0.824468
from __future__ import print_function from .field_parser import parse_internal_field, parse_boundary_field, parse_field_all from .mesh_parser import FoamMesh from .utils import *
0
0
0
0
0
0
0
75
71
8eb76f8a97466c7e9df2a79b721a1fbab165b740
815
py
Python
setup.py
beeware/rubicon
a2f2bd5178964b565b40033204a5b4a7ce99695e
[ "BSD-3-Clause" ]
4
2019-08-11T15:42:57.000Z
2021-08-06T19:31:19.000Z
setup.py
beeware/rubicon
a2f2bd5178964b565b40033204a5b4a7ce99695e
[ "BSD-3-Clause" ]
null
null
null
setup.py
beeware/rubicon
a2f2bd5178964b565b40033204a5b4a7ce99695e
[ "BSD-3-Clause" ]
4
2019-10-11T13:10:00.000Z
2021-06-24T02:24:53.000Z
#/usr/bin/env python import io from setuptools import setup with io.open('README.rst', encoding='utf8') as readme: long_description = readme.read() setup( name='rubicon', version='0.0.0', description='A collection of tools to bridge between Python and other language environments.', long_descripti...
29.107143
98
0.651534
#/usr/bin/env python import io from setuptools import setup with io.open('README.rst', encoding='utf8') as readme: long_description = readme.read() setup( name='rubicon', version='0.0.0', description='A collection of tools to bridge between Python and other language environments.', long_descripti...
0
0
0
0
0
0
0
0
0
446aa28009d7caad9abca1127944ceab51f5a88f
5,479
py
Python
pp-cdmx/public_account/migrations/0001_initial.py
rickrebel/race-history
be93b88cf4658fd2c5ec409d8f422b2960d1ae60
[ "MIT" ]
1
2020-08-31T21:08:54.000Z
2020-08-31T21:08:54.000Z
pp-cdmx/public_account/migrations/0001_initial.py
rickrebel/race-history
be93b88cf4658fd2c5ec409d8f422b2960d1ae60
[ "MIT" ]
1
2021-06-10T23:09:45.000Z
2021-06-10T23:09:45.000Z
pp-cdmx/public_account/migrations/0001_initial.py
rickrebel/race-history
be93b88cf4658fd2c5ec409d8f422b2960d1ae60
[ "MIT" ]
1
2021-07-16T19:32:04.000Z
2021-07-16T19:32:04.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-05-24 18:30 from __future__ import unicode_literals
64.458824
191
0.616901
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-05-24 18:30 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('geographic', '0001_initial'), ...
0
0
0
5,266
0
0
0
30
68
f758de11235ecd17f99ee62e8dff7e421c650588
306
py
Python
contests/pythonist_3/capitalize.py
delaanthonio/hackerrank
b1f2e1e93b3260be90eb3b8cb8e86e9a700acf27
[ "MIT" ]
1
2017-07-02T01:35:39.000Z
2017-07-02T01:35:39.000Z
contests/pythonist_3/capitalize.py
delaanthonio/hackerrank
b1f2e1e93b3260be90eb3b8cb8e86e9a700acf27
[ "MIT" ]
null
null
null
contests/pythonist_3/capitalize.py
delaanthonio/hackerrank
b1f2e1e93b3260be90eb3b8cb8e86e9a700acf27
[ "MIT" ]
1
2018-04-03T15:11:56.000Z
2018-04-03T15:11:56.000Z
""" Capitalize! :author: Dela Anthonio :hackerrank: https://hackerrank.com/delaanthonio :problem: https://www.hackerrank.com/contests/pythonist3/challenges/capitalize """ print(solve('hi jake hj '))
23.538462
78
0.696078
""" Capitalize! :author: Dela Anthonio :hackerrank: https://hackerrank.com/delaanthonio :problem: https://www.hackerrank.com/contests/pythonist3/challenges/capitalize """ def solve(s: str): words = [word.capitalize() for word in s.split(' ')] return " ".join(words) print(solve('hi jake hj '))
0
0
0
0
0
81
0
0
23
c8cf2fde919819d05af708ce20ebdb58e566f6f9
621
py
Python
solstice/bootstrap/houdini/userSetup.py
Solstice-Short-Film/solstice-bootstrap
ace828e00d3f10ff3e8a70d23170f138e4633ff8
[ "MIT" ]
null
null
null
solstice/bootstrap/houdini/userSetup.py
Solstice-Short-Film/solstice-bootstrap
ace828e00d3f10ff3e8a70d23170f138e4633ff8
[ "MIT" ]
null
null
null
solstice/bootstrap/houdini/userSetup.py
Solstice-Short-Film/solstice-bootstrap
ace828e00d3f10ff3e8a70d23170f138e4633ff8
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Initialization for Solstice Tools """ from __future__ import print_function, division, absolute_import __author__ = "Tomas Poveda" __license__ = "MIT" __maintainer__ = "Tomas Poveda" __email__ = "tpovedatd@gmail.com" print('=' * 100) print('| Solstice Pipeline | > L...
23
70
0.705314
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Initialization for Solstice Tools """ from __future__ import print_function, division, absolute_import __author__ = "Tomas Poveda" __license__ = "MIT" __maintainer__ = "Tomas Poveda" __email__ = "tpovedatd@gmail.com" print('=' * 100) print('| Solstice Pipeline | > L...
0
0
0
0
0
0
0
0
0
f72f8089cc89101fe7a243dfe2b57fdf92cb7ad2
22,912
py
Python
LLDBagility/stubvm.py
killvxk/LLDBagility
6cc0df91bd49e43997b77048611d1b73f43f7b29
[ "Apache-2.0" ]
1
2019-07-13T12:04:04.000Z
2019-07-13T12:04:04.000Z
LLDBagility/stubvm.py
killvxk/LLDBagility
6cc0df91bd49e43997b77048611d1b73f43f7b29
[ "Apache-2.0" ]
null
null
null
LLDBagility/stubvm.py
killvxk/LLDBagility
6cc0df91bd49e43997b77048611d1b73f43f7b29
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import lldbagilityutils logger = lldbagilityutils.create_indented_logger(__name__, "/tmp/stubvm.log") NULL = 0x0 # https://github.com/apple/darwin-xnu/blob/xnu-4903.221.2/osfmk/i386/eflags.h EFL_TF = 0x00000100 # https://github.com/apple/darwin-xnu/blob/xnu-4903.221....
37.255285
148
0.659043
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import re import threading import lldbagilityutils from PyFDP.FDP import FDP from VMSN import VMSN logger = lldbagilityutils.create_indented_logger(__name__, "/tmp/stubvm.log") NULL = 0x0 # https://github.com/apple/darwin-xnu/blob/xnu-4903.221.2/osfmk/i386/eflags.h EF...
0
18,981
0
2,269
0
146
0
-13
249
ce4178999bf32384813f16179d3b6b0f9cff55ee
267
py
Python
src/main/spotify/get_connection.py
bhankit1410/playlist-to-youtube
74918eb74698e0f543fe86e2f760478ee4e407cf
[ "MIT" ]
null
null
null
src/main/spotify/get_connection.py
bhankit1410/playlist-to-youtube
74918eb74698e0f543fe86e2f760478ee4e407cf
[ "MIT" ]
1
2021-09-18T18:24:41.000Z
2021-09-18T18:24:41.000Z
src/main/spotify/get_connection.py
bhankit1410/playlist-to-youtube
74918eb74698e0f543fe86e2f760478ee4e407cf
[ "MIT" ]
null
null
null
import spotipy from spotipy.oauth2 import SpotifyClientCredentials spotify = spotipy.Spotify(auth_manager=SpotifyClientCredentials()) url = "http://httpbin.org/post" payload = dict(key1='value1', key2='value2') res = requests.post(url, data=payload) print(res.text)
29.666667
66
0.786517
import spotipy from spotipy.oauth2 import SpotifyClientCredentials spotify = spotipy.Spotify(auth_manager=SpotifyClientCredentials()) url = "http://httpbin.org/post" payload = dict(key1='value1', key2='value2') res = requests.post(url, data=payload) print(res.text)
0
0
0
0
0
0
0
0
0
e512aa0599158cc149792421975a951cc3e855ba
4,485
py
Python
Detector/elk.py
KJ-black/Detecting-Alternate-Authentication-Based-APT-Attack-via-MITRE-Techniques-Correlation
e8ee9dcb28261a69d0534580c08a4620595978df
[ "MIT" ]
null
null
null
Detector/elk.py
KJ-black/Detecting-Alternate-Authentication-Based-APT-Attack-via-MITRE-Techniques-Correlation
e8ee9dcb28261a69d0534580c08a4620595978df
[ "MIT" ]
null
null
null
Detector/elk.py
KJ-black/Detecting-Alternate-Authentication-Based-APT-Attack-via-MITRE-Techniques-Correlation
e8ee9dcb28261a69d0534580c08a4620595978df
[ "MIT" ]
null
null
null
from getpass import getpass if __name__ == '__main__': es_host = 'https://140.113.194.82:9200' es_username = input('username:') es_password = getpass('password:') es = ElasticSearch(es_host, (es_username, es_password)) es.index('logstash-router.zeek*') # es.column() # es.time('now-30s', ...
32.737226
74
0.547826
import json import requests from elasticsearch.connection import create_ssl_context from elasticsearch import Elasticsearch from getpass import getpass class ElasticSearch: """Wrapper of Elasticsearch module. This module is designed for using elastic search more friendly. """ def __init__(self, host...
0
0
0
3,685
0
0
0
36
112
878095fc229590aae383c04cea6968024bcbfd7d
422
py
Python
manage.py
ukch/betternamecoming
05a7dde27099f7bea7d5fe6711279bb1fbecfc47
[ "MIT" ]
1
2021-06-02T15:12:21.000Z
2021-06-02T15:12:21.000Z
manage.py
ukch/betternamecoming
05a7dde27099f7bea7d5fe6711279bb1fbecfc47
[ "MIT" ]
48
2016-01-17T00:00:17.000Z
2022-01-13T00:45:01.000Z
manage.py
ryanmrubin/refugeedata
d71bedb0895e8011f3b67245c17df3422553820c
[ "MIT" ]
4
2015-09-14T09:25:43.000Z
2015-12-29T19:13:23.000Z
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "refugeedata.app.settings") try: from refugeedata.app import local_settings except ImportError: pass else: os.environ.update(local_settings.SETTINGS_DICT) ...
23.444444
79
0.729858
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "refugeedata.app.settings") try: from refugeedata.app import local_settings except ImportError: pass else: os.environ.update(local_settings.SETTINGS_DICT) ...
0
0
0
0
0
0
0
0
0
eb50898ebb54ac7bbd12256db154af27efab9bda
2,490
py
Python
aiodec.py
cjrh/aiodec
ca5b0759e2c1d48a36b29a2c6eabb3af3b5b2c68
[ "Apache-2.0" ]
1
2018-05-23T21:53:26.000Z
2018-05-23T21:53:26.000Z
aiodec.py
cjrh/aiodec
ca5b0759e2c1d48a36b29a2c6eabb3af3b5b2c68
[ "Apache-2.0" ]
3
2018-03-15T22:50:08.000Z
2018-10-19T10:55:56.000Z
aiodec.py
cjrh/aiodec
ca5b0759e2c1d48a36b29a2c6eabb3af3b5b2c68
[ "Apache-2.0" ]
1
2018-08-08T03:33:37.000Z
2018-08-08T03:33:37.000Z
""" aiodec ====== Decorators for coroutines """ import logging from inspect import Signature from typing import Callable, Mapping, Any __version__ = '2018.10.1' logger = logging.getLogger(__name__) Callback = Callable[[Signature, Mapping[str, Any]], None]
27.362637
82
0.6249
""" aiodec ====== Decorators for coroutines """ import time import logging from functools import wraps from string import Template import inspect from inspect import Signature from typing import Callable, Optional, Mapping, Any __version__ = '2018.10.1' logger = logging.getLogger(__name__) Callback = Callable[[Sig...
0
897
0
0
0
1,191
0
5
135
bde72676fc6a653ae2aa94f9c37e0a4e416f13e4
12,438
py
Python
config/CConfig.py
ngoan1608/robotframework-testsuitesmanagement
b5288de09d6df08ec718a4d3b9ae1efb0c67f103
[ "Apache-2.0" ]
null
null
null
config/CConfig.py
ngoan1608/robotframework-testsuitesmanagement
b5288de09d6df08ec718a4d3b9ae1efb0c67f103
[ "Apache-2.0" ]
null
null
null
config/CConfig.py
ngoan1608/robotframework-testsuitesmanagement
b5288de09d6df08ec718a4d3b9ae1efb0c67f103
[ "Apache-2.0" ]
null
null
null
# Copyright 2020-2022 Robert Bosch Car Multimedia GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
46.58427
191
0.61698
# Copyright 2020-2022 Robert Bosch Car Multimedia GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
0
0
0
9,524
0
108
0
16
114
087adbc91f50918dfe69281c5dc4021695d07c99
2,491
py
Python
specio/core/tests/test_request.py
Maxwell0001/specio
a660f690ea98058bce818415fe85736a9cdaa0f5
[ "BSD-3-Clause" ]
13
2019-03-11T12:32:00.000Z
2021-11-16T14:22:29.000Z
specio/core/tests/test_request.py
Maxwell0001/specio
a660f690ea98058bce818415fe85736a9cdaa0f5
[ "BSD-3-Clause" ]
37
2017-12-08T13:01:58.000Z
2021-11-09T08:49:06.000Z
specio/core/tests/test_request.py
Maxwell0001/specio
a660f690ea98058bce818415fe85736a9cdaa0f5
[ "BSD-3-Clause" ]
10
2017-12-08T13:03:37.000Z
2022-03-03T13:55:36.000Z
"""Test the Request class""" # Copyright (c) 2017 # Authors: Guillaume Lemaitre <guillaume.lemaitre@inria.fr> # License: BSD 3 clause from os.path import dirname DATA_PATH = module_path = dirname(__file__)
27.988764
73
0.668005
"""Test the Request class""" # Copyright (c) 2017 # Authors: Guillaume Lemaitre <guillaume.lemaitre@inria.fr> # License: BSD 3 clause import shutil import os from os.path import dirname, join, sep, expanduser import pytest from pytest import raises from specio import core from specio.core import Request DATA_PATH ...
0
393
0
202
0
1,422
0
11
250
53a23c8f4b7b8aea7a12aefbf04f21c2efcbc97b
1,391
py
Python
plugins/ctags_generator/test_ctags_generator.py
likev/gauravssnl.github.io
2bb17e0e5621c1f03d782b762694f999cc62d4d0
[ "MIT" ]
2
2021-01-12T14:55:55.000Z
2021-03-24T11:52:44.000Z
plugins/ctags_generator/test_ctags_generator.py
likev/gauravssnl.github.io
2bb17e0e5621c1f03d782b762694f999cc62d4d0
[ "MIT" ]
1
2021-12-13T20:50:25.000Z
2021-12-13T20:50:25.000Z
plugins/ctags_generator/test_ctags_generator.py
likev/gauravssnl.github.io
2bb17e0e5621c1f03d782b762694f999cc62d4d0
[ "MIT" ]
3
2021-03-24T11:58:31.000Z
2022-01-12T16:03:06.000Z
# -*- coding: utf-8 -*- import os CUR_DIR = os.path.dirname(__file__) TEST_CONTENT_DIR = os.path.join(CUR_DIR, 'test_content')
33.119048
104
0.660676
# -*- coding: utf-8 -*- import os, shutil from pelican.generators import ArticlesGenerator from pelican.tests.support import get_settings, unittest from pelican.writers import Writer from ctags_generator import generate_ctags CUR_DIR = os.path.dirname(__file__) TEST_CONTENT_DIR = os.path.join(CUR_DIR, 'test_content...
21
0
0
1,037
0
0
0
104
113
92c84247c3383168159a1c235a6ad78fa43a77c5
5,169
py
Python
fsic/plot.py
olliethomas/fsic-test
8372d46d56d1340432fb7bffe3662e9cb6f4f56e
[ "MIT" ]
13
2017-01-09T16:23:05.000Z
2022-03-18T14:29:10.000Z
fsic/plot.py
afcarl/fsic-test
8372d46d56d1340432fb7bffe3662e9cb6f4f56e
[ "MIT" ]
null
null
null
fsic/plot.py
afcarl/fsic-test
8372d46d56d1340432fb7bffe3662e9cb6f4f56e
[ "MIT" ]
6
2016-11-06T09:59:45.000Z
2022-03-13T19:21:08.000Z
"""Module containing convenient functions for plotting""" __author__ = 'wittawat' import fsic.ex.exglobal as exglo import fsic.glo as glo import matplotlib.pyplot as plt import numpy as np def plot_2d_data(pdata): """ pdata: an instance of PairedData Return a figure handle """ X, Y = pdata.xy() ...
35.163265
96
0.639969
"""Module containing convenient functions for plotting""" __author__ = 'wittawat' import fsic.ex.exglobal as exglo import fsic.glo as glo import matplotlib.pyplot as plt import numpy as np def plot_2d_data(pdata): """ pdata: an instance of PairedData Return a figure handle """ X, Y = pdata.xy() ...
0
0
0
0
0
1,813
0
0
50
1854c4cfedb02ac45bd303d9df4ffa04df7201e9
12,595
py
Python
src/test/rgw/rgw_multi/tests_es.py
rpratap-bot/ceph
9834961a66927ae856935591f2fd51082e2ee484
[ "MIT" ]
4
2020-04-08T03:42:02.000Z
2020-10-01T20:34:48.000Z
src/test/rgw/rgw_multi/tests_es.py
rpratap-bot/ceph
9834961a66927ae856935591f2fd51082e2ee484
[ "MIT" ]
93
2020-03-26T14:29:14.000Z
2020-11-12T05:54:55.000Z
src/test/rgw/rgw_multi/tests_es.py
rpratap-bot/ceph
9834961a66927ae856935591f2fd51082e2ee484
[ "MIT" ]
23
2020-03-24T10:28:44.000Z
2020-09-24T09:42:19.000Z
import logging import boto log = logging.getLogger(__name__)
45.634058
164
0.597142
import json import logging import boto import boto.s3.connection import datetime import dateutil from nose.tools import eq_ as eq from six.moves import range from .multisite import * from .tests import * from .zone_es import * log = logging.getLogger(__name__) def check_es_configured(): realm = get_realm() ...
0
0
0
0
0
12,121
0
2
408
b970a0e6615c83cf1e5b12238ee629561c077642
3,921
py
Python
blender-add-on/xrs/render.py
MikeFesta/3xr
e4b8a7a0db61c9247d590f293f67c9baacf77a7f
[ "Apache-2.0" ]
7
2021-11-16T14:26:47.000Z
2021-12-22T13:27:24.000Z
blender-add-on/xrs/render.py
MikeFesta/3xr
e4b8a7a0db61c9247d590f293f67c9baacf77a7f
[ "Apache-2.0" ]
null
null
null
blender-add-on/xrs/render.py
MikeFesta/3xr
e4b8a7a0db61c9247d590f293f67c9baacf77a7f
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: Apache-2.0 # -*- coding: utf-8 -*- """ Render related functions """ import bpy import xrs.collection import xrs.material def add_render_camera(): """ Adds one render camera that can have base settings in one place """ bpy.ops.object.camera_add() renderCam = bpy.data.cameras['Camera'] ...
34.394737
100
0.729406
# SPDX-License-Identifier: Apache-2.0 # -*- coding: utf-8 -*- """ Render related functions """ import bpy import threading import xrs.collection import xrs.material def add_render_camera(): """ Adds one render camera that can have base settings in one place """ bpy.ops.object.camera_add() renderCam = bpy.data.ca...
0
0
0
0
0
45
0
-5
45
8bcdbd197b18cd7d102389feb825c01ea13c01e6
3,038
py
Python
queue/scheduler.py
alexanderrichard/queueing-tool
c8858565497b4367b2f3a8ea3f9ea5140e5d00fc
[ "MIT" ]
21
2016-04-28T11:00:21.000Z
2021-05-21T21:10:27.000Z
queue/scheduler.py
alexanderrichard/queueing-tool
c8858565497b4367b2f3a8ea3f9ea5140e5d00fc
[ "MIT" ]
3
2017-01-13T21:29:00.000Z
2019-07-25T22:29:04.000Z
queue/scheduler.py
alexanderrichard/queueing-tool
c8858565497b4367b2f3a8ea3f9ea5140e5d00fc
[ "MIT" ]
10
2016-11-05T08:18:38.000Z
2021-05-07T15:01:32.000Z
#!/usr/bin/python2.7
44.676471
152
0.648453
#!/usr/bin/python2.7 import datetime class Resources(object): def __init__(self, gpus, threads, memory): self.gpus = gpus self.threads = threads self.memory = memory def __add__(self, other): return Resources(self.gpus + other.gpus, self.threads + other.threads, self.memo...
0
0
0
2,929
0
0
0
-6
92
2b624a3a8bc3c9a72ad660ec8393a4ba93e2669f
2,020
py
Python
code/networks/cifar/lenet.py
shashankkotyan/RepresentationMetrics
782c0ba727c523b7a159c497d2b91ef75aa9f201
[ "MIT" ]
3
2019-06-18T04:37:52.000Z
2020-12-17T08:05:34.000Z
code/networks/cifar/lenet.py
shashankkotyan/DualQualityAssessment
1b4fba13f14b0b6770b060081c3d0d1c3ea4a1c6
[ "MIT" ]
5
2020-05-13T16:47:36.000Z
2022-02-10T01:38:57.000Z
code/networks/cifar/lenet.py
shashankkotyan/RepresentationMetrics
782c0ba727c523b7a159c497d2b91ef75aa9f201
[ "MIT" ]
null
null
null
#!/usr/bin/env python
31.076923
180
0.606436
#!/usr/bin/env python from networks.cifar.cifar_model import CifarModel class LeNet(CifarModel): """ TODO: Write Comment """ def __init__(self, args): """ TODO: Write Comment """ self.name = 'LeNet' CifarModel.__init__(self, args) def network(se...
0
0
0
1,923
0
0
0
28
46
ad5fc7cc875336bb8f74bd9b88a9dbe5cc61dabc
938
py
Python
scripts/send_msg.py
VladislavYU/OPIoT
ebe242eb214b05d9e34a2afd063cbe6e3a13f1bd
[ "Apache-2.0" ]
null
null
null
scripts/send_msg.py
VladislavYU/OPIoT
ebe242eb214b05d9e34a2afd063cbe6e3a13f1bd
[ "Apache-2.0" ]
null
null
null
scripts/send_msg.py
VladislavYU/OPIoT
ebe242eb214b05d9e34a2afd063cbe6e3a13f1bd
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from optparse import OptionParser import locale from gsmmodem.modem import GsmModem import logging parser = OptionParser() parser.add_option("-a", "--address", action="store", dest="ip", type="string", help="Cureent ip address") PORT = '/dev/modem0' BAUDRATE = 115200 PIN = "...
28.424242
146
0.680171
#!/usr/bin/python # -*- coding: utf-8 -*- from optparse import OptionParser import locale from gsmmodem.modem import GsmModem import logging parser = OptionParser() parser.add_option("-a", "--address", action="store", dest="ip", type="string", help="Cureent ip address") PORT = '/dev/modem0' BAUDRATE = 115200 PIN = "...
0
0
0
0
0
0
0
0
0
dc7612dddef8c21ce0f90436648cb22d667ceb8b
869
py
Python
molecule/default/tests/test_default.py
while-true-do/ansible-role-srv_tftp
14f242b3e600cfe9e3f5e68eed217da91440d05a
[ "BSD-3-Clause" ]
2
2019-08-07T17:11:11.000Z
2021-04-16T12:12:13.000Z
molecule/default/tests/test_default.py
while-true-do/ansible-role-srv_tftp
14f242b3e600cfe9e3f5e68eed217da91440d05a
[ "BSD-3-Clause" ]
8
2019-09-02T07:55:00.000Z
2019-09-18T14:47:58.000Z
molecule/default/tests/test_default.py
while-true-do/ansible-role-srv_tftp
14f242b3e600cfe9e3f5e68eed217da91440d05a
[ "BSD-3-Clause" ]
null
null
null
# Some examples are given below. import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
18.891304
63
0.731876
# Some examples are given below. import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_tftp_package(host): pkg = host.package('tftp-server') assert pkg.is_installed def test_tft...
0
0
0
0
0
517
0
0
138
990b056b1cfe2f15252ddc2e1505d55d79fdb056
3,808
py
Python
lib/pgdb.py
5H4D0W-C0D3R/epic_store_bot
6af28cee968d7911fb07b1c4bfe886cba7e83a82
[ "MIT" ]
13
2020-12-20T17:28:55.000Z
2022-03-27T18:40:01.000Z
lib/pgdb.py
5H4D0W-C0D3R/epic_store_bot
6af28cee968d7911fb07b1c4bfe886cba7e83a82
[ "MIT" ]
2
2021-02-08T21:07:51.000Z
2022-02-21T06:28:40.000Z
lib/pgdb.py
5H4D0W-C0D3R/epic_store_bot
6af28cee968d7911fb07b1c4bfe886cba7e83a82
[ "MIT" ]
8
2021-06-07T00:29:26.000Z
2022-03-31T13:51:46.000Z
from .config import Config config = Config()
31.733333
127
0.448267
import psycopg2 from .config import Config config = Config() class Dtabase: def __init__(self): try: self.con = psycopg2.connect( host=config['db']['host'], database=config['db']['database'], user=config['db']['user'], password=co...
0
0
0
3,722
0
0
0
-6
45
2e85ecead62cc62f882a9e24cb13656903cdbd2a
659
py
Python
scm/style.py
rookiebulls/scm
f9baa225e049ff178d281ccb1709648bcc739228
[ "MIT" ]
3
2017-06-02T15:42:19.000Z
2017-08-17T15:02:56.000Z
scm/style.py
rookiebulls/scm
f9baa225e049ff178d281ccb1709648bcc739228
[ "MIT" ]
null
null
null
scm/style.py
rookiebulls/scm
f9baa225e049ff178d281ccb1709648bcc739228
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
26.36
72
0.646434
# -*- coding: utf-8 -*- from pygments.style import Style from pygments.token import Token from pygments.styles.default import DefaultStyle class DocumentStyle(Style): styles = { Token.Menu.Completions.Completion.Current: 'bg:#00aaaa #000000', Token.Menu.Completions.Completion: 'bg:#008888 #ffffff...
0
0
0
386
0
85
0
49
113
f86cda3548eba5900a9f51680381b27a4158cba6
498
py
Python
qepy/tests/test_pw.py
QU-XIAO/yambopy
ff65a4f90c1bfefe642ebc61e490efe781709ff9
[ "BSD-3-Clause" ]
21
2016-04-07T20:53:29.000Z
2021-05-14T08:06:02.000Z
qepy/tests/test_pw.py
alexmoratalla/yambopy
8ec0e1e18868ccaadb3eab36c55e6a47021e257d
[ "BSD-3-Clause" ]
22
2016-06-14T22:29:47.000Z
2021-09-16T15:36:26.000Z
qepy/tests/test_pw.py
alexmoratalla/yambopy
8ec0e1e18868ccaadb3eab36c55e6a47021e257d
[ "BSD-3-Clause" ]
15
2016-06-14T18:40:57.000Z
2021-08-07T13:17:43.000Z
# Copyright (C) 2018 Henrique Pereira Coutada Miranda # All rights reserved. # # This file is part of yambopy # import unittest if __name__ == '__main__': unittest.main()
20.75
55
0.654618
# Copyright (C) 2018 Henrique Pereira Coutada Miranda # All rights reserved. # # This file is part of yambopy # import unittest import os from qepy.pw import PwIn from yambopy.data.structures import Si class TestPwIn(unittest.TestCase): def test_pwin(self): pwi = PwIn.from_structure_dict(Si) pwi....
0
0
0
225
0
0
0
8
89
d7feab2e2f3e0891add361cee28583deeb6349eb
3,229
py
Python
v1/tnb_faucet/core/fb_post.py
picko1990/Bank
d35b0a76c1dd6ceb37155b6af32e3043c63d33f5
[ "MIT" ]
1
2021-07-24T06:54:11.000Z
2021-07-24T06:54:11.000Z
v1/tnb_faucet/core/fb_post.py
picko1990/Bank
d35b0a76c1dd6ceb37155b6af32e3043c63d33f5
[ "MIT" ]
4
2021-10-01T20:23:14.000Z
2021-10-01T20:57:42.000Z
v1/tnb_faucet/core/fb_post.py
picko1990/Bank
d35b0a76c1dd6ceb37155b6af32e3043c63d33f5
[ "MIT" ]
3
2021-02-23T01:09:05.000Z
2021-09-12T15:52:56.000Z
# # Author: Nikhil Taneja (taneja.nikhil03@gmail.com) # fb_post.py (c) 2021 # Desc: description # Created: Fri Jan 08 2021 04:19:09 GMT+0530 (India Standard Time) # Modified: Fri Jan 08 2021 18:19:22 GMT+0530 (India Standard Time) # import logging logger = logging.getLogger('faucet')
28.324561
68
0.589347
# # Author: Nikhil Taneja (taneja.nikhil03@gmail.com) # fb_post.py (c) 2021 # Desc: description # Created: Fri Jan 08 2021 04:19:09 GMT+0530 (India Standard Time) # Modified: Fri Jan 08 2021 18:19:22 GMT+0530 (India Standard Time) # import logging import re from urllib.parse import parse_qs, unquote, urlparse import...
0
0
0
0
0
2,719
0
63
157
8d81df8b8a0d792596b854b43fce0630aa70773e
17,812
py
Python
Knowledge Graphs/code/train.py
shravyagupta/BoltBio
28d10e0a22af69f389cc2320d1d5c558165ff185
[ "Apache-2.0" ]
null
null
null
Knowledge Graphs/code/train.py
shravyagupta/BoltBio
28d10e0a22af69f389cc2320d1d5c558165ff185
[ "Apache-2.0" ]
9
2021-11-16T05:22:45.000Z
2022-02-01T10:34:07.000Z
Knowledge Graphs/code/train.py
shravyagupta/BoltBio
28d10e0a22af69f389cc2320d1d5c558165ff185
[ "Apache-2.0" ]
3
2021-11-19T11:38:22.000Z
2022-01-10T09:29:16.000Z
import argparse import yaml import datetime if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("-c", "--config", type = str, required = True, help = 'path to config file') pars...
33.671078
189
0.515439
import argparse import yaml import datetime import os import torch import torch.nn.functional as F import wandb import random import numpy as np import utils import graph import dgl import models from dgl import DGLError from utils import pbar import torchmetrics import pickle as pkl class EmbCriterion(): def __i...
0
575
0
15,283
0
0
0
-67
400
17e56847093136b88693a5589e3a97a1dccbe751
1,169
py
Python
tests/test_text/test_base.py
mrtrkmn/yellowbrick
efd942063455f1c148c3c691d8100d726b09ac90
[ "Apache-2.0" ]
3,662
2016-05-19T19:16:28.000Z
2022-03-30T00:25:19.000Z
tests/test_text/test_base.py
mrtrkmn/yellowbrick
efd942063455f1c148c3c691d8100d726b09ac90
[ "Apache-2.0" ]
1,047
2016-05-18T15:20:59.000Z
2022-03-30T16:12:49.000Z
tests/test_text/test_base.py
mrtrkmn/yellowbrick
efd942063455f1c148c3c691d8100d726b09ac90
[ "Apache-2.0" ]
602
2016-05-18T15:02:35.000Z
2022-03-27T16:57:11.000Z
# tests.test_text.test_base # Tests for the text visualization base classes # # Author: Benjamin Bengfort # Created: Mon Feb 20 06:34:50 2017 -0500 # # Copyright (C) 2016 The scikit-yb developers # For license information, see LICENSE.txt # # ID: test_base.py [6aa9198] benjamin@bengfort.com $ """ Tests for the text...
29.974359
74
0.540633
# tests.test_text.test_base # Tests for the text visualization base classes # # Author: Benjamin Bengfort # Created: Mon Feb 20 06:34:50 2017 -0500 # # Copyright (C) 2016 The scikit-yb developers # For license information, see LICENSE.txt # # ID: test_base.py [6aa9198] benjamin@bengfort.com $ """ Tests for the text...
0
0
0
325
0
0
0
58
90
15613916ffc71646e56348b60ef0100a02307c60
538
py
Python
Max_product_subarray in Python/max_subarray.py
Hacktoberfest-2021/problem_on-_programming
1e041a8238d91e1fc27e20a8174fcaaf8ed40ded
[ "Apache-2.0" ]
null
null
null
Max_product_subarray in Python/max_subarray.py
Hacktoberfest-2021/problem_on-_programming
1e041a8238d91e1fc27e20a8174fcaaf8ed40ded
[ "Apache-2.0" ]
1
2021-10-04T08:31:37.000Z
2021-10-07T00:16:30.000Z
Max_product_subarray in Python/max_subarray.py
Hacktoberfest-2021/problem_on-_programming
1e041a8238d91e1fc27e20a8174fcaaf8ed40ded
[ "Apache-2.0" ]
3
2021-10-04T08:54:03.000Z
2021-10-07T04:32:23.000Z
# -*- coding: utf-8 -*- """ Created on Thu Oct 7 09:42:38 2021 @author: VISHAKHA V """ arr=list(map(int,input().split())) result=max_subarray_product(arr) print("The maximum sub_array product =",result) #Take the input as [6,-3,-10,0,2] if you want, then the output will be 180
18.551724
75
0.552045
# -*- coding: utf-8 -*- """ Created on Thu Oct 7 09:42:38 2021 @author: VISHAKHA V """ def max_subarray_product(arr): n=len(arr) res=arr[0] for i in range(n): m=arr[i] for j in range(i+1,n): res=max(m,res) m = m * arr[j] res=max(res,m) ...
0
0
0
0
0
230
0
0
23
202b8971ca0d5dd05229ac896ef2fad5cff12756
702
py
Python
QBG/DataLoader/tools/scripts/compress_intra_data.py
GYMS-PKU/Daily-Frequency-Quant
808eda9930efecff04ecf98abf617404cadd0003
[ "MIT" ]
3
2021-11-21T04:35:04.000Z
2022-03-04T09:19:53.000Z
QBG/DataLoader/tools/scripts/compress_intra_data.py
GYMS-PKU/Daily-Frequency-Quant
808eda9930efecff04ecf98abf617404cadd0003
[ "MIT" ]
null
null
null
QBG/DataLoader/tools/scripts/compress_intra_data.py
GYMS-PKU/Daily-Frequency-Quant
808eda9930efecff04ecf98abf617404cadd0003
[ "MIT" ]
5
2021-10-03T00:00:22.000Z
2022-03-07T09:02:00.000Z
# Copyright (c) 2022 Dai HBG """ 1 """ if __name__ == '__main__': main()
24.206897
103
0.618234
# Copyright (c) 2022 Dai HBG """ 该脚本用于将1分钟数据中不在市的部分删除 """ import os import pandas as pd def main(): data_path = 'D:/Documents/AutoFactoryData' intra_path = 'E:/Backups/AutoFactoryData/StockIntraDayData/1m' dates = os.listdir(intra_path) for date in dates: all_securities = pd.read_csv('{}/S...
57
0
0
0
0
546
0
-14
68
a3c5eb7f64ffed2be27901164c889f549988b7a6
6,123
py
Python
vision/nn/FairNAS_B.py
lippman1125/pytorch-ssd
d2c31b0d69e82ab2c46f2eecbbf9c12f3dd73309
[ "MIT" ]
15
2019-05-28T06:47:50.000Z
2021-02-21T18:16:46.000Z
vision/nn/FairNAS_B.py
lippman1125/pytorch-ssd
d2c31b0d69e82ab2c46f2eecbbf9c12f3dd73309
[ "MIT" ]
null
null
null
vision/nn/FairNAS_B.py
lippman1125/pytorch-ssd
d2c31b0d69e82ab2c46f2eecbbf9c12f3dd73309
[ "MIT" ]
6
2019-05-28T07:39:31.000Z
2021-02-21T18:16:52.000Z
import torch.nn as nn # class InvertedResidual(nn.Module): # def __init__(self, inp, oup, kernel_size, stride, expand_ratio): # super(InvertedResidual, self).__init__() # assert stride in [1, 2] # self.stride = stride # padding = kernel_size // 2 # hidden_dim = round(i...
34.016667
117
0.526049
import math import torch.nn as nn import torch.nn.functional as F def stem(inp, oup, stride): return nn.Sequential( nn.Conv2d(inp, oup, 3, stride, 1, bias=False), nn.BatchNorm2d(oup), nn.ReLU6(inplace=True) ) def separable_conv(inp, oup): return nn.Sequential( nn.Conv2d(...
0
0
0
4,215
0
550
0
0
159
0fb1c11e373b2420a9445fa755cd0d170d59f89e
3,707
py
Python
samples/core/get_started/premade_estimator.py
mumingwu/models
c439119e990784e5fd60b2adb869ee06663d7806
[ "Apache-2.0" ]
5
2018-05-30T03:14:00.000Z
2022-03-09T09:42:41.000Z
samples/core/get_started/premade_estimator.py
devzhui/models
4364390adbf16b57c093a05217897831f48da7d3
[ "Apache-2.0" ]
null
null
null
samples/core/get_started/premade_estimator.py
devzhui/models
4364390adbf16b57c093a05217897831f48da7d3
[ "Apache-2.0" ]
8
2020-04-14T13:46:54.000Z
2022-02-21T05:18:11.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
34.971698
79
0.691664
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
0
0
0
0
0
1,656
0
0
69
f84a2e516b70afc34fcba7bb626975d57d29a5d2
30,312
py
Python
degraph/entity.py
aljabr0/degraph
ac44a1c979da7605ed424853e7fef8ffa8790b27
[ "Apache-2.0" ]
31
2020-02-01T23:25:23.000Z
2021-11-16T07:24:03.000Z
degraph/entity.py
aljabr0/degraph
ac44a1c979da7605ed424853e7fef8ffa8790b27
[ "Apache-2.0" ]
null
null
null
degraph/entity.py
aljabr0/degraph
ac44a1c979da7605ed424853e7fef8ffa8790b27
[ "Apache-2.0" ]
4
2020-02-01T23:25:28.000Z
2020-02-27T04:41:18.000Z
from .model import TensorRef from typing import Sequence, Union, Callable, Tuple import tensorflow as tf from contextlib import nullcontext RBF_DEFAULT = 'gauss' TensorRefs = Union[Sequence[TensorRef], TensorRef] def tensor_refs_clone(refs: TensorRefs) -> TensorRefs: """ Clone a tensor ref or a sequenc...
39.366234
120
0.654097
from .types import StaticShape, RBF, Adjacency from .math import tf_hgrid_coords, hgrid_normalize, bezier_multi, tri_ones_lower, tf_repeat_1d from .math import piecewise_linear_curve_closest_pts from .math import random_uniform_hypersphere, mutual_sq_distances, gauss_rbf, rbf_factory, crbf_wendland_d3c2 from .config im...
0
16,409
0
11,445
0
0
0
383
816
8287ee5acde6360cef61dda364580736932901e4
3,397
py
Python
tests/test_driver.py
highlight-slm/Draytek-Web-Auto-Configuration
0b3e96b892fb332a1252fc231b30561b2374071f
[ "MIT" ]
null
null
null
tests/test_driver.py
highlight-slm/Draytek-Web-Auto-Configuration
0b3e96b892fb332a1252fc231b30561b2374071f
[ "MIT" ]
2
2020-02-13T07:41:55.000Z
2020-03-02T21:56:12.000Z
tests/test_driver.py
highlight-slm/Draytek-Web-Auto-Configuration
0b3e96b892fb332a1252fc231b30561b2374071f
[ "MIT" ]
2
2019-07-05T15:09:07.000Z
2021-09-06T23:50:33.000Z
# import unittest # from unittest.mock import patch # from selenium.common.exceptions import WebDriverException # from draytekwebadmin.driver import load_driver, unload_driver # class TestDriver(unittest.TestCase): # def setUp(self): # pass # def tearDown(self): # pass # @patch("seleniu...
43
88
0.707683
# import unittest # from unittest.mock import patch # from selenium.common.exceptions import WebDriverException # from draytekwebadmin.driver import load_driver, unload_driver # class TestDriver(unittest.TestCase): # def setUp(self): # pass # def tearDown(self): # pass # @patch("seleniu...
0
0
0
0
0
0
0
0
0
48eaecb36e577e897f08a2f2794bd1322961e4b1
3,689
py
Python
Models/Segmentation_Models/Unet2d_Vertebrae/utils/save_fig.py
BIMCV-CSUSP/BIMCV-MIDAS-PROJECT
ef7311873fc29416c7caa8babdf341c058404ec4
[ "CC-BY-4.0" ]
null
null
null
Models/Segmentation_Models/Unet2d_Vertebrae/utils/save_fig.py
BIMCV-CSUSP/BIMCV-MIDAS-PROJECT
ef7311873fc29416c7caa8babdf341c058404ec4
[ "CC-BY-4.0" ]
null
null
null
Models/Segmentation_Models/Unet2d_Vertebrae/utils/save_fig.py
BIMCV-CSUSP/BIMCV-MIDAS-PROJECT
ef7311873fc29416c7caa8babdf341c058404ec4
[ "CC-BY-4.0" ]
2
2021-07-14T09:59:16.000Z
2021-07-14T10:01:29.000Z
#! /usr/bin/python # -*- coding: utf8 -*- from __future__ import print_function # Description: """ plot or save MRI images / masks in a screenshot ------- Types of sequences in the data = ['Sag_T2' 'Sag_T1' 'Sag_Stir'] """ # Imports import numpy as np import numpy.ma as ma import matplotlib matplotlib.use('Agg') imp...
32.9375
124
0.596639
#! /usr/bin/python # -*- coding: utf8 -*- from __future__ import print_function # Description: """ plot or save MRI images / masks in a screenshot ------- Types of sequences in the data = ['Sag_T2' 'Sag_T1' 'Sag_Stir'] """ # Imports import os, time import glob import random import pandas as pd import numpy as np im...
0
0
0
0
0
1,160
0
-36
134
43402eb70cf833f3e370cecf3e2c8e835252e1a4
103
py
Python
src/hpp/corbaserver/romeo/__init__.py
florent-lamiraux/hpp_romeo
71ed7143e3ffe1eaeeeedb49b81f147fa2e18027
[ "BSD-2-Clause" ]
null
null
null
src/hpp/corbaserver/romeo/__init__.py
florent-lamiraux/hpp_romeo
71ed7143e3ffe1eaeeeedb49b81f147fa2e18027
[ "BSD-2-Clause" ]
null
null
null
src/hpp/corbaserver/romeo/__init__.py
florent-lamiraux/hpp_romeo
71ed7143e3ffe1eaeeeedb49b81f147fa2e18027
[ "BSD-2-Clause" ]
2
2018-12-19T15:19:16.000Z
2019-12-06T16:25:11.000Z
#!/usr/bin/env python # Copyright (c) 2014 CNRS # Author: Florent Lamiraux #
14.714286
26
0.718447
#!/usr/bin/env python # Copyright (c) 2014 CNRS # Author: Florent Lamiraux # from .robot import Robot
0
0
0
0
0
0
0
3
23