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
07cff5e353a948792c97d517dfb2d1b12e9696ae
1,641
py
Python
scripts/src/tools/validation.py
sujith-mn/cobigen
aaf4cd8b9efbc613df3aab8df4c9a39bea2a3851
[ "Apache-2.0" ]
null
null
null
scripts/src/tools/validation.py
sujith-mn/cobigen
aaf4cd8b9efbc613df3aab8df4c9a39bea2a3851
[ "Apache-2.0" ]
null
null
null
scripts/src/tools/validation.py
sujith-mn/cobigen
aaf4cd8b9efbc613df3aab8df4c9a39bea2a3851
[ "Apache-2.0" ]
null
null
null
import os import sys import git from tools.config import Config from tools.logger import log_error, log_info def exit_if_not_executed_in_ide_environment(): '''This part checks if environment variables is set or not.''' if not ("OSSRH_USER" and "OSSRH_PASSWD" and "GPG_SIGNING_PASSWD" and "BINTRAY_USER" and "...
36.466667
196
0.697136
import os import subprocess import sys import git from tools.config import Config from tools.logger import log_error, log_info def exit_if_not_executed_in_ide_environment(): '''This part checks if environment variables is set or not.''' if not ("OSSRH_USER" and "OSSRH_PASSWD" and "GPG_SIGNING_PASSWD" and "B...
0
0
0
0
0
521
0
-4
68
7c61c9f277706431518e5fec71389da38668f300
1,743
py
Python
server.py
mfojtak/decor
203979351635a6794c91200fca4a14296ec9bc37
[ "MIT" ]
1
2019-09-05T07:23:19.000Z
2019-09-05T07:23:19.000Z
server.py
mfojtak/decor
203979351635a6794c91200fca4a14296ec9bc37
[ "MIT" ]
2
2020-10-25T17:41:08.000Z
2020-10-26T16:48:19.000Z
server.py
mfojtak/deco
203979351635a6794c91200fca4a14296ec9bc37
[ "MIT" ]
null
null
null
#!/usr/bin/env python from flask import Flask, request, jsonify import numpy as np import deco import requests import csv import json import argparse parser = argparse.ArgumentParser(description='Exports keras model to serving format') parser.add_argument('--port', action="store", dest="port", default=4000) parser.add...
32.886792
96
0.688468
#!/usr/bin/env python from flask import Flask, request, jsonify import numpy as np import deco import requests import csv import json import argparse parser = argparse.ArgumentParser(description='Exports keras model to serving format') parser.add_argument('--port', action="store", dest="port", default=4000) parser.add...
0
302
0
0
55
399
0
0
69
abcccc4acff4d48a1d8fcdc1360e355627a270af
8,030
py
Python
logFileReplay-csv/send_csv_data_py3.py
xguoif/InsightAgent
2bda254a137265965475d2e426ee221e1345868c
[ "Apache-2.0" ]
22
2016-05-10T16:36:15.000Z
2022-03-28T13:15:35.000Z
logFileReplay-csv/send_csv_data_py3.py
xguoif/InsightAgent
2bda254a137265965475d2e426ee221e1345868c
[ "Apache-2.0" ]
33
2017-03-25T01:40:12.000Z
2022-03-22T21:41:26.000Z
logFileReplay-csv/send_csv_data_py3.py
xguoif/InsightAgent
2bda254a137265965475d2e426ee221e1345868c
[ "Apache-2.0" ]
131
2016-06-09T15:19:26.000Z
2021-11-30T06:06:21.000Z
import csv import time import json import urllib3 import importlib import sys import copy import arrow import pytz MAX_RETRY_NUM = 10 RETRY_WAIT_TIME_IN_SEC = 30 MAX_MESSAGE_LENGTH = 10000 MAX_DATA_SIZE = 4000000 MAX_PACKET_SIZE = 5000000 def send_data(log_data): """ Sends parsed metric data to InsightFinder """ ...
39.950249
136
0.586052
import csv import time import json import requests import urllib3 import importlib import sys import copy import arrow import os import pytz import configparser MAX_RETRY_NUM = 10 RETRY_WAIT_TIME_IN_SEC = 30 MAX_MESSAGE_LENGTH = 10000 MAX_DATA_SIZE = 4000000 MAX_PACKET_SIZE = 5000000 def get_agent_config_vars(): ...
0
0
0
0
0
5,026
0
-20
135
91621b40b97bb1b107b20ffb1e9e25cd01b5bc07
2,355
py
Python
Basic/fun/function_demo.py
exchris/Pythonlearn
174f38a86cf1c85d6fc099005aab3568e7549cd0
[ "MIT" ]
null
null
null
Basic/fun/function_demo.py
exchris/Pythonlearn
174f38a86cf1c85d6fc099005aab3568e7549cd0
[ "MIT" ]
1
2018-11-27T09:58:54.000Z
2018-11-27T09:58:54.000Z
Basic/fun/function_demo.py
exchris/pythonlearn
174f38a86cf1c85d6fc099005aab3568e7549cd0
[ "MIT" ]
null
null
null
# -*-coding:utf-8 -*- """ """ # # result = calulus(2) print(result) # def fruit_function(fruit1, fruit2): """ fruits = fruit1 + " " + fruit2 return fruits """ lst = []; lst.append(fruit1) lst.append(fruit2) return lst # result = fruit_function("apple", "banana") print(resu...
14.447853
62
0.534607
# -*-coding:utf-8 -*- """ 一个函数包括输入参数和输出参数 """ # 定义函数 def calulus(x): y = x + 1 return y # 调用函数 result = calulus(2) print(result) # 参数必须要正确地写入函数中,函数的参数也可以为多个 def fruit_function(fruit1, fruit2): """ fruits = fruit1 + " " + fruit2 return fruits """ lst = []; lst.append(fruit1) l...
447
0
0
0
0
958
0
0
289
f734f8778bf4b8e5ff157ae685a7c022d954b83a
1,502
py
Python
heat/engine/clients/os/aodh.py
noironetworks/heat
7cdadf1155f4d94cf8f967635b98e4012a7acfb7
[ "Apache-2.0" ]
1
2018-07-04T07:59:26.000Z
2018-07-04T07:59:26.000Z
heat/engine/clients/os/aodh.py
noironetworks/heat
7cdadf1155f4d94cf8f967635b98e4012a7acfb7
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
heat/engine/clients/os/aodh.py
noironetworks/heat
7cdadf1155f4d94cf8f967635b98e4012a7acfb7
[ "Apache-2.0" ]
3
2018-07-19T17:43:37.000Z
2019-11-15T22:13:30.000Z
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
30.04
78
0.699734
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
0
0
0
764
0
0
0
50
91
30a90bb1b61520bbe62cfd78a265d535fabc87db
9,827
py
Python
nmea2kfluxlite/nmea2kfluxlite.py
iotfablab/nmea2kfluxlite
940160f68cacdee6cd050bd8a63bc77757a67208
[ "MIT" ]
null
null
null
nmea2kfluxlite/nmea2kfluxlite.py
iotfablab/nmea2kfluxlite
940160f68cacdee6cd050bd8a63bc77757a67208
[ "MIT" ]
null
null
null
nmea2kfluxlite/nmea2kfluxlite.py
iotfablab/nmea2kfluxlite
940160f68cacdee6cd050bd8a63bc77757a67208
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse import asyncio import json import logging import os import socket import ssl import sys from queue import Queue import paho.mqtt.client as mqtt SERVER_ADDRESS = ('localhost', 2598) # Logging Configuration logging.basicConfig(level=logging.INFO, stream=sys.stdout) logger = loggi...
39.465863
149
0.566399
#!/usr/bin/env python3 import argparse import asyncio import json import logging import os import socket import ssl import sys import time from queue import Queue import paho.mqtt.client as mqtt SERVER_ADDRESS = ('localhost', 2598) # Logging Configuration logging.basicConfig(level=logging.INFO, stream=sys.stdout) lo...
0
0
4,887
0
0
0
0
-10
68
a1b39fcace9b599b3f0e5d9b67a39f6838550bd5
6,726
py
Python
Extracting Targeted Tweets.py
narmin24/UTrack
68d281bc59b2de52eb769c1fdad39aa94a6c497e
[ "MIT" ]
4
2021-06-14T20:46:08.000Z
2022-02-14T07:24:14.000Z
Extracting Targeted Tweets.py
narmin24/UTrack
68d281bc59b2de52eb769c1fdad39aa94a6c497e
[ "MIT" ]
null
null
null
Extracting Targeted Tweets.py
narmin24/UTrack
68d281bc59b2de52eb769c1fdad39aa94a6c497e
[ "MIT" ]
5
2021-06-14T07:37:06.000Z
2021-07-06T07:07:14.000Z
#!/usr/bin/env python # coding: utf-8 # In[ ]: import tweepy import pandas as pd import webbrowser # In[ ]: key = "VEyxpXLGHG9USYhM7spHVKl36" secret = "FG61nlBuLR7mb6UCPGxHH4UdMqwYNwL6aFhDt9gQJcaChblOkL" callback_url = "oob" auth = tweepy.OAuthHandler(key, secret, callback_url) redirect_url = auth.get_authorizat...
25.869231
145
0.608683
#!/usr/bin/env python # coding: utf-8 # In[ ]: import tweepy import pandas as pd import numpy as np import webbrowser import time from tweepy import OAuthHandler import json import csv import re import string import os # In[ ]: key = "VEyxpXLGHG9USYhM7spHVKl36" secret = "FG61nlBuLR7mb6UCPGxHH4UdMqwYNwL6aFhDt9gQJ...
6
0
0
0
0
3,645
0
-56
222
5f0ad559628e9ed1c7c9a05fb15e31281a2a97e3
2,204
py
Python
src/genie/libs/parser/slxos/tests/ShowVersion/cli/equal/golden_output1_expected.py
fpessoanunes/genieparser
8597aae1799f8a540214d6dbcfd545d2ebe369e4
[ "Apache-2.0" ]
null
null
null
src/genie/libs/parser/slxos/tests/ShowVersion/cli/equal/golden_output1_expected.py
fpessoanunes/genieparser
8597aae1799f8a540214d6dbcfd545d2ebe369e4
[ "Apache-2.0" ]
null
null
null
src/genie/libs/parser/slxos/tests/ShowVersion/cli/equal/golden_output1_expected.py
fpessoanunes/genieparser
8597aae1799f8a540214d6dbcfd545d2ebe369e4
[ "Apache-2.0" ]
null
null
null
expected_output = { "version": { "build_time": "08:13:43 Apr 7, 2021", "firmware_ver": "18r.1.00h", "install_time": "07:14:32 Jun 1, 2021", "slot": { "L1/0": { "name": "L1/0", "primary_ver": "18r.1.00h", "secondary_ver": "...
31.042254
53
0.329855
expected_output = { "version": { "build_time": "08:13:43 Apr 7, 2021", "firmware_ver": "18r.1.00h", "install_time": "07:14:32 Jun 1, 2021", "slot": { "L1/0": { "name": "L1/0", "primary_ver": "18r.1.00h", "secondary_ver": "...
0
0
0
0
0
0
0
0
0
9e96c8bf96a1408e84578c9d71e9a7bf5501c905
519
py
Python
ipster/command_line.py
i5ar/ipster
ec82782e2dafe4ddf4ea70fb554fc7ff5c3f28de
[ "MIT" ]
4
2018-08-13T04:33:32.000Z
2021-05-24T21:03:09.000Z
ipster/command_line.py
i5ar/ipster
ec82782e2dafe4ddf4ea70fb554fc7ff5c3f28de
[ "MIT" ]
1
2017-10-08T23:45:19.000Z
2017-10-08T23:45:19.000Z
ipster/command_line.py
i5ar/ipster
ec82782e2dafe4ddf4ea70fb554fc7ff5c3f28de
[ "MIT" ]
null
null
null
def main(): """Generate reStructuredText README from Markdown. The ``main()`` function is also registered in the setup entry points. Convertion example:: import ipster.command_line ipster.command_line.main() """ readme_in = 'README.md' readme_out = 'README.rst' try: ...
25.95
73
0.622351
def main(): """Generate reStructuredText README from Markdown. The ``main()`` function is also registered in the setup entry points. Convertion example:: import ipster.command_line ipster.command_line.main() """ readme_in = 'README.md' readme_out = 'README.rst' try: ...
0
0
0
0
0
0
0
0
0
ee4b4c589f802aa2f5083facb8a99d6b6b9cbcf2
4,425
py
Python
src/win_maximize/__init__.py
alkuzad/win-maximize-python
9098143297d3e026126b0f8dd3e6925539841671
[ "MIT" ]
2
2018-07-16T01:47:59.000Z
2021-05-17T05:15:19.000Z
src/win_maximize/__init__.py
alkuzad/win-maximize-python
9098143297d3e026126b0f8dd3e6925539841671
[ "MIT" ]
null
null
null
src/win_maximize/__init__.py
alkuzad/win-maximize-python
9098143297d3e026126b0f8dd3e6925539841671
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Thanks to https://github.com/ritchielawrence/cmdow # For providing help for treating Win32 API import os from win_maximize.parent_tree import parent_tree CURRENT_PROCESS_TREE = parent_tree(os.getpid()) if __name__ == "__main__": main()
26.981707
85
0.620791
#!/usr/bin/env python # Thanks to https://github.com/ritchielawrence/cmdow # For providing help for treating Win32 API import re import os from argparse import ArgumentParser import win32gui import win32api import win32console import win32process from win32com.client import GetObject from win_maximize.parent_tree ...
0
105
0
2,695
0
1,052
0
2
295
bc9d84411558123a05436a09a0577c76e61e4e5b
140
py
Python
scorecard/templatetags/jsonify.py
desafinadude/municipal-data
1c86c55bbb59f9c8087f6920fae3585dd90d5d43
[ "MIT" ]
19
2018-01-09T10:54:15.000Z
2022-01-25T13:10:55.000Z
wazimap/templatetags/jsonify.py
ChrisAchinga/wazimap
a66a1524030a8b98e7ea0dfb270d1946ca75b3b2
[ "MIT" ]
66
2016-02-15T08:59:29.000Z
2017-09-21T14:00:43.000Z
wazimap/templatetags/jsonify.py
ChrisAchinga/wazimap
a66a1524030a8b98e7ea0dfb270d1946ca75b3b2
[ "MIT" ]
18
2017-10-06T12:26:37.000Z
2021-08-30T01:38:37.000Z
from django import template register = template.Library()
12.727273
29
0.757143
import json from django import template register = template.Library() @register.filter def jsonify(value): return json.dumps(value)
0
44
0
0
0
0
0
-10
45
5c14d9e82c29d05157bdb01e42172d98f68b5601
73
py
Python
raccgen/__init__.py
michaelpeterswa/raccgen
389bcb3c34b137f74b5b7bf6c2e2e07aa77d6feb
[ "MIT" ]
null
null
null
raccgen/__init__.py
michaelpeterswa/raccgen
389bcb3c34b137f74b5b7bf6c2e2e07aa77d6feb
[ "MIT" ]
null
null
null
raccgen/__init__.py
michaelpeterswa/raccgen
389bcb3c34b137f74b5b7bf6c2e2e07aa77d6feb
[ "MIT" ]
null
null
null
from raccgen import generate build = generate.build pair = generate.racc
18.25
28
0.808219
from raccgen import generate build = generate.build pair = generate.racc
0
0
0
0
0
0
0
0
0
e7ba4f2dc1ca119416d3cf36c7b42ba7a67d180e
1,632
py
Python
app/api/models.py
tarp20/testapi
7109b7189f535d5f983df7f643e6bfe712fff6b1
[ "MIT" ]
null
null
null
app/api/models.py
tarp20/testapi
7109b7189f535d5f983df7f643e6bfe712fff6b1
[ "MIT" ]
null
null
null
app/api/models.py
tarp20/testapi
7109b7189f535d5f983df7f643e6bfe712fff6b1
[ "MIT" ]
null
null
null
# def validate_color(color): # match = re.search(r'^#(?:[0-9a-fA-F]{3}){1,2}$', color) # if match == False: # raise ValidationError( # _('%(color)s is not an even number'), # params={'color': color}, # )
41.846154
113
0.509804
from django.db import models from django.core.exceptions import ValidationError from django.core.validators import MaxValueValidator, MinValueValidator import uuid # def validate_color(color): # match = re.search(r'^#(?:[0-9a-fA-F]{3}){1,2}$', color) # if match == False: # raise ValidationError( # ...
0
0
0
1,190
0
0
0
76
111
4f8ae9451d8fd3bb3e31eb0b951eb9a25edaf19e
2,223
py
Python
wolframclient/language/__init__.py
jldohmann/WolframClientForPython
15cb8ba21f8a08ab17f041f2cbf46ae165e64004
[ "MIT" ]
358
2018-10-18T13:39:48.000Z
2022-03-26T09:42:53.000Z
wolframclient/language/__init__.py
jldohmann/WolframClientForPython
15cb8ba21f8a08ab17f041f2cbf46ae165e64004
[ "MIT" ]
29
2018-10-20T09:04:12.000Z
2022-03-06T18:36:19.000Z
wolframclient/language/__init__.py
jldohmann/WolframClientForPython
15cb8ba21f8a08ab17f041f2cbf46ae165e64004
[ "MIT" ]
38
2018-10-19T21:52:14.000Z
2021-11-21T13:07:04.000Z
from __future__ import absolute_import, print_function, unicode_literals from wolframclient.language.expression import WLInputExpression, WLSymbolFactory wl = WLSymbolFactory() """A factory of :class:`~wolframclient.language.expression.WLSymbol` instances without any particular context. This instance of :class:`~wol...
26.464286
110
0.732344
from __future__ import absolute_import, print_function, unicode_literals from wolframclient.language.expression import WLInputExpression, WLSymbolFactory wl = WLSymbolFactory() """A factory of :class:`~wolframclient.language.expression.WLSymbol` instances without any particular context. This instance of :class:`~wol...
0
0
0
0
0
0
0
0
0
cb1b921d4aab5f39482998b9f5ac2b12152dfbff
803
py
Python
src/alchemtest/namd/access.py
harlor/alchemtest
9a126e256d538bcffd0cb4e0ca5bccc60ca3a2ab
[ "BSD-3-Clause" ]
null
null
null
src/alchemtest/namd/access.py
harlor/alchemtest
9a126e256d538bcffd0cb4e0ca5bccc60ca3a2ab
[ "BSD-3-Clause" ]
null
null
null
src/alchemtest/namd/access.py
harlor/alchemtest
9a126e256d538bcffd0cb4e0ca5bccc60ca3a2ab
[ "BSD-3-Clause" ]
null
null
null
"""Accessors for NAMD FEP datasets. """ from os.path import dirname, join from glob import glob from .. import Bunch def load_tyr2ala(): """Load the NAMD tyrosine to alanine mutation dataset. Returns ------- data : Bunch Dictionary-like object, the interesting attributes are: - 'da...
24.333333
89
0.637609
"""Accessors for NAMD FEP datasets. """ from os.path import dirname, join from glob import glob from .. import Bunch def load_tyr2ala(): """Load the NAMD tyrosine to alanine mutation dataset. Returns ------- data : Bunch Dictionary-like object, the interesting attributes are: - 'da...
0
0
0
0
0
0
0
0
0
c421dcaf714881c080bc10b4974cf75fa47ce8fb
1,441
py
Python
ta/ex00.py
stormabq/python-examples
1c1acfc3863a2cf1a9e202c9299f3a526858eb34
[ "MIT" ]
1
2021-12-12T04:39:53.000Z
2021-12-12T04:39:53.000Z
ta/ex00.py
stormabq/python-examples
1c1acfc3863a2cf1a9e202c9299f3a526858eb34
[ "MIT" ]
null
null
null
ta/ex00.py
stormabq/python-examples
1c1acfc3863a2cf1a9e202c9299f3a526858eb34
[ "MIT" ]
6
2020-05-05T17:21:28.000Z
2021-12-12T04:39:57.000Z
import pandas as pd import ta # Load data df = pd.read_csv('ui.csv', sep=',') # Clean nan values df = ta.utils.dropna(df) print('roc') print(ta.momentum.roc(close=df['close']),40) print('-----------------------------------') print('rsi') print(ta.momentum.rsi(close=df['close']),14) print('---------------------------...
32.75
58
0.519084
import pandas as pd import ta # Load data df = pd.read_csv('ui.csv', sep=',') # Clean nan values df = ta.utils.dropna(df) print('roc') print(ta.momentum.roc(close=df['close']),40) print('-----------------------------------') print('rsi') print(ta.momentum.rsi(close=df['close']),14) print('---------------------------...
0
0
0
0
0
0
0
0
0
6769e1e59f92f6cd5ed42e6c26ee0c30a14a3f22
172
py
Python
tempest/lis/core/__init__.py
paulaCrismaru/lis-tempest
4f142db3967971ee42c4fcff01be363bbdc4bc54
[ "Apache-2.0" ]
3
2016-07-15T12:27:23.000Z
2021-04-23T04:41:10.000Z
tempest/lis/core/__init__.py
LIS/lis-tempest
8e6403b2d6de81c5d18ed867b4977385c8278b75
[ "Apache-2.0" ]
null
null
null
tempest/lis/core/__init__.py
LIS/lis-tempest
8e6403b2d6de81c5d18ed867b4977385c8278b75
[ "Apache-2.0" ]
12
2016-07-14T18:13:05.000Z
2017-07-08T18:45:42.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: dpaslaru # @Date: 2014-09-17 18:36:03 # @Last Modified by: dpaslaru # @Last Modified time: 2014-09-17 19:40:59
24.571429
42
0.633721
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: dpaslaru # @Date: 2014-09-17 18:36:03 # @Last Modified by: dpaslaru # @Last Modified time: 2014-09-17 19:40:59
0
0
0
0
0
0
0
0
0
70900508a650ccd05650ec5b2b46870f0bbe66a7
16,187
py
Python
includes/snv-indels/scripts/vcf2json.py
Miachol/hamlet
86c180179053be624b572a0cc1e53769835eb298
[ "MIT" ]
3
2020-08-03T20:35:40.000Z
2020-11-19T05:42:16.000Z
includes/snv-indels/scripts/vcf2json.py
Miachol/hamlet
86c180179053be624b572a0cc1e53769835eb298
[ "MIT" ]
16
2020-06-05T17:12:16.000Z
2022-02-16T13:30:09.000Z
includes/snv-indels/scripts/vcf2json.py
Miachol/hamlet
86c180179053be624b572a0cc1e53769835eb298
[ "MIT" ]
2
2020-12-07T08:04:07.000Z
2021-12-26T04:01:51.000Z
#!/usr/bin/env python3 """ Script for extracting a JSON payload for plotting from VarScan VCF files annotated with VEP. Only samples with calls are returned. If a file containing Ensembl IDs (one per line) is supplied, only records associated with the IDs are returned. Requirements: * Python 3.x * PyVCF 0.6...
37.731935
79
0.587756
#!/usr/bin/env python3 """ Script for extracting a JSON payload for plotting from VarScan VCF files annotated with VEP. Only samples with calls are returned. If a file containing Ensembl IDs (one per line) is supplied, only records associated with the IDs are returned. Requirements: * Python 3.x * PyVCF 0.6...
0
2,425
0
0
0
2,283
0
-37
238
47d67142613ed882df35f538e398488908619d7e
2,487
py
Python
simuvex/procedures/cgc/receive.py
praetorian-inc/simuvex
7984bc4432a1c2126e6f2eb963c935e9f6a98da5
[ "BSD-2-Clause" ]
8
2016-01-19T03:13:32.000Z
2020-11-03T09:30:05.000Z
simuvex/procedures/cgc/receive.py
praetorian-inc/simuvex
7984bc4432a1c2126e6f2eb963c935e9f6a98da5
[ "BSD-2-Clause" ]
null
null
null
simuvex/procedures/cgc/receive.py
praetorian-inc/simuvex
7984bc4432a1c2126e6f2eb963c935e9f6a98da5
[ "BSD-2-Clause" ]
3
2017-04-24T00:22:30.000Z
2020-11-03T09:30:06.000Z
from itertools import count fastpath_data_counter = count()
42.87931
109
0.593486
import simuvex from itertools import count fastpath_data_counter = count() class receive(simuvex.SimProcedure): #pylint:disable=arguments-differ def run(self, fd, buf, count, rx_bytes): if self.state.mode == 'fastpath': # Special case for CFG generation if not self.state.se.s...
0
0
0
2,309
0
0
0
49
68
48e0c754ff8bfff8020c330d75e068d0bec374f6
871
py
Python
perif.py
AlanTurist/Prefecture_Greece_covid19
1879080428c749a1df0e1e26f7f540e31ef0a01b
[ "MIT" ]
1
2020-04-15T10:22:49.000Z
2020-04-15T10:22:49.000Z
perif.py
AlanTurist/Prefecture_Greece_covid19
1879080428c749a1df0e1e26f7f540e31ef0a01b
[ "MIT" ]
null
null
null
perif.py
AlanTurist/Prefecture_Greece_covid19
1879080428c749a1df0e1e26f7f540e31ef0a01b
[ "MIT" ]
null
null
null
import datetime data = datetime.datetime.now() data1 = data.strftime("%d-%m-%Y %H:%M:%S") import pandas as pd url = 'https://raw.githubusercontent.com/AlanTurist/Greece_covid19/master/region_greece.csv' df = pd.read_csv(url,index_col=0, sep=",")
33.5
92
0.603904
import datetime data = datetime.datetime.now() data1 = data.strftime("%d-%m-%Y %H:%M:%S") import pandas as pd url = 'https://raw.githubusercontent.com/AlanTurist/Greece_covid19/master/region_greece.csv' df = pd.read_csv(url,index_col=0, sep=",") def regione(reg, x, y): reg1 = df.iloc[x] D1 = reg1['CASES'] ...
258
0
0
0
0
473
0
0
23
0e86bb35579ae55e6b4845a4183b318b0e4e0293
2,273
py
Python
Python Programming Advanced/Lambda functions-111.py
vipmunot/Data-Analysis-using-Python
34586d8cbbc336508c4a7a68abe14944f1096252
[ "MIT" ]
null
null
null
Python Programming Advanced/Lambda functions-111.py
vipmunot/Data-Analysis-using-Python
34586d8cbbc336508c4a7a68abe14944f1096252
[ "MIT" ]
null
null
null
Python Programming Advanced/Lambda functions-111.py
vipmunot/Data-Analysis-using-Python
34586d8cbbc336508c4a7a68abe14944f1096252
[ "MIT" ]
null
null
null
## 1. String Manipulation ## hello = "hello world"[0:5] foo = "some string" password = "password" print(foo[5:11]) # Your code goes here fifth = password[4] last_four = password[len(password)-4:] ## 2. Omitting starting or ending indices ## hello = "hello world"[:5] foo = "some string" print(foo[5:]) my_string = ...
22.959596
95
0.679278
## 1. String Manipulation ## hello = "hello world"[0:5] foo = "some string" password = "password" print(foo[5:11]) # Your code goes here fifth = password[4] last_four = password[len(password)-4:] ## 2. Omitting starting or ending indices ## hello = "hello world"[:5] foo = "some string" print(foo[5:]) my_string = ...
0
0
0
0
0
216
0
0
67
167f00a31ad041b0803343ed27abb9b05a784302
1,018
py
Python
misc/count_tags.py
kxxt/taichi
15f39b79c258080f1e34fcbdc29646d9ced0a4fe
[ "MIT" ]
11,699
2020-01-09T03:02:46.000Z
2022-03-31T20:59:08.000Z
misc/count_tags.py
kxxt/taichi
15f39b79c258080f1e34fcbdc29646d9ced0a4fe
[ "MIT" ]
3,589
2020-01-09T03:18:25.000Z
2022-03-31T19:06:42.000Z
misc/count_tags.py
kxxt/taichi
15f39b79c258080f1e34fcbdc29646d9ced0a4fe
[ "MIT" ]
1,391
2020-01-09T03:02:54.000Z
2022-03-31T08:44:29.000Z
from git import Repo commits = list(Repo('.').iter_commits('master')) authors = {} notable = {} changelog = {} for i, c in enumerate(commits): s = c.summary tags = [] while s[0] == '[': r = s.find(']') tag = s[1:r] tags.append(tag) s = s[r + 1:] s = s.strip() ...
19.960784
63
0.524558
import os import sys from git import Repo commits = list(Repo('.').iter_commits('master')) authors = {} notable = {} changelog = {} for i, c in enumerate(commits): s = c.summary tags = [] while s[0] == '[': r = s.find(']') tag = s[1:r] tags.append(tag) s = s[r + 1:] ...
0
0
0
0
0
221
0
-23
67
ce46e68bfdd8312ac30c4c78fa9111dd69d532f5
145,663
py
Python
evermotion_dataset/_dataset_config.py
akx/ml-hypersim
9bf9a55e1189fe92147dc64386b244c07195e3b7
[ "AML" ]
2
2021-04-19T09:18:32.000Z
2021-08-25T15:02:51.000Z
evermotion_dataset/_dataset_config.py
lingjie0206/ml-hypersim
2408fbafe580246108585f9c46780dc62f284cfc
[ "AML" ]
null
null
null
evermotion_dataset/_dataset_config.py
lingjie0206/ml-hypersim
2408fbafe580246108585f9c46780dc62f284cfc
[ "AML" ]
1
2020-12-20T08:06:38.000Z
2020-12-20T08:06:38.000Z
# do not import pylab, because this file may need to be loaded from Python environments that don't necessarily have access to pylab # from pylab import * import os scenes = [] # # Archinteriors volumes 00-09 # scenes.append({"name": "ai_001_001", "archive_file": "AI1_001.rar", "asset_fil...
206.90767
280
0.558062
# do not import pylab, because this file may need to be loaded from Python environments that don't necessarily have access to pylab # from pylab import * import os scenes = [] # # Archinteriors volumes 00-09 # scenes.append({"name": "ai_001_001", "archive_file": "AI1_001.rar", "asset_fil...
0
0
0
0
0
0
0
0
0
a4ab0611baac1f8c650c351abe6d91f27e0b3686
9,529
py
Python
source/multi_translation.py
wasiahmad/SumGenToBT
84cc82a23c3207811a6b17dfd408570e94009c29
[ "MIT" ]
1
2022-02-25T11:19:35.000Z
2022-02-25T11:19:35.000Z
source/multi_translation.py
wasiahmad/SumGenToBT
84cc82a23c3207811a6b17dfd408570e94009c29
[ "MIT" ]
null
null
null
source/multi_translation.py
wasiahmad/SumGenToBT
84cc82a23c3207811a6b17dfd408570e94009c29
[ "MIT" ]
null
null
null
import logging EVAL_BLEU_ORDER = 4 logger = logging.getLogger(__name__)
47.173267
97
0.579809
import json import logging from argparse import Namespace import numpy as np from fairseq import metrics, search, utils from fairseq.data import encoders from fairseq.tasks import register_task from fairseq.tasks.translation_multi_simple_epoch import TranslationMultiSimpleEpochTask from fairseq.sequence_generator impo...
0
9,105
0
0
0
0
0
149
200
636d3e6970a2911262446ae2f61a792877d42005
722
py
Python
timemachines/skatertools/tuning/hyperplot.py
iklasky/timemachines
1820fa9453d31d4daaeff75274a935c7455febe3
[ "MIT" ]
253
2021-01-08T17:33:30.000Z
2022-03-21T17:32:36.000Z
timemachines/skatertools/tuning/hyperplot.py
iklasky/timemachines
1820fa9453d31d4daaeff75274a935c7455febe3
[ "MIT" ]
65
2021-01-20T16:43:35.000Z
2022-03-30T19:07:22.000Z
timemachines/skatertools/tuning/hyperplot.py
iklasky/timemachines
1820fa9453d31d4daaeff75274a935c7455febe3
[ "MIT" ]
28
2021-02-04T14:58:30.000Z
2022-01-17T04:35:17.000Z
import numpy as np import matplotlib.pyplot as plt # TODO def mesh2d_(f,*args): """ Plot function taking len 2 vector as single argument f(xs) """ mesh2d(g,*args) def mesh2d(f,*args): """ Plot function taking two arguments f(x,y) """ fig = plt.figure() ax = fig.add_sub...
21.878788
81
0.569252
import numpy as np import matplotlib.pyplot as plt # TODO def mesh2d_(f,*args): """ Plot function taking len 2 vector as single argument f(xs) """ def g(x,y,*args): return f(np.array([x,y]),*args) mesh2d(g,*args) def mesh2d(f,*args): """ Plot function taking two arguments ...
0
0
0
0
0
36
0
0
26
74ef960b68aa3ee63dede0d921c360b162415b73
8,151
py
Python
scripts/pipeline.py
STASYA00/CityMorph
18b8273a1ae0a4e8f234850d0c98640a2483ab04
[ "MIT" ]
null
null
null
scripts/pipeline.py
STASYA00/CityMorph
18b8273a1ae0a4e8f234850d0c98640a2483ab04
[ "MIT" ]
null
null
null
scripts/pipeline.py
STASYA00/CityMorph
18b8273a1ae0a4e8f234850d0c98640a2483ab04
[ "MIT" ]
null
null
null
import argparse import sys import textwrap sys.path.append('scripts/') from writer import CsvWriter if __name__ == '__main__': parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, description=textwrap.dedent('''\ USAGE: python pipeline.py area.shp ------------...
29.857143
94
0.692921
import argparse import geopandas as gpd import pandas as pd from shapely.geometry import MultiPolygon import sys import textwrap sys.path.append('scripts/') from config import METRICS, CANVAS, PROCESS_METRICS from grid import Grid, CellCalculator from metrics import Metric, CMetric, ClusterNumberMetric, MinimumCluster...
0
0
0
5,931
0
0
0
251
360
418d0b0ea38c4e1b4bf7c1794137c506f0d9cef0
1,206
py
Python
django_pg/utils/types.py
OlgaBorisova/django-pgfields
fc21efc116d017f1bf75c88fa3502cc23f8923b3
[ "BSD-3-Clause" ]
1
2015-03-26T09:34:32.000Z
2015-03-26T09:34:32.000Z
django_pg/utils/types.py
elbaschid/django-pgfields
37915b92349c392ed4980d255225e991be3463d6
[ "BSD-3-Clause" ]
null
null
null
django_pg/utils/types.py
elbaschid/django-pgfields
37915b92349c392ed4980d255225e991be3463d6
[ "BSD-3-Clause" ]
1
2018-10-23T21:31:29.000Z
2018-10-23T21:31:29.000Z
from __future__ import absolute_import, unicode_literals # Taken from the following StackOverflow answer: # http://stackoverflow.com/a/3703727/199176 SELECT_TYPES_SQL = """ SELECT n.nspname as schema, t.typname as type FROM pg_type t LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace W...
30.923077
75
0.645937
from __future__ import absolute_import, unicode_literals # Taken from the following StackOverflow answer: # http://stackoverflow.com/a/3703727/199176 SELECT_TYPES_SQL = """ SELECT n.nspname as schema, t.typname as type FROM pg_type t LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace W...
0
0
0
0
0
0
0
0
0
36ed4f804e7a5a401d8cba82007181d48fabe4e7
2,909
py
Python
twder/api.py
kenit/twder
9169f6af2a150e09d980568e15f813211f71fe8a
[ "MIT" ]
null
null
null
twder/api.py
kenit/twder
9169f6af2a150e09d980568e15f813211f71fe8a
[ "MIT" ]
null
null
null
twder/api.py
kenit/twder
9169f6af2a150e09d980568e15f813211f71fe8a
[ "MIT" ]
null
null
null
from re import match __CURRENT_QUOTE_URL = "http://rate.bot.com.tw/xrt?Lang=zh-TW" __HISTORY_QUOTE_URL_PATTERN = "http://rate.bot.com.tw/xrt/quote/{range}/{currency}" __NAME_DICT = {} def now_all(): """ :rtype: dict """ ret = {} tree = __parse_tree(__CURRENT_QUOTE_URL) table = tree.xpath(u'...
23.650407
88
0.625645
from re import match from io import BytesIO from lxml import etree from urllib import request __CURRENT_QUOTE_URL = "http://rate.bot.com.tw/xrt?Lang=zh-TW" __HISTORY_QUOTE_URL_PATTERN = "http://rate.bot.com.tw/xrt/quote/{range}/{currency}" __NAME_DICT = {} def __parse_tree(url): contents = request.urlopen(url).r...
357
0
0
0
0
622
0
7
112
0df083d0d22b89cb0d0b55987105259b56d27408
819
py
Python
preprocess.py
microbo-ru/sber_zvuk
bc81b98ed968fc5dfb8bfc64098754a216890256
[ "MIT" ]
1
2021-10-31T08:56:00.000Z
2021-10-31T08:56:00.000Z
preprocess.py
microbo-ru/sber_zvuk
bc81b98ed968fc5dfb8bfc64098754a216890256
[ "MIT" ]
11
2021-10-30T12:23:41.000Z
2021-10-31T14:14:26.000Z
preprocess.py
microbo-ru/sber_zvuk
bc81b98ed968fc5dfb8bfc64098754a216890256
[ "MIT" ]
null
null
null
# split("D://hackathon_part_1.mp4", "D:/datasets/")
24.818182
79
0.732601
from moviepy.editor import * import os def split(video_path, save_path): original_video = VideoFileClip(video_path) audio_clip = original_video.audio audio_clip.write_audiofile( os.path.join(save_path, "extracted_audio.wav"), codec='pcm_s16le') audio_clip.close() muted_video = o...
16
0
0
0
0
671
0
-5
90
ac747ae69c9cc8973936876daf8baeae5d77a9d6
961
py
Python
python/kyu-6/stop-spinning-words/stop_gninnips_my_sdrow.py
ledwindra/codewars
0552669a69e801cfe5f9a3696a4d98be63a96951
[ "WTFPL" ]
1
2020-11-13T16:55:04.000Z
2020-11-13T16:55:04.000Z
python/kyu-6/stop-spinning-words/stop_gninnips_my_sdrow.py
ledwindra/codewars
0552669a69e801cfe5f9a3696a4d98be63a96951
[ "WTFPL" ]
1
2020-01-28T15:48:17.000Z
2020-01-28T15:48:17.000Z
python/kyu-6/stop-spinning-words/stop_gninnips_my_sdrow.py
ledwindra/codewars
0552669a69e801cfe5f9a3696a4d98be63a96951
[ "WTFPL" ]
null
null
null
def spin_words(sentence=None): """ Description: Write a function that takes in a string of one or more words, and returns the same string, but with all five or more letter words reversed (Just like the name of this Kata). Strings passed in will consist of only letters and spaces. Spaces will ...
33.137931
117
0.636837
def spin_words(sentence=None): """ Description: Write a function that takes in a string of one or more words, and returns the same string, but with all five or more letter words reversed (Just like the name of this Kata). Strings passed in will consist of only letters and spaces. Spaces will ...
0
0
0
0
0
0
0
0
0
7692241d716c49819bb92a649836684c9879bfda
12,196
py
Python
libraries/galaxy/adapter.py
mainulhossain/phenowl
b187db737d501d679c8f3c140cc90bd84f5c2093
[ "MIT" ]
null
null
null
libraries/galaxy/adapter.py
mainulhossain/phenowl
b187db737d501d679c8f3c140cc90bd84f5c2093
[ "MIT" ]
null
null
null
libraries/galaxy/adapter.py
mainulhossain/phenowl
b187db737d501d679c8f3c140cc90bd84f5c2093
[ "MIT" ]
null
null
null
#gi = GalaxyInstance(url='http://sr-p2irc-big8.usask.ca:8080', key='7483fa940d53add053903042c39f853a') # r = toolClient.run_tool('a799d38679e985db', 'toolshed.g2.bx.psu.edu/repos/devteam/fastq_groomer/fastq_groomer/1.0.4', params) #=============================================================================== # ru...
31.191816
146
0.602001
from bioblend.galaxy import GalaxyInstance from bioblend.galaxy.histories import HistoryClient from bioblend.galaxy.libraries import LibraryClient from bioblend.galaxy.tools import ToolClient from bioblend.galaxy.datasets import DatasetClient from bioblend.galaxy.jobs import JobsClient from urllib.parse import urlpars...
0
0
0
0
0
8,367
0
143
1,458
8e73c495873dcd76ae405e957e60f389cf05d699
5,530
py
Python
src/modules/go_pwdb/test_cli.py
woza/exobrain
cd2f651de1190078a7bfdd6bd199377108b105d0
[ "MIT" ]
null
null
null
src/modules/go_pwdb/test_cli.py
woza/exobrain
cd2f651de1190078a7bfdd6bd199377108b105d0
[ "MIT" ]
null
null
null
src/modules/go_pwdb/test_cli.py
woza/exobrain
cd2f651de1190078a7bfdd6bd199377108b105d0
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import argparse import sys # Process args and build conf, expectations parser = argparse.ArgumentParser(description="Exobrain Test CLI") parser.add_argument("--key", required=True) parser.add_argument("--cert", required=True) parser.add_argument("--ca", required=True) parser.add_argument(...
31.420455
101
0.590235
#!/usr/bin/python3 import struct import time import argparse import ssl import socket import sys import os from concurrent.futures import ProcessPoolExecutor class TestFail (Exception): pass def get_all( src, todo ): ret = src.recv(todo) while len(ret) < todo: chunk = src.recv(todo-len(ret)) ...
0
0
0
2,527
0
1,682
0
-20
271
ab1589fdb33dfd7a795e75dae9a2fcefbce12c1d
133,284
py
Python
src/oci/mysql/db_system_client.py
CentroidChef/oci-python-sdk
fa406e27a52b40c70e220c20f52dfe2abe6236a3
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/mysql/db_system_client.py
CentroidChef/oci-python-sdk
fa406e27a52b40c70e220c20f52dfe2abe6236a3
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/mysql/db_system_client.py
CentroidChef/oci-python-sdk
fa406e27a52b40c70e220c20f52dfe2abe6236a3
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
49.382734
261
0.652231
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
0
0
0
132,443
0
0
0
191
207
e013976ab32de05a13bbb45298616c4488163076
986
py
Python
cookiecutter/operators/json.py
insight-infrastructure/cookiecutter
5e77a6f59786759cf1b469e7bd827b6d340a31c6
[ "BSD-3-Clause" ]
8
2020-06-15T18:49:24.000Z
2021-04-15T10:34:24.000Z
cookiecutter/operators/json.py
insight-infrastructure/cookiecutter
5e77a6f59786759cf1b469e7bd827b6d340a31c6
[ "BSD-3-Clause" ]
19
2020-06-28T16:03:56.000Z
2020-10-07T15:52:06.000Z
cookiecutter/operators/json.py
insight-infrastructure/nukikata
5e77a6f59786759cf1b469e7bd827b6d340a31c6
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Operator plugin that inherits a base class and is made available through `type`.""" from __future__ import unicode_literals from __future__ import print_function import logging logger = logging.getLogger(__name__)
23.47619
86
0.649087
# -*- coding: utf-8 -*- """Operator plugin that inherits a base class and is made available through `type`.""" from __future__ import unicode_literals from __future__ import print_function import logging import json from typing import Dict from cookiecutter.operators import BaseOperator logger = logging.getLogger(_...
0
0
0
633
0
0
0
18
90
9d71b34d0fc7e90b90e7eaec71dd1935fac5864b
1,080
py
Python
Klines_BollBrand/requestData.py
xiwen-hk/HBInterviewQuestion
f099011fdb8ef9d0c4bfebbdf645908655d245f6
[ "MIT" ]
null
null
null
Klines_BollBrand/requestData.py
xiwen-hk/HBInterviewQuestion
f099011fdb8ef9d0c4bfebbdf645908655d245f6
[ "MIT" ]
null
null
null
Klines_BollBrand/requestData.py
xiwen-hk/HBInterviewQuestion
f099011fdb8ef9d0c4bfebbdf645908655d245f6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun May 17 22:02:56 2020 @author: cuixiwen """ #Import essential packages #def a function to using huobi API to get history Kline data and return a dataframe #Get current Price
27
97
0.662037
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun May 17 22:02:56 2020 @author: cuixiwen """ #Import essential packages import requests import pandas as pd import time import datetime from datetime import timedelta #def a function to using huobi API to get history Kline data and return a dataframe de...
0
0
0
0
0
699
0
-15
154
be8631a96244cdd4ef0b3543cb79e29eed3ae439
3,696
py
Python
rllab/torch/algos/training_algo.py
NeurIPSPaperSubmission7934/code_submission
713fce673e8e3ba30b559d4eebe6d3e4891069ed
[ "Apache-2.0" ]
null
null
null
rllab/torch/algos/training_algo.py
NeurIPSPaperSubmission7934/code_submission
713fce673e8e3ba30b559d4eebe6d3e4891069ed
[ "Apache-2.0" ]
null
null
null
rllab/torch/algos/training_algo.py
NeurIPSPaperSubmission7934/code_submission
713fce673e8e3ba30b559d4eebe6d3e4891069ed
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 Copyright holder of the paper Generative Adversarial Model Learning # submitted to NeurIPS 2019 for review # All rights reserved. import rllab.misc.logger as logger """ class which is used for GAIL training to imitate a expert policy """
34.542056
143
0.657197
# Copyright (c) 2018 Copyright holder of the paper Generative Adversarial Model Learning # submitted to NeurIPS 2019 for review # All rights reserved. import rllab.misc.logger as logger from rllab.torch.sampler.torchSampler import TorchBaseSampler from rllab.sampler import parallel_sampler from rllab.algos.base import...
0
150
0
2,934
0
0
0
151
199
3e96ecd6c391e744b22d8d2fe8c14570ae0410be
1,174
py
Python
ga_auth/views.py
wolfskaempf/ga_statistics
9fdfd0b4300f5d8541fd7ce4b643592fab6b7a1e
[ "MIT" ]
3
2015-05-11T19:37:08.000Z
2015-07-12T13:01:36.000Z
ga_auth/views.py
wolfskaempf/ga_statistics
9fdfd0b4300f5d8541fd7ce4b643592fab6b7a1e
[ "MIT" ]
18
2015-05-06T21:14:14.000Z
2015-08-29T18:24:43.000Z
ga_auth/views.py
wolfskaempf/ga_statistics
9fdfd0b4300f5d8541fd7ce4b643592fab6b7a1e
[ "MIT" ]
1
2020-11-04T08:44:13.000Z
2020-11-04T08:44:13.000Z
# Create your views here.
29.35
134
0.639693
from django.shortcuts import render, HttpResponseRedirect from .forms import LoginForm from django.contrib.auth import get_user_model, authenticate, login, logout # Create your views here. def ga_login(request): # This view is shown, when a user tries to view the submit form, but isn't logged in. After they log in,...
0
0
0
0
0
935
0
97
113
0cf45031af64b35a0904285c9ca6e8aaf01a82f3
21,097
py
Python
elecsus/libs/SAFittingRoutine.py
alifeee/ElecSus
b21a48eb65df81887960a4d7308c02aef2eae53c
[ "Apache-2.0" ]
null
null
null
elecsus/libs/SAFittingRoutine.py
alifeee/ElecSus
b21a48eb65df81887960a4d7308c02aef2eae53c
[ "Apache-2.0" ]
null
null
null
elecsus/libs/SAFittingRoutine.py
alifeee/ElecSus
b21a48eb65df81887960a4d7308c02aef2eae53c
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 M. A. Zentile, J. Keaveney, L. Weller, D. Whiting, # C. S. Adams and I. G. Hughes. # 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...
31.724812
153
0.684552
# Copyright 2014 M. A. Zentile, J. Keaveney, L. Weller, D. Whiting, # C. S. Adams and I. G. Hughes. # 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
0
0
0
0
1,988
0
-24
90
7c1aa037f0c5afaf73a4eb52a446d1ff66ae93e1
1,508
py
Python
tests/test_order.py
kevinddchen/Cirq-PrimeFactorization
9104a60b983b345595c8016205dd0dd616483eaa
[ "MIT" ]
null
null
null
tests/test_order.py
kevinddchen/Cirq-PrimeFactorization
9104a60b983b345595c8016205dd0dd616483eaa
[ "MIT" ]
null
null
null
tests/test_order.py
kevinddchen/Cirq-PrimeFactorization
9104a60b983b345595c8016205dd0dd616483eaa
[ "MIT" ]
null
null
null
import numpy as np TEST_RNG = np.random.default_rng(seed=2022) TEST_N_TRIALS = 3
30.77551
74
0.653846
import pytest import numpy as np from factor import OrderFinder, QuantumOrderFinder, FakeQuantumOrderFinder TEST_RNG = np.random.default_rng(seed=2022) TEST_N_TRIALS = 3 def test_order_finder(): assert OrderFinder(1, 5).find() == 1 assert OrderFinder(2, 5).find() == 4 assert OrderFinder(3, 5).find() == ...
0
0
0
0
0
1,240
0
45
137
c7a6ec470e816815e95dee90c4bf8f3d02fcc3fe
9,616
py
Python
backends/ebpf/targets/target.py
anasyrmia/p4c-1
2bf2f615fdaaf4efed1f2f8ab0b3f3261cface60
[ "Apache-2.0" ]
487
2016-12-22T03:33:27.000Z
2022-03-29T06:36:45.000Z
backends/ebpf/targets/target.py
anasyrmia/p4c-1
2bf2f615fdaaf4efed1f2f8ab0b3f3261cface60
[ "Apache-2.0" ]
2,114
2016-12-18T11:36:27.000Z
2022-03-31T22:33:23.000Z
backends/ebpf/targets/target.py
anasyrmia/p4c-1
2bf2f615fdaaf4efed1f2f8ab0b3f3261cface60
[ "Apache-2.0" ]
456
2016-12-20T14:01:11.000Z
2022-03-30T19:26:05.000Z
#!/usr/bin/env python3 # Copyright 2013-present Barefoot Networks, Inc. # Copyright 2018 VMware, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
42.737778
78
0.579867
#!/usr/bin/env python3 # Copyright 2013-present Barefoot Networks, Inc. # Copyright 2018 VMware, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
0
0
0
8,122
0
0
0
46
111
aa54d1e8896fd31ccdac3a9f30ba585bb9aa814b
1,275
py
Python
test/test_unit/test_ga4gh/test_refget/test_http/test_request.py
ga4gh/refget-cloud
c39a65acba9818414789f004cced487562012bf0
[ "Apache-2.0" ]
null
null
null
test/test_unit/test_ga4gh/test_refget/test_http/test_request.py
ga4gh/refget-cloud
c39a65acba9818414789f004cced487562012bf0
[ "Apache-2.0" ]
3
2021-04-30T21:12:42.000Z
2021-06-02T02:11:45.000Z
test/test_unit/test_ga4gh/test_refget/test_http/test_request.py
ga4gh/refget-cloud
c39a65acba9818414789f004cced487562012bf0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Unit tests for Request class""" testdata_header = [ ("Content-Type", "appliciation/json"), ("Content-Type", "text/plain"), ("Range", "bytes=25-100") ] testdata_path = [ ("seqid", "ga4gh:SQ.HKyMuwwEWbdUDXfk5o1EGxGeqBmon6Sp"), ("seqid", "1cac8cbb0c0459b7540d77e4e68d441b119...
26.5625
66
0.681569
# -*- coding: utf-8 -*- """Unit tests for Request class""" import pytest from ga4gh.refget.http.request import Request testdata_header = [ ("Content-Type", "appliciation/json"), ("Content-Type", "text/plain"), ("Range", "bytes=25-100") ] testdata_path = [ ("seqid", "ga4gh:SQ.HKyMuwwEWbdUDXfk5o1EGxGeq...
0
672
0
0
0
0
0
16
114
c39cbfb35cbb81f80c8ba9503c670ff99a1790f8
1,580
py
Python
tcflib/examples/remote_tcf_converter.py
SeNeReKo/TCFlib
6a0611296ec7b05557bc99f290adc71034d702b0
[ "MIT" ]
7
2015-07-07T15:39:11.000Z
2019-10-25T05:29:50.000Z
tcflib/examples/remote_tcf_converter.py
SeNeReKo/TCFlib
6a0611296ec7b05557bc99f290adc71034d702b0
[ "MIT" ]
null
null
null
tcflib/examples/remote_tcf_converter.py
SeNeReKo/TCFlib
6a0611296ec7b05557bc99f290adc71034d702b0
[ "MIT" ]
1
2019-11-12T12:28:02.000Z
2019-11-12T12:28:02.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (c) 2013 Frederik Elwert <frederik.elwert@web.de> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including...
35.909091
81
0.739241
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (c) 2013 Frederik Elwert <frederik.elwert@web.de> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including...
0
0
0
211
0
0
0
14
23
16032043050794d9fb77058b3d5f365bf88b43e2
1,742
py
Python
legacy/arbitrage_monitor_btc_huobi_coinbase.py
szhu3210/Arbitrage-trader
d2af5670f7285084f70e36a48c95e796d1fd2d37
[ "Apache-2.0" ]
6
2019-04-03T22:33:39.000Z
2021-05-07T12:00:00.000Z
legacy/arbitrage_monitor_btc_huobi_coinbase.py
szhu3210/Arbitrage-trader
d2af5670f7285084f70e36a48c95e796d1fd2d37
[ "Apache-2.0" ]
2
2019-04-03T22:57:41.000Z
2019-04-26T07:13:12.000Z
legacy/arbitrage_monitor_btc_huobi_coinbase.py
szhu3210/Arbitrage-trader
d2af5670f7285084f70e36a48c95e796d1fd2d37
[ "Apache-2.0" ]
1
2019-04-28T07:23:32.000Z
2019-04-28T07:23:32.000Z
if __name__ == '__main__': main()
37.06383
152
0.616533
from coinbase.wallet.client import Client import huobi_main_monitor import time import email_client class Arbitrage_BTC(): def calculate_premium(self): # get coinbase price coinbase_monitor = Client(api_key='admin', api_secret='admin') coinbase_price = float(coinbase_monitor.get_buy_price...
0
0
0
957
0
601
0
12
134
e6bd0e6ba07a1db5e64fb178b03cc54f9993ae13
597
py
Python
encounterapp/migrations/0026_modifydelete_author.py
AbhiyantrikTechnology/DentalHub-Backend
89802b3e7671ffe8b3d287a998c3c4f375b58f03
[ "MIT" ]
1
2021-04-03T19:57:32.000Z
2021-04-03T19:57:32.000Z
encounterapp/migrations/0026_modifydelete_author.py
AbhiyantrikTechnology/DentalHub-Backend
89802b3e7671ffe8b3d287a998c3c4f375b58f03
[ "MIT" ]
null
null
null
encounterapp/migrations/0026_modifydelete_author.py
AbhiyantrikTechnology/DentalHub-Backend
89802b3e7671ffe8b3d287a998c3c4f375b58f03
[ "MIT" ]
null
null
null
# Generated by Django 2.1 on 2020-07-20 05:20
27.136364
121
0.683417
# Generated by Django 2.1 on 2020-07-20 05:20 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('encounterapp', '0025_auto_...
0
0
0
419
0
0
0
41
90
ea47a621af640924e385d8a6f97e0fd4427bf647
159
py
Python
helm-generator/generator.py
djmoran64/aether-bootstrap
138b9bab2f1a71a8ee44a8540bfa69a6bce77fed
[ "Apache-2.0" ]
null
null
null
helm-generator/generator.py
djmoran64/aether-bootstrap
138b9bab2f1a71a8ee44a8540bfa69a6bce77fed
[ "Apache-2.0" ]
null
null
null
helm-generator/generator.py
djmoran64/aether-bootstrap
138b9bab2f1a71a8ee44a8540bfa69a6bce77fed
[ "Apache-2.0" ]
1
2020-09-11T11:03:42.000Z
2020-09-11T11:03:42.000Z
#!/usr/bin/env python3 import sys if __name__ == '__main__': sys.exit(main())
13.25
38
0.679245
#!/usr/bin/env python3 import helm_generator.generator as gen import sys def main(): return gen.main() if __name__ == '__main__': sys.exit(main())
0
0
0
0
0
12
0
17
46
658336373402dd6d42a43d8188df0108b2ded4b5
1,513
py
Python
internals.py
Adityakadali/Internal-marks-caliculator
ca0d9b9229c7639990184659886a52143d7becf5
[ "Unlicense" ]
null
null
null
internals.py
Adityakadali/Internal-marks-caliculator
ca0d9b9229c7639990184659886a52143d7becf5
[ "Unlicense" ]
null
null
null
internals.py
Adityakadali/Internal-marks-caliculator
ca0d9b9229c7639990184659886a52143d7becf5
[ "Unlicense" ]
null
null
null
from appJar import gui app = gui('Internal marks caliculator') app.setBg('#8b9dc3') app.addLabel('lb1','Enter your marks') app.addLabelNumericEntry('class test 1') app.addLabelNumericEntry('class test 2') app.addLabelNumericEntry('class test 3') app.addLabelNumericEntry('class test 4') app.addLabelNumericEntry('mid 1'...
37.825
113
0.744878
from appJar import gui app = gui('Internal marks caliculator') app.setBg('#8b9dc3') app.addLabel('lb1','Enter your marks') app.addLabelNumericEntry('class test 1') app.addLabelNumericEntry('class test 2') app.addLabelNumericEntry('class test 3') app.addLabelNumericEntry('class test 4') app.addLabelNumericEntry('mid 1'...
0
0
0
0
0
1,065
0
0
23
ff6a716f8022718e402608333424016a6b1889c3
992
py
Python
week1/quiz1.py
pkoarmy/Learning-Python
79067de3c09240d26939ca23ec98e96304660e7c
[ "MIT" ]
null
null
null
week1/quiz1.py
pkoarmy/Learning-Python
79067de3c09240d26939ca23ec98e96304660e7c
[ "MIT" ]
null
null
null
week1/quiz1.py
pkoarmy/Learning-Python
79067de3c09240d26939ca23ec98e96304660e7c
[ "MIT" ]
null
null
null
# # quiz # # what is a result of following Python code a = "5" b = "6" print( a + b ) # # 1. 11 # # 2. 5 # # 3. 6 # # 4. 56 # # 5. compile error a=2 b=2 if (a > 5 and b < 3): print("heheh") else: print("hohoho") a=2 b=2 if (a > 5 or b < 3): print("heheh") else: print("hohoho") # ## Please code 'xx...
15.5
67
0.565524
# # quiz # # what is a result of following Python code a = "5" b = "6" print( a + b ) # # 1. 11 # # 2. 5 # # 3. 6 # # 4. 56 # # 5. compile error a=2 b=2 if (a > 5 and b < 3): print("heheh") else: print("hohoho") a=2 b=2 if (a > 5 or b < 3): print("heheh") else: print("hohoho") # ## Please code 'xx...
0
0
0
0
0
0
0
0
0
86514d78fd0ebfe9d94358f5e3304cc1781844d7
352
py
Python
test_receiver.py
tana/oscosc
f8706b7b457a8df028e137b738a8d1b23c358191
[ "MIT" ]
null
null
null
test_receiver.py
tana/oscosc
f8706b7b457a8df028e137b738a8d1b23c358191
[ "MIT" ]
null
null
null
test_receiver.py
tana/oscosc
f8706b7b457a8df028e137b738a8d1b23c358191
[ "MIT" ]
null
null
null
import time import receiver if __name__ == '__main__': recv = receiver.Receiver() recv.start_thread(12345) try: print('Press Ctrl-C to stop') while True: while recv.available(): msgs = recv.get() print(msgs) time.sleep(1 / 60) fina...
22
37
0.534091
import time import receiver if __name__ == '__main__': recv = receiver.Receiver() recv.start_thread(12345) try: print('Press Ctrl-C to stop') while True: while recv.available(): msgs = recv.get() print(msgs) time.sleep(1 / 60) fina...
0
0
0
0
0
0
0
0
0
e44d5fc91228b09ac97094af538e86e4af6d3285
10,943
py
Python
tests/test_request_handler.py
dineshrajpurohit/slack_ttt
2005c1dc4182e5ad4bab6c2360905307eb2bba22
[ "MIT" ]
null
null
null
tests/test_request_handler.py
dineshrajpurohit/slack_ttt
2005c1dc4182e5ad4bab6c2360905307eb2bba22
[ "MIT" ]
1
2021-06-01T22:17:37.000Z
2021-06-01T22:17:37.000Z
tests/test_request_handler.py
dineshrajpurohit/slack_ttt
2005c1dc4182e5ad4bab6c2360905307eb2bba22
[ "MIT" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
40.52963
101
0.538792
import unittest from slack_ttt.native.dynamo_db import DynamoDB from slack_ttt.request_handler import RequestHandler class RequestHandlerTest(unittest.TestCase): def setUp(self): self.ddb = DynamoDB() self.ddb.initialize_db() params = {'channel_id': ['TESTCHANNEL'], 'user...
0
0
0
10,755
0
0
0
57
67
7f6654eda735eecc1fc819b8203c3420a8a1e665
4,732
py
Python
tools/convert_models/mobilenetv2_to_mmcls.py
YuxinZou/mmclassification
2037260ea6c98a3b115e97727e1151a1c2c32f7a
[ "Apache-2.0" ]
1,190
2020-07-10T01:16:01.000Z
2022-03-31T09:48:38.000Z
tools/convert_models/mobilenetv2_to_mmcls.py
YuxinZou/mmclassification
2037260ea6c98a3b115e97727e1151a1c2c32f7a
[ "Apache-2.0" ]
702
2020-07-13T13:31:33.000Z
2022-03-31T06:48:04.000Z
tools/convert_models/mobilenetv2_to_mmcls.py
YuxinZou/mmclassification
2037260ea6c98a3b115e97727e1151a1c2c32f7a
[ "Apache-2.0" ]
502
2020-07-10T02:40:55.000Z
2022-03-31T02:07:09.000Z
# Copyright (c) OpenMMLab. All rights reserved. from collections import OrderedDict import torch def convert(src, dst): """Convert keys in torchvision pretrained MobileNetV2 models to mmcls style.""" # load pytorch model blobs = torch.load(src, map_location='cpu') # convert to pytorch style...
34.794118
75
0.624683
# Copyright (c) OpenMMLab. All rights reserved. import argparse from collections import OrderedDict import torch def convert_conv1(model_key, model_weight, state_dict, converted_names): if model_key.find('features.0.0') >= 0: new_key = model_key.replace('features.0.0', 'backbone.conv1.conv') else: ...
0
0
0
0
0
3,490
0
-6
137
8da8bfed687cea8b9cc13ee4429d5fbcb567ae72
16,846
py
Python
converters/sol1_converter.py
NSO-developer/nfvo-converter-tosca-sol6
2c43900b0e96927e23c668a4c67e09d0b13f55d7
[ "Apache-2.0" ]
9
2019-06-03T07:50:37.000Z
2021-03-26T00:25:19.000Z
converters/sol1_converter.py
NSO-developer/nfvo-converter-tosca-sol6
2c43900b0e96927e23c668a4c67e09d0b13f55d7
[ "Apache-2.0" ]
null
null
null
converters/sol1_converter.py
NSO-developer/nfvo-converter-tosca-sol6
2c43900b0e96927e23c668a4c67e09d0b13f55d7
[ "Apache-2.0" ]
4
2020-03-06T16:16:28.000Z
2020-09-30T06:13:56.000Z
import logging log = logging.getLogger(__name__)
44.803191
144
0.611955
from keys.sol6_keys import * from converters.sol1_flags import * from keys.sol6_keys import V2MapBase from mapping_v2 import * import logging log = logging.getLogger(__name__) class Sol1Converter: def __init__(self, sol6_vnf, parsed_dict, variables): self.sol6_vnfd = sol6_vnf["data"]["etsi-nfv-descriptor...
0
465
0
16,181
0
0
0
39
111
ba89997ed3d4d4b47cd0e0c2e69535fe43114f5e
2,351
py
Python
Back-End/IA/worker.py
PoCInnovation/Koic
eca53b53b7242c1e83213ef9408366ca0a346358
[ "MIT" ]
13
2021-09-15T13:23:33.000Z
2022-01-14T14:52:42.000Z
Back-End/IA/worker.py
PoCInnovation/Koic
eca53b53b7242c1e83213ef9408366ca0a346358
[ "MIT" ]
null
null
null
Back-End/IA/worker.py
PoCInnovation/Koic
eca53b53b7242c1e83213ef9408366ca0a346358
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os import asyncio if __name__ == "__main__": # Put configuration into the environment TODO worker = Worker(os.getenv("TOPIC", "CAMERA_1"), os.getenv("ENDPOINT_URL", "http://localhost:5000/api")) asyncio.run(worker.run())
33.112676
111
0.60655
#!/usr/bin/env python3 import io import sys import cv2 import os import json import asyncio import aiohttp import numpy as np from PIL import Image from ai import Detector from json import JSONEncoder from datetime import datetime, date from kafka import KafkaConsumer class DateTimeEncoder(JSONEncoder): #Override...
0
0
1,220
588
0
0
0
-21
289
072e3cdc4c91a6339e8907af6182bfd780d9d1bb
15,876
py
Python
mljob/job.py
krishnanlab/geneplexus_app
bcb6b7e7b80963f9e7c2824c385f762056ebf8c1
[ "BSD-3-Clause" ]
null
null
null
mljob/job.py
krishnanlab/geneplexus_app
bcb6b7e7b80963f9e7c2824c385f762056ebf8c1
[ "BSD-3-Clause" ]
17
2022-03-08T18:57:32.000Z
2022-03-22T17:47:59.000Z
mljob/job.py
krishnanlab/geneplexus_app
bcb6b7e7b80963f9e7c2824c385f762056ebf8c1
[ "BSD-3-Clause" ]
null
null
null
# jobs.py Class to work with submitted LogicApp jobs # RUNNING LOCALLY: shoud still use a shell script, just like a remote job # And return control to the app rather than make it wait. # if Jobs.config['RUN_LOCAL']: # print("running job locally (may take a while") # html_output = run_and_ren...
41.129534
195
0.617599
# jobs.py Class to work with submitted LogicApp jobs import os,json, sys, requests from datetime import datetime from slugify import slugify class Jobs(): """ system for managing running jobs Usage: from mljob.job import Jobs # in app init, put the class inside the app app.jobs = Jobs # set th...
0
2,572
0
12,445
0
0
0
22
90
5635c67eed6599ecaf7ed7fab9b59738b1d54849
1,594
py
Python
main/migrations/0001_initial.py
mhartley/popkids
30add65ebc4d6fd0c3f6a1ce51bef18817d35093
[ "MIT" ]
null
null
null
main/migrations/0001_initial.py
mhartley/popkids
30add65ebc4d6fd0c3f6a1ce51bef18817d35093
[ "MIT" ]
null
null
null
main/migrations/0001_initial.py
mhartley/popkids
30add65ebc4d6fd0c3f6a1ce51bef18817d35093
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-11-04 20:19 from __future__ import unicode_literals
37.069767
114
0.562735
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-11-04 20:19 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Events...
0
0
0
1,415
0
0
0
19
46
75c3d0d7c6c2d9bf798bfa14296b91935cd02d93
367
py
Python
index.py
rludlow/nbdev_demo
469c74b24683adc78e8b7f4bcbd3238d5fb638aa
[ "Apache-2.0" ]
null
null
null
index.py
rludlow/nbdev_demo
469c74b24683adc78e8b7f4bcbd3238d5fb638aa
[ "Apache-2.0" ]
null
null
null
index.py
rludlow/nbdev_demo
469c74b24683adc78e8b7f4bcbd3238d5fb638aa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[2]: #hide # # nbdev_demo # # > Just my little demo. # This file will become your README and also the index of your documentation. # ## Install # `pip install nbdev_demo` # ## How to use # Fill me in please! Don't forget code examples: # In[3]: say_hello("Sylvain"...
10.194444
77
0.643052
#!/usr/bin/env python # coding: utf-8 # In[2]: #hide from nbdev_demo.core import * # # nbdev_demo # # > Just my little demo. # This file will become your README and also the index of your documentation. # ## Install # `pip install nbdev_demo` # ## How to use # Fill me in please! Don't forget code examples: ...
0
0
0
0
0
0
0
8
22
6a198f01bffb2edb30f57dbe984f8e8f1c833f19
16,112
py
Python
IAM/make_job_queries.py
mzz235711/IAM
e42c2b766442b666224b107b671eeab65f9b8efd
[ "Apache-2.0" ]
null
null
null
IAM/make_job_queries.py
mzz235711/IAM
e42c2b766442b666224b107b671eeab65f9b8efd
[ "Apache-2.0" ]
null
null
null
IAM/make_job_queries.py
mzz235711/IAM
e42c2b766442b666224b107b671eeab65f9b8efd
[ "Apache-2.0" ]
null
null
null
"""Generates new queries on the JOB-light schema. For each JOB-light join template, repeat #queries per template: - sample a tuple from this inner join result via factorized_sampler - sample #filters, and columns to put these filters on - query literals: use this tuple's values - sample ops: {>=, <=, =} fo...
37.64486
115
0.581678
"""Generates new queries on the JOB-light schema. For each JOB-light join template, repeat #queries per template: - sample a tuple from this inner join result via factorized_sampler - sample #filters, and columns to put these filters on - query literals: use this tuple's values - sample ops: {>=, <=, =} fo...
0
0
0
0
0
5,606
0
-22
203
d7d810fd529ba41d4857933b4383a5e6e8fa4cb9
719
py
Python
selecv/figures/figure2.py
meyer-lab/cell-selective-ligands
cdcd645b7b44292aebb061b3ae9920268e8d20c8
[ "MIT" ]
null
null
null
selecv/figures/figure2.py
meyer-lab/cell-selective-ligands
cdcd645b7b44292aebb061b3ae9920268e8d20c8
[ "MIT" ]
62
2020-09-17T14:44:30.000Z
2022-03-12T01:07:42.000Z
selecv/figures/figure2.py
meyer-lab/cell-selective-ligands
cdcd645b7b44292aebb061b3ae9920268e8d20c8
[ "MIT" ]
null
null
null
""" Figure 2: Quick look into mostly valency """ import numpy as np ligConc = np.array([1e-8]) KxStarP = 1e-10 affinity = 1e8 # 7
24.793103
128
0.61057
""" Figure 2: Quick look into mostly valency """ import numpy as np from .figureCommon import subplotLabel, setFontSize, getSetup, popCompare from .figureS2 import vieqPlot ligConc = np.array([1e-8]) KxStarP = 1e-10 affinity = 1e8 # 7 def makeFigure(): # Get list of axis objects ax, f = getSetup((9, 6), (2,...
0
0
0
0
0
458
0
61
67
07d97e2de8d83a7782f65b73586cf306c1bbaeca
9,465
py
Python
tests/jarutil.py
sokoslee/jvm.py
5d5442bad2506880fc6af5a17933f9f241bbc487
[ "Apache-2.0" ]
null
null
null
tests/jarutil.py
sokoslee/jvm.py
5d5442bad2506880fc6af5a17933f9f241bbc487
[ "Apache-2.0" ]
null
null
null
tests/jarutil.py
sokoslee/jvm.py
5d5442bad2506880fc6af5a17933f9f241bbc487
[ "Apache-2.0" ]
null
null
null
# This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be usefu...
41.331878
185
0.65177
# This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be usefu...
0
0
0
8,225
0
0
0
263
157
6a6599c3ec24ddb0a291f5fcbc7886a532a05587
5,959
py
Python
thapbi_pict/ena_submit.py
HuttonICS/thapbi-pict
fde07d192d9ecf011c75fffe3c180d3b72e17e06
[ "MIT" ]
6
2019-06-17T07:39:02.000Z
2021-11-19T18:42:17.000Z
thapbi_pict/ena_submit.py
HuttonICS/thapbi-pict
fde07d192d9ecf011c75fffe3c180d3b72e17e06
[ "MIT" ]
244
2018-10-24T13:35:51.000Z
2022-03-10T14:13:28.000Z
thapbi_pict/ena_submit.py
HuttonICS/thapbi-pict
fde07d192d9ecf011c75fffe3c180d3b72e17e06
[ "MIT" ]
1
2018-10-24T12:15:36.000Z
2018-10-24T12:15:36.000Z
# Copyright 2019-2020 by Peter Cock, The James Hutton Institute. # All rights reserved. # This file is part of the THAPBI Phytophthora ITS1 Classifier Tool (PICT), # and is released under the "MIT License Agreement". Please see the LICENSE # file that should have been included as part of this package. """Code for sampl...
31.86631
88
0.624266
# Copyright 2019-2020 by Peter Cock, The James Hutton Institute. # All rights reserved. # This file is part of the THAPBI Phytophthora ITS1 Classifier Tool (PICT), # and is released under the "MIT License Agreement". Please see the LICENSE # file that should have been included as part of this package. """Code for sampl...
0
0
0
0
0
0
0
0
0
44badcfc20c623263aad993b4fde7c366018b4bc
3,647
py
Python
poly_features_class.py
ThomIves/MachineLearningModulePurePy
25ecc668e0883dc651edbda47618a1fb8c33cc07
[ "Unlicense" ]
4
2019-10-31T09:10:53.000Z
2021-04-05T07:15:02.000Z
poly_features_class.py
ThomIves/MachineLearningModulePurePy
25ecc668e0883dc651edbda47618a1fb8c33cc07
[ "Unlicense" ]
null
null
null
poly_features_class.py
ThomIves/MachineLearningModulePurePy
25ecc668e0883dc651edbda47618a1fb8c33cc07
[ "Unlicense" ]
2
2020-08-30T08:07:45.000Z
2021-04-04T03:00:07.000Z
# PolynomialFeatures(degree=2, interaction_only=False, include_bias=True) import sys X = [[1, 2], [3, 4], [5, 6]] my_poly = PolynomialTools(order=2) #, interactions_only=True, include_bias=False) my_poly.fit(X) # print(len(my_poly.__powers_lists)) # print(my_poly.__powers_lists) print(my_poly.get_features_names(['...
29.650407
82
0.552783
# PolynomialFeatures(degree=2, interaction_only=False, include_bias=True) import sys class PolynomialTools: def __init__(self, order=2, interactions_only=False, include_bias=True): self.order = order self.interactions_only = interactions_only self.include_bias = include_bias def __red...
0
0
0
3,044
0
0
0
0
24
fe3ffeaab8a13d5daab2f557f0be077c97ad07c6
1,035
py
Python
xrypto/exchanges/okcoin/HttpMD5Util.py
AlphaPerfect/Xrypto
fcb7b3b79c1f5ec0393d1795bcfa6556fd3e0dd9
[ "Unlicense" ]
10
2018-03-24T23:14:13.000Z
2020-04-22T15:56:05.000Z
xrypto/exchanges/okcoin/HttpMD5Util.py
a04512/crypto-raven
e8ebba319f8f04314b4c21d6bc4c8901bf358281
[ "Unlicense" ]
null
null
null
xrypto/exchanges/okcoin/HttpMD5Util.py
a04512/crypto-raven
e8ebba319f8f04314b4c21d6bc4c8901bf358281
[ "Unlicense" ]
10
2020-01-29T05:43:33.000Z
2021-12-13T07:02:39.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- #httpMD5
24.069767
68
0.642512
#!/usr/bin/python # -*- coding: utf-8 -*- #用于进行http请求,以及MD5加密,生成签名的工具类 import http.client import urllib import json import hashlib import time import requests from urllib.parse import urljoin from urllib.parse import urlencode def buildMySign(params,secretKey): sign = '' for key in sorted(params.keys()): ...
60
0
0
0
0
736
0
-20
246
8a89389db25e2d8f144e067b503f136c1328d53e
7,720
py
Python
sheepdog/utils/transforms/__init__.py
fantix/sheepdog
dccfffa959591f66398b568b6ecb8bf4bcc0f7a6
[ "Apache-2.0" ]
null
null
null
sheepdog/utils/transforms/__init__.py
fantix/sheepdog
dccfffa959591f66398b568b6ecb8bf4bcc0f7a6
[ "Apache-2.0" ]
null
null
null
sheepdog/utils/transforms/__init__.py
fantix/sheepdog
dccfffa959591f66398b568b6ecb8bf4bcc0f7a6
[ "Apache-2.0" ]
null
null
null
""" TODO """ from psqlgraph import Node def parse_bool_from_string(value): """ Return a boolean given a string value *iff* :param:`value` is a valid string representation of a boolean, otherwise return the original :param:`value` to be handled by later type checking. ..note: ``bool('maybe...
28.913858
87
0.570855
""" TODO """ import csv import StringIO from flask import current_app from psqlgraph import Node from sheepdog.errors import UserError from sheepdog.utils.transforms.bcr_xml_to_json import ( BcrXmlToJsonParser, BcrClinicalXmlToJsonParser, ) def parse_bool_from_string(value): """ Return a boolean gi...
0
1,245
0
4,492
0
0
0
99
182
7dc67d9c3c4c8b7c96f4ad7c72770854d17424b3
4,710
py
Python
run_main.py
obrua/douyu-qianghongbao
793cb913537c6136252d92af921395a6b55e79b4
[ "MIT" ]
3
2019-12-20T15:01:16.000Z
2021-12-23T06:37:31.000Z
run_main.py
obrua/douyu-qianghongbao
793cb913537c6136252d92af921395a6b55e79b4
[ "MIT" ]
null
null
null
run_main.py
obrua/douyu-qianghongbao
793cb913537c6136252d92af921395a6b55e79b4
[ "MIT" ]
null
null
null
import os import signal import queue import time import threading from gethongbao import verControl, HongBao, QiangHongBao, get_cookie, update_cookie from basemodule.logger import logger from douyu_login import utils as login_utils from basemodule.config import Config, BASE_DIR bEXIT = False if __name__ == '__main_...
33.642857
102
0.618047
import sys import os import signal import requests import json import queue import time import threading import ntplib from threading import Thread from gethongbao import verControl, HongBao, QiangHongBao, get_cookie, update_cookie from basemodule.logger import logger from douyu_login import utils as login_utils from ...
583
0
0
0
0
62
0
-28
134
edeefc19437c41efb18d22ba83ed2340535c2f55
507
py
Python
controlstructure/multiplelist.py
smanisha92/python101
797a80459ce9b2345cd51c614072f0ee633d3159
[ "MIT" ]
null
null
null
controlstructure/multiplelist.py
smanisha92/python101
797a80459ce9b2345cd51c614072f0ee633d3159
[ "MIT" ]
null
null
null
controlstructure/multiplelist.py
smanisha92/python101
797a80459ce9b2345cd51c614072f0ee633d3159
[ "MIT" ]
null
null
null
""" Iterating multiple lists at the same time """ l1 = [1,2,3] l2 = [6,7,8,10,20,30] for a,b in zip(l1, l2): if (a < b): print(a) else: print(b) print("____ LEARNING RANGE BUILT IN FUNCTION ____") """ Built in function Creates a sequence of numbers but does not save them in memory very useful f...
19.5
62
0.631164
""" Iterating multiple lists at the same time """ l1 = [1,2,3] l2 = [6,7,8,10,20,30] for a,b in zip(l1, l2): if (a < b): print(a) else: print(b) print("____ LEARNING RANGE BUILT IN FUNCTION ____") """ Built in function Creates a sequence of numbers but does not save them in memory very useful f...
0
0
0
0
0
0
0
0
0
8a27a6a9d67b5aa59fcba0ca4b16eb4caf47bc09
8,580
py
Python
Python/Number Guess Game.py
aastha01chauhan/Hacktoberfest
b58042f9f4d2991b0d151e351c9b2d52e779169c
[ "MIT" ]
77
2020-10-01T01:37:10.000Z
2021-09-30T08:44:44.000Z
Python/Number Guess Game.py
aastha01chauhan/Hacktoberfest
b58042f9f4d2991b0d151e351c9b2d52e779169c
[ "MIT" ]
399
2020-09-30T18:48:08.000Z
2021-04-17T00:16:21.000Z
Python/Number Guess Game.py
aastha01chauhan/Hacktoberfest
b58042f9f4d2991b0d151e351c9b2d52e779169c
[ "MIT" ]
470
2020-09-30T18:53:00.000Z
2021-09-09T10:15:55.000Z
#made by atul narayan. this game is for 4 players. choice = input('How many players? (1,2 or 3):') if choice not in range (1,4): print("enter valid number of players") if choice in ('1'): player1 = str(input("Enter Your Name:")) if choice == '1': print('welcome', '' ,player1) ...
31.895911
99
0.409907
#made by atul narayan. this game is for 4 players. choice = input('How many players? (1,2 or 3):') if choice not in range (1,4): print("enter valid number of players") if choice in ('1'): player1 = str(input("Enter Your Name:")) if choice == '1': print('welcome', '' ,player1) ...
0
0
0
0
0
0
0
0
0
58c6d46866bfb45986db751778ab80a4c0ddb14b
350
py
Python
api/migrations/0009_remove_presentationproposal_proposal_agreed_at.py
pythonkr/pyconkr-api
077e122a0af37122c5b424870cf91b8fca91a9f5
[ "Apache-2.0" ]
25
2018-12-09T07:56:16.000Z
2020-12-24T08:20:41.000Z
api/migrations/0009_remove_presentationproposal_proposal_agreed_at.py
mingrammer/pyconkr-api
3c9fc70ed26008a50d3b4c296a4da84a8f93babb
[ "Apache-2.0" ]
100
2018-12-13T02:01:42.000Z
2022-03-11T23:40:25.000Z
api/migrations/0009_remove_presentationproposal_proposal_agreed_at.py
mingrammer/pyconkr-api
3c9fc70ed26008a50d3b4c296a4da84a8f93babb
[ "Apache-2.0" ]
8
2019-01-05T05:02:27.000Z
2019-08-09T08:14:49.000Z
# Generated by Django 2.1.5 on 2019-03-16 09:29
19.444444
47
0.617143
# Generated by Django 2.1.5 on 2019-03-16 09:29 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('api', '0008_auto_20190316_1540'), ] operations = [ migrations.RemoveField( model_name='presentationproposal', name='proposal...
0
0
0
244
0
0
0
11
46
a125f5defbe8dfc407b8f09b4df443c757f6e52d
13,633
py
Python
buzsaki_lab_to_nwb/watson/watsonnwbconverter.py
ben-dichter-consulting/buzsaki-lab-to-nwb
3a3dca679834c78769b2189abf1c063a1eebe0b6
[ "BSD-3-Clause" ]
null
null
null
buzsaki_lab_to_nwb/watson/watsonnwbconverter.py
ben-dichter-consulting/buzsaki-lab-to-nwb
3a3dca679834c78769b2189abf1c063a1eebe0b6
[ "BSD-3-Clause" ]
1
2019-11-04T18:55:13.000Z
2019-11-04T18:55:13.000Z
buzsaki_lab_to_nwb/watson/watsonnwbconverter.py
ben-dichter-consulting/buzsaki-lab-to-nwb
3a3dca679834c78769b2189abf1c063a1eebe0b6
[ "BSD-3-Clause" ]
null
null
null
"""Authors: Cody Baker and Ben Dichter."""
47.667832
118
0.557031
"""Authors: Cody Baker and Ben Dichter.""" import spikeextractors as se from nwb_conversion_tools import NWBConverter, neuroscopedatainterface from .watsonlfpdatainterface import WatsonLFPInterface from .watsonbehaviordatainterface import WatsonBehaviorInterface from .watsonnorecording import WatsonNoRecording from .wa...
0
0
0
13,023
0
0
0
257
309
374fc3ded7b192964692000f2826603ab40f6295
18,255
py
Python
classification/abstentionloss.py
eabarnes1010/controlled_abstention_networks
4519ff710d2562a25045d0a2bdd26b3b6a98fa32
[ "MIT" ]
8
2021-04-23T03:06:03.000Z
2022-01-03T08:36:32.000Z
classification/abstentionloss.py
eabarnes1010/controlled_abstention_networks
4519ff710d2562a25045d0a2bdd26b3b6a98fa32
[ "MIT" ]
null
null
null
classification/abstentionloss.py
eabarnes1010/controlled_abstention_networks
4519ff710d2562a25045d0a2bdd26b3b6a98fa32
[ "MIT" ]
4
2021-06-23T17:48:33.000Z
2022-01-02T04:10:37.000Z
"""Abstention loss function classes and associated alpha updater classes for classification. loss function classes --------------------- * DACLoss(tf.keras.losses.Loss): Modified k-class cross-entropy per-sample loss with spinup, as defined by Sunil Thulasidasan. * NotWrongLoss(tf.keras.losses.Loss): Abst...
34.378531
115
0.579458
"""Abstention loss function classes and associated alpha updater classes for classification. loss function classes --------------------- * DACLoss(tf.keras.losses.Loss): Modified k-class cross-entropy per-sample loss with spinup, as defined by Sunil Thulasidasan. * NotWrongLoss(tf.keras.losses.Loss): Abst...
0
113
0
15,262
0
0
0
5
243
3d16d17e54222f006e32cd6b9e6ca323e3738f03
465
py
Python
mmseg/core/evaluation/__init__.py
weiyx16/mmsegmentation
6d35d76195f173fbc6b119a7d7815e67d78024c6
[ "Apache-2.0" ]
103
2022-02-20T17:12:54.000Z
2022-03-30T07:09:48.000Z
mmseg/core/evaluation/__init__.py
weiyx16/mmsegmentation
6d35d76195f173fbc6b119a7d7815e67d78024c6
[ "Apache-2.0" ]
13
2022-02-15T20:05:18.000Z
2022-02-15T20:05:21.000Z
mmseg/core/evaluation/__init__.py
weiyx16/mmsegmentation
6d35d76195f173fbc6b119a7d7815e67d78024c6
[ "Apache-2.0" ]
17
2022-02-22T06:29:50.000Z
2022-03-30T05:03:06.000Z
# Copyright (c) OpenMMLab. All rights reserved. from .class_names import get_classes, get_palette from .eval_hooks import DistEvalHook, EvalHook from .metrics import (eval_metrics, intersect_and_union, mean_dice, mean_fscore, mean_iou, pre_eval_to_metrics) __all__ = [ 'EvalHook', 'DistEvalHook', 'mean_dice', 'mean...
38.75
72
0.733333
# Copyright (c) OpenMMLab. All rights reserved. from .class_names import get_classes, get_palette from .eval_hooks import DistEvalHook, EvalHook from .metrics import (eval_metrics, intersect_and_union, mean_dice, mean_fscore, mean_iou, pre_eval_to_metrics) __all__ = [ 'EvalHook', 'DistEvalHoo...
0
0
0
0
0
0
0
22
0
a92e8200ad4f10b5dd0a238b4c6d5ad4ac0f56cb
1,889
py
Python
barf/arch/x86/translators/__init__.py
Cyb3rDo/barf-project
df7359b7689f3282cdf900358bf2519d7f6c1da4
[ "BSD-2-Clause" ]
1
2018-12-14T13:41:37.000Z
2018-12-14T13:41:37.000Z
barf/arch/x86/translators/__init__.py
Cyb3rDo/barf-project
df7359b7689f3282cdf900358bf2519d7f6c1da4
[ "BSD-2-Clause" ]
null
null
null
barf/arch/x86/translators/__init__.py
Cyb3rDo/barf-project
df7359b7689f3282cdf900358bf2519d7f6c1da4
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of condit...
41.977778
80
0.800953
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of condit...
0
0
0
0
0
0
0
-7
199
477c33d210ea7fe5e3a15e8e3164b3c0794bfc70
10,643
py
Python
infoset/utils/configuration.py
clayton-colovore/infoset-ng
b0404fdda9e805effc16cebc9caef5f86b6bfe33
[ "Apache-2.0" ]
null
null
null
infoset/utils/configuration.py
clayton-colovore/infoset-ng
b0404fdda9e805effc16cebc9caef5f86b6bfe33
[ "Apache-2.0" ]
null
null
null
infoset/utils/configuration.py
clayton-colovore/infoset-ng
b0404fdda9e805effc16cebc9caef5f86b6bfe33
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """infoset classes that manage various configurations.""" import os.path # Import project libraries from infoset.utils import log def _key_sub_key(key, sub_key, config_dict, die=True): """Get config parameter from YAML. Args: key: Primary key sub_key: Secondary key ...
21.286
97
0.532181
#!/usr/bin/env python3 """infoset classes that manage various configurations.""" import os.path import os # Import project libraries from infoset.utils import general from infoset.utils import log class Config(object): """Class gathers all configuration information.""" def __init__(self): """Functi...
0
0
0
9,177
0
0
0
0
67
0fbe13f1ba652baf17db53a896344842a42cac9a
1,526
py
Python
zscOutlinerColorMarker/__init__.py
ZishChen-rig/zscOutlinerColorMarker
21eb3075eab7f7860c82b1eb3f2aa7825fff6d45
[ "MIT" ]
null
null
null
zscOutlinerColorMarker/__init__.py
ZishChen-rig/zscOutlinerColorMarker
21eb3075eab7f7860c82b1eb3f2aa7825fff6d45
[ "MIT" ]
null
null
null
zscOutlinerColorMarker/__init__.py
ZishChen-rig/zscOutlinerColorMarker
21eb3075eab7f7860c82b1eb3f2aa7825fff6d45
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: UTF-8 -*- import maya.cmds as cmds
28.259259
96
0.529489
#!/usr/bin/python # -*- coding: UTF-8 -*- import maya.cmds as cmds def info(): ret = cmds.confirmDialog( t='Tool Information', icn='information', m=''' <br> <table border=".1" width="500"> <tr> <td><p align="right"><font size=\'5\' color=\'#0B1013\'>tool_name : </font></p></td> ...
0
0
0
0
0
1,419
0
0
25
9d98fd62f98891fea3227b9c5a0c7ae97e1287fa
158,901
py
Python
all/emojitations/data/sw.py
idleberg/sublime-emojitations
b2b4e8ce2c33ed0f6b8d6db6085e21da4e8d895b
[ "MIT" ]
6
2016-08-31T14:42:36.000Z
2021-09-05T23:55:47.000Z
all/emojitations/data/sw.py
idleberg/sublime-emojitations
b2b4e8ce2c33ed0f6b8d6db6085e21da4e8d895b
[ "MIT" ]
1
2016-10-20T10:52:06.000Z
2016-10-20T18:47:19.000Z
all/emojitations/data/sw.py
idleberg/sublime-emojitations
b2b4e8ce2c33ed0f6b8d6db6085e21da4e8d895b
[ "MIT" ]
5
2016-08-31T14:48:11.000Z
2021-09-05T23:55:33.000Z
from emojitations.emojitypes import EmojiAnnotations emoji = [ EmojiAnnotations(emoji='', codepoints=(128512,), name='sura inayokenua', slug='sura_inayokenua', annotations=frozenset({'kenua', 'uso'})), EmojiAnnotations(emoji='', codepoints=(128513,), name='uso uliokenua na macho yanayotabasamu', slug='uso_uliokenua...
164.323681
300
0.723274
from emojitations.emojitypes import EmojiAnnotations emoji = [ EmojiAnnotations(emoji='😀', codepoints=(128512,), name='sura inayokenua', slug='sura_inayokenua', annotations=frozenset({'kenua', 'uso'})), EmojiAnnotations(emoji='😁', codepoints=(128513,), name='uso uliokenua na macho yanayotabasamu', slug='uso_uliok...
3,161
0
0
0
0
0
0
0
0
2d2f9acf7120fb3634a638c8876a4b89c953a077
1,151
py
Python
dev/Gems/CloudGemMetric/v1/AWS/common-code/MetricUtils/sensitivity.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
8
2019-10-07T16:33:47.000Z
2020-12-07T03:59:58.000Z
dev/Gems/CloudGemMetric/v1/AWS/common-code/MetricUtils/sensitivity.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
null
null
null
dev/Gems/CloudGemMetric/v1/AWS/common-code/MetricUtils/sensitivity.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
5
2020-08-27T20:44:18.000Z
2021-08-21T22:54:11.000Z
import enum_type SENSITIVITY_TYPE = enum_type.create(NONE="Insensitive", ENCRYPT="Sensitive") """ Encrypt S3 files (0) or leave unencrypted (1) """
22.134615
76
0.690704
from io import BytesIO from abc import ABCMeta, abstractmethod import metric_constant as c import os import gzip import zlib import base64 import sqs import enum_type def checksum(data): return zlib.crc32(data) def b64encode(data): return base64.b64encode(data) def b64decode(data): return base64.b64decod...
0
343
0
222
0
92
0
-26
362
f2618e3174076b533e87baf41a733a81cbaa0778
756
py
Python
01_Language/05_Python/tests/db/test_mysql.py
cliff363825/TwentyFour
09df59bd5d275e66463e343647f46027397d1233
[ "MIT" ]
3
2020-06-28T07:42:51.000Z
2021-01-15T10:32:11.000Z
01_Language/05_Python/tests/db/test_mysql.py
cliff363825/TwentyFour
09df59bd5d275e66463e343647f46027397d1233
[ "MIT" ]
9
2021-03-10T22:45:40.000Z
2022-02-27T06:53:20.000Z
01_Language/05_Python/tests/db/test_mysql.py
cliff363825/TwentyFour
09df59bd5d275e66463e343647f46027397d1233
[ "MIT" ]
1
2021-01-15T10:51:24.000Z
2021-01-15T10:51:24.000Z
# coding: utf-8 # Mysql # pip install mysql-connector-python --allow-external mysql-connector-python # pip install mysql-connector # Mysql import mysql.connector # conn = mysql.connector.connect(host='192.168.1.64', user='root', password='root', database='test') # cursor = conn.cursor() # user cursor.execute('crea...
22.235294
98
0.715608
# coding: utf-8 # 安装Mysql驱动 # pip install mysql-connector-python --allow-external mysql-connector-python # pip install mysql-connector # 导入Mysql驱动 import mysql.connector # 创建数据库连接 conn = mysql.connector.connect(host='192.168.1.64', user='root', password='root', database='test') # 创建游标 cursor = conn.cursor() # 创建user...
195
0
0
0
0
0
0
0
0
c41242cabbc1d9f4ebb1f328be8bec281136d4b8
2,244
py
Python
src/client_connection.py
philipholler/RocoCup_Soccer_P6
7b9addf665cb5b3a8d501b1ff9c064d501cf5aba
[ "Unlicense" ]
5
2020-09-09T08:37:30.000Z
2021-02-04T14:00:50.000Z
src/client_connection.py
philipholler/RocoCup_Soccer_P6
7b9addf665cb5b3a8d501b1ff9c064d501cf5aba
[ "Unlicense" ]
null
null
null
src/client_connection.py
philipholler/RocoCup_Soccer_P6
7b9addf665cb5b3a8d501b1ff9c064d501cf5aba
[ "Unlicense" ]
1
2021-02-04T14:34:07.000Z
2021-02-04T14:34:07.000Z
""" This class is used by both player, trainer, coach and fake monitor for connecting to the server. """
30.739726
96
0.562834
import select import socket import threading import queue import time """ This class is used by both player, trainer, coach and fake monitor for connecting to the server. """ class Connection(threading.Thread): def __init__(self, UDP_IP, UDP_PORT, think, should_print=False): super().__init__() se...
0
0
0
2,046
0
0
0
-40
133
7cf7ca5d1c4f08ec23d732b19690a970aab5acf3
1,514
py
Python
app/cnnLstm/testBug.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
null
null
null
app/cnnLstm/testBug.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
null
null
null
app/cnnLstm/testBug.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
2
2021-04-04T02:45:59.000Z
2022-03-19T09:41:39.000Z
import hydroDL import os from hydroDL.data import dbCsv from hydroDL.model import rnn, crit, train from hydroDL import post from hydroDL import utils import numpy as np rootDB = hydroDL.pathSMAP['DB_L3_NA'] nEpoch = 100 outFolder = os.path.join(hydroDL.pathSMAP['outTest'], 'cnnCond') ty1 = [20150402, 20160401] ty2 = [...
32.913043
79
0.7107
import hydroDL import os from hydroDL.data import dbCsv from hydroDL.model import rnn, crit, train from hydroDL import post from hydroDL import utils import numpy as np rootDB = hydroDL.pathSMAP['DB_L3_NA'] nEpoch = 100 outFolder = os.path.join(hydroDL.pathSMAP['outTest'], 'cnnCond') ty1 = [20150402, 20160401] ty2 = [...
0
0
0
0
0
0
0
0
0
5a0ef45a7fe3715ecfa7bc5baff0d7c8355b52ae
1,179
py
Python
app/blog/admin.py
elevoro/pyweb1
35ba9fba2f28edd32b418ca29668cbf69872e97b
[ "Apache-2.0" ]
null
null
null
app/blog/admin.py
elevoro/pyweb1
35ba9fba2f28edd32b418ca29668cbf69872e97b
[ "Apache-2.0" ]
null
null
null
app/blog/admin.py
elevoro/pyweb1
35ba9fba2f28edd32b418ca29668cbf69872e97b
[ "Apache-2.0" ]
null
null
null
# # `settings.py` from django.conf.locale.ru import formats as ru_formats ru_formats.DATETIME_FORMAT = "d.m.Y H:i:s"
36.84375
115
0.691264
from django.contrib import admin from .models import Note # Меняем формат вывода даты и времени только для РУССКОЙ локализации # Для всего сайта надо поместить этот код в `settings.py` from django.conf.locale.ru import formats as ru_formats ru_formats.DATETIME_FORMAT = "d.m.Y H:i:s" @admin.register(Note) class Note...
544
689
0
0
0
0
0
14
68
c736e148c03c91a537b9ec7316e96d6a76ff42e0
2,535
py
Python
custom_model_runner/datarobot_drum/resource/components/Python/python_fit/python_fit.py
Embodimentgeniuslm3/datarobot-user-models
9453482896c6cc27468d829ad037a6f164d3c5a3
[ "Apache-2.0" ]
null
null
null
custom_model_runner/datarobot_drum/resource/components/Python/python_fit/python_fit.py
Embodimentgeniuslm3/datarobot-user-models
9453482896c6cc27468d829ad037a6f164d3c5a3
[ "Apache-2.0" ]
9
2021-11-10T20:16:41.000Z
2022-03-12T00:59:05.000Z
custom_model_runner/datarobot_drum/resource/components/Python/python_fit/python_fit.py
Embodimentgeniuslm3/datarobot-user-models
9453482896c6cc27468d829ad037a6f164d3c5a3
[ "Apache-2.0" ]
1
2021-06-17T22:05:33.000Z
2021-06-17T22:05:33.000Z
import logging from datarobot_drum.drum.common import LOGGER_NAME_PREFIX logger = logging.getLogger(LOGGER_NAME_PREFIX + "." + __name__)
37.279412
91
0.69783
import logging import sys import os from mlpiper.components.connectable_component import ConnectableComponent from datarobot_drum.drum.common import LOGGER_NAME_PREFIX from datarobot_drum.drum.model_adapter import PythonModelAdapter from datarobot_drum.drum.utils import shared_fit_preprocessing, make_sure_artifact_is...
0
0
0
2,119
0
0
0
142
134
c998f8f32240614a2c3222fbad5a62541cfa2e76
1,952
py
Python
unn/models/networks/fp16_helper.py
zongdaoming/TinyTransformer
8e64f8816117048c388b4b20e3a56760ce149fe3
[ "Apache-2.0" ]
2
2021-08-08T11:23:14.000Z
2021-09-16T04:05:23.000Z
unn/models/networks/fp16_helper.py
zongdaoming/TinyTransformer
8e64f8816117048c388b4b20e3a56760ce149fe3
[ "Apache-2.0" ]
1
2021-08-08T11:25:47.000Z
2021-08-08T11:26:15.000Z
unn/models/networks/fp16_helper.py
zongdaoming/TinyTransformer
8e64f8816117048c388b4b20e3a56760ce149fe3
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn from unn.utils.bn_helper import GroupSyncBatchNorm, FrozenBatchNorm2d def op32_wrapper(func): """Wrapper forward whose input are all tensors and can only handle float""" return forward def setup_fp16(): """Use fp32 for BatchNormal""" torch.nn.BatchNorm2d.forward = op32_wr...
35.490909
81
0.67418
import torch import torch.nn import linklink as link from unn.utils.bn_helper import GroupSyncBatchNorm, FrozenBatchNorm2d from unn.utils.dist_helper import get_world_size def op32_wrapper(func): """Wrapper forward whose input are all tensors and can only handle float""" def forward(self, *args, **kwargs): ...
0
0
0
0
0
1,279
0
29
140
8987825f748c9dd8a438ddeb4923d4e8cff294e9
1,906
py
Python
observations/r/gaba.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
199
2017-07-24T01:34:27.000Z
2022-01-29T00:50:55.000Z
observations/r/gaba.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
46
2017-09-05T19:27:20.000Z
2019-01-07T09:47:26.000Z
observations/r/gaba.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
45
2017-07-26T00:10:44.000Z
2022-03-16T20:44:59.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from observations.util import maybe_download_and_extract def gaba(path): """Effect of pentazocine on post-operative pain (average VAS scores) The table shows, separately...
25.413333
73
0.681007
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv import numpy as np import os import sys from observations.util import maybe_download_and_extract def gaba(path): """Effect of pentazocine on post-operative pain (average ...
0
0
0
0
0
0
0
-25
67
8287189c30775c4d9b66e3f0985dad3603167dd7
2,462
py
Python
mars/tensor/special/tests/test_special_execute.py
sighingnow/mars
c7897fbd144d230fff5edabc1494fb3ff44aa0d2
[ "Apache-2.0" ]
null
null
null
mars/tensor/special/tests/test_special_execute.py
sighingnow/mars
c7897fbd144d230fff5edabc1494fb3ff44aa0d2
[ "Apache-2.0" ]
null
null
null
mars/tensor/special/tests/test_special_execute.py
sighingnow/mars
c7897fbd144d230fff5edabc1494fb3ff44aa0d2
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2018 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
28.964706
77
0.669781
# Copyright 1999-2018 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
0
1,523
0
0
0
0
0
88
193
2cd5958ed1f77aa7768edd9a4bd6bd70956aeb7e
528
py
Python
Python/divide-array-in-sets-of-k-consecutive-numbers.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
Python/divide-array-in-sets-of-k-consecutive-numbers.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
Python/divide-array-in-sets-of-k-consecutive-numbers.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
# Time: O(nlogn) # Space: O(n)
22
41
0.456439
# Time: O(nlogn) # Space: O(n) import collections class Solution(object): def isPossibleDivide(self, nums, k): """ :type nums: List[int] :type k: int :rtype: bool """ count = collections.Counter(nums) for num in sorted(count.keys()): c = count[...
0
0
0
452
0
0
0
-3
46
9d916852ce53c80e378a61f478e6308f882067c2
516
py
Python
offthedialbot/__init__.py
yamiacat/rw-offthedialbot
0bdba20ea438dffca85683a45c24c1305b72268c
[ "MIT" ]
null
null
null
offthedialbot/__init__.py
yamiacat/rw-offthedialbot
0bdba20ea438dffca85683a45c24c1305b72268c
[ "MIT" ]
null
null
null
offthedialbot/__init__.py
yamiacat/rw-offthedialbot
0bdba20ea438dffca85683a45c24c1305b72268c
[ "MIT" ]
null
null
null
"""Holds client subclass of discord.ext.Bot, and registeres commands.""" from offthedialbot.commands import register_commands client = Client(command_prefix='$') register_commands(client)
23.454545
73
0.680233
"""Holds client subclass of discord.ext.Bot, and registeres commands.""" from discord.ext import commands as ext from offthedialbot.commands import register_commands class Client(ext.Bot): def __init__(self, **kwargs): super().__init__(**kwargs) async def on_ready(self): print...
0
0
116
133
0
0
0
18
49
5559d3f86ff66192128d84f8cd4cee7f32026421
27,256
py
Python
src/baseline.py
matejklemen/slovene-coreference-resolution
3dc19c03dcef244c4cc4f6e0415915455014964d
[ "MIT" ]
2
2020-05-15T07:21:59.000Z
2020-05-25T14:36:21.000Z
src/baseline.py
matejklemen/slovene-coreference-resolution
3dc19c03dcef244c4cc4f6e0415915455014964d
[ "MIT" ]
1
2021-12-12T21:27:24.000Z
2021-12-12T21:27:24.000Z
src/baseline.py
matejklemen/slovene-coreference-resolution
3dc19c03dcef244c4cc4f6e0415915455014964d
[ "MIT" ]
1
2021-07-09T09:33:39.000Z
2021-07-09T09:33:39.000Z
import argparse import logging from copy import deepcopy from sklearn.model_selection import KFold import numpy as np import torch import torch.nn as nn import torch.optim as optim from utils import split_into_sets, fixed_split from data import read_corpus parser = argparse.ArgumentParser() parser.add_argument("--mo...
43.890499
136
0.624119
import argparse import json import logging import os import time from collections import Counter from copy import deepcopy from sklearn.model_selection import KFold import metrics import numpy as np import torch import torch.nn as nn import torch.optim as optim from pyjarowinkler import distance as jwdistance from ut...
18
8,976
0
10,860
0
362
0
24
621
f473a73d978683dc8eedbf299e1169c3f6ddf7bd
9,945
py
Python
pysrc/chipmodel.py
yulyugin/xed
428d882e14f4ed3039f8a496ce15727b22d36bc4
[ "Apache-2.0" ]
4
2021-01-10T22:25:31.000Z
2022-01-11T16:55:25.000Z
pysrc/chipmodel.py
yulyugin/xed
428d882e14f4ed3039f8a496ce15727b22d36bc4
[ "Apache-2.0" ]
2
2021-01-11T11:23:47.000Z
2021-05-12T05:26:30.000Z
pysrc/chipmodel.py
yulyugin/xed
428d882e14f4ed3039f8a496ce15727b22d36bc4
[ "Apache-2.0" ]
2
2020-10-02T03:07:50.000Z
2021-12-29T14:42:25.000Z
#!/usr/bin/env python # -*- python -*- #BEGIN_LEGAL # #Copyright (c) 2019 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE...
32.606557
108
0.550025
#!/usr/bin/env python # -*- python -*- #BEGIN_LEGAL # #Copyright (c) 2019 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE...
0
0
0
114
0
6,859
0
-25
357
9aad83d1690d096a194457d33ff8763d7215e54c
5,582
py
Python
dataset_generation/complete_dataset.py
inzva/fake-academic-paper-generation
294fb4f218ea1d04c705f0649fa715f09122bf8a
[ "MIT" ]
48
2019-03-27T09:36:38.000Z
2022-03-12T17:26:15.000Z
dataset_generation/complete_dataset.py
inzva/fake-academic-paper-generation
294fb4f218ea1d04c705f0649fa715f09122bf8a
[ "MIT" ]
3
2019-05-29T14:41:54.000Z
2022-01-31T08:13:11.000Z
dataset_generation/complete_dataset.py
inzva/fake-academic-paper-generation
294fb4f218ea1d04c705f0649fa715f09122bf8a
[ "MIT" ]
11
2019-03-27T23:01:04.000Z
2021-12-22T02:49:53.000Z
import urllib.request import shutil import os import tarfile import random import glob from TexSoup import TexSoup def import_resolve(tex, path): """Resolve all imports and update the parse tree. Reads from a tex file and once finished, writes to a tex file. """ soup = TexSoup(tex) dir_path = os....
34.45679
114
0.636869
import urllib.request import shutil import os import tarfile import random import glob from TexSoup import TexSoup def import_resolve(tex, path): """Resolve all imports and update the parse tree. Reads from a tex file and once finished, writes to a tex file. """ soup = TexSoup(tex) dir_path = os....
0
0
0
0
0
0
0
0
0
83a84cea668e3969d4b8309e6347b88e0dabf9bf
1,123
py
Python
setup.py
plechoss/mobilipy
3bf54fe11defe186228af99d01de82bf11f0b590
[ "MIT" ]
null
null
null
setup.py
plechoss/mobilipy
3bf54fe11defe186228af99d01de82bf11f0b590
[ "MIT" ]
null
null
null
setup.py
plechoss/mobilipy
3bf54fe11defe186228af99d01de82bf11f0b590
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages VERSION = '0.1.11' DESCRIPTION = 'A mobility analysis package developed at the Swiss Data Science Center' with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() # Setting up setup( # the name must match the folder name 'sdscmob' ...
36.225806
86
0.620659
from setuptools import setup, find_packages VERSION = '0.1.11' DESCRIPTION = 'A mobility analysis package developed at the Swiss Data Science Center' with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() # Setting up setup( # the name must match the folder name 'sdscmob' ...
0
0
0
0
0
0
0
0
0
3d2a8ff32e8b426f13ca531209da3986ea8f7272
7,995
py
Python
conary/conaryclient/newtrove.py
sassoftware/conary
d418968acd5e11ee17ed6d91ca395ea10a040222
[ "Apache-2.0" ]
43
2015-03-31T01:37:10.000Z
2021-11-14T16:26:48.000Z
conary/conaryclient/newtrove.py
sassoftware/conary
d418968acd5e11ee17ed6d91ca395ea10a040222
[ "Apache-2.0" ]
9
2015-06-10T16:39:41.000Z
2020-01-27T16:35:01.000Z
conary/conaryclient/newtrove.py
sassoftware/conary
d418968acd5e11ee17ed6d91ca395ea10a040222
[ "Apache-2.0" ]
9
2015-04-07T08:12:37.000Z
2020-01-26T09:54:18.000Z
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
43.216216
111
0.606754
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
0
0
0
7,073
0
0
0
69
156
160d40bb2e34088d43b3735484560278b33c2aae
472
py
Python
Circumference.py
WOLF2503/Python-Program
12d74b7e1df3a8fe34aabc6c757c71da40e1b309
[ "CC0-1.0" ]
null
null
null
Circumference.py
WOLF2503/Python-Program
12d74b7e1df3a8fe34aabc6c757c71da40e1b309
[ "CC0-1.0" ]
null
null
null
Circumference.py
WOLF2503/Python-Program
12d74b7e1df3a8fe34aabc6c757c71da40e1b309
[ "CC0-1.0" ]
null
null
null
radius = int(input("Please Enter Radius of the Circle: ")) Rate = int(input("Please Enter Rate of Fencing: ")) #now calculating the area of circle area = 3.146 * 3.146 * radius print("The Area of the Circle is ", area) #now calculating the circumference circumference = 3.146 * 2 * radius print("The Circumference...
39.333333
60
0.720339
radius = int(input("Please Enter Radius of the Circle: ")) Rate = int(input("Please Enter Rate of Fencing: ")) #now calculating the area of circle area = 3.146 * 3.146 * radius print("The Area of the Circle is ", area) #now calculating the circumference circumference = 3.146 * 2 * radius print("The Circumference...
0
0
0
0
0
0
0
0
0
fdc74bce46c7eaadd41b6418caf80613b864ad4d
3,820
py
Python
tools/main_variableslist_example.py
alpavlenko/EvoGuess
19bc54e75cd959e445becda16fa6f488f0fb2367
[ "MIT" ]
null
null
null
tools/main_variableslist_example.py
alpavlenko/EvoGuess
19bc54e75cd959e445becda16fa6f488f0fb2367
[ "MIT" ]
null
null
null
tools/main_variableslist_example.py
alpavlenko/EvoGuess
19bc54e75cd959e445becda16fa6f488f0fb2367
[ "MIT" ]
null
null
null
import json from util import build from output import Output from method import Method from executor import Executor from function import Function from instance import Instance from algorithm import Algorithm if __name__ == '__main__': args = json.dumps({ 'algorithm': { 'mu': 1, 'lmbda': 1, ...
34.414414
120
0.421728
import json from util import build from output import Output from method import Method from executor import Executor from function import Function from instance import Instance from algorithm import Algorithm if __name__ == '__main__': args = json.dumps({ 'algorithm': { 'mu': 1, 'lmbda': 1, ...
0
0
0
0
0
0
0
0
0
55c59da0ac219a0cb5c2d7658dacfc7ae2cac9dd
2,269
py
Python
onlinecourse/admin.py
pedruntu/IBM_PROJ_01
e5148c4547c4ef8c1a924e4e323f0a83a472a053
[ "Apache-2.0" ]
null
null
null
onlinecourse/admin.py
pedruntu/IBM_PROJ_01
e5148c4547c4ef8c1a924e4e323f0a83a472a053
[ "Apache-2.0" ]
null
null
null
onlinecourse/admin.py
pedruntu/IBM_PROJ_01
e5148c4547c4ef8c1a924e4e323f0a83a472a053
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin # <HINT> Import any new Models here from .models import Course, Enrollment, Lesson, Instructor, Learner from .models import Question, Choice, Submission # <HINT> Register QuestionInline and ChoiceInline classes here # Register your models here. # <HINT> Register Question and C...
25.784091
67
0.72543
from django.contrib import admin # <HINT> Import any new Models here from .models import Course, Enrollment, Lesson, Instructor, Learner from .models import Question, Choice,Submission, Answer # <HINT> Register QuestionInline and ChoiceInline classes here class QuestionInline(admin.StackedInline): model = Question...
0
0
0
1,145
0
0
0
7
273
2b7318bcc2e9795bc5458f0adc423fa43b6155e5
1,505
py
Python
bookmark_merger.py
nmogadas/bookmark-merger
50b6b82f550dfb4c357764e94b5182f03cd0ba92
[ "MIT" ]
7
2016-10-29T02:17:15.000Z
2018-09-12T06:07:28.000Z
bookmark_merger.py
nmogadas/bookmark-merger
50b6b82f550dfb4c357764e94b5182f03cd0ba92
[ "MIT" ]
1
2016-08-30T20:35:07.000Z
2017-03-07T21:57:28.000Z
bookmark_merger.py
nmogadas/bookmark-merger
50b6b82f550dfb4c357764e94b5182f03cd0ba92
[ "MIT" ]
null
null
null
first_file_name = input('Enter first file name, including extension: ') second_file_name = input('Enter second file name, including extension: ') first_file = open(first_file_name, 'r') second_file = open(second_file_name, 'r') first_file_header = first_file.readline() second_file_header = second_file.readline() ...
27.363636
85
0.769435
import io from bookmark_helper import * first_file_name = input('Enter first file name, including extension: ') second_file_name = input('Enter second file name, including extension: ') first_file = open(first_file_name, 'r') second_file = open(second_file_name, 'r') first_file_header = first_file.readline() sec...
0
0
0
0
0
0
0
-4
45
a80a06f8f88de3f79fabf5f0d416292682580724
1,831
py
Python
scripts/feature_def_gen/get_clinical_schema.py
isb-cgc/ISB-CGC-Webapp
52ed5366ee295e938108a4687bad551a8dee6b34
[ "Apache-2.0" ]
13
2016-01-14T02:43:10.000Z
2020-11-25T20:43:05.000Z
scripts/feature_def_gen/get_clinical_schema.py
isb-cgc/ISB-CGC-Webapp
52ed5366ee295e938108a4687bad551a8dee6b34
[ "Apache-2.0" ]
84
2015-11-20T02:03:33.000Z
2021-10-14T19:24:24.000Z
scripts/feature_def_gen/get_clinical_schema.py
isb-cgc/ISB-CGC-Webapp
52ed5366ee295e938108a4687bad551a8dee6b34
[ "Apache-2.0" ]
5
2015-11-25T19:29:53.000Z
2019-09-04T17:37:52.000Z
# # Copyright 2015-2019, Institute for Systems Biology # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
31.033898
96
0.719825
# # Copyright 2015-2019, Institute for Systems Biology # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
0
0
0
0
0
888
0
99
203
8eac257f2a4c0ac94b08f5a35eeb0d35a25a384c
7,033
py
Python
aioredis_wrapper/lock.py
waves-trading/aioredis_wrapper
fb466103b23b684f3ef8c42e2e02d06088f94ea0
[ "MIT" ]
null
null
null
aioredis_wrapper/lock.py
waves-trading/aioredis_wrapper
fb466103b23b684f3ef8c42e2e02d06088f94ea0
[ "MIT" ]
null
null
null
aioredis_wrapper/lock.py
waves-trading/aioredis_wrapper
fb466103b23b684f3ef8c42e2e02d06088f94ea0
[ "MIT" ]
null
null
null
""""""
32.864486
131
0.55069
"""""" import asyncio import hashlib from typing import Optional from uuid import uuid4 from .redis import RedisConnection class BaseLockException(Exception): pass class LockException(BaseLockException): """""" pass class ReleaseLockException(BaseLockException): """""" pass class Lock(objec...
0
827
4,738
1,224
0
0
0
6
226
f0f906b997ae0ec79516c62debe0e83199d4753b
5,507
py
Python
pythia/tasks/captioning/youcookII/get_pythia_caption_and_vsepp_score.py
ascott02/pythia
bcccd4868d6c4a4a8d32ac92a674689551df7267
[ "BSD-3-Clause" ]
null
null
null
pythia/tasks/captioning/youcookII/get_pythia_caption_and_vsepp_score.py
ascott02/pythia
bcccd4868d6c4a4a8d32ac92a674689551df7267
[ "BSD-3-Clause" ]
null
null
null
pythia/tasks/captioning/youcookII/get_pythia_caption_and_vsepp_score.py
ascott02/pythia
bcccd4868d6c4a4a8d32ac92a674689551df7267
[ "BSD-3-Clause" ]
null
null
null
# python get_pythia_caption_and_vsepp_score.py -o youcookII_pythia_json_files -i youcookII_json_files # annotations_file = "/home/ascott/data/youcookII/YouCookII/annotations/youcookii_annotations_trainval.json" # fcnn_features_dir = "/home/ascott/data/pythia/youcookII_features/training_features_vmb" # resnet_features...
32.017442
117
0.563102
import argparse import glob import json import os import numpy as np import requests import sys # python get_pythia_caption_and_vsepp_score.py -o youcookII_pythia_json_files -i youcookII_json_files from pythia.utils.text_utils import tokenize # annotations_file = "/home/ascott/data/youcookII/YouCookII/annotations/yo...
0
0
0
4,684
0
0
0
-35
200
c517b206c63f705d8c7effc9daae26aad8115d7e
2,273
py
Python
recover_corrupt.py
martengooz/github-scraper
c6a04df030d7a0657fa71e30bc6f32f3f076ff84
[ "MIT" ]
1
2019-04-22T18:12:58.000Z
2019-04-22T18:12:58.000Z
recover_corrupt.py
martengooz/github-scraper
c6a04df030d7a0657fa71e30bc6f32f3f076ff84
[ "MIT" ]
null
null
null
recover_corrupt.py
martengooz/github-scraper
c6a04df030d7a0657fa71e30bc6f32f3f076ff84
[ "MIT" ]
null
null
null
import requests import pause import json import time import datetime import re import grequests import sys import os page = "hej" baseurl = "https://api.github.com/" # Get token f = open("token","r") username = f.readline() token = f.readline().rstrip('\n') f.close() #read data with open('reposfinal') as data_file:...
21.855769
99
0.638803
import requests import pause import json import time import datetime import re import grequests import sys import os page = "hej" baseurl = "https://api.github.com/" # Get token f = open("token","r") username = f.readline() token = f.readline().rstrip('\n') f.close() #read data with open('reposfinal') as data_file:...
0
0
0
0
0
724
0
0
92
b29e59dcf341465d7df28b746e29d072ce597d51
4,871
py
Python
lib/methods/git.py
factorial-io/fabalicious
56672b0007dd00aa80c2cc2d1f5138211bcd4c22
[ "MIT" ]
13
2015-06-25T16:49:55.000Z
2019-06-02T08:06:43.000Z
lib/methods/git.py
factorial-io/fabalicious
56672b0007dd00aa80c2cc2d1f5138211bcd4c22
[ "MIT" ]
50
2015-03-04T22:09:48.000Z
2019-03-02T15:55:53.000Z
lib/methods/git.py
factorial-io/fabalicious
56672b0007dd00aa80c2cc2d1f5138211bcd4c22
[ "MIT" ]
4
2015-03-02T15:51:10.000Z
2017-10-23T10:06:47.000Z
import logging log = logging.getLogger('fabric.fabalicious.git')
30.829114
88
0.628413
import logging log = logging.getLogger('fabric.fabalicious.git') from base import BaseMethod from fabric.api import * from lib.utils import validate_dict from lib.configuration import data_merge from lib import configuration class GitMethod(BaseMethod): @staticmethod def supports(methodName): return methodNam...
0
588
0
4,034
0
0
0
50
134
258a0b8db6764285a0c6f49457db77dc3abbe76d
25,801
py
Python
src/python_pachyderm/proto/transaction/transaction_pb2.py
barretthinson/python-pachyderm
82cea22d1105d70833a5522ccac750ca521694ff
[ "Apache-2.0" ]
null
null
null
src/python_pachyderm/proto/transaction/transaction_pb2.py
barretthinson/python-pachyderm
82cea22d1105d70833a5522ccac750ca521694ff
[ "Apache-2.0" ]
null
null
null
src/python_pachyderm/proto/transaction/transaction_pb2.py
barretthinson/python-pachyderm
82cea22d1105d70833a5522ccac750ca521694ff
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: client/transaction/transaction.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbo...
39.270928
2,898
0.78028
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: client/transaction/transaction.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbo...
0
0
0
0
0
0
0
0
0
1a57298f8d0d839864edae5c723d90da3ba076d9
1,246
py
Python
util/CountMarks.py
ransalmo/data-augmentation-scripts
d4f298c31b60cbc65ca2bee0f352497cd4cb0091
[ "MIT" ]
null
null
null
util/CountMarks.py
ransalmo/data-augmentation-scripts
d4f298c31b60cbc65ca2bee0f352497cd4cb0091
[ "MIT" ]
null
null
null
util/CountMarks.py
ransalmo/data-augmentation-scripts
d4f298c31b60cbc65ca2bee0f352497cd4cb0091
[ "MIT" ]
null
null
null
# coding=utf-8 import os import xml.etree.ElementTree as ET import matplotlib.pyplot as plt path = os.path.join(os.getcwd(), 'images', 'annotations') if not os.path.exists(path): raise ValueError('The images\\annotations firectory does not exist') else: files = os.listdir(path) results = {} files =...
31.948718
86
0.629213
# coding=utf-8 import os import xml.etree.ElementTree as ET import matplotlib.pyplot as plt path = os.path.join(os.getcwd(), 'images', 'annotations') if not os.path.exists(path): raise ValueError('The images\\annotations firectory does not exist') else: files = os.listdir(path) results = {} files =...
4
0
0
0
0
0
0
0
0