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
1c1636cf86096d804523c5cf8152da0be6431cdb
735
py
Python
manila_ui/local/enabled/_9020_manila_project_add_share_snapshots_panel_to_share_panel_group.py
dinaSap/manila-ui
3b8d685dd7830da3c8c703bab3355902dcb1e610
[ "Apache-2.0" ]
29
2015-05-02T16:19:12.000Z
2022-03-29T06:51:16.000Z
manila_ui/local/enabled/_9020_manila_project_add_share_snapshots_panel_to_share_panel_group.py
dinaSap/manila-ui
3b8d685dd7830da3c8c703bab3355902dcb1e610
[ "Apache-2.0" ]
null
null
null
manila_ui/local/enabled/_9020_manila_project_add_share_snapshots_panel_to_share_panel_group.py
dinaSap/manila-ui
3b8d685dd7830da3c8c703bab3355902dcb1e610
[ "Apache-2.0" ]
17
2015-09-18T16:00:32.000Z
2021-10-16T03:17:37.000Z
# Copyright 2017 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
38.684211
79
0.771429
PANEL_DASHBOARD = 'project' PANEL_GROUP = 'share' PANEL = 'share_snapshots' ADD_PANEL = 'manila_ui.dashboards.project.share_snapshots.panel.ShareSnapshots'
true
true
1c1636da2cc54da0de268f728a165f6cd77167b9
55,734
py
Python
api_app/tests_ma/test_api/test_routes/test_workspaces.py
SvenAelterman/AzureTRE
1c25af18cab3090ab7e9e834ac0aba27b7b1c5ef
[ "MIT" ]
null
null
null
api_app/tests_ma/test_api/test_routes/test_workspaces.py
SvenAelterman/AzureTRE
1c25af18cab3090ab7e9e834ac0aba27b7b1c5ef
[ "MIT" ]
null
null
null
api_app/tests_ma/test_api/test_routes/test_workspaces.py
SvenAelterman/AzureTRE
1c25af18cab3090ab7e9e834ac0aba27b7b1c5ef
[ "MIT" ]
null
null
null
import pytest from mock import patch, MagicMock from fastapi import HTTPException, status from api.routes.workspaces import get_current_user, save_and_deploy_resource, validate_user_is_owner_or_researcher, \ validate_user_is_owner, mark_resource_as_deleting, send_uninstall_message from db.errors import EntityDoes...
64.062069
234
0.794596
import pytest from mock import patch, MagicMock from fastapi import HTTPException, status from api.routes.workspaces import get_current_user, save_and_deploy_resource, validate_user_is_owner_or_researcher, \ validate_user_is_owner, mark_resource_as_deleting, send_uninstall_message from db.errors import EntityDoes...
true
true
1c1637128109287112ec6f7cec843445deb6c292
159
py
Python
rinobot_plugin/__init__.py
rinocloud/rinobot-plugin
0196f2a5a01a85a2f4859755b262bf093cd4eb45
[ "MIT" ]
null
null
null
rinobot_plugin/__init__.py
rinocloud/rinobot-plugin
0196f2a5a01a85a2f4859755b262bf093cd4eb45
[ "MIT" ]
null
null
null
rinobot_plugin/__init__.py
rinocloud/rinobot-plugin
0196f2a5a01a85a2f4859755b262bf093cd4eb45
[ "MIT" ]
null
null
null
# Rinobot-plugin python helpers # API docs at http://github.com/rinocloud/rinobot-plugin # Authors: # Eoin Murray <eoin@rinocloud.com> from .plugin import *
19.875
56
0.748428
from .plugin import *
true
true
1c16374287bd0feefee2b070c550357e49500cf9
10,436
py
Python
src/app/utils.py
AnH0ang/big-data-challenge
aa9ba92e2355bc2838a037219d20d387e2eefdbb
[ "MIT" ]
null
null
null
src/app/utils.py
AnH0ang/big-data-challenge
aa9ba92e2355bc2838a037219d20d387e2eefdbb
[ "MIT" ]
null
null
null
src/app/utils.py
AnH0ang/big-data-challenge
aa9ba92e2355bc2838a037219d20d387e2eefdbb
[ "MIT" ]
null
null
null
from copy import deepcopy import numpy as np import optuna import pandas as pd import plotly.express as px import plotly.graph_objects as go import streamlit as st from optuna.study import Study from sklearn.metrics import ( accuracy_score, auc, f1_score, log_loss, roc_auc_score, roc_curve, ) f...
30.425656
100
0.641913
from copy import deepcopy import numpy as np import optuna import pandas as pd import plotly.express as px import plotly.graph_objects as go import streamlit as st from optuna.study import Study from sklearn.metrics import ( accuracy_score, auc, f1_score, log_loss, roc_auc_score, roc_curve, ) f...
true
true
1c1637e2ac8b4ff1bb1545a07ca48296ae8d3079
326
py
Python
NC_PFA/__init__.py
MarkShawn2020/Python-Finance
21b4eb5d7e4953b80ec3e45b448e19071334263a
[ "MIT" ]
3
2020-03-10T06:20:38.000Z
2020-10-03T01:09:14.000Z
NC_PFA/__init__.py
MarkShawn2020/Python-Finance
21b4eb5d7e4953b80ec3e45b448e19071334263a
[ "MIT" ]
1
2021-06-02T01:09:44.000Z
2021-06-02T01:09:44.000Z
NC_PFA/__init__.py
MarkShawn2020/Python-Finance
21b4eb5d7e4953b80ec3e45b448e19071334263a
[ "MIT" ]
1
2020-10-03T01:09:17.000Z
2020-10-03T01:09:17.000Z
# -*- coding: utf-8 -*- # --------------------------------------------- # @Project: Daily-Python-Learning # @File: __init__.py # @Date: 2020/1/20 # @IDE: PyCharm # @Author: Mark Shawn # @Email: shawninjuly@gmail.com # ----------------------------------------...
32.6
48
0.337423
true
true
1c16384a5225f6a64cee646a1c2153a17e12f4b9
269
py
Python
tests/artificial/transf_Integration/trend_ConstantTrend/cycle_5/ar_/test_artificial_32_Integration_ConstantTrend_5__20.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/artificial/transf_Integration/trend_ConstantTrend/cycle_5/ar_/test_artificial_32_Integration_ConstantTrend_5__20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/artificial/transf_Integration/trend_ConstantTrend/cycle_5/ar_/test_artificial_32_Integration_ConstantTrend_5__20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 5, transform = "Integration", sigma = 0.0, exog_count = 20, ar_order = 0);
38.428571
169
0.736059
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 5, transform = "Integration", sigma = 0.0, exog_count = 20, ar_order = 0);
true
true
1c163a77c32a84773938f00baa34f0e205e7c276
3,820
py
Python
desktop/libs/notebook/src/notebook/connectors/ksql.py
pnijhara/hue
f30b5b38d3414b5330919ddfe51b8939e6643243
[ "Apache-2.0" ]
null
null
null
desktop/libs/notebook/src/notebook/connectors/ksql.py
pnijhara/hue
f30b5b38d3414b5330919ddfe51b8939e6643243
[ "Apache-2.0" ]
null
null
null
desktop/libs/notebook/src/notebook/connectors/ksql.py
pnijhara/hue
f30b5b38d3414b5330919ddfe51b8939e6643243
[ "Apache-2.0" ]
2
2020-07-25T09:45:50.000Z
2022-01-18T04:13:43.000Z
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
27.482014
103
0.647382
from __future__ import absolute_import import logging from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from desktop.lib.i18n import force_unicode from desktop.conf import has_channels from kafka.ksql_client import KSqlApi as KSqlClientApi from notebook.connectors.base...
true
true
1c163c540d1cba30dd0a3fb4deaaffaf60587f54
12,387
py
Python
extractor.py
Semen52/-
a7cf9ecaa6b3c04ebf76e27bddb1b10d352f0047
[ "Apache-2.0" ]
null
null
null
extractor.py
Semen52/-
a7cf9ecaa6b3c04ebf76e27bddb1b10d352f0047
[ "Apache-2.0" ]
null
null
null
extractor.py
Semen52/-
a7cf9ecaa6b3c04ebf76e27bddb1b10d352f0047
[ "Apache-2.0" ]
1
2021-05-26T09:49:16.000Z
2021-05-26T09:49:16.000Z
# coding=utf-8 import traceback import re import csv # header patterns pattern_header = ur'(.*?)((ДТП\s*с\s*погибшими)|(ДТП\s*с\s*ранеными)|(ДТП\s*с\s*детьми)|(\d{2}\.\d{2}\.\d{4}))' pattern_header_dtp = ur'([Вв]\s*?[Нн]ижегородской\s*?области[^,\.]*?)?(\d+)\s*ДТП' pattern_header_death = ur'([Вв]\s*?[Нн]ижегородской...
42.713793
200
0.480746
import traceback import re import csv pattern_header = ur'(.*?)((ДТП\s*с\s*погибшими)|(ДТП\s*с\s*ранеными)|(ДТП\s*с\s*детьми)|(\d{2}\.\d{2}\.\d{4}))' pattern_header_dtp = ur'([Вв]\s*?[Нн]ижегородской\s*?области[^,\.]*?)?(\d+)\s*ДТП' pattern_header_death = ur'([Вв]\s*?[Нн]ижегородской\s*?области[^\.]*?)?(?:(\d+)(?:\s...
false
true
1c163d514465ca89e1fe7f62b03b5f29859a747d
617
py
Python
src/managementgroups/azext_managementgroups/managementgroups/__init__.py
mayank88mahajan/azure-cli-extensions
8bd389a1877bffd14052bec5519ce75dc6fc34cf
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
src/managementgroups/azext_managementgroups/managementgroups/__init__.py
mayank88mahajan/azure-cli-extensions
8bd389a1877bffd14052bec5519ce75dc6fc34cf
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
src/managementgroups/azext_managementgroups/managementgroups/__init__.py
mayank88mahajan/azure-cli-extensions
8bd389a1877bffd14052bec5519ce75dc6fc34cf
[ "MIT" ]
3
2016-05-03T20:49:46.000Z
2017-10-05T21:05:27.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
32.473684
76
0.589951
from .management_groups_api import ManagementGroupsAPI from .version import VERSION __all__ = ['ManagementGroupsAPI'] __version__ = VERSION
true
true
1c163e35b97143042a082cd9b032e21e21c7fab8
133
py
Python
library/twisted/mod/hello.py
Kelbec-Nef/EVE-bot-discord
30432beb482ca56a10fda8aefdb4c1b9802e4ceb
[ "MIT" ]
59
2016-06-27T13:12:18.000Z
2021-06-23T12:09:16.000Z
modules/hello.py
andimiller/twistedbot
f462385ab951f1b74e19a2ebb6b3d58da4e2a03f
[ "MIT" ]
112
2016-07-06T15:32:09.000Z
2022-03-08T07:22:54.000Z
modules/hello.py
andimiller/twistedbot
f462385ab951f1b74e19a2ebb6b3d58da4e2a03f
[ "MIT" ]
59
2016-07-04T22:22:26.000Z
2020-05-15T20:38:08.000Z
def hello(tbot, user, channel, msg): tbot.msg(channel,"Greetings %s from %s!" % (user, channel)) hello.rule = "hello TwistedBot"
33.25
63
0.676692
def hello(tbot, user, channel, msg): tbot.msg(channel,"Greetings %s from %s!" % (user, channel)) hello.rule = "hello TwistedBot"
true
true
1c163f3330822aa837d9322ffb51caaabb1d959f
8,604
py
Python
test/python/WMCore_t/WMRuntime_t/Tools_t/Scram_t.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
1
2015-02-05T13:43:46.000Z
2015-02-05T13:43:46.000Z
test/python/WMCore_t/WMRuntime_t/Tools_t/Scram_t.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
null
null
null
test/python/WMCore_t/WMRuntime_t/Tools_t/Scram_t.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ Scram_t.py Created by Dave Evans on 2012-01-27. Copyright (c) 2012 evansde77. All rights reserved. """ import unittest import os import tempfile from WMQuality.TestInit import TestInit from Utils.TemporaryEnvironment import tmpEnv from WMCore.WMRuntime.Tools.Scram import (S...
41.365385
100
0.634821
import unittest import os import tempfile from WMQuality.TestInit import TestInit from Utils.TemporaryEnvironment import tmpEnv from WMCore.WMRuntime.Tools.Scram import (Scram, OS_TO_ARCH, ARCH_TO_OS, getSingleScramArch, isCMSSWSupported, isEnforceGUIDInFileNameSupported) cl...
true
true
1c163fa63285b30698270eed0ea6d8e7190dc38e
879
py
Python
project_euler_py/6_ss_ss.py
d4ndres/my-history-with-python
a6e418fe6a32a6afa4d91d7e9b428806726836df
[ "MIT" ]
null
null
null
project_euler_py/6_ss_ss.py
d4ndres/my-history-with-python
a6e418fe6a32a6afa4d91d7e9b428806726836df
[ "MIT" ]
null
null
null
project_euler_py/6_ss_ss.py
d4ndres/my-history-with-python
a6e418fe6a32a6afa4d91d7e9b428806726836df
[ "MIT" ]
null
null
null
# The sum of the squares of the first ten natural numbers is, # 12 + 22 + ... + 102 = 385 # The square of the sum of the first ten natural numbers is, # (1 + 2 + ... + 10)2 = 552 = 3025 # Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 − 385 = 264...
26.636364
134
0.673493
def sum_of_squares(lim): _sum = 0 for idx in range( 1,lim + 1): _sum += (idx*idx) return _sum def square_of_sum(lim): _sum = 0 for idx in range( 1, lim + 1): _sum += idx return _sum*_sum if __name__ == '__main__': number = int(input('Digite el limite: ')) sums = sum_of_squares( number) ssum = sq...
true
true
1c163fcb7ca77b62c643cbc0752381ce83f6b72e
1,273
py
Python
tests/test_contracts/test_raises.py
orsinium-labs/deal-solver
8983f783b4a069cfd70b44e526e7cb14c237796a
[ "MIT" ]
8
2021-07-07T16:34:54.000Z
2022-02-15T15:28:39.000Z
tests/test_contracts/test_raises.py
orsinium-labs/deal-solver
8983f783b4a069cfd70b44e526e7cb14c237796a
[ "MIT" ]
null
null
null
tests/test_contracts/test_raises.py
orsinium-labs/deal-solver
8983f783b4a069cfd70b44e526e7cb14c237796a
[ "MIT" ]
null
null
null
from deal_solver import Conclusion from ..helpers import prove_f def test_ok(): theorem = prove_f(""" @deal.raises(ValueError) def f(): raise ValueError """) assert theorem.conclusion is Conclusion.OK def test_fail(): theorem = prove_f(""" @deal.raises(ValueError...
20.868852
48
0.596229
from deal_solver import Conclusion from ..helpers import prove_f def test_ok(): theorem = prove_f(""" @deal.raises(ValueError) def f(): raise ValueError """) assert theorem.conclusion is Conclusion.OK def test_fail(): theorem = prove_f(""" @deal.raises(ValueError...
true
true
1c16406f7894f4f3b074a95217285a04f6eba2fc
4,359
py
Python
dfttk/custodian_jobs.py
PhasesResearchLab/ARCHIVED-dfttk-20210211
17824816ffb0d6b3c56c90c22354afe5d5a5f7cf
[ "MIT" ]
null
null
null
dfttk/custodian_jobs.py
PhasesResearchLab/ARCHIVED-dfttk-20210211
17824816ffb0d6b3c56c90c22354afe5d5a5f7cf
[ "MIT" ]
null
null
null
dfttk/custodian_jobs.py
PhasesResearchLab/ARCHIVED-dfttk-20210211
17824816ffb0d6b3c56c90c22354afe5d5a5f7cf
[ "MIT" ]
null
null
null
import os import datetime import subprocess from custodian.custodian import ErrorHandler, Job from custodian.ansible.interpreter import Modder from custodian.ansible.actions import FileActions class ATATWalltimeHandler(ErrorHandler): """ Check if a run is nearing the walltime. If so, write a file ...
42.735294
116
0.614361
import os import datetime import subprocess from custodian.custodian import ErrorHandler, Job from custodian.ansible.interpreter import Modder from custodian.ansible.actions import FileActions class ATATWalltimeHandler(ErrorHandler): is_monitor = True is_terminating = False # ...
true
true
1c16408b7288abbb70becfa4e0fe6502e8ecc393
8,692
py
Python
evojax/task/flocking.py
Reytuag/evojax
df41f8252f21a729080121271e2c1cfcb1839545
[ "Apache-2.0" ]
null
null
null
evojax/task/flocking.py
Reytuag/evojax
df41f8252f21a729080121271e2c1cfcb1839545
[ "Apache-2.0" ]
null
null
null
evojax/task/flocking.py
Reytuag/evojax
df41f8252f21a729080121271e2c1cfcb1839545
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 The EvoJAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
31.607273
87
0.628854
from PIL import Image, ImageDraw from functools import partial from typing import Tuple import jax from jax import vmap import jax.numpy as jnp from flax.struct import dataclass from evojax.task.base import VectorizedTask from evojax.task.base import TaskState DT = 0.2 SPEED = 0.12 J_ALIGN = 0.6 D_ALIGN = 0.25 J_A...
true
true
1c16412df6a95beb5feda16f5491fbb247168cc4
2,600
py
Python
utils.py
N-Wind/2019-nCoV-client
0ddc08ef4093937d3cdbfbaa157d2a6807242f9a
[ "MIT" ]
null
null
null
utils.py
N-Wind/2019-nCoV-client
0ddc08ef4093937d3cdbfbaa157d2a6807242f9a
[ "MIT" ]
null
null
null
utils.py
N-Wind/2019-nCoV-client
0ddc08ef4093937d3cdbfbaa157d2a6807242f9a
[ "MIT" ]
null
null
null
import time import pymysql # 获取当前时间 def get_time(): time_str = time.strftime("%Y{}%m{}%d{} %X") return time_str.format("年","月","日") # 获取数据库疫情数据 # 连接数据库 def get_conn(): # 建立连接 conn = pymysql.connect(host="127.0.0.1", user="root", password="", ...
26.530612
98
0.577308
import time import pymysql def get_time(): time_str = time.strftime("%Y{}%m{}%d{} %X") return time_str.format("年","月","日") def get_conn(): conn = pymysql.connect(host="127.0.0.1", user="root", password="", db="cov2019", ...
true
true
1c16416eb43aa080f374a897ec3883c42241285a
5,783
py
Python
PikachuRobot/modules/math.py
pro-boy/Pikachu-Robot-1
f90c0e297221871cea08fffa4889313a7c8ace10
[ "MIT" ]
1
2022-03-31T08:42:45.000Z
2022-03-31T08:42:45.000Z
PikachuRobot/modules/math.py
pro-boy/Pikachu-Robot-1
f90c0e297221871cea08fffa4889313a7c8ace10
[ "MIT" ]
null
null
null
PikachuRobot/modules/math.py
pro-boy/Pikachu-Robot-1
f90c0e297221871cea08fffa4889313a7c8ace10
[ "MIT" ]
1
2022-03-31T08:49:35.000Z
2022-03-31T08:49:35.000Z
import math import pynewtonmath as newton from SaitamaRobot import dispatcher from SaitamaRobot.modules.disable import DisableAbleCommandHandler from telegram import Update from telegram.ext import CallbackContext, run_async @run_async def simplify(update: Update, context: CallbackContext): args = context.args ...
33.818713
250
0.748746
import math import pynewtonmath as newton from SaitamaRobot import dispatcher from SaitamaRobot.modules.disable import DisableAbleCommandHandler from telegram import Update from telegram.ext import CallbackContext, run_async @run_async def simplify(update: Update, context: CallbackContext): args = context.args ...
true
true
1c16417aa3dc2377c733d548b241b01a7afcf767
6,071
py
Python
arcade/experimental/examples/transform_point_grid.py
akapkotel/arcade
6e43ec53e7bfa3dee1aa574404794e3695aad381
[ "MIT" ]
null
null
null
arcade/experimental/examples/transform_point_grid.py
akapkotel/arcade
6e43ec53e7bfa3dee1aa574404794e3695aad381
[ "MIT" ]
1
2022-03-21T06:24:29.000Z
2022-03-21T06:24:29.000Z
arcade/experimental/examples/transform_point_grid.py
Ibrahim2750mi/arcade
bf3229e64117931bffb8e50926a996a7a8fc9b8b
[ "MIT" ]
null
null
null
""" Transform feedback example moving points using the mouse. Each point as a desired position and a current position. A radius around the mouse pointer will push the points current position. Each point will constantly strive to be at its desired position. We're using a common trick ping-pong transforming the point da...
35.296512
113
0.601384
import random import time from array import array import arcade from arcade import gl def gen_initial_data(window, width, height): dx, dy = window.width / width, window.height / height for y in range(height): for x in range(width): yield x * dx + dx / 2 yield y * d...
true
true
1c16419b8faf04bfef98bef8647db1bedef39fa0
9,126
py
Python
lenstronomy/Plots/plot_util.py
smericks/lenstronomy
3f095595e36888ac7b4ee5345b6abc5aaa8275f1
[ "MIT" ]
null
null
null
lenstronomy/Plots/plot_util.py
smericks/lenstronomy
3f095595e36888ac7b4ee5345b6abc5aaa8275f1
[ "MIT" ]
null
null
null
lenstronomy/Plots/plot_util.py
smericks/lenstronomy
3f095595e36888ac7b4ee5345b6abc5aaa8275f1
[ "MIT" ]
null
null
null
import numpy as np import math import matplotlib.pyplot as plt from lenstronomy.Util.package_util import exporter export, __all__ = exporter() @export def sqrt(inputArray, scale_min=None, scale_max=None): """Performs sqrt scaling of the input numpy array. @type inputArray: numpy array @param inputArray:...
39.678261
137
0.65286
import numpy as np import math import matplotlib.pyplot as plt from lenstronomy.Util.package_util import exporter export, __all__ = exporter() @export def sqrt(inputArray, scale_min=None, scale_max=None): imageData = np.array(inputArray, copy=True) if scale_min is None: scale_min = imageData.min() ...
true
true
1c16420231aa1561f3d2b6dc5fd23a1a9302ba2e
2,189
py
Python
data_tools/tf/feed_dict.py
lopez86/DataTools
573419f3a40ddeb5e9eaf5ced8ea8dbf41c8a65e
[ "MIT" ]
null
null
null
data_tools/tf/feed_dict.py
lopez86/DataTools
573419f3a40ddeb5e9eaf5ced8ea8dbf41c8a65e
[ "MIT" ]
null
null
null
data_tools/tf/feed_dict.py
lopez86/DataTools
573419f3a40ddeb5e9eaf5ced8ea8dbf41c8a65e
[ "MIT" ]
null
null
null
import funcy import numpy as np def make_simple_feed_builder( istrain_str='is_train', sparse=None ): builder = funcy.partial( simple_feed_builder, istrain_str=istrain_str, sparse=sparse ) return builder def simple_feed_builder( data, is_train, ...
27.3625
75
0.603472
import funcy import numpy as np def make_simple_feed_builder( istrain_str='is_train', sparse=None ): builder = funcy.partial( simple_feed_builder, istrain_str=istrain_str, sparse=sparse ) return builder def simple_feed_builder( data, is_train, ...
true
true
1c16425ce778351dd4ef0ad961c8f6048de73c44
2,240
py
Python
tests/dbtests/__init__.py
Muazzama/Device-Verification-Subsystem
8a481fda9921f73024cd999d0fc015b5238dc7ed
[ "Unlicense" ]
3
2018-11-12T05:44:56.000Z
2018-12-10T08:17:23.000Z
tests/dbtests/__init__.py
Muazzama/Device-Verification-Subsystem
8a481fda9921f73024cd999d0fc015b5238dc7ed
[ "Unlicense" ]
null
null
null
tests/dbtests/__init__.py
Muazzama/Device-Verification-Subsystem
8a481fda9921f73024cd999d0fc015b5238dc7ed
[ "Unlicense" ]
7
2018-12-10T08:17:27.000Z
2021-11-18T05:45:54.000Z
""" Copyright (c) 2018-2019 Qualcomm Technologies, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: Redistributions of source code must retain...
160
908
0.785268
true
true
1c16429be4960d68efb9751e1772c28bc3c98c8c
444
py
Python
mother.py
Leviyu/Kaggle_GCRevenuePrediction
ec041395c8ed31c032536319c2b0478a9c793ad0
[ "MIT" ]
null
null
null
mother.py
Leviyu/Kaggle_GCRevenuePrediction
ec041395c8ed31c032536319c2b0478a9c793ad0
[ "MIT" ]
null
null
null
mother.py
Leviyu/Kaggle_GCRevenuePrediction
ec041395c8ed31c032536319c2b0478a9c793ad0
[ "MIT" ]
null
null
null
""" __file__ mother.py __description__ This file is the main funciton for this exercise __author__ Hongyu Lai < hongyu.hot@gmail.com > """ import sys import numpy as numpy import pandas as pd ################## ################## Read in train and test data ################## Feature Engineering #####...
11.384615
60
0.551802
import sys import numpy as numpy import pandas as pd
true
true
1c1642b624416972705c721db6974a6727a1824a
1,660
py
Python
config/urls.py
ericsallinger/ocr_osler
7739ee9943e24c1fd3f626a143ad62663d3ba0ff
[ "MIT" ]
null
null
null
config/urls.py
ericsallinger/ocr_osler
7739ee9943e24c1fd3f626a143ad62663d3ba0ff
[ "MIT" ]
3
2020-06-07T20:41:24.000Z
2020-07-09T22:15:32.000Z
config/urls.py
ericsallinger/ocr_osler
7739ee9943e24c1fd3f626a143ad62663d3ba0ff
[ "MIT" ]
null
null
null
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import include, path from django.views import defaults as default_views from django.views.generic import TemplateView urlpatterns = [ path("", TemplateView.as_view(template_name="pages/home...
35.319149
86
0.64759
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import include, path from django.views import defaults as default_views from django.views.generic import TemplateView urlpatterns = [ path("", TemplateView.as_view(template_name="pages/home...
true
true
1c16436002bf1c5dfb0340bdf755840263d42018
98
py
Python
converters.py
naxjud/python
77f4e47599ab8affb529660decb64ab394fd4daa
[ "MIT" ]
null
null
null
converters.py
naxjud/python
77f4e47599ab8affb529660decb64ab394fd4daa
[ "MIT" ]
null
null
null
converters.py
naxjud/python
77f4e47599ab8affb529660decb64ab394fd4daa
[ "MIT" ]
null
null
null
def kg_to_lbs(weight): return weight / 0.45 def lbs_to_kg(weight): return weight * 0.45
14
24
0.673469
def kg_to_lbs(weight): return weight / 0.45 def lbs_to_kg(weight): return weight * 0.45
true
true
1c1643b75ee3049490db766ae365e8edaf5fbcf6
1,338
py
Python
azure-iot-provisioning-servicesdk/azure/iot/provisioning/servicesdk/protocol/models/custom_allocation_definition_py3.py
olivakar/azure-iot-sdk-python-preview
636855716a362bad1623983026666b5f91c22825
[ "MIT" ]
6
2019-03-19T18:53:55.000Z
2020-02-23T18:29:57.000Z
azure-iot-provisioning-servicesdk/azure/iot/provisioning/servicesdk/protocol/models/custom_allocation_definition_py3.py
noopkat/azure-iot-sdk-python-preview
f51733e9d3424c33ed86d51e214b20c843716763
[ "MIT" ]
null
null
null
azure-iot-provisioning-servicesdk/azure/iot/provisioning/servicesdk/protocol/models/custom_allocation_definition_py3.py
noopkat/azure-iot-sdk-python-preview
f51733e9d3424c33ed86d51e214b20c843716763
[ "MIT" ]
1
2019-04-11T15:56:50.000Z
2019-04-11T15:56:50.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from ...
37.166667
88
0.615097
from msrest.serialization import Model class CustomAllocationDefinition(Model): _validation = {"webhook_url": {"required": True}, "api_version": {"required": True}} _attribute_map = { "webhook_url": {"key": "webhookUrl", "type": "str"}, "api_version": {"key": "apiVersion", "type": "str"}, ...
true
true
1c164534ed6cd869a60f59e98108c1ac12065549
506
py
Python
fpconv_code/models/ppcnn/modules/se.py
pahn04/PPConv
395957b919786bb5b603f37a94ccf9173afce085
[ "MIT" ]
1
2022-03-29T02:14:57.000Z
2022-03-29T02:14:57.000Z
fpconv_code/models/ppcnn/modules/se.py
pahn04/PPConv
395957b919786bb5b603f37a94ccf9173afce085
[ "MIT" ]
null
null
null
fpconv_code/models/ppcnn/modules/se.py
pahn04/PPConv
395957b919786bb5b603f37a94ccf9173afce085
[ "MIT" ]
1
2022-02-08T05:47:10.000Z
2022-02-08T05:47:10.000Z
import torch.nn as nn __all__ = ['SE'] class SE(nn.Module): def __init__(self, channel, reduction=8): super().__init__() self.fc = nn.Sequential( nn.Linear(channel, channel // reduction, bias=False), nn.ReLU(inplace=True), nn.Linear(channel // reduction, channe...
28.111111
102
0.581028
import torch.nn as nn __all__ = ['SE'] class SE(nn.Module): def __init__(self, channel, reduction=8): super().__init__() self.fc = nn.Sequential( nn.Linear(channel, channel // reduction, bias=False), nn.ReLU(inplace=True), nn.Linear(channel // reduction, channe...
true
true
1c164594c7ad731ce5d3b771540ec74a9b782897
174
py
Python
output/models/ms_data/datatypes/facets/int_pkg/int_min_inclusive001_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/ms_data/datatypes/facets/int_pkg/int_min_inclusive001_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/ms_data/datatypes/facets/int_pkg/int_min_inclusive001_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.ms_data.datatypes.facets.int_pkg.int_min_inclusive001_xsd.int_min_inclusive001 import ( FooType, Test, ) __all__ = [ "FooType", "Test", ]
17.4
106
0.712644
from output.models.ms_data.datatypes.facets.int_pkg.int_min_inclusive001_xsd.int_min_inclusive001 import ( FooType, Test, ) __all__ = [ "FooType", "Test", ]
true
true
1c1645c766f923e3750917564cff2d2f64948448
268
py
Python
mindhome_alpha/erpnext/hr/doctype/training_event/training_event_dashboard.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
mindhome_alpha/erpnext/hr/doctype/training_event/training_event_dashboard.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
null
null
null
mindhome_alpha/erpnext/hr/doctype/training_event/training_event_dashboard.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
from __future__ import unicode_literals from frappe import _ def get_data(): return { 'fieldname': 'training_event', 'transactions': [ { 'items': ['Training Result', 'Training Feedback'] }, ], }
22.333333
65
0.522388
from __future__ import unicode_literals from frappe import _ def get_data(): return { 'fieldname': 'training_event', 'transactions': [ { 'items': ['Training Result', 'Training Feedback'] }, ], }
true
true
1c1645ef39f9f1372bc3cf956da303701f083830
579
py
Python
test/df_utils_test.py
doinalangille/lambdata_doinalangille
f57e1f9f87615bc9d1d1cfada530a542ea4551a1
[ "MIT" ]
null
null
null
test/df_utils_test.py
doinalangille/lambdata_doinalangille
f57e1f9f87615bc9d1d1cfada530a542ea4551a1
[ "MIT" ]
3
2020-03-24T18:29:36.000Z
2021-02-02T22:42:20.000Z
test/df_utils_test.py
doinalangille/lambdata_doinalangille
f57e1f9f87615bc9d1d1cfada530a542ea4551a1
[ "MIT" ]
1
2020-02-11T23:05:07.000Z
2020-02-11T23:05:07.000Z
import unittest import pandas as pd import sklearn from lambdata_doinalangille.df_utils import Dates class DfUtilsTest(unittest.TestCase): def test_date_split(self): # Add a dataframe my_df = Dates({"date": ["01/12/2019", "12/30/2018", "04/23/2019"]}, 'date') # Test that the functi...
28.95
83
0.64076
import unittest import pandas as pd import sklearn from lambdata_doinalangille.df_utils import Dates class DfUtilsTest(unittest.TestCase): def test_date_split(self): my_df = Dates({"date": ["01/12/2019", "12/30/2018", "04/23/2019"]}, 'date') result = my_df.date_split() ...
true
true
1c16465d5690633d1db2a484f223f070a40f51ba
23,378
py
Python
truth_table.py
anthonycurtisadler/ARCADES
3ca061776ef7c43d0ce29f2759df00738c8f9e82
[ "MIT" ]
7
2019-05-30T22:21:48.000Z
2021-02-11T12:25:31.000Z
truth_table.py
anthonycurtisadler/ARCADES
3ca061776ef7c43d0ce29f2759df00738c8f9e82
[ "MIT" ]
4
2020-06-22T22:36:43.000Z
2020-07-10T13:11:10.000Z
truth_table.py
anthonycurtisadler/ARCADES
3ca061776ef7c43d0ce29f2759df00738c8f9e82
[ "MIT" ]
null
null
null
"""TRUTH TABLE GENERATOR by ANTHONY CURTIS ADLER""" to_replace = {'=>':'>', '->':'>', '<>':'#', ' AND ':'&', '^':'&', ' V ':'|', ' OR ':'|', ' and ':'&', ...
30.599476
195
0.455
to_replace = {'=>':'>', '->':'>', '<>':'#', ' AND ':'&', '^':'&', ' V ':'|', ' OR ':'|', ' and ':'&', ' or ':'|', ' iff ':'#', ...
true
true
1c1646d9080c0b5c7c8d3d6bebfe4a49dacf9ef8
735
py
Python
heron/ui/src/python/handlers/mainhandler.py
NunoEdgarGFlowHub/heron
53380553d79a9473184821e5864aedfe9f45f290
[ "Apache-2.0" ]
1
2021-04-25T11:25:44.000Z
2021-04-25T11:25:44.000Z
heron/ui/src/python/handlers/mainhandler.py
NunoEdgarGFlowHub/heron
53380553d79a9473184821e5864aedfe9f45f290
[ "Apache-2.0" ]
null
null
null
heron/ui/src/python/handlers/mainhandler.py
NunoEdgarGFlowHub/heron
53380553d79a9473184821e5864aedfe9f45f290
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Twitter. 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 or agree...
35
74
0.755102
from heron.ui.src.python.handlers import base class MainHandler(base.BaseHandler): def get(self): self.redirect(u"/topologies")
true
true
1c164849294724b5227cd85109d7fb538f3ef384
2,788
py
Python
data/colorization_dataset.py
QuinnQiao/pytorch-CycleGAN-and-pix2pix
1f293d1f7c357002ef963ed0cbdbf87c9ba970f5
[ "BSD-3-Clause" ]
2
2021-04-15T14:41:32.000Z
2021-08-20T07:08:38.000Z
data/colorization_dataset.py
QuinnQiao/pytorch-CycleGAN-and-pix2pix
1f293d1f7c357002ef963ed0cbdbf87c9ba970f5
[ "BSD-3-Clause" ]
null
null
null
data/colorization_dataset.py
QuinnQiao/pytorch-CycleGAN-and-pix2pix
1f293d1f7c357002ef963ed0cbdbf87c9ba970f5
[ "BSD-3-Clause" ]
null
null
null
import os.path from data.base_dataset import BaseDataset, get_params, get_transform from data.image_folder import make_dataset from skimage import color # require skimage from PIL import Image import numpy as np import torchvision.transforms as transforms class ColorizationDataset(BaseDataset): """This dataset c...
39.828571
141
0.640603
import os.path from data.base_dataset import BaseDataset, get_params, get_transform from data.image_folder import make_dataset from skimage import color from PIL import Image import numpy as np import torchvision.transforms as transforms class ColorizationDataset(BaseDataset): @staticmethod def modify_comman...
true
true
1c1648aa77e737c5be56ea9f8cbfbb551ae4a950
1,762
py
Python
baseapp/views/educational_block_views.py
tnemisteam/cdf-steps
78896eebd08ba9975a2dece97f73dca9aa781238
[ "MIT" ]
null
null
null
baseapp/views/educational_block_views.py
tnemisteam/cdf-steps
78896eebd08ba9975a2dece97f73dca9aa781238
[ "MIT" ]
null
null
null
baseapp/views/educational_block_views.py
tnemisteam/cdf-steps
78896eebd08ba9975a2dece97f73dca9aa781238
[ "MIT" ]
null
null
null
from django.views.generic import ListView, DetailView, CreateView, \ DeleteView, UpdateView from baseapp.models import Educational_block class Educational_blockView(object): model = Educational_block def get_template_names(self): """Nest templates within educational...
27.968254
73
0.744608
from django.views.generic import ListView, DetailView, CreateView, \ DeleteView, UpdateView from baseapp.models import Educational_block class Educational_blockView(object): model = Educational_block def get_template_names(self): tpl = super(Educational_blockView, s...
true
true
1c1648c6b4177d81258eb4d344008092ddd83087
3,288
py
Python
examples/debugging/simple_spread/feedforward/decentralised/run_vdn.py
mnguyen0226/Mava
80c583253d769b35491407e3fbbec812b7a085e1
[ "Apache-2.0" ]
null
null
null
examples/debugging/simple_spread/feedforward/decentralised/run_vdn.py
mnguyen0226/Mava
80c583253d769b35491407e3fbbec812b7a085e1
[ "Apache-2.0" ]
null
null
null
examples/debugging/simple_spread/feedforward/decentralised/run_vdn.py
mnguyen0226/Mava
80c583253d769b35491407e3fbbec812b7a085e1
[ "Apache-2.0" ]
null
null
null
# python3 # Copyright 2021 InstaDeep Ltd. 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 applic...
29.357143
77
0.711071
import functools from datetime import datetime from typing import Any import launchpad as lp import sonnet as snt from absl import app, flags from launchpad.nodes.python.local_multi_processing import PythonProcess from mava.components.tf.modules.exploration import LinearExplorationScheduler from mava.systems.tf impo...
true
true
1c1648e0ce8e927d66072995667ed65ed15f7673
2,800
py
Python
tests/test_sentinel.py
jeteon/python-nomad
1e929b98d3c9ca8d76038eca7a7ba52d06a66afe
[ "MIT" ]
null
null
null
tests/test_sentinel.py
jeteon/python-nomad
1e929b98d3c9ca8d76038eca7a7ba52d06a66afe
[ "MIT" ]
null
null
null
tests/test_sentinel.py
jeteon/python-nomad
1e929b98d3c9ca8d76038eca7a7ba52d06a66afe
[ "MIT" ]
null
null
null
import json from mock import patch, MagicMock import requests # integration tests was mocked. @patch('nomad.api.sentinel.Sentinel._get') def test_list_policies(mock_get, nomad_setup): mock_get.return_value = [ { "Name": "foo", ...
48.275862
174
0.5825
import json from mock import patch, MagicMock import requests @patch('nomad.api.sentinel.Sentinel._get') def test_list_policies(mock_get, nomad_setup): mock_get.return_value = [ { "Name": "foo", "Description": "test poli...
true
true
1c1649249ac4a17a4343261d6ff160c4daa01088
762
py
Python
Beginner/7/Project/answerkey.py
Matthew1906/100DaysOfPython
94ffff8f5535ce5d574f49c0d7971d64a4575aad
[ "MIT" ]
1
2021-12-25T02:19:18.000Z
2021-12-25T02:19:18.000Z
Beginner/7/Project/answerkey.py
Matthew1906/100DaysOfPython
94ffff8f5535ce5d574f49c0d7971d64a4575aad
[ "MIT" ]
null
null
null
Beginner/7/Project/answerkey.py
Matthew1906/100DaysOfPython
94ffff8f5535ce5d574f49c0d7971d64a4575aad
[ "MIT" ]
1
2021-11-25T10:31:47.000Z
2021-11-25T10:31:47.000Z
answers =[ "Apple", "Apricot", "Avocado", "Banana", "Bilberry", "Blackberry", "Blackcurrant", "Blueberry", "Cherry", "Coconut", "Cranberry", "Date", "Dragonfruit", "Durian", "Grape", "Grapefruit", "Guava", "Jackfruit", "Jujube", "Kiwifruit"...
14.941176
19
0.480315
answers =[ "Apple", "Apricot", "Avocado", "Banana", "Bilberry", "Blackberry", "Blackcurrant", "Blueberry", "Cherry", "Coconut", "Cranberry", "Date", "Dragonfruit", "Durian", "Grape", "Grapefruit", "Guava", "Jackfruit", "Jujube", "Kiwifruit"...
true
true
1c1649daaccd811584e70088e034aaf7f73fd43c
10,300
py
Python
tests/core/test_cost_calculation.py
konarshankar07/bytecash-blockchain
1c1fab19664e7777b75be1a60facb8a454341443
[ "Apache-2.0" ]
null
null
null
tests/core/test_cost_calculation.py
konarshankar07/bytecash-blockchain
1c1fab19664e7777b75be1a60facb8a454341443
[ "Apache-2.0" ]
null
null
null
tests/core/test_cost_calculation.py
konarshankar07/bytecash-blockchain
1c1fab19664e7777b75be1a60facb8a454341443
[ "Apache-2.0" ]
null
null
null
import asyncio import logging import pathlib import time import pytest from clvm_tools import binutils from bytecash.consensus.condition_costs import ConditionCost from bytecash.consensus.cost_calculator import NPCResult, calculate_cost_of_program from bytecash.full_node.bundle_tools import simple_solution_generator ...
39.015152
120
0.675631
import asyncio import logging import pathlib import time import pytest from clvm_tools import binutils from bytecash.consensus.condition_costs import ConditionCost from bytecash.consensus.cost_calculator import NPCResult, calculate_cost_of_program from bytecash.full_node.bundle_tools import simple_solution_generator ...
true
true
1c164a0a2b007ca07187e0174f3f49080e129f39
3,503
py
Python
statsmodels/iolib/tests/test_summary_old.py
nikhase/statsmodels
e1822d4513f442002816bb898ca5794785f35c32
[ "BSD-3-Clause" ]
15
2015-03-03T09:47:42.000Z
2022-01-05T18:28:31.000Z
statsmodels/iolib/tests/test_summary_old.py
nikhase/statsmodels
e1822d4513f442002816bb898ca5794785f35c32
[ "BSD-3-Clause" ]
7
2015-11-20T08:33:04.000Z
2020-07-24T19:34:39.000Z
statsmodels/iolib/tests/test_summary_old.py
nikhase/statsmodels
e1822d4513f442002816bb898ca5794785f35c32
[ "BSD-3-Clause" ]
14
2015-01-06T22:08:34.000Z
2021-01-01T16:33:23.000Z
from statsmodels.compat.python import zip import warnings def _est_regression_summary(): #little luck getting this test to pass (It should?), can be used for #visual testing of the regression.summary table #fixed, might fail at minute changes from statsmodels.regression.tests.test_regression import Tes...
46.092105
81
0.420782
from statsmodels.compat.python import zip import warnings def _est_regression_summary(): from statsmodels.regression.tests.test_regression import TestOLS import time from string import Template t = time.localtime() desired = Template( ''' Summary of Regression Results ==========...
true
true
1c164a4b1af3e45c546e0c3dd4ed433f578da1f3
2,173
py
Python
app.py
mxw7265/URL-Shortener
4defae592a9338cb2393def33950a3eed9dca9a9
[ "MIT" ]
null
null
null
app.py
mxw7265/URL-Shortener
4defae592a9338cb2393def33950a3eed9dca9a9
[ "MIT" ]
null
null
null
app.py
mxw7265/URL-Shortener
4defae592a9338cb2393def33950a3eed9dca9a9
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request, redirect, url_for from flask_sqlalchemy import SQLAlchemy import string import random SHORT_LENGTH = 4 app = Flask(__name__) app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///urls.db" app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False db = SQLAlchemy(app) class ...
28.220779
78
0.662218
from flask import Flask, render_template, request, redirect, url_for from flask_sqlalchemy import SQLAlchemy import string import random SHORT_LENGTH = 4 app = Flask(__name__) app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///urls.db" app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False db = SQLAlchemy(app) class ...
true
true
1c164b1012dbfef7acb4e22a8c583c0a32d3169a
4,202
py
Python
tests/test_views.py
sundippatel/flask
eea93424142ede248d9febee6be11b37faf9fbb1
[ "BSD-3-Clause" ]
2
2015-08-07T18:01:01.000Z
2015-08-14T03:29:10.000Z
tests/test_views.py
sundippatel/flask
eea93424142ede248d9febee6be11b37faf9fbb1
[ "BSD-3-Clause" ]
2
2015-03-30T05:28:35.000Z
2015-06-28T01:08:50.000Z
tests/test_views.py
sundippatel/flask
eea93424142ede248d9febee6be11b37faf9fbb1
[ "BSD-3-Clause" ]
2
2015-03-04T05:06:55.000Z
2015-03-29T22:46:19.000Z
# -*- coding: utf-8 -*- """ tests.views ~~~~~~~~~~~ Pluggable views. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import pytest import flask import flask.views from werkzeug.http import parse_set_header def common_test(app): c = app.test_client()...
25.779141
76
0.593289
import pytest import flask import flask.views from werkzeug.http import parse_set_header def common_test(app): c = app.test_client() assert c.get('/').data == b'GET' assert c.post('/').data == b'POST' assert c.put('/').status_code == 405 meths = parse_set_header(c.open('/', method='OPTIONS').he...
true
true
1c164b2fe02c0143ba66a503d879a2ad635b9245
28
py
Python
saywhen/__init__.py
yunqing/saywhen
d08c8496c9ee848d176ab6422b2793cecddc1b69
[ "MIT" ]
1
2021-08-28T05:30:40.000Z
2021-08-28T05:30:40.000Z
saywhen/__init__.py
yunqing/saywhen
d08c8496c9ee848d176ab6422b2793cecddc1b69
[ "MIT" ]
1
2022-01-14T08:57:19.000Z
2022-01-14T08:57:20.000Z
saywhen/__init__.py
yunqing/saywhen
d08c8496c9ee848d176ab6422b2793cecddc1b69
[ "MIT" ]
1
2022-01-11T10:14:27.000Z
2022-01-11T10:14:27.000Z
from .notification import *
14
27
0.785714
from .notification import *
true
true
1c164b58f93865378605480d63cfc0f00107821d
174
py
Python
students/k3343/practical_works/Nazarenko_Uliana/Pr_2/Django_project_Nazarenko/urls.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
10
2020-03-20T09:06:12.000Z
2021-07-27T13:06:02.000Z
students/k3343/practical_works/Nazarenko_Uliana/Pr_2/Django_project_Nazarenko/urls.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
134
2020-03-23T09:47:48.000Z
2022-03-12T01:05:19.000Z
students/k3343/practical_works/Nazarenko_Uliana/Pr_2/Django_project_Nazarenko/urls.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
71
2020-03-20T12:45:56.000Z
2021-10-31T19:22:25.000Z
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('', include('project_first_app.urls')) ]
24.857143
47
0.712644
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('', include('project_first_app.urls')) ]
true
true
1c164b9afeb87d8d66487f01eb6795028d92ad54
3,280
py
Python
operation/execution/build_training_pipeline.py
Felihong/dstoolkit-objectdetection-tensorflow-azureml
d51160a85cff095ee84a3e609ab0cd1b7f8d8186
[ "Apache-2.0" ]
8
2021-11-16T16:18:08.000Z
2022-03-12T05:41:06.000Z
operation/execution/build_training_pipeline.py
Felihong/dstoolkit-objectdetection-tensorflow-azureml
d51160a85cff095ee84a3e609ab0cd1b7f8d8186
[ "Apache-2.0" ]
5
2021-11-17T15:59:33.000Z
2021-12-07T14:52:28.000Z
operation/execution/build_training_pipeline.py
Felihong/dstoolkit-objectdetection-tensorflow-azureml
d51160a85cff095ee84a3e609ab0cd1b7f8d8186
[ "Apache-2.0" ]
8
2021-11-19T02:23:09.000Z
2022-03-23T12:14:12.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import argparse from azureml.core import Datastore, Environment from azureml.data.data_reference import DataReference from azureml.pipeline.steps import PythonScriptStep from azureml.core.runconfig import RunConfiguration f...
33.814433
69
0.63872
import argparse from azureml.core import Datastore, Environment from azureml.data.data_reference import DataReference from azureml.pipeline.steps import PythonScriptStep from azureml.core.runconfig import RunConfiguration from utils import config, workspace, compute, pipeline def main(train_script, base_m...
true
true
1c164d4e38ada5d248da046680dfd2ad607591bb
12,806
py
Python
lib/model/faster_rcnn/resnet.py
EllonLi/faster-rcnn-pytorch
577a5062f3643b2667d9d28018b07e255dbf7551
[ "MIT" ]
null
null
null
lib/model/faster_rcnn/resnet.py
EllonLi/faster-rcnn-pytorch
577a5062f3643b2667d9d28018b07e255dbf7551
[ "MIT" ]
null
null
null
lib/model/faster_rcnn/resnet.py
EllonLi/faster-rcnn-pytorch
577a5062f3643b2667d9d28018b07e255dbf7551
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from model.utils.config import cfg from model.faster_rcnn.faster_rcnn import _fasterRCNN import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import math impor...
32.338384
111
0.65524
from __future__ import absolute_import from __future__ import division from __future__ import print_function from model.utils.config import cfg from model.faster_rcnn.faster_rcnn import _fasterRCNN import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import math impor...
true
true
1c164e89d4aa6276206b8a673711c295be30197b
3,545
py
Python
eff_gcn_modules/rev/rev_layer.py
mufeili/deep_gcns_torch
54c88d7a8923b5210797a5bf1a0d749448ba9f9f
[ "MIT" ]
937
2019-07-30T20:32:05.000Z
2022-03-31T09:25:33.000Z
eff_gcn_modules/rev/rev_layer.py
mufeili/deep_gcns_torch
54c88d7a8923b5210797a5bf1a0d749448ba9f9f
[ "MIT" ]
57
2019-08-19T09:13:06.000Z
2022-02-07T15:11:40.000Z
eff_gcn_modules/rev/rev_layer.py
mufeili/deep_gcns_torch
54c88d7a8923b5210797a5bf1a0d749448ba9f9f
[ "MIT" ]
148
2019-08-01T08:18:50.000Z
2022-03-21T21:18:43.000Z
import torch import torch.nn as nn import torch.nn.functional as F try: from torch_geometric.nn import GCNConv, SAGEConv, GATConv from gcn_lib.sparse.torch_vertex import GENConv from gcn_lib.sparse.torch_nn import norm_layer except: print("An import exception occurred") class SharedDropout(nn.Module):...
32.227273
71
0.532581
import torch import torch.nn as nn import torch.nn.functional as F try: from torch_geometric.nn import GCNConv, SAGEConv, GATConv from gcn_lib.sparse.torch_vertex import GENConv from gcn_lib.sparse.torch_nn import norm_layer except: print("An import exception occurred") class SharedDropout(nn.Module):...
true
true
1c164f898894f45c2fd73e62f21c0cecfcde3a11
480
py
Python
src/kobo/constants.py
rchiechi/FeedstoKobo
003a08cf253dabf6f0cc795e5109863d9c4830a1
[ "MIT" ]
1
2021-04-20T07:28:15.000Z
2021-04-20T07:28:15.000Z
src/kobo/constants.py
rchiechi/FeedstoKobo
003a08cf253dabf6f0cc795e5109863d9c4830a1
[ "MIT" ]
null
null
null
src/kobo/constants.py
rchiechi/FeedstoKobo
003a08cf253dabf6f0cc795e5109863d9c4830a1
[ "MIT" ]
null
null
null
'''Global constants''' STRFTIME='%Y-%m-%d %H:%M:%S' HASH='md5' # Formatted for Kobo reader # PDFOPTIONS = { # 'page-height': '155mm', # 'page-width': '115mm', # 'margin-top': '2mm', # 'margin-right': '2mm', # 'margin-bottom': '2mm', # 'margin-lef...
25.263158
40
0.404167
STRFTIME='%Y-%m-%d %H:%M:%S' HASH='md5'
true
true
1c1650544667d5cb657eeeb3602f194105009e18
2,995
py
Python
hardware/channel.py
Psychedelic-Engineering/sleep-machine
2fcb486b3735fc8ec1d3d29e75c6c9bb60c7d2a7
[ "MIT" ]
1
2018-04-10T11:44:02.000Z
2018-04-10T11:44:02.000Z
hardware/channel.py
Psychedelic-Engineering/sleep-machine
2fcb486b3735fc8ec1d3d29e75c6c9bb60c7d2a7
[ "MIT" ]
null
null
null
hardware/channel.py
Psychedelic-Engineering/sleep-machine
2fcb486b3735fc8ec1d3d29e75c6c9bb60c7d2a7
[ "MIT" ]
null
null
null
from collections import deque import math import numpy as np from scipy import signal class Channel: def __init__(self, name, min, max, maxNum, offset=0.0): self.name = name self.min = min self.max = max self.num = 0 self.sum = 0 self.buffersum = 0 self.size = maxNum self.buffer = deque(maxlen=maxNu...
24.752066
68
0.62404
from collections import deque import math import numpy as np from scipy import signal class Channel: def __init__(self, name, min, max, maxNum, offset=0.0): self.name = name self.min = min self.max = max self.num = 0 self.sum = 0 self.buffersum = 0 self.size = maxNum self.buffer = deque(maxlen=maxNu...
true
true
1c165058ceb454cdc1d8d23255c313ff3f832764
10,996
py
Python
tech_project/lib/python2.7/site-packages/phonenumbers/data/region_AR.py
priyamshah112/Project-Descripton-Blog
8e01016c6be79776c4f5ca75563fa3daa839e39e
[ "MIT" ]
27
2019-11-18T05:06:01.000Z
2021-02-28T19:38:09.000Z
tech_project/lib/python2.7/site-packages/phonenumbers/data/region_AR.py
priyamshah112/Project-Descripton-Blog
8e01016c6be79776c4f5ca75563fa3daa839e39e
[ "MIT" ]
21
2020-12-29T21:29:31.000Z
2022-03-12T00:53:57.000Z
tech_project/lib/python2.7/site-packages/phonenumbers/data/region_AR.py
priyamshah112/Project-Descripton-Blog
8e01016c6be79776c4f5ca75563fa3daa839e39e
[ "MIT" ]
6
2020-01-09T21:55:38.000Z
2021-09-17T01:22:48.000Z
"""Auto-generated file, do not edit by hand. AR metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_AR = PhoneMetadata(id='AR', country_code=54, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='11\\d{8}|(?:[2368]|9\\d)\\d{9}', possible...
323.411765
1,494
0.516915
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_AR = PhoneMetadata(id='AR', country_code=54, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='11\\d{8}|(?:[2368]|9\\d)\\d{9}', possible_length=(10, 11), possible_length_local_only=(6, 7, 8)), ...
true
true
1c16505fa4e6a9435b5c3c6e3f3441fb37e5b98a
485
py
Python
RPi.GPIO_BP/test/gpio_pull.py
k0staa/ProjectRobot
5dc897a6e3890f5b025c93abb6bf8a3748f4da04
[ "Unlicense", "MIT" ]
null
null
null
RPi.GPIO_BP/test/gpio_pull.py
k0staa/ProjectRobot
5dc897a6e3890f5b025c93abb6bf8a3748f4da04
[ "Unlicense", "MIT" ]
null
null
null
RPi.GPIO_BP/test/gpio_pull.py
k0staa/ProjectRobot
5dc897a6e3890f5b025c93abb6bf8a3748f4da04
[ "Unlicense", "MIT" ]
null
null
null
#!/usr/bin/env python import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BOARD) GPIO.setup(7, GPIO.IN, pull_up_down=GPIO.PUD_UP) print "\n value_7 = %d\n" %(GPIO.input(7)) GPIO.setup(8, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) print "\n value_8 = %d\n" %(GPIO.input(8)) GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_...
26.944444
51
0.694845
import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BOARD) GPIO.setup(7, GPIO.IN, pull_up_down=GPIO.PUD_UP) print "\n value_7 = %d\n" %(GPIO.input(7)) GPIO.setup(8, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) print "\n value_8 = %d\n" %(GPIO.input(8)) GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP) print "\n value_12...
false
true
1c16507f960cfcb64b4caf43df3cfb1bd7001ab1
37,584
py
Python
tests/components/rfxtrx/test_config_flow.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
11
2018-02-16T15:35:47.000Z
2020-01-14T15:20:00.000Z
tests/components/rfxtrx/test_config_flow.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
79
2020-07-23T07:13:37.000Z
2022-03-22T06:02:37.000Z
tests/components/rfxtrx/test_config_flow.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11
2020-12-16T13:48:14.000Z
2022-02-01T00:28:05.000Z
"""Test the Tado config flow.""" import os from unittest.mock import MagicMock, patch, sentinel import serial.tools.list_ports from homeassistant import config_entries, data_entry_flow, setup from homeassistant.components.rfxtrx import DOMAIN, config_flow from homeassistant.helpers import device_registry as dr, entit...
30.58096
87
0.63684
import os from unittest.mock import MagicMock, patch, sentinel import serial.tools.list_ports from homeassistant import config_entries, data_entry_flow, setup from homeassistant.components.rfxtrx import DOMAIN, config_flow from homeassistant.helpers import device_registry as dr, entity_registry as er from tests.comm...
true
true
1c1650bc43f20da5fdc0d17eb20c5cf561620597
710
py
Python
cornac/models/coe/__init__.py
carmanzhang/cornac
215efd0ffa7b8ee1afe1ac6b5cc650ee6303ace3
[ "Apache-2.0" ]
597
2018-07-17T10:59:56.000Z
2022-03-31T07:59:36.000Z
cornac/models/coe/__init__.py
carmanzhang/cornac
215efd0ffa7b8ee1afe1ac6b5cc650ee6303ace3
[ "Apache-2.0" ]
137
2018-10-12T10:52:11.000Z
2022-03-04T15:26:49.000Z
cornac/models/coe/__init__.py
carmanzhang/cornac
215efd0ffa7b8ee1afe1ac6b5cc650ee6303ace3
[ "Apache-2.0" ]
112
2018-07-26T04:36:34.000Z
2022-03-31T02:29:34.000Z
# Copyright 2018 The Cornac 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 ...
44.375
78
0.68169
from .recom_coe import COE
true
true
1c1650cfc3860275cdcd993ba72bb3c4b374b826
2,070
py
Python
export_json.py
baylee-d/cos.io
3f88acb0feb7a167bf9e81c42e28f9d2d38bbd43
[ "Apache-2.0" ]
null
null
null
export_json.py
baylee-d/cos.io
3f88acb0feb7a167bf9e81c42e28f9d2d38bbd43
[ "Apache-2.0" ]
null
null
null
export_json.py
baylee-d/cos.io
3f88acb0feb7a167bf9e81c42e28f9d2d38bbd43
[ "Apache-2.0" ]
null
null
null
import json import django django.setup() from common.models import Organization # NOQA import io # NOQA def save_to_journal_json(file_name, para_name, file_option): bulk = [] get_entries = 'Journal.objects.filter(is_' + para_name + '_journal=True)' entries = eval(get_entries) if file_option == 1: ...
29.571429
77
0.609662
import json import django django.setup() from common.models import Organization import io def save_to_journal_json(file_name, para_name, file_option): bulk = [] get_entries = 'Journal.objects.filter(is_' + para_name + '_journal=True)' entries = eval(get_entries) if file_option == 1: for e in ...
true
true
1c1653646a76daa15e56c0c8c631b85ed983866b
593
py
Python
test/test_scatter.py
satejsoman/matplotlib2tikz
583a66f6842d236ee42d85485de9c6a503585893
[ "MIT" ]
null
null
null
test/test_scatter.py
satejsoman/matplotlib2tikz
583a66f6842d236ee42d85485de9c6a503585893
[ "MIT" ]
null
null
null
test/test_scatter.py
satejsoman/matplotlib2tikz
583a66f6842d236ee42d85485de9c6a503585893
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # from helpers import assert_equality def plot(): from matplotlib import pyplot as plt import numpy as np fig = plt.figure() with plt.style.context(("fivethirtyeight")): np.random.seed(123) plt.scatter( np.linspace(0, 100, 101), np.linsp...
19.766667
64
0.607083
from helpers import assert_equality def plot(): from matplotlib import pyplot as plt import numpy as np fig = plt.figure() with plt.style.context(("fivethirtyeight")): np.random.seed(123) plt.scatter( np.linspace(0, 100, 101), np.linspace(0, 100, 101) + 15 * np...
true
true
1c165463bfe4862465290db055b5719563a403b6
195
py
Python
atcoder/abc062/b.py
Ashindustry007/competitive-programming
2eabd3975c029d235abb7854569593d334acae2f
[ "WTFPL" ]
506
2018-08-22T10:30:38.000Z
2022-03-31T10:01:49.000Z
atcoder/abc062/b.py
Ashindustry007/competitive-programming
2eabd3975c029d235abb7854569593d334acae2f
[ "WTFPL" ]
13
2019-08-07T18:31:18.000Z
2020-12-15T21:54:41.000Z
atcoder/abc062/b.py
Ashindustry007/competitive-programming
2eabd3975c029d235abb7854569593d334acae2f
[ "WTFPL" ]
234
2018-08-06T17:11:41.000Z
2022-03-26T10:56:42.000Z
#!/usr/bin/env python3 # https://abc062.contest.atcoder.jp/tasks/abc062_b h, w = map(int, input().split()) print('#' * (w + 2)) for _ in range(h): print('#' + input() + '#') print('#' * (w + 2))
27.857143
50
0.564103
h, w = map(int, input().split()) print('#' * (w + 2)) for _ in range(h): print('#' + input() + '#') print('#' * (w + 2))
true
true
1c1654dd4e44073cccc563ba00b5d35e5949d386
502
py
Python
fasttest/utils/__init__.py
Hanlen520/fasttest
f302adabc0250d1540a6bf97605cef81ce929bc2
[ "MIT" ]
17
2020-03-26T10:02:29.000Z
2021-04-22T09:03:44.000Z
fasttest/utils/__init__.py
Hanlen520/fasttest
f302adabc0250d1540a6bf97605cef81ce929bc2
[ "MIT" ]
null
null
null
fasttest/utils/__init__.py
Hanlen520/fasttest
f302adabc0250d1540a6bf97605cef81ce929bc2
[ "MIT" ]
5
2020-02-21T01:45:09.000Z
2021-04-21T19:59:08.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from fasttest.utils.yaml_utils import analytical_file from fasttest.utils.devices_utils import DevicesUtils from fasttest.utils.opcv_utils import OpencvUtils from fasttest.utils.server_utils_app import ServerUtilsApp from fasttest.utils.server_utils_web import Server...
50.2
113
0.812749
from fasttest.utils.yaml_utils import analytical_file from fasttest.utils.devices_utils import DevicesUtils from fasttest.utils.opcv_utils import OpencvUtils from fasttest.utils.server_utils_app import ServerUtilsApp from fasttest.utils.server_utils_web import ServerUtilsWeb from fasttest.utils.testcast_utils impo...
true
true
1c1655910f7b1545d4a6072eb3f96de9138f5885
2,253
py
Python
pbjson/tests/__init__.py
scottkmaxwell/pbjson
d584eb8c49b072f746eb1f5183c63259670f6d4a
[ "AFL-2.1" ]
2
2022-02-11T05:28:46.000Z
2022-03-11T21:05:06.000Z
pbjson/tests/__init__.py
scottkmaxwell/pbjson
d584eb8c49b072f746eb1f5183c63259670f6d4a
[ "AFL-2.1" ]
2
2020-03-14T19:37:20.000Z
2020-06-23T17:20:04.000Z
pbjson/tests/__init__.py
scottkmaxwell/pbjson
d584eb8c49b072f746eb1f5183c63259670f6d4a
[ "AFL-2.1" ]
1
2020-05-23T22:29:04.000Z
2020-05-23T22:29:04.000Z
from __future__ import absolute_import import unittest import sys class OptionalExtensionTestSuite(unittest.TestSuite): def run(self, result, debug=False): import pbjson run = unittest.TestSuite.run for i in range(1): run(self, result) if not pbjson._has_encoder_spe...
30.863014
100
0.642699
from __future__ import absolute_import import unittest import sys class OptionalExtensionTestSuite(unittest.TestSuite): def run(self, result, debug=False): import pbjson run = unittest.TestSuite.run for i in range(1): run(self, result) if not pbjson._has_encoder_spe...
true
true
1c165658b4c0a383465f97c0d4182760c353fff3
10,026
py
Python
clevertimapi/endpoint.py
ciprianmiclaus/clevertim-api-py
42117044b34a83eaf0e2b05645a1bf42a8bbd440
[ "BSD-3-Clause" ]
1
2017-05-03T17:58:27.000Z
2017-05-03T17:58:27.000Z
clevertimapi/endpoint.py
ciprianmiclaus/clevertim-api-py
42117044b34a83eaf0e2b05645a1bf42a8bbd440
[ "BSD-3-Clause" ]
null
null
null
clevertimapi/endpoint.py
ciprianmiclaus/clevertim-api-py
42117044b34a83eaf0e2b05645a1bf42a8bbd440
[ "BSD-3-Clause" ]
null
null
null
from .session import Session from .utils import list_wrapper class ValueSerializer(object): def _check_needs_loading(self): """check if it needs to load the endpoint.""" def serialize(self): """Custom serialize a value.""" def _apply_validate_func(validate_func, value): if validate_func...
34.453608
156
0.656892
from .session import Session from .utils import list_wrapper class ValueSerializer(object): def _check_needs_loading(self): def serialize(self): def _apply_validate_func(validate_func, value): if validate_func: ret = validate_func(value) if not ret: raise ValidationE...
true
true
1c1657d7c89012cac619aa9dd4c45d16d3468203
901
py
Python
level3_3 - Prepare the Bunnies' Escape/solution.py
berman82312/google-foobar
e5185f8b5d59519aa2ee0c74d4157faa80054e8a
[ "MIT" ]
null
null
null
level3_3 - Prepare the Bunnies' Escape/solution.py
berman82312/google-foobar
e5185f8b5d59519aa2ee0c74d4157faa80054e8a
[ "MIT" ]
null
null
null
level3_3 - Prepare the Bunnies' Escape/solution.py
berman82312/google-foobar
e5185f8b5d59519aa2ee0c74d4157faa80054e8a
[ "MIT" ]
null
null
null
def bfs(start, maze): y_len = len(maze) x_len = len(maze[0]) result = [[None for _ in xrange(x_len)] for _ in xrange(y_len)] result[start[1]][start[0]] = 1 next_points = [start] for current in next_points: x, y = current movements = [(1, 0), (0, 1), (-1, 0), (0, -1)] for move in movements: ...
28.15625
65
0.531632
def bfs(start, maze): y_len = len(maze) x_len = len(maze[0]) result = [[None for _ in xrange(x_len)] for _ in xrange(y_len)] result[start[1]][start[0]] = 1 next_points = [start] for current in next_points: x, y = current movements = [(1, 0), (0, 1), (-1, 0), (0, -1)] for move in movements: ...
true
true
1c16581c2d44d33a5f2cd5b861c3b52fef9fd392
177
py
Python
pyramid_app/routes.py
marinewater/pyramid-social-auth
926f230294ec6b0fdf02a5ed4113073d82a9d18c
[ "MIT" ]
2
2015-02-10T01:19:21.000Z
2016-07-24T14:40:59.000Z
pyramid_app/routes.py
marinewater/pyramid-social-auth
926f230294ec6b0fdf02a5ed4113073d82a9d18c
[ "MIT" ]
null
null
null
pyramid_app/routes.py
marinewater/pyramid-social-auth
926f230294ec6b0fdf02a5ed4113073d82a9d18c
[ "MIT" ]
null
null
null
def includeme(config): config.add_route('pyramid-social-auth.auth', '/psa/login/{provider}') config.add_route('pyramid-social-auth.complete', '/psa/complete/{provider}')
59
80
0.728814
def includeme(config): config.add_route('pyramid-social-auth.auth', '/psa/login/{provider}') config.add_route('pyramid-social-auth.complete', '/psa/complete/{provider}')
true
true
1c16584f124c4db867c4605e347c176140d51761
8,473
py
Python
virtual/lib/python3.8/site-packages/sqlalchemy/engine/url.py
valentine-ochieng/Personal-blogging-website-
5f9b4a6e6feefb344d32ecaa64c6f284c7b2c56e
[ "MIT" ]
13
2020-03-27T04:37:45.000Z
2022-03-27T12:50:30.000Z
virtual/lib/python3.6/site-packages/sqlalchemy/engine/url.py
annstella/blog
1cdb7e7e7df028a84fae9b7d901116aae577589d
[ "MIT" ]
95
2018-01-31T20:28:13.000Z
2018-04-10T01:55:35.000Z
virtual/lib/python3.6/site-packages/sqlalchemy/engine/url.py
annstella/blog
1cdb7e7e7df028a84fae9b7d901116aae577589d
[ "MIT" ]
3
2020-03-27T20:46:01.000Z
2022-03-05T08:57:40.000Z
# engine/url.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Provides the :class:`~sqlalchemy.engine.url.URL` class which encapsulates informati...
32.339695
79
0.580904
import re from .. import exc, util from . import Dialect from ..dialects import registry, plugins class URL(object): def __init__(self, drivername, username=None, password=None, host=None, port=None, database=None, query=None): self.drivername = drivername self.username = usern...
true
true
1c1658f23c26f43608a2049d29f4c9b95fa4a247
667
py
Python
dynamic_rest/fields/__init__.py
imposeren/dynamic-rest
2b7e85c094904703a43bf44d3d45ea823b3397eb
[ "MIT" ]
null
null
null
dynamic_rest/fields/__init__.py
imposeren/dynamic-rest
2b7e85c094904703a43bf44d3d45ea823b3397eb
[ "MIT" ]
null
null
null
dynamic_rest/fields/__init__.py
imposeren/dynamic-rest
2b7e85c094904703a43bf44d3d45ea823b3397eb
[ "MIT" ]
1
2019-04-25T13:57:33.000Z
2019-04-25T13:57:33.000Z
# flake8: noqa from .base import ( DynamicField, CountField, DynamicComputedField ) from .file import DynamicFileField, DynamicImageField from .relation import DynamicRelationField, DynamicCreatorField from .generic import DynamicGenericRelationField from .choice import DynamicChoiceField from .link import ...
33.35
63
0.844078
from .base import ( DynamicField, CountField, DynamicComputedField ) from .file import DynamicFileField, DynamicImageField from .relation import DynamicRelationField, DynamicCreatorField from .generic import DynamicGenericRelationField from .choice import DynamicChoiceField from .link import DynamicLinkFiel...
true
true
1c16593ea35f5213f4c9527304d69b728b35ec02
601
py
Python
Groups/Group_ID_31/Morphological/binary_dilution.py
gupta19avaneesh/DataScience
b37fc1208fc47187352b2066dbdca629014d92db
[ "MIT" ]
null
null
null
Groups/Group_ID_31/Morphological/binary_dilution.py
gupta19avaneesh/DataScience
b37fc1208fc47187352b2066dbdca629014d92db
[ "MIT" ]
null
null
null
Groups/Group_ID_31/Morphological/binary_dilution.py
gupta19avaneesh/DataScience
b37fc1208fc47187352b2066dbdca629014d92db
[ "MIT" ]
null
null
null
import skimage.morphology as mp import numpy as np import cv2 as cv from convert_binary import rgbtobin dil=[] selem=mp.disk(5,np.uint8) #img=cv.imread('binary.png') #ret,img = cv.threshold(img,127,1,cv.THRESH_BINARY) #rgbtobin(img) image=cv.imread('binary.png',cv.IMREAD_GRAYSCALE) img = cv.threshold...
23.115385
56
0.717138
import skimage.morphology as mp import numpy as np import cv2 as cv from convert_binary import rgbtobin dil=[] selem=mp.disk(5,np.uint8) image=cv.imread('binary.png',cv.IMREAD_GRAYSCALE) img = cv.threshold(image,128, 255, cv.THRESH_BINARY)[1] cv.imwrite('binary_con.png',img) bin_img=cv.imread('binar...
true
true
1c165b06319a958b2217e20adc283572ee77fc67
386
py
Python
UKF_Slam/C++/plot.py
jjd9/RobotMapping_SLAM_Assignments_In_Cpp
4810a5dbb9ec8f07c8412d27049426a384ef3120
[ "MIT" ]
1
2021-12-16T23:42:44.000Z
2021-12-16T23:42:44.000Z
UKF_Slam/C++/plot.py
jjd9/RobotMapping_SLAM_Assignments_In_Cpp
4810a5dbb9ec8f07c8412d27049426a384ef3120
[ "MIT" ]
null
null
null
UKF_Slam/C++/plot.py
jjd9/RobotMapping_SLAM_Assignments_In_Cpp
4810a5dbb9ec8f07c8412d27049426a384ef3120
[ "MIT" ]
1
2022-01-12T14:14:52.000Z
2022-01-12T14:14:52.000Z
import matplotlib.pyplot as plt import pandas as pd data = pd.read_csv("SLAM_estimates.csv").values robot = data[:,:2] plt.plot(robot[:,0],robot[:,1],'k-o',label='robot') for j, i in enumerate(range(3,data.shape[1],2)): print(i) plt.plot(data[:,i],data[:,i+1],'o', label = 'landmark: '+ str(j)) plt.grid() pl...
21.444444
69
0.645078
import matplotlib.pyplot as plt import pandas as pd data = pd.read_csv("SLAM_estimates.csv").values robot = data[:,:2] plt.plot(robot[:,0],robot[:,1],'k-o',label='robot') for j, i in enumerate(range(3,data.shape[1],2)): print(i) plt.plot(data[:,i],data[:,i+1],'o', label = 'landmark: '+ str(j)) plt.grid() pl...
true
true
1c165ba5abaf9266c8dad97a62b07e5df7434305
59,607
bzl
Python
tensorflow/workspace.bzl
caos21/tensorflow
2ad57928530e3e10ba89e91ff4df3c6fa9feafa0
[ "Apache-2.0" ]
1
2020-08-19T20:14:08.000Z
2020-08-19T20:14:08.000Z
tensorflow/workspace.bzl
caos21/tensorflow
2ad57928530e3e10ba89e91ff4df3c6fa9feafa0
[ "Apache-2.0" ]
null
null
null
tensorflow/workspace.bzl
caos21/tensorflow
2ad57928530e3e10ba89e91ff4df3c6fa9feafa0
[ "Apache-2.0" ]
null
null
null
# TensorFlow external dependencies that can be loaded in WORKSPACE files. load("//third_party/gpus:cuda_configure.bzl", "cuda_configure") load("//third_party/gpus:rocm_configure.bzl", "rocm_configure") load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure") load("//third_party/nccl:nccl_configure.b...
48.658776
203
0.688157
load("//third_party/gpus:cuda_configure.bzl", "cuda_configure") load("//third_party/gpus:rocm_configure.bzl", "rocm_configure") load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure") load("//third_party/nccl:nccl_configure.bzl", "nccl_configure") load("//third_party/mkl:build_defs.bzl", "mkl_repos...
true
true
1c165d42cefc559f414bbb4ebc73bd326d85981a
1,781
py
Python
find_tweets.py
Mattio89/visualization
562f231c887e7328cd098a3a675cf5b99bec8aaa
[ "MIT" ]
null
null
null
find_tweets.py
Mattio89/visualization
562f231c887e7328cd098a3a675cf5b99bec8aaa
[ "MIT" ]
null
null
null
find_tweets.py
Mattio89/visualization
562f231c887e7328cd098a3a675cf5b99bec8aaa
[ "MIT" ]
null
null
null
#Tweet Finding import pandas as pd import matplotlib.pyplot as plt import matplotlib.dates as mdates from matplotlib.dates import DateFormatter import matplotlib.ticker as mtick import numpy as np import datetime dforlando = pd.read_csv("ORLANDO_Full.csv", usecols=[3,4], header=0, names=['url', 'text'], nrows=89999, ...
41.418605
141
0.713644
import pandas as pd import matplotlib.pyplot as plt import matplotlib.dates as mdates from matplotlib.dates import DateFormatter import matplotlib.ticker as mtick import numpy as np import datetime dforlando = pd.read_csv("ORLANDO_Full.csv", usecols=[3,4], header=0, names=['url', 'text'], nrows=89999, parse_dates=Tru...
true
true
1c165e01fbc0f1468078ad4bb2d87b462b54a651
3,874
py
Python
pypureclient/flasharray/FA_2_8/models/reference_with_type.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
14
2018-12-07T18:30:27.000Z
2022-02-22T09:12:33.000Z
pypureclient/flasharray/FA_2_8/models/reference_with_type.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
28
2019-09-17T21:03:52.000Z
2022-03-29T22:07:35.000Z
pypureclient/flasharray/FA_2_8/models/reference_with_type.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
15
2020-06-11T15:50:08.000Z
2022-03-21T09:27:25.000Z
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.8 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from ....
31.241935
312
0.554208
import pprint import re import six import typing from ....properties import Property if typing.TYPE_CHECKING: from pypureclient.flasharray.FA_2_8 import models class ReferenceWithType(object): swagger_types = { 'id': 'str', 'name': 'str', 'resource_type': 'str' } attribute...
true
true
1c165fe835bee354c7367a2583343cc7eefc2e8a
1,168
py
Python
data/typing/pandas.core.indexes.frozen.py
vfdev-5/python-record-api
006faf0bba9cd4cb55fbacc13d2bbda365f5bf0b
[ "MIT" ]
null
null
null
data/typing/pandas.core.indexes.frozen.py
vfdev-5/python-record-api
006faf0bba9cd4cb55fbacc13d2bbda365f5bf0b
[ "MIT" ]
null
null
null
data/typing/pandas.core.indexes.frozen.py
vfdev-5/python-record-api
006faf0bba9cd4cb55fbacc13d2bbda365f5bf0b
[ "MIT" ]
null
null
null
from typing import * class FrozenList: @overload def __eq__(self, _0: Tuple[Literal["x_level_0"], Literal["x_level_1"]], /): """ usage.xarray: 1 """ ... @overload def __eq__(self, _0: pandas.core.indexes.frozen.FrozenList, /): """ usage.dask: 6 ...
18.83871
79
0.433219
from typing import * class FrozenList: @overload def __eq__(self, _0: Tuple[Literal["x_level_0"], Literal["x_level_1"]], /): ... @overload def __eq__(self, _0: pandas.core.indexes.frozen.FrozenList, /): ... def __eq__( self, _0: Union[ pandas.core.inde...
true
true
1c1660c84596b717e4dc291da21a02703261bf6d
2,685
py
Python
model/new_model/retinanet_res2net_pan.py
hotcouscous1/TensorBricks
94dd90dce43a455d9abd7ccf19e1e7f361da7824
[ "BSD-3-Clause" ]
null
null
null
model/new_model/retinanet_res2net_pan.py
hotcouscous1/TensorBricks
94dd90dce43a455d9abd7ccf19e1e7f361da7824
[ "BSD-3-Clause" ]
null
null
null
model/new_model/retinanet_res2net_pan.py
hotcouscous1/TensorBricks
94dd90dce43a455d9abd7ccf19e1e7f361da7824
[ "BSD-3-Clause" ]
null
null
null
from backbone.resnet import * from fpn.bifpn import Resample_FPN from fpn.pan import PAN from model.detection.retinanet import * class RetinaNet_Res2Net_PAN(RetinaNet_Frame): """ __version__ = 1.1 __date__ = Mar 23, 2022 Created by hotcouscous1. This model is RetinaNet adopting Res2Net and PAN a...
33.148148
128
0.620484
from backbone.resnet import * from fpn.bifpn import Resample_FPN from fpn.pan import PAN from model.detection.retinanet import * class RetinaNet_Res2Net_PAN(RetinaNet_Frame): anchor_sizes = [32, 64, 128, 256, 512, 1024] anchor_scales = [1, 2 ** (1 / 3), 2 ** (2 / 3)] anchor_ratios = [[2 ** (1 / 2), 2 ** ...
true
true
1c16626fc4ea97f46224640fd5061c83bbeac778
356
py
Python
code_dir/get_AVE_SNR_of_file.py
Leviyu/EQVirSa
7727ae6b504f2e903dedafe79767f4c171e69bf8
[ "MIT" ]
null
null
null
code_dir/get_AVE_SNR_of_file.py
Leviyu/EQVirSa
7727ae6b504f2e903dedafe79767f4c171e69bf8
[ "MIT" ]
null
null
null
code_dir/get_AVE_SNR_of_file.py
Leviyu/EQVirSa
7727ae6b504f2e903dedafe79767f4c171e69bf8
[ "MIT" ]
null
null
null
import numpy as np import sys import os file_name = sys.argv[1] dt_array = [] with open(file_name,"r") as f: for line in f.readlines(): value = float(line.strip()) #print(value) dt_array.append(value) #print(dt_array) mean = np.mean(dt_array) std = np.std(dt_array) print("{} {}".fo...
13.692308
49
0.623596
import numpy as np import sys import os file_name = sys.argv[1] dt_array = [] with open(file_name,"r") as f: for line in f.readlines(): value = float(line.strip()) dt_array.append(value) mean = np.mean(dt_array) std = np.std(dt_array) print("{} {}".format(mean.round(2),std.round(2)...
true
true
1c1662c7d9b9fc1f6ca8eeb42e46512740d0e9a9
395
py
Python
recipeBot/recipeBot/wsgi.py
MiniSchool/401Hackathon
f15e7f9b259333bfb16e4508f403a6bad432250b
[ "MIT" ]
null
null
null
recipeBot/recipeBot/wsgi.py
MiniSchool/401Hackathon
f15e7f9b259333bfb16e4508f403a6bad432250b
[ "MIT" ]
null
null
null
recipeBot/recipeBot/wsgi.py
MiniSchool/401Hackathon
f15e7f9b259333bfb16e4508f403a6bad432250b
[ "MIT" ]
null
null
null
""" WSGI config for recipeBot project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SET...
23.235294
78
0.787342
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'recipeBot.settings') application = get_wsgi_application()
true
true
1c1663834e09fdb2a9df5e8462638c99e81fc02a
2,373
py
Python
Python/python-scripts/31_youtube_sentiment.py
fundor333/StuffWithScript
43b0345f4b4319a084d018f9ebfc0f1f68377645
[ "MIT" ]
null
null
null
Python/python-scripts/31_youtube_sentiment.py
fundor333/StuffWithScript
43b0345f4b4319a084d018f9ebfc0f1f68377645
[ "MIT" ]
null
null
null
Python/python-scripts/31_youtube_sentiment.py
fundor333/StuffWithScript
43b0345f4b4319a084d018f9ebfc0f1f68377645
[ "MIT" ]
1
2020-10-06T09:10:50.000Z
2020-10-06T09:10:50.000Z
import sys import requests from bs4 import BeautifulSoup as bs4 """ Example usage: $ python 31_youtube_sentiment.py https://www.youtube.com/watch?v=_vrAjAHhUsA """ def get_arguments(): if len(sys.argv) is 2: return sys.argv[1] else: print('Specify at least 1 argument') sys.exit() ...
29.6625
108
0.583228
import sys import requests from bs4 import BeautifulSoup as bs4 def get_arguments(): if len(sys.argv) is 2: return sys.argv[1] else: print('Specify at least 1 argument') sys.exit() def get_comments(url): html = requests.get( 'https://plus.googleapis.com/u/0/_/widget/ren...
true
true
1c166491bbf01380347a5815836de050db93cc88
409
py
Python
backend/aged_river_30410/wsgi.py
crowdbotics-apps/aged-river-30410
a766401bed9e3e04f0264321065801cc8942cf8c
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/aged_river_30410/wsgi.py
crowdbotics-apps/aged-river-30410
a766401bed9e3e04f0264321065801cc8942cf8c
[ "FTL", "AML", "RSA-MD" ]
24
2021-09-09T06:47:19.000Z
2022-02-20T14:11:06.000Z
backend/aged_river_30410/wsgi.py
crowdbotics-apps/aged-river-30410
a766401bed9e3e04f0264321065801cc8942cf8c
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" WSGI config for aged_river_30410 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJA...
24.058824
78
0.794621
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'aged_river_30410.settings') application = get_wsgi_application()
true
true
1c16665ae3f5c625445b4a1e39af2e566b546cf5
1,007
py
Python
src/scripts/visualize_data_pair.py
claudius-kienle/self-supervised-depth-denoising
4dffb30e8ef5022ef665825d26f45f67bf712cfd
[ "MIT" ]
2
2021-12-02T15:06:28.000Z
2021-12-03T09:48:32.000Z
src/scripts/visualize_data_pair.py
claudius-kienle/self-supervised-depth-denoising
4dffb30e8ef5022ef665825d26f45f67bf712cfd
[ "MIT" ]
23
2022-02-24T09:17:03.000Z
2022-03-21T16:57:58.000Z
src/scripts/visualize_data_pair.py
alr-internship/self-supervised-depth-denoising
4dffb30e8ef5022ef665825d26f45f67bf712cfd
[ "MIT" ]
null
null
null
from pathlib import Path from matplotlib import pyplot as plt from dataset.dataset_interface import DatasetInterface from utils.transformation_utils import to_rgb raw_dir = Path("resources/images/raw/ycb_video") cal_dir = Path("resources/images/calibrated/cropped/ycb_video") raw_files = DatasetInterface.get_paths_i...
31.46875
83
0.744786
from pathlib import Path from matplotlib import pyplot as plt from dataset.dataset_interface import DatasetInterface from utils.transformation_utils import to_rgb raw_dir = Path("resources/images/raw/ycb_video") cal_dir = Path("resources/images/calibrated/cropped/ycb_video") raw_files = DatasetInterface.get_paths_i...
true
true
1c1667e1f89376da165b1d4bde296b3980d5b4c1
992
py
Python
wotemu/wotpy/redis.py
agmangas/wotemu
8adf3d57e8b9a85959089d53cc4f7f8a1bc1aeec
[ "MIT" ]
2
2021-11-18T12:42:37.000Z
2021-11-18T13:15:56.000Z
wotemu/wotpy/redis.py
agmangas/wotemu
8adf3d57e8b9a85959089d53cc4f7f8a1bc1aeec
[ "MIT" ]
null
null
null
wotemu/wotpy/redis.py
agmangas/wotemu
8adf3d57e8b9a85959089d53cc4f7f8a1bc1aeec
[ "MIT" ]
null
null
null
import json import logging import os import aioredis import wotemu.config from wotemu.enums import RedisPrefixes _logger = logging.getLogger(__name__) async def redis_from_env(): env_config = wotemu.config.get_env_config() if not env_config.redis_url: raise Exception("Undefined Redis URL") ret...
24.8
65
0.654234
import json import logging import os import aioredis import wotemu.config from wotemu.enums import RedisPrefixes _logger = logging.getLogger(__name__) async def redis_from_env(): env_config = wotemu.config.get_env_config() if not env_config.redis_url: raise Exception("Undefined Redis URL") ret...
true
true
1c1667fc73a0f201dad3c15c886d3c9d0a1d932d
4,019
py
Python
tests/watermarks_block.py
yujialuo/erdos
7a631b55895f1a473b0f4d38a0d6053851e65b5d
[ "Apache-2.0" ]
null
null
null
tests/watermarks_block.py
yujialuo/erdos
7a631b55895f1a473b0f4d38a0d6053851e65b5d
[ "Apache-2.0" ]
null
null
null
tests/watermarks_block.py
yujialuo/erdos
7a631b55895f1a473b0f4d38a0d6053851e65b5d
[ "Apache-2.0" ]
null
null
null
from absl import app from absl import flags from collections import defaultdict import erdos.graph from erdos.op import Op from erdos.data_stream import DataStream from erdos.message import Message from erdos.message import WatermarkMessage from erdos.utils import frequency from erdos.timestamp import Timestamp INTE...
32.674797
79
0.664344
from absl import app from absl import flags from collections import defaultdict import erdos.graph from erdos.op import Op from erdos.data_stream import DataStream from erdos.message import Message from erdos.message import WatermarkMessage from erdos.utils import frequency from erdos.timestamp import Timestamp INTE...
true
true
1c16691a7a587a6b954722d2de6b36adc665c47e
3,083
py
Python
pywxclient/contrib/file.py
justdoit0823/pywxclient
9a61c4c0c26d6566e6121641ab37c35b176d8e20
[ "Apache-2.0" ]
301
2017-08-24T11:48:34.000Z
2022-03-14T14:51:00.000Z
pywxclient/contrib/file.py
justdoit0823/pywxclient
9a61c4c0c26d6566e6121641ab37c35b176d8e20
[ "Apache-2.0" ]
17
2017-08-24T13:57:15.000Z
2021-04-30T10:48:57.000Z
pywxclient/contrib/file.py
justdoit0823/pywxclient
9a61c4c0c26d6566e6121641ab37c35b176d8e20
[ "Apache-2.0" ]
57
2017-08-24T14:28:59.000Z
2021-11-22T14:15:48.000Z
"""File object module.""" import io import os import requests import time from hashlib import md5 __all__ = ['LocalFile', 'HTTPFile'] class File: t_format = '%a %b %d %Y %H:%M:%S GMT%z (CST)' short_type_mapping = { 'jpg': 'pic', 'jpeg': 'pic', 'png': 'pic', 'icon': 'pic'...
24.468254
74
0.564061
import io import os import requests import time from hashlib import md5 __all__ = ['LocalFile', 'HTTPFile'] class File: t_format = '%a %b %d %Y %H:%M:%S GMT%z (CST)' short_type_mapping = { 'jpg': 'pic', 'jpeg': 'pic', 'png': 'pic', 'icon': 'pic', 'gif': 'pic', ...
true
true
1c166944866a7793ea72478948d516349492e5c0
5,280
py
Python
elastalert/config.py
LaZyDK/elastalert2
52b105d8c1cc28e3d5294a784796effdf43700e8
[ "Apache-2.0" ]
null
null
null
elastalert/config.py
LaZyDK/elastalert2
52b105d8c1cc28e3d5294a784796effdf43700e8
[ "Apache-2.0" ]
null
null
null
elastalert/config.py
LaZyDK/elastalert2
52b105d8c1cc28e3d5294a784796effdf43700e8
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import datetime import logging import logging.config from envparse import Env from . import loaders from .util import EAException from .util import elastalert_logger from .util import get_module from elastalert.yaml import read_yaml # Required global (config.yaml) configuration options requi...
37.714286
120
0.664962
import datetime import logging import logging.config from envparse import Env from . import loaders from .util import EAException from .util import elastalert_logger from .util import get_module from elastalert.yaml import read_yaml required_globals = frozenset(['run_every', 'es_host', 'es_port', 'writeback_index',...
true
true
1c1669a806d9228201e482c89d2d7b97f11eb5b6
838
py
Python
studio/sdk/bin/restart.py
sudhakar52621/cm
62bba13e875cab6d9c2cd60a0b616592adbe9836
[ "MIT", "BSD-2-Clause", "Apache-1.1", "Apache-2.0" ]
null
null
null
studio/sdk/bin/restart.py
sudhakar52621/cm
62bba13e875cab6d9c2cd60a0b616592adbe9836
[ "MIT", "BSD-2-Clause", "Apache-1.1", "Apache-2.0" ]
null
null
null
studio/sdk/bin/restart.py
sudhakar52621/cm
62bba13e875cab6d9c2cd60a0b616592adbe9836
[ "MIT", "BSD-2-Clause", "Apache-1.1", "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Waits for the parent process to terminate, then executes specified commands. import os import signal import sys import syslog import time if len(sys.argv) < 3: raise Exception('usage: restart.py <pid> <path> [optional command]') try: signal.signal(signal.SIGHUP, signal....
27.032258
94
0.618138
import os import signal import sys import syslog import time if len(sys.argv) < 3: raise Exception('usage: restart.py <pid> <path> [optional command]') try: signal.signal(signal.SIGHUP, signal.SIG_IGN) pid = int(sys.argv[1]) while os.getppid() == pid: time.sleep(0.5) ...
true
true
1c166b68a3b0b8d7484e98ddd64edb55badcfb46
524
py
Python
stringReverse.py
patirahardik/data-structure-practice
c3f84493c33aaac592b36f7401fad7084062e5af
[ "Apache-2.0" ]
null
null
null
stringReverse.py
patirahardik/data-structure-practice
c3f84493c33aaac592b36f7401fad7084062e5af
[ "Apache-2.0" ]
null
null
null
stringReverse.py
patirahardik/data-structure-practice
c3f84493c33aaac592b36f7401fad7084062e5af
[ "Apache-2.0" ]
null
null
null
#Function to reverse the string given #Example input: "gnikrow si ti ih" # output: "Hi it is working" #Steps # 1. Verify the inputs def reverse(string): if(type(string) != str): print("Not a Valid String") quit() output = "" for i in range(len(string)-1,-1,-1): outpu...
19.407407
44
0.614504
def reverse(string): if(type(string) != str): print("Not a Valid String") quit() output = "" for i in range(len(string)-1,-1,-1): output=output + string[i] return output def reverse2(string): return string[::-1] print(reverse("gnikrow si ti ih")) print("".join(rev...
true
true
1c166ba9755e8a988646406a29d4f554ff9c8f0c
1,606
py
Python
tt/actions/read/log.py
sebastian-lemke/tt
2ff1ec23d206632446b08e56add1a8852af7415a
[ "MIT" ]
13
2020-06-23T18:05:14.000Z
2022-01-26T17:37:59.000Z
tt/actions/read/log.py
sebastian-lemke/tt
2ff1ec23d206632446b08e56add1a8852af7415a
[ "MIT" ]
6
2020-03-26T00:47:52.000Z
2022-02-15T13:03:05.000Z
tt/actions/read/log.py
sebastian-lemke/tt
2ff1ec23d206632446b08e56add1a8852af7415a
[ "MIT" ]
5
2021-02-12T15:58:39.000Z
2021-11-17T09:27:26.000Z
from __future__ import print_function from collections import defaultdict from tt.dataaccess.utils import get_data_store from tt.dateutils.dateutils import * from tt.colors.colors import * def action_log(period): data = get_data_store().load() work = data['work'] log = defaultdict(lambda: {'delta': timed...
30.884615
78
0.542964
from __future__ import print_function from collections import defaultdict from tt.dataaccess.utils import get_data_store from tt.dateutils.dateutils import * from tt.colors.colors import * def action_log(period): data = get_data_store().load() work = data['work'] log = defaultdict(lambda: {'delta': timed...
true
true
1c166be667fdf98c09dc738ec868262206a7e5f6
6,928
py
Python
step2-2-2_clean_news_more.py
huangming6220/news_mining
83389fcc8598a7b934fad0ac4b4db141ce26e7d9
[ "MIT" ]
1
2021-07-09T17:35:17.000Z
2021-07-09T17:35:17.000Z
step2-2-2_clean_news_more.py
huangming6220/news_mining
83389fcc8598a7b934fad0ac4b4db141ce26e7d9
[ "MIT" ]
null
null
null
step2-2-2_clean_news_more.py
huangming6220/news_mining
83389fcc8598a7b934fad0ac4b4db141ce26e7d9
[ "MIT" ]
null
null
null
# coding: utf-8 ################################################################### # Step 2-2-1: further clean news ################################################################### # Libraries: # ========== import re import pandas as pd # Functions: # ========== ### clean data def clean_message_more(msg): ...
65.358491
3,303
0.651126
import re import pandas as pd def clean_message_more(msg): imsg = True if msg.strip(): if msg[0] == '*': if imsg: print(msg) msg = re.sub('\(reuters\) - ', '. ', msg) if imsg: print(msg) else: if re.search('^.*?\(reuters.*?\) -', msg):...
true
true
1c166ccf94976c588422630ba0ef4c54fda42ab0
12,129
py
Python
tests/unit/load_template_csv_test.py
ricardolsmendes/gcp-datacatalog-python
3194003652be5e985c0cc5bf146709e61bb8a6f3
[ "MIT" ]
7
2019-12-30T13:39:46.000Z
2020-10-16T13:58:11.000Z
tests/unit/load_template_csv_test.py
ricardolsmendes/gcp-datacatalog-python
3194003652be5e985c0cc5bf146709e61bb8a6f3
[ "MIT" ]
null
null
null
tests/unit/load_template_csv_test.py
ricardolsmendes/gcp-datacatalog-python
3194003652be5e985c0cc5bf146709e61bb8a6f3
[ "MIT" ]
7
2019-10-16T13:34:59.000Z
2022-01-25T04:18:36.000Z
import io import unittest from unittest import mock from google.api_core import exceptions import load_template_csv @mock.patch('load_template_csv.CSVFilesReader') class TemplateMakerTest(unittest.TestCase): @mock.patch('load_template_csv.DataCatalogFacade') def setUp(self, mock_datacatalog_facade): ...
46.471264
99
0.70418
import io import unittest from unittest import mock from google.api_core import exceptions import load_template_csv @mock.patch('load_template_csv.CSVFilesReader') class TemplateMakerTest(unittest.TestCase): @mock.patch('load_template_csv.DataCatalogFacade') def setUp(self, mock_datacatalog_facade): ...
true
true
1c166d8dbcaf4107f385fc6eebbfcbee79b5b0c5
2,642
py
Python
openGaussBase/testcase/GUC/VPC/Opengauss_Function_Guc_VPC_Case0014.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/GUC/VPC/Opengauss_Function_Guc_VPC_Case0014.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/GUC/VPC/Opengauss_Function_Guc_VPC_Case0014.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
34.311688
84
0.604845
import unittest from testcase.utils.CommonSH import CommonSH from testcase.utils.Constant import Constant from testcase.utils.Logger import Logger LOG = Logger() commonsh = CommonSH('dbuser') class ClientConnection(unittest.TestCase): def setUp(self): LOG.info( '-----Opengauss_Function_Guc_V...
true
true
1c166efeafbff1527894b25f492604cc759d86e4
1,148
py
Python
migrations/versions/d278dee35f5a_.py
monstersun/blog
1c2763fdd3a4d3f6b86a9633dafff09af7b51462
[ "MIT" ]
null
null
null
migrations/versions/d278dee35f5a_.py
monstersun/blog
1c2763fdd3a4d3f6b86a9633dafff09af7b51462
[ "MIT" ]
null
null
null
migrations/versions/d278dee35f5a_.py
monstersun/blog
1c2763fdd3a4d3f6b86a9633dafff09af7b51462
[ "MIT" ]
null
null
null
"""empty message Revision ID: d278dee35f5a Revises: c51e2aff48e3 Create Date: 2017-12-05 15:25:53.141800 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'd278dee35f5a' down_revision = 'c51e2aff48e3' branch_labels = None depends_on = None def upgrade(): # ...
31.027027
87
0.686411
from alembic import op import sqlalchemy as sa revision = 'd278dee35f5a' down_revision = 'c51e2aff48e3' branch_labels = None depends_on = None def upgrade(): op.add_column('users', sa.Column('about_me', sa.Text(), nullable=True)) op.add_column('users', sa.Column('last_seen', sa.DateTime(), nullable=True...
true
true
1c166fe3487ce8bb5dd2f0fea3230d97fcacc79c
11,177
py
Python
seeker/mapping.py
lbrant1/django-seeker
5b1cd638a61f391ebd463c8855bd61ae7d2d4f9a
[ "BSD-2-Clause" ]
null
null
null
seeker/mapping.py
lbrant1/django-seeker
5b1cd638a61f391ebd463c8855bd61ae7d2d4f9a
[ "BSD-2-Clause" ]
null
null
null
seeker/mapping.py
lbrant1/django-seeker
5b1cd638a61f391ebd463c8855bd61ae7d2d4f9a
[ "BSD-2-Clause" ]
null
null
null
from django.conf import settings from django.db import models from elasticsearch.helpers import bulk, scan from elasticsearch_dsl.connections import connections from elasticsearch_dsl.field import InnerObject import elasticsearch_dsl as dsl import six import logging logger = logging.getLogger(__name__) DEFAULT_ANAL...
39.775801
143
0.626376
from django.conf import settings from django.db import models from elasticsearch.helpers import bulk, scan from elasticsearch_dsl.connections import connections from elasticsearch_dsl.field import InnerObject import elasticsearch_dsl as dsl import six import logging logger = logging.getLogger(__name__) DEFAULT_ANAL...
true
true
1c16718008969c813456dc709919845ef517cde0
5,715
py
Python
isi_sdk_8_1_0/isi_sdk_8_1_0/models/certificate_server_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_1_0/isi_sdk_8_1_0/models/certificate_server_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_1_0/isi_sdk_8_1_0/models/certificate_server_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 5 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_8_1_0.models.certifi...
32.106742
170
0.611374
import pprint import re import six from isi_sdk_8_1_0.models.certificate_server import CertificateServer from isi_sdk_8_1_0.models.certificate_server_certificate import CertificateServerCertificate class CertificateServerExtended(object): swagger_types = { 'certificates': 'list[CertificateServerC...
true
true
1c1673db5f6b1b72aa25be241c1a0cfdadea03da
2,338
py
Python
module_scikit-learn/linear_regression.py
robert-g-butler/python_reference_guide
b9945ef645699c8676660a7c76eabe5a99bf9298
[ "MIT" ]
1
2019-05-04T07:39:43.000Z
2019-05-04T07:39:43.000Z
module_scikit-learn/linear_regression.py
robert-g-butler/python_reference_guide
b9945ef645699c8676660a7c76eabe5a99bf9298
[ "MIT" ]
null
null
null
module_scikit-learn/linear_regression.py
robert-g-butler/python_reference_guide
b9945ef645699c8676660a7c76eabe5a99bf9298
[ "MIT" ]
null
null
null
''' This script contains examples of Linear Regression analysis, using the SciKit- Learn library. Linear regression is useful when trying to predict from a set of continuous data. ''' import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from sklearn.datasets import load_boston...
28.168675
107
0.685201
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from sklearn.datasets import load_boston boston = load_boston() df = pd.DataFrame(data=boston['data'], columns=boston['feature_names']) df['target'] = pd.Series(boston['target']) df.columns df.info() df.describe() df.head()...
true
true
1c1675927a08b495e79a0712713fecb7531bb05f
3,511
py
Python
sdk/lusid/models/asset_class.py
finbourne/lusid-sdk-python-generated-preview
9c36c953e8149443a4390ed7f0c04d01211401b6
[ "MIT" ]
null
null
null
sdk/lusid/models/asset_class.py
finbourne/lusid-sdk-python-generated-preview
9c36c953e8149443a4390ed7f0c04d01211401b6
[ "MIT" ]
null
null
null
sdk/lusid/models/asset_class.py
finbourne/lusid-sdk-python-generated-preview
9c36c953e8149443a4390ed7f0c04d01211401b6
[ "MIT" ]
null
null
null
# coding: utf-8 """ LUSID API FINBOURNE Technology # noqa: E501 The version of the OpenAPI document: 0.11.4425 Contact: info@finbourne.com Generated by: https://openapi-generator.tech """ try: from inspect import getfullargspec except ImportError: from inspect import getargspec as getf...
27.645669
114
0.572202
try: from inspect import getfullargspec except ImportError: from inspect import getargspec as getfullargspec import pprint import re import six from lusid.configuration import Configuration class AssetClass(object): INTERESTRATES = "InterestRates" FX = "FX" INFLATION = "Inflation" EQUITI...
true
true
1c1676a3b4a5e6c5f68900845b09e725e39811bf
127
py
Python
books/tech/py/m_lutz-programming_python-4_ed/code/ch_01/step_2/01_using_foratted_files/dump_db_file.py
ordinary-developer/education
1b1f40dacab873b28ee01dfa33a9bd3ec4cfed58
[ "MIT" ]
1
2017-05-04T08:23:46.000Z
2017-05-04T08:23:46.000Z
books/techno/python/programming_python_4_ed_m_lutz/code/chapter_1/step_2/01_using_foratted_files/dump_db_file.py
ordinary-developer/lin_education
13d65b20cdbc3e5467b2383e5c09c73bbcdcb227
[ "MIT" ]
null
null
null
books/techno/python/programming_python_4_ed_m_lutz/code/chapter_1/step_2/01_using_foratted_files/dump_db_file.py
ordinary-developer/lin_education
13d65b20cdbc3e5467b2383e5c09c73bbcdcb227
[ "MIT" ]
null
null
null
from make_db_file import loadDbase db = loadDbase() for key in db: print(key, '=>\n ', db[key]) print(db['sue']['name'])
18.142857
34
0.629921
from make_db_file import loadDbase db = loadDbase() for key in db: print(key, '=>\n ', db[key]) print(db['sue']['name'])
true
true
1c1676e65fa0a2c8386ab4d9ee83e7925a0a28d2
1,586
py
Python
lib/python3.7/site-packages/motor/__init__.py
TryAgain98/testPython
a2461f2ea6d8e4a30049b831142918c68f085e70
[ "BSD-3-Clause" ]
null
null
null
lib/python3.7/site-packages/motor/__init__.py
TryAgain98/testPython
a2461f2ea6d8e4a30049b831142918c68f085e70
[ "BSD-3-Clause" ]
null
null
null
lib/python3.7/site-packages/motor/__init__.py
TryAgain98/testPython
a2461f2ea6d8e4a30049b831142918c68f085e70
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2011-present MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
31.72
80
0.690416
from __future__ import unicode_literals, absolute_import from motor.motor_py2_compat import text_type version_tuple = (2, 1, 0) def get_version_string(): return '.'.join(map(str, version_tuple)) version = get_version_string() try: import tornado except ImportError: tornado = None else: # a...
true
true
1c167901c54bcfb88db5abad21cf314e44dcc955
384
py
Python
PythonExercicios/ex052.py
lordvinick/Python
c03fd08d4c204104bf0196b0bd129427fd2067ae
[ "MIT" ]
null
null
null
PythonExercicios/ex052.py
lordvinick/Python
c03fd08d4c204104bf0196b0bd129427fd2067ae
[ "MIT" ]
null
null
null
PythonExercicios/ex052.py
lordvinick/Python
c03fd08d4c204104bf0196b0bd129427fd2067ae
[ "MIT" ]
null
null
null
print('Números Primos') num = int(input('Digite um número: ')) i = 0 for c in range(1, num+1): if num % c == 0: i += 1 print('\033[34m', end=' ') else: print('\033[31m', end=' ') print(f'{c}', end=' ') print(f'\n\033[35mO número {num} foi divisível {i} vezes') if i > 2: print('Po...
25.6
58
0.536458
print('Números Primos') num = int(input('Digite um número: ')) i = 0 for c in range(1, num+1): if num % c == 0: i += 1 print('\033[34m', end=' ') else: print('\033[31m', end=' ') print(f'{c}', end=' ') print(f'\n\033[35mO número {num} foi divisível {i} vezes') if i > 2: print('Po...
true
true
1c167c70d8ef8e3766e33fee2e2a7bfa6f83d41a
266
py
Python
tridentstream/apps.py
tridentstream/mediaserver
5d47d766df2e8dca076e41348062567a569019fd
[ "MIT" ]
6
2020-01-03T14:50:09.000Z
2021-09-13T01:44:31.000Z
tridentstream/apps.py
tidalstream/mediaserver
5d47d766df2e8dca076e41348062567a569019fd
[ "MIT" ]
null
null
null
tridentstream/apps.py
tidalstream/mediaserver
5d47d766df2e8dca076e41348062567a569019fd
[ "MIT" ]
null
null
null
import logging from django.apps import AppConfig as DjangoAppConfig class AppConfig(DjangoAppConfig): name = "tridentstream" verbose_name = "Tridentstream" def ready(self): from .eventtrack import register_signals register_signals()
19
52
0.729323
import logging from django.apps import AppConfig as DjangoAppConfig class AppConfig(DjangoAppConfig): name = "tridentstream" verbose_name = "Tridentstream" def ready(self): from .eventtrack import register_signals register_signals()
true
true
1c167c8adc279b1bcaeed6e904eb5bb7fe72960f
46,496
py
Python
pysnmp-with-texts/Nortel-MsCarrier-MscPassport-VnetNisSigMIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/Nortel-MsCarrier-MscPassport-VnetNisSigMIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/Nortel-MsCarrier-MscPassport-VnetNisSigMIB.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 Nortel-MsCarrier-MscPassport-VnetNisSigMIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Nortel-MsCarrier-MscPassport-VnetNisSigMIB # Produced by pysmi-0.3.4 at Wed May 1 14:31:45 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user ...
186.730924
4,628
0.807037
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.impo...
true
true
1c167ce07be735f6e960e6a8268776e9e9aec4c9
935
py
Python
render/test_xml.py
howiemac/evoke4
5d7af36c9fb23d94766d54c9c63436343959d3a8
[ "BSD-3-Clause" ]
null
null
null
render/test_xml.py
howiemac/evoke4
5d7af36c9fb23d94766d54c9c63436343959d3a8
[ "BSD-3-Clause" ]
null
null
null
render/test_xml.py
howiemac/evoke4
5d7af36c9fb23d94766d54c9c63436343959d3a8
[ "BSD-3-Clause" ]
null
null
null
"""Basic XML Document Sanity Test """ from xml.sax import parse, ContentHandler, SAXParseException from glob import glob as ls import inspect from cStringIO import StringIO def logPoint(msg=''): stack = inspect.stack() print stack # remove the logPoint bit stack = stack[1:] stack.reverse() output = StringI...
25.972222
65
0.623529
"""Basic XML Document Sanity Test """ from xml.sax import parse, ContentHandler, SAXParseException from glob import glob as ls import inspect from cStringIO import StringIO def logPoint(msg=''): stack = inspect.stack() print stack stack = stack[1:] stack.reverse() output = StringIO() if msg: output.w...
false
true
1c167d85deb694b6a6867188ee119b7b40072a20
27,417
py
Python
tools/rpc/rpc.py
KBacsa/openmv
5ae2f6957051e87bdd252b6cf5a3e20e1d792b7b
[ "MIT" ]
1
2021-09-18T02:28:00.000Z
2021-09-18T02:28:00.000Z
tools/rpc/rpc.py
KBacsa/openmv
5ae2f6957051e87bdd252b6cf5a3e20e1d792b7b
[ "MIT" ]
null
null
null
tools/rpc/rpc.py
KBacsa/openmv
5ae2f6957051e87bdd252b6cf5a3e20e1d792b7b
[ "MIT" ]
null
null
null
# This file is part of the OpenMV project. # # Copyright (c) 2013-2020 Ibrahim Abdelkader <iabdalkader@openmv.io> # Copyright (c) 2013-2020 Kwabena W. Agyeman <kwagyeman@openmv.io> # # This work is licensed under the MIT license, see the file LICENSE for details. import gc, serial, socket, struct, time class rpc: ...
44.078778
134
0.59609
import gc, serial, socket, struct, time class rpc: _COMMAND_HEADER_PACKET_MAGIC = 0x1209 _COMMAND_DATA_PACKET_MAGIC = 0xABD1 _RESULT_HEADER_PACKET_MAGIC = 0x9021 _RESULT_DATA_PACKET_MAGIC = 0x1DBA def __def_crc_16(self, data, size): crc = 0xFFFF for i in range(size): ...
true
true
1c167f5466650cf77a5fbf4399e0f71be8ccd2e9
527
py
Python
examples/wallet_backup_example.py
emg110/py-algorand-sdk
93317158cc4e16619d34b36e5eed6d9298aa940c
[ "MIT" ]
177
2019-07-25T15:30:45.000Z
2022-03-27T23:38:16.000Z
examples/wallet_backup_example.py
emg110/py-algorand-sdk
93317158cc4e16619d34b36e5eed6d9298aa940c
[ "MIT" ]
178
2019-08-02T13:11:23.000Z
2022-03-31T21:02:29.000Z
examples/wallet_backup_example.py
emg110/py-algorand-sdk
93317158cc4e16619d34b36e5eed6d9298aa940c
[ "MIT" ]
84
2019-07-28T08:57:26.000Z
2022-03-31T18:04:31.000Z
# Example: backing up a wallet with mnemonic import tokens from algosdk import kmd, mnemonic from algosdk.wallet import Wallet # create a kmd client kcl = kmd.KMDClient(tokens.kmd_token, tokens.kmd_address) # create a wallet object wallet = Wallet("unencrypted-default-wallet", "", kcl) # get the wallet's master der...
26.35
57
0.779886
import tokens from algosdk import kmd, mnemonic from algosdk.wallet import Wallet kcl = kmd.KMDClient(tokens.kmd_token, tokens.kmd_address) wallet = Wallet("unencrypted-default-wallet", "", kcl) mdk = wallet.export_master_derivation_key() print("Master Derivation Key:", mdk) # get the backup phrase backup = mnemon...
true
true
1c167f5f761a68b60f709132095d86803f6c8a1f
1,192
py
Python
tests/compare.py
CyprusInst/medina
d8b0ed5f6fb79a97ab1fc7bd83869426770b8b1e
[ "MIT" ]
3
2019-11-08T13:32:20.000Z
2021-11-04T00:12:49.000Z
tests/compare.py
CyIClimate/medina
d8b0ed5f6fb79a97ab1fc7bd83869426770b8b1e
[ "MIT" ]
5
2020-01-30T12:46:46.000Z
2020-06-08T12:15:58.000Z
tests/compare.py
CyIClimate/medina
d8b0ed5f6fb79a97ab1fc7bd83869426770b8b1e
[ "MIT" ]
2
2020-02-06T09:51:02.000Z
2020-07-16T16:18:25.000Z
import sys def readData(data,fname): j=0; with open(fname) as f: content = f.readlines() for line in content: elems = line.split() for elem in elems: data[j] = float(elem) j = j+1 def calcDiff(data1,data2): print("Elements with g...
20.912281
97
0.489094
import sys def readData(data,fname): j=0; with open(fname) as f: content = f.readlines() for line in content: elems = line.split() for elem in elems: data[j] = float(elem) j = j+1 def calcDiff(data1,data2): print("Elements with g...
true
true
1c167fac23147a1c8d1cb1b443746706aa193dae
51,395
py
Python
boto/connection.py
SPSCommerce/boto
33a80287ce68118170595ef70623794470cb36d3
[ "MIT" ]
2
2021-10-02T16:30:58.000Z
2021-11-17T10:34:43.000Z
boto/connection.py
SPSCommerce/boto
33a80287ce68118170595ef70623794470cb36d3
[ "MIT" ]
null
null
null
boto/connection.py
SPSCommerce/boto
33a80287ce68118170595ef70623794470cb36d3
[ "MIT" ]
1
2020-03-03T10:45:52.000Z
2020-03-03T10:45:52.000Z
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # Copyright (c) 2010 Google # Copyright (c) 2008 rPath, Inc. # Copyright (c) 2009 The Echo Nest Corporation # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2011, Nexenta Systems Inc. # All...
41.615385
127
0.594688
from datetime import datetime import errno import os import random import re import socket import sys import time import xml.sax import copy from boto import auth from boto import auth_handler import boto import boto.utils import boto.handler import boto.cacerts from boto import config, UserAgent from boto.compat i...
true
true
1c168090c6483071f826d762f564ef98e4d62378
124
py
Python
scraper-main/CodeBase/colours.py
jjvdhoven/IPFIT6-scraper
160c9525c66e76ea578c5dd9babbce5c9e8ccced
[ "BSD-3-Clause" ]
null
null
null
scraper-main/CodeBase/colours.py
jjvdhoven/IPFIT6-scraper
160c9525c66e76ea578c5dd9babbce5c9e8ccced
[ "BSD-3-Clause" ]
null
null
null
scraper-main/CodeBase/colours.py
jjvdhoven/IPFIT6-scraper
160c9525c66e76ea578c5dd9babbce5c9e8ccced
[ "BSD-3-Clause" ]
null
null
null
class Colors: ERROR = '\033[91m' GREEN = '\033[92m' WARNING = '\033[93m' RESET = '\033[0m' fore = Colors()
15.5
24
0.532258
class Colors: ERROR = '\033[91m' GREEN = '\033[92m' WARNING = '\033[93m' RESET = '\033[0m' fore = Colors()
true
true
1c16809b0b0d05a34b2fe0fb5193e54c3337f10e
1,939
py
Python
dog-agent-game/ml-agents-envs/mlagents/envs/communicator_objects/custom_action_pb2.py
antopraju/FiRescue
a67c8fa3ee3422f6c6979ed242d6d68309b4230f
[ "MIT" ]
58
2019-06-13T16:35:40.000Z
2021-12-30T03:16:45.000Z
dog-agent-game/ml-agents-envs/mlagents/envs/communicator_objects/custom_action_pb2.py
antopraju/FiRescue
a67c8fa3ee3422f6c6979ed242d6d68309b4230f
[ "MIT" ]
7
2020-01-28T23:08:10.000Z
2022-03-12T00:06:11.000Z
dog-agent-game/ml-agents-envs/mlagents/envs/communicator_objects/custom_action_pb2.py
antopraju/FiRescue
a67c8fa3ee3422f6c6979ed242d6d68309b4230f
[ "MIT" ]
23
2019-06-25T17:09:32.000Z
2021-03-18T06:44:17.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: mlagents/envs/communicator_objects/custom_action.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf imp...
29.830769
180
0.757607
import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym...
true
true