hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bea518b5d7670e7d0f948f9ce8eda34d0fa0bd36 | 20,671 | py | Python | evalml/tests/objective_tests/test_standard_metrics.py | sharshofski/evalml | f13dcd969e86b72ba01ca520247a16850030dcb0 | [
"BSD-3-Clause"
] | null | null | null | evalml/tests/objective_tests/test_standard_metrics.py | sharshofski/evalml | f13dcd969e86b72ba01ca520247a16850030dcb0 | [
"BSD-3-Clause"
] | null | null | null | evalml/tests/objective_tests/test_standard_metrics.py | sharshofski/evalml | f13dcd969e86b72ba01ca520247a16850030dcb0 | [
"BSD-3-Clause"
] | null | null | null | from itertools import product
import numpy as np
import pandas as pd
import pytest
from sklearn.metrics import matthews_corrcoef as sk_matthews_corrcoef
from evalml.objectives import (
F1,
MAPE,
MSE,
AccuracyBinary,
AccuracyMulticlass,
BalancedAccuracyBinary,
BalancedAccuracyMulticlass,
... | 40.771203 | 133 | 0.592473 |
bea66694bcf52b9fffd500768ba31f40d22d16ce | 4,908 | py | Python | server-python3/server.py | Aaron-Ming/websocket_terminal | 42c24391d51c275eabf1f879fb312b9a3614f51e | [
"MIT"
] | 40 | 2016-11-20T09:48:27.000Z | 2021-04-02T00:29:14.000Z | server-python3/server.py | Aaron-Ming/websocket_terminal | 42c24391d51c275eabf1f879fb312b9a3614f51e | [
"MIT"
] | 6 | 2018-01-07T03:43:22.000Z | 2022-03-21T08:43:33.000Z | server-python3/server.py | glensc/websocket_terminal | 42c24391d51c275eabf1f879fb312b9a3614f51e | [
"MIT"
] | 20 | 2016-12-02T06:00:27.000Z | 2021-08-15T11:40:34.000Z | import os
import urllib.parse
import eventlet
import eventlet.green.socket
# eventlet.monkey_patch()
import eventlet.websocket
import eventlet.wsgi
import wspty.pipe
from flask import Flask, request, redirect
from wspty.EchoTerminal import EchoTerminal
from wspty.EncodedTerminal import EncodedTerminal
from wspty.Webso... | 31.261146 | 115 | 0.647514 |
bea71c525e82317994bbd637b8bebff771fe81eb | 3,406 | py | Python | tests/unit/test_roger_promote.py | seomoz/roger-mesos-tools | 88b4cb3550a4b49d0187cfb5e6a22246ff6b9765 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_roger_promote.py | seomoz/roger-mesos-tools | 88b4cb3550a4b49d0187cfb5e6a22246ff6b9765 | [
"Apache-2.0"
] | 47 | 2016-05-26T22:09:56.000Z | 2018-08-08T20:33:39.000Z | tests/unit/test_roger_promote.py | seomoz/roger-mesos-tools | 88b4cb3550a4b49d0187cfb5e6a22246ff6b9765 | [
"Apache-2.0"
] | 3 | 2017-09-20T22:39:03.000Z | 2017-11-07T22:29:29.000Z | # -*- encoding: utf-8 -*-
"""
Unit test for roger_promote.py
"""
import tests.helper
import unittest
import os
import os.path
import pytest
import requests
from mockito import mock, Mock, when
from cli.roger_promote import RogerPromote
from cli.appconfig import AppConfig
from cli.settings import Settings
from cl... | 28.383333 | 76 | 0.645919 |
bea77828d8025fc0087d40bc8239898137482a39 | 7,097 | py | Python | data/collectors.py | papb/COVID-19 | 2dc8e683f55c494ca894727aca56f90e53b161f3 | [
"MIT"
] | 6 | 2020-03-24T22:03:34.000Z | 2020-03-25T21:08:02.000Z | data/collectors.py | papb/COVID-19 | 2dc8e683f55c494ca894727aca56f90e53b161f3 | [
"MIT"
] | null | null | null | data/collectors.py | papb/COVID-19 | 2dc8e683f55c494ca894727aca56f90e53b161f3 | [
"MIT"
] | 1 | 2020-03-27T20:25:03.000Z | 2020-03-27T20:25:03.000Z | import json
import pandas as pd
import requests
def load_jh_df(csv):
'''
Loads a CSV file from JH repository and make some transforms
'''
jh_data_path = (
'https://raw.githubusercontent.com/'
'CSSEGISandData/COVID-19/master/'
'csse_covid_19_data/csse_covid_19_time_series/'
)
retu... | 32.856481 | 121 | 0.479217 |
bea7f47e5f837c85a165df266359f1d2def3dfcd | 5,976 | py | Python | testsuite/testsuite_helpers.py | freingruber/JavaScript-Raider | d1c1fff2fcfc60f210b93dbe063216fa1a83c1d0 | [
"Apache-2.0"
] | 91 | 2022-01-24T07:32:34.000Z | 2022-03-31T23:37:15.000Z | testsuite/testsuite_helpers.py | zeusguy/JavaScript-Raider | d1c1fff2fcfc60f210b93dbe063216fa1a83c1d0 | [
"Apache-2.0"
] | null | null | null | testsuite/testsuite_helpers.py | zeusguy/JavaScript-Raider | d1c1fff2fcfc60f210b93dbe063216fa1a83c1d0 | [
"Apache-2.0"
] | 11 | 2022-01-24T14:21:12.000Z | 2022-03-31T23:37:23.000Z | import config as cfg
import utils
import native_code.executor as executor
number_performed_tests = 0
expectations_correct = 0
expectations_wrong = 0
# The expect functions don't throw an exception like the assert_* functions
# Instead, they just count how often the expected result was true
# The... | 34.947368 | 130 | 0.737784 |
bea8a3765c24aad74f039b0b081e005d38797cfe | 99 | py | Python | examples/my_configs/two.py | davidhyman/override | e34bd3c8676233439de5c002367b3bff5c1b88d6 | [
"MIT"
] | null | null | null | examples/my_configs/two.py | davidhyman/override | e34bd3c8676233439de5c002367b3bff5c1b88d6 | [
"MIT"
] | 1 | 2017-07-11T22:03:27.000Z | 2017-07-11T22:03:27.000Z | examples/my_configs/two.py | davidhyman/override | e34bd3c8676233439de5c002367b3bff5c1b88d6 | [
"MIT"
] | null | null | null | from .one import *
fruit = 'banana'
colour = 'orange'
sam['eggs'] = 'plenty'
sam.pop('ham')
| 14.142857 | 23 | 0.585859 |
bea8aa6132f2274610cc25a57ec0c74c8765342d | 371 | py | Python | students/K33402/Komarov_Georgy/LAB2/elevennote/src/api/urls.py | aglaya-pill/ITMO_ICT_WebDevelopment_2021-2022 | a63691317a72fb9b29ae537bc3d7766661458c22 | [
"MIT"
] | null | null | null | students/K33402/Komarov_Georgy/LAB2/elevennote/src/api/urls.py | aglaya-pill/ITMO_ICT_WebDevelopment_2021-2022 | a63691317a72fb9b29ae537bc3d7766661458c22 | [
"MIT"
] | null | null | null | students/K33402/Komarov_Georgy/LAB2/elevennote/src/api/urls.py | aglaya-pill/ITMO_ICT_WebDevelopment_2021-2022 | a63691317a72fb9b29ae537bc3d7766661458c22 | [
"MIT"
] | null | null | null | from django.urls import path, include
from rest_framework_jwt.views import obtain_jwt_token
from rest_framework.routers import DefaultRouter
from .views import NoteViewSet
app_name = 'api'
router = DefaultRouter(trailing_slash=False)
router.register('notes', NoteViewSet)
urlpatterns = [
path('jwt-auth/', obtain... | 23.1875 | 53 | 0.77628 |
beaa8784fc43c71bc8bb5120744ac9a157c4e2a7 | 2,387 | py | Python | PathPlanning/run.py | CandleStein/VAlg | 43aecdd351954d316f132793cf069b70bf2e5cc2 | [
"MIT"
] | null | null | null | PathPlanning/run.py | CandleStein/VAlg | 43aecdd351954d316f132793cf069b70bf2e5cc2 | [
"MIT"
] | null | null | null | PathPlanning/run.py | CandleStein/VAlg | 43aecdd351954d316f132793cf069b70bf2e5cc2 | [
"MIT"
] | 1 | 2020-09-25T18:31:34.000Z | 2020-09-25T18:31:34.000Z | from planning_framework import path
import cv2 as cv
import numpy as np
import argparse
import matplotlib.pyplot as plt
parser = argparse.ArgumentParser(description="Path Planning Visualisation")
parser.add_argument(
"-n",
"--n_heuristic",
default=2,
help="Heuristic for A* Algorithm (default = 2). 0 f... | 26.820225 | 86 | 0.607038 |
beaf6a34e9709a7f3a490a80d9b84b4126151d38 | 186 | py | Python | Codeforces/problems/0136/A/136A.py | object-oriented-human/competitive | 9e761020e887d8980a39a64eeaeaa39af0ecd777 | [
"MIT"
] | 2 | 2021-07-27T10:46:47.000Z | 2021-07-27T10:47:57.000Z | Codeforces/problems/0136/A/136A.py | foooop/competitive | 9e761020e887d8980a39a64eeaeaa39af0ecd777 | [
"MIT"
] | null | null | null | Codeforces/problems/0136/A/136A.py | foooop/competitive | 9e761020e887d8980a39a64eeaeaa39af0ecd777 | [
"MIT"
] | null | null | null | n = int(input())
line = list(map(int, input().split()))
l = {}
res = ""
for i, j in enumerate(line):
l[j] = i+1
for k in range(n):
res += str(l[k+1]) + " "
print(res.rstrip()) | 15.5 | 38 | 0.516129 |
beb013240bc0b9610971205973878d44dedde94f | 323 | py | Python | generatey.py | YiLisa/DSCI560-hw2 | 9cf4a40a6e4755ea1b0b68248e553fb4b6b7fdf4 | [
"Apache-2.0"
] | null | null | null | generatey.py | YiLisa/DSCI560-hw2 | 9cf4a40a6e4755ea1b0b68248e553fb4b6b7fdf4 | [
"Apache-2.0"
] | null | null | null | generatey.py | YiLisa/DSCI560-hw2 | 9cf4a40a6e4755ea1b0b68248e553fb4b6b7fdf4 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
if __name__ == '__main__':
main()
print('generating y = 3x+6...') | 21.533333 | 56 | 0.582043 |
beb0a9e7bb5a51ebb9a999b6f45ac4bb5d9df106 | 1,002 | py | Python | setup.py | burn874/mtg | cef47f6ec0ca110bdcb885ec09d6f5aca517c3b2 | [
"Apache-2.0"
] | null | null | null | setup.py | burn874/mtg | cef47f6ec0ca110bdcb885ec09d6f5aca517c3b2 | [
"Apache-2.0"
] | null | null | null | setup.py | burn874/mtg | cef47f6ec0ca110bdcb885ec09d6f5aca517c3b2 | [
"Apache-2.0"
] | null | null | null | import re
from pkg_resources import parse_requirements
import pathlib
from setuptools import find_packages, setup
README_FILE = 'README.md'
REQUIREMENTS_FILE = 'requirements.txt'
VERSION_FILE = 'mtg/_version.py'
VERSION_REGEXP = r'^__version__ = \'(\d+\.\d+\.\d+)\''
r = re.search(VERSION_REGEXP, open(VERSION_FILE).r... | 31.3125 | 94 | 0.739521 |
beb1a4b08f2fc3818a575158bc7a69b7e5f252c7 | 1,399 | py | Python | avilla/core/resource/interface.py | RF-Tar-Railt/Avilla | 0b6eff0e253d4c04a5c82f4f252b6a11b7d81e04 | [
"MIT"
] | null | null | null | avilla/core/resource/interface.py | RF-Tar-Railt/Avilla | 0b6eff0e253d4c04a5c82f4f252b6a11b7d81e04 | [
"MIT"
] | 1 | 2021-12-19T07:43:30.000Z | 2021-12-19T07:43:30.000Z | avilla/core/resource/interface.py | RF-Tar-Railt/Avilla | 0b6eff0e253d4c04a5c82f4f252b6a11b7d81e04 | [
"MIT"
] | null | null | null | from __future__ import annotations
from dataclasses import dataclass
from avilla.core.platform import Base
from avilla.core.resource import Resource, ResourceProvider
| 29.765957 | 97 | 0.647605 |
beb313eb5f64fc657c1686ad77dc2225b87a4889 | 570 | py | Python | viewer_examples/plugins/median_filter.py | atemysemicolon/scikit-image | a48cf5822f9539c6602b9327c18253aed14fa692 | [
"BSD-3-Clause"
] | null | null | null | viewer_examples/plugins/median_filter.py | atemysemicolon/scikit-image | a48cf5822f9539c6602b9327c18253aed14fa692 | [
"BSD-3-Clause"
] | null | null | null | viewer_examples/plugins/median_filter.py | atemysemicolon/scikit-image | a48cf5822f9539c6602b9327c18253aed14fa692 | [
"BSD-3-Clause"
] | null | null | null | from skimage import data
from skimage.filter.rank import median
from skimage.morphology import disk
from skimage.viewer import ImageViewer
from skimage.viewer.widgets import Slider, OKCancelButtons, SaveButtons
from skimage.viewer.plugins.base import Plugin
image = data.coins()
viewer = ImageViewer(image)
plugin = P... | 25.909091 | 71 | 0.784211 |
beb317bf51c8d955452bb7ade64a00caeb647030 | 8,722 | py | Python | autotest/test_gwf_buy_lak01.py | scharlton2/modflow6 | 83ac72ee3b6f580aaffef6352cf15c1697d3ce66 | [
"CC0-1.0"
] | 3 | 2019-07-10T21:16:57.000Z | 2021-10-08T00:56:20.000Z | autotest/test_gwf_buy_lak01.py | scharlton2/modflow6 | 83ac72ee3b6f580aaffef6352cf15c1697d3ce66 | [
"CC0-1.0"
] | null | null | null | autotest/test_gwf_buy_lak01.py | scharlton2/modflow6 | 83ac72ee3b6f580aaffef6352cf15c1697d3ce66 | [
"CC0-1.0"
] | 3 | 2019-11-28T16:26:50.000Z | 2020-02-05T11:08:37.000Z | # Test the buoyancy package and the variable density flows between the lake
# and the gwf model. This model has 4 layers and a lake incised within it.
# The model is transient and has heads in the aquifer higher than the initial
# stage in the lake. As the model runs, the lake and aquifer equalize and
# should end up... | 29.073333 | 90 | 0.576015 |
beb37d345ad255de414b430caeba23a0fa10d2d1 | 441 | py | Python | lesson-08/roll_dice_v1.0.py | hemiaoio/pylearning | 4b3885ed7177db4e6e03da80dd9ed69719c8d866 | [
"MIT"
] | 1 | 2018-11-11T03:44:02.000Z | 2018-11-11T03:44:02.000Z | lesson-08/roll_dice_v1.0.py | hemiaoio/learn-python | 4b3885ed7177db4e6e03da80dd9ed69719c8d866 | [
"MIT"
] | null | null | null | lesson-08/roll_dice_v1.0.py | hemiaoio/learn-python | 4b3885ed7177db4e6e03da80dd9ed69719c8d866 | [
"MIT"
] | null | null | null | """
1.0
"""
import random
if __name__ == '__main__':
main()
| 15.206897 | 63 | 0.569161 |
beb557aa11e275e2f9691dee969a012dab3f26db | 759 | py | Python | composer/dataflow-python3/main.py | gxercavins/gcp-snippets | a90e4e9c922370face876aa7c56db610896e1a6f | [
"Apache-2.0"
] | 2 | 2022-02-07T07:53:35.000Z | 2022-02-23T18:46:03.000Z | composer/dataflow-python3/main.py | gxercavins/gcp-snippets | a90e4e9c922370face876aa7c56db610896e1a6f | [
"Apache-2.0"
] | 1 | 2019-10-26T19:03:34.000Z | 2019-10-26T19:03:48.000Z | composer/dataflow-python3/main.py | gxercavins/gcp-snippets | a90e4e9c922370face876aa7c56db610896e1a6f | [
"Apache-2.0"
] | 6 | 2020-03-19T23:58:46.000Z | 2022-02-07T07:53:37.000Z | import argparse
import logging
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
from apache_beam.options.pipeline_options import SetupOptions
def run(argv=None, save_main_session=True):
"""Dummy pipeline to test Python3 operator."""
parser = argparse.ArgumentParser()
... | 27.107143 | 78 | 0.777339 |
beb680071d94ed8dd93dc11b2e313714df1f9b83 | 1,727 | py | Python | dingtalk/message/conversation.py | kangour/dingtalk-python | b37b9dac3ca3ff9d727308fb120a8fd05e11eaa5 | [
"Apache-2.0"
] | 88 | 2017-12-28T05:23:15.000Z | 2021-12-20T13:44:18.000Z | dingtalk/message/conversation.py | niulinlnc/dingtalk-python | c4209658f88344e8f0890137ed7c887c8b740a6c | [
"Apache-2.0"
] | 8 | 2018-04-28T05:41:49.000Z | 2021-06-01T21:51:11.000Z | dingtalk/message/conversation.py | niulinlnc/dingtalk-python | c4209658f88344e8f0890137ed7c887c8b740a6c | [
"Apache-2.0"
] | 43 | 2017-12-07T09:43:48.000Z | 2021-12-03T01:19:52.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2017/11/30 3:02
# @Author : Matrix
# @Github : https://github.com/blackmatrix7/
# @Blog : http://www.cnblogs.com/blackmatrix/
# @File : messages.py
# @Software: PyCharm
import json
from ..foundation import *
from json import JSONDecodeError
__author__ = 'blackmat... | 31.981481 | 120 | 0.70469 |
beb69b31ba90004b6f8731fea0065e0f64e36216 | 1,412 | py | Python | backend/garpix_page/setup.py | griviala/garpix_page | 55f1d9bc6d1de29d18e15369bebcbef18811b5a4 | [
"MIT"
] | null | null | null | backend/garpix_page/setup.py | griviala/garpix_page | 55f1d9bc6d1de29d18e15369bebcbef18811b5a4 | [
"MIT"
] | null | null | null | backend/garpix_page/setup.py | griviala/garpix_page | 55f1d9bc6d1de29d18e15369bebcbef18811b5a4 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from os import path
here = path.join(path.abspath(path.dirname(__file__)), 'garpix_page')
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='garpix_page',
version='2.23.0',
description='',
long_desc... | 32.090909 | 69 | 0.607649 |
beb76b3debe06f273a8ef3ec32c53943cd031a3b | 20,225 | py | Python | .kodi/addons/plugin.video.p2p-streams/resources/core/livestreams.py | C6SUMMER/allinclusive-kodi-pi | 8baf247c79526849c640c6e56ca57a708a65bd11 | [
"Apache-2.0"
] | null | null | null | .kodi/addons/plugin.video.p2p-streams/resources/core/livestreams.py | C6SUMMER/allinclusive-kodi-pi | 8baf247c79526849c640c6e56ca57a708a65bd11 | [
"Apache-2.0"
] | null | null | null | .kodi/addons/plugin.video.p2p-streams/resources/core/livestreams.py | C6SUMMER/allinclusive-kodi-pi | 8baf247c79526849c640c6e56ca57a708a65bd11 | [
"Apache-2.0"
] | 2 | 2018-04-17T17:34:39.000Z | 2020-07-26T03:43:33.000Z | # -*- coding: utf-8 -*-
""" p2p-streams (c) 2014 enen92 fightnight
This file contains the livestream addon engine. It is mostly based on divingmule work on livestreams addon!
Functions:
xml_lists_menu() -> main menu for the xml list category
addlista() -> add a new list. It'll ask for local or rem... | 38.745211 | 303 | 0.514907 |
beb77481d7d9ef64134079c15cf78aedfbcf66f2 | 187 | py | Python | RainIt/rain_it/ric/Procedure.py | luisgepeto/RainItPi | 47cb7228e9c584c3c4489ebc78abf6de2096b770 | [
"MIT"
] | null | null | null | RainIt/rain_it/ric/Procedure.py | luisgepeto/RainItPi | 47cb7228e9c584c3c4489ebc78abf6de2096b770 | [
"MIT"
] | null | null | null | RainIt/rain_it/ric/Procedure.py | luisgepeto/RainItPi | 47cb7228e9c584c3c4489ebc78abf6de2096b770 | [
"MIT"
] | null | null | null | from ric.RainItComposite import RainItComposite
| 18.7 | 47 | 0.705882 |
beb861661de128962032b82c144ceaca4b7cc85f | 81 | py | Python | 1067.py | FahimFBA/URI-Problem-Solve | d718a95e5a873dffbce19d850998e8917ec87ebb | [
"Apache-2.0"
] | 3 | 2020-11-25T19:05:31.000Z | 2021-03-29T07:29:36.000Z | 1067.py | FahimFBA/URI-Problem-Solve | d718a95e5a873dffbce19d850998e8917ec87ebb | [
"Apache-2.0"
] | null | null | null | 1067.py | FahimFBA/URI-Problem-Solve | d718a95e5a873dffbce19d850998e8917ec87ebb | [
"Apache-2.0"
] | null | null | null | valor = int(input())
for i in range(valor+1):
if(i%2 != 0):
print(i) | 16.2 | 24 | 0.506173 |
beb987a1f2b8198bf13096fe552301ac5d99117d | 889 | py | Python | api-reference-examples/python/te-tag-query/api-example-update.py | b-bold/ThreatExchange | 6f8d0dc803faccf576c9398569bb52d54a4f9a87 | [
"BSD-3-Clause"
] | 997 | 2015-03-13T18:04:03.000Z | 2022-03-30T12:09:10.000Z | api-reference-examples/python/te-tag-query/api-example-update.py | b-bold/ThreatExchange | 6f8d0dc803faccf576c9398569bb52d54a4f9a87 | [
"BSD-3-Clause"
] | 444 | 2015-03-26T17:28:49.000Z | 2022-03-28T19:34:05.000Z | api-reference-examples/python/te-tag-query/api-example-update.py | b-bold/ThreatExchange | 6f8d0dc803faccf576c9398569bb52d54a4f9a87 | [
"BSD-3-Clause"
] | 294 | 2015-03-13T22:19:43.000Z | 2022-03-30T08:42:45.000Z | #!/usr/bin/env python
# ================================================================
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
# ================================================================
import sys
import json
import TE
TE.Net.setAppTokenFromEnvName("TX_ACCESS_TOKEN")
postPar... | 26.147059 | 86 | 0.620922 |
beb9a541895990f03cef5c41fda543323a1a2725 | 12,362 | py | Python | loaner/web_app/backend/api/shelf_api_test.py | Bottom-Feeders/GrabNGO | 5a467362e423700a5a7276a7fa9a47040033cfcf | [
"Apache-2.0"
] | null | null | null | loaner/web_app/backend/api/shelf_api_test.py | Bottom-Feeders/GrabNGO | 5a467362e423700a5a7276a7fa9a47040033cfcf | [
"Apache-2.0"
] | null | null | null | loaner/web_app/backend/api/shelf_api_test.py | Bottom-Feeders/GrabNGO | 5a467362e423700a5a7276a7fa9a47040033cfcf | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google Inc. 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 a... | 41.905085 | 86 | 0.729494 |
beb9ee31926225eb2b3cd87871300007116d1d11 | 2,177 | py | Python | app/views/main.py | ArmandDS/ai_bert_resumes | 743f37049bbca67bcbbaf21a2ffecf0d093351df | [
"MIT"
] | 1 | 2020-02-28T12:17:38.000Z | 2020-02-28T12:17:38.000Z | app/views/main.py | ArmandDS/ai_bert_resumes | 743f37049bbca67bcbbaf21a2ffecf0d093351df | [
"MIT"
] | 1 | 2021-06-02T00:54:48.000Z | 2021-06-02T00:54:48.000Z | app/views/main.py | ArmandDS/ai_bert_resumes | 743f37049bbca67bcbbaf21a2ffecf0d093351df | [
"MIT"
] | null | null | null | from flask import render_template, jsonify, Flask, redirect, url_for, request
from app import app
import random
import os
# import tensorflow as tf
# import numpy as np
# import sys
# import spacy
# nlp = spacy.load('en')
# sys.path.insert(0, "/content/bert_experimental")
# from bert_experimental.finetuning.text_pre... | 33.492308 | 117 | 0.686266 |
bebb042aa5530a31d011f0dddb5b720502bac701 | 11,710 | py | Python | ahrs/filters/complementary.py | jaluebbe/ahrs | 4b4a33b1006e0d455a71ac8379a2697202361758 | [
"MIT"
] | null | null | null | ahrs/filters/complementary.py | jaluebbe/ahrs | 4b4a33b1006e0d455a71ac8379a2697202361758 | [
"MIT"
] | null | null | null | ahrs/filters/complementary.py | jaluebbe/ahrs | 4b4a33b1006e0d455a71ac8379a2697202361758 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Complementary Filter
====================
Attitude quaternion obtained with gyroscope and accelerometer-magnetometer
measurements, via complementary filter.
First, the current orientation is estimated at time :math:`t`, from a previous
orientation at time :math:`t-1`, and a given ... | 41.232394 | 219 | 0.566695 |
bebb3991fe53855d056c3141b393c1defb50e7e5 | 4,197 | py | Python | aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/EditJobTemplateRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/EditJobTemplateRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/EditJobTemplateRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 29.978571 | 74 | 0.751013 |
bebb7eff935771339795abf6b86ab3ed10b32cc3 | 3,550 | py | Python | tests/common/models/test_execution.py | angry-tony/ceph-lcm-decapod | 535944d3ee384c3a7c4af82f74041b0a7792433f | [
"Apache-2.0"
] | 41 | 2016-11-03T16:40:17.000Z | 2019-05-23T08:39:17.000Z | tests/common/models/test_execution.py | Mirantis/ceph-lcm | fad9bad0b94f2ef608362953583b10a54a841d24 | [
"Apache-2.0"
] | 30 | 2016-10-14T10:54:46.000Z | 2017-10-20T15:58:01.000Z | tests/common/models/test_execution.py | angry-tony/ceph-lcm-decapod | 535944d3ee384c3a7c4af82f74041b0a7792433f | [
"Apache-2.0"
] | 28 | 2016-09-17T01:17:36.000Z | 2019-07-05T03:32:54.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2016 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 ... | 33.809524 | 77 | 0.719155 |
bebc4c58538a85c2ad00b34ebacde9538e3d0d9b | 1,613 | py | Python | board/models.py | Fahreeve/TaskManager | 7f0a16312b43867270eaade1fe153c07abc2c10e | [
"MIT"
] | null | null | null | board/models.py | Fahreeve/TaskManager | 7f0a16312b43867270eaade1fe153c07abc2c10e | [
"MIT"
] | null | null | null | board/models.py | Fahreeve/TaskManager | 7f0a16312b43867270eaade1fe153c07abc2c10e | [
"MIT"
] | 1 | 2020-09-15T09:15:13.000Z | 2020-09-15T09:15:13.000Z | from django.contrib.auth.models import User
from django.core.validators import MaxValueValidator, MinValueValidator
from django.db import models
from django.utils.translation import ugettext_lazy as _
| 37.511628 | 118 | 0.695598 |
bebe436d87bb3f3a76cbb71e91dc6e70bb5b2e46 | 475 | py | Python | test/test_hex_line.py | bicobus/Hexy | e75d58e66546c278fb648af85e3f9dae53127826 | [
"MIT"
] | 72 | 2017-08-30T03:02:51.000Z | 2022-03-11T23:15:15.000Z | test/test_hex_line.py | bicobus/Hexy | e75d58e66546c278fb648af85e3f9dae53127826 | [
"MIT"
] | 10 | 2019-03-14T08:04:33.000Z | 2021-08-10T09:36:45.000Z | test/test_hex_line.py | bicobus/Hexy | e75d58e66546c278fb648af85e3f9dae53127826 | [
"MIT"
] | 15 | 2017-11-08T05:37:06.000Z | 2021-08-05T19:16:48.000Z | import numpy as np
import hexy as hx
if __name__ == "__main__":
test_get_hex_line()
| 21.590909 | 38 | 0.471579 |
bebe5670df71295bc98ec96c4bde4a3c31d4fb66 | 6,747 | py | Python | wofry/propagator/propagators2D/integral.py | PaNOSC-ViNYL/wofry | 779b5a738ee7738e959a58aafe01e7e49b03894a | [
"MIT"
] | null | null | null | wofry/propagator/propagators2D/integral.py | PaNOSC-ViNYL/wofry | 779b5a738ee7738e959a58aafe01e7e49b03894a | [
"MIT"
] | 1 | 2021-02-16T12:12:10.000Z | 2021-02-16T12:12:10.000Z | wofryimpl/propagator/propagators2D/integral.py | oasys-kit/wofryimpl | f300b714b038110987783c40d2c3af8dca7e54eb | [
"MIT"
] | null | null | null | # propagate_2D_integral: Simplification of the Kirchhoff-Fresnel integral. TODO: Very slow and give some problems
import numpy
from wofry.propagator.wavefront2D.generic_wavefront import GenericWavefront2D
from wofry.propagator.propagator import Propagator2D
# TODO: check resulting amplitude normalization (fft and ... | 49.977778 | 156 | 0.621165 |
bebf0f2b55c9070eb2aa8dd30568a2e408a3e498 | 842 | py | Python | Problems/Study Plans/Dynamic Programming/Dynamic Programming I/07_delete_and_earn.py | andor2718/LeetCode | 59874f49085818e6da751f1cc26867b31079d35d | [
"BSD-3-Clause"
] | 1 | 2022-01-17T19:51:15.000Z | 2022-01-17T19:51:15.000Z | Problems/Study Plans/Dynamic Programming/Dynamic Programming I/07_delete_and_earn.py | andor2718/LeetCode | 59874f49085818e6da751f1cc26867b31079d35d | [
"BSD-3-Clause"
] | null | null | null | Problems/Study Plans/Dynamic Programming/Dynamic Programming I/07_delete_and_earn.py | andor2718/LeetCode | 59874f49085818e6da751f1cc26867b31079d35d | [
"BSD-3-Clause"
] | null | null | null | # https://leetcode.com/problems/delete-and-earn/
| 42.1 | 76 | 0.609264 |
bebf8ceeebe9e29c2c913232279dc6462e901f90 | 334 | py | Python | Desafio051.py | GabrielSanchesRosa/Python | 3a129e27e076b2a91af03d68ede50b9c45c50217 | [
"MIT"
] | null | null | null | Desafio051.py | GabrielSanchesRosa/Python | 3a129e27e076b2a91af03d68ede50b9c45c50217 | [
"MIT"
] | null | null | null | Desafio051.py | GabrielSanchesRosa/Python | 3a129e27e076b2a91af03d68ede50b9c45c50217 | [
"MIT"
] | null | null | null | # Desenvolva um programa que leia o primeiro termo e a razo de uma PA. No final mostre, os 10 primeiros termos dessa prograsso.
primeiro = int(input("Primeiro Termo: "))
razao = int(input("Razo: "))
decimo = primeiro + (10 - 1) * razao
for c in range(primeiro, decimo + razao, razao):
print(f"{c}", end=" -> ")
print... | 33.4 | 129 | 0.679641 |
bebfe36afc8a169020e2b3f2d6602873133b4e74 | 884 | py | Python | tiddlyweb/filters/limit.py | tiddlyweb/tiddlyweb | 376bcad280e24d2de4d74883dc4d8369abcb2c28 | [
"BSD-3-Clause"
] | 57 | 2015-02-01T21:03:34.000Z | 2021-12-25T12:02:31.000Z | tiddlyweb/filters/limit.py | tiddlyweb/tiddlyweb | 376bcad280e24d2de4d74883dc4d8369abcb2c28 | [
"BSD-3-Clause"
] | 6 | 2016-02-05T11:43:32.000Z | 2019-09-05T13:38:49.000Z | tiddlyweb/filters/limit.py | tiddlyweb/tiddlyweb | 376bcad280e24d2de4d74883dc4d8369abcb2c28 | [
"BSD-3-Clause"
] | 17 | 2015-05-12T08:53:23.000Z | 2021-12-21T15:56:30.000Z | """
A :py:mod:`filter <tiddlyweb.filters>` type to limit a group of entities
using a syntax similar to SQL Limit::
limit=<index>,<count>
limit=<count>
"""
import itertools
def limit_parse(count='0'):
"""
Parse the argument of a ``limit`` :py:mod:`filter <tiddlyweb.filters>`
for a count and index... | 23.891892 | 78 | 0.64819 |
bec160209ec5f54fda5f5e3628b149076a57302b | 7,019 | py | Python | pytorch_keras_converter/API.py | sonibla/pytorch_keras_converter | 21925b67b6eb3cbbfa8eb6d33f682d57dafd357d | [
"MIT"
] | 17 | 2019-10-01T14:14:18.000Z | 2021-04-25T13:32:24.000Z | pytorch_keras_converter/API.py | sonibla/pytorch_keras_converter | 21925b67b6eb3cbbfa8eb6d33f682d57dafd357d | [
"MIT"
] | null | null | null | pytorch_keras_converter/API.py | sonibla/pytorch_keras_converter | 21925b67b6eb3cbbfa8eb6d33f682d57dafd357d | [
"MIT"
] | 2 | 2019-10-01T14:02:43.000Z | 2019-10-01T14:14:19.000Z | """
Simple API to convert models between PyTorch and Keras
(Conversions from Keras to PyTorch aren't implemented)
"""
from . import utility
from . import tests
from . import io_utils as utils
import tensorflow
def convert(model,
input_shape,
weights=True,
quiet=True,
i... | 33.42381 | 78 | 0.581992 |
bec1a22fa74c5c4f594a0551d336d70522ed93f7 | 1,734 | py | Python | examples/enable_notifications.py | kjwill/bleak | 7e0fdae6c0f6a78713e5984c2840666e0c38c3f3 | [
"MIT"
] | null | null | null | examples/enable_notifications.py | kjwill/bleak | 7e0fdae6c0f6a78713e5984c2840666e0c38c3f3 | [
"MIT"
] | null | null | null | examples/enable_notifications.py | kjwill/bleak | 7e0fdae6c0f6a78713e5984c2840666e0c38c3f3 | [
"MIT"
] | 1 | 2021-09-15T18:53:58.000Z | 2021-09-15T18:53:58.000Z | # -*- coding: utf-8 -*-
"""
Notifications
-------------
Example showing how to add notifications to a characteristic and handle the responses.
Updated on 2019-07-03 by hbldh <henrik.blidh@gmail.com>
"""
import sys
import logging
import asyncio
import platform
from bleak import BleakClient
from bleak import _logger... | 27.52381 | 136 | 0.689158 |
bec28b12230a8be61261eca269a7854ba31ae9da | 820 | py | Python | src/15 listener_and_backdoor/listener_2.py | raminjafary/ethical-hacking | e76f74f4f23e1d8cb7f433d19871dcf966507dfc | [
"MIT"
] | null | null | null | src/15 listener_and_backdoor/listener_2.py | raminjafary/ethical-hacking | e76f74f4f23e1d8cb7f433d19871dcf966507dfc | [
"MIT"
] | null | null | null | src/15 listener_and_backdoor/listener_2.py | raminjafary/ethical-hacking | e76f74f4f23e1d8cb7f433d19871dcf966507dfc | [
"MIT"
] | null | null | null | #!/usr/bin/python
import socket
my_listener = Listener("localhost",1234)
my_listener.run() | 25.625 | 70 | 0.734146 |
bec37dd307106b82f4f0bcaf14227eb2f2a4ba93 | 1,974 | py | Python | dialogflow/history2xls.py | ray-hrst/temi-tools | 8efb1e1af93a41bd98fe0ee8c1fd6fb44e788341 | [
"MIT"
] | 1 | 2020-06-04T19:30:57.000Z | 2020-06-04T19:30:57.000Z | dialogflow/history2xls.py | ray-hrst/temi-tools | 8efb1e1af93a41bd98fe0ee8c1fd6fb44e788341 | [
"MIT"
] | 1 | 2020-01-14T04:16:12.000Z | 2020-01-14T04:16:12.000Z | dialogflow/history2xls.py | ray-hrst/temi-tools | 8efb1e1af93a41bd98fe0ee8c1fd6fb44e788341 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" Convert Dialogflow history to spreadsheet
User must manually copy the history from the browser and save this in a text file.
This reads the textfile, parses the data, and saves it to a spreadsheet.
Example training sample:
USER
Nov 4, 11:19 PM
AGENT
No matched i... | 27.802817 | 82 | 0.609422 |
bec393e2a78f7bd8032716c650f164a7178aab68 | 25,176 | py | Python | recognition/views.py | usathe71-u/Attendance-System-Face-Recognition | c73f660a6089e8ca9dd5c473efcf2bc78f13a207 | [
"Apache-2.0"
] | 3 | 2021-05-31T21:11:38.000Z | 2021-07-22T18:29:47.000Z | recognition/views.py | usathe71-u/Attendance-System-Face-Recognition | c73f660a6089e8ca9dd5c473efcf2bc78f13a207 | [
"Apache-2.0"
] | null | null | null | recognition/views.py | usathe71-u/Attendance-System-Face-Recognition | c73f660a6089e8ca9dd5c473efcf2bc78f13a207 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render,redirect
from .forms import usernameForm,DateForm,UsernameAndDateForm, DateForm_2
from django.contrib import messages
from django.contrib.auth.models import User
import cv2
import dlib
import imutils
from imutils import face_utils
from imutils.video import VideoStream
from imutils.fa... | 24.97619 | 167 | 0.722196 |
bec698afd2c5801e7a05fe6be1339638668af844 | 856 | py | Python | 2018/05.py | GillesArcas/Advent_of_Code | 1f57eb1686875df2684b0d56916b1d20724e9fb9 | [
"MIT"
] | null | null | null | 2018/05.py | GillesArcas/Advent_of_Code | 1f57eb1686875df2684b0d56916b1d20724e9fb9 | [
"MIT"
] | null | null | null | 2018/05.py | GillesArcas/Advent_of_Code | 1f57eb1686875df2684b0d56916b1d20724e9fb9 | [
"MIT"
] | null | null | null | import re
import string
DATA = '05.txt'
code1()
code2()
| 21.948718 | 108 | 0.53972 |
bec6becd26fa525cff31dffaad9d3ab5e8f46f15 | 11,873 | py | Python | lib/fbuild/builders/__init__.py | felix-lang/fbuild | 9595fbfd6d3ceece31fda2f96c35d4a241f0129b | [
"PSF-2.0",
"BSD-2-Clause"
] | 40 | 2015-02-07T00:44:12.000Z | 2021-04-02T13:41:08.000Z | lib/fbuild/builders/__init__.py | felix-lang/fbuild | 9595fbfd6d3ceece31fda2f96c35d4a241f0129b | [
"PSF-2.0",
"BSD-2-Clause"
] | 30 | 2015-02-06T17:45:15.000Z | 2019-01-10T16:34:29.000Z | lib/fbuild/builders/__init__.py | felix-lang/fbuild | 9595fbfd6d3ceece31fda2f96c35d4a241f0129b | [
"PSF-2.0",
"BSD-2-Clause"
] | 3 | 2015-09-03T06:38:02.000Z | 2019-10-24T14:26:57.000Z | import abc
import contextlib
import os
import sys
from functools import partial
from itertools import chain
import fbuild
import fbuild.db
import fbuild.path
import fbuild.temp
from . import platform
# ------------------------------------------------------------------------------
# ----------------------------------... | 35.762048 | 80 | 0.553609 |
bec79a34dea2c5eb7b1cdd952dbf003070a952c4 | 1,746 | py | Python | WebServer.py | i3uex/CompareML | 3d53d58117507db11ad08ca0b1c883ec0997840e | [
"MIT"
] | null | null | null | WebServer.py | i3uex/CompareML | 3d53d58117507db11ad08ca0b1c883ec0997840e | [
"MIT"
] | null | null | null | WebServer.py | i3uex/CompareML | 3d53d58117507db11ad08ca0b1c883ec0997840e | [
"MIT"
] | null | null | null | import json
import cherrypy
import engine
| 30.103448 | 120 | 0.611684 |
bec81857d7e4af0801337540f4b978497c5536f9 | 1,897 | py | Python | tuprolog/solve/exception/error/existence/__init__.py | DavideEva/2ppy | 55609415102f8116165a42c8e33e029c4906e160 | [
"Apache-2.0"
] | 1 | 2021-08-07T06:29:28.000Z | 2021-08-07T06:29:28.000Z | tuprolog/solve/exception/error/existence/__init__.py | DavideEva/2ppy | 55609415102f8116165a42c8e33e029c4906e160 | [
"Apache-2.0"
] | 14 | 2021-09-16T13:25:12.000Z | 2022-01-03T10:12:22.000Z | tuprolog/solve/exception/error/existence/__init__.py | DavideEva/2ppy | 55609415102f8116165a42c8e33e029c4906e160 | [
"Apache-2.0"
] | 1 | 2021-12-22T00:25:32.000Z | 2021-12-22T00:25:32.000Z | from typing import Union
from tuprolog import logger
# noinspection PyUnresolvedReferences
import jpype.imports
# noinspection PyUnresolvedReferences
import it.unibo.tuprolog.solve.exception.error as errors
from tuprolog.core import Term, Atom
from tuprolog.solve import ExecutionContext, Signature
ExistenceError = err... | 24.960526 | 96 | 0.765946 |
bec831a08a3c7355e5ebc6786562ec7da94bccbd | 2,421 | py | Python | cptk/core/fetcher.py | RealA10N/cptk | e500d948e91bb70661adc3c2539b149704c734a1 | [
"Apache-2.0"
] | 5 | 2021-12-25T01:49:45.000Z | 2022-03-27T10:30:14.000Z | cptk/core/fetcher.py | RealA10N/cptk | e500d948e91bb70661adc3c2539b149704c734a1 | [
"Apache-2.0"
] | 39 | 2021-12-24T16:35:07.000Z | 2022-03-18T23:15:14.000Z | cptk/core/fetcher.py | RealA10N/cptk | e500d948e91bb70661adc3c2539b149704c734a1 | [
"Apache-2.0"
] | 2 | 2022-01-12T19:13:20.000Z | 2022-01-12T19:32:05.000Z | from __future__ import annotations
from typing import TYPE_CHECKING
import pkg_resources
from bs4 import BeautifulSoup
from requests import session
from cptk.scrape import PageInfo
from cptk.scrape import Website
from cptk.utils import cptkException
if TYPE_CHECKING:
from cptk.scrape import Problem
| 31.441558 | 79 | 0.646014 |
bec8b40804691cfab7d99feee2707b808f11aaed | 15,006 | py | Python | machine_learning/deep_reinforcement_learning_grasping/drlgrasp/drlgrasp/pybullet_envs/kuka_reach_with_visual.py | Hinson-A/guyueclass | e59129526729542dccefa6c7232378a00dc0175a | [
"Apache-2.0"
] | 227 | 2021-01-20T05:34:32.000Z | 2022-03-29T12:43:05.000Z | machine_learning/deep_reinforcement_learning_grasping/drlgrasp/drlgrasp/pybullet_envs/kuka_reach_with_visual.py | passYYYY/guyueclass | 2054ccec2f5e6c002727a5561b494a1046484504 | [
"Apache-2.0"
] | 1 | 2021-04-22T05:56:00.000Z | 2021-05-26T06:00:17.000Z | machine_learning/deep_reinforcement_learning_grasping/drlgrasp/drlgrasp/pybullet_envs/kuka_reach_with_visual.py | passYYYY/guyueclass | 2054ccec2f5e6c002727a5561b494a1046484504 | [
"Apache-2.0"
] | 239 | 2021-01-28T02:59:53.000Z | 2022-03-29T08:02:17.000Z | import pybullet as p
import pybullet_data
import gym
from gym import spaces
from gym.utils import seeding
import numpy as np
from math import sqrt
import random
import time
import math
import cv2
import torch
import os
def random_crop(imgs, out):
"""
args:
imgs: shape (B,C,H,W)
... | 36.159036 | 121 | 0.53212 |
bec8bbb28dfc0d99421b26ef588fd15b586c1fe9 | 509 | py | Python | bucket_4C/python-Pillow/patches/patch-setup.py | jrmarino/ravensource | 91d599fd1f2af55270258d15e72c62774f36033e | [
"FTL"
] | 17 | 2017-04-22T21:53:52.000Z | 2021-01-21T16:57:55.000Z | bucket_4C/python-Pillow/patches/patch-setup.py | jrmarino/ravensource | 91d599fd1f2af55270258d15e72c62774f36033e | [
"FTL"
] | 186 | 2017-09-12T20:46:52.000Z | 2021-11-27T18:15:14.000Z | bucket_4C/python-Pillow/patches/patch-setup.py | jrmarino/ravensource | 91d599fd1f2af55270258d15e72c62774f36033e | [
"FTL"
] | 74 | 2017-09-06T14:48:01.000Z | 2021-08-28T02:48:27.000Z | --- setup.py.orig 2019-07-02 19:13:39 UTC
+++ setup.py
elif (
- sys.platform.startswith("linux")
- or sys.platform.startswith("gnu")
- or sys.platform.startswith("freebsd")
+ sys.platform.startswith("nothing")
):
for dirname in _find_library_d... | 36.357143 | 65 | 0.579568 |
bec8c0835477d8b4651705098efe6f5b0368b832 | 6,581 | py | Python | tests/ut/cpp/python_input/gtest_input/pre_activate/ir_fusion_test.py | GeekHee/mindspore | 896b8e5165dd0a900ed5a39e0fb23525524bf8b0 | [
"Apache-2.0"
] | null | null | null | tests/ut/cpp/python_input/gtest_input/pre_activate/ir_fusion_test.py | GeekHee/mindspore | 896b8e5165dd0a900ed5a39e0fb23525524bf8b0 | [
"Apache-2.0"
] | null | null | null | tests/ut/cpp/python_input/gtest_input/pre_activate/ir_fusion_test.py | GeekHee/mindspore | 896b8e5165dd0a900ed5a39e0fb23525524bf8b0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 33.576531 | 110 | 0.647166 |
bec9227899c9767af55354a2d39773951766ff07 | 486 | py | Python | tdx/abc.py | TrainerDex/DiscordBot | 7e7bb20c5ac76bed236a7458c31017b8ddd8b8be | [
"Apache-2.0"
] | 2 | 2020-09-18T12:43:48.000Z | 2020-11-10T00:34:15.000Z | tdx/abc.py | TrainerDex/DiscordBot | 7e7bb20c5ac76bed236a7458c31017b8ddd8b8be | [
"Apache-2.0"
] | 59 | 2020-07-24T00:04:53.000Z | 2022-03-29T11:15:48.000Z | tdx/abc.py | TrainerDex/DiscordBot | 7e7bb20c5ac76bed236a7458c31017b8ddd8b8be | [
"Apache-2.0"
] | 1 | 2022-01-12T12:33:15.000Z | 2022-01-12T12:33:15.000Z | from abc import ABC
from typing import Dict
from redbot.core import Config
from redbot.core.bot import Red
from trainerdex.client import Client
| 23.142857 | 89 | 0.699588 |
fe1f4c025bf53ebda91717d8cd83c5c619dbfc64 | 7,044 | py | Python | app.py | PolinaRomanchenko/Victorious_Secret_DSCI_532 | e83bc19169a1736618ac55f2ade40741583089fd | [
"MIT"
] | null | null | null | app.py | PolinaRomanchenko/Victorious_Secret_DSCI_532 | e83bc19169a1736618ac55f2ade40741583089fd | [
"MIT"
] | null | null | null | app.py | PolinaRomanchenko/Victorious_Secret_DSCI_532 | e83bc19169a1736618ac55f2ade40741583089fd | [
"MIT"
] | null | null | null | import dash
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc
import pandas as pd
import numpy as np
import altair as alt
import vega_datasets
alt.data_transformers.enable('default')
alt.data_transformers.disable_max_rows()
app = dash.Dash(__name__, assets_f... | 38.917127 | 203 | 0.534923 |
fe2001122588d2b0248d76d502b21c18d29d729d | 40 | py | Python | catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/geometry/subspaces/__init__.py | johnson880319/Software | 045894227f359e0a3a3ec5b7a53f8d1ebc06acdd | [
"CC-BY-2.0"
] | null | null | null | catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/geometry/subspaces/__init__.py | johnson880319/Software | 045894227f359e0a3a3ec5b7a53f8d1ebc06acdd | [
"CC-BY-2.0"
] | null | null | null | catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/geometry/subspaces/__init__.py | johnson880319/Software | 045894227f359e0a3a3ec5b7a53f8d1ebc06acdd | [
"CC-BY-2.0"
] | null | null | null | # coding=utf-8
from .subspaces import *
| 13.333333 | 24 | 0.725 |
fe2070ac8557cbd4275cc5e584c79388af700674 | 2,510 | py | Python | detection/contor.py | chika626/chainer_rep | a1d4fd32a8cfcab753269455d08c1918f273388d | [
"MIT"
] | null | null | null | detection/contor.py | chika626/chainer_rep | a1d4fd32a8cfcab753269455d08c1918f273388d | [
"MIT"
] | 7 | 2020-03-13T08:29:46.000Z | 2020-05-27T17:34:14.000Z | detection/contor.py | chika626/chainer_rep | a1d4fd32a8cfcab753269455d08c1918f273388d | [
"MIT"
] | null | null | null | import json
import math
from PIL import Image,ImageDraw
import pandas as pd
import glob
import argparse
import copy
import numpy as np
import matplotlib.pyplot as plt
import pickle
import cv2
from PIL import ImageEnhance
import chainer
from chainer.datasets import ConcatenatedDataset
from chainer.data... | 26.989247 | 72 | 0.640239 |
fe2074c1f1219a5f9d1c7d8eeb8c9be145ffb2ea | 5,982 | py | Python | train.py | hjl-yul154/autodeeplab | 1bd8399ac830fcafd506a4207b75e05682d1e260 | [
"MIT"
] | 1 | 2020-07-27T07:08:47.000Z | 2020-07-27T07:08:47.000Z | train.py | hjl-yul154/autodeeplab | 1bd8399ac830fcafd506a4207b75e05682d1e260 | [
"MIT"
] | null | null | null | train.py | hjl-yul154/autodeeplab | 1bd8399ac830fcafd506a4207b75e05682d1e260 | [
"MIT"
] | null | null | null | import os
import pdb
import warnings
import numpy as np
import torch
import torch.nn as nn
import torch.utils.data
import torch.backends.cudnn
import torch.optim as optim
import dataloaders
from utils.utils import AverageMeter
from utils.loss import build_criterion
from utils.metrics import Evaluator
from utils.step_... | 38.844156 | 127 | 0.596122 |
fe21c2ef055f99448891893a1c18824fdde9d61e | 1,883 | py | Python | test.py | xxaxdxcxx/miscellaneous-code | cdb88783f39e1b9a89fdb12f7cddfe62619e4357 | [
"MIT"
] | null | null | null | test.py | xxaxdxcxx/miscellaneous-code | cdb88783f39e1b9a89fdb12f7cddfe62619e4357 | [
"MIT"
] | null | null | null | test.py | xxaxdxcxx/miscellaneous-code | cdb88783f39e1b9a89fdb12f7cddfe62619e4357 | [
"MIT"
] | null | null | null |
sol = Solution()
A = [1]
B = [-1]
C = [0]
D = [1]
result = sol.fourSumCount(A, B, C, D)
print("Test 1: {0}".format(result))
A = [1, 2]
B = [-2, -1]
C = [-1, 2]
D = [0, 2]
result = sol.fourSumCount(A, B, C, D)
print("Test 2: {0}".format(result))
| 31.383333 | 79 | 0.463622 |
fe21f2c89737b3c4d120cba724974597cb079bc4 | 1,675 | py | Python | src/boot.py | johngtrs/krux | 7b6c6d410e29c16ab5d3c05a5aafab618f13a86f | [
"MIT"
] | null | null | null | src/boot.py | johngtrs/krux | 7b6c6d410e29c16ab5d3c05a5aafab618f13a86f | [
"MIT"
] | null | null | null | src/boot.py | johngtrs/krux | 7b6c6d410e29c16ab5d3c05a5aafab618f13a86f | [
"MIT"
] | null | null | null | # The MIT License (MIT)
# Copyright (c) 2021 Tom J. Sun
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, ... | 32.211538 | 79 | 0.755224 |
fe224e1ffb01067a1145784abb7281fb2243b190 | 1,788 | py | Python | smartfields/processors/video.py | suhaibroomy/django-smartfields | e9331dc74f72d0254608526f8816aa4bb8f1fca4 | [
"MIT"
] | null | null | null | smartfields/processors/video.py | suhaibroomy/django-smartfields | e9331dc74f72d0254608526f8816aa4bb8f1fca4 | [
"MIT"
] | null | null | null | smartfields/processors/video.py | suhaibroomy/django-smartfields | e9331dc74f72d0254608526f8816aa4bb8f1fca4 | [
"MIT"
] | null | null | null | import re
import six
from smartfields.processors.base import ExternalFileProcessor
from smartfields.utils import ProcessingError
__all__ = [
'FFMPEGProcessor'
]
| 39.733333 | 91 | 0.599553 |
fe22b8aac4f7560fc1450a1ab43865faaf7aecdc | 2,192 | py | Python | tests/test_vmtkScripts/test_vmtksurfaceconnectivity.py | ramtingh/vmtk | 4d6f58ce65d73628353ba2b110cbc29a2e7aa7b3 | [
"Apache-2.0"
] | null | null | null | tests/test_vmtkScripts/test_vmtksurfaceconnectivity.py | ramtingh/vmtk | 4d6f58ce65d73628353ba2b110cbc29a2e7aa7b3 | [
"Apache-2.0"
] | null | null | null | tests/test_vmtkScripts/test_vmtksurfaceconnectivity.py | ramtingh/vmtk | 4d6f58ce65d73628353ba2b110cbc29a2e7aa7b3 | [
"Apache-2.0"
] | 1 | 2019-06-18T23:41:11.000Z | 2019-06-18T23:41:11.000Z | ## Program: VMTK
## Language: Python
## Date: January 12, 2018
## Version: 1.4
## Copyright (c) Richard Izzo, Luca Antiga, All rights reserved.
## See LICENSE file for details.
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNES... | 35.354839 | 117 | 0.764599 |
fe23546882c9babc55f9bce0abdfba0776ff09c5 | 653 | py | Python | sssoon/forms.py | Kingpin-Apps/django-sssoon | 2a44d0d19e70dcd3127f9425c0ed4ba52355a1d2 | [
"BSD-3-Clause"
] | 2 | 2018-04-20T08:28:10.000Z | 2018-05-04T15:32:30.000Z | sssoon/forms.py | KINGH242/django-sssoon | 2a44d0d19e70dcd3127f9425c0ed4ba52355a1d2 | [
"BSD-3-Clause"
] | 2 | 2018-05-16T13:45:14.000Z | 2020-07-29T22:01:37.000Z | sssoon/forms.py | Kingpin-Apps/django-sssoon | 2a44d0d19e70dcd3127f9425c0ed4ba52355a1d2 | [
"BSD-3-Clause"
] | null | null | null | from django import forms
from nocaptcha_recaptcha.fields import NoReCaptchaField
| 40.8125 | 70 | 0.444104 |
fe242c827a7e391a419864c9504b7e2daf4968d1 | 1,054 | py | Python | simple_run_menu.py | william01110111/simple_run_menu | 804c6bb8d6c63c3a4d4c6d3377601bd44fb0eeea | [
"MIT"
] | null | null | null | simple_run_menu.py | william01110111/simple_run_menu | 804c6bb8d6c63c3a4d4c6d3377601bd44fb0eeea | [
"MIT"
] | null | null | null | simple_run_menu.py | william01110111/simple_run_menu | 804c6bb8d6c63c3a4d4c6d3377601bd44fb0eeea | [
"MIT"
] | null | null | null | #! /bin/python3
# simple run menu
import os
import stat
if __name__ == "__main__":
print([command_to_name(i) for i in get_files_in_dir('') if is_file_executable(i)])
| 22.425532 | 83 | 0.685009 |
fe2476b1a28089e744d395040c690305385ddcb6 | 1,792 | py | Python | mne/io/cnt/tests/test_cnt.py | stevemats/mne-python | 47051833f21bb372d60afc3adbf4305648ac7f69 | [
"BSD-3-Clause"
] | 1,953 | 2015-01-17T20:33:46.000Z | 2022-03-30T04:36:34.000Z | mne/io/cnt/tests/test_cnt.py | LiFeng-SECUC/mne-python | 732bb1f994e64e41a8e95dcc10dc98c22cac95c0 | [
"BSD-3-Clause"
] | 8,490 | 2015-01-01T13:04:18.000Z | 2022-03-31T23:02:08.000Z | mne/io/cnt/tests/test_cnt.py | LiFeng-SECUC/mne-python | 732bb1f994e64e41a8e95dcc10dc98c22cac95c0 | [
"BSD-3-Clause"
] | 1,130 | 2015-01-08T22:39:27.000Z | 2022-03-30T21:44:26.000Z |
# Author: Jaakko Leppakangas <jaeilepp@student.jyu.fi>
# Joan Massich <mailsik@gmail.com>
#
# License: BSD-3-Clause
import os.path as op
import numpy as np
from numpy.testing import assert_array_equal
import pytest
from mne import pick_types
from mne.datasets import testing
from mne.io.tests.test_raw import... | 32 | 74 | 0.65346 |
fe24a27fb5e1b1af1324c59e811661bad02c4101 | 792 | py | Python | parliament_proposal_fetcher.py | Track-your-parliament/track-your-parliament-data | 1ab9d9fe5cf4921e4cc792d0e3db3263557daafd | [
"MIT"
] | null | null | null | parliament_proposal_fetcher.py | Track-your-parliament/track-your-parliament-data | 1ab9d9fe5cf4921e4cc792d0e3db3263557daafd | [
"MIT"
] | null | null | null | parliament_proposal_fetcher.py | Track-your-parliament/track-your-parliament-data | 1ab9d9fe5cf4921e4cc792d0e3db3263557daafd | [
"MIT"
] | null | null | null | import urllib.request, json
import pandas as pd
baseUrl = 'https://avoindata.eduskunta.fi/api/v1/tables/VaskiData'
parameters = 'rows?columnName=Eduskuntatunnus&columnValue=LA%25&perPage=100'
page = 0
df = ''
while True:
print(f'Fetching page number {page}')
with urllib.request.urlopen(f'{baseUrl}/{parameters... | 29.333333 | 94 | 0.641414 |
fe2717913fd1b6cb1c949e299c54e281bc41335e | 2,899 | py | Python | examples/Catboost_regression-scorer_usage.py | emaldonadocruz/UTuning | b32207bcbeb80e4c07e098bcbe4d5ce8b3fee778 | [
"BSD-3-Clause"
] | null | null | null | examples/Catboost_regression-scorer_usage.py | emaldonadocruz/UTuning | b32207bcbeb80e4c07e098bcbe4d5ce8b3fee778 | [
"BSD-3-Clause"
] | null | null | null | examples/Catboost_regression-scorer_usage.py | emaldonadocruz/UTuning | b32207bcbeb80e4c07e098bcbe4d5ce8b3fee778 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 20 16:15:37 2021
@author: em42363
"""
# In[1]: Import functions
'''
CatBoost is a high-performance open source library for gradient boosting
on decision trees
'''
from catboost import CatBoostRegressor
from sklearn.model_selection import train_test_split
import pandas a... | 26.354545 | 102 | 0.703001 |
fe27a69a39058bf33d488a199887b8c07ffdf22c | 1,683 | py | Python | sujson/_logger.py | PotasnikM/translator-to-suJSON | abb2001c78d431bd2087754666bc896ba0543dfd | [
"MIT"
] | 2 | 2019-07-01T12:45:25.000Z | 2020-06-23T11:48:08.000Z | sujson/_logger.py | PotasnikM/translator-to-suJSON | abb2001c78d431bd2087754666bc896ba0543dfd | [
"MIT"
] | 17 | 2019-04-25T10:46:40.000Z | 2020-11-10T09:28:55.000Z | sujson/_logger.py | PotasnikM/translator-to-suJSON | abb2001c78d431bd2087754666bc896ba0543dfd | [
"MIT"
] | 3 | 2019-06-22T19:51:08.000Z | 2021-02-08T09:17:55.000Z | import logging
from platform import system
from tqdm import tqdm
from multiprocessing import Lock
loggers = {}
# https://stackoverflow.com/questions/38543506/
def setup_custom_logger(name):
"""
Create a logger with a certain name and level
"""
global loggers
if loggers.get(name):
return... | 29.017241 | 110 | 0.655971 |
fe27abc65b6073ec58be633f81761077a129a312 | 1,243 | py | Python | face-detect.py | Gicehajunior/face-recognition-detection-OpenCv-Python | 6551285ce5b4532d8b6f3ad6b8e9a29564673ea9 | [
"Unlicense"
] | null | null | null | face-detect.py | Gicehajunior/face-recognition-detection-OpenCv-Python | 6551285ce5b4532d8b6f3ad6b8e9a29564673ea9 | [
"Unlicense"
] | null | null | null | face-detect.py | Gicehajunior/face-recognition-detection-OpenCv-Python | 6551285ce5b4532d8b6f3ad6b8e9a29564673ea9 | [
"Unlicense"
] | null | null | null | import cv2
import sys
import playsound
face_cascade = cv2.CascadeClassifier('cascades/haarcascade_frontalface_default.xml')
# capture video using cv2
video_capture = cv2.VideoCapture(0)
while True:
# capture frame by frame, i.e, one by one
ret, frame = video_capture.read()
gray = cv2.cvtColor(frame... | 28.25 | 85 | 0.563154 |
fe27fecf1f48f5d4699cad091ca66149a513fe9b | 7,938 | py | Python | sis/enrollments.py | ryanlovett/sis-cli | 5efe5b9344b547c3f1365ef63a0ad33ec013fcca | [
"Apache-2.0"
] | null | null | null | sis/enrollments.py | ryanlovett/sis-cli | 5efe5b9344b547c3f1365ef63a0ad33ec013fcca | [
"Apache-2.0"
] | null | null | null | sis/enrollments.py | ryanlovett/sis-cli | 5efe5b9344b547c3f1365ef63a0ad33ec013fcca | [
"Apache-2.0"
] | null | null | null | # vim:set et sw=4 ts=4:
import logging
import sys
import jmespath
from . import sis, classes
# logging
logging.basicConfig(stream=sys.stdout, level=logging.WARNING)
logger = logging.getLogger(__name__)
# SIS endpoint
enrollments_uri = "https://apis.berkeley.edu/sis/v2/enrollments"
# apparently some courses have LA... | 37.620853 | 105 | 0.68317 |
fe2900b93b3b942d3363b1695eb5a7b3920a90d6 | 1,913 | py | Python | app.py | Nishanth-Gobi/Da-Vinci-Code | b44a2d0c553e4f9cf9e2bb3283ebb5f6eaecea4a | [
"MIT"
] | null | null | null | app.py | Nishanth-Gobi/Da-Vinci-Code | b44a2d0c553e4f9cf9e2bb3283ebb5f6eaecea4a | [
"MIT"
] | null | null | null | app.py | Nishanth-Gobi/Da-Vinci-Code | b44a2d0c553e4f9cf9e2bb3283ebb5f6eaecea4a | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, redirect, url_for
from os.path import join
from stego import Steganography
app = Flask(__name__)
UPLOAD_FOLDER = 'static/files/'
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg'}
if __name__ == '__main__':
app.run(debug=... | 31.360656 | 97 | 0.67747 |
fe292b4982f3dd8af18a6b88ccaadbbba6d158ef | 8,012 | py | Python | imitation_learning/generate_demonstrations/gen_envs.py | HaiDangDang/2020-flatland | abbf2f7f62fabf6da0937f80c2181f1c457ce24a | [
"MIT"
] | 1 | 2021-02-21T02:54:35.000Z | 2021-02-21T02:54:35.000Z | imitation_learning/generate_demonstrations/gen_envs.py | HaiDangDang/2020-flatland | abbf2f7f62fabf6da0937f80c2181f1c457ce24a | [
"MIT"
] | null | null | null | imitation_learning/generate_demonstrations/gen_envs.py | HaiDangDang/2020-flatland | abbf2f7f62fabf6da0937f80c2181f1c457ce24a | [
"MIT"
] | null | null | null | from flatland.envs.agent_utils import RailAgentStatus
from flatland.envs.malfunction_generators import malfunction_from_params, MalfunctionParameters
from flatland.envs.observations import GlobalObsForRailEnv
from flatland.envs.rail_env import RailEnv
from flatland.envs.rail_generators import sparse_rail_generator
from... | 29.240876 | 96 | 0.623689 |
fe2b48a6665b98787ac1bd205fe634201bd2120e | 1,480 | py | Python | job-queue-portal/postgres_django_queue/djangoenv/lib/python3.8/site-packages/django_celery_results/migrations/0006_taskresult_date_created.py | Sruthi-Ganesh/postgres-django-queue | 4ea8412c073ff8ceb0efbac48afc29456ae11346 | [
"Apache-2.0"
] | null | null | null | job-queue-portal/postgres_django_queue/djangoenv/lib/python3.8/site-packages/django_celery_results/migrations/0006_taskresult_date_created.py | Sruthi-Ganesh/postgres-django-queue | 4ea8412c073ff8ceb0efbac48afc29456ae11346 | [
"Apache-2.0"
] | null | null | null | job-queue-portal/postgres_django_queue/djangoenv/lib/python3.8/site-packages/django_celery_results/migrations/0006_taskresult_date_created.py | Sruthi-Ganesh/postgres-django-queue | 4ea8412c073ff8ceb0efbac48afc29456ae11346 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 2.2.4 on 2019-08-21 19:53
# this file is auto-generated so don't do flake8 on it
# flake8: noqa
from __future__ import absolute_import, unicode_literals
from django.db import migrations, models
import django.utils.timezone
| 30.204082 | 83 | 0.664189 |
fe2bf5d430a026df243c522eca3e9b1d054d0492 | 45 | py | Python | remediar/modules/http/__init__.py | fabaff/remediar | 014d7733b00cd40a45881c2729c04df5584476e7 | [
"Apache-2.0"
] | null | null | null | remediar/modules/http/__init__.py | fabaff/remediar | 014d7733b00cd40a45881c2729c04df5584476e7 | [
"Apache-2.0"
] | null | null | null | remediar/modules/http/__init__.py | fabaff/remediar | 014d7733b00cd40a45881c2729c04df5584476e7 | [
"Apache-2.0"
] | null | null | null | """Support for HTTP or web server issues."""
| 22.5 | 44 | 0.688889 |
fe2e74a698807b4b6d0cf881031198f5da548dd4 | 1,891 | py | Python | Image Recognition/utils/BayesianModels/Bayesian3Conv3FC.py | AlanMorningLight/PyTorch-BayesianCNN | 5de7133f09dd10135bf605efbdd26c18f2a4df13 | [
"MIT"
] | 1 | 2020-02-10T12:58:25.000Z | 2020-02-10T12:58:25.000Z | utils/BayesianModels/Bayesian3Conv3FC.py | SulemanKhurram/ThesisExperiments | 4fdf7b6558c87a096dcdc374c35085ac946d3a58 | [
"MIT"
] | null | null | null | utils/BayesianModels/Bayesian3Conv3FC.py | SulemanKhurram/ThesisExperiments | 4fdf7b6558c87a096dcdc374c35085ac946d3a58 | [
"MIT"
] | null | null | null | import torch.nn as nn
from utils.BBBlayers import BBBConv2d, BBBLinearFactorial, FlattenLayer | 35.679245 | 89 | 0.599683 |
fe2fc61a568a0e2538b7b1f99349a5186a485475 | 8,657 | py | Python | custom_scripts/load_animals.py | nphilou/influence-release | bcf3603705b6ff172bcb62123aef0248afa77a05 | [
"MIT"
] | null | null | null | custom_scripts/load_animals.py | nphilou/influence-release | bcf3603705b6ff172bcb62123aef0248afa77a05 | [
"MIT"
] | null | null | null | custom_scripts/load_animals.py | nphilou/influence-release | bcf3603705b6ff172bcb62123aef0248afa77a05 | [
"MIT"
] | null | null | null | import os
from tensorflow.contrib.learn.python.learn.datasets import base
import numpy as np
import IPython
from subprocess import call
from keras.preprocessing import image
from influence.dataset import DataSet
from influence.inception_v3 import preprocess_input
BASE_DIR = 'data' # TODO: change
| 35.479508 | 167 | 0.611644 |
fe2fd1a403e44db33fca9bd236a441a4df247ba1 | 13,000 | py | Python | src/qiskit_aws_braket_provider/awsbackend.py | carstenblank/qiskit-aws-braket-provider | 539f0c75c2ccf1f6e5e981b92ea74f497fcba237 | [
"Apache-2.0"
] | 7 | 2020-09-25T17:16:54.000Z | 2021-05-20T10:42:52.000Z | src/qiskit_aws_braket_provider/awsbackend.py | carstenblank/qiskit-aws-braket-provider | 539f0c75c2ccf1f6e5e981b92ea74f497fcba237 | [
"Apache-2.0"
] | 4 | 2020-09-21T19:33:39.000Z | 2020-09-22T12:21:11.000Z | src/qiskit_aws_braket_provider/awsbackend.py | carstenblank/qiskit-aws-braket-provider | 539f0c75c2ccf1f6e5e981b92ea74f497fcba237 | [
"Apache-2.0"
] | 1 | 2020-09-21T19:32:16.000Z | 2020-09-21T19:32:16.000Z | # Copyright 2020 Carsten Blank
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 45.138889 | 144 | 0.666923 |
fe2ffb0cf28c08ae4282aa561c6f775796ff339b | 14,564 | py | Python | test/unit/Algorithms/GenericLinearTransportTest.py | thirtywang/OpenPNM | e55ee7ae69a8be3e2b0e6bf24c9ff92b6d24e16a | [
"MIT"
] | null | null | null | test/unit/Algorithms/GenericLinearTransportTest.py | thirtywang/OpenPNM | e55ee7ae69a8be3e2b0e6bf24c9ff92b6d24e16a | [
"MIT"
] | null | null | null | test/unit/Algorithms/GenericLinearTransportTest.py | thirtywang/OpenPNM | e55ee7ae69a8be3e2b0e6bf24c9ff92b6d24e16a | [
"MIT"
] | 1 | 2020-07-02T02:21:10.000Z | 2020-07-02T02:21:10.000Z | import OpenPNM
import numpy as np
import OpenPNM.Physics.models as pm
| 51.101754 | 78 | 0.49025 |
fe3002f8ab77d8668df51f08f7789bc9628e8c1f | 2,370 | py | Python | EC2 Auto Clean Room Forensics/Lambda-Functions/snapshotForRemediation.py | spartantri/aws-security-automation | a3904931220111022d12e71a3d79e4a85fc82173 | [
"Apache-2.0"
] | null | null | null | EC2 Auto Clean Room Forensics/Lambda-Functions/snapshotForRemediation.py | spartantri/aws-security-automation | a3904931220111022d12e71a3d79e4a85fc82173 | [
"Apache-2.0"
] | null | null | null | EC2 Auto Clean Room Forensics/Lambda-Functions/snapshotForRemediation.py | spartantri/aws-security-automation | a3904931220111022d12e71a3d79e4a85fc82173 | [
"Apache-2.0"
] | null | null | null | # MIT No Attribution
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
# software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify,
# merge, publish, distribute, sublicen... | 33.857143 | 110 | 0.670042 |
fe30812932f608889eaceef38afb76f593b3db27 | 3,830 | py | Python | gpu_bdb/queries/q26/gpu_bdb_query_26.py | VibhuJawa/gpu-bdb | 13987b4ef8b92db3b9d2905dec7bd2fd81f42ae9 | [
"Apache-2.0"
] | 62 | 2020-05-14T13:33:02.000Z | 2020-10-29T13:28:26.000Z | gpu_bdb/queries/q26/gpu_bdb_query_26.py | VibhuJawa/gpu-bdb | 13987b4ef8b92db3b9d2905dec7bd2fd81f42ae9 | [
"Apache-2.0"
] | 104 | 2020-07-01T21:07:42.000Z | 2020-11-13T16:36:04.000Z | gpu_bdb/queries/q26/gpu_bdb_query_26.py | VibhuJawa/gpu-bdb | 13987b4ef8b92db3b9d2905dec7bd2fd81f42ae9 | [
"Apache-2.0"
] | 21 | 2020-05-14T14:44:40.000Z | 2020-11-07T12:08:28.000Z | #
# Copyright (c) 2019-2022, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 31.138211 | 115 | 0.703655 |
fe317187c1c12b8c77ea5e51802f388e760744e4 | 1,324 | py | Python | tests/test_intbounds.py | alex/optimizer-model | 0e40a0763082f5fe0bd596e8e77ebccbcd7f4a98 | [
"BSD-3-Clause"
] | 4 | 2015-04-29T22:49:25.000Z | 2018-02-16T09:06:08.000Z | tests/test_intbounds.py | alex/optimizer-model | 0e40a0763082f5fe0bd596e8e77ebccbcd7f4a98 | [
"BSD-3-Clause"
] | null | null | null | tests/test_intbounds.py | alex/optimizer-model | 0e40a0763082f5fe0bd596e8e77ebccbcd7f4a98 | [
"BSD-3-Clause"
] | null | null | null | from optimizer.utils.intbounds import IntBounds
| 23.22807 | 67 | 0.5929 |
fe3188f73830a0839c72948677e1605c9ae2ae83 | 1,586 | py | Python | tdclient/test/database_model_test.py | minchuang/td-client-python | 6cf6dfbb60119f400274491d3e942d4f9fbcebd6 | [
"Apache-2.0"
] | 2 | 2019-02-22T11:56:17.000Z | 2019-02-25T10:09:46.000Z | tdclient/test/database_model_test.py | minchuang/td-client-python | 6cf6dfbb60119f400274491d3e942d4f9fbcebd6 | [
"Apache-2.0"
] | null | null | null | tdclient/test/database_model_test.py | minchuang/td-client-python | 6cf6dfbb60119f400274491d3e942d4f9fbcebd6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
from __future__ import unicode_literals
try:
from unittest import mock
except ImportError:
import mock
from tdclient import models
from tdclient.test.test_helper import *
| 40.666667 | 202 | 0.713745 |
fe31f26debb52795b22561b36355ce06ff7905d8 | 558 | py | Python | setup.py | ballcap231/fireTS | 74cc89a14d67edabf31139d1552025d54791f2a9 | [
"MIT"
] | null | null | null | setup.py | ballcap231/fireTS | 74cc89a14d67edabf31139d1552025d54791f2a9 | [
"MIT"
] | null | null | null | setup.py | ballcap231/fireTS | 74cc89a14d67edabf31139d1552025d54791f2a9 | [
"MIT"
] | null | null | null | from setuptools import setup
dependencies = [
'numpy',
'scipy',
'scikit-learn',
]
setup(
name='fireTS',
version='0.0.7',
description='A python package for multi-variate time series prediction',
long_description=open('README.md').read(),
long_description_content_type="text/markdown",
... | 24.26087 | 76 | 0.677419 |
fe3273d41978521818a7243089a132072ef92c5a | 883 | py | Python | euler/py/project_019.py | heyihan/scodes | 342518b548a723916c9273d8ebc1b345a0467e76 | [
"BSD-3-Clause"
] | null | null | null | euler/py/project_019.py | heyihan/scodes | 342518b548a723916c9273d8ebc1b345a0467e76 | [
"BSD-3-Clause"
] | null | null | null | euler/py/project_019.py | heyihan/scodes | 342518b548a723916c9273d8ebc1b345a0467e76 | [
"BSD-3-Clause"
] | null | null | null | # https://projecteuler.net/problem=19
day_19000101 = 1
days_1900 = year_days(1900)
day_next_day1 = (day_19000101 + days_1900)%7
print(day_19000101, days_1900, day_next_day1)
sum = 0
for i in range(1901, 2001):
for j in range(1, 13):
if day_next_day1 == 0:
print(i, j)
sum = sum + ... | 20.534884 | 61 | 0.582106 |
fe32cc9e555895354fe2279db255494d9b4433fb | 1,652 | py | Python | address_book/address_book.py | wowsuchnamaste/address_book | 4877d16d795c54b750e151fa93e69c080717ae72 | [
"MIT"
] | null | null | null | address_book/address_book.py | wowsuchnamaste/address_book | 4877d16d795c54b750e151fa93e69c080717ae72 | [
"MIT"
] | null | null | null | address_book/address_book.py | wowsuchnamaste/address_book | 4877d16d795c54b750e151fa93e69c080717ae72 | [
"MIT"
] | null | null | null | """A simple address book."""
from ._tools import generate_uuid
| 25.415385 | 80 | 0.565981 |
fe3415df5ab13d93fe351122344f2bd2d2fe4c5f | 3,839 | py | Python | inference.py | zzhang87/ChestXray | eaafe2f7f5e91bb30fbed02dec1f77ff314434b5 | [
"MIT"
] | null | null | null | inference.py | zzhang87/ChestXray | eaafe2f7f5e91bb30fbed02dec1f77ff314434b5 | [
"MIT"
] | 11 | 2020-01-28T21:44:26.000Z | 2022-03-11T23:19:37.000Z | inference.py | zzhang87/ChestXray | eaafe2f7f5e91bb30fbed02dec1f77ff314434b5 | [
"MIT"
] | null | null | null | import keras
import numpy as np
import pandas as pd
import cv2
import os
import json
import pdb
import argparse
import math
import copy
from vis.visualization import visualize_cam, overlay, visualize_activation
from vis.utils.utils import apply_modifications
from shutil import rmtree
import matplotlib.cm as cm
from ma... | 27.035211 | 107 | 0.716593 |
fe34376d96d5593399f4f9364cf5da83ea7d813b | 530 | py | Python | test/DQueueTest.py | MistSun-Chen/py_verifier | 7e9161d1fdbb611fe4be5eeb2f89a6286fa7b555 | [
"MIT"
] | null | null | null | test/DQueueTest.py | MistSun-Chen/py_verifier | 7e9161d1fdbb611fe4be5eeb2f89a6286fa7b555 | [
"MIT"
] | null | null | null | test/DQueueTest.py | MistSun-Chen/py_verifier | 7e9161d1fdbb611fe4be5eeb2f89a6286fa7b555 | [
"MIT"
] | null | null | null | from libTask import Queue
from common import configParams
from common import common
if __name__ == '__main__':
main() | 35.333333 | 124 | 0.718868 |
fe3599447ec843cd5c9296bccc205dff470707c7 | 1,417 | py | Python | src/Knn-Tensor.py | python-itb/knn-from-scratch | dbc6fb53cffb245a76d35b9ff85ac8cb21877ca8 | [
"MIT"
] | null | null | null | src/Knn-Tensor.py | python-itb/knn-from-scratch | dbc6fb53cffb245a76d35b9ff85ac8cb21877ca8 | [
"MIT"
] | 2 | 2018-03-20T06:47:32.000Z | 2018-10-25T10:54:08.000Z | src/Knn-Tensor.py | python-itb/knn-from-scratch | dbc6fb53cffb245a76d35b9ff85ac8cb21877ca8 | [
"MIT"
] | 4 | 2018-03-20T06:43:11.000Z | 2019-04-15T16:34:28.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 13 18:52:28 2018
@author: amajidsinar
"""
from sklearn import datasets
import matplotlib.pyplot as plt
import numpy as np
plt.style.use('seaborn-white')
iris = datasets.load_iris()
dataset = iris.data
# only take 0th and 1th column for X
data_kno... | 21.149254 | 94 | 0.687368 |
fe35a3606e5ec595f8753af44fd793743da1ae33 | 2,135 | py | Python | de_test_tron2.py | volpepe/detectron2-ResNeSt | 1481d50880baa615b873b7a18156c06a5606a85c | [
"Apache-2.0"
] | null | null | null | de_test_tron2.py | volpepe/detectron2-ResNeSt | 1481d50880baa615b873b7a18156c06a5606a85c | [
"Apache-2.0"
] | null | null | null | de_test_tron2.py | volpepe/detectron2-ResNeSt | 1481d50880baa615b873b7a18156c06a5606a85c | [
"Apache-2.0"
] | null | null | null | import torch, torchvision
import detectron2
from detectron2.utils.logger import setup_logger
setup_logger()
# import some common libraries
import numpy as np
import os, json, cv2, random
# import some common detectron2 utilities
from detectron2 import model_zoo
from detectron2.engine import DefaultPredic... | 40.283019 | 164 | 0.710539 |
fe35e371f2d0a2c205ae69e2ee6c811fd9ed1de5 | 8,916 | py | Python | pika/data.py | Pankrat/pika | 9f62cbe032e9b4fa0fe1842587ce0702c3926a3d | [
"BSD-3-Clause"
] | null | null | null | pika/data.py | Pankrat/pika | 9f62cbe032e9b4fa0fe1842587ce0702c3926a3d | [
"BSD-3-Clause"
] | null | null | null | pika/data.py | Pankrat/pika | 9f62cbe032e9b4fa0fe1842587ce0702c3926a3d | [
"BSD-3-Clause"
] | null | null | null | """AMQP Table Encoding/Decoding"""
import struct
import decimal
import calendar
from datetime import datetime
from pika import exceptions
from pika.compat import unicode_type, PY2, long, as_bytes
def encode_short_string(pieces, value):
"""Encode a string value as short string and append it to pieces list
ret... | 30.534247 | 80 | 0.596456 |
fe372dac70d64a37ad3e688bb47fa5b1bd4ad42e | 528 | py | Python | tests/fixtures/data_sets/service/dummy/dummy_configurable.py | Agi-dev/pylaas_core | c44866b5e57eb6f05f5b2b8d731f22d62a8c01c2 | [
"MIT"
] | null | null | null | tests/fixtures/data_sets/service/dummy/dummy_configurable.py | Agi-dev/pylaas_core | c44866b5e57eb6f05f5b2b8d731f22d62a8c01c2 | [
"MIT"
] | 2 | 2021-03-25T21:30:41.000Z | 2021-06-01T21:25:37.000Z | tests/fixtures/data_sets/service/dummy/dummy_configurable.py | Agi-dev/pylaas_core | c44866b5e57eb6f05f5b2b8d731f22d62a8c01c2 | [
"MIT"
] | null | null | null | from pylaas_core.abstract.abstract_service import AbstractService
import time
from pylaas_core.interface.technical.container_configurable_aware_interface import ContainerConfigurableAwareInterface
| 31.058824 | 118 | 0.765152 |
fe3845f60103709c0d0030d388891565874650ad | 1,076 | py | Python | blogtech/src/blog/views.py | IVAN-URBACZKA/django-blog | 7ef6050c0de2938791843c3ec93e6e6a1e683baa | [
"MIT"
] | null | null | null | blogtech/src/blog/views.py | IVAN-URBACZKA/django-blog | 7ef6050c0de2938791843c3ec93e6e6a1e683baa | [
"MIT"
] | null | null | null | blogtech/src/blog/views.py | IVAN-URBACZKA/django-blog | 7ef6050c0de2938791843c3ec93e6e6a1e683baa | [
"MIT"
] | null | null | null | from django.urls import reverse_lazy, reverse
from django.utils.decorators import method_decorator
from django.views.generic import ListView, DetailView, CreateView, DeleteView, UpdateView
from .models import BlogPost
from django.contrib.auth.decorators import login_required
| 31.647059 | 89 | 0.760223 |
fe393898f4084fe1c0d82dbb19e8e9bf170a60ea | 4,514 | py | Python | apc_deep_vision/python/generate_data.py | Juxi/apb-baseline | fd47a5fd78cdfd75c68601a40ca4726d7d20c9ce | [
"BSD-3-Clause"
] | 9 | 2017-02-06T10:24:56.000Z | 2022-02-27T20:59:52.000Z | apc_deep_vision/python/generate_data.py | Juxi/apb-baseline | fd47a5fd78cdfd75c68601a40ca4726d7d20c9ce | [
"BSD-3-Clause"
] | null | null | null | apc_deep_vision/python/generate_data.py | Juxi/apb-baseline | fd47a5fd78cdfd75c68601a40ca4726d7d20c9ce | [
"BSD-3-Clause"
] | 2 | 2017-10-15T08:33:37.000Z | 2019-03-05T07:29:38.000Z | #! /usr/bin/env python
# ********************************************************************
# Software License Agreement (BSD License)
#
# Copyright (c) 2015, University of Colorado, Boulder
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted... | 37.932773 | 105 | 0.634914 |
fe39cd977754d7baa5900e133ad7f76b583b9786 | 3,509 | py | Python | stats.py | shirshanka/fact-ory | 9e6bae63ca7f8f534b811058efb8942004d6a37b | [
"Apache-2.0"
] | null | null | null | stats.py | shirshanka/fact-ory | 9e6bae63ca7f8f534b811058efb8942004d6a37b | [
"Apache-2.0"
] | null | null | null | stats.py | shirshanka/fact-ory | 9e6bae63ca7f8f534b811058efb8942004d6a37b | [
"Apache-2.0"
] | null | null | null | import numpy as np;
import sys
import matplotlib.pyplot as plt;
from matplotlib import cm;
from termcolor import colored;
if __name__=="__main__":
print "hello world"
| 34.742574 | 154 | 0.68937 |
fe3be5e4c8643dd88fcaa6473267f6ae2cf76961 | 1,706 | py | Python | examples/peptidecutter/advanced.py | zjuchenyuan/EasyLogin | acc67187d902f20ec64d2d6b9eeb953e2a0ac77d | [
"MIT"
] | 33 | 2016-12-01T01:33:31.000Z | 2021-05-12T03:32:27.000Z | examples/peptidecutter/advanced.py | zjuchenyuan/EasyLogin | acc67187d902f20ec64d2d6b9eeb953e2a0ac77d | [
"MIT"
] | 2 | 2018-04-26T06:58:29.000Z | 2020-01-11T15:18:14.000Z | examples/peptidecutter/advanced.py | zjuchenyuan/EasyLogin | acc67187d902f20ec64d2d6b9eeb953e2a0ac77d | [
"MIT"
] | 4 | 2017-02-24T11:08:45.000Z | 2021-01-13T16:00:33.000Z | from EasyLogin import EasyLogin
from pprint import pprint
if __name__ == "__main__":
#pprint(peptidecutter("SERVELAT"))
import sys
pprint(peptidecutter_more(sys.argv[1]))
| 30.464286 | 200 | 0.579132 |
fe3c13d3bb5c59b28cc1e5b5a35923b1537df9f4 | 1,333 | py | Python | pgn2fixture/tests/test_utils.py | pointerish/pgn2fixture | 02039680acc37cbca22fb332738e34cd113831a4 | [
"MIT"
] | 3 | 2021-03-18T19:08:59.000Z | 2021-10-10T03:52:49.000Z | pgn2fixture/tests/test_utils.py | pointerish/pgn2fixture | 02039680acc37cbca22fb332738e34cd113831a4 | [
"MIT"
] | null | null | null | pgn2fixture/tests/test_utils.py | pointerish/pgn2fixture | 02039680acc37cbca22fb332738e34cd113831a4 | [
"MIT"
] | null | null | null | import unittest
from .. import utils
| 43 | 165 | 0.549887 |
fe3c354a94b9bc97c332f504c7fb8dc959b31224 | 7,019 | py | Python | manila/tests/share/test_snapshot_access.py | gouthampacha/manila | 4b7ba9b99d272663f519b495668715fbf979ffbc | [
"Apache-2.0"
] | 3 | 2016-06-06T13:05:00.000Z | 2021-05-05T04:29:24.000Z | manila/tests/share/test_snapshot_access.py | gouthampacha/manila | 4b7ba9b99d272663f519b495668715fbf979ffbc | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | manila/tests/share/test_snapshot_access.py | gouthampacha/manila | 4b7ba9b99d272663f519b495668715fbf979ffbc | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright (c) 2016 Hitachi Data Systems, Inc.
# 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
#
# U... | 41.532544 | 78 | 0.648383 |
fe3d447e3c8eb707e5a1d8550493f94e70efafc2 | 269 | py | Python | packages/pyright-internal/src/tests/samples/unnecessaryCast1.py | sasano8/pyright | e804f324ee5dbd25fd37a258791b3fd944addecd | [
"MIT"
] | 4,391 | 2019-05-07T01:18:57.000Z | 2022-03-31T20:45:44.000Z | packages/pyright-internal/src/tests/samples/unnecessaryCast1.py | sasano8/pyright | e804f324ee5dbd25fd37a258791b3fd944addecd | [
"MIT"
] | 2,740 | 2019-05-07T03:29:30.000Z | 2022-03-31T12:57:46.000Z | packages/pyright-internal/src/tests/samples/unnecessaryCast1.py | sasano8/pyright | e804f324ee5dbd25fd37a258791b3fd944addecd | [
"MIT"
] | 455 | 2019-05-07T12:55:14.000Z | 2022-03-31T17:09:15.000Z | # This sample tests the type checker's reportUnnecessaryCast feature.
from typing import cast, Union
c: Union[int, str] = "hello"
d = cast(int, c)
| 19.214286 | 69 | 0.687732 |
fe3dd2d72750bce0851326699b900d4e0689f605 | 690 | py | Python | Python/1238.py | ArikBartzadok/beecrowd-challenges | ddb0453d1caa75c87c4b3ed6a40309ab99da77f2 | [
"MIT"
] | null | null | null | Python/1238.py | ArikBartzadok/beecrowd-challenges | ddb0453d1caa75c87c4b3ed6a40309ab99da77f2 | [
"MIT"
] | null | null | null | Python/1238.py | ArikBartzadok/beecrowd-challenges | ddb0453d1caa75c87c4b3ed6a40309ab99da77f2 | [
"MIT"
] | null | null | null |
combinador() | 18.157895 | 60 | 0.510145 |
fe3e731bfc56815773233eb7a914918e37d052e2 | 974 | py | Python | metadata_service/api/popular_tables.py | worldwise001/amundsenmetadatalibrary | 9914c8b51d38b8bd76d3249eb4f7fcce3e198d09 | [
"Apache-2.0"
] | null | null | null | metadata_service/api/popular_tables.py | worldwise001/amundsenmetadatalibrary | 9914c8b51d38b8bd76d3249eb4f7fcce3e198d09 | [
"Apache-2.0"
] | 1 | 2019-09-21T23:59:46.000Z | 2019-09-21T23:59:46.000Z | metadata_service/api/popular_tables.py | worldwise001/amundsenmetadatalibrary | 9914c8b51d38b8bd76d3249eb4f7fcce3e198d09 | [
"Apache-2.0"
] | 1 | 2019-09-21T23:56:40.000Z | 2019-09-21T23:56:40.000Z | from http import HTTPStatus
from typing import Iterable, Union, Mapping
from flask import request
from flask_restful import Resource, fields, marshal
from metadata_service.proxy import get_proxy_client
popular_table_fields = {
'database': fields.String,
'cluster': fields.String,
'schema': fields.String,
... | 29.515152 | 96 | 0.722793 |
fe3e90a0352653677e5f89aa3d6275c22d3a1048 | 470 | py | Python | tests/test1.py | SaijC/manhwaDownloader | f6e97cfe25355598e42633a3796d84b666d5302f | [
"MIT"
] | null | null | null | tests/test1.py | SaijC/manhwaDownloader | f6e97cfe25355598e42633a3796d84b666d5302f | [
"MIT"
] | null | null | null | tests/test1.py | SaijC/manhwaDownloader | f6e97cfe25355598e42633a3796d84b666d5302f | [
"MIT"
] | null | null | null | import requests
import logging
import cfscrape
import os
from manhwaDownloader.constants import CONSTANTS as CONST
logging.basicConfig(level=logging.DEBUG)
folderPath = os.path.join(CONST.OUTPUTPATH, 'serious-taste-of-forbbiden-fruit')
logging.info(len([file for file in os.walk(folderPath)]))
walkList = [file for fi... | 24.736842 | 79 | 0.778723 |
fe3ee793457d0725edb13bd4a978ffe58340aff1 | 11,708 | py | Python | others/Keras_custom_error.py | rahasayantan/Work-For-Reference | e052da538df84034ec5a0fe3b19c4287de307286 | [
"MIT"
] | null | null | null | others/Keras_custom_error.py | rahasayantan/Work-For-Reference | e052da538df84034ec5a0fe3b19c4287de307286 | [
"MIT"
] | null | null | null | others/Keras_custom_error.py | rahasayantan/Work-For-Reference | e052da538df84034ec5a0fe3b19c4287de307286 | [
"MIT"
] | null | null | null | # define custom R2 metrics for Keras backend
from keras import backend as K
# base model architecture definition
################K2
import pandas as pd
import numpy as np
from sklearn.feature_selection import SelectFromModel
from sklearn.linear_model import LassoCV
from sklearn.model_selection import GridSear... | 31.643243 | 112 | 0.656389 |
fe4036ba021d5a543848f0719df15257dc0be8cd | 7,239 | py | Python | tests/ut/python/parallel/test_manual_gatherv2.py | PowerOlive/mindspore | bda20724a94113cedd12c3ed9083141012da1f15 | [
"Apache-2.0"
] | 3,200 | 2020-02-17T12:45:41.000Z | 2022-03-31T20:21:16.000Z | tests/ut/python/parallel/test_manual_gatherv2.py | zimo-geek/mindspore | 665ec683d4af85c71b2a1f0d6829356f2bc0e1ff | [
"Apache-2.0"
] | 176 | 2020-02-12T02:52:11.000Z | 2022-03-28T22:15:55.000Z | tests/ut/python/parallel/test_manual_gatherv2.py | zimo-geek/mindspore | 665ec683d4af85c71b2a1f0d6829356f2bc0e1ff | [
"Apache-2.0"
] | 621 | 2020-03-09T01:31:41.000Z | 2022-03-30T03:43:19.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 37.703125 | 117 | 0.654234 |
fe4088c9d39d6abd819f54e637798544df93b9db | 3,396 | py | Python | ClemBot.Bot/bot/api/tag_route.py | makayla-moster/ClemBot | 26503d25f1fbe2abcf99dbf0f68b17e88ad11a7c | [
"MIT"
] | 121 | 2020-04-25T06:20:28.000Z | 2021-06-07T03:08:46.000Z | ClemBot.Bot/bot/api/tag_route.py | makayla-moster/ClemBot | 26503d25f1fbe2abcf99dbf0f68b17e88ad11a7c | [
"MIT"
] | 180 | 2020-04-25T04:49:51.000Z | 2021-06-22T15:21:30.000Z | ClemBot.Bot/bot/api/tag_route.py | makayla-moster/ClemBot | 26503d25f1fbe2abcf99dbf0f68b17e88ad11a7c | [
"MIT"
] | 72 | 2020-04-25T03:28:49.000Z | 2021-06-20T20:17:00.000Z | from bot.api.api_client import ApiClient
from bot.api.base_route import BaseRoute
import typing as t
from bot.models import Tag
| 33.294118 | 114 | 0.564193 |
fe40ab7f78d9978c2d19631879cf3439c2112560 | 2,967 | py | Python | formfactor_AL.py | kirichoi/PolymerConnectome | 064df932cfca57a97e62dfa9a32d1fa976500906 | [
"MIT"
] | null | null | null | formfactor_AL.py | kirichoi/PolymerConnectome | 064df932cfca57a97e62dfa9a32d1fa976500906 | [
"MIT"
] | null | null | null | formfactor_AL.py | kirichoi/PolymerConnectome | 064df932cfca57a97e62dfa9a32d1fa976500906 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 7 10:59:00 2020
@author: user
"""
import numpy as np
import multiprocessing as mp
import matplotlib.pyplot as plt
import time
import itertools
import ctypes
if __name__ == '__main__':
AL_dist_flat = np.load(r'./AL_dist_flat.npy')
n = np.shape(AL_dist_flat... | 33.337079 | 110 | 0.625211 |
fe427f872414bfa986cd9b2c48b6113399437840 | 1,039 | py | Python | utils/tests.py | nanodude/cairocffi | 9d6a9a420a91da80f7901ace9945fd864f5d04dc | [
"BSD-3-Clause"
] | null | null | null | utils/tests.py | nanodude/cairocffi | 9d6a9a420a91da80f7901ace9945fd864f5d04dc | [
"BSD-3-Clause"
] | null | null | null | utils/tests.py | nanodude/cairocffi | 9d6a9a420a91da80f7901ace9945fd864f5d04dc | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
import io
import cairo # pycairo
import cairocffi
from pycairo_to_cairocffi import _UNSAFE_pycairo_context_to_cairocffi
from cairocffi_to_pycairo import _UNSAFE_cairocffi_context_to_pycairo
import pango_example
if __name__ == '__main__':
test()
| 34.633333 | 79 | 0.73821 |
fe433c22e1af644dfc7ebbadd44ff0872fa4438b | 487 | py | Python | riddle.py | robertlit/monty-hall-problem | 746cab513dacdc1f47ce7269db35167df3520865 | [
"MIT"
] | null | null | null | riddle.py | robertlit/monty-hall-problem | 746cab513dacdc1f47ce7269db35167df3520865 | [
"MIT"
] | null | null | null | riddle.py | robertlit/monty-hall-problem | 746cab513dacdc1f47ce7269db35167df3520865 | [
"MIT"
] | null | null | null | import random
goat1 = random.randint(1, 3)
goat2 = random.randint(1, 3)
while goat1 == goat2:
goat2 = random.randint(1, 3)
success = 0
tries = 1_000_000
for _ in range(tries):
options = [1, 2, 3]
choice = random.randint(1, 3)
options.remove(choice)
if choice == goat1:
options.remove(goat... | 18.037037 | 43 | 0.61807 |