hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
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
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
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
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f73f8f8f084ef469a06e9033c5a3e4e1d2ff3b06
1,105
py
Python
tests/ace/api/test_apikey.py
ace-ecosystem/ace2-core
a0de6b90f7437a98b1ee6ebcc693fa14f4b13c53
[ "Apache-2.0" ]
null
null
null
tests/ace/api/test_apikey.py
ace-ecosystem/ace2-core
a0de6b90f7437a98b1ee6ebcc693fa14f4b13c53
[ "Apache-2.0" ]
11
2020-12-30T03:13:09.000Z
2021-05-02T14:09:32.000Z
tests/ace/api/test_apikey.py
ace-ecosystem/ace2-core
a0de6b90f7437a98b1ee6ebcc693fa14f4b13c53
[ "Apache-2.0" ]
1
2022-03-16T20:44:16.000Z
2022-03-16T20:44:16.000Z
import uuid from ace.api.apikey import ApiKey import pytest key_value = "5dbc0b66-fcf7-4b98-a0f4-59e523dbba92" key_name = "test" key_description = "test description" key_is_admin = False @pytest.mark.parametrize( "key", [ ApiKey(api_key=key_value, name=key_name, description=key_description, is_admi...
25.113636
101
0.700452
import uuid from ace.api.apikey import ApiKey import pytest key_value = "5dbc0b66-fcf7-4b98-a0f4-59e523dbba92" key_name = "test" key_description = "test description" key_is_admin = False @pytest.mark.parametrize( "key", [ ApiKey(api_key=key_value, name=key_name, description=key_description, is_admi...
true
true
f73f9075e8bcea636474d5071cc61b4ef8f1a19f
1,761
py
Python
setup.py
nasifimtiazohi/changelogs
bd53faf6993580627edb492cd221558b43d004c7
[ "MIT" ]
54
2017-01-12T09:44:49.000Z
2022-02-01T18:15:07.000Z
setup.py
pyupio/changelogs
bd53faf6993580627edb492cd221558b43d004c7
[ "MIT" ]
254
2016-12-23T12:53:52.000Z
2021-11-23T14:59:01.000Z
setup.py
nasifimtiazohi/changelogs
bd53faf6993580627edb492cd221558b43d004c7
[ "MIT" ]
26
2017-02-25T08:21:05.000Z
2022-01-10T15:46:24.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ 'requests', 'validators', 'packaging', 'lxml', 'gitchang...
23.171053
49
0.613856
from setuptools import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ 'requests', 'validators', 'packaging', 'lxml', 'gitchangelog' ] test_requirements = [ 'mock', ...
true
true
f73f909fdaef0f6545abf7adf8377ec1a8b30bd5
855
py
Python
formats/sound/sample_transform.py
C3RV1/LaytonEditor
51e1a9a372a8acdaa4183ae008235a721dc56cdc
[ "Unlicense" ]
6
2019-12-24T00:18:54.000Z
2022-02-28T17:09:22.000Z
formats/sound/sample_transform.py
C3RV1/LaytonEditor
51e1a9a372a8acdaa4183ae008235a721dc56cdc
[ "Unlicense" ]
1
2021-08-18T11:10:35.000Z
2021-08-18T17:32:21.000Z
formats/sound/sample_transform.py
C3RV1/LaytonEditor
51e1a9a372a8acdaa4183ae008235a721dc56cdc
[ "Unlicense" ]
2
2021-01-17T10:42:48.000Z
2021-08-18T11:10:54.000Z
import math import numpy as np def change_sample_rate(buffer: np.ndarray, current, target) -> np.ndarray: shape = [0, 0] shape[0] = buffer.shape[0] # RATEo = SAMPLESo # RATEm = (SAMPLESo / RATEo) * RATEm extend = target / current shape[1] = int(math.ceil(buffer.shape[1] * extend)) convert...
29.482759
79
0.625731
import math import numpy as np def change_sample_rate(buffer: np.ndarray, current, target) -> np.ndarray: shape = [0, 0] shape[0] = buffer.shape[0] extend = target / current shape[1] = int(math.ceil(buffer.shape[1] * extend)) converted = np.zeros(shape, dtype=buffer.dtype) for chan...
true
true
f73f936fab2e2ba9c7dfb763566641f590a9b92d
1,069
py
Python
algorithms/02-edge-subdivision/osmnx_hz/district.py
sunmengnan/city_brain
478f0b974f4491b4201956f37b83ce6860712bc8
[ "MIT" ]
null
null
null
algorithms/02-edge-subdivision/osmnx_hz/district.py
sunmengnan/city_brain
478f0b974f4491b4201956f37b83ce6860712bc8
[ "MIT" ]
null
null
null
algorithms/02-edge-subdivision/osmnx_hz/district.py
sunmengnan/city_brain
478f0b974f4491b4201956f37b83ce6860712bc8
[ "MIT" ]
null
null
null
import pandas as pd import osmnx import numpy as np fix = {'西湖区,杭州市,浙江省,中国': 2} city_query = [ '杭州市,浙江省,中国', ] district_query = [ '上城区,杭州市,浙江省,中国', '下城区,杭州市,浙江省,中国', '江干区,杭州市,浙江省,中国', '西湖区,杭州市,浙江省,中国', '拱墅区,杭州市,浙江省,中国', '滨江区,杭州市,浙江省,中国', ] def query_str_to_dic(query_str): result = que...
21.38
67
0.642657
import pandas as pd import osmnx import numpy as np fix = {'西湖区,杭州市,浙江省,中国': 2} city_query = [ '杭州市,浙江省,中国', ] district_query = [ '上城区,杭州市,浙江省,中国', '下城区,杭州市,浙江省,中国', '江干区,杭州市,浙江省,中国', '西湖区,杭州市,浙江省,中国', '拱墅区,杭州市,浙江省,中国', '滨江区,杭州市,浙江省,中国', ] def query_str_to_dic(query_str): result = que...
true
true
f73f94c3158ed613dbc0d80b35b507f9509e5682
212
py
Python
submissions/contains-duplicate/solution.py
Wattyyy/LeetCode
13a9be056d0a0c38c2f8c8222b11dc02cb25a935
[ "MIT" ]
null
null
null
submissions/contains-duplicate/solution.py
Wattyyy/LeetCode
13a9be056d0a0c38c2f8c8222b11dc02cb25a935
[ "MIT" ]
1
2022-03-04T20:24:32.000Z
2022-03-04T20:31:58.000Z
submissions/contains-duplicate/solution.py
Wattyyy/LeetCode
13a9be056d0a0c38c2f8c8222b11dc02cb25a935
[ "MIT" ]
null
null
null
# https://leetcode.com/problems/contains-duplicate class Solution: def containsDuplicate(self, nums): hs = set() for num in nums: hs.add(num) return len(hs) != len(nums)
21.2
50
0.589623
class Solution: def containsDuplicate(self, nums): hs = set() for num in nums: hs.add(num) return len(hs) != len(nums)
true
true
f73f953c8da65da350b82dec261a0027f450116a
3,213
py
Python
ola_convolve.py
shun60s/impulse-response
4bdf8ef671ed0b55afd452a12b43f6fde6cdf3ac
[ "MIT" ]
null
null
null
ola_convolve.py
shun60s/impulse-response
4bdf8ef671ed0b55afd452a12b43f6fde6cdf3ac
[ "MIT" ]
null
null
null
ola_convolve.py
shun60s/impulse-response
4bdf8ef671ed0b55afd452a12b43f6fde6cdf3ac
[ "MIT" ]
null
null
null
#coding:utf-8 # overlap-add convolve with impulse response waveform import sys import os import argparse import numpy as np from scipy import signal from scipy.io.wavfile import read as wavread from scipy.io.wavfile import write as wavwrite # Check version # Python 3.6.4 on win32 (Windows 10) # num...
29.477064
163
0.57423
import sys import os import argparse import numpy as np from scipy import signal from scipy.io.wavfile import read as wavread from scipy.io.wavfile import write as wavwrite def load_wav( path0, force_mono=False): try: sr, y = wavread(path0) except: print...
true
true
f73f963a8a00e3aca23c77a1118759e0f0abab77
446
py
Python
export_as_json.py
UweSausL/GPSTracker
2d9dbc4e516acc4936d17f7fd0b22ed29330eef6
[ "MIT" ]
null
null
null
export_as_json.py
UweSausL/GPSTracker
2d9dbc4e516acc4936d17f7fd0b22ed29330eef6
[ "MIT" ]
1
2020-08-26T16:42:29.000Z
2020-08-26T16:42:29.000Z
export_as_json.py
UweSausL/GPSTracker
2d9dbc4e516acc4936d17f7fd0b22ed29330eef6
[ "MIT" ]
null
null
null
import os import json import redis redis_connection = redis.Redis(decode_responses=True) if not os.path.isdir('logs_json'): os.mkdir('logs_json') for key in redis_connection.scan_iter('*'): file_name = 'logs_json/' + '_'.join(key.split(':')) + '.json' print(key) data = redis_connection.lrange(key, 0,...
24.777778
65
0.612108
import os import json import redis redis_connection = redis.Redis(decode_responses=True) if not os.path.isdir('logs_json'): os.mkdir('logs_json') for key in redis_connection.scan_iter('*'): file_name = 'logs_json/' + '_'.join(key.split(':')) + '.json' print(key) data = redis_connection.lrange(key, 0,...
true
true
f73f971fddea21290772fc19e89a9f41717e09d9
2,655
py
Python
Dashboard/specs.py
jviteMx/AMDCapstone
fd38b3e68e34ee5aa30f8c13d200bf97d748b623
[ "MIT" ]
3
2020-12-10T19:12:01.000Z
2021-06-24T04:41:51.000Z
Dashboard/specs.py
jviteMx/AMDCapstone
fd38b3e68e34ee5aa30f8c13d200bf97d748b623
[ "MIT" ]
11
2021-01-07T19:14:05.000Z
2021-04-29T17:32:25.000Z
docker-combined/dashboard/specs.py
jviteMx/AMDCapstone
fd38b3e68e34ee5aa30f8c13d200bf97d748b623
[ "MIT" ]
4
2021-01-29T22:21:45.000Z
2021-04-30T23:06:35.000Z
# MIT License # This project is a software package to automate the performance tracking of the HPC algorithms # Copyright (c) 2021. Victor Tuah Kumi, Ahmed Iqbal, Javier Vite, Aidan Forester # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation...
45
95
0.587194
import model def get_specs(hardware_ids, rocm_versions): specs_info = [] for rocm in rocm_versions: for hardw_id in hardware_ids: specs = model.get_specs(hardw_id, rocm) if specs is not None: title = f'{rocm} specs' info ...
true
true
f73f978df52d5ba10b3f36b4f31c6e6c2d651a90
582
py
Python
Put_This_Folder_Contents_in_C_Driver/GHPlotLib/PythonInits/GHPL_contour_Plt.py
MahmoudAbdelRahman/GhPlotLib
30a3b627a1770e1dcb5e90bdbde988b1290512e6
[ "BSD-2-Clause" ]
11
2017-06-10T22:16:13.000Z
2021-09-26T09:44:11.000Z
Put_This_Folder_Contents_in_C_Driver/GHPlotLib/PythonInits/GHPL_contour_Plt.py
MahmoudAbdelRahman/GhPlotLib
30a3b627a1770e1dcb5e90bdbde988b1290512e6
[ "BSD-2-Clause" ]
null
null
null
Put_This_Folder_Contents_in_C_Driver/GHPlotLib/PythonInits/GHPL_contour_Plt.py
MahmoudAbdelRahman/GhPlotLib
30a3b627a1770e1dcb5e90bdbde988b1290512e6
[ "BSD-2-Clause" ]
6
2017-08-01T10:13:33.000Z
2021-09-25T17:52:04.000Z
# -*- coding: utf-8 -*- """ Created on Sun Jun 18 04:08:56 2017 @author: Mahmoud M. Abdelrahman GHPL_contour """ import numpy as np import matplotlib.pyplot as plt data = "##input##" cmap = '##cmap##' levels = ##levels## workingDir = "##workingDir##" fileNameString = "##fileNameString##" openDat...
18.1875
71
0.642612
""" Created on Sun Jun 18 04:08:56 2017 @author: Mahmoud M. Abdelrahman GHPL_contour """ import numpy as np import matplotlib.pyplot as plt data = "##input##" cmap = '##cmap##' levels = "##workingDir##" fileNameString = "##fileNameString##" openData = open(data, 'r') data = openData.read() data ...
false
true
f73f97f4860bc026d7b7fbe60dca77d7f5fa820f
2,065
py
Python
Synthesis/units.py
pablorutschmann/3DPopSynthesis
6c2206bef0cf0b0dc21aeb6cbda6386a525ffbc7
[ "MIT" ]
null
null
null
Synthesis/units.py
pablorutschmann/3DPopSynthesis
6c2206bef0cf0b0dc21aeb6cbda6386a525ffbc7
[ "MIT" ]
null
null
null
Synthesis/units.py
pablorutschmann/3DPopSynthesis
6c2206bef0cf0b0dc21aeb6cbda6386a525ffbc7
[ "MIT" ]
null
null
null
import astropy.constants as astroconst from astropy import units as u import numpy as np # Defining Constants # AU in cm au = astroconst.au.decompose(u.cgs.bases).value # Jupiter Radius in cm # R_J = astroconst.R_jup.decompose(u.cgs.bases).value R_J = astroconst.R_jup.decompose(u.cgs.bases).value # Jupiter Radius sq...
20.65
78
0.715738
import astropy.constants as astroconst from astropy import units as u import numpy as np au = astroconst.au.decompose(u.cgs.bases).value R_J = astroconst.R_jup.decompose(u.cgs.bases).value R_J2 = R_J ** 2 M_J = astroconst.M_jup.decompose(u.cgs.bases).value R_S = astroconst.R_sun.decompose(u.cgs.bases).valu...
true
true
f73f982d51bce455f556a08b6f3c83529ec286cd
7,733
py
Python
plugins/opencv/src/opencv/__init__.py
erikolofsson/scrypted
39016a617464003cac13719a426eefcc2421e51a
[ "MIT" ]
null
null
null
plugins/opencv/src/opencv/__init__.py
erikolofsson/scrypted
39016a617464003cac13719a426eefcc2421e51a
[ "MIT" ]
null
null
null
plugins/opencv/src/opencv/__init__.py
erikolofsson/scrypted
39016a617464003cac13719a426eefcc2421e51a
[ "MIT" ]
null
null
null
from __future__ import annotations from time import sleep from detect import DetectionSession, DetectPlugin from typing import Any, List import numpy as np import cv2 import imutils from gi.repository import GLib, Gst from scrypted_sdk.types import ObjectDetectionModel, ObjectDetectionResult, ObjectsDetected class Ope...
38.472637
184
0.608431
from __future__ import annotations from time import sleep from detect import DetectionSession, DetectPlugin from typing import Any, List import numpy as np import cv2 import imutils from gi.repository import GLib, Gst from scrypted_sdk.types import ObjectDetectionModel, ObjectDetectionResult, ObjectsDetected class Ope...
true
true
f73f99b4f33f87d5032eaeea1002643918e72a45
403
py
Python
constants.py
Medouni/telegram-bot-cf
15b3434b10573ff59d8f3a065322c6e196ce23a3
[ "MIT" ]
null
null
null
constants.py
Medouni/telegram-bot-cf
15b3434b10573ff59d8f3a065322c6e196ce23a3
[ "MIT" ]
null
null
null
constants.py
Medouni/telegram-bot-cf
15b3434b10573ff59d8f3a065322c6e196ce23a3
[ "MIT" ]
1
2021-03-06T19:11:42.000Z
2021-03-06T19:11:42.000Z
# CloudFoundry (Heroku, IBM, etc.) HOST = "0.0.0.0" PORT = 8080 WEBHOOK_URI = None # Telegram PROXY = 'socks5://1.171.182.155:1080' ENDPOINT = 'https://api.telegram.org' # Text constants MSG_GREETING = (f"Hi there, I am EchoBot. " f"I am here to echo your kind words back to you. " f"J...
25.1875
83
0.60794
HOST = "0.0.0.0" PORT = 8080 WEBHOOK_URI = None PROXY = 'socks5://1.171.182.155:1080' ENDPOINT = 'https://api.telegram.org' MSG_GREETING = (f"Hi there, I am EchoBot. " f"I am here to echo your kind words back to you. " f"Just say anything nice and I'll say the exact same thing to y...
true
true
f73f99da83a275c64d6ac55705003bb615091af8
153
py
Python
Week20190508/CH01_16.py
wrightgarr/PYTHON_416
0accadc214b8d7b0140be6bc61222e2286ae72fa
[ "MIT" ]
null
null
null
Week20190508/CH01_16.py
wrightgarr/PYTHON_416
0accadc214b8d7b0140be6bc61222e2286ae72fa
[ "MIT" ]
null
null
null
Week20190508/CH01_16.py
wrightgarr/PYTHON_416
0accadc214b8d7b0140be6bc61222e2286ae72fa
[ "MIT" ]
null
null
null
def sigma_days(days, daily_sigma): return days*daily_sigma sigma10 = sigma_days(10, 0.2) print("The 10-day volatility is ${0:.2f}".format(sigma10))
19.125
58
0.72549
def sigma_days(days, daily_sigma): return days*daily_sigma sigma10 = sigma_days(10, 0.2) print("The 10-day volatility is ${0:.2f}".format(sigma10))
true
true
f73f99f34d2bb49184367ae61ec7e7ec902044fb
966
py
Python
src/scs_core/sys/logging.py
south-coast-science/scs_core
81ad4010abb37ca935f3a31ac805639ef53b1bcf
[ "MIT" ]
3
2019-03-12T01:59:58.000Z
2020-09-12T07:27:42.000Z
src/scs_core/sys/logging.py
south-coast-science/scs_core
81ad4010abb37ca935f3a31ac805639ef53b1bcf
[ "MIT" ]
1
2018-04-20T07:58:38.000Z
2021-03-27T08:52:45.000Z
src/scs_core/sys/logging.py
south-coast-science/scs_core
81ad4010abb37ca935f3a31ac805639ef53b1bcf
[ "MIT" ]
4
2017-09-29T13:08:43.000Z
2019-10-09T09:13:58.000Z
""" Created on 20 Jan 2021 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) https://realpython.com/python-logging/ """ import logging import sys # -------------------------------------------------------------------------------------------------------------------- # noinspection PyPep8Naming class Loggin...
23.560976
118
0.511387
import logging import sys class Logging(object): __NAME = None __MULTI_FORMAT = '%(name)s: %(message)s' @classmethod def config(cls, name, verbose=False, level=logging.ERROR, stream=sys.stderr): cls.__NAME = name level = logging.INFO if verbose else level logging...
true
true
f73f99f5c6bc8e37a9204d4a16a4a6e113fe5dfc
16,991
py
Python
Bot/Botconnection.py
Pyruths/DiscordRPbot
87d4235fbec060f5bbcfabb6f2202913612ce28c
[ "MIT" ]
null
null
null
Bot/Botconnection.py
Pyruths/DiscordRPbot
87d4235fbec060f5bbcfabb6f2202913612ce28c
[ "MIT" ]
19
2018-06-21T10:51:13.000Z
2018-06-28T01:38:38.000Z
Bot/Botconnection.py
Pyruths/DiscordRPbot
87d4235fbec060f5bbcfabb6f2202913612ce28c
[ "MIT" ]
null
null
null
""" Author : Robin Phoeng Date : 24/06/2018 """ import discord from discord.ext.commands import Bot from discord.ext import commands import asyncio import time import random from Game import Game import DiscordUtility import BarFactory from Bar import Box Client = discord.Client() bot = commands....
29.44714
115
0.55447
import discord from discord.ext.commands import Bot from discord.ext import commands import asyncio import time import random from Game import Game import DiscordUtility import BarFactory from Bar import Box Client = discord.Client() bot = commands.Bot(command_prefix="!") playerRole = None GMRole =...
true
true
f73f9b112de272e505cb728a2db1c9467a469b1c
391
py
Python
parking/wsgi.py
thiagomurtinho/djangoStudies
c17e922980f5f2944616fb6f6c7365f19ce07016
[ "MIT" ]
null
null
null
parking/wsgi.py
thiagomurtinho/djangoStudies
c17e922980f5f2944616fb6f6c7365f19ce07016
[ "MIT" ]
null
null
null
parking/wsgi.py
thiagomurtinho/djangoStudies
c17e922980f5f2944616fb6f6c7365f19ce07016
[ "MIT" ]
null
null
null
""" WSGI config for parking project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTI...
23
78
0.785166
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'parking.settings') application = get_wsgi_application()
true
true
f73f9b67c3c0ed2952cf1631726144c60e936390
43,544
py
Python
src/radical/entk/appman/appmanager.py
dalg24/radical.entk
4aa68d8de7804e09ca64629035ccda0b79ac0b76
[ "MIT" ]
null
null
null
src/radical/entk/appman/appmanager.py
dalg24/radical.entk
4aa68d8de7804e09ca64629035ccda0b79ac0b76
[ "MIT" ]
null
null
null
src/radical/entk/appman/appmanager.py
dalg24/radical.entk
4aa68d8de7804e09ca64629035ccda0b79ac0b76
[ "MIT" ]
null
null
null
__copyright__ = "Copyright 2017-2018, http://radical.rutgers.edu" __author__ = "Vivek Balasubramanian <vivek.balasubramaniana@rutgers.edu>" __license__ = "MIT" import radical.utils as ru from radical.entk.exceptions import * from radical.entk.pipeline.pipeline import Pipeline from radical.entk.stage.stage import Stage...
45.311134
130
0.50434
__copyright__ = "Copyright 2017-2018, http://radical.rutgers.edu" __author__ = "Vivek Balasubramanian <vivek.balasubramaniana@rutgers.edu>" __license__ = "MIT" import radical.utils as ru from radical.entk.exceptions import * from radical.entk.pipeline.pipeline import Pipeline from radical.entk.stage.stage import Stage...
false
true
f73f9c9ec83fd452dcd6f025882f76f905f91372
2,048
py
Python
centralized/cbs/a_star.py
KSHITIJBITHEL/multi_agent_path_planning
1deb3a6d317ba11ba9b211b5e3c4118801460479
[ "MIT" ]
411
2019-05-31T06:36:03.000Z
2022-03-31T10:24:34.000Z
centralized/cbs/a_star.py
hxdaze/multi_agent_path_planning
b516bcc4fc2099d38bc3a82d046b35cb68ecfeb6
[ "MIT" ]
6
2020-10-16T13:04:56.000Z
2021-11-16T09:36:19.000Z
centralized/cbs/a_star.py
hxdaze/multi_agent_path_planning
b516bcc4fc2099d38bc3a82d046b35cb68ecfeb6
[ "MIT" ]
131
2019-05-31T07:59:43.000Z
2022-03-18T05:11:28.000Z
""" AStar search author: Ashwin Bose (@atb033) """ class AStar(): def __init__(self, env): self.agent_dict = env.agent_dict self.admissible_heuristic = env.admissible_heuristic self.is_at_goal = env.is_at_goal self.get_neighbors = env.get_neighbors def reconstruct_path(self,...
28.84507
105
0.583008
class AStar(): def __init__(self, env): self.agent_dict = env.agent_dict self.admissible_heuristic = env.admissible_heuristic self.is_at_goal = env.is_at_goal self.get_neighbors = env.get_neighbors def reconstruct_path(self, came_from, current): total_path = [current] ...
true
true
f73f9ce54ee2ea1e5d13bc9e77854e316a49ed8b
1,230
py
Python
webapp/polls/migrations/0001_initial.py
franramirez688/simple-app-django
e8cb17d0ab49244564902d16d5129941b8591c89
[ "MIT" ]
null
null
null
webapp/polls/migrations/0001_initial.py
franramirez688/simple-app-django
e8cb17d0ab49244564902d16d5129941b8591c89
[ "MIT" ]
null
null
null
webapp/polls/migrations/0001_initial.py
franramirez688/simple-app-django
e8cb17d0ab49244564902d16d5129941b8591c89
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-11-22 19:33 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
31.538462
114
0.585366
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Choice', fields=[ ...
true
true
f73f9de7124e8f1e53399ada5aea6b7d489a17fd
8,991
py
Python
download.py
pgalatic/backgrounder
e65cb0395d616f66277a1b6088f1b354c0457b58
[ "MIT" ]
null
null
null
download.py
pgalatic/backgrounder
e65cb0395d616f66277a1b6088f1b354c0457b58
[ "MIT" ]
null
null
null
download.py
pgalatic/backgrounder
e65cb0395d616f66277a1b6088f1b354c0457b58
[ "MIT" ]
null
null
null
# author: Paul Galatic github.com/pgalatic # # file handles downloading images # import os import random import logging import datetime import requests from PIL import Image from reddit import Reddit from PIL import ImageChops from imgur_album_downloader.imguralbum import ImgurAlbumDownloader NO_ERROR = 0 ERR_NOT_IMA...
32.576087
96
0.615504
import os import random import logging import datetime import requests from PIL import Image from reddit import Reddit from PIL import ImageChops from imgur_album_downloader.imguralbum import ImgurAlbumDownloader NO_ERROR = 0 ERR_NOT_IMAGE = 1 ERR_DUPLICATE_IMAGE = 2 ERR_DUPLICATE_GALLERY = 3 def get_logger(): ...
true
true
f73f9e1cc5c2d338e6511f7da9a270608239b3fd
190
py
Python
shoptools/contrib/accounts/__init__.py
gregplaysguitar/django-shoptools
7af9b69409d146b3627931430714b934122a2498
[ "BSD-3-Clause" ]
3
2015-09-11T01:24:25.000Z
2018-08-19T16:47:09.000Z
shoptools/contrib/accounts/__init__.py
gregplaysguitar/django-shoptools
7af9b69409d146b3627931430714b934122a2498
[ "BSD-3-Clause" ]
29
2015-10-06T22:15:50.000Z
2017-12-14T20:50:52.000Z
shoptools/contrib/accounts/__init__.py
gregplaysguitar/django-shoptools
7af9b69409d146b3627931430714b934122a2498
[ "BSD-3-Clause" ]
5
2015-10-05T23:33:51.000Z
2019-01-14T19:49:40.000Z
def get_account(user): from .models import Account return Account.objects.for_user(user) def get_data(request): from .util import account_data return account_data(request)
21.111111
41
0.747368
def get_account(user): from .models import Account return Account.objects.for_user(user) def get_data(request): from .util import account_data return account_data(request)
true
true
f73f9e4214f31ec53980459c18ae248c7e2ac35c
2,700
py
Python
Banking-Inference/code.py
tbhuwan14/ga-learner-dsb-repo
1d2271037214e6203a0ff92bae75aff32964263e
[ "MIT" ]
null
null
null
Banking-Inference/code.py
tbhuwan14/ga-learner-dsb-repo
1d2271037214e6203a0ff92bae75aff32964263e
[ "MIT" ]
null
null
null
Banking-Inference/code.py
tbhuwan14/ga-learner-dsb-repo
1d2271037214e6203a0ff92bae75aff32964263e
[ "MIT" ]
null
null
null
# -------------- import pandas as pd import scipy.stats as stats import math import numpy as np import warnings warnings.filterwarnings('ignore') #Sample_Size sample_size=2000 #Z_Critical Score z_critical = stats.norm.ppf(q = 0.95) # path [File location variable] data=pd.read_csv(path) #C...
23.893805
135
0.678148
import pandas as pd import scipy.stats as stats import math import numpy as np import warnings warnings.filterwarnings('ignore') sample_size=2000 z_critical = stats.norm.ppf(q = 0.95) data=pd.read_csv(path) data_sample=data.sample(n=sample_size,random_state=0) sample_mean=data_sample['insta...
true
true
f73f9e745137460756822d083bce206bf01201b3
1,761
py
Python
demo_realsense.py
ahmed-shariff/robust_hand_tracking
265da51345d65026fea6c4018ee652f295a2192d
[ "MIT" ]
3
2019-11-12T18:46:37.000Z
2020-01-26T08:19:41.000Z
demo_realsense.py
ahmed-shariff/robust_hand_tracking
265da51345d65026fea6c4018ee652f295a2192d
[ "MIT" ]
1
2019-10-07T12:14:36.000Z
2020-08-12T19:46:58.000Z
demo_realsense.py
ahmed-shariff/robust_hand_tracking
265da51345d65026fea6c4018ee652f295a2192d
[ "MIT" ]
1
2019-11-13T16:20:21.000Z
2019-11-13T16:20:21.000Z
from utils import * from darknet import Darknet import cv2 import pyrealsense2 as rs def demo(cfgfile, weightfile): m = Darknet(cfgfile) m.print_network() m.load_weights(weightfile) print('Loading weights from %s... Done!' % (weightfile)) class_names = load_class_names(namesfile) use_cuda = 1...
28.403226
83
0.599091
from utils import * from darknet import Darknet import cv2 import pyrealsense2 as rs def demo(cfgfile, weightfile): m = Darknet(cfgfile) m.print_network() m.load_weights(weightfile) print('Loading weights from %s... Done!' % (weightfile)) class_names = load_class_names(namesfile) use_cuda = 1...
true
true
f73f9ffd549f5a4f8d6b472312582008e26497ed
18,453
py
Python
utility_belt/_version.py
ajsilveira/utility_belt
b593400bdbe1bcda89117615175045f6eefda74a
[ "MIT" ]
null
null
null
utility_belt/_version.py
ajsilveira/utility_belt
b593400bdbe1bcda89117615175045f6eefda74a
[ "MIT" ]
null
null
null
utility_belt/_version.py
ajsilveira/utility_belt
b593400bdbe1bcda89117615175045f6eefda74a
[ "MIT" ]
null
null
null
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
35.418426
79
0.58462
import errno import os import re import subprocess import sys def get_keywords(): git_refnames = "$Format:%d$" git_full = "$Format:%H$" git_date = "$Format:%ci$" keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} return keywords class Version...
true
true
f73fa0079d5e7b4d943b50a571bcacca8bb0bb54
2,558
py
Python
tests/test_algolia.py
Kinto/kinto-algolia
f7bfdf795dc2073a69b7c31df1e650e2b51d05d7
[ "Apache-2.0" ]
null
null
null
tests/test_algolia.py
Kinto/kinto-algolia
f7bfdf795dc2073a69b7c31df1e650e2b51d05d7
[ "Apache-2.0" ]
35
2018-04-11T15:14:42.000Z
2021-06-25T15:18:04.000Z
tests/test_algolia.py
Kinto/kinto-algolia
f7bfdf795dc2073a69b7c31df1e650e2b51d05d7
[ "Apache-2.0" ]
null
null
null
import unittest from unittest import mock from algoliasearch.exceptions import AlgoliaException from . import BaseWebTest class RecordIndexing(BaseWebTest, unittest.TestCase): def setUp(self): self.app.put("/buckets/bid", headers=self.headers) self.app.put("/buckets/bid/collections/cid", header...
41.258065
82
0.582095
import unittest from unittest import mock from algoliasearch.exceptions import AlgoliaException from . import BaseWebTest class RecordIndexing(BaseWebTest, unittest.TestCase): def setUp(self): self.app.put("/buckets/bid", headers=self.headers) self.app.put("/buckets/bid/collections/cid", header...
true
true
f73fa03c62ec20728da0e2ff3d6fb5c4b4237e88
2,870
py
Python
datasets/Pedestron_dataset.py
And1210/SRGAN
200731d6249c674d0ed556ba287ad7a7698f88b5
[ "MIT" ]
null
null
null
datasets/Pedestron_dataset.py
And1210/SRGAN
200731d6249c674d0ed556ba287ad7a7698f88b5
[ "MIT" ]
null
null
null
datasets/Pedestron_dataset.py
And1210/SRGAN
200731d6249c674d0ed556ba287ad7a7698f88b5
[ "MIT" ]
null
null
null
import os import cv2 import numpy as np import pandas as pd from torchvision.transforms import transforms from torch.utils.data import Dataset from datasets.base_dataset import BaseDataset from utils.augmenters.augment import seg import xml.etree.ElementTree as ET from PIL import Image import matplotlib.pyplot as plt ...
36.329114
127
0.64669
import os import cv2 import numpy as np import pandas as pd from torchvision.transforms import transforms from torch.utils.data import Dataset from datasets.base_dataset import BaseDataset from utils.augmenters.augment import seg import xml.etree.ElementTree as ET from PIL import Image import matplotlib.pyplot as plt ...
true
true
f73fa0e7d887021f4475455ce5f0b6fd0e4178c2
2,995
py
Python
sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/cosmos/azure-cosmos/azure/cosmos/_resource_throttle_retry_policy.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# The MIT License (MIT) # Copyright (c) 2014 Microsoft Corporation # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy...
49.098361
112
0.745576
from . import http_constants class ResourceThrottleRetryPolicy(object): def __init__(self, max_retry_attempt_count, fixed_retry_interval_in_milliseconds, max_wait_time_in_seconds): self._max_retry_attempt_count = max_retry_attempt_count self._fixed_retry_interval_in_milliseco...
true
true
f73fa1124cf1d426850b45715f6bb396d2a4bc48
2,448
py
Python
examples/pxScene2d/external/breakpad-chrome_55/gyp/test/mac/gyptest-strip-default.py
madanagopaltcomcast/pxCore
c4a3a40a190521c8b6383d126c87612eca5b3c42
[ "Apache-2.0" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
examples/pxScene2d/external/breakpad-chrome_55/gyp/test/mac/gyptest-strip-default.py
madanagopaltcomcast/pxCore
c4a3a40a190521c8b6383d126c87612eca5b3c42
[ "Apache-2.0" ]
1,432
2017-06-21T04:08:48.000Z
2020-08-25T16:21:15.000Z
examples/pxScene2d/external/breakpad-chrome_55/gyp/test/mac/gyptest-strip-default.py
madanagopaltcomcast/pxCore
c4a3a40a190521c8b6383d126c87612eca5b3c42
[ "Apache-2.0" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that the default STRIP_STYLEs match between different generators. """ import TestGyp import re import subprocess import sys i...
25.5
80
0.717729
""" Verifies that the default STRIP_STYLEs match between different generators. """ import TestGyp import re import subprocess import sys import time if sys.platform == 'darwin': test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) CHDIR='strip' test.run_gyp('test-defaults.gyp', chdir=CHDIR) tes...
false
true
f73fa12df7353fdea2cb2d8967b74c105dccc570
2,328
py
Python
Failed_attempts/bdwmspider_v1_requests.py
MengXiangxi/bdwmspider
fbc210ab70e13117f92838d8c4223c02b0ead207
[ "MIT" ]
null
null
null
Failed_attempts/bdwmspider_v1_requests.py
MengXiangxi/bdwmspider
fbc210ab70e13117f92838d8c4223c02b0ead207
[ "MIT" ]
null
null
null
Failed_attempts/bdwmspider_v1_requests.py
MengXiangxi/bdwmspider
fbc210ab70e13117f92838d8c4223c02b0ead207
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- import requests import time def html_parse(uid, html_content): html_len = len(html_content) uname = "" duty = "user" vip = "NA" for i in range(0, html_len): line_content = html_content[i].strip() if line_content.find("bbsid") >= 1: uname = line_co...
36.952381
74
0.558419
import requests import time def html_parse(uid, html_content): html_len = len(html_content) uname = "" duty = "user" vip = "NA" for i in range(0, html_len): line_content = html_content[i].strip() if line_content.find("bbsid") >= 1: uname = line_content[20:-7] if...
true
true
f73fa1845adfc635af6ad3e8dc1ca3f36ffa130d
2,339
py
Python
bus.py
ondrejtichy07/next-bus
94e8bd954b3c49028bad7c78b8159399f384ffe0
[ "MIT" ]
null
null
null
bus.py
ondrejtichy07/next-bus
94e8bd954b3c49028bad7c78b8159399f384ffe0
[ "MIT" ]
null
null
null
bus.py
ondrejtichy07/next-bus
94e8bd954b3c49028bad7c78b8159399f384ffe0
[ "MIT" ]
null
null
null
import requests import re import time import os from datetime import datetime, timezone from bs4 import BeautifulSoup from sty import fg, bg, ef, rs URL = "https://pid.cz/zastavkova-tabla/?stop=Hlavn%C3%AD&stanoviste=A" def get_data(): try: req = requests.get(URL) soup = BeautifulSoup(req.conten...
33.414286
129
0.475844
import requests import re import time import os from datetime import datetime, timezone from bs4 import BeautifulSoup from sty import fg, bg, ef, rs URL = "https://pid.cz/zastavkova-tabla/?stop=Hlavn%C3%AD&stanoviste=A" def get_data(): try: req = requests.get(URL) soup = BeautifulSoup(req.conten...
true
true
f73fa1f78a5053b83d747fb873f6f3145e19d93a
5,482
py
Python
PyMesh/third_party/pybind11/tests/test_iostream.py
VincentLefevre/3D-parallax
8eab905fcc591e1bd7ddbbb01ad21427286c02e3
[ "MIT" ]
73
2021-01-05T07:25:51.000Z
2022-03-17T20:46:01.000Z
pybind11/tests/test_iostream.py
alherit/kd-switch-cpp
7b99e9e20eeb06fbd93b149c0bd5c5de47965f6e
[ "MIT" ]
1
2021-01-05T11:45:36.000Z
2021-01-05T20:55:28.000Z
pybind11/tests/test_iostream.py
alherit/kd-switch-cpp
7b99e9e20eeb06fbd93b149c0bd5c5de47965f6e
[ "MIT" ]
4
2021-01-05T10:27:50.000Z
2021-01-06T12:02:57.000Z
from pybind11_tests import iostream as m import sys from contextlib import contextmanager try: # Python 3 from io import StringIO except ImportError: # Python 2 try: from cStringIO import StringIO except ImportError: from StringIO import StringIO try: # Python ...
25.497674
72
0.602882
from pybind11_tests import iostream as m import sys from contextlib import contextmanager try: from io import StringIO except ImportError: try: from cStringIO import StringIO except ImportError: from StringIO import StringIO try: from contextlib import red...
true
true
f73fa3a06b2e0af161b4297718377b31313ad561
8,235
py
Python
saas/system/api/resource/backend-framework/webpy/tesla-faas/teslafaas/container/loader.py
iuskye/SREWorks
a2a7446767d97ec5f6d15bd00189c42150d6c894
[ "Apache-2.0" ]
407
2022-03-16T08:09:38.000Z
2022-03-31T12:27:10.000Z
saas/system/api/resource/backend-framework/webpy/tesla-faas/teslafaas/container/loader.py
Kwafoor/SREWorks
37a64a0a84b29c65cf6b77424bd2acd0c7b42e2b
[ "Apache-2.0" ]
25
2022-03-22T04:27:31.000Z
2022-03-30T08:47:28.000Z
saas/system/api/resource/backend-framework/webpy/tesla-faas/teslafaas/container/loader.py
Kwafoor/SREWorks
37a64a0a84b29c65cf6b77424bd2acd0c7b42e2b
[ "Apache-2.0" ]
109
2022-03-21T17:30:44.000Z
2022-03-31T09:36:28.000Z
#!/usr/bin/env python # encoding: utf-8 """ """ from web import Storage from teslafaas.container.webpy.context_manager import ContextManager from teslafaas.container.webpy.http_error_process import customize_http_error import os import sys import web import json import pkgutil import logging import importlib from cod...
38.481308
109
0.596843
""" """ from web import Storage from teslafaas.container.webpy.context_manager import ContextManager from teslafaas.container.webpy.http_error_process import customize_http_error import os import sys import web import json import pkgutil import logging import importlib from codecs import open from teslafaas.contai...
false
true
f73fa3e275fd4974a047a6be39bd103c334bd8e8
13,640
py
Python
astroquery/skyview/core.py
eteq/astroquery
70db53f8f047a2ee3481fd3242e6b364bc1ca639
[ "BSD-3-Clause" ]
null
null
null
astroquery/skyview/core.py
eteq/astroquery
70db53f8f047a2ee3481fd3242e6b364bc1ca639
[ "BSD-3-Clause" ]
null
null
null
astroquery/skyview/core.py
eteq/astroquery
70db53f8f047a2ee3481fd3242e6b364bc1ca639
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pprint from bs4 import BeautifulSoup from astropy.extern.six.moves.urllib import parse as urlparse from astropy.extern import six from astropy import units as u from . import conf from ..query import BaseQuery from ..utils import prepend_docstr_nor...
42.492212
94
0.568328
import pprint from bs4 import BeautifulSoup from astropy.extern.six.moves.urllib import parse as urlparse from astropy.extern import six from astropy import units as u from . import conf from ..query import BaseQuery from ..utils import prepend_docstr_noreturns, commons, async_to_sync __doctest_skip__ = [ 'SkyV...
true
true
f73fa44a7c480a7946b2a268d8d7e12cec99978c
1,293
py
Python
content/notebooks/nb_tools.py
ueapy/ueapy.github.io
920f25f4189512a77aa6b79eae133db0f14e514a
[ "MIT" ]
2
2016-02-02T06:15:38.000Z
2016-11-28T10:31:43.000Z
content/notebooks/nb_tools.py
ueapy/ueapy.github.io
920f25f4189512a77aa6b79eae133db0f14e514a
[ "MIT" ]
null
null
null
content/notebooks/nb_tools.py
ueapy/ueapy.github.io
920f25f4189512a77aa6b79eae133db0f14e514a
[ "MIT" ]
3
2016-01-22T11:27:08.000Z
2018-02-09T16:20:57.000Z
import os from datetime import datetime def connect_notebook_to_post(name='Untitled', title='New post', tags='ipython', author='UEA'): """ Write a header to a markdown blog post and return an HTML string with links to the notebook. Idea taken from http://ocefpaf.github.com/python4oceanographers ""...
34.945946
146
0.559938
import os from datetime import datetime def connect_notebook_to_post(name='Untitled', title='New post', tags='ipython', author='UEA'): hour = datetime.utcnow().strftime('%H:%M') date = '-'.join(name.split('-')[:3]) metadata = dict(title=title, date=date, hour=hour...
true
true
f73fa5b77be8ca16201c64c4280b185333821ae0
13,740
py
Python
incendio/junos/junos.py
ktbyers/incendio_old
d48007208d07c2aebe75b10669f3bcfbfabe2b51
[ "Apache-2.0" ]
2
2019-10-28T10:25:31.000Z
2021-07-15T18:11:23.000Z
incendio/junos/junos.py
ktbyers/incendio_old
d48007208d07c2aebe75b10669f3bcfbfabe2b51
[ "Apache-2.0" ]
5
2019-09-26T21:57:27.000Z
2019-10-31T02:44:19.000Z
incendio/junos/junos.py
ktbyers/incendio_old
d48007208d07c2aebe75b10669f3bcfbfabe2b51
[ "Apache-2.0" ]
1
2019-09-20T17:44:16.000Z
2019-09-20T17:44:16.000Z
# -*- coding: utf-8 -*- # Copyright 2015 Spotify AB. All rights reserved. # # The contents of this file are 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/LICE...
34.78481
97
0.569578
import re import json import logging from collections import OrderedDict from lxml import etree from jnpr.junos import Device from jnpr.junos.utils.config import Config from jnpr.junos.exception import ConfigLoadError from jnpr.junos.exception import ConnectTimeoutError from jnpr.junos.exception imp...
true
true
f73fa5cb9ea62373af24e3719703f52601a23c0c
4,349
py
Python
c4_1026_mymaze.py
Julia-Run/Problem-Solving-with-Algorithms-and-Data-Structures-using-Python
8c7d06e701baf524108475229b092e0fa730479f
[ "MIT" ]
null
null
null
c4_1026_mymaze.py
Julia-Run/Problem-Solving-with-Algorithms-and-Data-Structures-using-Python
8c7d06e701baf524108475229b092e0fa730479f
[ "MIT" ]
null
null
null
c4_1026_mymaze.py
Julia-Run/Problem-Solving-with-Algorithms-and-Data-Structures-using-Python
8c7d06e701baf524108475229b092e0fa730479f
[ "MIT" ]
null
null
null
from turtle import * PART_OF_PATH = 'O' TRIED = '.' OBSTACLE = '+' DEAD_END = '-' # 假设or判断语句中有x个并列条件,只要第一个条件满足,就会直接进入下一步。 # 先沿着第一支一直往下算,算不通就返回上一级的第二支。。。上一级全部不通就返回上上一级的第二支。。。如此循环,确定第一个条件是T or F class Maze(object): def __init__(self, filename): # 把txt文件转换成list。确认S的初始位置 rowsInMaze =...
32.94697
106
0.55691
from turtle import * PART_OF_PATH = 'O' TRIED = '.' OBSTACLE = '+' DEAD_END = '-' class Maze(object): def __init__(self, filename): rowsInMaze = 0 colsInMaze = 0 self.mazelist = [] file = open(filename, 'r') for line in file: rowl...
true
true
f73fa6fc99819e25aa5ed2c48dce10b7fb4c9afa
5,456
py
Python
morph_net/network_regularizers/cost_calculator.py
ORNL-BSEC/morph-net
eb1a493ca07ba4992af1f91ab3b73a6c4fb9cca8
[ "Apache-2.0" ]
null
null
null
morph_net/network_regularizers/cost_calculator.py
ORNL-BSEC/morph-net
eb1a493ca07ba4992af1f91ab3b73a6c4fb9cca8
[ "Apache-2.0" ]
null
null
null
morph_net/network_regularizers/cost_calculator.py
ORNL-BSEC/morph-net
eb1a493ca07ba4992af1f91ab3b73a6c4fb9cca8
[ "Apache-2.0" ]
1
2019-04-26T14:50:13.000Z
2019-04-26T14:50:13.000Z
"""CostCalculator that computes network cost or regularization loss.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf CONV2D_OPS = ('Conv2D', 'Conv2DBackpropInput', 'DepthwiseConv2dNative') FLOP_OPS = CONV2D_OPS + ('MatMul',) SUP...
34.974359
80
0.703262
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf CONV2D_OPS = ('Conv2D', 'Conv2DBackpropInput', 'DepthwiseConv2dNative') FLOP_OPS = CONV2D_OPS + ('MatMul',) SUPPORTED_OPS = FLOP_OPS + ( 'Add', 'AddN', 'ConcatV2', 'FusedBatchNorm...
true
true
f73fa74fa93adde5eee5b422d21e017127e4b0a1
402
py
Python
.env/lib/python3.8/site-packages/aws_cdk/aws_kinesisfirehose/_jsii/__init__.py
careck/begariver-cdk
5b88f82ae545e374712521b2eb6412c2e2a30e6a
[ "MIT" ]
null
null
null
.env/lib/python3.8/site-packages/aws_cdk/aws_kinesisfirehose/_jsii/__init__.py
careck/begariver-cdk
5b88f82ae545e374712521b2eb6412c2e2a30e6a
[ "MIT" ]
null
null
null
.env/lib/python3.8/site-packages/aws_cdk/aws_kinesisfirehose/_jsii/__init__.py
careck/begariver-cdk
5b88f82ae545e374712521b2eb6412c2e2a30e6a
[ "MIT" ]
null
null
null
import abc import builtins import datetime import enum import typing import jsii import publication import typing_extensions import aws_cdk.core._jsii import constructs._jsii __jsii_assembly__ = jsii.JSIIAssembly.load( "@aws-cdk/aws-kinesisfirehose", "1.108.1", __name__[0:-6], "aws-kinesisfirehose@1....
15.461538
43
0.746269
import abc import builtins import datetime import enum import typing import jsii import publication import typing_extensions import aws_cdk.core._jsii import constructs._jsii __jsii_assembly__ = jsii.JSIIAssembly.load( "@aws-cdk/aws-kinesisfirehose", "1.108.1", __name__[0:-6], "aws-kinesisfirehose@1....
true
true
f73fa9c4609e78e2857a19ba98b920037d751d5e
404
py
Python
tests/test_shapely.py
rhaDHI/mikeio
eb24503d935df969eac32569a41d223d6f0e2edf
[ "BSD-3-Clause" ]
65
2019-11-27T13:42:52.000Z
2022-03-31T11:41:56.000Z
tests/test_shapely.py
rhaDHI/mikeio
eb24503d935df969eac32569a41d223d6f0e2edf
[ "BSD-3-Clause" ]
178
2019-12-17T19:43:04.000Z
2022-03-31T06:54:06.000Z
tests/test_shapely.py
rhaDHI/mikeio
eb24503d935df969eac32569a41d223d6f0e2edf
[ "BSD-3-Clause" ]
41
2019-12-17T18:21:04.000Z
2022-03-16T12:15:40.000Z
import os import pytest from mikeio import Dfsu ################################################## # these tests will not run if shapely is not installed ################################################## pytest.importorskip("shapely") def test_to_shapely(): filename = os.path.join("tests", "testdata", "oresund...
23.764706
72
0.537129
import os import pytest from mikeio import Dfsu
true
true
f73faaffb933934878da485d569a0835d685c3fb
6,734
py
Python
haiku/_src/layer_norm_test.py
timwillhack/dm-haikuBah2
b76a3db3a39b82c8a1ae5a81a8a0173c23c252e5
[ "Apache-2.0" ]
1,647
2020-02-21T14:24:31.000Z
2022-03-31T04:31:34.000Z
haiku/_src/layer_norm_test.py
timwillhack/dm-haikuBah2
b76a3db3a39b82c8a1ae5a81a8a0173c23c252e5
[ "Apache-2.0" ]
169
2020-02-21T14:07:25.000Z
2022-03-31T13:08:28.000Z
haiku/_src/layer_norm_test.py
timwillhack/dm-haikuBah2
b76a3db3a39b82c8a1ae5a81a8a0173c23c252e5
[ "Apache-2.0" ]
159
2020-02-21T19:31:02.000Z
2022-03-29T12:41:35.000Z
# Copyright 2019 DeepMind Technologies Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
37.620112
80
0.651025
import itertools from absl.testing import absltest from absl.testing import parameterized from haiku._src import initializers from haiku._src import layer_norm from haiku._src import test_utils from haiku._src import transform import jax import jax.numpy as jnp import numpy as np class LayerNormTest(p...
true
true
f73fab220dbc91f849f0e969c80530f25fa72d93
34,043
py
Python
venv/Lib/site-packages/scipy/fftpack/tests/test_basic.py
unbun/snake.ai
0c017357608dc7c06af0ca3ca57d870641461207
[ "MIT" ]
6,989
2017-07-18T06:23:18.000Z
2022-03-31T15:58:36.000Z
venv/Lib/site-packages/scipy/fftpack/tests/test_basic.py
unbun/snake.ai
0c017357608dc7c06af0ca3ca57d870641461207
[ "MIT" ]
1,978
2017-07-18T09:17:58.000Z
2022-03-31T14:28:43.000Z
venv/Lib/site-packages/scipy/fftpack/tests/test_basic.py
unbun/snake.ai
0c017357608dc7c06af0ca3ca57d870641461207
[ "MIT" ]
1,228
2017-07-18T09:03:13.000Z
2022-03-29T05:57:40.000Z
# Created by Pearu Peterson, September 2002 from __future__ import division, print_function, absolute_import __usage__ = """ Build fftpack: python setup_fftpack.py build Run tests if scipy is installed: python -c 'import scipy;scipy.fftpack.test()' Run tests if fftpack is not installed: python tests/test_basic....
34.987667
161
0.521047
from __future__ import division, print_function, absolute_import __usage__ = """ Build fftpack: python setup_fftpack.py build Run tests if scipy is installed: python -c 'import scipy;scipy.fftpack.test()' Run tests if fftpack is not installed: python tests/test_basic.py """ from numpy.testing import (assert_,...
true
true
f73fac3104c1b8033b3177b27485492a051025c5
55
py
Python
test.py
diyanqi/converter
9a0c59509c3b31ee5ed5b4ef71a8991bfd39f9f5
[ "Apache-2.0" ]
null
null
null
test.py
diyanqi/converter
9a0c59509c3b31ee5ed5b4ef71a8991bfd39f9f5
[ "Apache-2.0" ]
null
null
null
test.py
diyanqi/converter
9a0c59509c3b31ee5ed5b4ef71a8991bfd39f9f5
[ "Apache-2.0" ]
null
null
null
from lib import * audio2audio("test1.mp3","test1.wav")
18.333333
36
0.727273
from lib import * audio2audio("test1.mp3","test1.wav")
true
true
f73fac561514ad534aa27c4a8ae9620ccf4284ff
254
py
Python
py/cores.py
ashlinrichardson/flatfile_tools
749071129cab7a598bd4c2edf050dce59324a97f
[ "Apache-2.0" ]
2
2019-03-06T04:30:12.000Z
2019-03-26T16:23:56.000Z
py/cores.py
ashlinrichardson/flatfile_tools
749071129cab7a598bd4c2edf050dce59324a97f
[ "Apache-2.0" ]
9
2020-01-18T05:02:52.000Z
2022-03-14T18:09:53.000Z
py/cores.py
bcgov/flatfile-tools
749071129cab7a598bd4c2edf050dce59324a97f
[ "Apache-2.0" ]
null
null
null
#20190212 count the number of cpu cores import os import sys ncores = 0 lines = os.popen('cat /proc/cpuinfo | grep "cpu cores"').read().strip().split('\n') for line in lines: ncores += int(line.strip().split()[-1]) print "number of cpu cores", ncores
31.75
83
0.685039
import os import sys ncores = 0 lines = os.popen('cat /proc/cpuinfo | grep "cpu cores"').read().strip().split('\n') for line in lines: ncores += int(line.strip().split()[-1]) print "number of cpu cores", ncores
false
true
f73fac7dfc88703ce8ae7071b3e4b35b864c630c
906
py
Python
latin_scansion/textproto.py
jillianchang/LatinScansion
2b387c8d35e526e4d1746f471d96ba9ce41a187e
[ "Apache-2.0" ]
1
2021-10-06T15:59:31.000Z
2021-10-06T15:59:31.000Z
latin_scansion/textproto.py
kylebgorman/latin_scansion
2b387c8d35e526e4d1746f471d96ba9ce41a187e
[ "Apache-2.0" ]
7
2021-10-06T14:32:58.000Z
2022-03-28T14:34:54.000Z
latin_scansion/textproto.py
kylebgorman/latin_scansion
2b387c8d35e526e4d1746f471d96ba9ce41a187e
[ "Apache-2.0" ]
2
2022-02-17T20:05:06.000Z
2022-02-17T20:06:57.000Z
"""Code for reading and writing scansion text-format protocol buffers.""" from google.protobuf import text_format # type: ignore from . import scansion_pb2 # type: ignore # TODO(kbg): Add read and write functions for Verse messages, if needed. def read_document(path: str) -> scansion_pb2.Document: """Reads...
25.166667
73
0.683223
from google.protobuf import text_format from . import scansion_pb2 def read_document(path: str) -> scansion_pb2.Document: document = scansion_pb2.Document() with open(path, "r") as source: text_format.ParseLines(source, document) return document def write_document(document: scansion_pb...
true
true
f73face1ca4bdde16ab6a447f021938f799aa52d
1,351
py
Python
watcher/tests/applier/messaging/test_trigger_action_plan_endpoint.py
ajaytikoo/watcher
6dbac1f6ae7f3e10dfdcef5721fa4af7af54e159
[ "Apache-2.0" ]
64
2015-10-18T02:57:24.000Z
2022-01-13T11:27:51.000Z
watcher/tests/applier/messaging/test_trigger_action_plan_endpoint.py
ajaytikoo/watcher
6dbac1f6ae7f3e10dfdcef5721fa4af7af54e159
[ "Apache-2.0" ]
null
null
null
watcher/tests/applier/messaging/test_trigger_action_plan_endpoint.py
ajaytikoo/watcher
6dbac1f6ae7f3e10dfdcef5721fa4af7af54e159
[ "Apache-2.0" ]
35
2015-12-25T13:53:21.000Z
2021-07-19T15:50:16.000Z
# -*- encoding: utf-8 -*- # Copyright (c) 2015 b<>com # # Authors: Jean-Emile DARTOIS <jean-emile.dartois@b-com.com> # # 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/...
34.641026
74
0.713546
from unittest import mock from watcher.applier.messaging import trigger from watcher.common import utils from watcher.tests import base class TestTriggerActionPlan(base.TestCase): def __init__(self, *args, **kwds): super(TestTriggerActionPlan, self).__init__(*args, **kwds) sel...
true
true
f73fae25872282f55556165e302753b5a8c0c263
1,032
py
Python
tests/tf/examples/test_01_getting_started.py
bschifferer/models-1
b6042dbd1b98150cc50fd7d2cb6c07033f42fd35
[ "Apache-2.0" ]
null
null
null
tests/tf/examples/test_01_getting_started.py
bschifferer/models-1
b6042dbd1b98150cc50fd7d2cb6c07033f42fd35
[ "Apache-2.0" ]
null
null
null
tests/tf/examples/test_01_getting_started.py
bschifferer/models-1
b6042dbd1b98150cc50fd7d2cb6c07033f42fd35
[ "Apache-2.0" ]
null
null
null
from testbook import testbook from tests.conftest import REPO_ROOT @testbook(REPO_ROOT / "examples/01-Getting-started.ipynb", execute=False) def test_func(tb): tb.inject( """ from unittest.mock import patch from merlin.datasets.synthetic import generate_data mock_train, mock_valid...
29.485714
73
0.627907
from testbook import testbook from tests.conftest import REPO_ROOT @testbook(REPO_ROOT / "examples/01-Getting-started.ipynb", execute=False) def test_func(tb): tb.inject( """ from unittest.mock import patch from merlin.datasets.synthetic import generate_data mock_train, mock_valid...
true
true
f73faeda80c60f6feda0845bca9461177db00247
102
py
Python
manage.py
kamujun/flask-vue-experiments
057cb25a481ffa0ea9b1b27b131d3d8bf814dfe7
[ "MIT" ]
1
2018-09-07T00:00:58.000Z
2018-09-07T00:00:58.000Z
manage.py
kamujun/flask-vue-experiments
057cb25a481ffa0ea9b1b27b131d3d8bf814dfe7
[ "MIT" ]
null
null
null
manage.py
kamujun/flask-vue-experiments
057cb25a481ffa0ea9b1b27b131d3d8bf814dfe7
[ "MIT" ]
null
null
null
from server.app import create_app app = create_app() app.run(host='127.0.0.1', port=5000, debug=True)
25.5
48
0.735294
from server.app import create_app app = create_app() app.run(host='127.0.0.1', port=5000, debug=True)
true
true
f73faf5082d77ef649d002b15cd61650492950d2
6,201
py
Python
modules/python/pylib/syslogng/debuggercli/tests/test_commandlinelexer.py
balabit-deps/balabit-os-6-syslog-ng
c8d0fafc8eaca8ed690b2ad17ab1d93820bd07f6
[ "BSD-4-Clause-UC" ]
null
null
null
modules/python/pylib/syslogng/debuggercli/tests/test_commandlinelexer.py
balabit-deps/balabit-os-6-syslog-ng
c8d0fafc8eaca8ed690b2ad17ab1d93820bd07f6
[ "BSD-4-Clause-UC" ]
null
null
null
modules/python/pylib/syslogng/debuggercli/tests/test_commandlinelexer.py
balabit-deps/balabit-os-6-syslog-ng
c8d0fafc8eaca8ed690b2ad17ab1d93820bd07f6
[ "BSD-4-Clause-UC" ]
null
null
null
############################################################################# # Copyright (c) 2015-2016 Balabit # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 as published # by the Free Software Foundation, or (at your option) an...
39.75
94
0.710208
true
true
f73fafab6cb698711387b845d08bcfca7970e9dc
454
py
Python
update-participants.py
gleitz/iron-blogger
4c8c9df107cf6d87601387ab59a5ce576f72d7e5
[ "MIT" ]
3
2017-12-18T16:01:33.000Z
2019-08-15T00:17:19.000Z
update-participants.py
Guinster/iron-blogger
8155e100c521710d62b8d60e625ea0a504a8af9d
[ "MIT" ]
2
2016-03-05T01:54:51.000Z
2016-07-14T16:02:06.000Z
update-participants.py
Guinster/iron-blogger
8155e100c521710d62b8d60e625ea0a504a8af9d
[ "MIT" ]
4
2015-02-22T22:42:25.000Z
2018-03-01T21:18:57.000Z
#!/usr/bin/python import render import xmlrpclib import json from config import * with open('secret.txt', 'r') as f: secret = json.load(f) passwd = secret['wordpress']['password'] x = xmlrpclib.ServerProxy(XMLRPC_ENDPOINT) page = x.wp.getPage(BLOG_ID, PARTICIPANTS_PAGE_ID, USER, passwd) text = render.rende...
22.7
70
0.737885
import render import xmlrpclib import json from config import * with open('secret.txt', 'r') as f: secret = json.load(f) passwd = secret['wordpress']['password'] x = xmlrpclib.ServerProxy(XMLRPC_ENDPOINT) page = x.wp.getPage(BLOG_ID, PARTICIPANTS_PAGE_ID, USER, passwd) text = render.render_template('templ...
true
true
f73fb072969e91b3f3b8ab6f0b567f6f5d1e1b1a
446
py
Python
kittenkollector/__init__.py
jedevc/hack-the-midlands
679177174b8681430d0fd3cb8f0b50a272b1c6df
[ "MIT" ]
null
null
null
kittenkollector/__init__.py
jedevc/hack-the-midlands
679177174b8681430d0fd3cb8f0b50a272b1c6df
[ "MIT" ]
null
null
null
kittenkollector/__init__.py
jedevc/hack-the-midlands
679177174b8681430d0fd3cb8f0b50a272b1c6df
[ "MIT" ]
null
null
null
import flask from flask import Flask from .database import Database app = Flask(__name__) DATABASE = '/tmp/kittens.db' def get_db(): db = getattr(flask.g, '_database', None) if not db: db = flask.g._database = Database(DATABASE) return db @app.teardown_appcontext def close_db(exception): db...
18.583333
51
0.692825
import flask from flask import Flask from .database import Database app = Flask(__name__) DATABASE = '/tmp/kittens.db' def get_db(): db = getattr(flask.g, '_database', None) if not db: db = flask.g._database = Database(DATABASE) return db @app.teardown_appcontext def close_db(exception): db...
true
true
f73fb09254c517b9185aad902c702759c44b4e74
1,057
py
Python
irt/Irt.py
camilos-ufm/Compiler
e29f750a13323b59583f4acd7d3a51d3e29cc0e6
[ "MIT" ]
1
2020-09-20T03:24:24.000Z
2020-09-20T03:24:24.000Z
irt/Irt.py
camilos-ufm/Compiler
e29f750a13323b59583f4acd7d3a51d3e29cc0e6
[ "MIT" ]
null
null
null
irt/Irt.py
camilos-ufm/Compiler
e29f750a13323b59583f4acd7d3a51d3e29cc0e6
[ "MIT" ]
1
2021-09-20T19:09:52.000Z
2021-09-20T19:09:52.000Z
import objects.Symbol as Symbol import objects.Token as Token import objects.Node as Node import objects.Program as Program import parser.ParseDFA as ParseDFA import re from anytree import Node as Node_any from anytree import RenderTree from anytree.exporter import DotExporter class Irt: def irt(self, main_program...
33.03125
63
0.642384
import objects.Symbol as Symbol import objects.Token as Token import objects.Node as Node import objects.Program as Program import parser.ParseDFA as ParseDFA import re from anytree import Node as Node_any from anytree import RenderTree from anytree.exporter import DotExporter class Irt: def irt(self, main_program...
true
true
f73fb09c3056fdfcb010aab2ac30c9b2a2404f39
2,430
py
Python
robotbackend/python/firebase.py
tonyli1/emarsoftware
2153bbf98d9386b02a03f1a119dedec29c2ebb70
[ "BSD-2-Clause" ]
null
null
null
robotbackend/python/firebase.py
tonyli1/emarsoftware
2153bbf98d9386b02a03f1a119dedec29c2ebb70
[ "BSD-2-Clause" ]
38
2020-09-24T01:06:13.000Z
2022-02-23T19:45:41.000Z
robotbackend/python/firebase.py
tonyli1/emarsoftware
2153bbf98d9386b02a03f1a119dedec29c2ebb70
[ "BSD-2-Clause" ]
4
2021-01-21T06:39:45.000Z
2022-02-16T00:24:15.000Z
import requests import time import json # Dummy data to represent the statius of the neck application current_neck_pan = 0 current_neck_tilt = 0 tactile_data = {'sensor0':1, 'sensor1':1, 'sensor2':1}; # Dummy data for LED current_led_rgb = [255,255,255] # Robot and database info this_robot_id = 0 api_key = "" URL = ...
30.759494
95
0.708642
import requests import time import json current_neck_pan = 0 current_neck_tilt = 0 tactile_data = {'sensor0':1, 'sensor1':1, 'sensor2':1}; current_led_rgb = [255,255,255] this_robot_id = 0 api_key = "" URL = "https://emar-database.firebaseio.com/" AUTH_URL = "https://identitytoolkit.googleapis.com/v1/accounts:sig...
false
true
f73fb207de5264b711287d6d8d075b9ed6c379f5
1,521
py
Python
spiders/moe/all/tianjin.py
JJYYYY/policy_crawl
e5f7612163c00049f2e6859e81babb3e0f30aca4
[ "Apache-2.0" ]
3
2020-04-15T07:17:04.000Z
2020-09-21T13:06:57.000Z
spiders/moe/all/tianjin.py
JJYYYY/policy_crawl
e5f7612163c00049f2e6859e81babb3e0f30aca4
[ "Apache-2.0" ]
null
null
null
spiders/moe/all/tianjin.py
JJYYYY/policy_crawl
e5f7612163c00049f2e6859e81babb3e0f30aca4
[ "Apache-2.0" ]
4
2020-03-23T02:09:18.000Z
2021-04-18T08:30:08.000Z
import re import time from pyquery import PyQuery as pq from policy_crawl.common.fetch import get,post from policy_crawl.common.save import save from policy_crawl.common.logger import alllog,errorlog def parse_detail(html,url): alllog.logger.info("天津市教育厅: %s"%url) doc=pq(html) data={} data["title"]=d...
28.166667
92
0.592373
import re import time from pyquery import PyQuery as pq from policy_crawl.common.fetch import get,post from policy_crawl.common.save import save from policy_crawl.common.logger import alllog,errorlog def parse_detail(html,url): alllog.logger.info("天津市教育厅: %s"%url) doc=pq(html) data={} data["title"]=d...
true
true
f73fb239e006d9422e4a37f94a664055c3ac1efb
9,705
py
Python
tools/python/boutiques/publisher.py
boutiques/boutiques-schema
5a2374e87dd837cb83fec9603f32e3c9085613ba
[ "MIT" ]
54
2016-07-21T19:14:13.000Z
2021-11-16T11:49:15.000Z
tools/python/boutiques/publisher.py
boutiques/boutiques-schema
5a2374e87dd837cb83fec9603f32e3c9085613ba
[ "MIT" ]
539
2016-07-20T20:09:38.000Z
2022-03-17T00:45:26.000Z
tools/python/boutiques/publisher.py
boutiques/boutiques-schema
5a2374e87dd837cb83fec9603f32e3c9085613ba
[ "MIT" ]
52
2016-07-22T18:09:59.000Z
2021-02-03T15:22:55.000Z
#!/usr/bin/env python from boutiques.validator import validate_descriptor, ValidationError from boutiques.logger import raise_error, print_info from boutiques.zenodoHelper import ZenodoError, ZenodoHelper from boutiques.util.utils import customSortDescriptorByKey import simplejson as json import requests import os c...
44.723502
79
0.566512
from boutiques.validator import validate_descriptor, ValidationError from boutiques.logger import raise_error, print_info from boutiques.zenodoHelper import ZenodoError, ZenodoHelper from boutiques.util.utils import customSortDescriptorByKey import simplejson as json import requests import os class Publisher(): ...
true
true
f73fb2a8a307bf6009f2b5f26b6e89cf305daae6
3,771
py
Python
pysimt/utils/filterchain.py
welvin21/pysimt
6250b33dc518b3195da4fc9cc8d32ba7ada958c0
[ "MIT" ]
34
2020-09-21T10:49:57.000Z
2022-01-08T04:50:42.000Z
pysimt/utils/filterchain.py
welvin21/pysimt
6250b33dc518b3195da4fc9cc8d32ba7ada958c0
[ "MIT" ]
2
2021-01-08T03:52:51.000Z
2021-09-10T07:45:05.000Z
pysimt/utils/filterchain.py
welvin21/pysimt
6250b33dc518b3195da4fc9cc8d32ba7ada958c0
[ "MIT" ]
5
2021-04-23T09:30:51.000Z
2022-01-09T08:40:45.000Z
import re import pathlib from typing import List, Union from .resource_mgr import res_mgr from .io import fopen class FilterChain: """A sequential filter chain to post-process list of tokens. The **available filters are:** `c2w`: Stitches back space delimited characters to words. Necessary for w...
37.336634
86
0.563511
import re import pathlib from typing import List, Union from .resource_mgr import res_mgr from .io import fopen class FilterChain: _FILTERS = { 'de-bpe': lambda s: s.replace("@@ ", "").replace("@@", "").replace(" ##", ""), 'de-tag': lambda s: re.sub('<[a-zA-Z][a-zA-Z]>', '', s), ...
true
true
f73fb65f2309f803e8bcd29ae83790cf931a1922
442
py
Python
packages/python/plotly/plotly/validators/isosurface/_text.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/isosurface/_text.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/isosurface/_text.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="text", parent_name="isosurface", **kwargs): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, arra...
34
79
0.656109
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="text", parent_name="isosurface", **kwargs): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, arra...
true
true
f73fb68b392a779e7c6ed88caa2756f265725fd2
12,961
py
Python
secure_message/repository/retriever.py
uk-gov-mirror/ONSdigital.ras-secure-message
741eed651eea47dd1a13c7c93b1b1796584cdf2b
[ "MIT" ]
null
null
null
secure_message/repository/retriever.py
uk-gov-mirror/ONSdigital.ras-secure-message
741eed651eea47dd1a13c7c93b1b1796584cdf2b
[ "MIT" ]
null
null
null
secure_message/repository/retriever.py
uk-gov-mirror/ONSdigital.ras-secure-message
741eed651eea47dd1a13c7c93b1b1796584cdf2b
[ "MIT" ]
null
null
null
import logging from flask import jsonify from sqlalchemy import and_, func, or_ from sqlalchemy.exc import SQLAlchemyError from sqlalchemy.orm.exc import NoResultFound from structlog import wrap_logger from werkzeug.exceptions import InternalServerError, NotFound, Forbidden from secure_message.constants import NON_SP...
44.386986
119
0.666538
import logging from flask import jsonify from sqlalchemy import and_, func, or_ from sqlalchemy.exc import SQLAlchemyError from sqlalchemy.orm.exc import NoResultFound from structlog import wrap_logger from werkzeug.exceptions import InternalServerError, NotFound, Forbidden from secure_message.constants import NON_SP...
true
true
f73fb6bdf6bbfd188f849174455ff8c71dda6202
1,131
py
Python
iot_message/factory.py
bkosciow/python_iot-1
f3cd2bdbb75cb9afe13fecb603b5b8c026d23500
[ "MIT" ]
null
null
null
iot_message/factory.py
bkosciow/python_iot-1
f3cd2bdbb75cb9afe13fecb603b5b8c026d23500
[ "MIT" ]
null
null
null
iot_message/factory.py
bkosciow/python_iot-1
f3cd2bdbb75cb9afe13fecb603b5b8c026d23500
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import json from iot_message.message import Message import iot_message.exception as ex class MessageFactory(object): """Class MessageFactory""" @classmethod def create(cls, data=None): if data is None: return Message() else: return cls._decode(dat...
26.302326
91
0.576481
import json from iot_message.message import Message import iot_message.exception as ex class MessageFactory(object): @classmethod def create(cls, data=None): if data is None: return Message() else: return cls._decode(data) @classmethod def _decode(cls, message...
true
true
f73fb76832ea35f93bfd23dbc4cbfd6628576e72
1,917
py
Python
tests/test_toqasm.py
minatoyuichiro/Blueqat
1be0150ca48bf40527936561d1bf4687dbf435b4
[ "Apache-2.0" ]
357
2019-02-24T07:21:03.000Z
2022-03-15T22:59:13.000Z
tests/test_toqasm.py
mdrft/blueqat
6c5f26b377bc3ce0d02adec8b9132d70870b3d95
[ "Apache-2.0" ]
35
2019-03-29T02:13:09.000Z
2021-10-15T02:19:06.000Z
tests/test_toqasm.py
mdrft/blueqat
6c5f26b377bc3ce0d02adec8b9132d70870b3d95
[ "Apache-2.0" ]
49
2019-03-09T13:19:40.000Z
2022-03-11T08:31:16.000Z
# Copyright 2019 The Blueqat Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
26.260274
74
0.600417
from blueqat import Circuit QASM = """OPENQASM 2.0; include "qelib1.inc"; qreg q[3]; creg c[3]; h q[0]; h q[1]; cx q[0],q[1]; rz(1.23) q[2]; x q[2]; y q[2]; cz q[2],q[1]; z q[1]; ry(4.56) q[0]; u(1.0,2.0,3.0) q[0]; cu(2.0,3.0,1.0,0.5) q[2],q[0]; reset q[1]; measure q[0] -> c[0]; measure q[1] -> c[1]; mea...
true
true
f73fb89a1b397a2ae3610f9ae1ca2cc1928b565e
2,713
py
Python
data/data-pipeline/data_pipeline/etl/sources/michigan_ejscreen/etl.py
snowcoding/justice40-tool
b6a6813bb5d617abf400cafc97da891618541558
[ "CC0-1.0" ]
59
2021-05-10T21:43:36.000Z
2022-03-30T17:57:17.000Z
data/data-pipeline/data_pipeline/etl/sources/michigan_ejscreen/etl.py
snowcoding/justice40-tool
b6a6813bb5d617abf400cafc97da891618541558
[ "CC0-1.0" ]
1,259
2021-05-10T18:21:26.000Z
2022-03-31T21:35:49.000Z
data/data-pipeline/data_pipeline/etl/sources/michigan_ejscreen/etl.py
snowcoding/justice40-tool
b6a6813bb5d617abf400cafc97da891618541558
[ "CC0-1.0" ]
24
2021-05-15T00:58:39.000Z
2022-03-24T23:18:17.000Z
import pandas as pd from data_pipeline.etl.base import ExtractTransformLoad from data_pipeline.utils import get_module_logger from data_pipeline.score import field_names from data_pipeline.config import settings logger = get_module_logger(__name__) class MichiganEnviroScreenETL(ExtractTransformLoad): """Michiga...
38.757143
134
0.69038
import pandas as pd from data_pipeline.etl.base import ExtractTransformLoad from data_pipeline.utils import get_module_logger from data_pipeline.score import field_names from data_pipeline.config import settings logger = get_module_logger(__name__) class MichiganEnviroScreenETL(ExtractTransformLoad): def __ini...
true
true
f73fb8ffc4defaa425376abe9586ab0a9915b844
12,797
py
Python
magnificat/drw_dataset.py
jiwoncpark/lens-classification
c1faf4dbbd4a16f2df74a34fd593ec7128750252
[ "MIT" ]
null
null
null
magnificat/drw_dataset.py
jiwoncpark/lens-classification
c1faf4dbbd4a16f2df74a34fd593ec7128750252
[ "MIT" ]
21
2018-05-29T20:13:11.000Z
2018-07-13T02:32:35.000Z
magnificat/drw_dataset.py
jiwoncpark/lens-classification
c1faf4dbbd4a16f2df74a34fd593ec7128750252
[ "MIT" ]
null
null
null
import os import os.path as osp import numpy as np import torch from torch.utils.data import Dataset from tqdm import tqdm from torch.utils.data import DataLoader from magnificat import drw_utils from magnificat.cadence import LSSTCadence class DRWDataset(Dataset): bp_to_int = dict(zip(list('ugrizy'), range(6)))...
39.742236
117
0.575994
import os import os.path as osp import numpy as np import torch from torch.utils.data import Dataset from tqdm import tqdm from torch.utils.data import DataLoader from magnificat import drw_utils from magnificat.cadence import LSSTCadence class DRWDataset(Dataset): bp_to_int = dict(zip(list('ugrizy'), range(6)))...
true
true
f73fb930a1317a98ee904128b7f83cb50aae25bf
3,962
py
Python
examples/client_side/decentralization.py
jld23/sasoptpy
f96911f04d6c0c01fce902f1f995935583df69a8
[ "Apache-2.0" ]
20
2017-12-22T18:29:55.000Z
2021-09-12T15:04:39.000Z
examples/client_side/decentralization.py
jld23/sasoptpy
f96911f04d6c0c01fce902f1f995935583df69a8
[ "Apache-2.0" ]
9
2019-01-24T14:52:33.000Z
2022-03-16T14:14:35.000Z
examples/client_side/decentralization.py
jld23/sasoptpy
f96911f04d6c0c01fce902f1f995935583df69a8
[ "Apache-2.0" ]
12
2017-12-22T19:37:16.000Z
2021-07-30T21:04:03.000Z
import sasoptpy as so import pandas as pd def test(cas_conn): m = so.Model(name='decentralization', session=cas_conn) DEPTS = ['A', 'B', 'C', 'D', 'E'] CITIES = ['Bristol', 'Brighton', 'London'] benefit_data = pd.DataFrame([ ['Bristol', 10, 15, 10, 20, 5], ['Brighton', 10, 20, 15, 1...
33.016667
79
0.491923
import sasoptpy as so import pandas as pd def test(cas_conn): m = so.Model(name='decentralization', session=cas_conn) DEPTS = ['A', 'B', 'C', 'D', 'E'] CITIES = ['Bristol', 'Brighton', 'London'] benefit_data = pd.DataFrame([ ['Bristol', 10, 15, 10, 20, 5], ['Brighton', 10, 20, 15, 1...
true
true
f73fb994147b367fef76c2be78cf458e879933f6
2,157
py
Python
tests/test_chinese.py
yangwanyuan/aliyun-oss-python-sdk
df1e8fa3b1f6ab50745e5cfdc8bdbc3baba88f5f
[ "MIT" ]
1
2019-12-31T03:43:56.000Z
2019-12-31T03:43:56.000Z
tests/test_chinese.py
yangwanyuan/aliyun-oss-python-sdk
df1e8fa3b1f6ab50745e5cfdc8bdbc3baba88f5f
[ "MIT" ]
null
null
null
tests/test_chinese.py
yangwanyuan/aliyun-oss-python-sdk
df1e8fa3b1f6ab50745e5cfdc8bdbc3baba88f5f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import unittest import sys import oss2 from oss2 import to_bytes, to_string from common import * class TestChinese(OssTestCase): def test_unicode_content(self): key = self.random_key() content = u'几天后,阿里巴巴为侄子和马尔佳娜举行了隆重的婚礼。' self.bucket.put_object(key, content) ...
31.26087
119
0.610107
import unittest import sys import oss2 from oss2 import to_bytes, to_string from common import * class TestChinese(OssTestCase): def test_unicode_content(self): key = self.random_key() content = u'几天后,阿里巴巴为侄子和马尔佳娜举行了隆重的婚礼。' self.bucket.put_object(key, content) self.assertEqual...
true
true
f73fb9cf172a2bdaf0decc24111fde17be790d59
10,282
py
Python
tests/ut/python/dataset/test_pyfunc_multiprocess.py
Shigangli/mindspore
351ce03fb2721335695afd77e8535d15670571f4
[ "Apache-2.0" ]
1
2022-02-23T09:13:43.000Z
2022-02-23T09:13:43.000Z
tests/ut/python/dataset/test_pyfunc_multiprocess.py
Shigangli/mindspore
351ce03fb2721335695afd77e8535d15670571f4
[ "Apache-2.0" ]
null
null
null
tests/ut/python/dataset/test_pyfunc_multiprocess.py
Shigangli/mindspore
351ce03fb2721335695afd77e8535d15670571f4
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 Huawei Technologies Co., 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 agreed to...
37.663004
110
0.722622
import numpy as np import pytest import mindspore.dataset as ds import mindspore.dataset.transforms.py_transforms as py_transforms import mindspore.dataset.vision.py_transforms as py_vision from util import visualize_list MNIST_DATA_DIR = "../data/dataset/testMnistData" TF_DATA_DIR = ["../data/dataset/te...
true
true
f73fba42208099db035e3d9c23d5b3deca4169cd
368
py
Python
setup.py
lotube/lotube-crawler
2473c4dd56ea36c85ebadc76afd4747fba06a147
[ "MIT" ]
null
null
null
setup.py
lotube/lotube-crawler
2473c4dd56ea36c85ebadc76afd4747fba06a147
[ "MIT" ]
null
null
null
setup.py
lotube/lotube-crawler
2473c4dd56ea36c85ebadc76afd4747fba06a147
[ "MIT" ]
null
null
null
#!/usr/bin/env python #from distutils.core import setup from setuptools import setup setup(name='lotube-crawler', version='1.0', description='LOTube video crawler', author='lotube', url='https://github.com/zurfyx', packages=[ 'lotube_crawler', 'lotube_crawler.base', 'lotube_crawler.extractor', ...
18.4
37
0.679348
from setuptools import setup setup(name='lotube-crawler', version='1.0', description='LOTube video crawler', author='lotube', url='https://github.com/zurfyx', packages=[ 'lotube_crawler', 'lotube_crawler.base', 'lotube_crawler.extractor', ], install_requires=[ 'requests', ], )
true
true
f73fbb12aa1c25d93f541b1578a54ec9289ca84d
938
py
Python
beam.py
draplater/empty-parser
05eb8c596c4e5ba26b5c954161e52bb1490ee402
[ "Apache-2.0" ]
9
2018-08-13T03:03:39.000Z
2021-05-24T20:05:25.000Z
beam.py
draplater/empty-parser
05eb8c596c4e5ba26b5c954161e52bb1490ee402
[ "Apache-2.0" ]
1
2018-08-03T12:37:52.000Z
2018-08-03T15:30:41.000Z
beam.py
draplater/empty-parser
05eb8c596c4e5ba26b5c954161e52bb1490ee402
[ "Apache-2.0" ]
null
null
null
import heapq from operator import attrgetter class Beam(object): def __init__(self, maxsize, key=attrgetter("score")): self.key = key self.maxsize = maxsize self.beam = [] def push(self, x): key = self.key(x) if len(self.beam) < self.maxsize: heapq.heappush...
24.051282
57
0.574627
import heapq from operator import attrgetter class Beam(object): def __init__(self, maxsize, key=attrgetter("score")): self.key = key self.maxsize = maxsize self.beam = [] def push(self, x): key = self.key(x) if len(self.beam) < self.maxsize: heapq.heappush...
true
true
f73fbc564e0828048e01df61a9a1548cb0d9da1d
666
py
Python
workerInfra/domain/driverInterface.py
jtom38/newsbot.worker
6f5d93c474d21542f1af20e3b2537f26e2bcbbc3
[ "MIT" ]
1
2021-09-23T16:19:46.000Z
2021-09-23T16:19:46.000Z
workerInfra/domain/driverInterface.py
jtom38/newsbot.worker
6f5d93c474d21542f1af20e3b2537f26e2bcbbc3
[ "MIT" ]
10
2021-09-26T05:53:11.000Z
2022-01-07T00:38:46.000Z
workerInfra/domain/driverInterface.py
jtom38/newsbot.worker
6f5d93c474d21542f1af20e3b2537f26e2bcbbc3
[ "MIT" ]
null
null
null
from abc import ABC, abstractclassmethod class DriverInterface(ABC): @abstractclassmethod def start(self) -> object: raise NotImplementedError() @abstractclassmethod def getContent(self) -> str: raise NotImplementedError() @abstractclassmethod def goTo(self) -> None: ...
23.785714
53
0.677177
from abc import ABC, abstractclassmethod class DriverInterface(ABC): @abstractclassmethod def start(self) -> object: raise NotImplementedError() @abstractclassmethod def getContent(self) -> str: raise NotImplementedError() @abstractclassmethod def goTo(self) -> None: ...
true
true
f73fbcfa823b80a2c0818fd436bc5ba69feec56d
15,130
py
Python
tools/ctor_evaller.py
devnexen/emscripten
7cec58d739efa86fda71ffb188df554c2c5f8058
[ "MIT" ]
1
2021-02-10T04:30:14.000Z
2021-02-10T04:30:14.000Z
tools/ctor_evaller.py
devnexen/emscripten
7cec58d739efa86fda71ffb188df554c2c5f8058
[ "MIT" ]
null
null
null
tools/ctor_evaller.py
devnexen/emscripten
7cec58d739efa86fda71ffb188df554c2c5f8058
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright 2016 The Emscripten Authors. All rights reserved. # Emscripten is available under two separate licenses, the MIT license and the # University of Illinois/NCSA Open Source License. Both these licenses can be # found in the LICENSE file. """Tries to evaluate global constructors, apply...
36.196172
199
0.674488
import json import logging import os import subprocess import sys import time sys.path.insert(1, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from tools import shared, js_optimizer, jsrun, building from tools.tempfiles import try_delete js_file = sys.argv[1] binary_file = sys.argv[2] total_m...
true
true
f73fbdbf87c7b280e78e852e70efb1f4e41483e7
772
py
Python
type2_model.py
lvyufeng/Captcha_recognition
9be02e3489ad30bb4442818f226e4e03ffe620f9
[ "MIT" ]
null
null
null
type2_model.py
lvyufeng/Captcha_recognition
9be02e3489ad30bb4442818f226e4e03ffe620f9
[ "MIT" ]
null
null
null
type2_model.py
lvyufeng/Captcha_recognition
9be02e3489ad30bb4442818f226e4e03ffe620f9
[ "MIT" ]
null
null
null
def simple_cnn(): model = Sequential() model.add(Convolution2D(32, 1, 4, 4, border_mode='full', activation='relu')) model.add(Convolution2D(32, 32, 4, 4, activation='relu')) model.add(MaxPooling2D(poolsize=(3, 3))) model.add(Dropout(0.25)) model.add(Convolution2D(64, 32, 4, 4, border_mode='full...
42.888889
81
0.670984
def simple_cnn(): model = Sequential() model.add(Convolution2D(32, 1, 4, 4, border_mode='full', activation='relu')) model.add(Convolution2D(32, 32, 4, 4, activation='relu')) model.add(MaxPooling2D(poolsize=(3, 3))) model.add(Dropout(0.25)) model.add(Convolution2D(64, 32, 4, 4, border_mode='full...
true
true
f73fbdcc8619f3f6499a378dc4f305d527afff23
436
py
Python
src/share_rest_api/setup.py
flecoqui/sharing-data-rest-api
a468861c941099f3a1546f764e76194f6a9ff066
[ "MIT" ]
null
null
null
src/share_rest_api/setup.py
flecoqui/sharing-data-rest-api
a468861c941099f3a1546f764e76194f6a9ff066
[ "MIT" ]
null
null
null
src/share_rest_api/setup.py
flecoqui/sharing-data-rest-api
a468861c941099f3a1546f764e76194f6a9ff066
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup setup( name="share_rest_api", package_dir={"": "src"}, packages=find_packages("src"), package_data={}, include_package_data=True, version="0.0.1", long_description="...", long_description_content_type="text/markdown", keywords=["python"], ...
22.947368
50
0.630734
from setuptools import find_packages, setup setup( name="share_rest_api", package_dir={"": "src"}, packages=find_packages("src"), package_data={}, include_package_data=True, version="0.0.1", long_description="...", long_description_content_type="text/markdown", keywords=["python"], ...
true
true
f73fbe04e298000a0f78868c7f187c43298ddfa0
1,913
py
Python
bangpy-ops/utils/generate_all_ops_header.py
SS7D631/cambricon
51e7884ce1f94189f71624f62377228dea552abb
[ "Apache-2.0" ]
1
2022-02-22T06:43:28.000Z
2022-02-22T06:43:28.000Z
bangpy-ops/utils/generate_all_ops_header.py
SS7D631/cambricon
51e7884ce1f94189f71624f62377228dea552abb
[ "Apache-2.0" ]
null
null
null
bangpy-ops/utils/generate_all_ops_header.py
SS7D631/cambricon
51e7884ce1f94189f71624f62377228dea552abb
[ "Apache-2.0" ]
1
2022-03-03T07:27:46.000Z
2022-03-03T07:27:46.000Z
# Copyright (C) [2021] by Cambricon, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish...
41.586957
82
0.693152
import os import sys def main(): if len(sys.argv) == 1: raise ValueError("Please input at least one operator header file.") header_lists = sys.argv[1].split(",") header_lists = [i for i in header_lists if i != ""] build_path = os.environ.get("BANGPY_BUILD_PATH", "") if ...
true
true
f73fbf5da777638b01486536f81f23f5c512bc56
9,185
py
Python
monolog/monolog.py
Ckoetael/monolog
914a4a9aa9651b2ee06380f9c6d130ee6602500f
[ "MIT" ]
null
null
null
monolog/monolog.py
Ckoetael/monolog
914a4a9aa9651b2ee06380f9c6d130ee6602500f
[ "MIT" ]
null
null
null
monolog/monolog.py
Ckoetael/monolog
914a4a9aa9651b2ee06380f9c6d130ee6602500f
[ "MIT" ]
null
null
null
# /usr/bin/python # -*- coding: utf-8 -*- """ MongoDB logger module """ import datetime import logging import os import json import inspect import random from typing import Optional from pymongo import MongoClient class MongoLogger: """ MongoDB logger class.\n """ LEVELS = {'crit': 50, 'err': 40, 'wa...
33.768382
111
0.554709
import datetime import logging import os import json import inspect import random from typing import Optional from pymongo import MongoClient class MongoLogger: LEVELS = {'crit': 50, 'err': 40, 'warn': 30, 'info': 20, 'debug': 10} def __init__(self, collection_name='default_logger', pid='', config_file="m...
true
true
f73fbfb8229436cce1527b5e9a743b4259996cd8
45,269
py
Python
codes/models/modules/architecture.py
kingsj0405/Explorable-Super-Resolution
6582477ec1e2b0c6f4bd781552ac880fabdb4496
[ "Apache-2.0" ]
54
2020-06-16T07:44:19.000Z
2022-03-01T06:23:38.000Z
codes/models/modules/architecture.py
kingsj0405/Explorable-Super-Resolution
6582477ec1e2b0c6f4bd781552ac880fabdb4496
[ "Apache-2.0" ]
6
2020-07-01T08:59:24.000Z
2021-02-22T19:58:23.000Z
codes/models/modules/architecture.py
kingsj0405/Explorable-Super-Resolution
6582477ec1e2b0c6f4bd781552ac880fabdb4496
[ "Apache-2.0" ]
11
2020-06-16T21:28:00.000Z
2022-01-06T12:28:58.000Z
import math import torch import torch.nn as nn import torch.nn.init as init import torchvision from . import block as B from . import spectral_norm as SN import functools import numpy as np import os import models.modules.archs_util as arch_util import torch.nn.functional as F import re #################### # Generato...
50.131783
225
0.625329
import math import torch import torch.nn as nn import torch.nn.init as init import torchvision from . import block as B from . import spectral_norm as SN import functools import numpy as np import os import models.modules.archs_util as arch_util import torch.nn.functional as F import re b) if self.up...
true
true
f73fbfca958e487fc30ecab967cf9db69f064b65
1,128
py
Python
Phython-Exercise/ex041.py
laryssagoncalves/Python-Projects
a08bf31ff3bb486b64642165b258a7f8be69d199
[ "MIT" ]
null
null
null
Phython-Exercise/ex041.py
laryssagoncalves/Python-Projects
a08bf31ff3bb486b64642165b258a7f8be69d199
[ "MIT" ]
null
null
null
Phython-Exercise/ex041.py
laryssagoncalves/Python-Projects
a08bf31ff3bb486b64642165b258a7f8be69d199
[ "MIT" ]
null
null
null
#importando biblioteca de ano e pausa de apresentação from datetime import date from time import sleep print('-*'*25) print(' '*6,'CONFEDERAÇÃO NACIONAL DE NATAÇÃO') print('-*'*25) sleep(2) print(''' As Categorias de Atletas são: – Até 9 anos: MIRIM – Até 14 anos: INFANTIL – Até 19 anos: JÚNIOR – Até 25 anos: SÊNIOR –...
27.512195
58
0.617908
from datetime import date from time import sleep print('-*'*25) print(' '*6,'CONFEDERAÇÃO NACIONAL DE NATAÇÃO') print('-*'*25) sleep(2) print(''' As Categorias de Atletas são: – Até 9 anos: MIRIM – Até 14 anos: INFANTIL – Até 19 anos: JÚNIOR – Até 25 anos: SÊNIOR – Acima de 25 anos: MASTER''') print('-*'*25) sleep(3)...
true
true
f73fc03c47f9d69ef60fd3b2bbe39aed13c16162
619
py
Python
vup/version.py
arecarn/vup
40880c172adc13b3e518fd366a2d6ca77f2016a1
[ "MIT" ]
null
null
null
vup/version.py
arecarn/vup
40880c172adc13b3e518fd366a2d6ca77f2016a1
[ "MIT" ]
null
null
null
vup/version.py
arecarn/vup
40880c172adc13b3e518fd366a2d6ca77f2016a1
[ "MIT" ]
null
null
null
""" This files purpose is to the be one place of truth for the version of this project. The variable __version__ is a string following the guidelines of semantic versioning. The general guidelines are as follows Given a version number MAJOR.MINOR.PATCH, increment the: 1. MAJOR version when you make incompatible API ...
34.388889
76
0.79483
__version__ = '0.1.0-beta'
true
true
f73fc0a35ae450a2eaeed9a01bcc1e021600f5ce
1,712
py
Python
tests/handlers/test_base_handler_without_unsafe.py
appotry/thumbor
c2e75918da09ddd3086e8eeaca00d1d2747cf57c
[ "MIT" ]
null
null
null
tests/handlers/test_base_handler_without_unsafe.py
appotry/thumbor
c2e75918da09ddd3086e8eeaca00d1d2747cf57c
[ "MIT" ]
null
null
null
tests/handlers/test_base_handler_without_unsafe.py
appotry/thumbor
c2e75918da09ddd3086e8eeaca00d1d2747cf57c
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com from preggy import expect from tornado.testing import gen_test from...
33.568627
115
0.73014
from preggy import expect from tornado.testing import gen_test from tests.fixtures.images import ( default_image, ) from thumbor.config import Config from thumbor.context import Context, ServerParameters from thumbor.importer import Importer from tests.handlers.test_base_handler import BaseImagingTestCas...
true
true
f73fc1884c8d340c0ade296169db473fe6173a2f
12,309
pyw
Python
pinganalysis.pyw
joshuathomas2/ping_analysis
189e5110226fb8fa5ce94281b641fc4e1c9b846b
[ "MIT" ]
null
null
null
pinganalysis.pyw
joshuathomas2/ping_analysis
189e5110226fb8fa5ce94281b641fc4e1c9b846b
[ "MIT" ]
3
2019-06-13T06:59:19.000Z
2020-03-01T04:41:40.000Z
pinganalysis.pyw
joshuathomas2/ping_analysis
189e5110226fb8fa5ce94281b641fc4e1c9b846b
[ "MIT" ]
null
null
null
import tkinter as tk import subprocess import json import os import re class PingAnalysis: def __init__(self): self.settings_file = open("settings.json", "r") self.settings_json = json.load(self.settings_file) self.settings_file.close() self.FONT_SMALL = (f"{self.settings_json['FO...
41.03
121
0.639776
import tkinter as tk import subprocess import json import os import re class PingAnalysis: def __init__(self): self.settings_file = open("settings.json", "r") self.settings_json = json.load(self.settings_file) self.settings_file.close() self.FONT_SMALL = (f"{self.settings_json['FO...
true
true
f73fc1b0950dcb7b54849eb321480af6da26bbe2
4,704
py
Python
samples/python/network_api_pytorch_mnist/model.py
L-Net-1992/TensorRT
34b664d404001bd724cb56b52a6e0e05e1fd97f2
[ "Apache-2.0" ]
null
null
null
samples/python/network_api_pytorch_mnist/model.py
L-Net-1992/TensorRT
34b664d404001bd724cb56b52a6e0e05e1fd97f2
[ "Apache-2.0" ]
null
null
null
samples/python/network_api_pytorch_mnist/model.py
L-Net-1992/TensorRT
34b664d404001bd724cb56b52a6e0e05e1fd97f2
[ "Apache-2.0" ]
null
null
null
# # SPDX-FileCopyrightText: Copyright (c) 1993-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # 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...
39.2
198
0.608206
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.autograd import Variable import numpy as np import os from random import randint class Net(nn.Module): def __init__(self): super(Net, s...
true
true
f73fc1c99f41a3f9d8453faeb6830db314e02382
13,650
py
Python
sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_metastore_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_metastore_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_metastore_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
43.196203
153
0.659487
from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure...
true
true
f73fc2b93dc5d6b12783d9478e93a1915a5c0028
1,108
py
Python
day07/d7a.py
AlexMabry/aoc20
ce3fa021134b91b96d50b2f73be66a7516f9809e
[ "MIT" ]
null
null
null
day07/d7a.py
AlexMabry/aoc20
ce3fa021134b91b96d50b2f73be66a7516f9809e
[ "MIT" ]
null
null
null
day07/d7a.py
AlexMabry/aoc20
ce3fa021134b91b96d50b2f73be66a7516f9809e
[ "MIT" ]
null
null
null
from collections import defaultdict def condense_line(line): necessary = line.replace(' bags', '').replace(' bag', '').replace('.', '') segmented = necessary.replace(' contain ', ':').replace(', ', ':').split(':') return segmented[0], segmented[1:] def decode_bag_rules(rules): bags = defaultdict(set...
27.7
93
0.657942
from collections import defaultdict def condense_line(line): necessary = line.replace(' bags', '').replace(' bag', '').replace('.', '') segmented = necessary.replace(' contain ', ':').replace(', ', ':').split(':') return segmented[0], segmented[1:] def decode_bag_rules(rules): bags = defaultdict(set...
true
true
f73fc383e5e38aae2140ea3dd8394b3d528f6e10
1,909
py
Python
meraki/api/wireless_settings.py
fsandberg/dashboard-api-python
c01ff038643a39bd12660d2719375eeb05c7ba24
[ "MIT" ]
null
null
null
meraki/api/wireless_settings.py
fsandberg/dashboard-api-python
c01ff038643a39bd12660d2719375eeb05c7ba24
[ "MIT" ]
null
null
null
meraki/api/wireless_settings.py
fsandberg/dashboard-api-python
c01ff038643a39bd12660d2719375eeb05c7ba24
[ "MIT" ]
null
null
null
class WirelessSettings(object): def __init__(self, session): super(WirelessSettings, self).__init__() self._session = session def getNetworkWirelessSettings(self, networkId: str): """ **Return the wireless settings for a network** https://developer.cisco.com/docs/mer...
40.617021
167
0.648507
class WirelessSettings(object): def __init__(self, session): super(WirelessSettings, self).__init__() self._session = session def getNetworkWirelessSettings(self, networkId: str): metadata = { 'tags': ['Wireless settings'], 'operation': 'getNetworkWirelessSe...
true
true
f73fc399c4a6caa3996f1a0e8169648805091cf8
3,978
py
Python
bpnet/samplers.py
mlweilert/bpnet
dcc9e8d805f9de774ae9dcc62c20504915be614f
[ "MIT" ]
93
2019-08-15T19:49:19.000Z
2022-03-04T08:23:44.000Z
bpnet/samplers.py
mlweilert/bpnet
dcc9e8d805f9de774ae9dcc62c20504915be614f
[ "MIT" ]
29
2019-08-15T15:44:44.000Z
2022-03-28T06:56:07.000Z
bpnet/samplers.py
mlweilert/bpnet
dcc9e8d805f9de774ae9dcc62c20504915be614f
[ "MIT" ]
24
2019-08-29T18:54:36.000Z
2022-03-23T21:04:46.000Z
""" Module implementing different samplers for the chipnexus data """ import pandas as pd import numpy as np from kipoi_utils.external.torch.sampler import Sampler from kipoi_utils.data_utils import iterable_cycle import warnings import gin def get_batch_sizes(p_vec, batch_size, verbose=True): """Compute the indi...
30.837209
109
0.640271
import pandas as pd import numpy as np from kipoi_utils.external.torch.sampler import Sampler from kipoi_utils.data_utils import iterable_cycle import warnings import gin def get_batch_sizes(p_vec, batch_size, verbose=True): p_vec = np.array(p_vec) / sum(p_vec) batch_sizes = np.round(p_vec * batch_size).asty...
true
true
f73fc3d2359fda3602e199fd640afb18ee70807c
5,256
py
Python
opt/BayesianOptimization/main_classification.py
Neronjust2017/keras-project
919e67e10b0bf518eb9cc63df68c79fe2bb71b36
[ "Apache-2.0" ]
2
2020-07-07T12:29:02.000Z
2020-09-16T15:33:02.000Z
opt/BayesianOptimization/main_classification.py
Neronjust2017/keras-project
919e67e10b0bf518eb9cc63df68c79fe2bb71b36
[ "Apache-2.0" ]
1
2020-10-04T12:08:27.000Z
2020-10-05T05:05:39.000Z
opt/BayesianOptimization/main_classification.py
Neronjust2017/keras-project
919e67e10b0bf518eb9cc63df68c79fe2bb71b36
[ "Apache-2.0" ]
null
null
null
from comet_ml import experiment from data_loader.uts_classification_data_loader import UtsClassificationDataLoader from models.uts_classification_model import UtsClassificationModel from trainers.uts_classification_trainer import UtsClassificationTrainer from evaluater.uts_classification_evaluater import UtsClassificat...
42.048
129
0.570967
from comet_ml import experiment from data_loader.uts_classification_data_loader import UtsClassificationDataLoader from models.uts_classification_model import UtsClassificationModel from trainers.uts_classification_trainer import UtsClassificationTrainer from evaluater.uts_classification_evaluater import UtsClassificat...
true
true
f73fc46868fcdc0ad66d0b3c9dac72d5a6b21779
272
py
Python
src/ga/interfaces/fitness.py
technote-space/genetic-algorithms-py
a37e0a34c5970987d76fda6b14a48d9ab0579e33
[ "MIT" ]
3
2020-09-03T18:02:30.000Z
2020-09-08T18:09:38.000Z
src/ga/interfaces/fitness.py
Amplil/genetic-algorithms-py
4788c73b1b9d57eac904e8eb99d9140457201e6b
[ "MIT" ]
7
2020-09-08T16:57:19.000Z
2022-03-12T00:51:26.000Z
src/ga/interfaces/fitness.py
Amplil/genetic-algorithms-py
4788c73b1b9d57eac904e8eb99d9140457201e6b
[ "MIT" ]
1
2021-04-14T11:10:50.000Z
2021-04-14T11:10:50.000Z
from abc import ABCMeta, abstractmethod from .chromosome import IChromosome class IFitness(metaclass=ABCMeta): """ Description: ------------ 適応度のinterface """ @abstractmethod def evaluate(self, chromosome: IChromosome) -> None: pass
18.133333
56
0.647059
from abc import ABCMeta, abstractmethod from .chromosome import IChromosome class IFitness(metaclass=ABCMeta): @abstractmethod def evaluate(self, chromosome: IChromosome) -> None: pass
true
true
f73fc546c74388f4133e5cb1b21397db05491945
16,161
py
Python
sumo_rl/environment/env.py
ankitdipto/sumo-rl
70d75d463fa09d0ecfc10589b66955c22c8df41b
[ "MIT" ]
null
null
null
sumo_rl/environment/env.py
ankitdipto/sumo-rl
70d75d463fa09d0ecfc10589b66955c22c8df41b
[ "MIT" ]
null
null
null
sumo_rl/environment/env.py
ankitdipto/sumo-rl
70d75d463fa09d0ecfc10589b66955c22c8df41b
[ "MIT" ]
null
null
null
import os import sys from pathlib import Path from typing import Optional, Union, Tuple import sumo_rl if 'SUMO_HOME' in os.environ: tools = os.path.join(os.environ['SUMO_HOME'], 'tools') sys.path.append(tools) else: sys.exit("Please declare the environment variable 'SUMO_HOME'") import traci import sumolib...
39.225728
196
0.602747
import os import sys from pathlib import Path from typing import Optional, Union, Tuple import sumo_rl if 'SUMO_HOME' in os.environ: tools = os.path.join(os.environ['SUMO_HOME'], 'tools') sys.path.append(tools) else: sys.exit("Please declare the environment variable 'SUMO_HOME'") import traci import sumolib...
true
true
f73fc54b008744bbbd8a18ff609e52d35a7f90fb
7,804
py
Python
pdb2pqr/pdb2pqr/pdb2pka/example.py
ashermancinelli/apbs-pdb2pqr
0b1bc0126331cf3f1e08667ccc70dae8eda5cd00
[ "BSD-3-Clause" ]
null
null
null
pdb2pqr/pdb2pqr/pdb2pka/example.py
ashermancinelli/apbs-pdb2pqr
0b1bc0126331cf3f1e08667ccc70dae8eda5cd00
[ "BSD-3-Clause" ]
null
null
null
pdb2pqr/pdb2pqr/pdb2pka/example.py
ashermancinelli/apbs-pdb2pqr
0b1bc0126331cf3f1e08667ccc70dae8eda5cd00
[ "BSD-3-Clause" ]
null
null
null
"""APBS interface for PDB2PQR Authors: Todd Dolinsky, Jens Erik Nielsen """ import logging import time import string from src import psize from src import inputgen from apbslib import * _LOGGER = logging.getLogger(__name__) Python_kb = 1.3806581e-23 Python_Na = 6.0221367e+23 NOSH_MAXMOL = 20 NOSH_MAXCALC = 20 ...
26.544218
93
0.603152
import logging import time import string from src import psize from src import inputgen from apbslib import * _LOGGER = logging.getLogger(__name__) Python_kb = 1.3806581e-23 Python_Na = 6.0221367e+23 NOSH_MAXMOL = 20 NOSH_MAXCALC = 20 class APBSError(Exception): def __init__(self, value): self.v...
true
true
f73fc5bf605fb9e53fcfcfa4cda69aeecfe2a273
1,132
py
Python
unit_tests/example.py
alliedel/anomalyframework_python
63c56d9fb2e1dc37dfca494805e7fa179e078623
[ "MIT" ]
15
2018-12-28T07:32:56.000Z
2022-02-20T00:17:34.000Z
unit_tests/example.py
alliedel/anomalyframework_python
63c56d9fb2e1dc37dfca494805e7fa179e078623
[ "MIT" ]
1
2018-04-06T18:14:12.000Z
2018-07-11T11:18:34.000Z
unit_tests/example.py
alliedel/anomalyframework_python
63c56d9fb2e1dc37dfca494805e7fa179e078623
[ "MIT" ]
5
2018-02-07T19:08:09.000Z
2019-07-01T23:17:23.000Z
import os import shutil import subprocess runinfo_fname = os.path.abspath('./example.runinfo') output_directory = os.path.abspath('./runfiles/output/') if os.path.isdir(output_directory): shutil.rmtree(output_directory, ignore_errors=True) print('making {}'.format(output_directory)) os.mkdir(output_directory) pri...
41.925926
124
0.750883
import os import shutil import subprocess runinfo_fname = os.path.abspath('./example.runinfo') output_directory = os.path.abspath('./runfiles/output/') if os.path.isdir(output_directory): shutil.rmtree(output_directory, ignore_errors=True) print('making {}'.format(output_directory)) os.mkdir(output_directory) pri...
true
true
f73fc74043465426004365e949344373e3103d24
1,037
py
Python
python/013_Roman_to_Integer.py
dvlpsh/leetcode-1
f965328af72113ac8a5a9d6624868c1502be937b
[ "MIT" ]
4,416
2016-03-30T15:02:26.000Z
2022-03-31T16:31:03.000Z
python/013_Roman_to_Integer.py
YinpuLi/leetcode-6
1371de2631d745efba39de41b51c3424e35da434
[ "MIT" ]
20
2018-11-17T13:46:25.000Z
2022-03-13T05:37:06.000Z
python/013_Roman_to_Integer.py
YinpuLi/leetcode-6
1371de2631d745efba39de41b51c3424e35da434
[ "MIT" ]
1,374
2017-05-26T15:44:30.000Z
2022-03-30T19:21:02.000Z
class Solution: # def romanToInt(self, s): # """ # :type s: str # :rtype: int # """ # roman = {'I': 1, 'V': 5, 'X': 10, # 'L': 50, 'C': 100, 'D': 500, 'M': 1000} # result = 0 # last = s[-1] # for t in reversed(s): # if t ==...
28.805556
58
0.344262
class Solution: # :type s: str # :rtype: int # """ def romanToInt(self, s): roman = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000} prev, total = 0, 0 ...
true
true
f73fc7e21f2b7ff18c70868342b318e3805fbc95
306
py
Python
example/str_methods.py
tinashime/Python27
b632918c7368a9bcfc5af8353e136247d954fb5e
[ "bzip2-1.0.6" ]
null
null
null
example/str_methods.py
tinashime/Python27
b632918c7368a9bcfc5af8353e136247d954fb5e
[ "bzip2-1.0.6" ]
null
null
null
example/str_methods.py
tinashime/Python27
b632918c7368a9bcfc5af8353e136247d954fb5e
[ "bzip2-1.0.6" ]
null
null
null
name='Swaroop' if name.startswith('Swa'): print 'Yes,the string start with "Swa"' if 'a' in name: print 'Yes,it contains the string "a"' if name.find("war")!=-1: print 'Yes,it contains the string "war"' delimiter='_*_' mylist=['Brazil','Russia','India','China'] print delimiter.join(mylist)
25.5
45
0.663399
name='Swaroop' if name.startswith('Swa'): print 'Yes,the string start with "Swa"' if 'a' in name: print 'Yes,it contains the string "a"' if name.find("war")!=-1: print 'Yes,it contains the string "war"' delimiter='_*_' mylist=['Brazil','Russia','India','China'] print delimiter.join(mylist)
false
true
f73fc8f919bae0fcafd115cb36aaedb71a3ea934
10,529
py
Python
automod/chatbot/chatbot.py
4006G2/AutoMod
f40d04ebc0a6949eb351e8d928951c6b464a439a
[ "MIT" ]
null
null
null
automod/chatbot/chatbot.py
4006G2/AutoMod
f40d04ebc0a6949eb351e8d928951c6b464a439a
[ "MIT" ]
3
2019-11-05T16:39:41.000Z
2019-11-05T16:41:24.000Z
automod/chatbot/chatbot.py
4006G2/AutoMod
f40d04ebc0a6949eb351e8d928951c6b464a439a
[ "MIT" ]
1
2019-11-13T16:49:52.000Z
2019-11-13T16:49:52.000Z
__author__ = "Benedict Thompson", "Hon Lam Lee" __version__ = "0.1p" import random import re from enum import Enum import os import csv import requests import time import datetime class MessageTone(Enum): POSITIVE = 1 NEUTRAL = 0 NEGATIVE = -1 class WarningLevel(Enum): WARNING = 0 MUTE = 1 ...
34.296417
122
0.563111
__author__ = "Benedict Thompson", "Hon Lam Lee" __version__ = "0.1p" import random import re from enum import Enum import os import csv import requests import time import datetime class MessageTone(Enum): POSITIVE = 1 NEUTRAL = 0 NEGATIVE = -1 class WarningLevel(Enum): WARNING = 0 MUTE = 1 ...
true
true
f73fc9d9bb899e6cf67484ff02e98102112127dc
4,268
py
Python
trimesh/remesh.py
nick-parker/trimesh
a7bc1e0489ec98e3a3516088a7e64c8beca8b41a
[ "MIT" ]
null
null
null
trimesh/remesh.py
nick-parker/trimesh
a7bc1e0489ec98e3a3516088a7e64c8beca8b41a
[ "MIT" ]
null
null
null
trimesh/remesh.py
nick-parker/trimesh
a7bc1e0489ec98e3a3516088a7e64c8beca8b41a
[ "MIT" ]
1
2019-05-31T03:37:21.000Z
2019-05-31T03:37:21.000Z
""" remesh.py ------------- Deal with re- triangulation of existing meshes. """ import numpy as np import collections from . import util from . import grouping def subdivide(vertices, faces, face_index=None): """ Subdivide a mesh into smaller triangles. Parameters ---------- vertices: (n,3) f...
34.699187
89
0.590206
import numpy as np import collections from . import util from . import grouping def subdivide(vertices, faces, face_index=None): if face_index is None: face_index = np.arange(len(faces)) else: face_index = np.asanyarray(face_index) faces = faces[face_index] triangles = ve...
true
true
f73fcac5d487a71147f917ccf69a8fcb629dd8ff
8,125
py
Python
service/server.py
LandRegistry/login-api
a9c7128498f9ec4dede07d0c915cc1a4c0e37a43
[ "MIT" ]
null
null
null
service/server.py
LandRegistry/login-api
a9c7128498f9ec4dede07d0c915cc1a4c0e37a43
[ "MIT" ]
8
2015-05-29T14:25:32.000Z
2015-08-06T15:36:17.000Z
service/server.py
LandRegistry/login-api
a9c7128498f9ec4dede07d0c915cc1a4c0e37a43
[ "MIT" ]
2
2016-11-22T12:26:32.000Z
2021-04-11T06:05:42.000Z
from flask import request, Response # type: ignore import json import logging import logging.config # type: ignore from service import app, auditing, db_access, security AUTH_FAILURE_RESPONSE_BODY = json.dumps({'error': 'Invalid credentials'}) INVALID_REQUEST_RESPONSE_BODY = json.dumps({'error': 'Invalid request'}...
33.29918
98
0.6976
from flask import request, Response import json import logging import logging.config from service import app, auditing, db_access, security AUTH_FAILURE_RESPONSE_BODY = json.dumps({'error': 'Invalid credentials'}) INVALID_REQUEST_RESPONSE_BODY = json.dumps({'error': 'Invalid request'}) INTERNAL_SERVER_ERROR_RESP...
true
true
f73fcae4cac435af6622a4c09f90d75680bb983b
540
py
Python
kutana/backend.py
sakost/kutana
7695902803f17e1ce6109b5f9a8a7c24126d322f
[ "MIT" ]
null
null
null
kutana/backend.py
sakost/kutana
7695902803f17e1ce6109b5f9a8a7c24126d322f
[ "MIT" ]
null
null
null
kutana/backend.py
sakost/kutana
7695902803f17e1ce6109b5f9a8a7c24126d322f
[ "MIT" ]
null
null
null
class Backend: async def on_start(self, app): pass async def on_shutdown(self, app): pass def prepare_context(self, ctx): pass async def perform_updates_request(self, submit_update): raise NotImplementedError async def perform_send(self, target_id, message, attach...
23.478261
74
0.677778
class Backend: async def on_start(self, app): pass async def on_shutdown(self, app): pass def prepare_context(self, ctx): pass async def perform_updates_request(self, submit_update): raise NotImplementedError async def perform_send(self, target_id, message, attach...
true
true
f73fcb9173d1a31f57f21a9c8c079fcfe223bb2a
13,898
py
Python
nlu/pipe/viz/streamlit_viz/viz_building_blocks/word_similarity.py
Murat-Karadag/nlu
6a2b5995ea543e63c40baaca1bf9ad8a9db36757
[ "Apache-2.0" ]
null
null
null
nlu/pipe/viz/streamlit_viz/viz_building_blocks/word_similarity.py
Murat-Karadag/nlu
6a2b5995ea543e63c40baaca1bf9ad8a9db36757
[ "Apache-2.0" ]
null
null
null
nlu/pipe/viz/streamlit_viz/viz_building_blocks/word_similarity.py
Murat-Karadag/nlu
6a2b5995ea543e63c40baaca1bf9ad8a9db36757
[ "Apache-2.0" ]
null
null
null
import nlu from nlu.discovery import Discoverer from nlu.pipe.utils.storage_ref_utils import StorageRefUtils from typing import List, Tuple, Optional, Dict, Union import streamlit as st from nlu.utils.modelhub.modelhub_utils import ModelHubUtils import numpy as np import pandas as pd from nlu.pipe.viz.streamlit_viz.st...
59.905172
170
0.57627
import nlu from nlu.discovery import Discoverer from nlu.pipe.utils.storage_ref_utils import StorageRefUtils from typing import List, Tuple, Optional, Dict, Union import streamlit as st from nlu.utils.modelhub.modelhub_utils import ModelHubUtils import numpy as np import pandas as pd from nlu.pipe.viz.streamlit_viz.st...
true
true
f73fcd684e0e8e2ccaed9d8ecc82f67af840f1df
6,875
py
Python
tests/logging/test_terse_json.py
maxkratz/synapse
e46ac85d674d90fa01aa49aee9587093ab6d8677
[ "Apache-2.0" ]
null
null
null
tests/logging/test_terse_json.py
maxkratz/synapse
e46ac85d674d90fa01aa49aee9587093ab6d8677
[ "Apache-2.0" ]
null
null
null
tests/logging/test_terse_json.py
maxkratz/synapse
e46ac85d674d90fa01aa49aee9587093ab6d8677
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Matrix.org Foundation C.I.C. # # 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...
34.20398
90
0.614109
import json import logging from io import BytesIO, StringIO from unittest.mock import Mock, patch from twisted.web.server import Request from synapse.http.site import SynapseRequest from synapse.logging._terse_json import JsonFormatter, TerseJsonFormatter from synapse.logging.context import LoggingContex...
true
true
f73fce718d68732a8fd3a18406cfcdbed3513839
55
py
Python
modules/liteflownet/network/correlation/__init__.py
adnortje/deepvideo
76d09ee8696355bc29ee57c1ef2ff61474c5ed41
[ "CC0-1.0" ]
37
2019-11-23T06:42:12.000Z
2022-01-25T16:08:28.000Z
modules/liteflownet/network/correlation/__init__.py
sangramch/deepvideo
16e622434b9843238b8092f94da2c58a4346788d
[ "CC0-1.0" ]
4
2020-04-11T12:36:27.000Z
2021-07-26T10:12:53.000Z
modules/liteflownet/network/correlation/__init__.py
sangramch/deepvideo
16e622434b9843238b8092f94da2c58a4346788d
[ "CC0-1.0" ]
9
2019-12-13T07:30:58.000Z
2020-07-15T05:32:17.000Z
# imports from .correlation import FunctionCorrelation
18.333333
44
0.854545
from .correlation import FunctionCorrelation
true
true
f73fcf166687f802261c11c6f4b6269388291c38
673
py
Python
app/modules/frest/validate/user.py
h4wldev/frest
80987ae21df72225d9518547f52b5c7d28a045d3
[ "MIT" ]
5
2018-11-19T23:41:04.000Z
2019-09-23T03:51:05.000Z
app/modules/frest/validate/user.py
h4wldev/frest
80987ae21df72225d9518547f52b5c7d28a045d3
[ "MIT" ]
null
null
null
app/modules/frest/validate/user.py
h4wldev/frest
80987ae21df72225d9518547f52b5c7d28a045d3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from wtforms import Form, StringField, PasswordField, validators class modificationForm(Form): username = StringField('User Name', [ validators.Optional(), validators.Length(min=2, max=20) ]) email = StringField('Email', [ validators.Optional(), vali...
28.041667
98
0.618128
from wtforms import Form, StringField, PasswordField, validators class modificationForm(Form): username = StringField('User Name', [ validators.Optional(), validators.Length(min=2, max=20) ]) email = StringField('Email', [ validators.Optional(), validators.Length(min=5), ...
true
true
f73fcf8398ed2538055045c9a774e42ac46bf5ec
23,075
py
Python
evaluation/evaluate_simulation_coda_gan.py
joannetruong/habitat-api
aad2fd7b8545dce44daefd4b7b3941672eb96ee3
[ "MIT" ]
null
null
null
evaluation/evaluate_simulation_coda_gan.py
joannetruong/habitat-api
aad2fd7b8545dce44daefd4b7b3941672eb96ee3
[ "MIT" ]
null
null
null
evaluation/evaluate_simulation_coda_gan.py
joannetruong/habitat-api
aad2fd7b8545dce44daefd4b7b3941672eb96ee3
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import argparse import os from collections import defaultdict import habitat import numpy as np import quaternion import torch from evaluate_reality import load_model from gym.spaces.dict_space import Dict as SpaceDict from habitat.tasks.utils import cartesian_to_polar from habitat.util...
43.050373
200
0.628126
import matplotlib.pyplot as plt import argparse import os from collections import defaultdict import habitat import numpy as np import quaternion import torch from evaluate_reality import load_model from gym.spaces.dict_space import Dict as SpaceDict from habitat.tasks.utils import cartesian_to_polar from habitat.util...
true
true
f73fcf88dc0cd4a8f81e65fdda4a6536f72ae2c5
57,804
py
Python
cupydo/algorithm.py
tobadavid/CUPyDO
ad4712d5bd84c964f49ea0c05d6e5ad4fb1e9e88
[ "Apache-2.0" ]
1
2018-07-16T00:30:37.000Z
2018-07-16T00:30:37.000Z
cupydo/algorithm.py
tobadavid/CUPyDO
ad4712d5bd84c964f49ea0c05d6e5ad4fb1e9e88
[ "Apache-2.0" ]
null
null
null
cupydo/algorithm.py
tobadavid/CUPyDO
ad4712d5bd84c964f49ea0c05d6e5ad4fb1e9e88
[ "Apache-2.0" ]
1
2019-03-09T17:24:58.000Z
2019-03-09T17:24:58.000Z
#!/usr/bin/env python # -*- coding: latin-1; -*- ''' Copyright 2018 University of Liège 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 req...
45.336471
404
0.603505
''' Copyright 2018 University of Liège 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...
false
true
f73fd1068ae715c534be68fe4322aee78a6a987e
6,823
py
Python
google/appengine/ext/mapreduce/test_support.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
google/appengine/ext/mapreduce/test_support.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
google/appengine/ext/mapreduce/test_support.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
26.652344
79
0.675656
"""Utilities to aid in testing mapreduces.""" import base64 import collections import logging import os import re from google.appengine.ext.mapreduce import main from google.appengine.ext.mapreduce import model from google.appengine.ext.webapp import mock_webapp _LOGGING_LEVEL = ...
false
true