hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8f57c53783255d968c61238c03513fb1829119ef | 7,404 | py | Python | gecosistema_lite/gdal_shape.py | valluzzi/libcore | 1e714ed0df13000bf853696551ee109b3b65997a | [
"MIT"
] | null | null | null | gecosistema_lite/gdal_shape.py | valluzzi/libcore | 1e714ed0df13000bf853696551ee109b3b65997a | [
"MIT"
] | null | null | null | gecosistema_lite/gdal_shape.py | valluzzi/libcore | 1e714ed0df13000bf853696551ee109b3b65997a | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------------
# Licence:
# Copyright (c) 2012-2017 Valerio for Gecosistema S.r.l.
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS",... | 31.506383 | 101 | 0.573744 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,739 | 0.369935 |
8f583755beca1d6f083766bc7e6fb3691cf83619 | 1,015 | py | Python | pw22/__main__.py | paeronskruven/pyweek22 | 4657b03a49c011581af6ae460fd97b6d58d13ead | [
"MIT"
] | null | null | null | pw22/__main__.py | paeronskruven/pyweek22 | 4657b03a49c011581af6ae460fd97b6d58d13ead | [
"MIT"
] | null | null | null | pw22/__main__.py | paeronskruven/pyweek22 | 4657b03a49c011581af6ae460fd97b6d58d13ead | [
"MIT"
] | null | null | null | import pyglet
import logging
logging.basicConfig(format='%(asctime)s %(module)s %(levelname)s %(message)s', level=logging.DEBUG)
# setup resource paths before importing any game code
pyglet.resource.path = ['data', 'data/tiles']
pyglet.resource.reindex()
from .scenes import SceneManager, GameScene
window = pyglet.w... | 22.065217 | 99 | 0.729064 | 0 | 0 | 0 | 0 | 195 | 0.192118 | 0 | 0 | 136 | 0.13399 |
8f58b85680a38832bb5ae69272da473e0e9adc35 | 1,993 | py | Python | src/web-scrapers/GetFixtures.py | CharlesFrankum/FF_Team_Selector | f230904faa6713dcec97e086e14eb7d841de9278 | [
"Apache-2.0"
] | null | null | null | src/web-scrapers/GetFixtures.py | CharlesFrankum/FF_Team_Selector | f230904faa6713dcec97e086e14eb7d841de9278 | [
"Apache-2.0"
] | 3 | 2021-03-31T19:24:31.000Z | 2021-12-13T20:07:43.000Z | src/web-scrapers/GetFixtures.py | CharlesFrankum/FF_Team_Selector | f230904faa6713dcec97e086e14eb7d841de9278 | [
"Apache-2.0"
] | 1 | 2019-08-08T06:46:13.000Z | 2019-08-08T06:46:13.000Z | import os
import sys
sys.path.insert(1, f'{os.path.dirname(os.getcwd())}\\models\\')
from datetime import datetime
from time import sleep
import pandas as pd
from Mapper import df_ISO3_mapper
def get_fixture_data(url, driver):
# Get Fixture data for gameweeks 1-38
home_teams = []
away_teams = []
... | 31.634921 | 117 | 0.586553 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 407 | 0.204215 |
8f5b5e7cd66b9e8ad42fd7854dfddea7ba008c1d | 1,097 | py | Python | gicowa/impl/output.py | AurelienLourot/github-commit-watcher | ca4ea1ee8ebaefdf270e4d16735d563f23cf4833 | [
"Unlicense"
] | 22 | 2015-07-05T09:12:41.000Z | 2022-01-12T00:09:38.000Z | gicowa/impl/output.py | AurelienLourot/github-commit-watcher | ca4ea1ee8ebaefdf270e4d16735d563f23cf4833 | [
"Unlicense"
] | 3 | 2015-10-17T15:26:08.000Z | 2016-04-27T06:00:40.000Z | gicowa/impl/output.py | AurelienLourot/github-commit-watcher | ca4ea1ee8ebaefdf270e4d16735d563f23cf4833 | [
"Unlicense"
] | 4 | 2015-10-15T21:03:47.000Z | 2020-09-09T21:54:30.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class Output:
def __init__(self, print_function):
"""
@param print_function: Dependency. Inject a function implementing the same interface as
print().
"""
self.__print_function = print_function
self... | 30.472222 | 96 | 0.587967 | 1,049 | 0.956244 | 0 | 0 | 0 | 0 | 0 | 0 | 475 | 0.432999 |
8f5cb3300698dddd958b6e5a7a02e3cb797a505c | 463 | py | Python | stackstats/settings.py | kapsali29/StackStatsAPI | 5181bd5275129080206350e147ce6b1db18a0b69 | [
"MIT"
] | null | null | null | stackstats/settings.py | kapsali29/StackStatsAPI | 5181bd5275129080206350e147ce6b1db18a0b69 | [
"MIT"
] | null | null | null | stackstats/settings.py | kapsali29/StackStatsAPI | 5181bd5275129080206350e147ce6b1db18a0b69 | [
"MIT"
] | null | null | null | # =================================
# STACKEXCHANGE APP SETTINGS
# =================================
CLIENT_ID = "***"
CLIENT_SECRET = "*****"
KEY = "****"
ACCESS_TOKEN = "*****"
# =================================
# STACKEXCHANGE API SETTINGS
# =================================
STACKEXCHANGE_URL = "api.stackexchange.... | 27.235294 | 44 | 0.490281 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 298 | 0.643629 |
8f5d18b826b9c188006c34d7c3b409c3f3d1575a | 288 | py | Python | Platzi_Python2022/Platzi_/for.py | Kennethguerra3/Python_Ejercicio_2022 | cf1297cf1e1585eba699e32c02993818c3d9ecbf | [
"MIT"
] | 9 | 2021-08-28T01:16:31.000Z | 2022-02-23T15:07:48.000Z | Platzi_Python2022/Platzi_/for.py | Kennethguerra3/Python_Ejercicio_2022 | cf1297cf1e1585eba699e32c02993818c3d9ecbf | [
"MIT"
] | null | null | null | Platzi_Python2022/Platzi_/for.py | Kennethguerra3/Python_Ejercicio_2022 | cf1297cf1e1585eba699e32c02993818c3d9ecbf | [
"MIT"
] | 3 | 2021-07-21T20:03:16.000Z | 2021-07-23T15:04:19.000Z | # print(1)
# print(2)
# print(3)
# print(4)
# print(5)
# contador = 1
# print(contador)
# while contador < 1000:
# contador += 1
# print(contador)
# a = list(range(1000))
# print(a)
# for contador in range(1, 1001):
# print(contador)
for i in range(10):
print(11 * i)
| 13.714286 | 33 | 0.583333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 232 | 0.805556 |
8f60c2158a21875e4f1814a10f74c2d6e01951da | 410 | py | Python | src/leetcode/1997/sol_0.py | kagemeka/competitive-programming | c70fe481bcd518f507b885fc9234691d8ce63171 | [
"MIT"
] | 1 | 2021-07-11T03:20:10.000Z | 2021-07-11T03:20:10.000Z | src/leetcode/1997/sol_0.py | kagemeka/competitive-programming | c70fe481bcd518f507b885fc9234691d8ce63171 | [
"MIT"
] | 39 | 2021-07-10T05:21:09.000Z | 2021-12-15T06:10:12.000Z | src/leetcode/1997/sol_0.py | kagemeka/competitive-programming | c70fe481bcd518f507b885fc9234691d8ce63171 | [
"MIT"
] | null | null | null | import typing
import functools
class Solution:
def firstDayBeenInAllRooms(
self,
nx: typing.List[int],
) -> int:
mod = 10 ** 9 + 7
@functools.lru_cache(maxsize=None)
def dfs(i: int):
if i == 0: return 0
res = 2 + dfs(i - 1)
if nx[i - 1] != i - 1:
res += dfs(i ... | 19.52381 | 42 | 0.495122 | 360 | 0.878049 | 0 | 0 | 204 | 0.497561 | 0 | 0 | 0 | 0 |
8f61f1856f16642c78fb503a5e3b2cbe7612d63a | 1,278 | py | Python | setup.py | EasyPost/ssh_certificate_parser | 836d7df5c676659604a1d76f528aad5d35321803 | [
"0BSD"
] | 3 | 2017-10-09T13:50:16.000Z | 2021-08-16T21:04:16.000Z | setup.py | EasyPost/ssh_certificate_parser | 836d7df5c676659604a1d76f528aad5d35321803 | [
"0BSD"
] | null | null | null | setup.py | EasyPost/ssh_certificate_parser | 836d7df5c676659604a1d76f528aad5d35321803 | [
"0BSD"
] | 2 | 2017-07-20T16:30:44.000Z | 2021-08-09T05:52:53.000Z | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name="ssh_certificate_parser",
version="1.3.3",
author="James Brown",
author_email="jbrown@easypost.com",
url="https://github.com/easypost/ssh_certificate_parser",
license="ISC",
packages=find_packages(exclude=['test... | 33.631579 | 79 | 0.634585 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 782 | 0.611894 |
8f639c82ba6fc3b596994756f2ed202a124ee6d6 | 472 | py | Python | scripts/audio/replace.py | Y4SSIN/video-editor | 879e53ee689e0085140d10f3c7b35a4048ca233b | [
"MIT"
] | 8 | 2019-01-21T13:14:33.000Z | 2020-10-02T14:40:21.000Z | scripts/audio/replace.py | Y4SSIN/video-editor | 879e53ee689e0085140d10f3c7b35a4048ca233b | [
"MIT"
] | 3 | 2021-06-08T21:30:11.000Z | 2022-03-12T00:28:37.000Z | scripts/audio/replace.py | Y4SSIN/video-editor | 879e53ee689e0085140d10f3c7b35a4048ca233b | [
"MIT"
] | 2 | 2020-12-01T16:59:04.000Z | 2021-02-01T03:31:21.000Z | '''
This function gives you the possibility to
replace the video audio.
'''
import os
def replace_audio(video_file_path, audio_file_path):
old_filename = video_file_path.rsplit('\\', 1)[-1]
old_extension = os.path.splitext(video_file_path)[1]
new_filename = old_filename.replace(old_extension, '.mp4')
... | 31.466667 | 152 | 0.722458 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 223 | 0.472458 |
8f64fd79f6f4e0f16023d3c4112423cb2c29995a | 405 | py | Python | sims-g2/pos-adv/code/plot2D.py | ammarhakim/ammar-simjournal | 85b64ddc9556f01a4fab37977864a7d878eac637 | [
"MIT",
"Unlicense"
] | 1 | 2019-12-19T16:21:13.000Z | 2019-12-19T16:21:13.000Z | sims-g2/pos-adv/code/plot2D.py | ammarhakim/ammar-simjournal | 85b64ddc9556f01a4fab37977864a7d878eac637 | [
"MIT",
"Unlicense"
] | null | null | null | sims-g2/pos-adv/code/plot2D.py | ammarhakim/ammar-simjournal | 85b64ddc9556f01a4fab37977864a7d878eac637 | [
"MIT",
"Unlicense"
] | 2 | 2020-01-08T06:23:33.000Z | 2020-01-08T07:06:50.000Z | from pylab import *
X = linspace(-1, 1, 50)
XX, YY = meshgrid(X, X)
def calcf(XX, YY, mu1):
f1 = 0.5
f2 = 1/(2*sqrt(3)*mu1)
f3 = 1/(2*sqrt(3)*mu1)
f4 = 1/(6*mu1**2)
return f1*0.5 + f2*sqrt(3)*XX/2 + f3*sqrt(3)*YY/2 + 3*XX*YY/2
mu1 = 3.0/5.0
f1 = calcf(XX, YY, mu1)
pcolormesh(XX, YY, transpose(f1... | 19.285714 | 65 | 0.540741 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.064198 |
8f651734783eec2d577591561e02a2c193bbe807 | 4,312 | py | Python | cfn_custom_resources_backed_by_step_functions/cfn_custom_resources_backed_by_step_functions_stack.py | bitesizedserverless/cfn-custom-resources-backed-by-step-functions | 45c424a9d6f491700e1729ef88c5fee36beb5e44 | [
"MIT"
] | null | null | null | cfn_custom_resources_backed_by_step_functions/cfn_custom_resources_backed_by_step_functions_stack.py | bitesizedserverless/cfn-custom-resources-backed-by-step-functions | 45c424a9d6f491700e1729ef88c5fee36beb5e44 | [
"MIT"
] | null | null | null | cfn_custom_resources_backed_by_step_functions/cfn_custom_resources_backed_by_step_functions_stack.py | bitesizedserverless/cfn-custom-resources-backed-by-step-functions | 45c424a9d6f491700e1729ef88c5fee36beb5e44 | [
"MIT"
] | null | null | null | """Module for the main CfnCustomResourcesBackedByStepFunctions Stack."""
# Standard library imports
import time
# Related third party imports
# -
# Local application/library specific imports
from aws_cdk import (
core as cdk,
aws_lambda as lambda_,
aws_stepfunctions as sfn,
aws_stepfunctions_tasks as... | 35.344262 | 90 | 0.606679 | 3,975 | 0.921846 | 0 | 0 | 0 | 0 | 0 | 0 | 1,678 | 0.389147 |
8f6591658c09575e183359943f78305804567803 | 590 | py | Python | config/asgi.py | Jairoguo/django-sonsuz | 118698bc3353a67c5af968c34431619d6e1211af | [
"MIT"
] | null | null | null | config/asgi.py | Jairoguo/django-sonsuz | 118698bc3353a67c5af968c34431619d6e1211af | [
"MIT"
] | null | null | null | config/asgi.py | Jairoguo/django-sonsuz | 118698bc3353a67c5af968c34431619d6e1211af | [
"MIT"
] | null | null | null | import os
import sys
import django
from channels.routing import get_default_application
# from django.core.asgi import get_asgi_application
# os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sonsuz.config.settings.local')
# application = get_asgi_application()
# application加入查找路径中
app_path = os.path.abspath(os.path.... | 29.5 | 81 | 0.791525 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 281 | 0.465232 |
8f660202be6af86137fb1acec31901c87e526857 | 1,113 | py | Python | generators/app/templates/config.py | andybp85/generator-flask-api-dotenv | 1da51618c07ee6989000fbcefc26a0df2ae426ea | [
"MIT"
] | 1 | 2016-10-10T02:35:03.000Z | 2016-10-10T02:35:03.000Z | generators/app/templates/config.py | andybp85/generator-flask-api-dotenv | 1da51618c07ee6989000fbcefc26a0df2ae426ea | [
"MIT"
] | null | null | null | generators/app/templates/config.py | andybp85/generator-flask-api-dotenv | 1da51618c07ee6989000fbcefc26a0df2ae426ea | [
"MIT"
] | null | null | null | import os, tempfile
from flask.ext.dotenv import DotEnv
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
DEBUG = False
TESTING = False
SQLALCHEMY_TRACK_MODIFICATIONS = False
@classmethod
def init_app(self, app):
env = DotEnv()
env.init_app(app, verbose_... | 21.823529 | 89 | 0.634322 | 353 | 0.317161 | 0 | 0 | 109 | 0.097934 | 0 | 0 | 163 | 0.146451 |
8f6693ddb85d3bb717698451379c61708255fc9d | 9,726 | py | Python | Pokemon/pokemon_item.py | V-FEXrt/Pokemon-Spoof-Plus | d397d680742496b7f64b401511da7eb57f63c973 | [
"MIT"
] | 2 | 2017-05-04T20:24:19.000Z | 2017-05-04T20:58:07.000Z | Pokemon/pokemon_item.py | V-FEXrt/Pokemon-Spoof-Plus | d397d680742496b7f64b401511da7eb57f63c973 | [
"MIT"
] | null | null | null | Pokemon/pokemon_item.py | V-FEXrt/Pokemon-Spoof-Plus | d397d680742496b7f64b401511da7eb57f63c973 | [
"MIT"
] | null | null | null | import random
class Item():
def __init__(self, name, hex):
self.name = name
self.hex = hex
def __str__(self):
return self.name
@staticmethod
def fromBytes(hex):
return Item.reverse[hex]
@staticmethod
def buildReverse():
reverse = {}
Item.membe... | 36.980989 | 118 | 0.699054 | 643 | 0.066111 | 0 | 0 | 479 | 0.049249 | 0 | 0 | 2,344 | 0.241003 |
8f66a163bf1e5878e2474fa634b0488a8aa1b816 | 3,589 | py | Python | train.py | Markus-Goetz/block-prediction | 3f89d17d449f023d60fae5ec6bd712cb6cc8cb50 | [
"MIT"
] | 5 | 2018-11-28T22:18:29.000Z | 2021-08-16T22:09:35.000Z | train.py | Markus-Goetz/block-prediction | 3f89d17d449f023d60fae5ec6bd712cb6cc8cb50 | [
"MIT"
] | null | null | null | train.py | Markus-Goetz/block-prediction | 3f89d17d449f023d60fae5ec6bd712cb6cc8cb50 | [
"MIT"
] | 5 | 2018-12-03T08:40:46.000Z | 2022-02-21T14:21:52.000Z | #!/usr/bin/env python
import argparse
import pickle
import h5py
from keras import optimizers
from keras.callbacks import ModelCheckpoint
from keras.layers import Activation, add, BatchNormalization, Conv2D, Dense, Dropout, Flatten, Input, ZeroPadding2D
from keras.models import load_model, Model
from keras.regularizers... | 31.482456 | 148 | 0.679019 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 545 | 0.151853 |
8f68e760e629e6c9289a968b529c8bbdbfa66448 | 1,281 | py | Python | configs/deepim/lmPbrSO/FlowNet512_1.5AugCosyAAEGray_Flat_lmPbr_SO/FlowNet512_1.5AugCosyAAEGray_Flat_Pbr_02_benchvise.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 33 | 2021-12-15T07:11:47.000Z | 2022-03-29T08:58:32.000Z | configs/deepim/lmPbrSO/FlowNet512_1.5AugCosyAAEGray_Flat_lmPbr_SO/FlowNet512_1.5AugCosyAAEGray_Flat_Pbr_02_benchvise.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 3 | 2021-12-15T11:39:54.000Z | 2022-03-29T07:24:23.000Z | configs/deepim/lmPbrSO/FlowNet512_1.5AugCosyAAEGray_Flat_lmPbr_SO/FlowNet512_1.5AugCosyAAEGray_Flat_Pbr_02_benchvise.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | null | null | null | _base_ = ["./FlowNet512_1.5AugCosyAAEGray_Flat_Pbr_01_ape.py"]
OUTPUT_DIR = "output/deepim/lmPbrSO/FlowNet512_1.5AugCosyAAEGray_Flat_lmPbr_SO/benchvise"
DATASETS = dict(TRAIN=("lm_pbr_benchvise_train",), TEST=("lm_real_benchvise_test",))
# bbnc7
# objects benchvise Avg(1)
# ad_2 9.12 9.12
# ad_5 44.... | 27.255319 | 89 | 0.540984 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,175 | 0.917252 |
8f6a4ac0f3616dd43ef5ba0483ceab37ae337f14 | 2,489 | py | Python | DataCrawl/crawler/lib/browser.py | Haiduongcable/BigData-Computing | 917210a6254b5e656a98af9056a0c975d2dfef26 | [
"Apache-2.0"
] | null | null | null | DataCrawl/crawler/lib/browser.py | Haiduongcable/BigData-Computing | 917210a6254b5e656a98af9056a0c975d2dfef26 | [
"Apache-2.0"
] | null | null | null | DataCrawl/crawler/lib/browser.py | Haiduongcable/BigData-Computing | 917210a6254b5e656a98af9056a0c975d2dfef26 | [
"Apache-2.0"
] | null | null | null | import sys
import os
from pathlib import Path
import json
import pickle
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import selenium.webdriver.support.ui as ui
class Browser:
def __init__(self):
chrome_options = Options()
chrome_options.add_argument(... | 34.569444 | 157 | 0.655283 | 2,288 | 0.919245 | 0 | 0 | 0 | 0 | 0 | 0 | 233 | 0.093612 |
8f6a5d9899e0976ac95b7796e1458b1bd050494d | 3,001 | py | Python | selfdrive/car/subaru/values.py | Richardrgc74/openpilot | 70b15580966a6c7f8d25eca51c912c37904cc461 | [
"MIT"
] | null | null | null | selfdrive/car/subaru/values.py | Richardrgc74/openpilot | 70b15580966a6c7f8d25eca51c912c37904cc461 | [
"MIT"
] | null | null | null | selfdrive/car/subaru/values.py | Richardrgc74/openpilot | 70b15580966a6c7f8d25eca51c912c37904cc461 | [
"MIT"
] | null | null | null | # flake8: noqa
from selfdrive.car import dbc_dict
from cereal import car
Ecu = car.CarParams.Ecu
class CarControllerParams:
STEER_MAX = 2047 # max_steer 4095
STEER_STEP = 2 # how often we update the steer cmd
STEER_DELTA_UP = 50 # torque increase per refresh, 0.8s to max
... | 44.132353 | 424 | 0.71043 | 1,570 | 0.523159 | 0 | 0 | 0 | 0 | 0 | 0 | 1,089 | 0.362879 |
8f6b4fb8b5826570c194c749e3b2f1b2eb2295e0 | 391 | py | Python | Fletnix/apps/profiles/migrations/0002_profiles_user_name.py | FuryAndRage/Fletnix | 99cc015c799eda24d605ecb9706f809fa6a05392 | [
"MIT"
] | null | null | null | Fletnix/apps/profiles/migrations/0002_profiles_user_name.py | FuryAndRage/Fletnix | 99cc015c799eda24d605ecb9706f809fa6a05392 | [
"MIT"
] | 1 | 2021-02-21T11:08:36.000Z | 2021-02-24T20:42:01.000Z | Fletnix/apps/profiles/migrations/0002_profiles_user_name.py | FuryAndRage/Fletnix | 99cc015c799eda24d605ecb9706f809fa6a05392 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2021-02-14 10:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('profiles', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='profiles',
name='user_name',
... | 20.578947 | 62 | 0.595908 | 298 | 0.762148 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.235294 |
8f6cda2b221292f939019bccf17b0c0c955ce9d9 | 492 | py | Python | options/test_options.py | salfamusic/encoder4editing | 8263cb9d42cd4811f4ab2768dfcc9085259fc251 | [
"MIT"
] | null | null | null | options/test_options.py | salfamusic/encoder4editing | 8263cb9d42cd4811f4ab2768dfcc9085259fc251 | [
"MIT"
] | null | null | null | options/test_options.py | salfamusic/encoder4editing | 8263cb9d42cd4811f4ab2768dfcc9085259fc251 | [
"MIT"
] | null | null | null | from .base_options import BaseOptions
class TestOptions(BaseOptions):
def initialize(self, parser):
BaseOptions.initialize(self, parser)
parser.set_defaults(phase='test')
parser.add_argument('--only_for_test', type=str, default='...')
parser.add_argument('--network_pkl', type=str,... | 41 | 109 | 0.705285 | 452 | 0.918699 | 0 | 0 | 0 | 0 | 0 | 0 | 134 | 0.272358 |
8f6d9715bc92a8e85ce12c2c520af4e5db0b1a7c | 3,071 | py | Python | prepomm/tools.py | dwhswenson/prepomm | 1109c4ae03f13f2c111e1d243243f45d0e28ceb2 | [
"MIT"
] | null | null | null | prepomm/tools.py | dwhswenson/prepomm | 1109c4ae03f13f2c111e1d243243f45d0e28ceb2 | [
"MIT"
] | null | null | null | prepomm/tools.py | dwhswenson/prepomm | 1109c4ae03f13f2c111e1d243243f45d0e28ceb2 | [
"MIT"
] | null | null | null | """
Tools used elsewhere in this package
"""
import os
import collections
import mdtraj as md
from simtk import openmm as mm
from simtk.openmm import app
from simtk import unit as u
try:
import openmmtools
except ImportError:
HAS_OPENMMTOOLS = False
else:
HAS_OPENMMTOOLS = True
def _traj_from_file_or_tra... | 32.326316 | 77 | 0.676978 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 460 | 0.149788 |
8f6e45249501a9eeced6ad9317380712aa8a2e41 | 1,746 | py | Python | ansible/module_utils/facts/hardware/base.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 1 | 2022-01-25T22:52:58.000Z | 2022-01-25T22:52:58.000Z | ansible/module_utils/facts/hardware/base.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | ansible/module_utils/facts/hardware/base.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | # This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that ... | 32.333333 | 72 | 0.683276 | 931 | 0.533219 | 0 | 0 | 0 | 0 | 0 | 0 | 858 | 0.491409 |
8f71414f26283f636acf131540cc80063b73c4d4 | 691 | py | Python | components/amp-utility/python/Snd.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 4,538 | 2017-10-20T05:19:03.000Z | 2022-03-30T02:29:30.000Z | components/amp-utility/python/Snd.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 1,088 | 2017-10-21T07:57:22.000Z | 2022-03-31T08:15:49.000Z | components/amp-utility/python/Snd.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | 1,860 | 2017-10-20T05:22:35.000Z | 2022-03-27T10:54:14.000Z | # * coding: UTF8 *
"""
这里所有的的接口仅需要调用一次即可,具体接口和参数如下所示。
=================================================================================================
"""
def install_codec_driver():
"""
声卡安装,仅需要调用一次。
:param 空:
:returns: 0: 成功,其他: 失败
:raises OSError: EINVAL
"""
pass
def uninstall_codec_driver... | 14.102041 | 97 | 0.489146 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 796 | 0.851337 |
8f72691d634c7185886e3950715ddd4866514065 | 919 | py | Python | 2018/day3/claim.py | scrubskip/adventofcode2018 | 8149908d1239759597fda575432cf3ec99019dc0 | [
"Apache-2.0"
] | null | null | null | 2018/day3/claim.py | scrubskip/adventofcode2018 | 8149908d1239759597fda575432cf3ec99019dc0 | [
"Apache-2.0"
] | null | null | null | 2018/day3/claim.py | scrubskip/adventofcode2018 | 8149908d1239759597fda575432cf3ec99019dc0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
from parse import compile
def main():
file = open("day3input.txt", "r")
fabric = [[0]*1000 for _ in range(1000)]
for claim_str in file:
claim = Claim(claim_str)
#print claim.data
claim_fabric(fabric, claim)
contested = 0
for x in range(1000... | 25.527778 | 80 | 0.568009 | 211 | 0.229597 | 0 | 0 | 0 | 0 | 0 | 0 | 175 | 0.190424 |
8f72fbd93f21f83f4ef3662e0b27d9a6cf567288 | 735 | py | Python | lognotif/alertmgmt/migrations/0009_newassignment.py | subhamoykarmakar224/Django-LiveLogNotifier | 15f36048f3eb8d43d9b58b04c660bcb7fa005451 | [
"MIT"
] | null | null | null | lognotif/alertmgmt/migrations/0009_newassignment.py | subhamoykarmakar224/Django-LiveLogNotifier | 15f36048f3eb8d43d9b58b04c660bcb7fa005451 | [
"MIT"
] | null | null | null | lognotif/alertmgmt/migrations/0009_newassignment.py | subhamoykarmakar224/Django-LiveLogNotifier | 15f36048f3eb8d43d9b58b04c660bcb7fa005451 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.12 on 2020-05-06 12:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('alertmgmt', '0008_logfilterfields_log_src_url'),
]
operations = [
migrations.CreateModel(
name='NewAssignment',
fie... | 30.625 | 114 | 0.591837 | 641 | 0.872109 | 0 | 0 | 0 | 0 | 0 | 0 | 164 | 0.223129 |
8f745bc0d930118b19141f5dfac7b6915950c7e9 | 1,772 | py | Python | f5/bigiq/cm/device/licensing/pool/initial_activation.py | nghia-tran/f5-common-python | acb23a6e5830a119b460c19a578654113419f5c3 | [
"Apache-2.0"
] | 272 | 2016-02-23T06:05:44.000Z | 2022-02-20T02:09:32.000Z | f5/bigiq/cm/device/licensing/pool/initial_activation.py | nghia-tran/f5-common-python | acb23a6e5830a119b460c19a578654113419f5c3 | [
"Apache-2.0"
] | 1,103 | 2016-02-11T17:48:03.000Z | 2022-02-15T17:13:37.000Z | f5/bigiq/cm/device/licensing/pool/initial_activation.py | nghia-tran/f5-common-python | acb23a6e5830a119b460c19a578654113419f5c3 | [
"Apache-2.0"
] | 167 | 2016-02-11T17:48:21.000Z | 2022-01-17T20:13:05.000Z | # coding=utf-8
#
# Copyright 2017 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 36.916667 | 118 | 0.738149 | 900 | 0.507614 | 0 | 0 | 0 | 0 | 0 | 0 | 1,149 | 0.648054 |
8f758e5cc6da0001620edeb8cb1d368674c76e41 | 373 | py | Python | run.py | myncow/compositing | 7b79011d39f42594144581143ee8e7fd3a6669a3 | [
"MIT"
] | null | null | null | run.py | myncow/compositing | 7b79011d39f42594144581143ee8e7fd3a6669a3 | [
"MIT"
] | null | null | null | run.py | myncow/compositing | 7b79011d39f42594144581143ee8e7fd3a6669a3 | [
"MIT"
] | 2 | 2021-11-05T17:06:12.000Z | 2021-11-17T04:15:29.000Z | import argparse
from generator import logic
parser = argparse.ArgumentParser()
parser.add_argument('--mode', type=str, required=True)
args = parser.parse_args()
logic_main=logic.composite_probabilistically
if args.mode == "permute":
pass
elif args.mode == "logic":
logic_main()
else:
print("Specify a fla... | 19.631579 | 74 | 0.734584 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 0.233244 |
8f783f3db1a5b9213fb73a1f97a44919aad8d34c | 175 | py | Python | RecommenderSystem/Book.py | RowanOmar/Recommender-System | 60c8299610f4bc5ccc7254b1e05ed6228947118c | [
"MIT"
] | null | null | null | RecommenderSystem/Book.py | RowanOmar/Recommender-System | 60c8299610f4bc5ccc7254b1e05ed6228947118c | [
"MIT"
] | null | null | null | RecommenderSystem/Book.py | RowanOmar/Recommender-System | 60c8299610f4bc5ccc7254b1e05ed6228947118c | [
"MIT"
] | null | null | null | class Book:
Title = ""
Rate = 0
def __init__(self, title, rate):
self.Title = title
self.Rate = rate
# print ("I am new ", self.Title)
| 14.583333 | 41 | 0.508571 | 172 | 0.982857 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0.2 |
8f787cfd457d65b0d4fa5d03424c02511129986f | 109 | py | Python | fluxio_parser/__init__.py | NarrativeScience/fluxio-parser | bddd6b86a550ec87a58a2d854978d559e29cf3f4 | [
"BSD-3-Clause"
] | 1 | 2021-06-09T20:22:38.000Z | 2021-06-09T20:22:38.000Z | fluxio_parser/__init__.py | NarrativeScience/fluxio-parser | bddd6b86a550ec87a58a2d854978d559e29cf3f4 | [
"BSD-3-Clause"
] | null | null | null | fluxio_parser/__init__.py | NarrativeScience/fluxio-parser | bddd6b86a550ec87a58a2d854978d559e29cf3f4 | [
"BSD-3-Clause"
] | 1 | 2021-06-09T20:22:39.000Z | 2021-06-09T20:22:39.000Z | """Main exports"""
from fluxio_parser.parser import parse_project_tree # noqa: F401
__version__ = "0.3.1"
| 18.166667 | 65 | 0.733945 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.33945 |
8f78b69e4772845ec293a193b3ef41aeb3b1c4fc | 1,491 | py | Python | prophet_gcp/utils.py | SpikeLab-CL/paralell_prophet | c04b069ae27eb8645dd10e0cf9992415e585ba62 | [
"WTFPL"
] | 7 | 2018-10-18T18:06:27.000Z | 2021-11-02T19:53:31.000Z | prophet_gcp/utils.py | SpikeLab-CL/paralell_prophet | c04b069ae27eb8645dd10e0cf9992415e585ba62 | [
"WTFPL"
] | null | null | null | prophet_gcp/utils.py | SpikeLab-CL/paralell_prophet | c04b069ae27eb8645dd10e0cf9992415e585ba62 | [
"WTFPL"
] | 5 | 2020-01-23T22:03:00.000Z | 2022-02-17T08:28:51.000Z | import dask.dataframe as dd
import pandas as pd
def load_parse_file(file_path, date_column="date"):
"""Loads a file into Pandas dataframe, and parse the datetime columns
Arguments:
file_path: string path to the input file.
Returns:
Dataframe: dask.dataframe from the file
... | 32.413043 | 77 | 0.646546 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 700 | 0.469484 |
8f79be8eb8ccee8775fd0b6dbe06883ce3e72270 | 4,756 | py | Python | eva-accession-release-automation/run_release_in_embassy/analyze_vcf_validation_results.py | sundarvenkata-EBI/eva-accession | b26f0b5e5acaafe63d0755bad81837b9a5976237 | [
"Apache-2.0"
] | 3 | 2018-02-28T17:14:53.000Z | 2020-03-17T17:19:45.000Z | eva-accession-release-automation/run_release_in_embassy/analyze_vcf_validation_results.py | sundarvenkata-EBI/eva-accession | b26f0b5e5acaafe63d0755bad81837b9a5976237 | [
"Apache-2.0"
] | 52 | 2018-03-29T15:44:23.000Z | 2022-02-16T00:54:28.000Z | eva-accession-release-automation/run_release_in_embassy/analyze_vcf_validation_results.py | sundarvenkata-EBI/eva-accession | b26f0b5e5acaafe63d0755bad81837b9a5976237 | [
"Apache-2.0"
] | 15 | 2018-03-02T13:34:19.000Z | 2021-06-22T15:54:59.000Z | #!/usr/bin/env python3
# Copyright 2019 EMBL - European Bioinformatics Institute
#
# 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
#
# Unles... | 52.263736 | 118 | 0.660849 | 0 | 0 | 0 | 0 | 259 | 0.054458 | 0 | 0 | 1,341 | 0.28196 |
8f7aae12183d525e6d6a2892950c3be3ddc8cab8 | 4,115 | py | Python | include/vortex.py | wheelerMT/two-component_BEC | 3c7ddee98d2dd49b07705cb343536f8a68006d7f | [
"MIT"
] | 1 | 2020-12-16T00:05:38.000Z | 2020-12-16T00:05:38.000Z | include/vortex.py | wheelerMT/twoComponent-BEC | 3c7ddee98d2dd49b07705cb343536f8a68006d7f | [
"MIT"
] | null | null | null | include/vortex.py | wheelerMT/twoComponent-BEC | 3c7ddee98d2dd49b07705cb343536f8a68006d7f | [
"MIT"
] | null | null | null | import numpy as np
import uuid
class Vortex:
""" Vortex class to categorize vortices within a BEC."""
def __init__(self, position, winding, component, v_type=None):
self.x, self.y = position
self.winding = winding
self.v_type = v_type # String: type of vortex (i.e. SQV or HQV)
... | 39.567308 | 106 | 0.616525 | 4,078 | 0.991009 | 0 | 0 | 0 | 0 | 0 | 0 | 1,052 | 0.25565 |
8f7b47f31150135672ffa4570db36af3997c8bdf | 47 | py | Python | biker_vasek.py | nikitadragaa/--- | 61cfdd2c078e221e2412a1e776ae8e9afb840562 | [
"MIT"
] | 1 | 2020-11-26T19:12:09.000Z | 2020-11-26T19:12:09.000Z | biker_vasek.py | nikitadragaa/informatics_first_module | 61cfdd2c078e221e2412a1e776ae8e9afb840562 | [
"MIT"
] | null | null | null | biker_vasek.py | nikitadragaa/informatics_first_module | 61cfdd2c078e221e2412a1e776ae8e9afb840562 | [
"MIT"
] | null | null | null | a=int(input())
b=int(input())
print((a*b)%109)
| 11.75 | 16 | 0.595745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8f7c0232a0c1a08c2f41b65eb62c5d3ff5bd11ae | 3,562 | py | Python | tests/test_subnet.py | Diapolo10/iplib | 001479b2095fd8008f9db726b1bd9c0b0ee16eac | [
"MIT"
] | 6 | 2021-04-18T19:46:40.000Z | 2021-06-28T22:03:25.000Z | tests/test_subnet.py | Diapolo10/iplib | 001479b2095fd8008f9db726b1bd9c0b0ee16eac | [
"MIT"
] | 10 | 2021-05-01T19:46:35.000Z | 2021-07-04T08:39:35.000Z | tests/test_subnet.py | Diapolo10/iplib | 001479b2095fd8008f9db726b1bd9c0b0ee16eac | [
"MIT"
] | 4 | 2021-05-01T22:04:24.000Z | 2021-06-13T14:29:20.000Z | """Unit tests for iplib3.subnet"""
import pytest
from iplib3.subnet import ( # pylint: disable=import-error,no-name-in-module
SubnetMask,
PureSubnetMask,
)
from iplib3.constants import ( # pylint: disable=import-error,no-name-in-module
IPV4_MIN_SUBNET_VALUE,
IPV4_MAX_SUBNET_VALUE,
IPV6_MAX_SUBNE... | 29.683333 | 86 | 0.714486 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 849 | 0.238349 |
8f7e37d4906c116b6d7ca399d7e8dabb52aaae91 | 2,570 | py | Python | examples/linear_regression_with_database.py | facebookresearch/svinfer | 14edce1af6c91e622b8691f5d78a490a8585e7b5 | [
"Apache-2.0"
] | 14 | 2020-05-29T18:45:16.000Z | 2022-03-21T03:30:27.000Z | examples/linear_regression_with_database.py | facebookresearch/svinfer | 14edce1af6c91e622b8691f5d78a490a8585e7b5 | [
"Apache-2.0"
] | null | null | null | examples/linear_regression_with_database.py | facebookresearch/svinfer | 14edce1af6c91e622b8691f5d78a490a8585e7b5 | [
"Apache-2.0"
] | 1 | 2020-07-30T17:01:20.000Z | 2020-07-30T17:01:20.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# 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 b... | 39.538462 | 85 | 0.716342 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,819 | 0.707782 |
8f808924f32b0bba54dcbd5d9c58b33439b7f83b | 2,705 | py | Python | sightpy/backgrounds/skybox.py | ulises1229/Python-Raytracer | ad89b9dabda1c3eeb68af2d3578c3f38dee9f5b9 | [
"MIT"
] | 326 | 2020-08-14T07:29:40.000Z | 2022-03-30T11:13:32.000Z | sightpy/backgrounds/skybox.py | ulises1229/Python-Raytracer | ad89b9dabda1c3eeb68af2d3578c3f38dee9f5b9 | [
"MIT"
] | 7 | 2020-08-14T21:57:56.000Z | 2021-06-09T00:53:04.000Z | sightpy/backgrounds/skybox.py | ulises1229/Python-Raytracer | ad89b9dabda1c3eeb68af2d3578c3f38dee9f5b9 | [
"MIT"
] | 37 | 2020-08-14T17:37:56.000Z | 2022-03-30T09:37:22.000Z | from ..geometry import Cuboid_Collider, Primitive
from ..materials import Material
from ..utils.vector3 import vec3
from ..utils.constants import SKYBOX_DISTANCE
from ..utils.image_functions import load_image, load_image_as_linear_sRGB
from .util.blur_background import blur_skybox
class SkyBox(Primitive):
... | 46.637931 | 209 | 0.598521 | 2,405 | 0.889094 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.031054 |
8f8117fc5388acb6f8832bf7311ec1881c023df3 | 81 | py | Python | pks/apps.py | xingyifei2016/clusterCAD | fb139edc90e3b963ac6bfc9f6890f0a4e4f356d6 | [
"BSD-3-Clause-LBNL"
] | 7 | 2018-11-06T00:04:47.000Z | 2021-08-05T04:37:12.000Z | pks/apps.py | xingyifei2016/clusterCAD | fb139edc90e3b963ac6bfc9f6890f0a4e4f356d6 | [
"BSD-3-Clause-LBNL"
] | 26 | 2017-08-11T21:51:46.000Z | 2022-03-11T23:18:25.000Z | pks/apps.py | xingyifei2016/clusterCAD | fb139edc90e3b963ac6bfc9f6890f0a4e4f356d6 | [
"BSD-3-Clause-LBNL"
] | 7 | 2017-08-16T17:28:40.000Z | 2022-03-02T00:07:00.000Z | from django.apps import AppConfig
class PksConfig(AppConfig):
name = 'pks'
| 13.5 | 33 | 0.728395 | 44 | 0.54321 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.061728 |
56a8d54ad528be2aaf7182e51f33608226c5e2df | 45,398 | py | Python | CGATPipelines/pipeline_exome_cancer.py | cdrakesmith/CGATPipelines | 3c94ae4f9d87d51108255dc405c4b95af7c8b694 | [
"MIT"
] | null | null | null | CGATPipelines/pipeline_exome_cancer.py | cdrakesmith/CGATPipelines | 3c94ae4f9d87d51108255dc405c4b95af7c8b694 | [
"MIT"
] | null | null | null | CGATPipelines/pipeline_exome_cancer.py | cdrakesmith/CGATPipelines | 3c94ae4f9d87d51108255dc405c4b95af7c8b694 | [
"MIT"
] | null | null | null | """
======================
Exome Cancer pipeline
======================
.. todo::
*Final filtering if SNPs/INDELs is currently done in the
reporting. This should be handled by the pipeline. The SNP output
would also then be passed to the mutational signature task
*Document
*fully make phone home/key o... | 35.973059 | 81 | 0.552998 | 0 | 0 | 0 | 0 | 32,231 | 0.709965 | 0 | 0 | 27,523 | 0.60626 |
56aceb9473dca4ac2d68368a3618cbfcb8694e5a | 7,581 | py | Python | tests/snuba/api/endpoints/test_project_event_details.py | kinghuang/sentry | 5c22673994a62f54a782d1c595852986ccc51ae9 | [
"BSD-3-Clause"
] | 1 | 2019-10-17T17:46:16.000Z | 2019-10-17T17:46:16.000Z | tests/snuba/api/endpoints/test_project_event_details.py | kinghuang/sentry | 5c22673994a62f54a782d1c595852986ccc51ae9 | [
"BSD-3-Clause"
] | null | null | null | tests/snuba/api/endpoints/test_project_event_details.py | kinghuang/sentry | 5c22673994a62f54a782d1c595852986ccc51ae9 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import six
from django.core.urlresolvers import reverse
from sentry.testutils import APITestCase, SnubaTestCase
from sentry.testutils.helpers.datetime import before_now, iso_format
class ProjectEventDetailsTest(APITestCase, SnubaTestCase):
def setUp(self):
super(Pr... | 39.07732 | 100 | 0.590687 | 7,353 | 0.969925 | 0 | 0 | 0 | 0 | 0 | 0 | 1,346 | 0.177549 |
56ad3f65e7e326b6c8e24ade681a2bdad38713f8 | 61 | py | Python | je_auto_control/windows/screen/__init__.py | JE-Chen/AutoControl | c2d78f0b428d27aef2ea27f210d11c6dc1144221 | [
"MIT"
] | 1 | 2022-03-27T14:59:45.000Z | 2022-03-27T14:59:45.000Z | je_auto_control/windows/screen/__init__.py | JE-Chen/AutoControl | c2d78f0b428d27aef2ea27f210d11c6dc1144221 | [
"MIT"
] | 2 | 2021-11-19T13:45:37.000Z | 2021-12-03T12:25:28.000Z | je_auto_control/windows/screen/__init__.py | JE-Chen/AutoControl | c2d78f0b428d27aef2ea27f210d11c6dc1144221 | [
"MIT"
] | null | null | null | from je_auto_control.windows.screen.win32_screen import size
| 30.5 | 60 | 0.885246 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
56af02a969b9dab95dd47f1d92c922008e2433c4 | 435 | py | Python | guestbook/models.py | hcpthanks/vCard | cc9a301f413961c398c355426013c0cc05fbb1b7 | [
"MIT"
] | null | null | null | guestbook/models.py | hcpthanks/vCard | cc9a301f413961c398c355426013c0cc05fbb1b7 | [
"MIT"
] | null | null | null | guestbook/models.py | hcpthanks/vCard | cc9a301f413961c398c355426013c0cc05fbb1b7 | [
"MIT"
] | null | null | null | import reprlib
from django.db import models
class Message(models.Model):
"""留言消息类
"""
name = models.CharField('用户名', max_length=20)
email = models.EmailField('邮箱', max_length=200)
message = models.TextField('留言')
active = models.BooleanField('有效', default=True)
posted = models.DateTimeField... | 27.1875 | 60 | 0.671264 | 420 | 0.89172 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.248408 |
56b027366621352ff84a9bd75357a7f9c2bdede8 | 293 | py | Python | rationalratio/rationalratio.py | omarchehab98/open.kattis.com-problems | 0523e2e641151dad719ef05cc9811a8ef5c6a278 | [
"MIT"
] | 1 | 2020-10-04T22:41:04.000Z | 2020-10-04T22:41:04.000Z | rationalratio/rationalratio.py | omarchehab98/open.kattis.com-problems | 0523e2e641151dad719ef05cc9811a8ef5c6a278 | [
"MIT"
] | null | null | null | rationalratio/rationalratio.py | omarchehab98/open.kattis.com-problems | 0523e2e641151dad719ef05cc9811a8ef5c6a278 | [
"MIT"
] | null | null | null | from fractions import Fraction
x, d = input().split(' ')
d = int(d)
k = len(x) - x.index('.') - d - 1
a, b = x[0:-d].replace('.', ''), 10 ** k
ab = Fraction(int(a), b)
rd = Fraction(int(x[-d:]), (10 ** d - 1) * b)
result = ab + rd
print(str(result.numerator) + '/' + str(result.denominator))
| 26.636364 | 60 | 0.546075 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.047782 |
56b18a5e976b97460394eeab951ee9f6df83fd21 | 3,636 | py | Python | examples/doq_server.py | SouvikGhosh05/aioquic | da566b8ee616b9c83d51f0f5ad0521393119f40f | [
"BSD-3-Clause"
] | null | null | null | examples/doq_server.py | SouvikGhosh05/aioquic | da566b8ee616b9c83d51f0f5ad0521393119f40f | [
"BSD-3-Clause"
] | null | null | null | examples/doq_server.py | SouvikGhosh05/aioquic | da566b8ee616b9c83d51f0f5ad0521393119f40f | [
"BSD-3-Clause"
] | null | null | null | import argparse
import asyncio
import logging
import struct
from typing import Dict, Optional
from dnslib.dns import DNSRecord
from aioquic.asyncio import QuicConnectionProtocol, serve
from aioquic.quic.configuration import QuicConfiguration
from aioquic.quic.events import QuicEvent, StreamDataReceived
from aioquic.q... | 27.338346 | 81 | 0.622937 | 948 | 0.260726 | 0 | 0 | 0 | 0 | 0 | 0 | 719 | 0.197745 |
56b2d0fc3f97f8a7563d2f632e5448b894ac8ef4 | 9,483 | py | Python | extended_templates/backends/pdf.py | knivets/djaodjin-extended-templates | 71bc725b3900fc45968e5a625d72dc0931561856 | [
"BSD-2-Clause"
] | null | null | null | extended_templates/backends/pdf.py | knivets/djaodjin-extended-templates | 71bc725b3900fc45968e5a625d72dc0931561856 | [
"BSD-2-Clause"
] | null | null | null | extended_templates/backends/pdf.py | knivets/djaodjin-extended-templates | 71bc725b3900fc45968e5a625d72dc0931561856 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2018, Djaodjin Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and t... | 39.348548 | 80 | 0.61953 | 7,406 | 0.780976 | 0 | 0 | 2,193 | 0.231256 | 0 | 0 | 2,929 | 0.308869 |
56b2fc9930c872a6e85f2a12f4ba1b8f96b7e270 | 1,484 | py | Python | python/practices/docset.py | gloomyline/ML | 3764ac7dd64e3a92de1b34d6a92a809e02f7c038 | [
"MIT"
] | null | null | null | python/practices/docset.py | gloomyline/ML | 3764ac7dd64e3a92de1b34d6a92a809e02f7c038 | [
"MIT"
] | null | null | null | python/practices/docset.py | gloomyline/ML | 3764ac7dd64e3a92de1b34d6a92a809e02f7c038 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Author: Administrator
# @Date: 2018-05-17 11:09:22
# @Last Modified by: Administrator
# @Last Modified time: 2018-05-17 11:23:24
class Dict(dict):
'''
Simple dict but also support access as x.y style.
>>> d1 = Dict()
>>> d1['x'] = 100
>>> d1.x
100
>>> d1.y = 200
>>> d1['y... | 21.823529 | 84 | 0.584232 | 708 | 0.477089 | 0 | 0 | 0 | 0 | 0 | 0 | 1,047 | 0.705526 |
56b37ef771a3d6c20dd29b8a7bb0b23c17d962e6 | 185 | py | Python | OpenCV/task_1.2.py | Riyaagrawal2001/Autumn-of-Automation | 5e15d1a9943e41ac548fc0862db2eddea1752c02 | [
"MIT"
] | null | null | null | OpenCV/task_1.2.py | Riyaagrawal2001/Autumn-of-Automation | 5e15d1a9943e41ac548fc0862db2eddea1752c02 | [
"MIT"
] | null | null | null | OpenCV/task_1.2.py | Riyaagrawal2001/Autumn-of-Automation | 5e15d1a9943e41ac548fc0862db2eddea1752c02 | [
"MIT"
] | null | null | null | import cv2
cap = cv2.VideoCapture(0)
while(True):
ret,frame = cap.read()
cv2.imshow('frame',frame)
if cv2.waitKey(1)&0xFF==ord('q'):
break
cap.release()
cv2.destroyAllWindows() | 14.230769 | 34 | 0.686486 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.054054 |
56b5106f514ff350c7e6209c3bde64f4fb351f79 | 231 | py | Python | genno.py | divine-coder/CODECHEF-PYTHON | a1e34d6f9f75cf7b9497f1ef2f937cb4f64f1543 | [
"MIT"
] | null | null | null | genno.py | divine-coder/CODECHEF-PYTHON | a1e34d6f9f75cf7b9497f1ef2f937cb4f64f1543 | [
"MIT"
] | 4 | 2020-10-04T07:49:30.000Z | 2021-10-02T05:24:40.000Z | genno.py | divine-coder/CODECHEF-PYTHON | a1e34d6f9f75cf7b9497f1ef2f937cb4f64f1543 | [
"MIT"
] | 7 | 2020-10-04T07:46:55.000Z | 2021-11-05T14:30:00.000Z | def gen(a,j):
if j>=len(a):
print a
return
i=j
while i<9:
a[j]=i+1
gen(a,j+1)
j-=1
def main():
a=['0','0']
#print len(a)
gen(a,0)
if __name__=='__main__':
main();
| 14.4375 | 24 | 0.406926 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.125541 |
56b748953a338c9c796774f938f8407392ae2efe | 1,498 | py | Python | docs/latex/src/plots/FOvsAsy2.py | vbertone/apfelxx | 7a37b982083b2a1cded2f5d6ab3aae267877f3c4 | [
"MIT"
] | 5 | 2019-10-07T14:01:59.000Z | 2021-04-13T19:54:47.000Z | docs/latex/src/plots/FOvsAsy2.py | vbertone/apfelxx | 7a37b982083b2a1cded2f5d6ab3aae267877f3c4 | [
"MIT"
] | 3 | 2017-05-30T10:43:40.000Z | 2018-09-11T14:29:53.000Z | docs/latex/src/plots/FOvsAsy2.py | vbertone/apfelxx | 7a37b982083b2a1cded2f5d6ab3aae267877f3c4 | [
"MIT"
] | 4 | 2019-06-23T08:42:00.000Z | 2022-03-18T15:25:46.000Z | import ruamel.yaml as yaml
import numpy as np
import matplotlib.pyplot as plt
import MatplotlibSettings
from scipy.interpolate import make_interp_spline, BSpline
# Loada data
data = np.loadtxt("FOvsAsy2.dat")
f, (ax1, ax2) = plt.subplots(2, 1, sharex = "all", gridspec_kw = dict(width_ratios = [1], height_ratios = [4,... | 41.611111 | 114 | 0.646862 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 395 | 0.263685 |
56b8192795c518e7928ca09a5572608668256f99 | 3,578 | py | Python | OptimizedMovingAveragesUpdated.py | adamrvfisher/TechnicalAnalysisLibrary | 38a22b2b2b5052623f81edb11b3c5460fc254e45 | [
"Apache-2.0"
] | 3 | 2019-04-26T11:13:14.000Z | 2020-01-10T05:58:16.000Z | OptimizedMovingAveragesUpdated.py | adamrvfisher/TechnicalAnalysisLibrary | 38a22b2b2b5052623f81edb11b3c5460fc254e45 | [
"Apache-2.0"
] | null | null | null | OptimizedMovingAveragesUpdated.py | adamrvfisher/TechnicalAnalysisLibrary | 38a22b2b2b5052623f81edb11b3c5460fc254e45 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: Adam Reinhold Von Fisher - https://www.linkedin.com/in/adamrvfisher/
"""
#This is a strategy tester with a brute force optimizer
#Pandas_datareader is deprecated, use YahooGrabber
#Import modules
import numpy as np
from pandas_datareader import data
import random as rand
import ... | 27.953125 | 77 | 0.586082 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,398 | 0.390721 |
56b9ba77444e2cd8a93d2c91b41f8c6f997f8056 | 2,006 | py | Python | generation/process_datasets/process-NYT.py | Pratik-11/roft | 29c54c9712832051170c47909a5d38790ff5350b | [
"MIT"
] | 10 | 2020-05-31T19:19:42.000Z | 2022-01-15T01:44:33.000Z | generation/process_datasets/process-NYT.py | kirubarajan/trick | 04ef53c1d9646e0d7e7ec0eb47cc94d423682421 | [
"MIT"
] | 121 | 2020-06-05T20:29:24.000Z | 2021-09-24T21:33:33.000Z | generation/process_datasets/process-NYT.py | kirubarajan/trick | 04ef53c1d9646e0d7e7ec0eb47cc94d423682421 | [
"MIT"
] | 2 | 2020-06-05T20:10:29.000Z | 2020-09-30T14:55:48.000Z | '''
Script to parse out the raw text of articles from the NYT Articles Corpus
This script will look for a directory named raw and find any .ta.xml
files inside, parse out the "text" field in the file, strip all newlines and
carriage returns from the file and then write the text out, one article per lin... | 37.849057 | 84 | 0.638584 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 686 | 0.341974 |
56baa2531aac4a1b2d5cf0f754d7c2d4f1573f35 | 853 | py | Python | DataMGT/consumers.py | BerryBC/SpyDataWebAppAndAPI | 6dd42a186e6955575fb747f7ff69c5b5a060ca19 | [
"MIT"
] | null | null | null | DataMGT/consumers.py | BerryBC/SpyDataWebAppAndAPI | 6dd42a186e6955575fb747f7ff69c5b5a060ca19 | [
"MIT"
] | null | null | null | DataMGT/consumers.py | BerryBC/SpyDataWebAppAndAPI | 6dd42a186e6955575fb747f7ff69c5b5a060ca19 | [
"MIT"
] | null | null | null | '''
@Descripttion:
@Author: BerryBC
@Date: 2020-02-24 23:40:18
@LastEditors: BerryBC
@LastEditTime: 2020-04-29 22:28:49
'''
import json
import Lib.LLearn as LLearn
from channels.generic.websocket import WebsocketConsumer
class wsCreatSklearnModel(WebsocketConsumer):
def funFB2C(self,strMsg, intCode):
... | 23.054054 | 56 | 0.638921 | 617 | 0.723329 | 0 | 0 | 0 | 0 | 0 | 0 | 224 | 0.262603 |
56bb48fc93cbdd9d51e108045eb0d3f0918f92f4 | 821 | py | Python | main/test/test_image.py | kittenh2o/mosaic | 19dc7cb3300b00a055fad874a097aa7a011ca56f | [
"MIT"
] | null | null | null | main/test/test_image.py | kittenh2o/mosaic | 19dc7cb3300b00a055fad874a097aa7a011ca56f | [
"MIT"
] | null | null | null | main/test/test_image.py | kittenh2o/mosaic | 19dc7cb3300b00a055fad874a097aa7a011ca56f | [
"MIT"
] | null | null | null | import unittest
from main.core.process_pic import Image
class TestImage(unittest.TestCase):
def test_read(self):
uris = [
"https://res.cloudinary.com/dwf6x1ohn/image/upload/v1534347950/bgnppredgmslafb5pkpw.jpg",
"https://res.cloudinary.com/dwf6x1ohn/image/upload/v1534347979/wptzf... | 28.310345 | 101 | 0.618758 | 613 | 0.74665 | 0 | 0 | 0 | 0 | 0 | 0 | 186 | 0.226553 |
56bc157b8432a7e32a0436c1af87a1c616b37163 | 1,670 | py | Python | flockos/models/error.py | bilmyers/pyflock | b440ffbcd6a18c0d81b81dcdcbae7ae16c025d39 | [
"Apache-2.0"
] | 14 | 2017-02-14T07:02:59.000Z | 2022-03-30T13:59:59.000Z | flockos/models/error.py | bilmyers/pyflock | b440ffbcd6a18c0d81b81dcdcbae7ae16c025d39 | [
"Apache-2.0"
] | 10 | 2016-10-22T20:52:00.000Z | 2021-05-10T10:40:30.000Z | flockos/models/error.py | bilmyers/pyflock | b440ffbcd6a18c0d81b81dcdcbae7ae16c025d39 | [
"Apache-2.0"
] | 8 | 2017-03-03T13:16:34.000Z | 2020-07-23T17:59:54.000Z | # coding: utf-8
from pprint import pformat
from ..utils import to_dict
class Error(object):
def __init__(self, error=None, description=None, parameter=None, disabled_by=None):
self._error = error
self._description = description
self._parameter = parameter
self._disabled_by = di... | 20.120482 | 87 | 0.602395 | 1,593 | 0.953892 | 0 | 0 | 620 | 0.371257 | 0 | 0 | 323 | 0.193413 |
56bc4761d12edf3388b485bea197b4fd8ed7b433 | 4,390 | py | Python | tf2onnx/tflite_handlers/tfl_nn.py | BobLiu20/tensorflow-onnx | bec7c1fd610c27d7cb22271c9fdf45d9f4ecee44 | [
"Apache-2.0"
] | 1 | 2021-04-30T15:26:06.000Z | 2021-04-30T15:26:06.000Z | tf2onnx/tflite_handlers/tfl_nn.py | BobLiu20/tensorflow-onnx | bec7c1fd610c27d7cb22271c9fdf45d9f4ecee44 | [
"Apache-2.0"
] | null | null | null | tf2onnx/tflite_handlers/tfl_nn.py | BobLiu20/tensorflow-onnx | bec7c1fd610c27d7cb22271c9fdf45d9f4ecee44 | [
"Apache-2.0"
] | 1 | 2021-05-22T02:24:21.000Z | 2021-05-22T02:24:21.000Z | # SPDX-License-Identifier: Apache-2.0
"""
tfl_nn
"""
from tf2onnx.handler import tfl_op
from tf2onnx.tflite_handlers.tfl_math import separate_fused_activation_function
# pylint: disable=unused-argument,missing-docstring,unused-variable,pointless-string-statement,invalid-name
@tfl_op(["TFL_TRANSPOSE_CONV"], tf_op... | 39.54955 | 117 | 0.682916 | 3,587 | 0.817084 | 0 | 0 | 4,092 | 0.932118 | 0 | 0 | 1,249 | 0.28451 |
56bf87b62349b915ce3f570672341fdac70f6f1f | 58 | py | Python | physballs/physballs.py | Dhhoyt/Physballs | 2225f5d88c7e16ac2b9aa59eb6e312eb62750955 | [
"MIT"
] | null | null | null | physballs/physballs.py | Dhhoyt/Physballs | 2225f5d88c7e16ac2b9aa59eb6e312eb62750955 | [
"MIT"
] | null | null | null | physballs/physballs.py | Dhhoyt/Physballs | 2225f5d88c7e16ac2b9aa59eb6e312eb62750955 | [
"MIT"
] | null | null | null | from graphics.render import open_window
open_window()
| 14.5 | 40 | 0.793103 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
56bfc33a7af917c5815e0bac91e9b07e0bede4f2 | 247 | py | Python | ex016-Descubra a Hipotenusa.py | Mathelzu/PythonExercicios | 9bb3f4ce97818fd4f0cb296c262818d7b1c76adb | [
"Apache-2.0"
] | null | null | null | ex016-Descubra a Hipotenusa.py | Mathelzu/PythonExercicios | 9bb3f4ce97818fd4f0cb296c262818d7b1c76adb | [
"Apache-2.0"
] | null | null | null | ex016-Descubra a Hipotenusa.py | Mathelzu/PythonExercicios | 9bb3f4ce97818fd4f0cb296c262818d7b1c76adb | [
"Apache-2.0"
] | null | null | null | import math
catOp = float(input('Valor Cateto Oposto: '))
catAd = float (input('Valor Cateto adjacente: '))
hip = (catOp**2) + (catAd**2)
# ou hip = math.hypot (catOp , catAd)
hip2 = math.sqrt(hip)
print (f'O valor da hipotenusa é de {hip2:.2f}')
| 30.875 | 49 | 0.663968 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.512097 |
56c02adeb142ee8a2831146de93928ab4c1be844 | 60 | py | Python | compute/dbconn/dbconn/models/incident.py | djfurman/well-managed-deployments | b61c9adb7212bb2f2a03f007568760ec5a36af72 | [
"BSD-3-Clause"
] | 1 | 2020-05-18T00:28:12.000Z | 2020-05-18T00:28:12.000Z | compute/dbconn/dbconn/models/incident.py | djfurman/well-managed-deployments | b61c9adb7212bb2f2a03f007568760ec5a36af72 | [
"BSD-3-Clause"
] | 10 | 2018-04-02T23:09:50.000Z | 2018-04-22T15:58:08.000Z | compute/dbconn/dbconn/models/incident.py | djfurman/well-managed-deployments | b61c9adb7212bb2f2a03f007568760ec5a36af72 | [
"BSD-3-Clause"
] | null | null | null | from orator import Model
class Incident(Model):
pass
| 8.571429 | 24 | 0.716667 | 32 | 0.533333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
56c06ffe14aeeb05cf11a1e9b700fb840312480b | 2,137 | py | Python | services/traction/bdd-tests/features/steps/holder.py | bcgov/traction | 90cec4f1aebccd68eb986cb89dfae5819a07a2ee | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/bdd-tests/features/steps/holder.py | bcgov/traction | 90cec4f1aebccd68eb986cb89dfae5819a07a2ee | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/bdd-tests/features/steps/holder.py | bcgov/traction | 90cec4f1aebccd68eb986cb89dfae5819a07a2ee | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | import json
import requests
import pprint
import time
from behave import *
from starlette import status
@when('"{holder}" will have a credential_offer from "{issuer}"')
@then('"{holder}" will have a credential_offer from "{issuer}"')
def step_impl(context, holder: str, issuer: str):
response = requests.get(
... | 33.920635 | 88 | 0.697707 | 0 | 0 | 0 | 0 | 2,023 | 0.946654 | 0 | 0 | 651 | 0.304633 |
56c2cfe7d870ad1404c84801425ee3e0576bff7d | 99 | py | Python | Exercise6.py | alxsklv/homework | dd629a9b6bb5e6d79ad84de6f69f26c80d50bb22 | [
"MIT"
] | null | null | null | Exercise6.py | alxsklv/homework | dd629a9b6bb5e6d79ad84de6f69f26c80d50bb22 | [
"MIT"
] | null | null | null | Exercise6.py | alxsklv/homework | dd629a9b6bb5e6d79ad84de6f69f26c80d50bb22 | [
"MIT"
] | null | null | null | a = int(input('enter side: \n'))
b = '* '
i = 0
while i < a:
print(b)
b += '* '
i += 1 | 12.375 | 32 | 0.383838 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.242424 |
56c443957d86bdbc9785b7c592e15dd086bbef8a | 527 | py | Python | Chapter__8/Examples/running_time_measuring/main.py | nil1729/python__noob | d82d951dc511eafa9f4315e1fdfdc749f484abf1 | [
"MIT"
] | null | null | null | Chapter__8/Examples/running_time_measuring/main.py | nil1729/python__noob | d82d951dc511eafa9f4315e1fdfdc749f484abf1 | [
"MIT"
] | null | null | null | Chapter__8/Examples/running_time_measuring/main.py | nil1729/python__noob | d82d951dc511eafa9f4315e1fdfdc749f484abf1 | [
"MIT"
] | null | null | null | class my_timer(object):
def __init__(self, original_function):
self.original_function = original_function
def __call__(self, *args, **kwargs):
import time
t1 = time.time()
result = self.original_function(*args, **kwargs)
t2 = time.time()
print(f"{self.or... | 25.095238 | 85 | 0.586338 | 403 | 0.764706 | 0 | 0 | 105 | 0.199241 | 0 | 0 | 69 | 0.13093 |
56c4a181e46ff75702be3d6706e5216784d4e18d | 12,870 | py | Python | umpleonline/chatbot/processresponse.py | YounesB-McGill/Comp550-Project | bbc9cf91e295a26fd1e8f2ba8371f737a449a47a | [
"MIT"
] | null | null | null | umpleonline/chatbot/processresponse.py | YounesB-McGill/Comp550-Project | bbc9cf91e295a26fd1e8f2ba8371f737a449a47a | [
"MIT"
] | 6 | 2020-07-19T01:29:06.000Z | 2021-05-10T21:21:27.000Z | umpleonline/chatbot/processresponse.py | YounesB-McGill/Comp550-Project | bbc9cf91e295a26fd1e8f2ba8371f737a449a47a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import re
from typing import List
import numpy as np
from keras.models import load_model
from action import (add_class_json, add_attribute, create_association, create_inheritance, create_composition,
return_error_to_user)
from data import ADD_WORDS, CONTAINS_WORDS, HAVE_WORDS, ISA_WORDS
from mo... | 37.304348 | 115 | 0.671484 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,363 | 0.183605 |
56c81124f1aaadd1eefd7577b6f9a4ae2b4cf780 | 2,890 | py | Python | quantum_machine_learning/qml_100_GeneratingFourierState_solution.py | zemarchezi/QHack2022 | e388a546027168c3f1d48ad2e7ecf831425bb2dc | [
"CC0-1.0"
] | null | null | null | quantum_machine_learning/qml_100_GeneratingFourierState_solution.py | zemarchezi/QHack2022 | e388a546027168c3f1d48ad2e7ecf831425bb2dc | [
"CC0-1.0"
] | null | null | null | quantum_machine_learning/qml_100_GeneratingFourierState_solution.py | zemarchezi/QHack2022 | e388a546027168c3f1d48ad2e7ecf831425bb2dc | [
"CC0-1.0"
] | 5 | 2022-03-16T00:02:24.000Z | 2022-03-23T20:12:23.000Z | #! /usr/bin/python3
import sys
from pennylane import numpy as np
import pennylane as qml
def generating_fourier_state(n_qubits, m):
"""Function which, given the number of qubits and an integer m, returns the circuit and the angles that generate the state
QFT|m> following the above template.
Args:
... | 32.111111 | 126 | 0.63045 | 0 | 0 | 0 | 0 | 835 | 0.288927 | 0 | 0 | 1,386 | 0.479585 |
56cb8fcd45f5672fe2b1eb0a6363664189af573d | 2,004 | py | Python | Class08.py | Kiran1178/Python201901 | 8f387c9ed451a8b0cf5c20e9d8f6ae53cafaf0df | [
"MIT"
] | null | null | null | Class08.py | Kiran1178/Python201901 | 8f387c9ed451a8b0cf5c20e9d8f6ae53cafaf0df | [
"MIT"
] | null | null | null | Class08.py | Kiran1178/Python201901 | 8f387c9ed451a8b0cf5c20e9d8f6ae53cafaf0df | [
"MIT"
] | null | null | null | # # # ####
# import_os.path as os_path
from os import path, makedirs
# #########################
# 1) Python Absoulute path
# ########################
#
# current absolute path
# file_path = r"c:\repos\Library"
# current_file_path = path.abspath(__file__)
# print(current_file_path)
# print(path.dirname(current_fil... | 21.094737 | 73 | 0.683633 | 0 | 0 | 153 | 0.076347 | 0 | 0 | 0 | 0 | 1,203 | 0.600299 |
56ccc4b8eb0e2fdef41c04fd52d0622b0ed55475 | 542 | py | Python | zoo/migrations/0002_animal_size.py | 5akusei/test-project-django | c8a7108a5872dc9e396d48a59541c39dd8246f5c | [
"MIT"
] | null | null | null | zoo/migrations/0002_animal_size.py | 5akusei/test-project-django | c8a7108a5872dc9e396d48a59541c39dd8246f5c | [
"MIT"
] | null | null | null | zoo/migrations/0002_animal_size.py | 5akusei/test-project-django | c8a7108a5872dc9e396d48a59541c39dd8246f5c | [
"MIT"
] | null | null | null | # Generated by Django 4.0.3 on 2022-03-21 00:10
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('animal_size', '0001_initial'),
('zoo', '0001_initial'),
]
operations = [
migrations.AddField(
... | 25.809524 | 151 | 0.632841 | 416 | 0.767528 | 0 | 0 | 0 | 0 | 0 | 0 | 137 | 0.252768 |
56ccf9b464e87b0ee37675d5598960af66f6aaee | 996 | py | Python | explicalib/calibration/evaluation/diagrams/binary/binary_calibration_error_curve.py | euranova/estimating_eces | 9bfa81dd7a39ebe069c5b11b8e7a9bf9017e9350 | [
"MIT"
] | 2 | 2021-11-30T18:44:11.000Z | 2021-11-30T18:44:19.000Z | explicalib/calibration/evaluation/diagrams/binary/binary_calibration_error_curve.py | euranova/estimating_eces | 9bfa81dd7a39ebe069c5b11b8e7a9bf9017e9350 | [
"MIT"
] | null | null | null | explicalib/calibration/evaluation/diagrams/binary/binary_calibration_error_curve.py | euranova/estimating_eces | 9bfa81dd7a39ebe069c5b11b8e7a9bf9017e9350 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: nicolas.posocco
"""
from .binary_reliability_curve import binary_reliability_curve
def binary_calibration_error_curve(model=None, X=None, Y=None,
kernel=None, bandwidth=None,
positive_scores=None,
... | 39.84 | 113 | 0.5251 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.071285 |
56cdb1a4bb76205dcc32cb83ce84f25a331f0228 | 217 | py | Python | coast/timeseries.py | British-Oceanographic-Data-Centre/NEMO-ENTRUST | 41ed278e56428404ab8ec41d74a9a3a761e308ae | [
"MIT"
] | null | null | null | coast/timeseries.py | British-Oceanographic-Data-Centre/NEMO-ENTRUST | 41ed278e56428404ab8ec41d74a9a3a761e308ae | [
"MIT"
] | null | null | null | coast/timeseries.py | British-Oceanographic-Data-Centre/NEMO-ENTRUST | 41ed278e56428404ab8ec41d74a9a3a761e308ae | [
"MIT"
] | null | null | null | """Timeseries Class"""
from .index import Indexed
from . import general_utils
class Timeseries(Indexed):
"""Parent class for Tidegauge and other timeseries type datasets
Common methods ...
"""
pass
| 18.083333 | 68 | 0.700461 | 136 | 0.626728 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.539171 |
56cefc1f7836af65100b50a748c1af6718286e94 | 8,714 | py | Python | bayesmark/np_util.py | goncaloperes/bayesmark | 8c420e935718f0d6867153b781e58943ecaf2338 | [
"Apache-2.0"
] | 102 | 2019-09-27T02:38:52.000Z | 2022-03-12T13:31:11.000Z | bayesmark/np_util.py | goncaloperes/bayesmark | 8c420e935718f0d6867153b781e58943ecaf2338 | [
"Apache-2.0"
] | 17 | 2019-10-07T18:20:21.000Z | 2022-01-03T08:19:16.000Z | bayesmark/np_util.py | goncaloperes/bayesmark | 8c420e935718f0d6867153b781e58943ecaf2338 | [
"Apache-2.0"
] | 34 | 2019-09-27T02:38:31.000Z | 2022-02-09T21:32:25.000Z | # Copyright (c) 2019 Uber Technologies, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 33.13308 | 119 | 0.638398 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,254 | 0.717696 |
56cf21dd91586a112ff72573b3ee25e290d3bbe0 | 5,141 | py | Python | kra/analytics/container.py | smpio/kube-resource-analyzer | d214b7c32bc5e404ac951f66cf0914fcae1f580f | [
"MIT"
] | null | null | null | kra/analytics/container.py | smpio/kube-resource-analyzer | d214b7c32bc5e404ac951f66cf0914fcae1f580f | [
"MIT"
] | 50 | 2021-05-26T14:15:09.000Z | 2021-07-24T12:08:14.000Z | kra/analytics/container.py | smpio/kube-resource-analyzer | d214b7c32bc5e404ac951f66cf0914fcae1f580f | [
"MIT"
] | null | null | null | from kra import models
def get_containers_summary(container_ids=None):
if container_ids is not None:
container_ids_str = ','.join(str(cid) for cid in container_ids)
container_filter = f'AND id IN ({container_ids_str})'
else:
container_filter = ''
return models.Container.objects.ra... | 44.704348 | 118 | 0.428321 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,728 | 0.919665 |
56d09b11ed25ec6017ed1280c06b4a542229e329 | 9,712 | py | Python | Zebrafish spinal locomotor circuit/Version 2/Beat_and_glide_with_sigmas.py | Bui-lab/Code | 6ce5972a4bd0c059ab167522ab1d945f3b0f5707 | [
"MIT"
] | null | null | null | Zebrafish spinal locomotor circuit/Version 2/Beat_and_glide_with_sigmas.py | Bui-lab/Code | 6ce5972a4bd0c059ab167522ab1d945f3b0f5707 | [
"MIT"
] | null | null | null | Zebrafish spinal locomotor circuit/Version 2/Beat_and_glide_with_sigmas.py | Bui-lab/Code | 6ce5972a4bd0c059ab167522ab1d945f3b0f5707 | [
"MIT"
] | 2 | 2021-08-25T08:14:52.000Z | 2021-11-29T12:56:17.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 3 15:47:19 2018
@author: Yann Roussel and Tuan Bui
Editted by: Emine Topcu on Oct 2021
"""
from random import gauss
from Beat_and_glide import Beat_and_glide_base
from Izhikevich_class import Izhikevich_9P, Leaky_Integrator
class Beat_and_glide_wi... | 56.138728 | 112 | 0.358217 | 9,405 | 0.96839 | 0 | 0 | 0 | 0 | 0 | 0 | 242 | 0.024918 |
56d2471cad9e5b70a2a31907d09626de3051974a | 183 | py | Python | __init__.py | jobscry/vz-blog | de968541a0412d5ce8f09c1ba638261a9f9151f1 | [
"MIT"
] | 3 | 2016-01-29T09:31:15.000Z | 2016-05-08T19:33:23.000Z | __init__.py | jobscry/vz-blog | de968541a0412d5ce8f09c1ba638261a9f9151f1 | [
"MIT"
] | null | null | null | __init__.py | jobscry/vz-blog | de968541a0412d5ce8f09c1ba638261a9f9151f1 | [
"MIT"
] | null | null | null | # -*- mode: python; coding: utf-8; -*-
VERSION = (1, 3, 3)
__version__ = '.'.join(map(str, VERSION))
__author__ = 'Joe Vasquez'
__email__ = 'joe.vasquez@gmail.com'
__license__ = 'MIT' | 30.5 | 41 | 0.650273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.448087 |
56d2493a0437ee12a9fdd6e4cf50891d7f181b49 | 35,632 | py | Python | mysite/patterns/35.py | BioinfoNet/prepub | e19c48cabf8bd22736dcef9308a5e196cfd8119a | [
"MIT"
] | 19 | 2016-06-17T23:36:27.000Z | 2020-01-13T16:41:55.000Z | mysite/patterns/35.py | BioinfoNet/prepub | e19c48cabf8bd22736dcef9308a5e196cfd8119a | [
"MIT"
] | 13 | 2016-06-06T12:57:05.000Z | 2019-02-05T02:21:00.000Z | patterns/35.py | OmnesRes/GRIMMER | 173c99ebdb6a9edb1242d24a791d0c5d778ff643 | [
"MIT"
] | 7 | 2017-03-28T18:12:22.000Z | 2021-06-16T09:32:59.000Z | pattern_zero=[0.0, 0.027755102041, 0.05387755102, 0.057142857143, 0.078367346939, 0.084897959184, 0.101224489796, 0.111020408163, 0.114285714286, 0.122448979592, 0.135510204082, 0.142040816327, 0.158367346939, 0.16, 0.168163265306, 0.171428571429, 0.176326530612, 0.179591836735, 0.191020408163, 0.192653061224, 0.199183... | 7,126.4 | 13,182 | 0.7864 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
56d37c682b8fa36e0cc92147b67a5132d916883c | 1,332 | py | Python | Leetcode/74_search-a-2d-matrix.py | diekaltesonne/Contexts | 064f61e84896852d6579675e2423537ee5bf8331 | [
"MIT"
] | null | null | null | Leetcode/74_search-a-2d-matrix.py | diekaltesonne/Contexts | 064f61e84896852d6579675e2423537ee5bf8331 | [
"MIT"
] | null | null | null | Leetcode/74_search-a-2d-matrix.py | diekaltesonne/Contexts | 064f61e84896852d6579675e2423537ee5bf8331 | [
"MIT"
] | null | null | null | class Solution:
def _search(self,l,r,x):
if r >= l:
mid = l + (r - l) // 2
# If element is present at the middle itself
if self.nums[mid][-1] >= x and self.nums[mid][0] <=x:
return self._search_small(0,len(self.nums[mid])-1,x,mid)
elif self.num... | 36 | 73 | 0.482733 | 1,332 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 202 | 0.151652 |
56d420fdf0723b65174b088f7049275c4a6b46ff | 42,569 | py | Python | src/SimulationControl/SpheralGnuPlotUtilities.py | jmikeowen/Spheral | 3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 22 | 2018-07-31T21:38:22.000Z | 2020-06-29T08:58:33.000Z | src/SimulationControl/SpheralGnuPlotUtilities.py | jmikeowen/Spheral | 3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 41 | 2020-09-28T23:14:27.000Z | 2022-03-28T17:01:33.000Z | src/SimulationControl/SpheralGnuPlotUtilities.py | jmikeowen/Spheral | 3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 7 | 2019-12-01T07:00:06.000Z | 2020-09-15T21:12:39.000Z | import Gnuplot
import mpi
from Spheral import *
from math import *
import numpy
import os
from SpheralTestUtilities import multiSort
SpheralGnuPlotCache = []
from spheralDimensions import spheralDimensions
dims = spheralDimensions()
#-------------------------------------------------------------------------------
# D... | 37.872776 | 105 | 0.467688 | 483 | 0.011346 | 0 | 0 | 0 | 0 | 0 | 0 | 9,060 | 0.212831 |
56d64070737123e2a1fe8ad2cdb328ef5f1d6afc | 77 | py | Python | CodeUp/1152_10보다작은수.py | woorimlee/cpp_CTCI_6E_APSS | ff1d42e871ba853ac3de726df0c609885ba07573 | [
"MIT"
] | 2 | 2020-12-30T03:35:51.000Z | 2021-02-28T20:39:09.000Z | CodeUp/1152_10보다작은수.py | woorimlee/cpp_CTCI_6E_APSS | ff1d42e871ba853ac3de726df0c609885ba07573 | [
"MIT"
] | 1 | 2020-12-08T08:48:40.000Z | 2021-04-09T04:58:57.000Z | CodeUp/1152_10보다작은수.py | woorimlee/Algorithm-Repository | ff1d42e871ba853ac3de726df0c609885ba07573 | [
"MIT"
] | null | null | null | a = int(input())
if a < 10 :
print("small")
else :
print("big")
| 11 | 18 | 0.467532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.155844 |
56d7e1352e0a41bda99357c7991be824ba742bcd | 6,484 | py | Python | fingerprint/client/util.py | ghoshishan/comp-sec | f1bec8fc68814bc421337069e58a67447baf2a89 | [
"MIT"
] | null | null | null | fingerprint/client/util.py | ghoshishan/comp-sec | f1bec8fc68814bc421337069e58a67447baf2a89 | [
"MIT"
] | null | null | null | fingerprint/client/util.py | ghoshishan/comp-sec | f1bec8fc68814bc421337069e58a67447baf2a89 | [
"MIT"
] | null | null | null | import json
import base64
import random
import logging
from Crypto.Cipher import AES
from Crypto.Protocol.KDF import PBKDF2
from phe import paillier, EncryptedNumber, PaillierPublicKey
import client.dbhandler as dbhandler
from client.exceptions import WrongPin, UnknownUser
logger = logging.getLogger('client')
# for... | 33.947644 | 116 | 0.715299 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,690 | 0.414867 |
56dac085576643fac64d1abfca3b7fade3bb0fb0 | 50 | py | Python | arbory/subcommands/__init__.py | n8jhj/arbory | 702917acecace85eb4a1597dd86c553148db1432 | [
"BSD-2-Clause"
] | null | null | null | arbory/subcommands/__init__.py | n8jhj/arbory | 702917acecace85eb4a1597dd86c553148db1432 | [
"BSD-2-Clause"
] | null | null | null | arbory/subcommands/__init__.py | n8jhj/arbory | 702917acecace85eb4a1597dd86c553148db1432 | [
"BSD-2-Clause"
] | null | null | null | from .config import config
from .tree import tree
| 16.666667 | 26 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
56dc55fee9c5b749a9b50ac4f9d5e574bceb9dda | 6,622 | py | Python | kemeny.py | cai-michael/kemenyapprox | 802e22c58f8649dcc8ddf888603f8c19ae32621c | [
"Apache-2.0"
] | null | null | null | kemeny.py | cai-michael/kemenyapprox | 802e22c58f8649dcc8ddf888603f8c19ae32621c | [
"Apache-2.0"
] | null | null | null | kemeny.py | cai-michael/kemenyapprox | 802e22c58f8649dcc8ddf888603f8c19ae32621c | [
"Apache-2.0"
] | null | null | null | """
Implements the Kemeny Rule and various heuristics
"""
import time
import datetime
from itertools import combinations, permutations
from multiprocessing import Pool
import functools
from collections import defaultdict
from matrix import generate_zeros_matrix, matrix_multiplication
NUM_WORKERS = 2
STATIONARY_DISTRI... | 36.384615 | 99 | 0.706131 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,985 | 0.299758 |
56dc67205242f7ff839dde303a1973e4737ed5cb | 1,331 | py | Python | utilities/write_spatial_file.py | markfoleyie/gisp_2021 | 6077b0980d775fefeb46983e70a1f03faa1220ec | [
"MIT"
] | 1 | 2022-01-28T13:39:42.000Z | 2022-01-28T13:39:42.000Z | utilities/write_spatial_file.py | markfoleyie/gisp_2021 | 6077b0980d775fefeb46983e70a1f03faa1220ec | [
"MIT"
] | null | null | null | utilities/write_spatial_file.py | markfoleyie/gisp_2021 | 6077b0980d775fefeb46983e70a1f03faa1220ec | [
"MIT"
] | null | null | null | try:
import fiona
from fiona.crs import from_epsg
import utilities.fiona_supported_drivers as fsd
import os
except Exception as e:
print(f"{e}")
quit(1)
def write_spatial(file=None, directory=None, data=None, **meta):
try:
if not data:
raise ValueError(f"No data to writ... | 32.463415 | 89 | 0.561232 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 312 | 0.23441 |
56dfe03b101cc2f8e7b14651f15e361abb52dfc4 | 3,536 | py | Python | src/pytest_qatouch/plugin.py | MohamedRaslan/pytest-qatouch | 8d6ddd414d2ee836da1ebb9bee64a7672ed7e04f | [
"MIT"
] | null | null | null | src/pytest_qatouch/plugin.py | MohamedRaslan/pytest-qatouch | 8d6ddd414d2ee836da1ebb9bee64a7672ed7e04f | [
"MIT"
] | 6 | 2021-06-26T20:11:10.000Z | 2022-02-21T19:41:50.000Z | src/pytest_qatouch/plugin.py | MohamedRaslan/pytest-qatouch | 8d6ddd414d2ee836da1ebb9bee64a7672ed7e04f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
from .utils import QATOUCH_MARK, MissingQatouchData, ExpectedIntegerValue
from .qatouch import QatouchTestResult
__QATOUCH_TEST_RSESULT = None
___Enable_PLUGIN = None
def pytest_addoption(parser):
group = parser.getgroup("QaTouch")
def add_option(option, dest, help, de... | 30.747826 | 119 | 0.63914 | 0 | 0 | 426 | 0.120475 | 461 | 0.130373 | 0 | 0 | 878 | 0.248303 |
56e0b3bab19585c01401fc4f7a552420d5771661 | 4,066 | py | Python | tsai/models/ROCKET.py | radi-cho/tsai | 32f24d55ee58df1a14d1e68618f230097a266c77 | [
"Apache-2.0"
] | 1 | 2022-01-02T18:21:27.000Z | 2022-01-02T18:21:27.000Z | tsai/models/ROCKET.py | radi-cho/tsai | 32f24d55ee58df1a14d1e68618f230097a266c77 | [
"Apache-2.0"
] | 31 | 2021-12-01T23:08:51.000Z | 2021-12-29T02:59:49.000Z | tsai/models/ROCKET.py | radi-cho/tsai | 32f24d55ee58df1a14d1e68618f230097a266c77 | [
"Apache-2.0"
] | 1 | 2022-03-13T16:47:04.000Z | 2022-03-13T16:47:04.000Z | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/111_models.ROCKET.ipynb (unless otherwise specified).
__all__ = ['RocketClassifier', 'load_rocket', 'RocketRegressor']
# Cell
import sklearn
from sklearn.linear_model import RidgeClassifierCV, RidgeCV
from sklearn.metrics import make_scorer
from ..imports import *
from ... | 42.8 | 143 | 0.657649 | 3,415 | 0.839892 | 0 | 0 | 0 | 0 | 0 | 0 | 1,661 | 0.40851 |
56e136e9f8cd4fb32fc3b35b6dbfa5fc8c91cf9e | 6,596 | py | Python | sheetmaker/language_strings.py | cosme12/cheet-sheet-maker | 7bbb4f4dd310127d9ca57a9365dc2bfb6bce91da | [
"MIT"
] | 112 | 2017-02-08T20:42:14.000Z | 2022-03-04T01:50:32.000Z | sheetmaker/language_strings.py | cosme12/cheet-sheet-maker | 7bbb4f4dd310127d9ca57a9365dc2bfb6bce91da | [
"MIT"
] | 20 | 2017-02-09T11:22:08.000Z | 2018-06-22T19:04:23.000Z | sheetmaker/language_strings.py | cosme12/cheet-sheet-maker | 7bbb4f4dd310127d9ca57a9365dc2bfb6bce91da | [
"MIT"
] | 30 | 2017-02-09T13:05:52.000Z | 2022-01-30T05:59:09.000Z | """Language selector handler
Todo:
* Use internacionalization
* Add more languages
"""
english = {
"INTRO_MESSAGE" : "Welcome to CheatSheet Maker",
"MAIN_MENU_OPTIONS" : { 1: "Create sheet",
2: "Export (NOT CODED YET)",
3: "Help (NOT CODED YET)"... | 52.349206 | 133 | 0.516828 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,196 | 0.636143 |
56e3647b49151976eed2cee6aff44b3b5d0d4f87 | 1,007 | py | Python | corecat/tests/_utils/conftest.py | DanceCats/dancecat-core | 877c475413237205526cca02372f378b6f39dbb3 | [
"MIT"
] | 1 | 2017-03-25T14:30:30.000Z | 2017-03-25T14:30:30.000Z | corecat/tests/_utils/conftest.py | DanceCats/dancecat-core | 877c475413237205526cca02372f378b6f39dbb3 | [
"MIT"
] | 3 | 2017-03-23T11:05:02.000Z | 2017-04-03T08:38:40.000Z | corecat/tests/_utils/conftest.py | DanceCats/dancecat-core | 877c475413237205526cca02372f378b6f39dbb3 | [
"MIT"
] | 1 | 2017-03-18T07:21:59.000Z | 2017-03-18T07:21:59.000Z | import pytest
import datetime
@pytest.fixture
def freeze_datetime(monkeypatch):
"""Patch datetime.now function to return fixed timestamp."""
original_datetime = datetime.datetime
class FrozenDateTimeMeta(type):
"""Meta class for FrozenDateTime class."""
def __instancecheck__(self, instanc... | 31.46875 | 77 | 0.680238 | 666 | 0.66137 | 0 | 0 | 974 | 0.967229 | 0 | 0 | 250 | 0.248262 |
56e43e574c097624d7cc4d755ce6b382a96ac7b6 | 219 | py | Python | app01.py | YA-androidapp/Book-FlaskApp-03-AddStaicFilesAndTemplates | 2ccbda0b0707a240c3824f5d31457c293f8aa95b | [
"Apache-2.0"
] | null | null | null | app01.py | YA-androidapp/Book-FlaskApp-03-AddStaicFilesAndTemplates | 2ccbda0b0707a240c3824f5d31457c293f8aa95b | [
"Apache-2.0"
] | null | null | null | app01.py | YA-androidapp/Book-FlaskApp-03-AddStaicFilesAndTemplates | 2ccbda0b0707a240c3824f5d31457c293f8aa95b | [
"Apache-2.0"
] | null | null | null | from flask import Flask, redirect, url_for
from markupsafe import escape
app = Flask(__name__)
@app.route('/')
def index():
print(url_for('static', filename='icon.png'))
return app.send_static_file('icon.png') | 24.333333 | 49 | 0.721461 | 0 | 0 | 0 | 0 | 122 | 0.557078 | 0 | 0 | 31 | 0.141553 |
56e45b9b2bac49923c6b840cd9115a922b1a9b93 | 815 | py | Python | preprocess/BDD_Driving_Model/test.py | ksuvislab/geovisuals-bdd | 82a2b835db59f3d0431cd0cc7f218c410abb1446 | [
"Apache-2.0"
] | null | null | null | preprocess/BDD_Driving_Model/test.py | ksuvislab/geovisuals-bdd | 82a2b835db59f3d0431cd0cc7f218c410abb1446 | [
"Apache-2.0"
] | null | null | null | preprocess/BDD_Driving_Model/test.py | ksuvislab/geovisuals-bdd | 82a2b835db59f3d0431cd0cc7f218c410abb1446 | [
"Apache-2.0"
] | null | null | null | import wrapper
import tensorflow as tf
from tensorflow.core.example import example_pb2
from StringIO import StringIO
from PIL import Image
from matplotlib.pyplot import imshow, show
import numpy as np
a = wrapper.Wrapper('discrete_tcnn1','./data/pretrained_models/discrete_tcnn1/model.ckpt-126001.bestmodel', 20)
exampl... | 30.185185 | 111 | 0.791411 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 163 | 0.2 |
56e46bb7818acd0c03702e88afa0e940878c4a01 | 2,989 | py | Python | Hourglass_network/train.py | Ali-Sahili/Background-Subtraction-Unsupervised-Learning | 445b2cf8736a4a28cff2b074a32afe8fe6986d53 | [
"MIT"
] | 5 | 2021-05-17T06:52:28.000Z | 2022-02-20T15:35:51.000Z | Hourglass_network/train.py | WN1695173791/Background-Subtraction-Unsupervised-Learning | 445b2cf8736a4a28cff2b074a32afe8fe6986d53 | [
"MIT"
] | null | null | null | Hourglass_network/train.py | WN1695173791/Background-Subtraction-Unsupervised-Learning | 445b2cf8736a4a28cff2b074a32afe8fe6986d53 | [
"MIT"
] | 1 | 2021-05-17T06:52:33.000Z | 2021-05-17T06:52:33.000Z | import torch
from torch import nn
import torchvision.utils as vutils
import numpy as np
from focal_loss import FocalLoss
from Param import *
from utils import weights_init
from net import PoseNet
from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
def fit(data, mask, Net, optimizer, criterion, max_no... | 27.675926 | 159 | 0.613249 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 328 | 0.109736 |
56e51968e0b294a8b19d2f549c0b644ea69e8277 | 6,308 | py | Python | main.py | abditag2/DCGAN-tensorflow | 432b0d91bd8252c48869c205b86701993eb37618 | [
"MIT"
] | 4 | 2019-04-30T08:46:13.000Z | 2020-09-08T07:18:23.000Z | main.py | abditag2/DCGAN-tensorflow | 432b0d91bd8252c48869c205b86701993eb37618 | [
"MIT"
] | null | null | null | main.py | abditag2/DCGAN-tensorflow | 432b0d91bd8252c48869c205b86701993eb37618 | [
"MIT"
] | 1 | 2019-10-24T12:24:23.000Z | 2019-10-24T12:24:23.000Z | import io
import os
import os.path
from os import listdir
from os.path import isfile, join
import numpy as np
import tensorflow as tf
from PIL import Image
import horovod.tensorflow as hvd
from model import DCGAN
from utils import pp, visualize, show_all_variables
flags = tf.app.flags
flags.DEFINE_integer("epoch", ... | 40.696774 | 138 | 0.708307 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,913 | 0.303266 |
56e55db3074073781e32a309aaad46301011098d | 2,768 | py | Python | Packs/Okta/Integrations/OktaEventCollector/OktaEventCollector_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | Packs/Okta/Integrations/OktaEventCollector/OktaEventCollector_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 40 | 2022-03-03T07:34:00.000Z | 2022-03-31T07:38:35.000Z | Packs/Okta/Integrations/OktaEventCollector/OktaEventCollector_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | from OktaEventCollector import ReqParams, Client, Request, GetEvents, Method
import pytest
req_params = ReqParams(since='', sortOrder='ASCENDING', limit='5')
request = Request(method=Method.GET, url='https://testurl.com', headers={}, params=req_params)
client = Client(request)
get_events = GetEvents(client)
id1 = {'uu... | 42.584615 | 109 | 0.58526 | 120 | 0.043353 | 0 | 0 | 1,820 | 0.657514 | 0 | 0 | 1,001 | 0.361633 |
56e5c536074d74d31f4d24ac8e326a346c1ae65e | 2,563 | py | Python | test/models/test_deepset.py | NetKet/netket | 96758e814fc3128e6821564d6cc2852bac40ecf2 | [
"Apache-2.0"
] | null | null | null | test/models/test_deepset.py | NetKet/netket | 96758e814fc3128e6821564d6cc2852bac40ecf2 | [
"Apache-2.0"
] | null | null | null | test/models/test_deepset.py | NetKet/netket | 96758e814fc3128e6821564d6cc2852bac40ecf2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The NetKet 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 applicable law... | 29.125 | 87 | 0.616075 | 0 | 0 | 0 | 0 | 821 | 0.320328 | 0 | 0 | 654 | 0.25517 |
56e652ef605ac7b4aafdbb77c6ebeaccf9aada5f | 158 | py | Python | newGui.py | Mishin870/meat_bonch_hackaton_2017 | cf8637c295981a728d36576eb2cfe8ab93202a9f | [
"MIT"
] | 1 | 2017-10-20T21:56:41.000Z | 2017-10-20T21:56:41.000Z | newGui.py | Mishin870/meat_bonch_hackaton_2017 | cf8637c295981a728d36576eb2cfe8ab93202a9f | [
"MIT"
] | null | null | null | newGui.py | Mishin870/meat_bonch_hackaton_2017 | cf8637c295981a728d36576eb2cfe8ab93202a9f | [
"MIT"
] | null | null | null | from tkinter import *
root = Tk()
b = Button(root)
b['text'] = 'test'
def test(event):
import test
b.bind('<Button-1>', test)
b.pack()
root.mainloop() | 12.153846 | 26 | 0.620253 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.151899 |
56e712fc9d5f888dd3b32ea02057e2f0440b72f3 | 803 | py | Python | 2020/day_15/day_15.py | viddrobnic/adventofcode | 8f06f4ad3ed6744d20d222b050a15b8ff0ff9c82 | [
"MIT"
] | null | null | null | 2020/day_15/day_15.py | viddrobnic/adventofcode | 8f06f4ad3ed6744d20d222b050a15b8ff0ff9c82 | [
"MIT"
] | null | null | null | 2020/day_15/day_15.py | viddrobnic/adventofcode | 8f06f4ad3ed6744d20d222b050a15b8ff0ff9c82 | [
"MIT"
] | 1 | 2020-12-01T16:49:12.000Z | 2020-12-01T16:49:12.000Z | from collections import defaultdict
starting_numbers = [16, 12, 1, 0, 15, 7, 11]
def solver(rounds):
last_spoken = dict()
number_spoken = defaultdict(int)
for i, n in enumerate(starting_numbers):
last_spoken[n] = i + 1
number_spoken[n] += 1
most_recent = starting_numbers[-1]
turn... | 23.617647 | 61 | 0.620174 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.084682 |
56e77e033d14f603000e73fa84271bc6b5607ec9 | 3,987 | py | Python | exp/hou_ximg.py | schaban/crosscore_dev | 1eae118a485cb1de1d54d2da01ff0b32966205ef | [
"MIT"
] | 5 | 2022-01-26T03:25:00.000Z | 2022-03-06T03:27:13.000Z | exp/hou_ximg.py | schaban/crosscore_dev | 1eae118a485cb1de1d54d2da01ff0b32966205ef | [
"MIT"
] | null | null | null | exp/hou_ximg.py | schaban/crosscore_dev | 1eae118a485cb1de1d54d2da01ff0b32966205ef | [
"MIT"
] | null | null | null | # Author: Sergey Chaban <sergey.chaban@gmail.com>
import sys
import hou
import os
import imp
import re
import inspect
from math import *
from array import array
import xcore
import xhou
try: xrange
except: xrange = range
def writeBits(bw, bits, nbits):
nbytes = xcore.ceilDiv(nbits, 8)
wk = bits... | 25.234177 | 81 | 0.616002 | 3,589 | 0.900176 | 0 | 0 | 0 | 0 | 0 | 0 | 223 | 0.055932 |
56e98dd7ca93ca487d380c97603b7cfdaf2404c3 | 4,000 | py | Python | nsd1802/python/ansible_project/myansible/webansi/views.py | MrWangwf/nsd1806 | 069e993b0bb64cb21adc2a25aa56f6da674453bc | [
"Apache-2.0"
] | null | null | null | nsd1802/python/ansible_project/myansible/webansi/views.py | MrWangwf/nsd1806 | 069e993b0bb64cb21adc2a25aa56f6da674453bc | [
"Apache-2.0"
] | null | null | null | nsd1802/python/ansible_project/myansible/webansi/views.py | MrWangwf/nsd1806 | 069e993b0bb64cb21adc2a25aa56f6da674453bc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import shutil
from collections import namedtuple
from ansible.parsing.dataloader import DataLoader
from ansible.vars.manager import VariableManager
from ansible.inventory.manager import InventoryManager
from ansible.playbook.play import Play
from ansible.e... | 32.258065 | 115 | 0.62525 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 614 | 0.1535 |
56e9fd79e108a7ca6eae3fd77971936796edbc9e | 9,698 | py | Python | macadam/conf/constant_params.py | yongzhuo/Macadam | 794a29c760ce25264388c3a85a6b118733afb023 | [
"MIT"
] | 290 | 2020-06-04T17:01:30.000Z | 2022-03-29T13:10:18.000Z | macadam/conf/constant_params.py | furtherthanfar/Macadam | 794a29c760ce25264388c3a85a6b118733afb023 | [
"MIT"
] | 7 | 2020-06-05T02:30:51.000Z | 2022-03-17T01:05:42.000Z | macadam/conf/constant_params.py | furtherthanfar/Macadam | 794a29c760ce25264388c3a85a6b118733afb023 | [
"MIT"
] | 35 | 2020-06-11T07:32:17.000Z | 2022-03-09T06:08:03.000Z | # !/usr/bin/python
# -*- coding: utf-8 -*-
# @time : 2020/4/26 20:25
# @author : Mo
# @function: constant of token-symbol and hyper-parameters-default
from macadam.conf.path_config import path_model_dir
from typing import Dict
import os
EMBEDDING_TYPE = ["ROBERTA","ELECTRA","RANDOM","ALBERT",
... | 51.312169 | 137 | 0.576614 | 4,920 | 0.450549 | 0 | 0 | 0 | 0 | 0 | 0 | 5,477 | 0.501557 |
56ea4043e94445a1fa0825bf267b5e1fb99e0df2 | 786 | py | Python | tests/test_model/test_backbone/test_mobilenetv3_backbone.py | ZJCV/PyCls | 1ef59301646b6134f2ffcc009b4fd76550fa4089 | [
"Apache-2.0"
] | 110 | 2021-02-04T14:32:57.000Z | 2022-03-30T01:51:56.000Z | tests/test_model/test_backbone/test_mobilenetv3_backbone.py | likyoo/ZCls | 568621aca3a8b090c93345f0858d52c5757f2f0e | [
"Apache-2.0"
] | 8 | 2021-04-11T02:46:57.000Z | 2021-12-14T19:30:58.000Z | tests/test_model/test_backbone/test_mobilenetv3_backbone.py | likyoo/ZCls | 568621aca3a8b090c93345f0858d52c5757f2f0e | [
"Apache-2.0"
] | 20 | 2021-02-07T14:17:07.000Z | 2022-03-22T05:20:40.000Z | # -*- coding: utf-8 -*-
"""
@date: 2020/12/30 下午9:36
@file: test_mobilenetv3_backbone.py
@author: zj
@description:
"""
import torch
from zcls.model.backbones.mobilenet.mobilenetv3_backbone import MobileNetV3Backbone
def test_mobilenet_v3_backbone():
data = torch.randn(1, 3, 224, 224)
model = MobileNetV3Ba... | 20.684211 | 83 | 0.655216 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 161 | 0.203797 |
56eb32a92cc867cd71aa0914a66e1907fb58aeae | 4,348 | py | Python | analog_sim/spice/ngspice.py | yrrapt/spice_interface | 2a66bd2672b5154920457676bbaaef8ddd694640 | [
"Apache-2.0"
] | 5 | 2021-04-29T21:38:17.000Z | 2021-07-07T04:03:45.000Z | analog_sim/spice/ngspice.py | yrrapt/spice_interface | 2a66bd2672b5154920457676bbaaef8ddd694640 | [
"Apache-2.0"
] | null | null | null | analog_sim/spice/ngspice.py | yrrapt/spice_interface | 2a66bd2672b5154920457676bbaaef8ddd694640 | [
"Apache-2.0"
] | 1 | 2021-11-30T01:12:21.000Z | 2021-11-30T01:12:21.000Z | import os, re, subprocess
import numpy as np
from spyci import spyci
from PySpice.Spice.NgSpice.Shared import NgSpiceShared
from analog_sim.spice.generic import GenericSpiceInterface
class NgSpiceInterface(GenericSpiceInterface):
'''
'''
def __init__(self, verbose=True, netlist_path=None, pdk_path=None... | 30.194444 | 100 | 0.527599 | 4,162 | 0.957222 | 0 | 0 | 0 | 0 | 0 | 0 | 1,321 | 0.303818 |
56ee5b13733521aa2c6d7583b5c0eff94fcf5da5 | 728 | py | Python | producer/kwebmon_producer/json_schemas.py | nicolalamacchia/kwebmon | 13d8720314e9faff99b34dd5cb6c10d1cf45d786 | [
"MIT"
] | null | null | null | producer/kwebmon_producer/json_schemas.py | nicolalamacchia/kwebmon | 13d8720314e9faff99b34dd5cb6c10d1cf45d786 | [
"MIT"
] | 4 | 2021-04-28T03:19:37.000Z | 2021-04-28T13:10:27.000Z | producer/kwebmon_producer/json_schemas.py | nicolalamacchia/kwebmon | 13d8720314e9faff99b34dd5cb6c10d1cf45d786 | [
"MIT"
] | null | null | null | SITES_JSON_SCHEMA = {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"sites": {"type": "array"},
"items": {"$ref": "#/$defs/site"}
},
"$defs": {
"site": {
"type": "object",
"required": ["url"],
"prop... | 28 | 76 | 0.362637 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 332 | 0.456044 |
56ee82e7574951e2d9ede6d10b02540ba09cf793 | 68 | py | Python | src/traits/__init__.py | 5monkeys/django-traits | 206c91f2738974fe5df0a12a7e94f1ba1dd28f39 | [
"BSD-3-Clause"
] | null | null | null | src/traits/__init__.py | 5monkeys/django-traits | 206c91f2738974fe5df0a12a7e94f1ba1dd28f39 | [
"BSD-3-Clause"
] | 2 | 2021-10-07T18:14:13.000Z | 2021-10-07T20:30:49.000Z | src/traits/__init__.py | 5monkeys/django-traits | 206c91f2738974fe5df0a12a7e94f1ba1dd28f39 | [
"BSD-3-Clause"
] | null | null | null | from .base import Trait
__version__ = "0.0.1"
__all__ = ("Trait",)
| 13.6 | 23 | 0.661765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.205882 |
56ee8b1c1d8d6917b939b39a1094ae81309532e0 | 4,404 | py | Python | willie/modules/whois.py | ezoSresyeK/willie | 5782628d15996d0cc901bb4ee27d89e9c7ad94ae | [
"EFL-2.0"
] | null | null | null | willie/modules/whois.py | ezoSresyeK/willie | 5782628d15996d0cc901bb4ee27d89e9c7ad94ae | [
"EFL-2.0"
] | null | null | null | willie/modules/whois.py | ezoSresyeK/willie | 5782628d15996d0cc901bb4ee27d89e9c7ad94ae | [
"EFL-2.0"
] | null | null | null | """
whois.py - Willie Whois module
Copyright 2014, Ellis Percival (Flyte) willie@failcode.co.uk
Licensed under the Eiffel Forum License 2.
http://willie.dftba.net
A module to enable Willie to perform WHOIS lookups on nicknames.
This can either be to have Willie perform lookups on behalf of
other people, or can be imp... | 24.331492 | 73 | 0.60604 | 641 | 0.14555 | 0 | 0 | 1,428 | 0.324251 | 0 | 0 | 1,623 | 0.368529 |
56ef8a75099969f876b3cdd3157b7f50324c1ed5 | 1,188 | py | Python | setup.py | satyrius/cmsplugin-scripts | bffcaefa36377b0baeedc6a0006b2c3ce5a50a98 | [
"MIT"
] | null | null | null | setup.py | satyrius/cmsplugin-scripts | bffcaefa36377b0baeedc6a0006b2c3ce5a50a98 | [
"MIT"
] | null | null | null | setup.py | satyrius/cmsplugin-scripts | bffcaefa36377b0baeedc6a0006b2c3ce5a50a98 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from cmsplugin_scripts import __version__
CLASSIFIERS = [
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: O... | 29.7 | 73 | 0.661616 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 663 | 0.558081 |
56efd06e8d45906c55ba8332a46d55aa2ff8358b | 698 | py | Python | test/fix_name.py | xhuang98/Dtect | 929d01945fd2768032dbb84d8ba1f62069132172 | [
"MIT"
] | 1 | 2021-12-25T01:43:43.000Z | 2021-12-25T01:43:43.000Z | test/fix_name.py | xhuang98/Dtect | 929d01945fd2768032dbb84d8ba1f62069132172 | [
"MIT"
] | null | null | null | test/fix_name.py | xhuang98/Dtect | 929d01945fd2768032dbb84d8ba1f62069132172 | [
"MIT"
] | 1 | 2021-09-02T15:30:04.000Z | 2021-09-02T15:30:04.000Z | import os
import json
if __name__ == '__main__':
f = open('coverage/codeclimate.json', 'r')
summary = json.load(f)
f.close()
for i in range(len(summary['source_files'])):
if summary['source_files'][i]['name'][0] == '/':
path = summary['source_files'][i]['name'].replace('//', '/')
... | 33.238095 | 72 | 0.524355 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 161 | 0.230659 |