hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
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
972
max_issues_repo_name
stringlengths
6
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
972
max_forks_repo_name
stringlengths
6
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
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
f58e6c43e9e45e8a653e2d4760122c3d30af0762
8,098
py
Python
shapeTesting/v2.py
Ravenshard/CS412T1C5
ac22d27f7d73f14a1b67e48746cfe3058350e4ca
[ "MIT" ]
null
null
null
shapeTesting/v2.py
Ravenshard/CS412T1C5
ac22d27f7d73f14a1b67e48746cfe3058350e4ca
[ "MIT" ]
null
null
null
shapeTesting/v2.py
Ravenshard/CS412T1C5
ac22d27f7d73f14a1b67e48746cfe3058350e4ca
[ "MIT" ]
null
null
null
#!/usr/bin/env python import signal import rospy import smach import smach_ros import cv2 import cv_bridge import numpy import time import math from sensor_msgs.msg import Image from enum import Enum bridge = cv_bridge.CvBridge() shutdown_requested = False c1Triange = cv2.imread('./shapeTesting/c1Triangle.png', 0) c2...
33.882845
80
0.637194
7d7b23ff25464d0ffd9bf7372feddce37053fe56
4,413
py
Python
ocs_ci/framework/main.py
Gangadhar-ibm/ocs-ci
cb8ff7abcdb0d29617300c914892aff2289a98e7
[ "MIT" ]
null
null
null
ocs_ci/framework/main.py
Gangadhar-ibm/ocs-ci
cb8ff7abcdb0d29617300c914892aff2289a98e7
[ "MIT" ]
null
null
null
ocs_ci/framework/main.py
Gangadhar-ibm/ocs-ci
cb8ff7abcdb0d29617300c914892aff2289a98e7
[ "MIT" ]
null
null
null
import argparse import os import sys import time import pytest import yaml from ocs_ci import framework from getpass import getuser from ocs_ci.utility import utils from ocs_ci.ocs.constants import OCP_VERSION_CONF_DIR, OCS_VERSION_CONF_DIR from ocs_ci.ocs.exceptions import MissingRequiredConfigKeyError def check_c...
34.476563
86
0.670746
213c20294025d1118b5894871d56c75ca2ff422e
66,620
py
Python
pandas/core/resample.py
shalarewicz/pandas
070341cf4958652343f798c74c04a8c15de2fd04
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
1
2021-05-05T08:34:47.000Z
2021-05-05T08:34:47.000Z
pandas/core/resample.py
shalarewicz/pandas
070341cf4958652343f798c74c04a8c15de2fd04
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/core/resample.py
shalarewicz/pandas
070341cf4958652343f798c74c04a8c15de2fd04
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
from __future__ import annotations import copy from datetime import timedelta from textwrap import dedent from typing import ( TYPE_CHECKING, Callable, Hashable, no_type_check, ) import numpy as np from pandas._libs import lib from pandas._libs.tslibs import ( BaseOffset, IncompatibleFrequenc...
32.121504
88
0.5781
98e61b9bdb1046ca889ae3294916c3b73bfe6842
13,091
py
Python
papers/ReTraCk/parser/sparql_executor.py
microsoft/KC
928c74073246ef932f6b80f6fe353117a6cacb55
[ "MIT" ]
29
2021-07-27T05:48:53.000Z
2022-03-30T00:05:41.000Z
papers/ReTraCk/parser/sparql_executor.py
microsoft/KC
928c74073246ef932f6b80f6fe353117a6cacb55
[ "MIT" ]
5
2021-07-29T08:00:26.000Z
2022-03-24T02:35:15.000Z
papers/ReTraCk/parser/sparql_executor.py
microsoft/KC
928c74073246ef932f6b80f6fe353117a6cacb55
[ "MIT" ]
7
2021-07-29T07:53:52.000Z
2022-02-21T08:10:26.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import re import time from SPARQLWrapper import SPARQLWrapper, JSON, SPARQLExceptions sparql = SPARQLWrapper("http://localhost:8890/sparql/") prefix = "http://rdf.freebase.com/ns/" def set_sparql_wrapper(uri): global sparql sparql = S...
35.865753
165
0.614239
30f76087ed10dccfad5a80832cce62f97f3be7aa
2,575
py
Python
src/datafiles/ini.py
N-z0/commonz
275c48ef6aac32f0d809a96e56b0b0c254686747
[ "Unlicense" ]
null
null
null
src/datafiles/ini.py
N-z0/commonz
275c48ef6aac32f0d809a96e56b0b0c254686747
[ "Unlicense" ]
null
null
null
src/datafiles/ini.py
N-z0/commonz
275c48ef6aac32f0d809a96e56b0b0c254686747
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 #coding: utf-8 ### 1st line allows to execute this script by typing only its name in terminal, with no need to precede it with the python command ### 2nd line declaring source code charset should be not necessary but for exemple pydoc request it __doc__ = "INI File Reading and Writing."#inform...
33.881579
130
0.688544
0b7ebb92c0b83015a1347c55f719d924aeb3dcc3
9,448
py
Python
src/pybullet_planning/interfaces/debug_utils/debug_utils.py
logan-dunbar/pybullet_planning
3b25fc7a0f350f4b46048be5c42f9cbf3ab2d6fb
[ "MIT" ]
null
null
null
src/pybullet_planning/interfaces/debug_utils/debug_utils.py
logan-dunbar/pybullet_planning
3b25fc7a0f350f4b46048be5c42f9cbf3ab2d6fb
[ "MIT" ]
null
null
null
src/pybullet_planning/interfaces/debug_utils/debug_utils.py
logan-dunbar/pybullet_planning
3b25fc7a0f350f4b46048be5c42f9cbf3ab2d6fb
[ "MIT" ]
null
null
null
import math import numpy as np import pybullet as p from itertools import product, combinations from pybullet_planning.utils import get_client, BASE_LINK, GREEN, RED, BLUE, BLACK, WHITE, NULL_ID, YELLOW from pybullet_planning.interfaces.env_manager.pose_transformation import unit_pose, tform_point, unit_from_theta, g...
36.762646
126
0.647121
735c4284a7be16da9d7c4fb2b0ad062c2cd0131a
11,862
py
Python
selfdrive/monitoring/driver_monitor.py
oht-volt/cj_volt
a11d12fbe909b93aa610df9a1c3c02601b726649
[ "MIT" ]
2
2020-10-22T09:20:14.000Z
2020-10-22T09:20:20.000Z
selfdrive/monitoring/driver_monitor.py
oht-volt/cj_volt
a11d12fbe909b93aa610df9a1c3c02601b726649
[ "MIT" ]
null
null
null
selfdrive/monitoring/driver_monitor.py
oht-volt/cj_volt
a11d12fbe909b93aa610df9a1c3c02601b726649
[ "MIT" ]
null
null
null
from math import atan2, sqrt from cereal import car from common.numpy_fast import interp from common.realtime import DT_DMON from common.filter_simple import FirstOrderFilter from common.stat_live import RunningStatFilter EventName = car.CarEvent.EventName # **********************************************************...
44.593985
186
0.733687
279cc02ac3251372e9ec1b4b6a2a5891995f7489
3,816
py
Python
jupyterlab_git/tests/test_diff.py
btel/jupyterlab-git
385916c1d0b1778a18eb7ab683d2c5d4f481a993
[ "BSD-3-Clause" ]
null
null
null
jupyterlab_git/tests/test_diff.py
btel/jupyterlab-git
385916c1d0b1778a18eb7ab683d2c5d4f481a993
[ "BSD-3-Clause" ]
null
null
null
jupyterlab_git/tests/test_diff.py
btel/jupyterlab-git
385916c1d0b1778a18eb7ab683d2c5d4f481a993
[ "BSD-3-Clause" ]
null
null
null
import os from subprocess import CalledProcessError from unittest.mock import Mock, call, patch import pytest import tornado from jupyterlab_git.git import Git from .testutils import FakeContentManager @pytest.mark.asyncio async def test_changed_files_invalid_input(): with pytest.raises(tornado.web.HTTPError):...
30.528
84
0.600105
3a93e7b1d0ca1a2d4fbee516c03d94d37d2d38d2
1,563
py
Python
2020/Day12/Day12_Prob2_Moving_Waypoint.py
guilhermebaos/Advent-of-Code-Solutions
232facf72a21284478134b2c56357352b4aaaf74
[ "MIT" ]
null
null
null
2020/Day12/Day12_Prob2_Moving_Waypoint.py
guilhermebaos/Advent-of-Code-Solutions
232facf72a21284478134b2c56357352b4aaaf74
[ "MIT" ]
null
null
null
2020/Day12/Day12_Prob2_Moving_Waypoint.py
guilhermebaos/Advent-of-Code-Solutions
232facf72a21284478134b2c56357352b4aaaf74
[ "MIT" ]
null
null
null
# Puzzle Input with open('Day12_Input.txt') as puzzle_input: movement_list = puzzle_input.read().split('\n') # Calculate the path boat = [0, 0] waypoint = [1, 10] for movement in movement_list: action = movement[0] # Get the action value = int(movement[1:]) # Get it's value if action =...
50.419355
119
0.56366
62597411098547078368eaadedbf797b14aec6ce
1,072
py
Python
backend/backend/wsgi.py
kevromster/GoEat
c68f405f870d3eeeab8bcadbf6906ad2a09a2ad0
[ "Apache-2.0" ]
null
null
null
backend/backend/wsgi.py
kevromster/GoEat
c68f405f870d3eeeab8bcadbf6906ad2a09a2ad0
[ "Apache-2.0" ]
4
2020-05-11T12:01:51.000Z
2020-09-14T09:11:22.000Z
backend/backend/wsgi.py
kevromster/GoEat
c68f405f870d3eeeab8bcadbf6906ad2a09a2ad0
[ "Apache-2.0" ]
null
null
null
# Copyright © 2020 Roman Kuskov. 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 ...
34.580645
80
0.712687
bd39087cac73c212e1e65372cdd81f2454ab7b54
3,168
py
Python
Whatsapp_Automation/Whatsapp_Automation/autowat.py
Harshavardhan808/whatsApp-automation
2b068db8bc9686339b7837096dd70a24440b90a3
[ "MIT" ]
null
null
null
Whatsapp_Automation/Whatsapp_Automation/autowat.py
Harshavardhan808/whatsApp-automation
2b068db8bc9686339b7837096dd70a24440b90a3
[ "MIT" ]
null
null
null
Whatsapp_Automation/Whatsapp_Automation/autowat.py
Harshavardhan808/whatsApp-automation
2b068db8bc9686339b7837096dd70a24440b90a3
[ "MIT" ]
null
null
null
import pandas as pd import time from selenium import webdriver from progress.bar import Bar from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys def u...
41.142857
138
0.563763
b93d4308f5ed6f5a477a820b217910c76fa0da45
10,856
py
Python
auto/python/sfm_ros.py
ACLeighner/AirSim
a4852eb01772c6bef45e481754e8b84fd32caef6
[ "MIT" ]
null
null
null
auto/python/sfm_ros.py
ACLeighner/AirSim
a4852eb01772c6bef45e481754e8b84fd32caef6
[ "MIT" ]
null
null
null
auto/python/sfm_ros.py
ACLeighner/AirSim
a4852eb01772c6bef45e481754e8b84fd32caef6
[ "MIT" ]
null
null
null
import rospy import tf2_ros import tf2_geometry_msgs import cv2 import numpy as np import math import struct from cv_bridge import CvBridge from sensor_msgs.msg import Image, CameraInfo, PointCloud2, PointField from sensor_msgs import point_cloud2 from tf2_msgs.msg import TFMessage from geometry_msgs.msg import PoseSt...
35.593443
166
0.680453
31387a1b1f396304dc51e3af5b59b30c4e8ef8e4
11,109
py
Python
tests/services/test_connection.py
PixelogicDev/py42
ccb100b03025fff1a060a39635bee3e76a251a85
[ "MIT" ]
null
null
null
tests/services/test_connection.py
PixelogicDev/py42
ccb100b03025fff1a060a39635bee3e76a251a85
[ "MIT" ]
null
null
null
tests/services/test_connection.py
PixelogicDev/py42
ccb100b03025fff1a060a39635bee3e76a251a85
[ "MIT" ]
null
null
null
import json import pytest from requests import Response from py42.exceptions import Py42Error from py42.exceptions import Py42FeatureUnavailableError from py42.exceptions import Py42InternalServerError from py42.exceptions import Py42UnauthorizedError from py42.response import Py42Response from py42.services._auth im...
42.400763
104
0.763975
e73e7503420256e0f5a208b51ecc5247858bb738
1,769
py
Python
c2cgeoportal/lib/bashcolor.py
craxxkid/c2cgeoportal
60ca7d5d014d69b0a938f858271c911a30da77c3
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
c2cgeoportal/lib/bashcolor.py
craxxkid/c2cgeoportal
60ca7d5d014d69b0a938f858271c911a30da77c3
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
c2cgeoportal/lib/bashcolor.py
craxxkid/c2cgeoportal
60ca7d5d014d69b0a938f858271c911a30da77c3
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2014-2016, Camptocamp SA # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this #...
41.139535
81
0.765969
e324fccf2a15d3b0212c49339e2c57973a75f131
6,849
py
Python
donkeycar/parts/simulation.py
JediLuke/rufus
177c6012ecdaeaab42f45f76e478b14b5610c6b3
[ "MIT" ]
1
2019-03-01T03:29:01.000Z
2019-03-01T03:29:01.000Z
donkeycar/parts/simulation.py
JediLuke/rufus
177c6012ecdaeaab42f45f76e478b14b5610c6b3
[ "MIT" ]
null
null
null
donkeycar/parts/simulation.py
JediLuke/rufus
177c6012ecdaeaab42f45f76e478b14b5610c6b3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jun 25 17:30:28 2017 @author: wroscoe """ import base64 import random import numpy as np import socketio import eventlet import eventlet.wsgi from PIL import Image from flask import Flask from io import BytesIO import time import os """ Method...
29.908297
117
0.592933
25174869c54453cae13c94d005d2e09c0585a098
5,420
py
Python
mime/envs/table_envs/tower_scene.py
rjgpinel/mime-release
26a850c4ba5b702b86d068995614163338fb01df
[ "MIT" ]
null
null
null
mime/envs/table_envs/tower_scene.py
rjgpinel/mime-release
26a850c4ba5b702b86d068995614163338fb01df
[ "MIT" ]
null
null
null
mime/envs/table_envs/tower_scene.py
rjgpinel/mime-release
26a850c4ba5b702b86d068995614163338fb01df
[ "MIT" ]
null
null
null
import numpy as np from .table_scene import TableScene from .table_modder import TableModder from ..script import Script from .utils import sample_without_overlap class TowerScene(TableScene): def __init__(self, **kwargs): super(TowerScene, self).__init__(**kwargs) self._modder = TableModder(self...
31.511628
87
0.567528
3ad8f18c322f87dbecaf9bac1c2ddc988aa2e28b
3,333
py
Python
launch/nav2_7_recovery_launch.py
skylerpan/nav2_step
54f25ff640549234ab5eb33736c6267cfdddf3b4
[ "Apache-2.0" ]
1
2021-07-03T17:47:04.000Z
2021-07-03T17:47:04.000Z
launch/nav2_7_recovery_launch.py
skylerpan/nav2_step
54f25ff640549234ab5eb33736c6267cfdddf3b4
[ "Apache-2.0" ]
null
null
null
launch/nav2_7_recovery_launch.py
skylerpan/nav2_step
54f25ff640549234ab5eb33736c6267cfdddf3b4
[ "Apache-2.0" ]
1
2020-04-15T10:13:53.000Z
2020-04-15T10:13:53.000Z
# Copyright (c) 2018 Intel 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 agreed to in...
37.449438
96
0.737774
2e205034cfb3944e11f6c9949e2f5af3b156d08c
4,189
py
Python
src/model_processors/track_utils/matching.py
patrick-ubc/Huawei_HiFly_Drone
5dae1b56f49c2b86c3b852bbc5e3a63e84ccd490
[ "Apache-2.0" ]
1
2021-09-21T23:23:59.000Z
2021-09-21T23:23:59.000Z
src/model_processors/track_utils/matching.py
patrick-ubc/Huawei_HiFly_Drone
5dae1b56f49c2b86c3b852bbc5e3a63e84ccd490
[ "Apache-2.0" ]
8
2021-07-05T21:41:53.000Z
2022-02-15T19:46:13.000Z
src/model_processors/track_utils/matching.py
patrick-ubc/Huawei_HiFly_Drone
5dae1b56f49c2b86c3b852bbc5e3a63e84ccd490
[ "Apache-2.0" ]
4
2021-06-11T22:47:04.000Z
2021-07-29T19:57:13.000Z
""" Copyright 2021 Huawei Technologies Co., Ltd. Copyright (c) 2020 YifuZhang 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 appl...
33.512
114
0.686321
6b6c96f66ce50f7d612f68756b74f8b72fce690d
88
py
Python
libcity/config/__init__.py
moghadas76/test_bigcity
607b9602c5b1113b23e1830455e174b0901d7558
[ "Apache-2.0" ]
221
2021-09-06T03:33:31.000Z
2022-03-28T05:36:49.000Z
libcity/config/__init__.py
moghadas76/test_bigcity
607b9602c5b1113b23e1830455e174b0901d7558
[ "Apache-2.0" ]
43
2021-09-19T16:12:28.000Z
2022-03-31T16:29:03.000Z
libcity/config/__init__.py
moghadas76/test_bigcity
607b9602c5b1113b23e1830455e174b0901d7558
[ "Apache-2.0" ]
64
2021-09-06T07:56:10.000Z
2022-03-25T08:48:35.000Z
from libcity.config.config_parser import ConfigParser __all__ = [ 'ConfigParser' ]
14.666667
53
0.761364
4ae044ebe2081757dbb40964900718236ad21463
20,771
py
Python
python_modules/dagster/dagster/core/definitions/composition.py
bitdotioinc/dagster
4fe395a37b206b1a48b956fa5dd72bf698104cca
[ "Apache-2.0" ]
1
2021-04-27T19:49:59.000Z
2021-04-27T19:49:59.000Z
python_modules/dagster/dagster/core/definitions/composition.py
bitdotioinc/dagster
4fe395a37b206b1a48b956fa5dd72bf698104cca
[ "Apache-2.0" ]
7
2022-03-16T06:55:04.000Z
2022-03-18T07:03:25.000Z
python_modules/dagster/dagster/core/definitions/composition.py
bitdotioinc/dagster
4fe395a37b206b1a48b956fa5dd72bf698104cca
[ "Apache-2.0" ]
null
null
null
import warnings from collections import namedtuple from dagster import check from dagster.core.errors import DagsterInvalidDefinitionError, DagsterInvariantViolationError from dagster.utils import frozentags from .dependency import DependencyDefinition, MultiDependencyDefinition, SolidInvocation from .hook import Hoo...
40.176015
103
0.604545
dfc920c76909526b364aa90d857f462d594a3a55
826
py
Python
HungrYTWeb/urls.py
andriov/footStore-django-webServer
5741cc78b857e2f73ea12b6f387c22c4f2788d30
[ "MIT" ]
null
null
null
HungrYTWeb/urls.py
andriov/footStore-django-webServer
5741cc78b857e2f73ea12b6f387c22c4f2788d30
[ "MIT" ]
10
2020-06-05T17:43:35.000Z
2022-02-11T03:38:45.000Z
HungrYTWeb/urls.py
andriov/footStore-django-webServer
5741cc78b857e2f73ea12b6f387c22c4f2788d30
[ "MIT" ]
null
null
null
"""HungrYTWeb URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
35.913043
79
0.700969
92c1d5b85ead74032daa909b1c9cef10ee31f926
1,761
py
Python
src/calculate.py
Bonifase/b-covid-19-estimator-py
bc424cbed7db6641bbd6cba62d963dbcfa9d3702
[ "MIT" ]
null
null
null
src/calculate.py
Bonifase/b-covid-19-estimator-py
bc424cbed7db6641bbd6cba62d963dbcfa9d3702
[ "MIT" ]
null
null
null
src/calculate.py
Bonifase/b-covid-19-estimator-py
bc424cbed7db6641bbd6cba62d963dbcfa9d3702
[ "MIT" ]
null
null
null
def result_calculator(data, multiplier): impact = {} # number of infected people in days from now reported_cases = data.get('reportedCases') impact['currentlyInfected'] = reported_cases * multiplier total_number_of_days = data['timeToElapse'] periods_multplier = {'weeks': 7, 'months': 30} ...
38.282609
79
0.694492
70a9acedb8f515742fc11ba5c300951bcca6b348
4,106
py
Python
jopy/styles/plots.py
jowr/jopy
5f7e6581e51c385d16154d95b5473e9f6b6e76e7
[ "MIT" ]
2
2017-11-11T17:59:42.000Z
2020-04-04T17:53:59.000Z
jopy/styles/plots.py
jowr/jopy
5f7e6581e51c385d16154d95b5473e9f6b6e76e7
[ "MIT" ]
null
null
null
jopy/styles/plots.py
jowr/jopy
5f7e6581e51c385d16154d95b5473e9f6b6e76e7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function, division import matplotlib import matplotlib.pyplot as plt import copy class Figure(matplotlib.figure.Figure): def _get_axis(self,**kwargs): ax = kwargs.pop('ax', self._get_axes()[0]) return ax def _get_axes(self,**k...
36.660714
108
0.549196
3d5592e4126384f71931680421321c58332bc023
1,751
py
Python
gpytorch/mlls/exact_marginal_log_likelihood.py
gully/gpytorch
10695c05eec760b0c3c2893d809f1b0bd72c48d2
[ "MIT" ]
null
null
null
gpytorch/mlls/exact_marginal_log_likelihood.py
gully/gpytorch
10695c05eec760b0c3c2893d809f1b0bd72c48d2
[ "MIT" ]
null
null
null
gpytorch/mlls/exact_marginal_log_likelihood.py
gully/gpytorch
10695c05eec760b0c3c2893d809f1b0bd72c48d2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from .marginal_log_likelihood import MarginalLogLikelihood from ..likelihoods import _GaussianLikelihoodBase from ..distributions import MultivariateNormal class ExactMarginalLogLikelihood(MarginalLogLikelihood): def __init__(self, likelihood, model): """ A special MLL desi...
38.065217
106
0.679612
759a12d3167969d71a6661e6b61c964b4d71d806
9,142
py
Python
jobs/payment-jobs/tasks/cfs_create_account_task.py
thorwolpert/sbc-pay
ea355dfb13e783ed1e86ed92efaa45293463c348
[ "Apache-2.0" ]
null
null
null
jobs/payment-jobs/tasks/cfs_create_account_task.py
thorwolpert/sbc-pay
ea355dfb13e783ed1e86ed92efaa45293463c348
[ "Apache-2.0" ]
null
null
null
jobs/payment-jobs/tasks/cfs_create_account_task.py
thorwolpert/sbc-pay
ea355dfb13e783ed1e86ed92efaa45293463c348
[ "Apache-2.0" ]
null
null
null
# Copyright © 2019 Province of British Columbia # # 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 agr...
55.406061
118
0.645701
429c84dbf78c6998b1c40fc91331df8c2db5560a
4,012
py
Python
main.py
mpkg-project/mpkg-autobuild
bff4682b06399a72fbaca2ae0927481a4480cc15
[ "Apache-2.0" ]
null
null
null
main.py
mpkg-project/mpkg-autobuild
bff4682b06399a72fbaca2ae0927481a4480cc15
[ "Apache-2.0" ]
null
null
null
main.py
mpkg-project/mpkg-autobuild
bff4682b06399a72fbaca2ae0927481a4480cc15
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 import json import os import re from multiprocessing.dummy import Pool from sys import argv from mpkg.config import HOME, GetConfig, SetConfig from mpkg.load import HasConflict, Load, Prepare, Sorted from mpkg.utils import GetPage, PreInstall jobs = 10 s = GetPage( 'https:...
29.284672
93
0.554337
c8313952d9a2dba609144ad44bd470e1b78acd1f
1,774
py
Python
testproj/todo/serializer.py
NguyenDuyToan/drf-yasg
20786e53c3949d14c00d70d112f4452ec850ba5f
[ "BSD-3-Clause" ]
1
2020-11-23T02:11:00.000Z
2020-11-23T02:11:00.000Z
testproj/todo/serializer.py
NguyenDuyToan/drf-yasg
20786e53c3949d14c00d70d112f4452ec850ba5f
[ "BSD-3-Clause" ]
null
null
null
testproj/todo/serializer.py
NguyenDuyToan/drf-yasg
20786e53c3949d14c00d70d112f4452ec850ba5f
[ "BSD-3-Clause" ]
1
2020-11-23T02:11:01.000Z
2020-11-23T02:11:01.000Z
from collections import OrderedDict from django.utils import timezone from rest_framework import serializers from rest_framework_recursive.fields import RecursiveField from .models import Todo, TodoAnother, TodoTree, TodoYetAnother class TodoSerializer(serializers.ModelSerializer): class Meta: model = T...
30.067797
120
0.61894
be3d1eeefcccc6d39792dce1e1c806985343a140
467
py
Python
raspeedi/migrations/0002_raspeedi_corvets.py
Nels885/csd_dashboard
aa5a3b970c50a2a93af722f962bd87c3728f233c
[ "MIT" ]
null
null
null
raspeedi/migrations/0002_raspeedi_corvets.py
Nels885/csd_dashboard
aa5a3b970c50a2a93af722f962bd87c3728f233c
[ "MIT" ]
null
null
null
raspeedi/migrations/0002_raspeedi_corvets.py
Nels885/csd_dashboard
aa5a3b970c50a2a93af722f962bd87c3728f233c
[ "MIT" ]
null
null
null
# Generated by Django 2.2.2 on 2019-06-11 15:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('squalaetp', '0001_initial'), ('raspeedi', '0001_initial'), ] operations = [ migrations.AddField( model_name='raspeedi', ...
23.35
101
0.605996
bdea4baa154473ede6fbb06a09711b389bd16abf
8,652
py
Python
perfrunner/workloads/revAB/fittingCode/fitModel_noPickling.py
tonyduydao/perfrunner
5e0dab1af6083dc6408efcaa9f8d61262a43e6f2
[ "Apache-2.0" ]
1
2021-03-03T23:04:26.000Z
2021-03-03T23:04:26.000Z
perfrunner/workloads/revAB/fittingCode/fitModel_noPickling.py
tonyduydao/perfrunner
5e0dab1af6083dc6408efcaa9f8d61262a43e6f2
[ "Apache-2.0" ]
null
null
null
perfrunner/workloads/revAB/fittingCode/fitModel_noPickling.py
tonyduydao/perfrunner
5e0dab1af6083dc6408efcaa9f8d61262a43e6f2
[ "Apache-2.0" ]
null
null
null
""" Script for "fitting" various graph models to approximate OSN graphs The Barabasi-Albert model does not have varied parameters. n = # of nodes, and m is set as |E|/n. References ----------- [1] Sala A., Cao L., Wilson, C., Zablit, R., Zheng, H., Zhao, B. Measurement-calibrated graph models for social network exper...
33.66537
209
0.587147
81c45c1238963f27af978a713a93fd4bdb07d892
2,006
py
Python
tools/diff.py
remynaps/amanda
1fecae03d65a89647c6ce0c6333d09a4d1632078
[ "Unlicense" ]
5
2017-10-10T10:25:20.000Z
2022-02-04T14:37:14.000Z
tools/diff.py
remynaps/amanda
1fecae03d65a89647c6ce0c6333d09a4d1632078
[ "Unlicense" ]
null
null
null
tools/diff.py
remynaps/amanda
1fecae03d65a89647c6ce0c6333d09a4d1632078
[ "Unlicense" ]
4
2017-10-10T10:25:40.000Z
2021-01-24T10:23:47.000Z
#!/usr/bin/env python3 # Place this file in the folder that holds this repository. # Use `git clone https://github.com/Rubykuby/amanda-resources` to clone all # other Amanda projects. # Edit the res_dir and caps variables accordingly. import os ama_dir = os.path.join("amanda", "src") res_dir = os.path.join("amanda-r...
32.885246
76
0.540877
a535ef20fc59f8219d277879176e8a17842cf2b0
361
py
Python
prepnet/executor/executor_base.py
elda27/prepnet
0f05018969496321aaa770b7e22bda858dab0ad6
[ "MIT" ]
null
null
null
prepnet/executor/executor_base.py
elda27/prepnet
0f05018969496321aaa770b7e22bda858dab0ad6
[ "MIT" ]
6
2020-08-03T15:44:18.000Z
2020-08-15T17:39:45.000Z
prepnet/executor/executor_base.py
elda27/prepnet
0f05018969496321aaa770b7e22bda858dab0ad6
[ "MIT" ]
null
null
null
from abc import ABCMeta, abstractmethod from typing import Union, List import pandas as pd class ExecutorBase(metaclass=ABCMeta): @abstractmethod def encode(self, df: Union[pd.Series, pd.DataFrame]): raise NotImplementedError() @abstractmethod def decode(self, df: Union[pd.Series, pd.DataFram...
25.785714
57
0.725762
b4d4c9a8062b87ea62a483ec9e5406dc63e3e3bc
13,491
py
Python
NewsSentiment/models/singletarget/lcfst.py
jamie-iai/NewsMTSC
912d2a84b2c81962c06729a31d974bdf95d33dc9
[ "MIT" ]
null
null
null
NewsSentiment/models/singletarget/lcfst.py
jamie-iai/NewsMTSC
912d2a84b2c81962c06729a31d974bdf95d33dc9
[ "MIT" ]
null
null
null
NewsSentiment/models/singletarget/lcfst.py
jamie-iai/NewsMTSC
912d2a84b2c81962c06729a31d974bdf95d33dc9
[ "MIT" ]
null
null
null
# adapted from https://github.com/yangheng95/LCF-ABSA and # https://github.com/StevePhan101/LCFS-BERT/ from argparse import Namespace from typing import Dict import numpy as np import torch import torch.nn as nn # from transformers.modeling_bert import BertPooler, BertSelfAttention from NewsSentiment.consts import *...
43.801948
117
0.622193
944d065a74361bbcc40941f34a2a8a5e7c779a6c
20,094
py
Python
tools/maya/quat.py
highfestiva/life
b05b592502d72980ab55e13e84330b74a966f377
[ "BSD-3-Clause" ]
9
2019-09-03T18:33:31.000Z
2022-02-04T04:00:02.000Z
tools/maya/quat.py
highfestiva/life
b05b592502d72980ab55e13e84330b74a966f377
[ "BSD-3-Clause" ]
null
null
null
tools/maya/quat.py
highfestiva/life
b05b592502d72980ab55e13e84330b74a966f377
[ "BSD-3-Clause" ]
null
null
null
# ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (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.mozilla.org/MPL/ # # Softwa...
30.399395
100
0.476461
c966de4edb25ae94084128faaf54026c236217ed
3,295
py
Python
tools/ivwpy/colorprint.py
ImagiaViz/inviwo
a00bb6b0551bc1cf26dc0366c827c1a557a9603d
[ "BSD-2-Clause" ]
1
2021-06-21T11:56:55.000Z
2021-06-21T11:56:55.000Z
tools/ivwpy/colorprint.py
ImagiaViz/inviwo
a00bb6b0551bc1cf26dc0366c827c1a557a9603d
[ "BSD-2-Clause" ]
null
null
null
tools/ivwpy/colorprint.py
ImagiaViz/inviwo
a00bb6b0551bc1cf26dc0366c827c1a557a9603d
[ "BSD-2-Clause" ]
null
null
null
#********************************************************************************* # # Inviwo - Interactive Visualization Workshop # # Copyright (c) 2013-2020 Inviwo Foundation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the f...
33.969072
95
0.704704
e11e9243855df943aa148fa8df8394e45b59c3f0
2,514
py
Python
src/quanguru/QuantumToolbox/IPR.py
Qfabiolous/QuanGuru
285ca44ae857cc61337f73ea2eb600f485a09e32
[ "BSD-3-Clause" ]
null
null
null
src/quanguru/QuantumToolbox/IPR.py
Qfabiolous/QuanGuru
285ca44ae857cc61337f73ea2eb600f485a09e32
[ "BSD-3-Clause" ]
null
null
null
src/quanguru/QuantumToolbox/IPR.py
Qfabiolous/QuanGuru
285ca44ae857cc61337f73ea2eb600f485a09e32
[ "BSD-3-Clause" ]
null
null
null
r""" Contains functions to calculate delocalisation measure (Inverse participation ratio, shortly IPR) in various cases. .. currentmodule:: quanguru.QuantumToolbox.IPR Functions --------- .. autosummary:: iprKet iprKetNB """ import numpy as np # type: ignore from scipy.sparse i...
26.1875
120
0.59467
fa3f0aa08345d60440fe5e381bc0ed24f1b51860
917
py
Python
manage.py
ninetor/gateis_tapin
09c6a46c036166fd9e865dad324361ef8696700f
[ "MIT" ]
1
2018-12-03T12:08:31.000Z
2018-12-03T12:08:31.000Z
manage.py
myneworder/alldex_tapin
cbce81e72b6c917d397ea494ffdf2e299d45a2f3
[ "MIT" ]
null
null
null
manage.py
myneworder/alldex_tapin
cbce81e72b6c917d397ea494ffdf2e299d45a2f3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys from flask import Flask from flask_script import Manager, Command from app import app, db from app import config import threading import os from os import path manager = Manager(app) @manager.command def install(): database_dir = path.dirname(config.database) if len(databas...
17.634615
63
0.692475
5a8e47fefbc5208cc0fb78d76048a729488fea63
450
py
Python
users_app/migrations/0002_auto_20200607_1319.py
habibaudu/Elite
3f48a7cd2f9058c20aea6d3a4d626f7ccac84072
[ "MIT" ]
null
null
null
users_app/migrations/0002_auto_20200607_1319.py
habibaudu/Elite
3f48a7cd2f9058c20aea6d3a4d626f7ccac84072
[ "MIT" ]
1
2021-03-19T05:13:22.000Z
2021-03-19T05:13:22.000Z
users_app/migrations/0002_auto_20200607_1319.py
habibaudu/Elite
3f48a7cd2f9058c20aea6d3a4d626f7ccac84072
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2020-06-07 13:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users_app', '0001_initial'), ] operations = [ migrations.AlterField( model_name='invent', name='state', ...
23.684211
124
0.593333
5c07e5a13d9a01d41be1c48d2396baca2a71e68b
15,514
py
Python
superset/db_engine_specs/hive.py
chqbook/incubator-superset
de6d96343252e56589856d12e22a08be203b856a
[ "Apache-2.0" ]
1
2019-09-10T02:48:59.000Z
2019-09-10T02:48:59.000Z
superset/db_engine_specs/hive.py
chqbook/incubator-superset
de6d96343252e56589856d12e22a08be203b856a
[ "Apache-2.0" ]
null
null
null
superset/db_engine_specs/hive.py
chqbook/incubator-superset
de6d96343252e56589856d12e22a08be203b856a
[ "Apache-2.0" ]
null
null
null
# 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...
37.026253
87
0.596493
00603d45eb69b3cacea39079e99016a482d0bed1
14,773
py
Python
utils/tester.py
HOUYONGKUO/D3Feat
ee0e95fb57e3621d7cbee5a6759eac30a8cd7e14
[ "MIT" ]
214
2020-03-09T02:28:26.000Z
2022-03-18T11:15:14.000Z
utils/tester.py
aosheng1996/D3Feat
d005f3811c12764c16d4f5e9a01c6720e7e72392
[ "MIT" ]
49
2020-03-18T15:38:36.000Z
2022-03-29T12:46:28.000Z
utils/tester.py
aosheng1996/D3Feat
d005f3811c12764c16d4f5e9a01c6720e7e72392
[ "MIT" ]
32
2020-03-09T03:12:25.000Z
2022-03-06T08:08:54.000Z
# # # 0=================================0 # | Kernel Point Convolutions | # 0=================================0 # # # ---------------------------------------------------------------------------------------------------------------------- # # Class handling the test of any model # # ------------...
40.922438
121
0.559331
83cfe495580a68abe4e2807356d28aec20e1f684
6,674
py
Python
bindings/python/ensmallen_graph/datasets/string/sulfolobusislandicus.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/sulfolobusislandicus.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/sulfolobusislandicus.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Sulfolobus islandicus. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 2021-...
35.312169
223
0.703177
74dfdca53b9ea5c835da3d9e29048aebf4cc80d7
4,994
py
Python
src/sim/System.py
vovojh/gem5
1ee55788fde4c01ef56c47c4cb2a5b0aa2283d4c
[ "BSD-3-Clause" ]
3
2017-11-19T06:49:54.000Z
2018-12-26T18:08:11.000Z
src/sim/System.py
vovojh/gem5
1ee55788fde4c01ef56c47c4cb2a5b0aa2283d4c
[ "BSD-3-Clause" ]
null
null
null
src/sim/System.py
vovojh/gem5
1ee55788fde4c01ef56c47c4cb2a5b0aa2283d4c
[ "BSD-3-Clause" ]
6
2016-07-31T18:48:18.000Z
2022-03-06T22:41:28.000Z
# Copyright (c) 2005-2007 The Regents of The University of Michigan # Copyright (c) 2011 Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions o...
46.240741
80
0.718863
aa27bd1a49dbe32ef634d16bd21135de6298cce0
500
py
Python
python/source/iitm/computation_thinking/sortListInserted.py
dineshkumarsarangapani/leetcode-solutions
1559e4ed71b7cbb081071434a029bbf1794e022e
[ "Apache-2.0" ]
1
2020-10-18T09:28:17.000Z
2020-10-18T09:28:17.000Z
python/source/iitm/computation_thinking/sortListInserted.py
dineshkumarsarangapani/leetcode-solutions
1559e4ed71b7cbb081071434a029bbf1794e022e
[ "Apache-2.0" ]
null
null
null
python/source/iitm/computation_thinking/sortListInserted.py
dineshkumarsarangapani/leetcode-solutions
1559e4ed71b7cbb081071434a029bbf1794e022e
[ "Apache-2.0" ]
null
null
null
def insertList(l, x): newList = [] inserted = False for z in l: if not inserted and x < z: newList.append(x) inserted = True newList.append(z) if not inserted: newList.append(x) return newList if __name__ == '__main__': l = [5,4,3,2,1] l = in...
19.230769
34
0.518
5840fe524a17f83008ac9d48d72467167c769754
18,278
py
Python
PRESUBMIT.py
natinusala/skia
0b75be78f543651c26e49c6c15030c107a16e299
[ "BSD-3-Clause" ]
54
2016-04-05T17:45:19.000Z
2022-01-31T06:27:33.000Z
PRESUBMIT.py
natinusala/skia
0b75be78f543651c26e49c6c15030c107a16e299
[ "BSD-3-Clause" ]
25
2016-03-18T04:01:06.000Z
2020-06-27T15:39:35.000Z
PRESUBMIT.py
natinusala/skia
0b75be78f543651c26e49c6c15030c107a16e299
[ "BSD-3-Clause" ]
50
2016-03-03T20:31:58.000Z
2022-03-31T18:26:13.000Z
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Top-level presubmit script for Skia. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmi...
35.76908
80
0.684211
bdd7a91eb15509cf6d86d31974fec324b8e9f39e
14,609
py
Python
modules/dbnd/src/dbnd/_core/settings/log.py
dmytrostriletskyi/dbnd
d4a5f5167523e80439c9d64182cdc87b40cbc48f
[ "Apache-2.0" ]
224
2020-01-02T10:46:37.000Z
2022-03-02T13:54:08.000Z
modules/dbnd/src/dbnd/_core/settings/log.py
dmytrostriletskyi/dbnd
d4a5f5167523e80439c9d64182cdc87b40cbc48f
[ "Apache-2.0" ]
16
2020-03-11T09:37:58.000Z
2022-01-26T10:22:08.000Z
modules/dbnd/src/dbnd/_core/settings/log.py
dmytrostriletskyi/dbnd
d4a5f5167523e80439c9d64182cdc87b40cbc48f
[ "Apache-2.0" ]
24
2020-03-24T13:53:50.000Z
2022-03-22T11:55:18.000Z
from __future__ import print_function import logging import os import sys from logging.config import DictConfigurator from typing import Callable, List, Optional from dbnd._core.configuration.environ_config import in_quiet_mode from dbnd._core.log.config import configure_logging_dictConfig from dbnd._core.log.loggin...
40.134615
120
0.657198
528c354d97b0e4ed499c457b639e14a70eae3de8
645
py
Python
chapter-6-rnns/util.py
danitrod/chollet-deep-learning
c314f6201e99b560b8133d9fb6fd6f47d224b2fb
[ "MIT" ]
null
null
null
chapter-6-rnns/util.py
danitrod/chollet-deep-learning
c314f6201e99b560b8133d9fb6fd6f47d224b2fb
[ "MIT" ]
null
null
null
chapter-6-rnns/util.py
danitrod/chollet-deep-learning
c314f6201e99b560b8133d9fb6fd6f47d224b2fb
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np def plot_history(hist): epochs = np.array(hist.epoch) + 1 plt.plot(epochs, hist.history['loss'], 'yo', label='Training loss') plt.plot(epochs, hist.history['val_loss'], 'r--', label='Validatoin loss') plt.xticks(epochs) plt.xlabel = 'Epoch' p...
28.043478
78
0.629457
5c9369eb4f662091793a4c8a4ad565703f43ebec
13,573
py
Python
pytorch_pretrained_bert/tokenization.py
yuzcccc/pytorch-pretrained-BERT
6b2136a8a9f70f99f719a10e793e6a7f4ef26565
[ "Apache-2.0" ]
5
2019-04-06T13:25:55.000Z
2021-05-04T01:57:50.000Z
pytorch_pretrained_bert/tokenization.py
yuzcccc/pytorch-pretrained-BERT
6b2136a8a9f70f99f719a10e793e6a7f4ef26565
[ "Apache-2.0" ]
null
null
null
pytorch_pretrained_bert/tokenization.py
yuzcccc/pytorch-pretrained-BERT
6b2136a8a9f70f99f719a10e793e6a7f4ef26565
[ "Apache-2.0" ]
6
2020-01-20T10:42:50.000Z
2021-05-17T14:08:38.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HugginFace Inc. team. # # 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/LICENS...
36.983651
117
0.601857
f4b9894e18e934d8f571cc1b23e6a349c4a821b0
1,756
py
Python
mani_skill/utils/misc.py
ic/ManiSkill
1944029ec96a4f927d9db302d2fe62832a25192c
[ "Apache-2.0" ]
71
2021-07-29T02:29:54.000Z
2022-03-24T23:27:58.000Z
mani_skill/utils/misc.py
ic/ManiSkill
1944029ec96a4f927d9db302d2fe62832a25192c
[ "Apache-2.0" ]
25
2021-08-03T16:12:07.000Z
2022-03-30T02:40:41.000Z
mani_skill/utils/misc.py
ic/ManiSkill
1944029ec96a4f927d9db302d2fe62832a25192c
[ "Apache-2.0" ]
7
2021-08-14T09:59:45.000Z
2021-11-14T00:57:24.000Z
import numpy as np def sample_from_tuple_or_scalar(rng, x): if isinstance(x, tuple): return rng.uniform(low=x[0], high=x[1]) else: return x import pathlib, yaml def get_model_ids_from_yaml(yaml_file_path): path = pathlib.Path(yaml_file_path).resolve() with path.open("r") as f: ...
30.275862
96
0.679954
d1fd4cf9d39dee83907a1275853f007fa20d58e5
19,193
py
Python
mmdet/models/backbones/seresnet.py
greathope/NDL-image-detection-3rd-solution
0cb13e38be0a00d7ab4ceed60dac40d60a56a4dd
[ "MIT" ]
2
2020-03-21T06:47:32.000Z
2021-11-12T07:50:21.000Z
mmdet/models/backbones/seresnet.py
greathope/NDL-image-detection-3rd-solution
0cb13e38be0a00d7ab4ceed60dac40d60a56a4dd
[ "MIT" ]
4
2021-03-19T11:32:25.000Z
2022-03-12T00:19:27.000Z
mmdet/models/backbones/seresnet.py
greathope/NDL-image-detection-3rd-solution
0cb13e38be0a00d7ab4ceed60dac40d60a56a4dd
[ "MIT" ]
1
2020-03-25T02:29:36.000Z
2020-03-25T02:29:36.000Z
import torch.nn as nn import torch.utils.checkpoint as cp from mmcv.cnn import constant_init, kaiming_init from mmcv.runner import load_checkpoint from torch.nn.modules.batchnorm import _BatchNorm from mmdet.models.plugins import GeneralizedAttention from mmdet.ops import ContextBlock, DeformConv, ModulatedDeformConv ...
33.554196
79
0.53853
d8295008a0a009f192ca6ed8fc3bead67945fbae
24,869
py
Python
da/transport/sock.py
shalakhansidmul/distalgo
47398f16a0bc287966fe0427574c4b2b4d753b7f
[ "MIT" ]
null
null
null
da/transport/sock.py
shalakhansidmul/distalgo
47398f16a0bc287966fe0427574c4b2b4d753b7f
[ "MIT" ]
null
null
null
da/transport/sock.py
shalakhansidmul/distalgo
47398f16a0bc287966fe0427574c4b2b4d753b7f
[ "MIT" ]
null
null
null
# Copyright (c) 2010-2017 Bo Lin # Copyright (c) 2010-2017 Yanhong Annie Liu # Copyright (c) 2010-2017 Stony Brook University # Copyright (c) 2010-2017 The Research Foundation of SUNY # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files #...
37.340841
83
0.553299
264800384fb4c02c1f961446aafa1d73e875fc57
5,757
py
Python
airflow/kubernetes/pod.py
discordapp/incubator-airflow
f0f00e58af32d4143854fb0f912953258e547886
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
3
2019-03-28T05:59:39.000Z
2019-10-03T22:05:25.000Z
airflow/kubernetes/pod.py
discord/incubator-airflow
f0f00e58af32d4143854fb0f912953258e547886
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
7
2019-03-27T07:58:14.000Z
2020-02-12T17:42:33.000Z
airflow/kubernetes/pod.py
discordapp/incubator-airflow
f0f00e58af32d4143854fb0f912953258e547886
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
2
2018-11-01T22:36:10.000Z
2019-11-23T13:36:53.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...
37.141935
92
0.652249
120441ad8169fb80b62bf2903f7474d56efe3761
24,264
py
Python
neat_local/genome.py
Osrip/Novelty_criticality_PyTorch-NEAT
ff37eede4aea2cbb4075414a960477c215219f73
[ "Apache-2.0" ]
null
null
null
neat_local/genome.py
Osrip/Novelty_criticality_PyTorch-NEAT
ff37eede4aea2cbb4075414a960477c215219f73
[ "Apache-2.0" ]
null
null
null
neat_local/genome.py
Osrip/Novelty_criticality_PyTorch-NEAT
ff37eede4aea2cbb4075414a960477c215219f73
[ "Apache-2.0" ]
null
null
null
"""Handles genomes (individuals in the population).""" from __future__ import division, print_function from itertools import count from random import choice, random, shuffle import sys from neat.activations import ActivationFunctionSet from neat.aggregations import AggregationFunctionSet from neat.config import Con...
42.198261
127
0.617829
3a83dd75b4a662d734ffb315811a5292d52ddf01
555
py
Python
deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/EXT/rescale_normal.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
210
2016-04-09T14:26:00.000Z
2022-03-25T18:36:19.000Z
deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/EXT/rescale_normal.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
72
2016-09-04T09:30:19.000Z
2022-03-27T17:06:53.000Z
deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/EXT/rescale_normal.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
64
2016-04-09T14:26:49.000Z
2022-03-21T11:19:47.000Z
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _...
34.6875
115
0.801802
181a090c6bffaf528a58d95538f104ff5abd0d14
6,462
py
Python
cryton/lib/util/creator.py
slashsec-edu/cryton-core
30931c276cf1ed239b50cdb96d5711468d361eea
[ "MIT" ]
null
null
null
cryton/lib/util/creator.py
slashsec-edu/cryton-core
30931c276cf1ed239b50cdb96d5711468d361eea
[ "MIT" ]
null
null
null
cryton/lib/util/creator.py
slashsec-edu/cryton-core
30931c276cf1ed239b50cdb96d5711468d361eea
[ "MIT" ]
null
null
null
from typing import Union from cryton.lib.util import exceptions, logger from cryton.lib.models import stage, plan, step, worker from cryton.cryton_rest_api.models import OutputMapping def create_plan(template: dict) -> int: """ Check if Plan structure is correct and add it to DB. :param template: Plan fr...
34.92973
112
0.693129
865d78b208ce0700dfd6f542b46b58ec2a4213e4
184
py
Python
ccal/add_conda_to_path.py
kberkey/ccal
92aa8372997dccec2908928f71a11b6c8327d7aa
[ "MIT" ]
9
2017-10-09T16:54:58.000Z
2018-12-14T19:49:03.000Z
ccal/add_conda_to_path.py
kberkey/ccal
92aa8372997dccec2908928f71a11b6c8327d7aa
[ "MIT" ]
8
2017-03-11T04:43:04.000Z
2018-12-10T09:47:14.000Z
ccal/add_conda_to_path.py
kberkey/ccal
92aa8372997dccec2908928f71a11b6c8327d7aa
[ "MIT" ]
4
2017-03-10T19:12:28.000Z
2022-01-02T21:11:40.000Z
from os import environ def add_conda_to_path(conda_directory_path): environ["PATH"] = "{}:{}".format( "{}/{}".format(conda_directory_path, "bin"), environ["PATH"] )
20.444444
68
0.630435
91fbbaa2ba6d6726cff9ac3b7bfbc2e5d422fc78
3,570
py
Python
ceilometer/tests/db.py
lexxito/monitoring
bec8dfb8d3610331c7ae5ec543e0b8da0948c164
[ "Apache-2.0" ]
1
2016-04-15T17:14:59.000Z
2016-04-15T17:14:59.000Z
ceilometer/tests/db.py
lexxito/monitoring
bec8dfb8d3610331c7ae5ec543e0b8da0948c164
[ "Apache-2.0" ]
null
null
null
ceilometer/tests/db.py
lexxito/monitoring
bec8dfb8d3610331c7ae5ec543e0b8da0948c164
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- # # Copyright © 2012 New Dream Network, LLC (DreamHost) # Copyright © 2013 eNovance # # Author: Doug Hellmann <doug.hellmann@dreamhost.com> # Julien Danjou <julien@danjou.info> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in com...
33.679245
75
0.651541
8f0c0c4ff8eb2cb7e24e03b6b7fe97254ced8f7f
119
py
Python
tests/test_charlesweir_subtract.py
longr/git-advance-example
c5d82efff40945af57a01d42a7c43c3e3a591d49
[ "MIT" ]
null
null
null
tests/test_charlesweir_subtract.py
longr/git-advance-example
c5d82efff40945af57a01d42a7c43c3e3a591d49
[ "MIT" ]
15
2021-11-29T13:15:19.000Z
2021-12-16T11:39:02.000Z
tests/test_charlesweir_subtract.py
longr/git-advance-example
c5d82efff40945af57a01d42a7c43c3e3a591d49
[ "MIT" ]
5
2021-12-15T10:41:18.000Z
2021-12-16T11:02:56.000Z
from pythoncalculator.charlesweir_subtract import subtract def test_subtract(): assert subtract(1, 3) == -2
19.833333
59
0.731092
f9d2e6bc4d250eb100400b538c011cc4ef0a43a8
5,342
py
Python
maml_examples/test_maml_ant.py
kvas7andy/maml_rl
2496040a820b34d7982dc9853e3db0b10a309b24
[ "MIT" ]
null
null
null
maml_examples/test_maml_ant.py
kvas7andy/maml_rl
2496040a820b34d7982dc9853e3db0b10a309b24
[ "MIT" ]
null
null
null
maml_examples/test_maml_ant.py
kvas7andy/maml_rl
2496040a820b34d7982dc9853e3db0b10a309b24
[ "MIT" ]
null
null
null
from rllab.baselines.linear_feature_baseline import LinearFeatureBaseline from rllab.envs.mujoco.ant_env_rand import AntEnvRand from rllab.envs.mujoco.ant_env_oracle import AntEnvOracle from rllab.envs.normalized_env import normalize from rllab.misc.instrument import stub, run_experiment_lite from sandbox.rocky.tf.algo...
34.24359
188
0.635343
7a2890976aff9f919d0b66948340144e5e5c44cd
897
py
Python
deepxde/data/constraint.py
zongzi13545329/PINNS
9adf81ec13668387aa155b24fe509cdadaca9cf2
[ "Apache-2.0" ]
1
2021-12-02T14:31:38.000Z
2021-12-02T14:31:38.000Z
deepxde/data/constraint.py
zongzi13545329/PINNS
9adf81ec13668387aa155b24fe509cdadaca9cf2
[ "Apache-2.0" ]
null
null
null
deepxde/data/constraint.py
zongzi13545329/PINNS
9adf81ec13668387aa155b24fe509cdadaca9cf2
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .data import Data from .. import config from ..backend import tf class Constraint(Data): """General constraints.""" def __init__(self, constraint, train_x, test_x): self.con...
28.935484
78
0.643255
0b8890a19a872e9560629839344d3c9ed1653e15
3,478
py
Python
zaqarclient/queues/client.py
mail2nsrajesh/python-zaqarclient
405399f72b77eb4757199fe5208d7283260431a7
[ "Apache-2.0" ]
31
2015-01-29T20:10:50.000Z
2021-03-05T21:39:36.000Z
zaqarclient/queues/client.py
mail2nsrajesh/python-zaqarclient
405399f72b77eb4757199fe5208d7283260431a7
[ "Apache-2.0" ]
null
null
null
zaqarclient/queues/client.py
mail2nsrajesh/python-zaqarclient
405399f72b77eb4757199fe5208d7283260431a7
[ "Apache-2.0" ]
7
2016-03-02T14:47:24.000Z
2018-04-09T08:32:34.000Z
# Copyright (c) 2013 Red Hat, 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 writ...
38.21978
78
0.727142
70930955e3a60c94a6c9b9fb7ff71965d69d0528
3,451
py
Python
_01_base/_01_01_type-var/__init__.py
XHS-12302/pycharm-test-project
fa4c4a0490cb7a6390cb3961f9c5167cb337e50c
[ "Apache-2.0" ]
null
null
null
_01_base/_01_01_type-var/__init__.py
XHS-12302/pycharm-test-project
fa4c4a0490cb7a6390cb3961f9c5167cb337e50c
[ "Apache-2.0" ]
null
null
null
_01_base/_01_01_type-var/__init__.py
XHS-12302/pycharm-test-project
fa4c4a0490cb7a6390cb3961f9c5167cb337e50c
[ "Apache-2.0" ]
null
null
null
# _*_ coding: utf-8 _*_ """ print() """ print('hello,world') print('hello,world', 'xhsgg12302@126.com') """ input() """ # name = input('please enter your name:') # color = input() # print(name, ': you favorite color is ', color) print(100 + 200) print(3.91 * 3.2) print(10/3) print(10 // 3) # 地板除 print(10 % 3) ...
16.916667
80
0.604752
7fde2231b148743f782bc623ba598dc74595c06d
23,837
py
Python
preprocessing/data_conversion.py
KCL-BMEIS/VS_Seg
8d79f062ca5d1b65d4a1f9f632f981992a7780b5
[ "Apache-2.0" ]
19
2021-01-04T14:35:22.000Z
2022-03-23T07:14:53.000Z
preprocessing/data_conversion.py
KCL-BMEIS/VS_Seg
8d79f062ca5d1b65d4a1f9f632f981992a7780b5
[ "Apache-2.0" ]
null
null
null
preprocessing/data_conversion.py
KCL-BMEIS/VS_Seg
8d79f062ca5d1b65d4a1f9f632f981992a7780b5
[ "Apache-2.0" ]
3
2021-03-27T22:20:38.000Z
2021-09-15T10:36:10.000Z
""" @authors: reubendo, aaronkujawa Adapted from: https://github.com/SlicerRt/SlicerRT/edit/master/BatchProcessing/BatchStructureSetConversion.py usage from command line: [path_slicer] --python-script [path_to_this_python_file] --input-folder [path_input] --output-folder [path_output] [optional] --register [T1 or T2] ...
44.806391
128
0.692117
8412f0bfc5e5c0828b5bc96784bae56af00c9ffe
459
py
Python
library/migrations/0009_auto_20170214_1426.py
JingyiHU/Django-library
02f631d82ba2ccba88aab3e5bd53f9a241b84891
[ "MIT" ]
1
2018-07-23T09:08:54.000Z
2018-07-23T09:08:54.000Z
library/migrations/0009_auto_20170214_1426.py
JingyiHU/Django-library
02f631d82ba2ccba88aab3e5bd53f9a241b84891
[ "MIT" ]
null
null
null
library/migrations/0009_auto_20170214_1426.py
JingyiHU/Django-library
02f631d82ba2ccba88aab3e5bd53f9a241b84891
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-14 06:26 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('library', '0008_auto_20170214_1415'), ] operations = [ migrations.AlterFiel...
21.857143
61
0.616558
e7717ba0dba348c1e83e151b72f7a350d2accdbd
3,433
py
Python
tests/integration/renderer/test_title.py
jbampton/dashR
edbcc040ffabb7956eeb4774e922794c53c557ce
[ "MIT" ]
null
null
null
tests/integration/renderer/test_title.py
jbampton/dashR
edbcc040ffabb7956eeb4774e922794c53c557ce
[ "MIT" ]
null
null
null
tests/integration/renderer/test_title.py
jbampton/dashR
edbcc040ffabb7956eeb4774e922794c53c557ce
[ "MIT" ]
null
null
null
import pdb app_test_updating = """ library(dash) library(dashHtmlComponents) app <- Dash$new() app$layout(htmlDiv(list(htmlH3("Press button see document title updating"), htmlDiv(id="output", children="Awaiting output"), htmlButton("Update", id="button", n_clicks=0), htmlButton("Update Page", id="page", n_click...
25.42963
75
0.685989
d47079b3a3183a6810130b791be1defe6eb09003
208
py
Python
Python/MachineLearning/linearRegression.py
buildcodeblocks/PythonBlocks
2e0d9fa75016fa0b5d5ab42fe55934c7777b74cd
[ "MIT" ]
1
2020-09-18T05:17:00.000Z
2020-09-18T05:17:00.000Z
Python/MachineLearning/linearRegression.py
buildcodeblocks/Blocks
2e0d9fa75016fa0b5d5ab42fe55934c7777b74cd
[ "MIT" ]
null
null
null
Python/MachineLearning/linearRegression.py
buildcodeblocks/Blocks
2e0d9fa75016fa0b5d5ab42fe55934c7777b74cd
[ "MIT" ]
null
null
null
from sklearn.linear_model import LinearRegression # linear regression model def linearRegression(X, y, fit_intercept=True): model = LinearRegression(fit_intercept) model.fit(X, y) return model
20.8
49
0.764423
bc44197c0a7ad0aa18d634b52114d558faff98e0
568
py
Python
setup.py
alimanfoo/dask-kubernetes
83e4706a439ce827b7bb9784b9e1f5b0486fb254
[ "BSD-3-Clause" ]
null
null
null
setup.py
alimanfoo/dask-kubernetes
83e4706a439ce827b7bb9784b9e1f5b0486fb254
[ "BSD-3-Clause" ]
null
null
null
setup.py
alimanfoo/dask-kubernetes
83e4706a439ce827b7bb9784b9e1f5b0486fb254
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python from os.path import exists from setuptools import setup, find_packages setup( name='dask-kubernetes', version='0.5.0', description='Native Kubernetes integration for Dask', url='https://github.com/dask/dask-kubernetes', keywords='dask,kubernetes,distributed', license='BSD...
29.894737
81
0.698944
de41f1a644aecc6c4897c5ce42492b9d49270818
2,642
py
Python
z_infra_provisioning/cloud_infra_center/ocp_upi/tools/modify-bastion.py
stev-glodowski/z_ansible_collections_samples
999648b93cc8d38a9e30a8983a6f5fe238338fc7
[ "Apache-2.0" ]
null
null
null
z_infra_provisioning/cloud_infra_center/ocp_upi/tools/modify-bastion.py
stev-glodowski/z_ansible_collections_samples
999648b93cc8d38a9e30a8983a6f5fe238338fc7
[ "Apache-2.0" ]
null
null
null
z_infra_provisioning/cloud_infra_center/ocp_upi/tools/modify-bastion.py
stev-glodowski/z_ansible_collections_samples
999648b93cc8d38a9e30a8983a6f5fe238338fc7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # ================================================================= # Licensed Materials - Property of IBM # # (c) Copyright IBM Corp. 2021 All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # ====...
31.082353
118
0.579485
02fa554e00692abf52fe107dd991f5f1f16f0eef
654
py
Python
histograma/histograma.py
jhonatantft/digital-image-processing
7f12f0c0665c4e4422d121b8a431bdd00b9bb862
[ "MIT" ]
null
null
null
histograma/histograma.py
jhonatantft/digital-image-processing
7f12f0c0665c4e4422d121b8a431bdd00b9bb862
[ "MIT" ]
null
null
null
histograma/histograma.py
jhonatantft/digital-image-processing
7f12f0c0665c4e4422d121b8a431bdd00b9bb862
[ "MIT" ]
null
null
null
import cv2 import numpy as np from matplotlib import pyplot as plt img = cv2.imread('../grama.jpg',0) # create a mask mask = np.zeros(img.shape[:2], np.uint8) mask[100:300, 100:400] = 255 masked_img = cv2.bitwise_and(img,img,mask = mask) # Calculate histogram with mask and without mask # Check third argument for mas...
28.434783
58
0.70948
3ff14a98bf25151f7aef1941d2a954978728dfe3
31,445
py
Python
projects/UniDet/unidet/data/datasets/inst_categories.py
Othinus099/interior
5c3eaa59722d71374422d34f42342c659d7ce8b0
[ "Apache-2.0" ]
349
2021-02-26T01:56:33.000Z
2022-03-29T06:38:00.000Z
projects/UniDet/unidet/data/datasets/inst_categories.py
Othinus099/interior
5c3eaa59722d71374422d34f42342c659d7ce8b0
[ "Apache-2.0" ]
16
2021-03-03T20:02:38.000Z
2022-02-28T14:50:39.000Z
projects/UniDet/unidet/data/datasets/inst_categories.py
Othinus099/interior
5c3eaa59722d71374422d34f42342c659d7ce8b0
[ "Apache-2.0" ]
33
2021-02-26T04:44:57.000Z
2022-02-19T02:32:03.000Z
categories = { 'coco': [ {"color": [220, 20, 60], "isthing": 1, "id": 1, "name": "person"}, {"color": [119, 11, 32], "isthing": 1, "id": 2, "name": "bicycle"}, {"color": [0, 0, 142], "isthing": 1, "id": 3, "name": "car"}, {"color": [0, 0, 230], "isthing": 1, "id": 4, "name": "motorcy...
64.701646
92
0.48103
c34604433b4bc38bfaaee8237a854b2640e6bb60
2,678
py
Python
service/tasks/redo_tasks.py
CottageLabs/lodestone
2e60f2138a49633398655bb7f728fd3d6ac92c43
[ "Apache-2.0" ]
null
null
null
service/tasks/redo_tasks.py
CottageLabs/lodestone
2e60f2138a49633398655bb7f728fd3d6ac92c43
[ "Apache-2.0" ]
null
null
null
service/tasks/redo_tasks.py
CottageLabs/lodestone
2e60f2138a49633398655bb7f728fd3d6ac92c43
[ "Apache-2.0" ]
null
null
null
from octopus.core import app from redis import Redis class RedoTasks: """ from service.tasks.redo_tasks import RedoTasks r = RedoTasks(model, task) # Model has to be one of 'ethesis' or 'dataset' # Task has to be one of 'deposit', 'poll' or 'ticket create' r.all() # to redo all jobs i...
36.684932
137
0.598208
99914399c8ac0ac1d53bec2148ea81dfac1b5f48
695
py
Python
Python/Fundamentals/Functions(lab-exercise)/Palindrome Integers.py
EduardV777/Softuni-Python-Exercises
79db667028aea7dfecb3dbbd834c752180c50f44
[ "Unlicense" ]
null
null
null
Python/Fundamentals/Functions(lab-exercise)/Palindrome Integers.py
EduardV777/Softuni-Python-Exercises
79db667028aea7dfecb3dbbd834c752180c50f44
[ "Unlicense" ]
null
null
null
Python/Fundamentals/Functions(lab-exercise)/Palindrome Integers.py
EduardV777/Softuni-Python-Exercises
79db667028aea7dfecb3dbbd834c752180c50f44
[ "Unlicense" ]
null
null
null
seq=input() def IsItPalindrome(seq): k=0; list1=[] while k<len(seq): num=" " if seq[k]!=",": for j in range(k,len(seq)): if seq[j]!=",": num+=seq[j] k+=1 else: k+=2 ...
25.740741
47
0.374101
0f0ed2f1538d9326a8a8b92f2f552bd2873b0ede
590
py
Python
task02_a.py
mboehn/aoc2017
1bf5302c6e566e8454d3e567cfac38945c8fe955
[ "MIT" ]
null
null
null
task02_a.py
mboehn/aoc2017
1bf5302c6e566e8454d3e567cfac38945c8fe955
[ "MIT" ]
null
null
null
task02_a.py
mboehn/aoc2017
1bf5302c6e566e8454d3e567cfac38945c8fe955
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import csv import func INPUTFILE = './task02.input' checksum = 0 with open(INPUTFILE, mode='r') as csvfile: reader = csv.reader(csvfile, delimiter="\t") for row in reader: row = list(map(int, row)) print(row) rowdiff = int(max(row)) - int(min(row)) pr...
26.818182
198
0.618644
cf17002d8887977f08725c498c86933ff720acc4
4,618
py
Python
deslib/static/single_best.py
mrtrunghieu1/Mutil-DesLib-Algorithm
4fd82c553adc34561f6698b18a08ad89a58deee6
[ "BSD-3-Clause" ]
null
null
null
deslib/static/single_best.py
mrtrunghieu1/Mutil-DesLib-Algorithm
4fd82c553adc34561f6698b18a08ad89a58deee6
[ "BSD-3-Clause" ]
null
null
null
deslib/static/single_best.py
mrtrunghieu1/Mutil-DesLib-Algorithm
4fd82c553adc34561f6698b18a08ad89a58deee6
[ "BSD-3-Clause" ]
null
null
null
# coding=utf-8 # Author: Rafael Menelau Oliveira e Cruz <rafaelmenelau@gmail.com> # # License: BSD 3 clause import numpy as np from .base import BaseStaticEnsemble from sklearn.utils.validation import check_X_y, check_is_fitted, check_array class SingleBest(BaseStaticEnsemble): """Classification method that sel...
34.721805
79
0.646167
4af81656b71017a2ef42ef5ca8631a9c96231c2c
13,261
py
Python
pyzoo/zoo/automl/model/Seq2Seq_pytorch.py
pinggao187/zoo-sphinx-test
c2033c79b25eba0e9f6f48be56a335aae994ea54
[ "Apache-2.0" ]
null
null
null
pyzoo/zoo/automl/model/Seq2Seq_pytorch.py
pinggao187/zoo-sphinx-test
c2033c79b25eba0e9f6f48be56a335aae994ea54
[ "Apache-2.0" ]
null
null
null
pyzoo/zoo/automl/model/Seq2Seq_pytorch.py
pinggao187/zoo-sphinx-test
c2033c79b25eba0e9f6f48be56a335aae994ea54
[ "Apache-2.0" ]
1
2020-09-01T06:53:08.000Z
2020-09-01T06:53:08.000Z
# # Copyright 2018 Analytics Zoo 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...
34.444156
96
0.603499
91fdb1d8e7c53c1194f7c0ed85efc802e047b61c
170
py
Python
snu/snu.py
MomsFriendlyRobotCompany/snu
14bea044540b0ccbd4c557f56329bdea7ee22b82
[ "MIT" ]
null
null
null
snu/snu.py
MomsFriendlyRobotCompany/snu
14bea044540b0ccbd4c557f56329bdea7ee22b82
[ "MIT" ]
null
null
null
snu/snu.py
MomsFriendlyRobotCompany/snu
14bea044540b0ccbd4c557f56329bdea7ee22b82
[ "MIT" ]
null
null
null
# from snu.network.ip import get_ip from snu.messages import Vector from snu.messages import Twist from snu.messages import Wrench from snu.messages import Quaternion
18.888889
35
0.817647
e308e76faea0d272c858a5e4342d0e629e4e82cb
138,936
py
Python
Lib/site-packages/OCC/GeomPlate.py
JWerbrouck/RWTH_M1_Projekt
7ae63a2277361fa3273cf0677b297379482b8240
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/OCC/GeomPlate.py
JWerbrouck/RWTH_M1_Projekt
7ae63a2277361fa3273cf0677b297379482b8240
[ "bzip2-1.0.6" ]
1
2022-03-17T16:46:04.000Z
2022-03-17T16:46:04.000Z
Lib/site-packages/OCC/GeomPlate.py
JWerbrouck/RWTH_M1_Projekt
7ae63a2277361fa3273cf0677b297379482b8240
[ "bzip2-1.0.6" ]
null
null
null
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.1 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (3,0,0): new_instancemethod = lambda func, inst, cls: _GeomPl...
42.475084
1,340
0.75059
cd2329d9b14613081582025a26bead9d9863340f
1,294
py
Python
test/py_tests/test_cnt.py
kalyanam-FMTGA/ray-original
f4f57896015c1c29ca571069b007c409d74824e0
[ "BSD-3-Clause-LBNL" ]
null
null
null
test/py_tests/test_cnt.py
kalyanam-FMTGA/ray-original
f4f57896015c1c29ca571069b007c409d74824e0
[ "BSD-3-Clause-LBNL" ]
null
null
null
test/py_tests/test_cnt.py
kalyanam-FMTGA/ray-original
f4f57896015c1c29ca571069b007c409d74824e0
[ "BSD-3-Clause-LBNL" ]
null
null
null
import os import math import string import unittest from unit_tools import support from unit_tools import lcompare class CntTestCase(unittest.TestCase): def setUp(self): self.oldpath = os.environ['PATH'] os.environ['PATH'] = os.path.abspath(support.BINDIR) def tearDown(self): os.environ['PATH'] = self.oldp...
22.701754
54
0.602782
34bf1bd511fd03c2f56a24944085039a0a4f7c1c
1,667
py
Python
Pwnable/BKSEC2019/deadnote1/dead_note_1.py
kamithanthanh/hacmao.github.io
87b06df827cc65f737831301bae1d5f3a2d014ff
[ "MIT" ]
1
2019-06-02T02:52:32.000Z
2019-06-02T02:52:32.000Z
Pwnable/BKSEC2019/deadnote1/dead_note_1.py
kamithanthanh/hacmao.github.io
87b06df827cc65f737831301bae1d5f3a2d014ff
[ "MIT" ]
null
null
null
Pwnable/BKSEC2019/deadnote1/dead_note_1.py
kamithanthanh/hacmao.github.io
87b06df827cc65f737831301bae1d5f3a2d014ff
[ "MIT" ]
1
2019-06-01T16:10:59.000Z
2019-06-01T16:10:59.000Z
from pwn import * sh = process("./Dead_Note_Lv1") # sh = remote("bksec.team", 4326) def get_PIE(proc): memory_map = open("/proc/{}/maps".format(proc.pid),"rb").readlines() return int(memory_map[0].split("-")[0],16) def debug(bp): #bp = [0xea0,0xd31,0xc52] #bp = [0x00000dfb,0x00000b7c,0x00000d10] ...
25.257576
122
0.557289
a382e9d06c62ee7d49fe69319bf08ba3af605f6f
457
py
Python
venv/Scripts/easy_install-3.7-script.py
gauravsarkar97/JukeBox
e67c80bcb934703ff00531bd4d32a5c2dafb473c
[ "MIT" ]
2
2019-07-29T15:45:31.000Z
2019-11-17T23:33:58.000Z
venv/Scripts/easy_install-3.7-script.py
gauravsarkar97/JukeBox
e67c80bcb934703ff00531bd4d32a5c2dafb473c
[ "MIT" ]
null
null
null
venv/Scripts/easy_install-3.7-script.py
gauravsarkar97/JukeBox
e67c80bcb934703ff00531bd4d32a5c2dafb473c
[ "MIT" ]
1
2019-01-06T15:18:58.000Z
2019-01-06T15:18:58.000Z
#!C:\Users\gaura\PycharmProjects\Melody\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install-3.7' __requires__ = 'setuptools==39.1.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?...
35.153846
87
0.693654
6dcf1a7744204c063c40e451d1f0b52f69ec1dc4
2,119
py
Python
przyklady/przyklady/0/Listing_17-2.py
bitounu/Nauka-Pythona
e02dd239ba2c294d6fdd98958301b3ece44f44d1
[ "Unlicense" ]
null
null
null
przyklady/przyklady/0/Listing_17-2.py
bitounu/Nauka-Pythona
e02dd239ba2c294d6fdd98958301b3ece44f44d1
[ "Unlicense" ]
null
null
null
przyklady/przyklady/0/Listing_17-2.py
bitounu/Nauka-Pythona
e02dd239ba2c294d6fdd98958301b3ece44f44d1
[ "Unlicense" ]
null
null
null
# Listing 17-2.py # Copyright Warren & Carter Sande, 2013 # Released under MIT license http://www.opensource.org/licenses/mit-license.php # Version $version ---------------------------- # Program służący do poruszania piłkami za pomocą sprajtów import sys, pygame from random import * #-----definicja klasy pochodn...
37.175439
84
0.634261
4d8162a34fde5fc42f0cb479fc9ca65470a4f95e
3,202
py
Python
tests/algorithms/test_fqi.py
k4ntz/mushroom-rl
17c8e9b2a9648a59169f3599c4ef8d259afc39f4
[ "MIT" ]
1
2020-11-06T18:32:32.000Z
2020-11-06T18:32:32.000Z
tests/algorithms/test_fqi.py
AmmarFahmy/mushroom-rl
2625ee7f64d5613b3b9fba00f0b7a39fece88ca5
[ "MIT" ]
null
null
null
tests/algorithms/test_fqi.py
AmmarFahmy/mushroom-rl
2625ee7f64d5613b3b9fba00f0b7a39fece88ca5
[ "MIT" ]
null
null
null
import numpy as np from sklearn.ensemble import ExtraTreesRegressor from datetime import datetime from helper.utils import TestUtils as tu from mushroom_rl.algorithms import Agent from mushroom_rl.algorithms.value import DoubleFQI, FQI from mushroom_rl.core import Core from mushroom_rl.environments import * from mush...
26.907563
80
0.677077
8de834e389056ef4be7979b6477ab4e0272176ef
1,694
py
Python
pypressruby/main_widget.py
gfabbris/pypressruby
ce5b89821b0bd829c0aac85f1b364a6f0202716e
[ "BSD-3-Clause" ]
null
null
null
pypressruby/main_widget.py
gfabbris/pypressruby
ce5b89821b0bd829c0aac85f1b364a6f0202716e
[ "BSD-3-Clause" ]
null
null
null
pypressruby/main_widget.py
gfabbris/pypressruby
ce5b89821b0bd829c0aac85f1b364a6f0202716e
[ "BSD-3-Clause" ]
null
null
null
""" Copyright (c) 2018-2021, UChicago Argonne, LLC See LICENSE file. """ from PyQt5.QtWidgets import ( QMainWindow, QApplication, QWidget, QGridLayout, QMessageBox, ) from pypressruby.plot_widget import PlotWidget from pypressruby.options_widget import OptionsWidget from pypressruby.widgets_logi...
24.911765
70
0.646989
ceeb2287a1b317cdd310011375e8150d63090d4b
1,833
py
Python
Crawlers/news_sites/spiders/neth.py
ashu8912/fact-Bounty
9ecf86faa1829753c285424d68ac2adfd626ba1f
[ "Apache-2.0" ]
57
2019-01-23T16:19:12.000Z
2020-07-05T09:19:52.000Z
Crawlers/news_sites/spiders/neth.py
ashu8912/fact-Bounty
9ecf86faa1829753c285424d68ac2adfd626ba1f
[ "Apache-2.0" ]
402
2019-02-09T10:41:57.000Z
2020-07-05T06:51:29.000Z
Crawlers/news_sites/spiders/neth.py
ashu8912/fact-Bounty
9ecf86faa1829753c285424d68ac2adfd626ba1f
[ "Apache-2.0" ]
173
2019-01-24T06:15:04.000Z
2020-09-08T14:07:38.000Z
# -*- coding: utf-8 -*- import scrapy import dateutil.parser as dparser from news_sites.items import NewsSitesItem class NethGossipSpider(scrapy.Spider): name = "nethgossip" allowed_domains = ["nethgossip.lk"] start_urls = ["http://nethgossip.lk/category/9"] def __init__(self, date=None, *args, **kw...
32.157895
81
0.596836
789190fb6859251156dff8c0e5d500b66f9e7301
254
py
Python
peas/util/make_test_constants.py
13thProgression/peas-blockchain
8e058cbfe0c1ab73f7c1ec41bedb39071c63141c
[ "Apache-2.0" ]
2
2021-08-16T17:45:07.000Z
2021-09-18T19:00:58.000Z
peas/util/make_test_constants.py
13thProgression/peas-blockchain
8e058cbfe0c1ab73f7c1ec41bedb39071c63141c
[ "Apache-2.0" ]
4
2021-09-26T15:50:20.000Z
2021-10-06T06:18:51.000Z
peas/util/make_test_constants.py
13thProgression/peas-blockchain
8e058cbfe0c1ab73f7c1ec41bedb39071c63141c
[ "Apache-2.0" ]
3
2021-09-29T19:08:41.000Z
2022-03-15T08:47:28.000Z
from typing import Dict from peas.consensus.default_constants import DEFAULT_CONSTANTS, ConsensusConstants def make_test_constants(test_constants_overrides: Dict) -> ConsensusConstants: return DEFAULT_CONSTANTS.replace(**test_constants_overrides)
31.75
82
0.854331
a7bba3b6da0eab8599d6289b93c39432c901c846
152
py
Python
MAC/gustavoapp/apps.py
LindseyVA/TrabA2-LP-2021
a24dd0b5349abb77069f7f9e8ab9eb4cc57d136e
[ "MIT" ]
5
2021-12-01T03:23:34.000Z
2022-03-30T00:33:02.000Z
MAC/gustavoapp/apps.py
LindseyVA/TrabA2-LP-2021
a24dd0b5349abb77069f7f9e8ab9eb4cc57d136e
[ "MIT" ]
null
null
null
MAC/gustavoapp/apps.py
LindseyVA/TrabA2-LP-2021
a24dd0b5349abb77069f7f9e8ab9eb4cc57d136e
[ "MIT" ]
null
null
null
from django.apps import AppConfig class GustavoappConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'gustavoapp'
21.714286
56
0.769737
89a450059bf773fc8fe5c06a1ac01cd9d329169d
4,546
py
Python
senlin-7.0.0/senlin/objects/receiver.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
45
2015-10-18T02:56:50.000Z
2022-03-01T15:28:02.000Z
senlin-7.0.0/senlin/objects/receiver.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
senlin-7.0.0/senlin/objects/receiver.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
45
2015-10-19T02:35:57.000Z
2021-09-28T09:01:42.000Z
# 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, software # distributed unde...
37.262295
77
0.645842
7a5c2c560686f568989cc62cb2edcf9856373aaf
16,525
py
Python
src/helper.py
jackred/CW2_GERMAN_SIGN
988a99d6012ae95bec778a91785c76a2ca40ba87
[ "MIT" ]
null
null
null
src/helper.py
jackred/CW2_GERMAN_SIGN
988a99d6012ae95bec778a91785c76a2ca40ba87
[ "MIT" ]
null
null
null
src/helper.py
jackred/CW2_GERMAN_SIGN
988a99d6012ae95bec778a91785c76a2ca40ba87
[ "MIT" ]
null
null
null
# -*- Mode: Python; tab-width: 8; indent-tabs-mode: nil; python-indent-offset: 4 -*- # vim:set et sts=4 ts=4 tw=80: # This Source Code Form is subject to the terms of the MIT License. # If a copy of the ML was not distributed with this # file, You can obtain one at https://opensource.org/licenses/MIT # author: JackRed...
32.149805
108
0.630802
0eb05c8c90a3cbc40502e181c7995281d1308b0e
2,414
py
Python
app/models.py
OwinoLucas/blog
3ef357c6421c2963dba8ba07aa6abee897f81721
[ "Unlicense" ]
null
null
null
app/models.py
OwinoLucas/blog
3ef357c6421c2963dba8ba07aa6abee897f81721
[ "Unlicense" ]
null
null
null
app/models.py
OwinoLucas/blog
3ef357c6421c2963dba8ba07aa6abee897f81721
[ "Unlicense" ]
null
null
null
from . import db from werkzeug.security import generate_password_hash,check_password_hash from flask_login import UserMixin from . import login_manager from datetime import datetime @login_manager.user_loader def load_user(user_id): return User.query.get(int(user_id)) class User(UserMixin,db.Model): """ ...
28.069767
72
0.673571
2801058b1511acbf898d6ac5fe585203cdc91b07
7,011
py
Python
onmt/Trainer.py
NaLiuAnna/OpenNMT-py
881969aa2c662d0e578341d98db72ad276a9ee53
[ "MIT" ]
null
null
null
onmt/Trainer.py
NaLiuAnna/OpenNMT-py
881969aa2c662d0e578341d98db72ad276a9ee53
[ "MIT" ]
null
null
null
onmt/Trainer.py
NaLiuAnna/OpenNMT-py
881969aa2c662d0e578341d98db72ad276a9ee53
[ "MIT" ]
null
null
null
from __future__ import division """ This is the loadable seq2seq trainer library that is in charge of training details, loss compute, and statistics. See train.py for a use case of this library. Note!!! To make this a general library, we implement *only* mechanism things here(i.e. what to do), and leave the strategy t...
35.231156
78
0.578519
7ace633af44d0f44272e4f8361ae44876aef8da5
14,411
py
Python
wf_psf/train_utils.py
tobias-liaudat/wf-psf
0ff1a12d06c46bd8599061d227785393fb528d76
[ "MIT" ]
7
2022-03-10T10:49:01.000Z
2022-03-17T16:06:12.000Z
wf_psf/train_utils.py
tobias-liaudat/wf-psf
0ff1a12d06c46bd8599061d227785393fb528d76
[ "MIT" ]
null
null
null
wf_psf/train_utils.py
tobias-liaudat/wf-psf
0ff1a12d06c46bd8599061d227785393fb528d76
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf from wf_psf.tf_psf_field import build_PSF_model from wf_psf.utils import NoiseEstimator class L1ParamScheduler(tf.keras.callbacks.Callback): """L1 rate scheduler which sets the L1 rate according to schedule. Arguments: l1_schedule_rule: a function that takes a...
33.281755
102
0.631185
e0c09534fcb763316069bcce83c4e94dc2843c8a
5,211
py
Python
test/functional/wallet-hd.py
PERSHYANCOIN/PERSHYANCOIN
bbadf90495732ecdbf5ab9a27e84e1dbdaff117d
[ "MIT" ]
1
2018-02-21T07:10:01.000Z
2018-02-21T07:10:01.000Z
test/functional/wallet-hd.py
pershyancoin/pershyancoin
bbadf90495732ecdbf5ab9a27e84e1dbdaff117d
[ "MIT" ]
2
2018-02-12T22:00:38.000Z
2018-02-12T22:01:03.000Z
test/functional/wallet-hd.py
PERSHYANCOIN/PERSHYANCOIN
bbadf90495732ecdbf5ab9a27e84e1dbdaff117d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016 The Pershyancoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test Hierarchical Deterministic wallet function.""" from test_framework.test_framework import Pershyan...
42.365854
113
0.647285
862b2d22c0e49336cae76b485aabce243cbc6922
1,773
py
Python
main.py
Senith-Chandul/Image-UploadBot
0b3c393335159140c3e09fd23e09ecf7b685f58c
[ "MIT" ]
null
null
null
main.py
Senith-Chandul/Image-UploadBot
0b3c393335159140c3e09fd23e09ecf7b685f58c
[ "MIT" ]
null
null
null
main.py
Senith-Chandul/Image-UploadBot
0b3c393335159140c3e09fd23e09ecf7b685f58c
[ "MIT" ]
1
2022-03-10T02:49:33.000Z
2022-03-10T02:49:33.000Z
import os import logging from pyrogram import Client, filters from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton from creds import Credentials from telegraph import upload_file logging.basicConfig(level=logging.WARNING) tgraph = Client( "Image upload bot", bot_token=Credentials...
30.568966
119
0.608009
fea176da6318c2e15a703fdd54b8c9a7c3d7c4ec
1,408
py
Python
Chapter10/regression.py
PacktPublishing/Hands-On-Ensemble-Learning-with-Python
db9b90189dbebbc6ab5ebba0e2e173ba80197c35
[ "MIT" ]
31
2019-07-21T00:36:52.000Z
2022-02-25T15:38:21.000Z
Chapter10/regression.py
tokiran/Hands-On-Ensemble-Learning-with-Python
739ecda33fb75dc1df1366abf4a79c34cc0c2026
[ "MIT" ]
null
null
null
Chapter10/regression.py
tokiran/Hands-On-Ensemble-Learning-with-Python
739ecda33fb75dc1df1366abf4a79c34cc0c2026
[ "MIT" ]
30
2019-07-06T00:22:44.000Z
2022-02-04T02:44:17.000Z
import numpy as np import pandas as pd from simulator import simulate from sklearn import metrics from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split np.random.seed(123456) lr = LinearRegression() data = pd.read_csv('BTC-USD.csv') data = data.dropna() d...
25.6
83
0.607244
3b0f87f97010e7106a74c33e629b28ff077e2df5
397
py
Python
easy/1748-sum-of-unique-elements.py
wanglongjiang/leetcode
c61d2e719e81575cfb5bde9d64e15cee7cf01ef3
[ "MIT" ]
2
2021-03-14T11:38:26.000Z
2021-03-14T11:38:30.000Z
easy/1748-sum-of-unique-elements.py
wanglongjiang/leetcode
c61d2e719e81575cfb5bde9d64e15cee7cf01ef3
[ "MIT" ]
null
null
null
easy/1748-sum-of-unique-elements.py
wanglongjiang/leetcode
c61d2e719e81575cfb5bde9d64e15cee7cf01ef3
[ "MIT" ]
1
2022-01-17T19:33:23.000Z
2022-01-17T19:33:23.000Z
''' 唯一元素的和 给你一个整数数组 nums 。数组中唯一元素是那些只出现 恰好一次 的元素。 请你返回 nums 中唯一元素的 和 。 ''' from typing import List ''' 思路:用哈希表存储所有元素 时间复杂度:O(n) 空间复杂度:O(n) ''' class Solution: def sumOfUnique(self, nums: List[int]) -> int: allItem = set() total = 0 for num in nums: if num not in allItem: ...
15.88
50
0.551637
04e2a8450902f008221760cae6d89ab061f68e79
591
py
Python
As_2.py
TR-MEILL/AboutFlaskNote
6bda8b1fe702441f295179c4fc1e9c276300ed9a
[ "MIT" ]
null
null
null
As_2.py
TR-MEILL/AboutFlaskNote
6bda8b1fe702441f295179c4fc1e9c276300ed9a
[ "MIT" ]
null
null
null
As_2.py
TR-MEILL/AboutFlaskNote
6bda8b1fe702441f295179c4fc1e9c276300ed9a
[ "MIT" ]
null
null
null
from flask import Flask from flask import request from flask import render_template app = Flask(__name__) @app.route('/', methods=['GET', 'POST']) def home(): return render_template('home.htm') @app.route('/login', methods=['GET']) def signin_form(): return render_template('login.htm') @app.route('/login', ...
24.625
82
0.683587
3b11da9f9f6245881abdbf5a0ccd8d4a6d079619
534
py
Python
layers/HorizontalConv2DTranspose.py
eyalbetzalel/PixelCNNPPTF2
94db05ae1161ab2975792e50b5e89bcac041bcda
[ "MIT" ]
8
2020-01-09T01:03:31.000Z
2022-01-09T11:08:57.000Z
layers/HorizontalConv2DTranspose.py
JesseFarebro/PixelCNNPP
7df9fe22099a28ce2096a2b67d72f8d819581856
[ "MIT" ]
2
2021-07-12T12:13:42.000Z
2022-02-09T23:33:46.000Z
layers/HorizontalConv2DTranspose.py
eyalbetzalel/PixelCNNPPTF2
94db05ae1161ab2975792e50b5e89bcac041bcda
[ "MIT" ]
4
2020-04-09T19:31:21.000Z
2020-10-15T11:50:54.000Z
import tensorflow as tf class HorizontalConv2DTranspose(tf.keras.layers.Conv2DTranspose): def __init__(self, filters, kernel_size, **kwargs): super(HorizontalConv2DTranspose, self).__init__( filters, kernel_size // 2 + 1, output_padding=1, **kwargs ) self.crop = tf.keras.layers...
31.411765
69
0.644195
81fba4cb952d1ea3420d0e0e2ce5175bd7d4ff7d
5,231
py
Python
kyu_4/most_frequently_used_words/test_top_3_words.py
ikostan/codewars
69f0ae66e849df102d921cfad3ce2e74bdeda1fc
[ "Unlicense" ]
1
2022-02-12T05:56:04.000Z
2022-02-12T05:56:04.000Z
kyu_4/most_frequently_used_words/test_top_3_words.py
iKostanOrg/codewars
69f0ae66e849df102d921cfad3ce2e74bdeda1fc
[ "Unlicense" ]
182
2020-04-30T00:51:36.000Z
2021-09-07T04:15:05.000Z
kyu_4/most_frequently_used_words/test_top_3_words.py
iKostanOrg/codewars
69f0ae66e849df102d921cfad3ce2e74bdeda1fc
[ "Unlicense" ]
4
2020-04-29T22:04:20.000Z
2021-07-13T20:04:14.000Z
# Created by Egor Kostan. # GitHub: https://github.com/ikostan # LinkedIn: https://www.linkedin.com/in/egor-kostan/ # ALGORITHMS STRINGS PARSING RANKING FILTERING import allure import unittest from utils.log_func import print_log from kyu_4.most_frequently_used_words.solution import top_3_words @allure.epic('4 k...
53.927835
92
0.575033
888cea6597cae2865a8318369db1d468c7ff9469
365
py
Python
noisy_image/gen_noise.py
simonfong6/micro-projects
5be195ea72ce117df6da041446f11c18e102b5df
[ "MIT" ]
null
null
null
noisy_image/gen_noise.py
simonfong6/micro-projects
5be195ea72ce117df6da041446f11c18e102b5df
[ "MIT" ]
null
null
null
noisy_image/gen_noise.py
simonfong6/micro-projects
5be195ea72ce117df6da041446f11c18e102b5df
[ "MIT" ]
null
null
null
import cv2 from random import randint from time import sleep from sys import argv image = cv2.imread('noise.png') max_y, max_x, channels= image.shape print(image.shape) NOISE_POINTS = int(argv[1]) for i in range(NOISE_POINTS): temp = image[:,-1,:] image[:,1:,:] = image[:,:-1,:] image[:,0,:] = temp cv...
19.210526
35
0.652055
78c168c0437de7eeaf14eac2f371b89b337cab6c
1,942
py
Python
backend/paperchase/helpers/favicon.py
dedalusj/PaperChase
728cd2f742275b12223d91613275358fb4a92feb
[ "MIT" ]
3
2015-02-13T02:42:39.000Z
2016-11-22T08:03:45.000Z
backend/paperchase/helpers/favicon.py
dedalusj/PaperChase
728cd2f742275b12223d91613275358fb4a92feb
[ "MIT" ]
null
null
null
backend/paperchase/helpers/favicon.py
dedalusj/PaperChase
728cd2f742275b12223d91613275358fb4a92feb
[ "MIT" ]
1
2020-10-10T08:35:16.000Z
2020-10-10T08:35:16.000Z
import re import requests from urlparse import urlparse, urljoin from bs4 import BeautifulSoup class FaviconFetcher(): def _htc(self, m): return chr(int(m.group(1), 16)) def _url_decode(self, url): rex = re.compile('%([0-9a-hA-H][0-9a-hA-H])', re.M) return rex.sub(self._htc, url) ...
32.366667
73
0.587024
069830b05a702813aca1dcf9dd7e4a53367c93c1
4,211
py
Python
continous_system (copy)/ContSurv/VideoProcess/process.py
sekharkaredla/ASAGS
142173fc23bd42dcfdf74cf3850db445864f906a
[ "MIT" ]
10
2018-08-02T09:31:19.000Z
2022-01-27T19:46:30.000Z
continous_system/ContSurv/VideoProcess/process.py
cir7/ASAGS
142173fc23bd42dcfdf74cf3850db445864f906a
[ "MIT" ]
3
2019-02-08T17:49:54.000Z
2019-10-31T14:11:58.000Z
continous_system/ContSurv/VideoProcess/process.py
cir7/ASAGS
142173fc23bd42dcfdf74cf3850db445864f906a
[ "MIT" ]
12
2018-04-08T07:48:59.000Z
2021-12-10T16:44:22.000Z
import numpy import cv2 import sys import time class PreProcess: def __init__(self): #constants---------------- self.FRAME_RATE = 25 #25 frames per second self.MOVEMENT_INTERVAL = 3 #difference between considered frames self.N = 4 #number of vertical blocks per frame self.M ...
32.898438
120
0.597008
901143c167e304f6e1ea75ae87668c56545e8be5
39,600
py
Python
kay/lib/babel/dates.py
Letractively/kay-framework
a4cfabe3497e13c3785e5ec381b9cff11a378df3
[ "Apache-2.0", "BSD-3-Clause" ]
1
2015-11-05T08:30:09.000Z
2015-11-05T08:30:09.000Z
kay/lib/babel/dates.py
ianlewis/kay
1bf28487dc2a273eaa44d442aec8baa6453240b7
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
kay/lib/babel/dates.py
ianlewis/kay
1bf28487dc2a273eaa44d442aec8baa6453240b7
[ "Apache-2.0", "BSD-3-Clause" ]
1
2016-05-23T16:30:15.000Z
2016-05-23T16:30:15.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2007 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software consists of v...
37.5
81
0.599545