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
1c152bcf47de4d22404452c472e12f9e8a57ca61
867
py
Python
test/BribeNet/bribery/test_briber.py
RobMurray98/BribeNet
09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc
[ "MIT" ]
null
null
null
test/BribeNet/bribery/test_briber.py
RobMurray98/BribeNet
09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc
[ "MIT" ]
null
null
null
test/BribeNet/bribery/test_briber.py
RobMurray98/BribeNet
09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc
[ "MIT" ]
null
null
null
import random from test.BribeNet.bribery.static.briberTestCase import BriberTestCase from BribeNet.bribery.briber import BriberyGraphAlreadySetException, BriberyGraphNotSetException from BribeNet.bribery.static.nonBriber import NonBriber class TestBriber(BriberTestCase): def setUp(self) -> None: super()...
34.68
96
0.762399
import random from test.BribeNet.bribery.static.briberTestCase import BriberTestCase from BribeNet.bribery.briber import BriberyGraphAlreadySetException, BriberyGraphNotSetException from BribeNet.bribery.static.nonBriber import NonBriber class TestBriber(BriberTestCase): def setUp(self) -> None: super()...
true
true
1c152cfd607541d2c5a57ca2ebbc0bf23188b0c7
18,741
py
Python
src/gameinstancemanager.py
nihlen/bf2-auto-spectator
21a50b39f2525bc8bdc3a25071f5bf61637dd5f2
[ "MIT" ]
null
null
null
src/gameinstancemanager.py
nihlen/bf2-auto-spectator
21a50b39f2525bc8bdc3a25071f5bf61637dd5f2
[ "MIT" ]
null
null
null
src/gameinstancemanager.py
nihlen/bf2-auto-spectator
21a50b39f2525bc8bdc3a25071f5bf61637dd5f2
[ "MIT" ]
null
null
null
import logging import re import time import cv2 import numpy as np import pyautogui import win32com.client import win32con import win32gui from exceptions import UnsupportedMapException from gameinstancestate import GameInstanceState from helpers import Window, find_window_by_title, get_resolution_window_size, mouse_...
35.833652
117
0.625313
import logging import re import time import cv2 import numpy as np import pyautogui import win32com.client import win32con import win32gui from exceptions import UnsupportedMapException from gameinstancestate import GameInstanceState from helpers import Window, find_window_by_title, get_resolution_window_size, mouse_...
true
true
1c152d2654a55edfdeb4e5d05f2f1dc4c5649356
940
py
Python
apps/core/views/ServerShareDeleteView.py
Couapy/mc-manager
9ea4b6d5e42a3261b364b729991e10717e966c73
[ "MIT" ]
null
null
null
apps/core/views/ServerShareDeleteView.py
Couapy/mc-manager
9ea4b6d5e42a3261b364b729991e10717e966c73
[ "MIT" ]
9
2021-04-09T06:22:50.000Z
2022-03-12T00:57:19.000Z
apps/core/views/ServerShareDeleteView.py
Couapy/mc-manager
9ea4b6d5e42a3261b364b729991e10717e966c73
[ "MIT" ]
null
null
null
from core.models import ServerShare from django.contrib import messages from django.contrib.auth.decorators import login_required from django.shortcuts import HttpResponseRedirect, get_object_or_404, reverse from django.utils.decorators import method_decorator from django.views import View from core.decorators import ...
37.6
83
0.745745
from core.models import ServerShare from django.contrib import messages from django.contrib.auth.decorators import login_required from django.shortcuts import HttpResponseRedirect, get_object_or_404, reverse from django.utils.decorators import method_decorator from django.views import View from core.decorators import ...
true
true
1c152d46216f28e558718ae3981154088a144375
16,544
py
Python
bin/Python27/Lib/site-packages/pyqtgraph/__init__.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
1
2021-09-27T19:14:20.000Z
2021-09-27T19:14:20.000Z
bin/Python27/Lib/site-packages/pyqtgraph/__init__.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
bin/Python27/Lib/site-packages/pyqtgraph/__init__.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
1
2021-04-10T06:04:47.000Z
2021-04-10T06:04:47.000Z
# -*- coding: utf-8 -*- """ PyQtGraph - Scientific Graphics and GUI Library for Python www.pyqtgraph.org """ __version__ = '0.9.10' ### import all the goodies and add some helper functions for easy CLI use ## 'Qt' is a local module; it is intended mainly to cover up the differences ## between PyQt4 and PySide. from ...
37.685649
202
0.666647
__version__ = '0.9.10' from .Qt import QtGui import numpy import os, sys if sys.version_info[0] < 2 or (sys.version_info[0] == 2 and sys.version_info[1] < 6): raise Exception("Pyqtgraph requires Python version 2.6 or greater (this is %d.%d)" % (sys.version_info[0], sys.version_info[1])) f...
true
true
1c152d675d630562b77660c07bb4ee9a5a9be729
319
py
Python
manager.py
AdrianoBinhara/RegisterBot
234fe49de32f8449ee30059e65fd0523ae9e16f4
[ "MIT" ]
8
2021-09-24T18:48:59.000Z
2021-11-09T18:54:44.000Z
manager.py
AdrianoBinhara/RegisterBot
234fe49de32f8449ee30059e65fd0523ae9e16f4
[ "MIT" ]
null
null
null
manager.py
AdrianoBinhara/RegisterBot
234fe49de32f8449ee30059e65fd0523ae9e16f4
[ "MIT" ]
2
2021-09-25T12:49:06.000Z
2021-09-29T04:39:00.000Z
from discord.ext import commands class Manager(commands.Cog): """Smart Commands""" def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_ready(self): print(f"Estou pronto! Estou conectado como {self.bot.user}") def setup(bot): bot.add_cog(Manager(bot))
18.764706
68
0.652038
from discord.ext import commands class Manager(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_ready(self): print(f"Estou pronto! Estou conectado como {self.bot.user}") def setup(bot): bot.add_cog(Manager(bot))
true
true
1c152da019797f41d23b0275b78c605e7f2fd18a
9,619
py
Python
src/pygmy/model/link.py
TinLe/pygmy
54ff3ed4ce0dbbe2868556e7fbf8bde97baa8b07
[ "MIT" ]
null
null
null
src/pygmy/model/link.py
TinLe/pygmy
54ff3ed4ce0dbbe2868556e7fbf8bde97baa8b07
[ "MIT" ]
null
null
null
src/pygmy/model/link.py
TinLe/pygmy
54ff3ed4ce0dbbe2868556e7fbf8bde97baa8b07
[ "MIT" ]
null
null
null
import time import binascii import datetime from sqlalchemy import event, and_, or_, DDL from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import relationship from sqlalchemy import (Column, String, Integer, Boolean, BigInteger, Unicode, DateTime) from urllib.parse import urlparse ...
33.283737
79
0.611602
import time import binascii import datetime from sqlalchemy import event, and_, or_, DDL from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import relationship from sqlalchemy import (Column, String, Integer, Boolean, BigInteger, Unicode, DateTime) from urllib.parse import urlparse ...
true
true
1c152dd7b1211f2df0349ee0a35d5ea7e0f4a8eb
23,712
py
Python
takahe/histogram.py
Krytic/Takahe
6d6bdf234ae7e3cfe8ef40e48d4621dc9a9a2f6c
[ "MIT" ]
1
2020-12-09T02:34:43.000Z
2020-12-09T02:34:43.000Z
takahe/histogram.py
Krytic/Takahe
6d6bdf234ae7e3cfe8ef40e48d4621dc9a9a2f6c
[ "MIT" ]
8
2020-03-02T06:22:43.000Z
2020-11-10T03:20:46.000Z
takahe/histogram.py
Krytic/Takahe
6d6bdf234ae7e3cfe8ef40e48d4621dc9a9a2f6c
[ "MIT" ]
1
2020-05-13T00:41:24.000Z
2020-05-13T00:41:24.000Z
""" Histogram classes to contain event rate data and allow for easy plotting Original author: Max Briel (https://github.com/maxbriel) Modified by: Sean Richards (https://github.com/Krytic) """ import matplotlib.pyplot as plt import numpy as np import pickle from scipy.stats import iqr from scipy.stats import multiv...
30.635659
103
0.533738
import matplotlib.pyplot as plt import numpy as np import pickle from scipy.stats import iqr from scipy.stats import multivariate_normal import takahe from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm import warnings from uncertainties import ufloat from uncertainties.umath import log as ulog from unc...
true
true
1c15325e4c1893216172e22a8c669b0e2adbff17
19,862
py
Python
docs/generate/supported_games.py
LaudateCorpus1/bsp_tool
e8c2489ac3bda5a4467f1dce220a76bbf4ce5b19
[ "MIT" ]
null
null
null
docs/generate/supported_games.py
LaudateCorpus1/bsp_tool
e8c2489ac3bda5a4467f1dce220a76bbf4ce5b19
[ "MIT" ]
null
null
null
docs/generate/supported_games.py
LaudateCorpus1/bsp_tool
e8c2489ac3bda5a4467f1dce220a76bbf4ce5b19
[ "MIT" ]
null
null
null
from collections import defaultdict, namedtuple import inspect from itertools import chain import os import re import sys from types import FunctionType, ModuleType from typing import Dict, List # HACK: load ../../bsp_tool from docs/generate/ sys.path.insert(0, "../../") from bsp_tool import ArkaneBsp, GoldSrcBsp, Res...
60.92638
123
0.635535
from collections import defaultdict, namedtuple import inspect from itertools import chain import os import re import sys from types import FunctionType, ModuleType from typing import Dict, List sys.path.insert(0, "../../") from bsp_tool import ArkaneBsp, GoldSrcBsp, RespawnBsp, ValveBsp, QuakeBsp from bsp_tool impor...
true
true
1c15326e6c73bf899d2802dde8c0f4e89b5b1bf2
3,091
py
Python
nfp.py
johny65/nufipi
cb03a87a97f6aef25c42a10a380fc773fdbc3a49
[ "Unlicense" ]
null
null
null
nfp.py
johny65/nufipi
cb03a87a97f6aef25c42a10a380fc773fdbc3a49
[ "Unlicense" ]
null
null
null
nfp.py
johny65/nufipi
cb03a87a97f6aef25c42a10a380fc773fdbc3a49
[ "Unlicense" ]
null
null
null
#!/bin/env python3 # Nufipi - Numerical File Picker import os import pathlib import subprocess import sys class InvalidInput(Exception): def __init__(self): super().__init__("Invalid input.") class Parser: def __init__(self): self.st = self.get_status() def execute(self, subcmd, ops):...
25.545455
108
0.547396
import os import pathlib import subprocess import sys class InvalidInput(Exception): def __init__(self): super().__init__("Invalid input.") class Parser: def __init__(self): self.st = self.get_status() def execute(self, subcmd, ops): idx = self.parse_input(ops) files =...
true
true
1c1532a645ef4b32bcf8676cafa3320a4aaa7831
4,123
py
Python
recipes/settings.py
mhoellmann/recipes
525aa4e4a4f218a47e1770498fff9fa8b0d7a097
[ "MIT" ]
null
null
null
recipes/settings.py
mhoellmann/recipes
525aa4e4a4f218a47e1770498fff9fa8b0d7a097
[ "MIT" ]
null
null
null
recipes/settings.py
mhoellmann/recipes
525aa4e4a4f218a47e1770498fff9fa8b0d7a097
[ "MIT" ]
null
null
null
""" Django settings for recipes project. Generated by 'django-admin startproject' using Django 2.0.1. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os fro...
27.858108
101
0.694882
import os from django.contrib import messages from dotenv import load_dotenv from django.utils.translation import gettext_lazy as _ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = os.getenv('SECRET_KEY') if os.getenv('SECRET_KEY') else '728f4t5438rz0748fa89esf9e' DEBUG = bool(int(...
true
true
1c1532fbcf3f6187c545d37eea270110d9a6c2b4
4,723
py
Python
examples/simple_demo.py
zqwei/pyslds
058be6e2db4f1361eb8c6b89ce02978ca624fe88
[ "MIT" ]
null
null
null
examples/simple_demo.py
zqwei/pyslds
058be6e2db4f1361eb8c6b89ce02978ca624fe88
[ "MIT" ]
null
null
null
examples/simple_demo.py
zqwei/pyslds
058be6e2db4f1361eb8c6b89ce02978ca624fe88
[ "MIT" ]
null
null
null
import numpy as np import numpy.random as npr import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec # Fancy plotting try: import seaborn as sns from hips.plotting.colormaps import gradient_cmap sns.set_style("white") sns.set_context("paper") color_names = ["red", ...
31.486667
117
0.671607
import numpy as np import numpy.random as npr import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec try: import seaborn as sns from hips.plotting.colormaps import gradient_cmap sns.set_style("white") sns.set_context("paper") color_names = ["red", "windows blue...
true
true
1c1534a9466dec672397f6f1208f3fd84c7f5757
47
py
Python
airflow_elt_scripts/scripts/my_second_etl_script.py
hroatti/Python_Data_Science
8c5b54b93c3eee3f8f201126291f62e28dd7d63b
[ "MIT" ]
null
null
null
airflow_elt_scripts/scripts/my_second_etl_script.py
hroatti/Python_Data_Science
8c5b54b93c3eee3f8f201126291f62e28dd7d63b
[ "MIT" ]
null
null
null
airflow_elt_scripts/scripts/my_second_etl_script.py
hroatti/Python_Data_Science
8c5b54b93c3eee3f8f201126291f62e28dd7d63b
[ "MIT" ]
null
null
null
print("Executed code from my Python ETL - 02")
23.5
46
0.723404
print("Executed code from my Python ETL - 02")
true
true
1c1535466d400c50b6d8607a1b57d45c0ab647c0
2,116
py
Python
asystem-anode/src/main/python/anode/plugin/davis/push/weewx_anode_plugin.py
ggear/asystem_archive
b97f67218e8aa60991fba386c9e73d27d20d6c47
[ "Apache-2.0" ]
null
null
null
asystem-anode/src/main/python/anode/plugin/davis/push/weewx_anode_plugin.py
ggear/asystem_archive
b97f67218e8aa60991fba386c9e73d27d20d6c47
[ "Apache-2.0" ]
2
2021-03-25T21:27:09.000Z
2022-02-11T03:38:48.000Z
asystem-anode/src/main/python/anode/plugin/davis/push/weewx_anode_plugin.py
ggear/asystem_archive
b97f67218e8aa60991fba386c9e73d27d20d6c47
[ "Apache-2.0" ]
null
null
null
import json import time import requests import weecfg import weewx from weewx.almanac import Almanac from weewx.engine import StdService URL_DEV = "http://192.168.2.45:8091/rest/?sources=davis" URL_PROD = "http://127.0.0.1:8091/rest/?sources=davis" class ANode(StdService): def __init__(self, engine, config_dic...
34.129032
107
0.649338
import json import time import requests import weecfg import weewx from weewx.almanac import Almanac from weewx.engine import StdService URL_DEV = "http://192.168.2.45:8091/rest/?sources=davis" URL_PROD = "http://127.0.0.1:8091/rest/?sources=davis" class ANode(StdService): def __init__(self, engine, config_dic...
true
true
1c153573497461a188b95495e60331ff8603eb7b
5,801
py
Python
tf-keras/keras_train.py
KomalTauqeer/ParticleNet
a35f6ca6ac5d70cce35b51dad0d5000baa9d2ecc
[ "MIT" ]
null
null
null
tf-keras/keras_train.py
KomalTauqeer/ParticleNet
a35f6ca6ac5d70cce35b51dad0d5000baa9d2ecc
[ "MIT" ]
null
null
null
tf-keras/keras_train.py
KomalTauqeer/ParticleNet
a35f6ca6ac5d70cce35b51dad0d5000baa9d2ecc
[ "MIT" ]
null
null
null
import numpy as np import awkward import matplotlib.pyplot as plt #import pydot import logging logging.basicConfig(level=logging.INFO, format='[%(asctime)s] %(levelname)s: %(message)s') def stack_arrays(a, keys, axis=-1): flat_arr = np.stack([a[k].flatten() for k in keys], axis=axis) return awkward.JaggedArra...
34.945783
128
0.653853
import numpy as np import awkward import matplotlib.pyplot as plt import logging logging.basicConfig(level=logging.INFO, format='[%(asctime)s] %(levelname)s: %(message)s') def stack_arrays(a, keys, axis=-1): flat_arr = np.stack([a[k].flatten() for k in keys], axis=axis) return awkward.JaggedArray.fromcounts(a...
true
true
1c15362cff1e5aded06f765c050c091433f3a9e3
2,065
py
Python
modules/chempy/brick.py
kingdavid72/pymol-OpenSource
8068af8b53a4ae16657b536e83bfd5310e58a8bd
[ "CNRI-Python" ]
2
2019-05-23T22:17:29.000Z
2020-07-03T14:36:22.000Z
modules/chempy/brick.py
telamonian/pymol
8192e75bf3d4c1072d6bd399b7dacd065bf78a06
[ "CNRI-Python" ]
null
null
null
modules/chempy/brick.py
telamonian/pymol
8192e75bf3d4c1072d6bd399b7dacd065bf78a06
[ "CNRI-Python" ]
null
null
null
#A* ------------------------------------------------------------------- #B* This file contains source code for the PyMOL computer program #C* copyright 1998-2000 by Warren Lyford Delano of DeLano Scientific. #D* ------------------------------------------------------------------- #E* It is unlawful to modify or remove ...
29.927536
73
0.449879
import numpy class Brick(object): def __init__(self): self.valid = None @classmethod def from_numpy(cls, data, grid, origin=(0.0, 0.0, 0.0)): data = numpy.asfarray(data) assert len(data.shape) == 3 self = cls() self.lvl = data self.grid = list(grid) ...
true
true
1c153722ef170a15a5c14f7e67d538e75f026f1e
8,244
py
Python
providers.py
h2020-westlife-eu/wp5-cloud-connectors
7fbc5694aaecf4203e09e115eddaf61a22ea55a9
[ "MIT" ]
null
null
null
providers.py
h2020-westlife-eu/wp5-cloud-connectors
7fbc5694aaecf4203e09e115eddaf61a22ea55a9
[ "MIT" ]
null
null
null
providers.py
h2020-westlife-eu/wp5-cloud-connectors
7fbc5694aaecf4203e09e115eddaf61a22ea55a9
[ "MIT" ]
null
null
null
# coding: utf-8 import json import pytz import traceback import boto3 import botocore.exceptions from clouds.dbox import ( list_from_dbox, retrieve_file_from_dbox, ) from clouds.gdrive import ( list_from_gdrive, retrieve_file_from_gdrive, ) from clouds.s3 import ( list_from_s3, retrieve_fil...
32.456693
145
0.604076
import json import pytz import traceback import boto3 import botocore.exceptions from clouds.dbox import ( list_from_dbox, retrieve_file_from_dbox, ) from clouds.gdrive import ( list_from_gdrive, retrieve_file_from_gdrive, ) from clouds.s3 import ( list_from_s3, retrieve_file_from_s3, ) f...
true
true
1c15376b01056e5e86512ac45b1e14aa1cbf4ac9
7,917
py
Python
examples/preprocess.py
Eadon999/DeepMatch
5f82bbe880ab5a8aaccb9f39723fc55c4482909f
[ "Apache-2.0" ]
1
2021-07-06T04:52:31.000Z
2021-07-06T04:52:31.000Z
examples/preprocess.py
Eadon999/DeepCTR
b37c04f1a6ff687b884dd0935ed0b4de2bdf4a7a
[ "Apache-2.0" ]
null
null
null
examples/preprocess.py
Eadon999/DeepCTR
b37c04f1a6ff687b884dd0935ed0b4de2bdf4a7a
[ "Apache-2.0" ]
null
null
null
import random import numpy as np from tqdm import tqdm from tensorflow.python.keras.preprocessing.sequence import pad_sequences def gen_data_set(data, negsample=0): data.sort_values("timestamp", inplace=True) item_ids = data['movie_id'].unique() train_set = [] test_set = [] for reviewerID, hist i...
47.981818
119
0.581154
import random import numpy as np from tqdm import tqdm from tensorflow.python.keras.preprocessing.sequence import pad_sequences def gen_data_set(data, negsample=0): data.sort_values("timestamp", inplace=True) item_ids = data['movie_id'].unique() train_set = [] test_set = [] for reviewerID, hist i...
true
true
1c1537c0dd0096da2341ef4a43aa3ec36ada696b
750
py
Python
basic/v0.3/maix_opencv_find_blob.py
luoliming99/MaixPy3_scripts
3dcf977bdc9645ea0b3e3d38e13a659167b1da49
[ "MIT" ]
null
null
null
basic/v0.3/maix_opencv_find_blob.py
luoliming99/MaixPy3_scripts
3dcf977bdc9645ea0b3e3d38e13a659167b1da49
[ "MIT" ]
null
null
null
basic/v0.3/maix_opencv_find_blob.py
luoliming99/MaixPy3_scripts
3dcf977bdc9645ea0b3e3d38e13a659167b1da49
[ "MIT" ]
null
null
null
#!/usr/bin/env python # cv.find_blob(pic,hsv)函数说明 # 功能:在图片pic中寻找符合hsv颜色区域的色块 # 输入:pic,240*240尺寸的图片bytes数据 # hsv,hsv阈值数组,前三个是最小值,后三个是最大值 # 返回值:[x1,y1,x2,y2],色块对角线的坐标 from maix import camera from _maix_opencv import _v83x_opencv from PIL import Image, ImageDraw from maix import display cv = _v83x_opencv() def find_...
24.193548
64
0.605333
from maix import camera from _maix_opencv import _v83x_opencv from PIL import Image, ImageDraw from maix import display cv = _v83x_opencv() def find_blob(): while True: tmp = camera.read() if len(tmp): ma = cv.find_blob(tmp, (95, 219, 0, 255, 255, 255)) print(ma) if ma: draw = disp...
true
true
1c15386a17510cb47247112c027a0af082a7c46c
14,220
py
Python
pyathena/sf_cloud_rad/plt_snapshot.py
jeonggyukim/pyathena
f3c983d5c0a3f36e28134a4a6d3eb80ac26c2a8e
[ "MIT" ]
1
2019-10-03T13:59:14.000Z
2019-10-03T13:59:14.000Z
pyathena/sf_cloud_rad/plt_snapshot.py
jeonggyukim/pyathena
f3c983d5c0a3f36e28134a4a6d3eb80ac26c2a8e
[ "MIT" ]
3
2020-09-23T23:36:17.000Z
2022-01-11T06:16:56.000Z
pyathena/sf_cloud/plt_snapshot.py
jeonggyukim/pyathena
f3c983d5c0a3f36e28134a4a6d3eb80ac26c2a8e
[ "MIT" ]
2
2019-06-10T04:26:16.000Z
2019-12-04T22:27:02.000Z
import os.path as osp import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl from matplotlib.colors import LogNorm, Normalize from mpl_toolkits.axes_grid1 import ImageGrid import astropy.units as au import astropy.constants as ac from ..plt_tools.cmap import cmap_apply_alpha, get_cmap_parula from...
43.090909
118
0.509634
import os.path as osp import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl from matplotlib.colors import LogNorm, Normalize from mpl_toolkits.axes_grid1 import ImageGrid import astropy.units as au import astropy.constants as ac from ..plt_tools.cmap import cmap_apply_alpha, get_cmap_parula from...
true
true
1c1538a63ba6e5b5265623c968dac90cf334a5c1
2,244
py
Python
daemon/globus_cw_daemon/local_logging.py
sirosen/globus-cwlogger
fbe0229e9bb1bacaa81046bcc7a8da168659e806
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
daemon/globus_cw_daemon/local_logging.py
sirosen/globus-cwlogger
fbe0229e9bb1bacaa81046bcc7a8da168659e806
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
daemon/globus_cw_daemon/local_logging.py
sirosen/globus-cwlogger
fbe0229e9bb1bacaa81046bcc7a8da168659e806
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import logging import logging.config import globus_cw_daemon.config as config class PrintKFormatter(logging.Formatter): """ a formatter which encodes log levels in the way expected by syslog and journald -- adds the following prefixes for each level DEBUG: "<7>" INFO: "<6>" NOTICE ...
30.739726
80
0.603832
import logging import logging.config import globus_cw_daemon.config as config class PrintKFormatter(logging.Formatter): def __init__(self, *args, **kwargs): kwargs["fmt"] = ( "%(asctime)s.%(msecs)03d %(levelname)s %(process)d:%(thread)d " "%(name)s: %(message)s" ) ...
true
true
1c1539243369a4b47f5cde8e68f1473745a4c5bf
2,777
py
Python
benchmarks-saber.py
iremkp/Saber_tmvp4_m4
e96c4a3983535122f95455e9cf900ea3fce9200a
[ "CC0-1.0" ]
null
null
null
benchmarks-saber.py
iremkp/Saber_tmvp4_m4
e96c4a3983535122f95455e9cf900ea3fce9200a
[ "CC0-1.0" ]
null
null
null
benchmarks-saber.py
iremkp/Saber_tmvp4_m4
e96c4a3983535122f95455e9cf900ea3fce9200a
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 import serial import sys import os import subprocess import hashlib import datetime import time import numpy as np dev = serial.Serial("/dev/ttyUSB0", 115200,timeout=10) def benchmarkBinary(binary): print("Flashing {}..".format(binary)) subprocess.run(["st-flash", "write", b...
33.457831
94
0.541232
import serial import sys import os import subprocess import hashlib import datetime import time import numpy as np dev = serial.Serial("/dev/ttyUSB0", 115200,timeout=10) def benchmarkBinary(binary): print("Flashing {}..".format(binary)) subprocess.run(["st-flash", "write", binary, "0x8000000"], ...
true
true
1c15396caacdfaf379961a19104363304c3f7e79
1,385
py
Python
Modules/Module4/SampleCode/2_logical_ops.py
hackettccp/CSCI111
129b2120dbedb54e7964b9d915e2457962cf55e2
[ "MIT" ]
2
2019-10-23T03:25:37.000Z
2021-02-23T04:09:03.000Z
Modules/Module4/SampleCode/2_logical_ops.py
hackettccp/CSCI111
129b2120dbedb54e7964b9d915e2457962cf55e2
[ "MIT" ]
null
null
null
Modules/Module4/SampleCode/2_logical_ops.py
hackettccp/CSCI111
129b2120dbedb54e7964b9d915e2457962cf55e2
[ "MIT" ]
null
null
null
""" Demonstrates logical operators """ b1 = True #Four variables used in the demonstrations below b2 = False b3 = False b4 = True result1 = b1 and b2 #Result of b1 and'ed with b2 print("b1 and b2 is", result1) ...
28.854167
108
0.491697
b1 = True b2 = False b3 = False b4 = True result1 = b1 and b2 print("b1 and b2 is", result1) #Prints the value of result1 print() result2 = b1 or b2 ...
true
true
1c1539a284af73ea75f572161582f0620f1690bd
7,142
py
Python
dhost/users/tests/test_forms.py
dhost-project/dhost
ca6a4a76a737174b24165e20edeb1d1019a9424b
[ "MIT" ]
null
null
null
dhost/users/tests/test_forms.py
dhost-project/dhost
ca6a4a76a737174b24165e20edeb1d1019a9424b
[ "MIT" ]
67
2021-07-06T11:50:25.000Z
2021-10-14T13:45:51.000Z
dhost/users/tests/test_forms.py
dhost-project/dhost
ca6a4a76a737174b24165e20edeb1d1019a9424b
[ "MIT" ]
null
null
null
from django.conf import settings from django.forms.fields import Field from django.test import TestCase, override_settings, tag from dhost.users.forms import AccountSettingsForm, SignupForm from dhost.users.models import User class TestDataMixin: @classmethod def setUpTestData(cls): cls.u1 = User.obj...
35.009804
80
0.590451
from django.conf import settings from django.forms.fields import Field from django.test import TestCase, override_settings, tag from dhost.users.forms import AccountSettingsForm, SignupForm from dhost.users.models import User class TestDataMixin: @classmethod def setUpTestData(cls): cls.u1 = User.obj...
true
true
1c1539f1cc0de22fdeba868afde47ea3d6d968bb
3,105
py
Python
api/viewsets/chat.py
oil-rope/oil-and-rope
6d59c87d4809f120417a90c1624952085486bb06
[ "MIT" ]
8
2019-08-27T20:08:22.000Z
2021-07-23T22:49:47.000Z
api/viewsets/chat.py
oil-rope/oil-and-rope
6d59c87d4809f120417a90c1624952085486bb06
[ "MIT" ]
73
2020-03-11T18:07:29.000Z
2022-03-28T18:07:47.000Z
api/viewsets/chat.py
oil-rope/oil-and-rope
6d59c87d4809f120417a90c1624952085486bb06
[ "MIT" ]
4
2020-02-22T19:44:17.000Z
2022-03-08T09:42:45.000Z
from django.apps import apps from django.utils.translation import gettext_lazy as _ from rest_framework import viewsets from rest_framework.exceptions import ValidationError from rest_framework.permissions import IsAdminUser from rest_framework.settings import api_settings from common.constants import models from ..s...
31.05
96
0.637359
from django.apps import apps from django.utils.translation import gettext_lazy as _ from rest_framework import viewsets from rest_framework.exceptions import ValidationError from rest_framework.permissions import IsAdminUser from rest_framework.settings import api_settings from common.constants import models from ..s...
true
true
1c153ac3feaf502ccabc3298454230d68cae7388
11,145
py
Python
alerter/src/channels_manager/handlers/telegram/alerts.py
SimplyVC/panic
2f5c327ea0d14b6a49dc8f4599a255048bc2ff6d
[ "Apache-2.0" ]
41
2019-08-23T12:40:42.000Z
2022-03-28T11:06:02.000Z
alerter/src/channels_manager/handlers/telegram/alerts.py
SimplyVC/panic
2f5c327ea0d14b6a49dc8f4599a255048bc2ff6d
[ "Apache-2.0" ]
147
2019-08-30T22:09:48.000Z
2022-03-30T08:46:26.000Z
alerter/src/channels_manager/handlers/telegram/alerts.py
SimplyVC/panic
2f5c327ea0d14b6a49dc8f4599a255048bc2ff6d
[ "Apache-2.0" ]
3
2019-09-03T21:12:28.000Z
2021-08-18T14:27:56.000Z
import json import logging import sys from datetime import datetime from queue import Queue from types import FrameType import pika.exceptions from pika.adapters.blocking_connection import BlockingChannel from src.alerter.alert_code import AlertCode from src.alerter.alerts.alert import Alert from src.alerter.grouped_...
44.58
80
0.615433
import json import logging import sys from datetime import datetime from queue import Queue from types import FrameType import pika.exceptions from pika.adapters.blocking_connection import BlockingChannel from src.alerter.alert_code import AlertCode from src.alerter.alerts.alert import Alert from src.alerter.grouped_...
true
true
1c153bc239a9cc681fb2832b4d60b5a91d9ca951
242
py
Python
jp.atcoder/abc094/arc095_a/11933423.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc094/arc095_a/11933423.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc094/arc095_a/11933423.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
import sys n, *x = map(int, sys.stdin.read().split()) def main(): a = sorted(x) l = a[n // 2 - 1] r = a[n // 2] for i in range(n): print(l if x[i] >= r else r) if __name__ == "__main__": main()
15.125
43
0.446281
import sys n, *x = map(int, sys.stdin.read().split()) def main(): a = sorted(x) l = a[n // 2 - 1] r = a[n // 2] for i in range(n): print(l if x[i] >= r else r) if __name__ == "__main__": main()
true
true
1c153c12f24202d747ab1db8d50ce232ec167627
2,060
py
Python
setup.py
heholek/ReducePy
da4673051e293877ca9ef12674c250c95d733613
[ "MIT" ]
33
2017-12-04T22:30:35.000Z
2022-03-28T14:28:16.000Z
setup.py
heholek/ReducePy
da4673051e293877ca9ef12674c250c95d733613
[ "MIT" ]
1
2021-09-24T13:30:52.000Z
2021-09-24T13:30:52.000Z
setup.py
heholek/ReducePy
da4673051e293877ca9ef12674c250c95d733613
[ "MIT" ]
4
2017-12-06T09:10:46.000Z
2022-01-13T20:36:33.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function import os import re import codecs from setuptools import setup, find_packages cwd = os.path.abspath(os.path.dirname(__file__)) def read(filename): with codecs.open(os.path.join(cwd, filename), 'rb', 'utf-8') as ...
33.225806
90
0.658738
from __future__ import absolute_import, print_function import os import re import codecs from setuptools import setup, find_packages cwd = os.path.abspath(os.path.dirname(__file__)) def read(filename): with codecs.open(os.path.join(cwd, filename), 'rb', 'utf-8') as h: return h.read() metadata = read(os...
true
true
1c153c174624d780be66647d49bc02f82b414c20
1,412
py
Python
tests/modules/base/domain/model/unit/test_value_object.py
alice-biometrics/petisco
b96e697cc875f67a28e60b4fc0d9ed9fc646cd86
[ "MIT" ]
19
2019-11-01T09:27:17.000Z
2021-12-15T10:52:31.000Z
tests/modules/base/domain/model/unit/test_value_object.py
alice-biometrics/petisco
b96e697cc875f67a28e60b4fc0d9ed9fc646cd86
[ "MIT" ]
68
2020-01-15T06:55:00.000Z
2022-02-22T15:57:24.000Z
tests/modules/base/domain/model/unit/test_value_object.py
alice-biometrics/petisco
b96e697cc875f67a28e60b4fc0d9ed9fc646cd86
[ "MIT" ]
2
2019-11-19T10:40:25.000Z
2019-11-28T07:12:07.000Z
import pytest from petisco import ValueObject, InvalidValueObject @pytest.mark.unit @pytest.mark.parametrize("expected_value", ["any", 1, 0.3, ["1", ["2"]], {"any": 1}]) def test_value_object_should_construct_and_serialize_with_inner_value(expected_value): value_object = ValueObject(value=expected_value) as...
33.619048
86
0.754958
import pytest from petisco import ValueObject, InvalidValueObject @pytest.mark.unit @pytest.mark.parametrize("expected_value", ["any", 1, 0.3, ["1", ["2"]], {"any": 1}]) def test_value_object_should_construct_and_serialize_with_inner_value(expected_value): value_object = ValueObject(value=expected_value) as...
true
true
1c153c4ebd7fdf8cf1fee88b5efece170d375b84
59,013
py
Python
opentuner/search/manipulator.py
thiagotei/opentuner
a3cd9db06e493302bb89202d4f9513f637f4acb6
[ "MIT" ]
null
null
null
opentuner/search/manipulator.py
thiagotei/opentuner
a3cd9db06e493302bb89202d4f9513f637f4acb6
[ "MIT" ]
null
null
null
opentuner/search/manipulator.py
thiagotei/opentuner
a3cd9db06e493302bb89202d4f9513f637f4acb6
[ "MIT" ]
null
null
null
from __future__ import division # vim: tabstop=2 shiftwidth=2 softtabstop=2 expandtab autoindent smarttab from builtins import str from builtins import map from builtins import range from past.utils import old_div from builtins import object import abc import collections import copy import hashlib import json import lo...
31.761572
119
0.662041
from __future__ import division from builtins import str from builtins import map from builtins import range from past.utils import old_div from builtins import object import abc import collections import copy import hashlib import json import logging import math import os import pickle import random from fn import _ i...
true
true
1c153d41c23c6ab9a94733238f368d61e77f1ebd
1,376
py
Python
var/spack/repos/builtin/packages/py-kiwisolver/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2,360
2017-11-06T08:47:01.000Z
2022-03-31T14:45:33.000Z
var/spack/repos/builtin/packages/py-kiwisolver/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
13,838
2017-11-04T07:49:45.000Z
2022-03-31T23:38:39.000Z
var/spack/repos/builtin/packages/py-kiwisolver/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1,793
2017-11-04T07:45:50.000Z
2022-03-30T14:31:53.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyKiwisolver(PythonPackage): """A fast implementation of the Cassowary constraint solver""...
47.448276
95
0.729651
from spack import * class PyKiwisolver(PythonPackage): homepage = "https://github.com/nucleic/kiwi" pypi = "kiwisolver/kiwisolver-1.1.0.tar.gz" version('1.3.2', sha256='fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c') version('1.3.1', sha256='950a199911a8d94683a6b10321f9345d5a3a84...
true
true
1c153d7b19b2e786da68f9a2faae5a51e1a10ee6
1,266
py
Python
tkinter/__canvas__/canvas-change-image/main.py
whitmans-max/python-examples
881a8f23f0eebc76816a0078e19951893f0daaaa
[ "MIT" ]
140
2017-02-21T22:49:04.000Z
2022-03-22T17:51:58.000Z
tkinter/__canvas__/canvas-change-image/main.py
whitmans-max/python-examples
881a8f23f0eebc76816a0078e19951893f0daaaa
[ "MIT" ]
5
2017-12-02T19:55:00.000Z
2021-09-22T23:18:39.000Z
tkinter/__canvas__/canvas-change-image/main.py
whitmans-max/python-examples
881a8f23f0eebc76816a0078e19951893f0daaaa
[ "MIT" ]
79
2017-01-25T10:53:33.000Z
2022-03-11T16:13:57.000Z
import tkinter as tk # # https://stackoverflow.com/a/19842646/1832058 # Nov 7 '13 at 17:29 # # changes: 2017.12.29 # # --- classes --- class MainWindow(): def __init__(self, master): # canvas for image self.canvas = tk.Canvas(master, width=60, height=60) self.canvas.pack() # i...
24.346154
95
0.606635
import tkinter as tk # # changes: 2017.12.29 # # --- classes --- class MainWindow(): def __init__(self, master): # canvas for image self.canvas = tk.Canvas(master, width=60, height=60) self.canvas.pack() # images self.all_images = [ tk.PhotoImage(file='ball1...
true
true
1c153daa034524c9396752688ada9f42b3264e81
1,923
py
Python
tests/test_auths.py
kbakba/github3.py
ab5d6a59a3e3f3c7022184b0e5dd17968809dc03
[ "BSD-3-Clause" ]
null
null
null
tests/test_auths.py
kbakba/github3.py
ab5d6a59a3e3f3c7022184b0e5dd17968809dc03
[ "BSD-3-Clause" ]
null
null
null
tests/test_auths.py
kbakba/github3.py
ab5d6a59a3e3f3c7022184b0e5dd17968809dc03
[ "BSD-3-Clause" ]
null
null
null
import github3 from tests.utils import (expect, BaseCase, load) class TestAuthorization(BaseCase): def __init__(self, methodName='runTest'): super(TestAuthorization, self).__init__(methodName) self.auth = github3.auths.Authorization(load('authorization')) self.api = "https://api.github.com...
27.084507
76
0.570463
import github3 from tests.utils import (expect, BaseCase, load) class TestAuthorization(BaseCase): def __init__(self, methodName='runTest'): super(TestAuthorization, self).__init__(methodName) self.auth = github3.auths.Authorization(load('authorization')) self.api = "https://api.github.com...
true
true
1c153ea0007ffb9c0f41133d7a5b69686baedf83
290
py
Python
third_party_logistics/third_party_logistics/doctype/shipstation_integration_settings/shipstation_integration_settings.py
hafeesk/third_party_logistics
6b97c5ad1bbb8386ca93e480bcb55ed3bc784ac4
[ "MIT" ]
1
2021-09-10T03:47:53.000Z
2021-09-10T03:47:53.000Z
third_party_logistics/third_party_logistics/doctype/shipstation_integration_settings/shipstation_integration_settings.py
hafeesk/third_party_logistics
6b97c5ad1bbb8386ca93e480bcb55ed3bc784ac4
[ "MIT" ]
null
null
null
third_party_logistics/third_party_logistics/doctype/shipstation_integration_settings/shipstation_integration_settings.py
hafeesk/third_party_logistics
6b97c5ad1bbb8386ca93e480bcb55ed3bc784ac4
[ "MIT" ]
1
2022-02-05T10:16:53.000Z
2022-02-05T10:16:53.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020, GreyCube Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals # import frappe from frappe.model.document import Document class ShipStationIntegrationSettings(Document): pass
26.363636
60
0.796552
from __future__ import unicode_literals from frappe.model.document import Document class ShipStationIntegrationSettings(Document): pass
true
true
1c153f5af6f0b7dd71e136872b93d800dc80a189
357
py
Python
Python/FotoMachen.py
Cankar001/Facharbeit
a6e1ec4bf77a9f4ee686d308cd307da1528fc492
[ "Apache-2.0" ]
null
null
null
Python/FotoMachen.py
Cankar001/Facharbeit
a6e1ec4bf77a9f4ee686d308cd307da1528fc492
[ "Apache-2.0" ]
null
null
null
Python/FotoMachen.py
Cankar001/Facharbeit
a6e1ec4bf77a9f4ee686d308cd307da1528fc492
[ "Apache-2.0" ]
null
null
null
import picamera from time import sleep # Kameraobjekt erstellen camera = picamera.PiCamera() # Kamerasettings camera.framerate = 25 camera.exposure_mode = 'off' camera.iso = 500 camera.shutter_speed = 6000000 camera.contrast = 0 # Foto schießen camera.start_preview() sleep(2.5) camera.capture('../temp/bild.png', res...
18.789474
52
0.767507
import picamera from time import sleep camera = picamera.PiCamera() camera.framerate = 25 camera.exposure_mode = 'off' camera.iso = 500 camera.shutter_speed = 6000000 camera.contrast = 0 camera.start_preview() sleep(2.5) camera.capture('../temp/bild.png', resize=(100,100)) camera.stop_preview()
true
true
1c153f7578118c6b454b233959c01208089fb007
909
py
Python
test/circular_math_test.py
lbusoni/appoppy
988670675ade8c49fada185433a79d2c42d41ed6
[ "MIT" ]
null
null
null
test/circular_math_test.py
lbusoni/appoppy
988670675ade8c49fada185433a79d2c42d41ed6
[ "MIT" ]
null
null
null
test/circular_math_test.py
lbusoni/appoppy
988670675ade8c49fada185433a79d2c42d41ed6
[ "MIT" ]
null
null
null
#!/usr/bin/env python import unittest from appoppy.circular_math import difference from astropy import units as u class CircularMathTest(unittest.TestCase): def test_difference(self): wl = 2200 * u.nm a = 1000 * u.nm b = -1000 * u.nm c = 980 * u.nm d = 5000 * u.nm ...
29.322581
73
0.611661
import unittest from appoppy.circular_math import difference from astropy import units as u class CircularMathTest(unittest.TestCase): def test_difference(self): wl = 2200 * u.nm a = 1000 * u.nm b = -1000 * u.nm c = 980 * u.nm d = 5000 * u.nm e = 1100 * u.nm ...
true
true
1c153fc277fdfe7e18ad917785142ed977a36c1e
3,015
py
Python
research/object_detection/builders/graph_rewriter_builder_tf1_test.py
hjkim-haga/TF-OD-API
22ac477ff4dfb93fe7a32c94b5f0b1e74330902b
[ "Apache-2.0" ]
1
2021-05-22T12:50:50.000Z
2021-05-22T12:50:50.000Z
object_detection/builders/graph_rewriter_builder_tf1_test.py
DemonDamon/mask-detection-based-on-tf2odapi
192ae544169c1230c21141c033800aa1bd94e9b6
[ "MIT" ]
null
null
null
object_detection/builders/graph_rewriter_builder_tf1_test.py
DemonDamon/mask-detection-based-on-tf2odapi
192ae544169c1230c21141c033800aa1bd94e9b6
[ "MIT" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
44.338235
101
0.704478
import unittest from unittest import mock import tensorflow.compat.v1 as tf import tf_slim as slim from object_detection.builders import graph_rewriter_builder from object_detection.protos import graph_rewriter_pb2 from object_detection.utils import tf_version if tf_version.is_tf1(): from tensorflow.con...
true
true
1c153ffe1e00c90191575ad18e6b81add5d5ad31
13,429
py
Python
src/oscar/apps/dashboard/views.py
highbiza/django-oscar
7eba207a77e5dd56b04a63b9283a9d76da2f64ac
[ "BSD-3-Clause" ]
1
2019-10-22T01:10:20.000Z
2019-10-22T01:10:20.000Z
src/oscar/apps/dashboard/views.py
highbiza/django-oscar
7eba207a77e5dd56b04a63b9283a9d76da2f64ac
[ "BSD-3-Clause" ]
10
2020-05-11T20:33:31.000Z
2022-03-12T00:24:28.000Z
src/oscar/apps/dashboard/views.py
highbiza/django-oscar
7eba207a77e5dd56b04a63b9283a9d76da2f64ac
[ "BSD-3-Clause" ]
3
2019-03-20T16:17:58.000Z
2022-02-25T09:38:38.000Z
import json from datetime import timedelta from decimal import Decimal as D from decimal import ROUND_UP from django.db.models import Avg, Count, Sum from django.template.response import TemplateResponse from django.utils.timezone import now from django.views.generic import TemplateView from oscar.apps.promotions.mod...
39.848665
106
0.633182
import json from datetime import timedelta from decimal import Decimal as D from decimal import ROUND_UP from django.db.models import Avg, Count, Sum from django.template.response import TemplateResponse from django.utils.timezone import now from django.views.generic import TemplateView from oscar.apps.promotions.mod...
true
true
1c15403563ffb08dd81a01b8465f22ae90fa55fc
932
py
Python
src/test_even_odd.py
rwisecar/code-katas
479503d28573ed6e0326f5a682a64a600f8158e4
[ "MIT" ]
6
2018-04-25T19:46:55.000Z
2021-06-24T18:06:44.000Z
src/test_even_odd.py
rwisecar/code-katas
479503d28573ed6e0326f5a682a64a600f8158e4
[ "MIT" ]
null
null
null
src/test_even_odd.py
rwisecar/code-katas
479503d28573ed6e0326f5a682a64a600f8158e4
[ "MIT" ]
2
2018-05-13T17:34:41.000Z
2021-04-02T21:32:42.000Z
"""Test for even_odd.py""" import pytest """ These are the original test cases from Code Wars, which I had to refactor. test.assert_equals(even_or_odd(2), "Even", 'even_or_odd(2)') test.assert_equals(even_or_odd(1), "Odd", 'even_or_odd(1)') test.expect(even_or_odd(0) == "Even") test.expect(even_or_odd(1545452) == "Ev...
25.888889
74
0.649142
import pytest EVEN_ODD_PARAMS_TABLE = [ [2, "Even"], [1, "Odd"], [0, "Even"], [1545452, "Even"], [7, "Odd"], [78, "Even"], [17, "Odd"], [74156741, "Odd"], [100000, "Even"], ] @pytest.mark.parametrize('n, result', EVEN_ODD_PARAMS_TABLE) def test_even_odd(n, result): from even_...
true
true
1c15410ee28cf50f3bedfb5380c9db7a904f7162
3,744
py
Python
ghwht/hooks/__init__.py
flyingdice/github-webhook-types
38edff89ec3ce809a510328463a43d7bea56ae36
[ "Apache-2.0" ]
null
null
null
ghwht/hooks/__init__.py
flyingdice/github-webhook-types
38edff89ec3ce809a510328463a43d7bea56ae36
[ "Apache-2.0" ]
null
null
null
ghwht/hooks/__init__.py
flyingdice/github-webhook-types
38edff89ec3ce809a510328463a43d7bea56ae36
[ "Apache-2.0" ]
null
null
null
""" ghwht/hooks ~~~~~~~~~~~ Contains modules for each type of webhook event. """ from typing import Dict, Type from . import (base, check_run, check_suite, code_scanning_alert, commit_comment, common, content_reference, create, delete, deploy_key, deployment, deployment_status, ...
30.439024
94
0.734509
from typing import Dict, Type from . import (base, check_run, check_suite, code_scanning_alert, commit_comment, common, content_reference, create, delete, deploy_key, deployment, deployment_status, fork, github_app_authorization, installation, installation_repositories, iss...
true
true
1c15412797b6eac210a3f6c9f944b7698c3555e7
2,319
py
Python
src/avoid_obstacles.py
NASLab/GroundROS
6673db009ffcff59500eb1e3d5873111282e7749
[ "MIT" ]
1
2017-12-17T11:11:55.000Z
2017-12-17T11:11:55.000Z
src/avoid_obstacles.py
NASLab/GroundROS
6673db009ffcff59500eb1e3d5873111282e7749
[ "MIT" ]
2
2015-10-02T19:02:06.000Z
2015-10-02T19:02:36.000Z
src/avoid_obstacles.py
NASLab/GroundROS
6673db009ffcff59500eb1e3d5873111282e7749
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy from numpy import arctan2, sqrt, arange, pi, sin, cos from sys import path path.append('Modules/') from communication import NaslabNetwork from sensor_msgs.msg import LaserScan from actuate import ROS2DimActuate from tracker import PlanarTracker from time import sleep from path_plann...
32.208333
93
0.634756
import rospy from numpy import arctan2, sqrt, arange, pi, sin, cos from sys import path path.append('Modules/') from communication import NaslabNetwork from sensor_msgs.msg import LaserScan from actuate import ROS2DimActuate from tracker import PlanarTracker from time import sleep from path_planning import GapFinder ...
false
true
1c154178fe7cc441e652d8c0cf2314b8775bc849
2,550
py
Python
chomps/player.py
alancoon/beer_pong_bot
a2684a19fb4606ff930151e2d5f291e25ab59e52
[ "MIT" ]
null
null
null
chomps/player.py
alancoon/beer_pong_bot
a2684a19fb4606ff930151e2d5f291e25ab59e52
[ "MIT" ]
null
null
null
chomps/player.py
alancoon/beer_pong_bot
a2684a19fb4606ff930151e2d5f291e25ab59e52
[ "MIT" ]
null
null
null
from .stats import Stats, PlayerStats class PlayerAlreadyExistsException(Exception): pass class Player(): def __init__(self, canonicalName, stats=None): self._canonicalName = canonicalName self._nicknames = [canonicalName] self._teammateGameCounts = {} if stats is not None: ...
36.956522
145
0.669804
from .stats import Stats, PlayerStats class PlayerAlreadyExistsException(Exception): pass class Player(): def __init__(self, canonicalName, stats=None): self._canonicalName = canonicalName self._nicknames = [canonicalName] self._teammateGameCounts = {} if stats is not None: ...
true
true
1c1541f0ec430eaa6ab98ebca8e434c57fd49755
4,653
py
Python
plugins/rapid7_insightappsec/komand_rapid7_insightappsec/actions/get_scan/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/rapid7_insightappsec/komand_rapid7_insightappsec/actions/get_scan/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/rapid7_insightappsec/komand_rapid7_insightappsec/actions/get_scan/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
# GENERATED BY KOMAND SDK - DO NOT EDIT import insightconnect_plugin_runtime import json class Component: DESCRIPTION = "Get a scan" class Input: SCAN_ID = "scan_id" class Output: SCAN = "scan" class GetScanInput(insightconnect_plugin_runtime.Input): schema = json.loads(""" { "type"...
23.034653
67
0.416935
import insightconnect_plugin_runtime import json class Component: DESCRIPTION = "Get a scan" class Input: SCAN_ID = "scan_id" class Output: SCAN = "scan" class GetScanInput(insightconnect_plugin_runtime.Input): schema = json.loads(""" { "type": "object", "title": "Variables", "p...
true
true
1c154293514aa8e395865c1f76c5c33d9b8a7ded
16,725
py
Python
sw/wb_intercon_gen2.py
wtfuzz/wb_intercon
712029b5ec7d67554338d334c7bd3043dbaded8e
[ "ISC" ]
null
null
null
sw/wb_intercon_gen2.py
wtfuzz/wb_intercon
712029b5ec7d67554338d334c7bd3043dbaded8e
[ "ISC" ]
null
null
null
sw/wb_intercon_gen2.py
wtfuzz/wb_intercon
712029b5ec7d67554338d334c7bd3043dbaded8e
[ "ISC" ]
null
null
null
#!/usr/bin/env python import sys from collections import OrderedDict, defaultdict import yaml from verilogwriter import Signal, Wire, Instance, ModulePort, VerilogWriter WB_MASTER_PORTS = [Signal('adr', 32), Signal('dat', 32), Signal('sel', 4), Signal('we'), ...
40.107914
147
0.557848
import sys from collections import OrderedDict, defaultdict import yaml from verilogwriter import Signal, Wire, Instance, ModulePort, VerilogWriter WB_MASTER_PORTS = [Signal('adr', 32), Signal('dat', 32), Signal('sel', 4), Signal('we'), Sign...
true
true
1c15431ec4ab15949ab2efb858136529a4633ab2
7,765
py
Python
roverpro/pitstop.py
RoverRobotics/openrover_python
bbbd24596db9f1c4e5a57d92fca048e289b668f0
[ "BSD-3-Clause" ]
1
2020-05-20T18:43:28.000Z
2020-05-20T18:43:28.000Z
roverpro/pitstop.py
RoverRobotics/openrover_python
bbbd24596db9f1c4e5a57d92fca048e289b668f0
[ "BSD-3-Clause" ]
3
2019-04-22T21:48:07.000Z
2020-06-17T19:10:04.000Z
roverpro/pitstop.py
RoverRobotics/openrover_python
bbbd24596db9f1c4e5a57d92fca048e289b668f0
[ "BSD-3-Clause" ]
1
2020-08-16T21:40:00.000Z
2020-08-16T21:40:00.000Z
import argparse import subprocess import sys from pathlib import Path import trio from roverpro import RoverProtocol from roverpro.find_device import get_ftdi_device_paths from roverpro.rover_data import RoverFirmwareVersion from roverpro.rover_protocol import CommandVerb from roverpro.serial_trio import SerialTrio ...
33.042553
99
0.560077
import argparse import subprocess import sys from pathlib import Path import trio from roverpro import RoverProtocol from roverpro.find_device import get_ftdi_device_paths from roverpro.rover_data import RoverFirmwareVersion from roverpro.rover_protocol import CommandVerb from roverpro.serial_trio import SerialTrio ...
true
true
1c1544bfc1dc999f829ae4b53d55ed78e8552966
763
py
Python
devices/external/orangepi2giot.py
boretskij/SensorsPy
98ebdf0ec88ff4532918ad16c925a8563780a6bf
[ "MIT" ]
null
null
null
devices/external/orangepi2giot.py
boretskij/SensorsPy
98ebdf0ec88ff4532918ad16c925a8563780a6bf
[ "MIT" ]
null
null
null
devices/external/orangepi2giot.py
boretskij/SensorsPy
98ebdf0ec88ff4532918ad16c925a8563780a6bf
[ "MIT" ]
1
2019-10-27T11:38:55.000Z
2019-10-27T11:38:55.000Z
import os class ORANGEPI2GIOT: __template = {'battery_voltage':'/sys/devices/platform/rda-power/power_supply/battery/voltage_now'} def __init__(self): self.test = "" template = '/sys/devices/platform/regulator-rda.{}/regulator/regulator.{}/microvolts' for index in range(1,14): ...
29.346154
103
0.610747
import os class ORANGEPI2GIOT: __template = {'battery_voltage':'/sys/devices/platform/rda-power/power_supply/battery/voltage_now'} def __init__(self): self.test = "" template = '/sys/devices/platform/regulator-rda.{}/regulator/regulator.{}/microvolts' for index in range(1,14): ...
true
true
1c1545d986f98d8cae6e05903877fd3b7ec04867
922
py
Python
mergesort.py
huobingli/pyAlgorithm
cbfe3d65f7748be4f6811cb7e1897d696e914891
[ "MIT" ]
null
null
null
mergesort.py
huobingli/pyAlgorithm
cbfe3d65f7748be4f6811cb7e1897d696e914891
[ "MIT" ]
null
null
null
mergesort.py
huobingli/pyAlgorithm
cbfe3d65f7748be4f6811cb7e1897d696e914891
[ "MIT" ]
null
null
null
def merge(items1, items2, comp=lambda x, y: x < y): """合并(将两个有序的列表合并成一个有序的列表)""" items = [] index1, index2 = 0, 0 while index1 < len(items1) and index2 < len(items2): if comp(items1[index1], items2[index2]): items.append(items1[index1]) index1 += 1 else: ...
24.263158
56
0.574837
def merge(items1, items2, comp=lambda x, y: x < y): items = [] index1, index2 = 0, 0 while index1 < len(items1) and index2 < len(items2): if comp(items1[index1], items2[index2]): items.append(items1[index1]) index1 += 1 else: items.append(items2[index2]) ...
true
true
1c15470d95879d48fa11293fab6dca51687d4c50
2,798
py
Python
thyme/consensus/pot_iterations.py
yuanliuus/thyme-blockchain
9ea5cddc78f601fcbe77101d74147cf8190e423d
[ "Apache-2.0" ]
6
2021-06-30T13:03:47.000Z
2021-07-10T12:46:37.000Z
thyme/consensus/pot_iterations.py
yuanliuus/thyme-blockchain
9ea5cddc78f601fcbe77101d74147cf8190e423d
[ "Apache-2.0" ]
8
2021-07-01T15:45:09.000Z
2021-09-08T04:30:46.000Z
thyme/consensus/pot_iterations.py
yuanliuus/thyme-blockchain
9ea5cddc78f601fcbe77101d74147cf8190e423d
[ "Apache-2.0" ]
11
2021-07-03T17:30:57.000Z
2022-03-15T08:47:03.000Z
from thyme.consensus.constants import ConsensusConstants from thyme.consensus.pos_quality import _expected_plot_size from thyme.types.blockchain_format.sized_bytes import bytes32 from thyme.util.hash import std_hash from thyme.util.ints import uint8, uint64, uint128 def is_overflow_block(constants: ConsensusConstants...
42.393939
118
0.753038
from thyme.consensus.constants import ConsensusConstants from thyme.consensus.pos_quality import _expected_plot_size from thyme.types.blockchain_format.sized_bytes import bytes32 from thyme.util.hash import std_hash from thyme.util.ints import uint8, uint64, uint128 def is_overflow_block(constants: ConsensusConstants...
true
true
1c1549ada23f59880f2cc95fd21919c8a27b1943
94
py
Python
plugins/antiinvisible/__init__.py
Antonio32A/AntiInvisible
efba35a88115771fcef252bf0e07bdddaa2e3c76
[ "MIT" ]
null
null
null
plugins/antiinvisible/__init__.py
Antonio32A/AntiInvisible
efba35a88115771fcef252bf0e07bdddaa2e3c76
[ "MIT" ]
null
null
null
plugins/antiinvisible/__init__.py
Antonio32A/AntiInvisible
efba35a88115771fcef252bf0e07bdddaa2e3c76
[ "MIT" ]
2
2019-04-28T18:15:48.000Z
2022-03-14T16:27:23.000Z
from .antiinvisible import AntiInvisible def setup(bot): bot.add_cog(AntiInvisible(bot))
18.8
40
0.776596
from .antiinvisible import AntiInvisible def setup(bot): bot.add_cog(AntiInvisible(bot))
true
true
1c154a4bca9c5095a1f659b4f5b367cfb76f41f4
2,431
py
Python
__init__.py
rocketbot-cl/Feriados
288a2ac85214330af0d3a4fc2e80b3a6cef4ab38
[ "MIT" ]
null
null
null
__init__.py
rocketbot-cl/Feriados
288a2ac85214330af0d3a4fc2e80b3a6cef4ab38
[ "MIT" ]
null
null
null
__init__.py
rocketbot-cl/Feriados
288a2ac85214330af0d3a4fc2e80b3a6cef4ab38
[ "MIT" ]
null
null
null
# coding: utf-8 """ Base para desarrollo de modulos externos. Para obtener el modulo/Funcion que se esta llamando: GetParams("module") Para obtener las variables enviadas desde formulario/comando Rocketbot: var = GetParams(variable) Las "variable" se define en forms del archivo package.json Para modifica...
24.31
100
0.587413
import requests module = GetParams("module") if module == "getFeriadoArgentina": try: date_ = GetParams('date_') var_ = GetParams('var_') year = date_[0:4] url = r"http://nolaborables.com.ar/api/v2/feriados/{year}?formato=mensual".format(year=year) response = requests.ge...
true
true
1c154ad7f9b57dacf9b76e66032d6e8b34e6ef8e
13,441
py
Python
venv/Lib/site-packages/PyQt4/examples/graphicsview/collidingmice/mice_rc2.py
prateekfxtd/ns_Startup
095a62b3a8c7bf0ff7b767355d57d993bbd2423d
[ "MIT" ]
null
null
null
venv/Lib/site-packages/PyQt4/examples/graphicsview/collidingmice/mice_rc2.py
prateekfxtd/ns_Startup
095a62b3a8c7bf0ff7b767355d57d993bbd2423d
[ "MIT" ]
null
null
null
venv/Lib/site-packages/PyQt4/examples/graphicsview/collidingmice/mice_rc2.py
prateekfxtd/ns_Startup
095a62b3a8c7bf0ff7b767355d57d993bbd2423d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Resource object code # # Created: Wed Mar 20 13:37:39 2013 # by: The Resource Compiler for PyQt (Qt v4.8.4) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x0b\xd5\ \xff\ \xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x02\x...
58.186147
96
0.726955
from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x0b\xd5\ \xff\ \xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x02\x01\x00\x48\x00\ \x48\x00\x00\xff\xee\x00\x0e\x41\x64\x6f\x62\x65\x00\x64\x40\x00\ \x00\x00\x01\xff\xdb\x00\x84\x00\x02\x02\x02\x02\x02\x02\x02\x02\ \x02\x02\x03\x02\x02\x02\x03\x04\x03\x02\x02\x03...
true
true
1c154ae7005f2cd1d08aa5f21084a623d67c0956
353
py
Python
services/limits/src/oci_cli_limits/generated/client_mappings.py
honzajavorek/oci-cli
6ea058afba323c6b3b70e98212ffaebb0d31985e
[ "Apache-2.0" ]
null
null
null
services/limits/src/oci_cli_limits/generated/client_mappings.py
honzajavorek/oci-cli
6ea058afba323c6b3b70e98212ffaebb0d31985e
[ "Apache-2.0" ]
null
null
null
services/limits/src/oci_cli_limits/generated/client_mappings.py
honzajavorek/oci-cli
6ea058afba323c6b3b70e98212ffaebb0d31985e
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. import oci from oci_cli.cli_clients import CLIENT_MAP from oci_cli.cli_clients import MODULE_TO_TYPE_MAPPINGS from oci.limits import LimitsClient MODULE_TO_TYPE_MAPPINGS["limits"] = oci.limits.models.limits_type_mapping CLI...
32.090909
78
0.818697
import oci from oci_cli.cli_clients import CLIENT_MAP from oci_cli.cli_clients import MODULE_TO_TYPE_MAPPINGS from oci.limits import LimitsClient MODULE_TO_TYPE_MAPPINGS["limits"] = oci.limits.models.limits_type_mapping CLIENT_MAP["limits"] = LimitsClient
true
true
1c154b3efcc45a92b8f7287a653af92d07488d7b
3,244
py
Python
src/music/utils.py
janbrrr/dndj
b0557481f301adf82cae74e5c619fff016402a36
[ "MIT" ]
8
2020-01-15T20:50:14.000Z
2021-08-09T15:36:56.000Z
src/music/utils.py
janbrrr/dndj
b0557481f301adf82cae74e5c619fff016402a36
[ "MIT" ]
null
null
null
src/music/utils.py
janbrrr/dndj
b0557481f301adf82cae74e5c619fff016402a36
[ "MIT" ]
2
2020-01-15T20:50:18.000Z
2021-12-18T13:09:46.000Z
import logging import os from functools import lru_cache from typing import Generator, Iterable, Tuple import pafy from src.music.music_group import MusicGroup from src.music.track import Track from src.music.track_list import TrackList logger = logging.getLogger(__name__) def music_tuple_generator(groups: Iterab...
37.287356
118
0.717633
import logging import os from functools import lru_cache from typing import Generator, Iterable, Tuple import pafy from src.music.music_group import MusicGroup from src.music.track import Track from src.music.track_list import TrackList logger = logging.getLogger(__name__) def music_tuple_generator(groups: Iterab...
true
true
1c154c1e1fc29ffe4dca3ebcc13c7fc4ec0c9dd9
165
py
Python
django_admin_json_widget/models.py
gauravvjn/django-admin-json-field-widget
3ec0dbf6fc507c929b3951d23c6f36e852448a7d
[ "Apache-2.0" ]
null
null
null
django_admin_json_widget/models.py
gauravvjn/django-admin-json-field-widget
3ec0dbf6fc507c929b3951d23c6f36e852448a7d
[ "Apache-2.0" ]
null
null
null
django_admin_json_widget/models.py
gauravvjn/django-admin-json-field-widget
3ec0dbf6fc507c929b3951d23c6f36e852448a7d
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.contrib.postgres.fields import JSONField class TestModel(models.Model): json_field = JSONField(null=True, blank=True)
23.571429
52
0.793939
from django.db import models from django.contrib.postgres.fields import JSONField class TestModel(models.Model): json_field = JSONField(null=True, blank=True)
true
true
1c154cbc5f92b7d518a48287882823f20085348e
244
py
Python
tests/scrapper/sources/test_naver_cafe.py
hyeon95y/job_posting_scrapper
58e475fe406622e71657578b8ca2f3cf24155765
[ "MIT" ]
null
null
null
tests/scrapper/sources/test_naver_cafe.py
hyeon95y/job_posting_scrapper
58e475fe406622e71657578b8ca2f3cf24155765
[ "MIT" ]
null
null
null
tests/scrapper/sources/test_naver_cafe.py
hyeon95y/job_posting_scrapper
58e475fe406622e71657578b8ca2f3cf24155765
[ "MIT" ]
null
null
null
import pytest from scrapper.source.naver_cafe import NaverCafeScrapper @pytest.fixture(scope='module') def naver_cafe_scrapper(): return NaverCafeScrapper() def test_open_page(naver_cafe_scrapper): naver_cafe_scrapper.open_page()
17.428571
56
0.803279
import pytest from scrapper.source.naver_cafe import NaverCafeScrapper @pytest.fixture(scope='module') def naver_cafe_scrapper(): return NaverCafeScrapper() def test_open_page(naver_cafe_scrapper): naver_cafe_scrapper.open_page()
true
true
1c154cd85ac8501efc488d575c2d366b73815f35
3,495
py
Python
pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/tests/test_dot1x.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
94
2018-04-30T20:29:15.000Z
2022-03-29T13:40:31.000Z
pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/tests/test_dot1x.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
67
2018-12-06T21:08:09.000Z
2022-03-29T18:00:46.000Z
pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/tests/test_dot1x.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
49
2018-06-29T18:59:03.000Z
2022-03-10T02:07:59.000Z
# Python import unittest from copy import deepcopy from unittest.mock import Mock # ATS from pyats.topology import Device # Genie from genie.libs.ops.dot1x.ios.dot1x import Dot1X from genie.libs.ops.dot1x.ios.tests.dot1x_output import Dot1xOutput # Parser from genie.libs.parser.ios.show_dot1x import ShowDot1xAllDeta...
30.657895
74
0.58083
import unittest from copy import deepcopy from unittest.mock import Mock from pyats.topology import Device from genie.libs.ops.dot1x.ios.dot1x import Dot1X from genie.libs.ops.dot1x.ios.tests.dot1x_output import Dot1xOutput from genie.libs.parser.ios.show_dot1x import ShowDot1xAllDetail, \ ...
true
true
1c154d0f735fdd48e92fac956b9f65f600c77557
395
py
Python
hostpital/asgi.py
AVS18/Hospital-Management-System
cfe31cd20eb1986ddee27a39733e28cec4a8d82d
[ "Apache-2.0" ]
null
null
null
hostpital/asgi.py
AVS18/Hospital-Management-System
cfe31cd20eb1986ddee27a39733e28cec4a8d82d
[ "Apache-2.0" ]
null
null
null
hostpital/asgi.py
AVS18/Hospital-Management-System
cfe31cd20eb1986ddee27a39733e28cec4a8d82d
[ "Apache-2.0" ]
null
null
null
""" ASGI config for hostpital project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SET...
23.235294
78
0.787342
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'hostpital.settings') application = get_asgi_application()
true
true
1c154f0fdd9df7ebd95593647349119a2b1a0477
3,519
py
Python
pysnmp/IRM-OIDS.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/IRM-OIDS.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/IRM-OIDS.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module IRM-OIDS (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/IRM-OIDS # Produced by pysmi-0.3.4 at Mon Apr 29 17:26:48 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:1...
87.975
544
0.708156
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion = mibBuilder.impo...
true
true
1c154fd21f66914c0d3da4c6bd8d251d86b8ae68
9,915
py
Python
ros/devel/lib/python2.7/dist-packages/styx_msgs/msg/_TrafficLight.py
NeoKish/CarND-Capstone
d87dec456bc769fe17c2c490415ee0bf9c6446fe
[ "MIT" ]
5
2019-07-14T04:06:25.000Z
2021-07-28T00:38:59.000Z
ros/devel/lib/python2.7/dist-packages/styx_msgs/msg/_TrafficLight.py
NeoKish/CarND-Capstone
d87dec456bc769fe17c2c490415ee0bf9c6446fe
[ "MIT" ]
14
2020-01-28T23:05:09.000Z
2022-03-12T00:41:53.000Z
ros/devel/lib/python2.7/dist-packages/styx_msgs/msg/_TrafficLight.py
SarbSingh92/Programming_A_Real_Self_Driving_Car
b4fe1fb009d5894afdc37ee65b5ea44f71791506
[ "MIT" ]
4
2018-09-10T04:33:37.000Z
2018-10-02T01:10:39.000Z
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from styx_msgs/TrafficLight.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import geometry_msgs.msg import std_msgs.msg class TrafficLight(genpy.Message): _md5sum = "4...
35.923913
247
0.635401
import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import geometry_msgs.msg import std_msgs.msg class TrafficLight(genpy.Message): _md5sum = "444a7e648c334df4cc0678bcfbd971da" _type = "styx_msgs/TrafficLight" _has_header = True _full_text = """Header header geometry...
true
true
1c15500182dde1879c9d9bb93e33e466429b0202
8,708
py
Python
aistreams/python/cli/chunk/commands.py
google/aistreams
09692b0a1940da590ffede933519fc41ec3405d9
[ "Apache-2.0" ]
6
2020-09-22T18:07:15.000Z
2021-10-21T01:34:04.000Z
aistreams/python/cli/chunk/commands.py
google/aistreams
09692b0a1940da590ffede933519fc41ec3405d9
[ "Apache-2.0" ]
2
2020-11-10T13:17:39.000Z
2022-03-30T11:22:14.000Z
aistreams/python/cli/chunk/commands.py
google/aistreams
09692b0a1940da590ffede933519fc41ec3405d9
[ "Apache-2.0" ]
3
2020-09-26T08:40:35.000Z
2021-10-21T01:33:56.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
37.055319
83
0.710266
import logging import os import pathlib import shlex import aistreams.python.apps as apps import aistreams.python.cli.util as util import click _CHUNKER_APP_NAME = "chunker_app" def _exec_chunker_app(args): chunker_app_config = { "app_path": os.path.join( pathlib.Path(apps.__file__)...
true
true
1c15500ea14b378cae7d21cfcf0b0e7977e27d8e
2,784
py
Python
PoC.py
imjdl/CVE-2020-8515-PoC
f241ec96f9b19af07231033064d64b143b1c90cd
[ "Apache-2.0" ]
17
2020-03-30T07:07:27.000Z
2022-01-10T12:54:59.000Z
PoC.py
imjdl/CVE-2020-8515-PoC
f241ec96f9b19af07231033064d64b143b1c90cd
[ "Apache-2.0" ]
1
2020-05-10T13:24:21.000Z
2020-06-17T08:41:00.000Z
PoC.py
imjdl/CVE-2020-8515-PoC
f241ec96f9b19af07231033064d64b143b1c90cd
[ "Apache-2.0" ]
12
2020-03-30T15:38:35.000Z
2021-07-12T09:24:38.000Z
import urlparse from pocsuite.api.poc import POCBase from pocsuite.api.poc import register from pocsuite.api.poc import Output from pocsuite.api.request import req from pocsuite.api.utils import randomStr class TestPOC(POCBase): vulID = 'CVE-2020-8515' version = '' author = 'elloit' vulDate = '2020-...
30.933333
150
0.557471
import urlparse from pocsuite.api.poc import POCBase from pocsuite.api.poc import register from pocsuite.api.poc import Output from pocsuite.api.request import req from pocsuite.api.utils import randomStr class TestPOC(POCBase): vulID = 'CVE-2020-8515' version = '' author = 'elloit' vulDate = '2020-...
true
true
1c155032c09807b88a66e5fd32bd0364ca2e35e0
13,027
py
Python
simleague/simset.py
Kuro-Rui/flare-cogs
f739e3a4a8c65bf0e10945d242ba0b82f96c6d3d
[ "MIT" ]
38
2021-03-07T17:13:10.000Z
2022-02-28T19:50:00.000Z
simleague/simset.py
Kuro-Rui/flare-cogs
f739e3a4a8c65bf0e10945d242ba0b82f96c6d3d
[ "MIT" ]
44
2021-03-12T19:13:32.000Z
2022-03-18T10:20:52.000Z
simleague/simset.py
Kuro-Rui/flare-cogs
f739e3a4a8c65bf0e10945d242ba0b82f96c6d3d
[ "MIT" ]
33
2021-03-08T18:59:59.000Z
2022-03-23T10:57:46.000Z
import discord from redbot.core import checks, commands from redbot.core.utils.chat_formatting import box from .abc import MixinMeta class SimsetMixin(MixinMeta): """Simulation Settings""" @checks.admin_or_permissions(manage_guild=True) @commands.group(autohelp=True) async def simset(self, ctx): ...
39.595745
96
0.579719
import discord from redbot.core import checks, commands from redbot.core.utils.chat_formatting import box from .abc import MixinMeta class SimsetMixin(MixinMeta): @checks.admin_or_permissions(manage_guild=True) @commands.group(autohelp=True) async def simset(self, ctx): if ctx.invoked_subcommand...
true
true
1c15506cd840f2249a58f9922dce6e67fd2a6c54
23,413
py
Python
EvalBox/Attack/attack_eval.py
sharinka0715/AISafety
1e210dd448a01069aeaba9fa637b68505ad43332
[ "MIT" ]
null
null
null
EvalBox/Attack/attack_eval.py
sharinka0715/AISafety
1e210dd448a01069aeaba9fa637b68505ad43332
[ "MIT" ]
null
null
null
EvalBox/Attack/attack_eval.py
sharinka0715/AISafety
1e210dd448a01069aeaba9fa637b68505ad43332
[ "MIT" ]
null
null
null
# !/usr/bin/env python # coding=UTF-8 """ @Author: WEN Hao @LastEditors: WEN Hao @Description: @Date: 2021-08-23 @LastEditTime: 2022-04-16 对抗攻击的类, 主要基于TextAttack的Attacker类进行实现,同时参考了OpenAttack的类AttackEval """ import collections import logging import multiprocessing as mp import os import queue import random import tr...
36.812893
122
0.592619
import collections import logging import multiprocessing as mp import os import queue import random import traceback import warnings from typing import Optional, Union, List, NoReturn, Deque, Tuple import numpy as np import torch import tqdm from .attack_result import ( AttackResult, FailedAttackResult, ...
true
true
1c1550fe67b4df95693704ff69761242d800bcf8
605
py
Python
conftest.py
rstudio/fuzzbucket
92a12e7e1646798df16f50b911524adf6638dca7
[ "MIT" ]
2
2021-02-25T14:58:02.000Z
2021-03-10T11:57:34.000Z
conftest.py
rstudio/fuzzbucket
92a12e7e1646798df16f50b911524adf6638dca7
[ "MIT" ]
17
2020-06-09T15:15:23.000Z
2022-03-17T22:13:50.000Z
conftest.py
rstudio/fuzzbucket
92a12e7e1646798df16f50b911524adf6638dca7
[ "MIT" ]
1
2020-12-18T08:57:46.000Z
2020-12-18T08:57:46.000Z
import datetime import os import pytest @pytest.fixture(scope="session", autouse=True) def env_setup(): for key, value in ( ("FUZZBUCKET_FLASK_SECRET_KEY", "shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"), ("FUZZBUCKET_GITHUB_OAUTH_CLIENT_ID", "abc123"), ("FUZZBUCKET_GITHUB_OAUTH_CLIENT_SECRET", "xyz4...
27.5
76
0.694215
import datetime import os import pytest @pytest.fixture(scope="session", autouse=True) def env_setup(): for key, value in ( ("FUZZBUCKET_FLASK_SECRET_KEY", "shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"), ("FUZZBUCKET_GITHUB_OAUTH_CLIENT_ID", "abc123"), ("FUZZBUCKET_GITHUB_OAUTH_CLIENT_SECRET", "xyz4...
true
true
1c1551380a17d0d8b220130ec2fa1b08c2999cb0
1,287
py
Python
src/query_planner/abstract_plan.py
imvinod/Eva
0ed9814ae89db7dce1fb734dc99d5dac69cb3c82
[ "Apache-2.0" ]
1
2019-11-06T03:30:08.000Z
2019-11-06T03:30:08.000Z
src/query_planner/abstract_plan.py
imvinod/Eva
0ed9814ae89db7dce1fb734dc99d5dac69cb3c82
[ "Apache-2.0" ]
1
2019-11-18T03:09:56.000Z
2019-11-18T03:09:56.000Z
src/query_planner/abstract_plan.py
asrayousuf/Eva
f652e5d398556055490c146f37e7a2d7a9d091f3
[ "Apache-2.0" ]
null
null
null
from abc import ABC, abstractmethod from enum import IntEnum, unique @unique class PlanNodeType(IntEnum): SEQSCAN = 1 # add other types class AbstractPlan(ABC): def __init__(self): self._children = [] self._parent = None # self._node_type = node_type def append_child(self, ...
22.189655
52
0.574981
from abc import ABC, abstractmethod from enum import IntEnum, unique @unique class PlanNodeType(IntEnum): SEQSCAN = 1 class AbstractPlan(ABC): def __init__(self): self._children = [] self._parent = None def append_child(self, child): self._children.append(child) ...
true
true
1c1551d16fe7ffb9c05b8ead5f69750d0433690a
227
py
Python
instagram/admin.py
omukankurunziza/instagram-app
453a33d010e56bf60d115dc59c894f8c19e77a72
[ "MIT" ]
null
null
null
instagram/admin.py
omukankurunziza/instagram-app
453a33d010e56bf60d115dc59c894f8c19e77a72
[ "MIT" ]
null
null
null
instagram/admin.py
omukankurunziza/instagram-app
453a33d010e56bf60d115dc59c894f8c19e77a72
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Image,Profile,Comment, Likes # Register your models here. admin.site.register(Image) admin.site.register(Profile) admin.site.register(Comment) admin.site.register(Likes)
18.916667
48
0.801762
from django.contrib import admin from .models import Image,Profile,Comment, Likes admin.site.register(Image) admin.site.register(Profile) admin.site.register(Comment) admin.site.register(Likes)
true
true
1c1552b5f3f1d9724bfd68087e17d6c4d73abb53
1,422
py
Python
config/settings/test.py
ThienHi/sample
6d41754e7109e5588e49aac20679fa7d00a88df0
[ "MIT" ]
null
null
null
config/settings/test.py
ThienHi/sample
6d41754e7109e5588e49aac20679fa7d00a88df0
[ "MIT" ]
null
null
null
config/settings/test.py
ThienHi/sample
6d41754e7109e5588e49aac20679fa7d00a88df0
[ "MIT" ]
null
null
null
""" With these settings, tests run faster. """ from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env( "DJANGO_SECRET_KEY", default="JOQd1oL1z...
33.857143
80
0.510549
from .base import * from .base import env SECRET_KEY = env( "DJANGO_SECRET_KEY", default="JOQd1oL1zIP3RkhVesrdOMJBg7TY8ZigNwEWa92zHUAQHAN6MBgJIpSWvJ4GoD0u", ) TEST_RUNNER = "django.test.runner.DiscoverRunner" PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"] TEMPLATES[-1]["OPTIONS"]["loa...
true
true
1c155340133928228ae39e894a896246eb44d42a
10,047
py
Python
doc/conf.py
vicramr/consensuscluster
959e842b6bd4bc5c24b49c516edc4d4d1e96071b
[ "BSD-3-Clause" ]
1
2020-02-05T14:43:13.000Z
2020-02-05T14:43:13.000Z
doc/conf.py
vicramr/consensuscluster
959e842b6bd4bc5c24b49c516edc4d4d1e96071b
[ "BSD-3-Clause" ]
null
null
null
doc/conf.py
vicramr/consensuscluster
959e842b6bd4bc5c24b49c516edc4d4d1e96071b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # project-template documentation build configuration file, created by # sphinx-quickstart on Mon Jan 18 14:44:12 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated fi...
31.59434
81
0.723101
import sys import os import sphinx_gallery import sphinx_rtd_theme extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode', 'numpydoc', 'sphinx_gallery.gen_gallery', ] numpydoc_show_class_members = False imp...
true
true
1c15538e2ab7a6442c46c63cbf43039e60d7f441
989
py
Python
src/tests/v110/test_delete_sub_collections.py
isaacna/FireO
749132d9d7fc7d361ff4cbc86d9c8e02c096aec2
[ "Apache-2.0" ]
231
2019-10-27T10:52:54.000Z
2022-03-22T10:25:21.000Z
src/tests/v110/test_delete_sub_collections.py
isaacna/FireO
749132d9d7fc7d361ff4cbc86d9c8e02c096aec2
[ "Apache-2.0" ]
97
2019-10-26T09:21:47.000Z
2022-03-26T04:41:57.000Z
src/tests/v110/test_delete_sub_collections.py
isaacna/FireO
749132d9d7fc7d361ff4cbc86d9c8e02c096aec2
[ "Apache-2.0" ]
34
2019-10-30T18:57:05.000Z
2022-02-14T17:07:02.000Z
from fireo.fields import TextField from fireo.models import Model class SubcollectionParent(Model): name = TextField() class SubcollectionChild(Model): name = TextField() def test_delete_sub_collections(): p = SubcollectionParent.collection.create(name="Parent") parent_key = p.key c = Subcolle...
24.121951
77
0.738119
from fireo.fields import TextField from fireo.models import Model class SubcollectionParent(Model): name = TextField() class SubcollectionChild(Model): name = TextField() def test_delete_sub_collections(): p = SubcollectionParent.collection.create(name="Parent") parent_key = p.key c = Subcolle...
true
true
1c1554e9f3555adfa808f1a78e42ae56ea856db0
14,553
py
Python
tensorflow/python/ops/nn_fused_batchnorm_test.py
wlads/tensorflow
9d2fe9dfb4922025f7b7afb288e8b7ca33ef34a5
[ "Apache-2.0" ]
3
2017-10-27T05:37:59.000Z
2018-05-25T02:46:40.000Z
tensorflow/python/ops/nn_fused_batchnorm_test.py
yuqian1023/tensorflow
e3ceea3f65a4091b2a13f3e9c34bf4d1cf3c27fe
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/nn_fused_batchnorm_test.py
yuqian1023/tensorflow
e3ceea3f65a4091b2a13f3e9c34bf4d1cf3c27fe
[ "Apache-2.0" ]
2
2018-09-24T10:57:31.000Z
2018-10-26T03:03:53.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.226415
105
0.634233
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.python.framework import constant_op from tensorflow.python.ops import array_ops from tensorflow.python.ops import gradient_checker from tensorflow.python.ops import gradient...
true
true
1c155540b4ecd0175113ef794af1aef99591a4e7
1,705
py
Python
aoc18/day08/day08.py
dds/advent18
51c6f32cd90f50657d33527e1c9b3a0768f28538
[ "MIT" ]
1
2020-12-30T19:54:33.000Z
2020-12-30T19:54:33.000Z
aoc18/day08/day08.py
dds/advent18
51c6f32cd90f50657d33527e1c9b3a0768f28538
[ "MIT" ]
null
null
null
aoc18/day08/day08.py
dds/advent18
51c6f32cd90f50657d33527e1c9b3a0768f28538
[ "MIT" ]
null
null
null
from pprint import pprint import util import string from collections import defaultdict import string sample_input = """ 2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2 """.strip() expected_output = """\ A---------------------------------- B----------- C----------- D----- """ rawdata = util.get_data(8)....
23.356164
76
0.568915
from pprint import pprint import util import string from collections import defaultdict import string sample_input = """ 2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2 """.strip() expected_output = """\ A---------------------------------- B----------- C----------- D----- """ rawdata = util.get_data(8)....
true
true
1c1556aea572246cb9990935d5091471a32d6e40
512
py
Python
IncomeTax.py
GrandpaGnes/Intro-to-Python
36873549d29df33bfaf33664fa7375153dbf626e
[ "Unlicense" ]
null
null
null
IncomeTax.py
GrandpaGnes/Intro-to-Python
36873549d29df33bfaf33664fa7375153dbf626e
[ "Unlicense" ]
null
null
null
IncomeTax.py
GrandpaGnes/Intro-to-Python
36873549d29df33bfaf33664fa7375153dbf626e
[ "Unlicense" ]
null
null
null
#Initialize the constants TAX_RATE = 0.2 STANDARD_DEDUCTION = 10000.0 DEPENDANT_DEDUCTION = 3000.0 #Request Inputs grossIncome = input ("Enter Gross Income: ") numDependents = input ("Enter no.dependents: ") #ComputeIncomeTax taxableIncome = float (grossIncome) - STANDARD_DEDUCTION - \ ...
23.272727
61
0.708984
TAX_RATE = 0.2 STANDARD_DEDUCTION = 10000.0 DEPENDANT_DEDUCTION = 3000.0 grossIncome = input ("Enter Gross Income: ") numDependents = input ("Enter no.dependents: ") taxableIncome = float (grossIncome) - STANDARD_DEDUCTION - \ DEPENDANT_DEDUCTION*int(numDependents) incomeTax = taxableIn...
true
true
1c1556e9b3c34519f9851a322025b5b819db1277
1,009
py
Python
sandbox/fortranpython/navaro/fortranarrays.py
rboman/progs
c60b4e0487d01ccd007bcba79d1548ebe1685655
[ "Apache-2.0" ]
2
2021-12-12T13:26:06.000Z
2022-03-03T16:14:53.000Z
sandbox/fortranpython/navaro/fortranarrays.py
rboman/progs
c60b4e0487d01ccd007bcba79d1548ebe1685655
[ "Apache-2.0" ]
5
2019-03-01T07:08:46.000Z
2019-04-28T07:32:42.000Z
sandbox/fortranpython/navaro/fortranarrays.py
rboman/progs
c60b4e0487d01ccd007bcba79d1548ebe1685655
[ "Apache-2.0" ]
2
2017-12-13T13:13:52.000Z
2019-03-13T20:08:15.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import numpy as np import navaro as na vitesses = np.array([[0, 1, 2], [0, 3, 2], [0, 1, 3]], dtype=np.float64) positions = np.array([[0, 0, 0], [0, 0, 0], [0, 0, 0]], dtype=np.float64) print('type(pos) =', positions.dtype) na.move(positions, vitesses, 0.1) print('p=', ...
28.828571
73
0.627354
import numpy as np import navaro as na vitesses = np.array([[0, 1, 2], [0, 3, 2], [0, 1, 3]], dtype=np.float64) positions = np.array([[0, 0, 0], [0, 0, 0], [0, 0, 0]], dtype=np.float64) print('type(pos) =', positions.dtype) na.move(positions, vitesses, 0.1) print('p=', positions) positions = np.array(positions, dty...
true
true
1c155719cc1645c4774db5af197a8b13ef71421d
1,665
py
Python
test/functional/feature_blocksdir.py
fakecoinbase/pexaslashcore
dd0612727878844da7e47bdad0e0aca6c841aa81
[ "MIT" ]
19
2019-10-25T12:53:27.000Z
2022-01-31T13:25:16.000Z
test/functional/feature_blocksdir.py
fakecoinbase/pexaslashcore
dd0612727878844da7e47bdad0e0aca6c841aa81
[ "MIT" ]
3
2020-12-23T16:17:31.000Z
2020-12-26T10:12:37.000Z
test/functional/feature_blocksdir.py
fakecoinbase/pexaslashcore
dd0612727878844da7e47bdad0e0aca6c841aa81
[ "MIT" ]
6
2020-04-20T19:21:37.000Z
2021-08-31T19:35:48.000Z
#!/usr/bin/env python3 # Copyright (c) 2018-2019 The Pexa Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the blocksdir option. """ import os import shutil from test_framework.test_framework import PexaTes...
42.692308
167
0.701502
import os import shutil from test_framework.test_framework import PexaTestFramework, initialize_datadir class BlocksdirTest(PexaTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 def run_test(self): self.stop_node(0) assert os.path.is...
true
true
1c155780b42d47a2ae58362f1e90b9098c5b20b9
1,374
py
Python
examples/test_conf_manager.py
zhengyuli/addonfactory-solutions-library-python
1a8d0345a117e70b072bc9a85c2c3a12756502e4
[ "Apache-2.0" ]
null
null
null
examples/test_conf_manager.py
zhengyuli/addonfactory-solutions-library-python
1a8d0345a117e70b072bc9a85c2c3a12756502e4
[ "Apache-2.0" ]
null
null
null
examples/test_conf_manager.py
zhengyuli/addonfactory-solutions-library-python
1a8d0345a117e70b072bc9a85c2c3a12756502e4
[ "Apache-2.0" ]
1
2021-12-05T00:59:39.000Z
2021-12-05T00:59:39.000Z
# SPDX-FileCopyrightText: 2020 2020 # # SPDX-License-Identifier: Apache-2.0 import os.path as op import sys import pytest sys.path.insert(0, op.dirname(op.dirname(op.abspath(__file__)))) from solnlib import credentials from solnlib import conf_manager import context def test_conf_manager(): session_key = crede...
26.941176
67
0.665211
import os.path as op import sys import pytest sys.path.insert(0, op.dirname(op.dirname(op.abspath(__file__)))) from solnlib import credentials from solnlib import conf_manager import context def test_conf_manager(): session_key = credentials.get_session_key( context.username, context.password, ...
true
true
1c1557922eb84ba5e06b4a1fd7440a6c5cca65fb
1,808
py
Python
raiden/blockchain/state.py
anmolshl/raiden
f1cecb68cb43a2c00b2f719eadbe83137611a92a
[ "MIT" ]
null
null
null
raiden/blockchain/state.py
anmolshl/raiden
f1cecb68cb43a2c00b2f719eadbe83137611a92a
[ "MIT" ]
null
null
null
raiden/blockchain/state.py
anmolshl/raiden
f1cecb68cb43a2c00b2f719eadbe83137611a92a
[ "MIT" ]
null
null
null
from raiden.transfer.state import ( NettingChannelEndState, NettingChannelState, TransactionExecutionStatus, ) def get_channel_state( token_address, token_network_address, reveal_timeout, netting_channel_proxy, ): channel_details = netting_channel_proxy.detail() ou...
25.111111
73
0.677544
from raiden.transfer.state import ( NettingChannelEndState, NettingChannelState, TransactionExecutionStatus, ) def get_channel_state( token_address, token_network_address, reveal_timeout, netting_channel_proxy, ): channel_details = netting_channel_proxy.detail() ou...
true
true
1c1557a10d1394978c0807482aa8a2e2a28b2710
10,531
py
Python
offline/embedding/embedding.py
JanzenLiu/Elastic-and-Parallel-Rec-System-pipeline
3a7be2ffbe423d6421d722141d6ae882422f5c30
[ "MIT" ]
null
null
null
offline/embedding/embedding.py
JanzenLiu/Elastic-and-Parallel-Rec-System-pipeline
3a7be2ffbe423d6421d722141d6ae882422f5c30
[ "MIT" ]
null
null
null
offline/embedding/embedding.py
JanzenLiu/Elastic-and-Parallel-Rec-System-pipeline
3a7be2ffbe423d6421d722141d6ae882422f5c30
[ "MIT" ]
null
null
null
from os.path import * from pyspark.sql import SparkSession, Row from pyspark import SparkConf from pyspark.sql.functions import * from pyspark.sql.types import * from pyspark.mllib.feature import Word2Vec, Word2VecModel from pyspark.ml.feature import BucketedRandomProjectionLSH from pyspark.ml.linalg import Vectors imp...
43.516529
123
0.660051
from os.path import * from pyspark.sql import SparkSession, Row from pyspark import SparkConf from pyspark.sql.functions import * from pyspark.sql.types import * from pyspark.mllib.feature import Word2Vec, Word2VecModel from pyspark.ml.feature import BucketedRandomProjectionLSH from pyspark.ml.linalg import Vectors imp...
true
true
1c15584e92dece813a91fd59937c07d5446ce9b7
484
py
Python
print_analysis.py
rob-dalton/hmm-ner-example
38d7a47e7ef1fd7f840ab5788de46dc78e9d579d
[ "MIT" ]
2
2019-06-22T18:51:26.000Z
2019-10-10T09:47:08.000Z
print_analysis.py
rob-dalton/hmm-ner-example
38d7a47e7ef1fd7f840ab5788de46dc78e9d579d
[ "MIT" ]
null
null
null
print_analysis.py
rob-dalton/hmm-ner-example
38d7a47e7ef1fd7f840ab5788de46dc78e9d579d
[ "MIT" ]
null
null
null
""" Script file to read k-scores results from S3 and print. """ import boto3 import json from metrics import print_scores if __name__ == "__main__": # load data from s3 s3 = boto3.resource('s3') obj = s3.Object('awspot-instances', 'hmm_example/scores.json').get() contents = obj['Body'].read().decode...
24.2
72
0.661157
import boto3 import json from metrics import print_scores if __name__ == "__main__": s3 = boto3.resource('s3') obj = s3.Object('awspot-instances', 'hmm_example/scores.json').get() contents = obj['Body'].read().decode('utf-8') scores = json.loads(contents) for model, model_scores in scores....
true
true
1c155863d9345c610d83789bbc8ca160d99bfe6a
2,338
py
Python
numba/cuda/tests/cudapy/test_multigpu.py
laserson/numba
35546517b27764a9120f6dfcd82eba7f4dd858cb
[ "BSD-2-Clause" ]
1
2015-01-29T06:52:36.000Z
2015-01-29T06:52:36.000Z
numba/cuda/tests/cudapy/test_multigpu.py
laserson/numba
35546517b27764a9120f6dfcd82eba7f4dd858cb
[ "BSD-2-Clause" ]
null
null
null
numba/cuda/tests/cudapy/test_multigpu.py
laserson/numba
35546517b27764a9120f6dfcd82eba7f4dd858cb
[ "BSD-2-Clause" ]
null
null
null
from numba import cuda import numpy as np from numba import unittest_support as unittest import threading class TestMultiGPUContext(unittest.TestCase): def test_multigpu_context(self): @cuda.jit("void(float64[:], float64[:])") def copy_plus_1(inp, out): i = cuda.grid(1) if ...
25.413043
73
0.471771
from numba import cuda import numpy as np from numba import unittest_support as unittest import threading class TestMultiGPUContext(unittest.TestCase): def test_multigpu_context(self): @cuda.jit("void(float64[:], float64[:])") def copy_plus_1(inp, out): i = cuda.grid(1) if ...
true
true
1c15592d209cca353a921cc7d8f31025e073f7ce
1,914
py
Python
tests/fixtures/agents.py
sqren/apm-integration-testing
7df27b3a5c4125d9e76d1127b841ff2aa94d3686
[ "Apache-2.0" ]
null
null
null
tests/fixtures/agents.py
sqren/apm-integration-testing
7df27b3a5c4125d9e76d1127b841ff2aa94d3686
[ "Apache-2.0" ]
null
null
null
tests/fixtures/agents.py
sqren/apm-integration-testing
7df27b3a5c4125d9e76d1127b841ff2aa94d3686
[ "Apache-2.0" ]
1
2021-07-02T00:04:24.000Z
2021-07-02T00:04:24.000Z
try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import pytest from tests.endpoint import Endpoint from tests.fixtures import default @pytest.fixture(scope="session") def flask(apm_server): return Agent(default.from_env('FLASK_SERVICE_NAME'), defa...
27.342857
62
0.649425
try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import pytest from tests.endpoint import Endpoint from tests.fixtures import default @pytest.fixture(scope="session") def flask(apm_server): return Agent(default.from_env('FLASK_SERVICE_NAME'), defa...
true
true
1c155934a7ddb9f71743255f51c6162bae3cd9d7
1,292
py
Python
aristaflow/org_model_service.py
riuns/aristaflowpy
58ad48310366484379fc519d649c564c762f89f9
[ "MIT" ]
null
null
null
aristaflow/org_model_service.py
riuns/aristaflowpy
58ad48310366484379fc519d649c564c762f89f9
[ "MIT" ]
null
null
null
aristaflow/org_model_service.py
riuns/aristaflowpy
58ad48310366484379fc519d649c564c762f89f9
[ "MIT" ]
1
2021-07-13T10:35:36.000Z
2021-07-13T10:35:36.000Z
# AristaFlow REST Libraries # Third Party Libraries from af_org_model_manager.api.policy_resolution_api import PolicyResolutionApi from af_org_model_manager.models.qa_remote_iterator_data import QaRemoteIteratorData from af_org_model_manager.api.model_explorer_api import ModelExplorerApi # Aristaflow Libraries from ar...
34
84
0.710526
from af_org_model_manager.api.policy_resolution_api import PolicyResolutionApi from af_org_model_manager.models.qa_remote_iterator_data import QaRemoteIteratorData from af_org_model_manager.api.model_explorer_api import ModelExplorerApi from aristaflow.abstract_service import AbstractService from aristaflow.utils impo...
true
true
1c15596ec6bc32ee70e8a44ce813f84eb4dc9780
4,807
py
Python
Models/unet/pretrained.py
YuyangXueEd/MRI_Recon_Tutorial
5c235e0831e30528611f492668987caa0f183f80
[ "MIT" ]
null
null
null
Models/unet/pretrained.py
YuyangXueEd/MRI_Recon_Tutorial
5c235e0831e30528611f492668987caa0f183f80
[ "MIT" ]
null
null
null
Models/unet/pretrained.py
YuyangXueEd/MRI_Recon_Tutorial
5c235e0831e30528611f492668987caa0f183f80
[ "MIT" ]
null
null
null
import argparse import time from collections import defaultdict from pathlib import Path from tqdm import tqdm import numpy as np import requests import torch import fastmri import fastmri.data.transforms as T from fastmri.data import SliceDataset from unet import Unet UNET_FOLDER = "https://dl.fbaipublicfiles.com/f...
29.67284
90
0.613272
import argparse import time from collections import defaultdict from pathlib import Path from tqdm import tqdm import numpy as np import requests import torch import fastmri import fastmri.data.transforms as T from fastmri.data import SliceDataset from unet import Unet UNET_FOLDER = "https://dl.fbaipublicfiles.com/f...
true
true
1c1559c7d01ed75d417193f678203c8b8c95f858
173
py
Python
server/apis/main/routes.py
dactechie/intershift_comms
041e15426cf985fec30d1abc8068d1c52ba8e804
[ "MIT" ]
null
null
null
server/apis/main/routes.py
dactechie/intershift_comms
041e15426cf985fec30d1abc8068d1c52ba8e804
[ "MIT" ]
null
null
null
server/apis/main/routes.py
dactechie/intershift_comms
041e15426cf985fec30d1abc8068d1c52ba8e804
[ "MIT" ]
null
null
null
from flask import Blueprint #from app.main.models import mod = Blueprint('main', __name__) @mod.route('/') def home(): return '{"result": "you are on the homepage"}'
19.222222
50
0.676301
from flask import Blueprint mod = Blueprint('main', __name__) @mod.route('/') def home(): return '{"result": "you are on the homepage"}'
true
true
1c155a1f6f9c62b4fe4432a833779e3c5fd324cf
194
py
Python
say/__init__.py
MothGirlMusic/Moff-Cogs
ea97a727e9e9b61c5ecd293d7ff907ee418b586a
[ "MIT" ]
null
null
null
say/__init__.py
MothGirlMusic/Moff-Cogs
ea97a727e9e9b61c5ecd293d7ff907ee418b586a
[ "MIT" ]
null
null
null
say/__init__.py
MothGirlMusic/Moff-Cogs
ea97a727e9e9b61c5ecd293d7ff907ee418b586a
[ "MIT" ]
null
null
null
import logging from .say import Say log = logging.getLogger("laggron.say") async def setup(bot): n = Say(bot) bot.add_cog(n) log.debug("Cog successfully loaded on the instance.")
17.636364
57
0.690722
import logging from .say import Say log = logging.getLogger("laggron.say") async def setup(bot): n = Say(bot) bot.add_cog(n) log.debug("Cog successfully loaded on the instance.")
true
true
1c155c2dfff1fede15adeb0425ac18d2523e370e
39,355
py
Python
research/object_detection/utils/object_detection_evaluation.py
taegoobot/models
2c54560546b17d3766a12f248e5a57f5e65995a8
[ "Apache-2.0" ]
null
null
null
research/object_detection/utils/object_detection_evaluation.py
taegoobot/models
2c54560546b17d3766a12f248e5a57f5e65995a8
[ "Apache-2.0" ]
null
null
null
research/object_detection/utils/object_detection_evaluation.py
taegoobot/models
2c54560546b17d3766a12f248e5a57f5e65995a8
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
44.268841
88
0.717037
from abc import ABCMeta from abc import abstractmethod import collections import logging import unicodedata import numpy as np from object_detection.core import standard_fields from object_detection.utils import label_map_util from object_detection.utils import metrics from object_detection.utils import per_image_eva...
true
true
1c155cf567996e883e5bc31c666681756422ca86
3,546
py
Python
pyshortcuts/shortcut.py
maphew/pyshortcuts
ba5b6d9d6cf23e6f518002dc6a998b27ac91a3d6
[ "MIT" ]
null
null
null
pyshortcuts/shortcut.py
maphew/pyshortcuts
ba5b6d9d6cf23e6f518002dc6a998b27ac91a3d6
[ "MIT" ]
null
null
null
pyshortcuts/shortcut.py
maphew/pyshortcuts
ba5b6d9d6cf23e6f518002dc6a998b27ac91a3d6
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import os import sys from collections import namedtuple import six if six.PY3: maketrans = str.maketrans else: from string import maketrans BAD_FILECHARS = ';~,`!%$@$&^?*#:"/|\'\\\t\r\n(){}[]<>' GOOD_FILECHARS = '_'*len(BAD_FILECHARS) def fix_filen...
33.140187
81
0.620135
from __future__ import print_function import os import sys from collections import namedtuple import six if six.PY3: maketrans = str.maketrans else: from string import maketrans BAD_FILECHARS = ';~,`!%$@$&^?*#:"/|\'\\\t\r\n(){}[]<>' GOOD_FILECHARS = '_'*len(BAD_FILECHARS) def fix_filename(s): t = str(s)...
true
true
1c155efca463837f7ddbb3e3d98758b62def14bd
10,734
py
Python
certificate/metadata.py
AllyHyeseongKim/Sleep-Stage-Classification
4c102d0d8b67d51a22ad7a6130be901c559254ef
[ "Apache-2.0" ]
null
null
null
certificate/metadata.py
AllyHyeseongKim/Sleep-Stage-Classification
4c102d0d8b67d51a22ad7a6130be901c559254ef
[ "Apache-2.0" ]
null
null
null
certificate/metadata.py
AllyHyeseongKim/Sleep-Stage-Classification
4c102d0d8b67d51a22ad7a6130be901c559254ef
[ "Apache-2.0" ]
null
null
null
import csv from datetime import datetime from datetime import timedelta import re import sys # Known events and corresponding integer codes EVENT_CODE = { "NONE": 0, "APNEA-CENTRAL": 1, "APNEA-MIXED": 2, "APNEA-OBSTRUCTIVE": 3, "HYPOPNEA": 4, "AROUSAL-RERA": 5, "AROUSAL-RESP": 6, "POSI...
30.494318
118
0.584032
import csv from datetime import datetime from datetime import timedelta import re import sys EVENT_CODE = { "NONE": 0, "APNEA-CENTRAL": 1, "APNEA-MIXED": 2, "APNEA-OBSTRUCTIVE": 3, "HYPOPNEA": 4, "AROUSAL-RERA": 5, "AROUSAL-RESP": 6, "POSITION-SUPINE": 7, "SNORE": 8, "SNOR...
true
true
1c15607ae0e42684575829a7e397ac324a5f8f88
6,871
py
Python
app/cohort_analysis.py
berkmancenter/odie_analysis
940a1bfad95403cfdc060c786707114efe6ab879
[ "MIT" ]
null
null
null
app/cohort_analysis.py
berkmancenter/odie_analysis
940a1bfad95403cfdc060c786707114efe6ab879
[ "MIT" ]
null
null
null
app/cohort_analysis.py
berkmancenter/odie_analysis
940a1bfad95403cfdc060c786707114efe6ab879
[ "MIT" ]
1
2021-09-22T01:58:09.000Z
2021-09-22T01:58:09.000Z
import pickle import logging from pathlib import Path from collections import defaultdict, Counter import pandas as pd import numpy as np from elasticsearch import Elasticsearch from elasticsearch_dsl import Search from tqdm import tqdm from datasketch import MinHash, MinHashLSH from scattertext.termscoring.ScaledFSc...
35.417526
78
0.659584
import pickle import logging from pathlib import Path from collections import defaultdict, Counter import pandas as pd import numpy as np from elasticsearch import Elasticsearch from elasticsearch_dsl import Search from tqdm import tqdm from datasketch import MinHash, MinHashLSH from scattertext.termscoring.ScaledFSc...
true
true
1c15608299c85c09d8a00a3c1c7b9352b45e49d2
3,509
py
Python
scrapy/http/request/__init__.py
chongiadung/choinho
d2a216fe7a5064d73cdee3e928a7beef7f511fd1
[ "MIT" ]
null
null
null
scrapy/http/request/__init__.py
chongiadung/choinho
d2a216fe7a5064d73cdee3e928a7beef7f511fd1
[ "MIT" ]
10
2020-02-11T23:34:28.000Z
2022-03-11T23:16:12.000Z
scrapy/http/request/__init__.py
chongiadung/choinho
d2a216fe7a5064d73cdee3e928a7beef7f511fd1
[ "MIT" ]
3
2018-08-05T14:54:25.000Z
2021-06-07T01:49:59.000Z
""" This module implements the Request class which is used to represent HTTP requests in Scrapy. See documentation in docs/topics/request-response.rst """ import six from w3lib.url import safe_url_string from scrapy.http.headers import Headers from scrapy.utils.trackref import object_ref from scrapy.utils.url import ...
33.419048
103
0.607581
""" This module implements the Request class which is used to represent HTTP requests in Scrapy. See documentation in docs/topics/request-response.rst """ import six from w3lib.url import safe_url_string from scrapy.http.headers import Headers from scrapy.utils.trackref import object_ref from scrapy.utils.url import ...
false
true
1c1560ae72e276edf8786739f67c344b862d29ef
7,176
py
Python
tests/garage/torch/policies/test_categorical_cnn_policy.py
Rnhondova/garage
0ff40022a1da0287a45af86c7b8fc9c604c13dd5
[ "MIT" ]
1
2021-01-11T18:40:52.000Z
2021-01-11T18:40:52.000Z
tests/garage/torch/policies/test_categorical_cnn_policy.py
Rnhondova/garage
0ff40022a1da0287a45af86c7b8fc9c604c13dd5
[ "MIT" ]
4
2021-01-18T06:16:20.000Z
2021-03-06T08:49:03.000Z
tests/garage/torch/policies/test_categorical_cnn_policy.py
Rnhondova/garage
0ff40022a1da0287a45af86c7b8fc9c604c13dd5
[ "MIT" ]
null
null
null
"""Test categoricalCNNPolicy in PyTorch.""" import cloudpickle import pytest import torch from garage.envs import GymEnv from garage.torch import TransposeImage from garage.torch.policies import CategoricalCNNPolicy from tests.fixtures.envs.dummy import DummyDictEnv, DummyDiscretePixelEnv class TestCategoricalCNNPo...
42.714286
77
0.536232
import cloudpickle import pytest import torch from garage.envs import GymEnv from garage.torch import TransposeImage from garage.torch.policies import CategoricalCNNPolicy from tests.fixtures.envs.dummy import DummyDictEnv, DummyDiscretePixelEnv class TestCategoricalCNNPolicy: def _initialize_obs_env(self, env...
true
true
1c156103e89246ec19e608e0eef287ada546bd23
987
py
Python
patterns/views.py
kimmyd70/django-x
5e5b70aa17f1d2d416f3d10badfb1021f4cd8d09
[ "MIT" ]
null
null
null
patterns/views.py
kimmyd70/django-x
5e5b70aa17f1d2d416f3d10badfb1021f4cd8d09
[ "MIT" ]
null
null
null
patterns/views.py
kimmyd70/django-x
5e5b70aa17f1d2d416f3d10badfb1021f4cd8d09
[ "MIT" ]
null
null
null
# from django.shortcuts import render from django.urls import reverse_lazy from django.views.generic import ( ListView, DetailView, CreateView, UpdateView, DeleteView, ) from .models import Pattern # CRUD class PatternCreateView(CreateView): template_name = 'patterns/pattern-create.html...
24.675
73
0.70618
from django.urls import reverse_lazy from django.views.generic import ( ListView, DetailView, CreateView, UpdateView, DeleteView, ) from .models import Pattern class PatternCreateView(CreateView): template_name = 'patterns/pattern-create.html' model = Pattern fields = ['name', '...
true
true
1c15621e33a18877ab52525a3c40943e09b8c0bd
11,705
py
Python
google/cloud/retail_v2/services/search_service/transports/grpc.py
googleapis/python-retail
6e6d25ea68a98aa264ba2f5b31d2b7c4190530cf
[ "Apache-2.0" ]
6
2021-06-04T06:11:08.000Z
2022-03-29T17:26:29.000Z
google/cloud/retail_v2/services/search_service/transports/grpc.py
googleapis/python-retail
6e6d25ea68a98aa264ba2f5b31d2b7c4190530cf
[ "Apache-2.0" ]
68
2021-01-14T23:02:12.000Z
2022-03-30T22:21:23.000Z
google/cloud/retail_v2/services/search_service/transports/grpc.py
googleapis/python-retail
6e6d25ea68a98aa264ba2f5b31d2b7c4190530cf
[ "Apache-2.0" ]
5
2021-01-14T22:47:27.000Z
2022-01-29T08:13:21.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
43.513011
87
0.634601
import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union from google.api_core import grpc_helpers from google.api_core import gapic_v1 import google.auth from google.auth import credentials as ga_credentials from google.auth.transport.grpc import SslCredentials import grpc from googl...
true
true
1c156477a34b9de6dd4d3d62398476ab4854359f
52,037
py
Python
venv/Lib/site-packages/pandas/tests/resample/test_datetime_index.py
Jos33y/student-performance-knn
4e965434f52dd6a1380904aa257df1edfaebb3c4
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pandas/tests/resample/test_datetime_index.py
Jos33y/student-performance-knn
4e965434f52dd6a1380904aa257df1edfaebb3c4
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pandas/tests/resample/test_datetime_index.py
Jos33y/student-performance-knn
4e965434f52dd6a1380904aa257df1edfaebb3c4
[ "MIT" ]
null
null
null
from datetime import datetime, timedelta from functools import partial from io import StringIO import numpy as np import pytest import pytz from pandas.errors import UnsupportedFunctionCall import pandas as pd from pandas import DataFrame, Series, Timedelta, Timestamp, isna, notna import pandas._testing ...
32.810214
89
0.584373
from datetime import datetime, timedelta from functools import partial from io import StringIO import numpy as np import pytest import pytz from pandas.errors import UnsupportedFunctionCall import pandas as pd from pandas import DataFrame, Series, Timedelta, Timestamp, isna, notna import pandas._testing ...
true
true
1c15648c1f24a141154b525a194b5ea3a51deed2
383
py
Python
jovsatools/mote_carlo_eth2.py
jovsa/jovsatools
52e7f6737376b62bbeba41dba8b54167661412a2
[ "Apache-2.0" ]
2
2020-06-06T22:46:58.000Z
2020-07-09T22:00:38.000Z
jovsatools/mote_carlo_eth2.py
jovsa/jsmltools
52e7f6737376b62bbeba41dba8b54167661412a2
[ "Apache-2.0" ]
1
2020-09-16T19:13:22.000Z
2020-09-16T19:13:22.000Z
jovsatools/mote_carlo_eth2.py
jovsa/jsmltools
52e7f6737376b62bbeba41dba8b54167661412a2
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: notebooks/mote_carlo_eth2.ipynb (unless otherwise specified). __all__ = [] # Cell from nbdev.showdoc import * import jovsatools import fastcore import numpy as np from collections import Counter, defaultdict from tqdm import tqdm import seaborn as sns from typing import Opt...
25.533333
105
0.806789
__all__ = [] from nbdev.showdoc import * import jovsatools import fastcore import numpy as np from collections import Counter, defaultdict from tqdm import tqdm import seaborn as sns from typing import Optional, List import pandas as pd import matplotlib.pyplot as plt
true
true
1c1564c31985e86ba6ba4ad5cd399589a08c5354
708
py
Python
built-in/PyTorch/Official/cv/image_object_detection/YoloV3_ID1790_for_PyTorch/configs/hrnet/mask_rcnn_hrnetv2p_w32_2x_coco.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
12
2020-12-13T08:34:24.000Z
2022-03-20T15:17:17.000Z
built-in/PyTorch/Official/cv/image_object_detection/YoloV3_ID1790_for_PyTorch/configs/hrnet/mask_rcnn_hrnetv2p_w32_2x_coco.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
1
2022-01-20T03:11:05.000Z
2022-01-20T06:53:39.000Z
built-in/PyTorch/Official/cv/image_object_detection/YoloV3_ID1790_for_PyTorch/configs/hrnet/mask_rcnn_hrnetv2p_w32_2x_coco.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
2
2021-07-10T12:40:46.000Z
2021-12-17T07:55:15.000Z
# Copyright 2021 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 agree...
37.263158
74
0.761299
_base_ = './mask_rcnn_hrnetv2p_w32_1x_coco.py' lr_config = dict(step=[16, 22]) total_epochs = 24
true
true
1c156528816101510a2a72c3a5341ecdf6df87d4
12,064
py
Python
Easy/EasyLexer.py
lukaskiss222/Easy
d92405f364ef8d7e2db062e442bb46670df69d8a
[ "MIT" ]
null
null
null
Easy/EasyLexer.py
lukaskiss222/Easy
d92405f364ef8d7e2db062e442bb46670df69d8a
[ "MIT" ]
null
null
null
Easy/EasyLexer.py
lukaskiss222/Easy
d92405f364ef8d7e2db062e442bb46670df69d8a
[ "MIT" ]
null
null
null
# Generated from /home/lukas/Documents/kompilator/compiler/Easy.g4 by ANTLR 4.7.2 from antlr4 import * from io import StringIO from typing.io import TextIO import sys def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\60") buf.write("\u012...
53.857143
103
0.537384
from antlr4 import * from io import StringIO from typing.io import TextIO import sys def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\60") buf.write("\u0128\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7") buf.write("\t\7\4\b\t\...
true
true
1c15669a50e0ee3839b70e52d7ec68d7bcda5209
27,106
py
Python
label_studio/tasks/models.py
do168/label-studio
30f6ef6b1e36f47f0a4b6ed12759983cd766bceb
[ "Apache-2.0" ]
1
2021-12-15T11:10:03.000Z
2021-12-15T11:10:03.000Z
label_studio/tasks/models.py
lyj555/label-studio
30f6ef6b1e36f47f0a4b6ed12759983cd766bceb
[ "Apache-2.0" ]
8
2021-09-28T16:41:26.000Z
2022-03-21T18:44:05.000Z
label_studio/tasks/models.py
lyj555/label-studio
30f6ef6b1e36f47f0a4b6ed12759983cd766bceb
[ "Apache-2.0" ]
null
null
null
"""This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license. """ import json import logging import os import datetime import numbers from urllib.parse import urljoin, quote from django.conf import settings from...
43.578778
183
0.66037
import json import logging import os import datetime import numbers from urllib.parse import urljoin, quote from django.conf import settings from django.db import models, connection, transaction from django.db.models import Q, F, When, Count, Case, Subquery, OuterRef, Value from django.db.models.functions import Coal...
true
true
1c1566cc481ace4c1bc4abd59b404e051a350d1e
14,091
py
Python
audio_zen/model/base_model.py
tommy19970714/FullSubNetWithASR
4dc03c2492aed57c1128cc5b818cdde38ada6b3e
[ "MIT" ]
4
2021-05-13T13:05:19.000Z
2021-11-01T16:09:25.000Z
audio_zen/model/base_model.py
keonlee9420/FullSubNet
fbe6b8f1ae83d23b685bb3dae457b58941ee3644
[ "MIT" ]
null
null
null
audio_zen/model/base_model.py
keonlee9420/FullSubNet
fbe6b8f1ae83d23b685bb3dae457b58941ee3644
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.init as init from torch.nn import functional from audio_zen.constant import EPSILON class BaseModel(nn.Module): def __init__(self): super(BaseModel, self).__init__() @staticmethod def unfold(input, num_neighbor): """ Along with th...
35.673418
133
0.553687
import torch import torch.nn as nn import torch.nn.init as init from torch.nn import functional from audio_zen.constant import EPSILON class BaseModel(nn.Module): def __init__(self): super(BaseModel, self).__init__() @staticmethod def unfold(input, num_neighbor): assert input.dim() == 4, ...
true
true
1c1566cd020dd14f2c6ffe53ddcbfbf803323f6e
29,154
py
Python
src/dgk_basic.py
Lucieno/gforce-public
cb577ec22f2011d30dbef9dad9545ca1402f875b
[ "MIT" ]
8
2021-07-27T04:23:30.000Z
2022-03-03T16:40:17.000Z
src/dgk_basic.py
Lucieno/gforce-public
cb577ec22f2011d30dbef9dad9545ca1402f875b
[ "MIT" ]
null
null
null
src/dgk_basic.py
Lucieno/gforce-public
cb577ec22f2011d30dbef9dad9545ca1402f875b
[ "MIT" ]
null
null
null
import sys from itertools import product import torch from comm import CommBase, CommFheBuilder, BlobFheEnc, BlobTorch, BlobFheEnc2D, init_communicate, end_communicate, \ torch_sync, TrafficRecord from config import Config from dgk_single_thread import DgkBase from enc_refresher import EncRefresherServer, EncRefr...
49.080808
138
0.680901
import sys from itertools import product import torch from comm import CommBase, CommFheBuilder, BlobFheEnc, BlobTorch, BlobFheEnc2D, init_communicate, end_communicate, \ torch_sync, TrafficRecord from config import Config from dgk_single_thread import DgkBase from enc_refresher import EncRefresherServer, EncRefr...
true
true
1c1567d0c063186c5c7d9481aad1c2668289914e
2,889
py
Python
test/correctness/smoke/test_basic_flow.py
kolesa-team/fdb-document-layer
d556bbf1a8f7cd3fd382943eb1694599b0bf15b3
[ "Apache-2.0" ]
176
2018-11-29T19:49:24.000Z
2022-03-13T07:20:12.000Z
test/correctness/smoke/test_basic_flow.py
kolesa-team/fdb-document-layer
d556bbf1a8f7cd3fd382943eb1694599b0bf15b3
[ "Apache-2.0" ]
145
2018-11-29T21:56:37.000Z
2021-11-29T06:31:55.000Z
test/correctness/smoke/test_basic_flow.py
kolesa-team/fdb-document-layer
d556bbf1a8f7cd3fd382943eb1694599b0bf15b3
[ "Apache-2.0" ]
29
2018-11-29T19:37:56.000Z
2021-11-06T14:20:28.000Z
#!/usr/bin/python # # test_basic_flow.py # # This source file is part of the FoundationDB open source project # # Copyright 2013-2019 Apple Inc. and the FoundationDB project authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Y...
33.593023
118
0.697127
def test_simple_coll_index(fixture_collection): collection = fixture_collection collection.create_index('a', name='idx_a') indexes = collection.index_information() assert '_id_' in indexes, "Returned list of indexes by listIndex command does not contains the primary index _id_" ...
true
true
1c15693c4d38b162c2c15fe98081750eb4a73afc
1,703
py
Python
squad/constants.py
markriedl/gaige
e4984571ae368195b6bc296e69ed707a86b88da3
[ "MIT" ]
100
2018-11-26T17:04:50.000Z
2022-03-26T10:16:23.000Z
squad/constants.py
markriedl/gaige
e4984571ae368195b6bc296e69ed707a86b88da3
[ "MIT" ]
null
null
null
squad/constants.py
markriedl/gaige
e4984571ae368195b6bc296e69ed707a86b88da3
[ "MIT" ]
9
2018-12-12T01:10:41.000Z
2020-07-04T18:20:04.000Z
''' * Copyright (c) 2014, 2015 Entertainment Intelligence Lab, Georgia Institute of Technology. * Originally developed by Mark Riedl. * Last edited by Matthew Guzdial 01/2016 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Y...
25.044118
92
0.733412
SCREEN = [1024, 768] WORLD = [1024, 768] TICK = 60 SPEED = (5, 5) NUMOBSTACLES = 3 OBSTACLERADIUS = 200 OBSTACLESIGMA = 50 OBSTACLEMIN = 25 OBSTACLEPOINTS = 7 OBSTACLEGRIDSIZE = 50 NUMRESOURCES = 20 SEED = 2 HITPOINTS = 25 BASEHITPOINTS = 38 TOWERHITPOINTS = 25 AGENT = "sprites/spartan2.gif" SMALLBULLET = "sprites/...
true
true