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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8222bc0e8ade8fa124793fb825010c9834ffa667 | 3,833 | py | Python | tests/conftest.py | marqov/procrastinate | 0d8ccd1af89f44804b155e395c72892d5d7be052 | [
"MIT"
] | null | null | null | tests/conftest.py | marqov/procrastinate | 0d8ccd1af89f44804b155e395c72892d5d7be052 | [
"MIT"
] | null | null | null | tests/conftest.py | marqov/procrastinate | 0d8ccd1af89f44804b155e395c72892d5d7be052 | [
"MIT"
] | null | null | null | import os
import signal as stdlib_signal
from contextlib import closing
import aiopg
import psycopg2
import pytest
from psycopg2 import sql
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
from procrastinate import aiopg_connector
from procrastinate import app as app_module
from procrastinate import jobs, m... | 26.992958 | 86 | 0.684059 |
822372b75d8fbe9ac2e0ba209d3d7cc13b9ea07d | 12,169 | py | Python | mrp_system/models.py | mgeorge8/django_time | f75a442941b0ebbb6cc46a6d18e42b91695b7e57 | [
"MIT"
] | 1 | 2018-11-09T02:09:14.000Z | 2018-11-09T02:09:14.000Z | mrp_system/models.py | mgeorge8/django_time | f75a442941b0ebbb6cc46a6d18e42b91695b7e57 | [
"MIT"
] | null | null | null | mrp_system/models.py | mgeorge8/django_time | f75a442941b0ebbb6cc46a6d18e42b91695b7e57 | [
"MIT"
] | null | null | null | from django.db import models
import datetime
#from django.contrib.sites.models import Site
#used to track different part types
#names of fields for each part type tracked with field model
def increment_engi_partnumber(partType):
#get greatest part number
last_id = Part.objects.filter(partType=partType).order... | 43 | 122 | 0.667598 |
8223f8a99d965f457dd7e252a84202f7ab0d8cc4 | 813 | py | Python | testing/tests/test_dummy.py | MaurizioBella/BotyPy | 5d6b7c4343ef42ff6a7493f2aaf565f64dad5c41 | [
"MIT"
] | null | null | null | testing/tests/test_dummy.py | MaurizioBella/BotyPy | 5d6b7c4343ef42ff6a7493f2aaf565f64dad5c41 | [
"MIT"
] | null | null | null | testing/tests/test_dummy.py | MaurizioBella/BotyPy | 5d6b7c4343ef42ff6a7493f2aaf565f64dad5c41 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import pytest
def sum(num1, num2):
"""It returns sum of two numbers"""
return num1 + num2
# make sure to start function name with test
def test_sum_v2(get_su... | 26.225806 | 87 | 0.586716 |
822467559fe51afb4c2268f4e4303f53f62ac7be | 3,096 | py | Python | Data/Dataset.py | mrluin/SANet-PyTorch | 939d60d59841adb956235df3f5d2f7f772ee9464 | [
"MIT"
] | 1 | 2021-01-09T02:37:07.000Z | 2021-01-09T02:37:07.000Z | Data/Dataset.py | mrluin/SANet-PyTorch | 939d60d59841adb956235df3f5d2f7f772ee9464 | [
"MIT"
] | null | null | null | Data/Dataset.py | mrluin/SANet-PyTorch | 939d60d59841adb956235df3f5d2f7f772ee9464 | [
"MIT"
] | null | null | null | import torch
import numpy as np
from torch.utils.data import Dataset
import torchvision.transforms.functional as TF
import torchvision.transforms as transforms
import random
import glob
import os
from PIL import Image
'''
require fix the random seeds
'''
# PotsdamDataset
rgb_means = [0.3366, 0.3599, 0.3333]
rgb_stds =... | 32.25 | 100 | 0.571382 |
8225b6ecea66183f784ac601c45274a6b620c423 | 2,044 | py | Python | autonetkit/design/ip_addressing/ipv4.py | ZhiHaoi/autonetkit | 3b46fa466c3727fea9166a068f075209af73d0c1 | [
"BSD-3-Clause"
] | 91 | 2015-01-27T17:01:21.000Z | 2021-11-10T17:30:15.000Z | autonetkit/design/ip_addressing/ipv4.py | ZhiHaoi/autonetkit | 3b46fa466c3727fea9166a068f075209af73d0c1 | [
"BSD-3-Clause"
] | 64 | 2016-03-04T19:19:31.000Z | 2021-02-25T10:25:42.000Z | autonetkit/design/ip_addressing/ipv4.py | ZhiHaoi/autonetkit | 3b46fa466c3727fea9166a068f075209af73d0c1 | [
"BSD-3-Clause"
] | 38 | 2015-01-09T14:12:39.000Z | 2022-02-18T14:22:30.000Z | import ipaddress
from collections import defaultdict
from autonetkit.design.utils import filters
from autonetkit.design.utils.general import group_by
from autonetkit.network_model.types import LAYER3_DEVICES
def assign_loopbacks(topology):
"""
@param topology:
"""
layer3_nodes = [n for n in topology... | 35.241379 | 78 | 0.691781 |
82269fb6708f7574acd1b7676f75c0b0bf2616f6 | 452 | py | Python | Lab 6/2_isSquare.py | Hubert-HD/Lab_ADA | 5720db350baef7b8b892b563b93f82df7591d301 | [
"BSD-3-Clause"
] | null | null | null | Lab 6/2_isSquare.py | Hubert-HD/Lab_ADA | 5720db350baef7b8b892b563b93f82df7591d301 | [
"BSD-3-Clause"
] | null | null | null | Lab 6/2_isSquare.py | Hubert-HD/Lab_ADA | 5720db350baef7b8b892b563b93f82df7591d301 | [
"BSD-3-Clause"
] | null | null | null | """ Ejercicio 1 """
def isSquare(num):
"""" Devuelve verdadero si el nmero es un cuadrado, caso contrario devuelve falso """
start = 1
end = num
while start <= end:
mid = int(start + (end - start) / 2)
square = mid * mid
if square == num:
return True
if square > num:
end... | 21.52381 | 89 | 0.542035 |
8227a0fccfd5feda0a55d054f2292b9052590472 | 28,548 | py | Python | GRND/NCTRS.py | STRATOLOGIC/SpacePyLibrary | 89fc3873c6d787ad4e391f6080d9dd3218ffc4a2 | [
"MIT"
] | 22 | 2015-01-22T13:40:22.000Z | 2022-02-19T02:03:12.000Z | GRND/NCTRS.py | STRATOLOGIC/SpacePyLibrary | 89fc3873c6d787ad4e391f6080d9dd3218ffc4a2 | [
"MIT"
] | 3 | 2018-09-28T13:14:40.000Z | 2022-02-08T14:19:13.000Z | GRND/NCTRS.py | STRATOLOGIC/SpacePyLibrary | 89fc3873c6d787ad4e391f6080d9dd3218ffc4a2 | [
"MIT"
] | 11 | 2016-06-01T11:53:56.000Z | 2022-02-08T14:19:34.000Z | #******************************************************************************
# (C) 2018, Stefan Korner, Austria *
# *
# The Space Python Library is free software; you can redistribute it and/or *
... | 46.045161 | 124 | 0.594122 |
822902858ffd7f29df3c979fb531114936d3a5ed | 873 | py | Python | variants/migrations/0047_auto_20190701_1625.py | brand-fabian/varfish-server | 6a084d891d676ff29355e72a29d4f7b207220283 | [
"MIT"
] | 14 | 2019-09-30T12:44:17.000Z | 2022-02-04T14:45:16.000Z | variants/migrations/0047_auto_20190701_1625.py | brand-fabian/varfish-server | 6a084d891d676ff29355e72a29d4f7b207220283 | [
"MIT"
] | 244 | 2021-03-26T15:13:15.000Z | 2022-03-31T15:48:04.000Z | variants/migrations/0047_auto_20190701_1625.py | brand-fabian/varfish-server | 6a084d891d676ff29355e72a29d4f7b207220283 | [
"MIT"
] | 8 | 2020-05-19T21:55:13.000Z | 2022-03-31T07:02:58.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.21 on 2019-07-01 16:25
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
| 31.178571 | 79 | 0.627721 |
8229fc1fcd1d5b6d4145d158e559c8c973d44a9f | 117 | py | Python | team_9/cocos/utest/pyglet_mockup1/pyglet/resource/__init__.py | Donnyvdm/dojo19 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | [
"BSD-3-Clause"
] | 1 | 2019-09-15T18:59:49.000Z | 2019-09-15T18:59:49.000Z | team_9/cocos/utest/pyglet_mockup1/pyglet/resource/__init__.py | Donnyvdm/dojo19 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | [
"BSD-3-Clause"
] | null | null | null | team_9/cocos/utest/pyglet_mockup1/pyglet/resource/__init__.py | Donnyvdm/dojo19 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division, print_function, unicode_literals
path = []
| 14.625 | 65 | 0.735043 |
822a79246dfc3e44ddd91108351f70ee4ce4de9c | 6,998 | py | Python | runintervals/src/runintervals/app.py | rachelkelly/intervals | e35c602435de306ab2989f83d825a5141abe5822 | [
"MIT"
] | null | null | null | runintervals/src/runintervals/app.py | rachelkelly/intervals | e35c602435de306ab2989f83d825a5141abe5822 | [
"MIT"
] | null | null | null | runintervals/src/runintervals/app.py | rachelkelly/intervals | e35c602435de306ab2989f83d825a5141abe5822 | [
"MIT"
] | null | null | null | """
Run Intervals. Takes 3 values from user, counts down intervals.
wanted: Data class that holds state
"""
from datetime import timedelta
import time
import toga
from toga.style import Pack
from toga.style.pack import COLUMN, ROW
| 30.294372 | 130 | 0.581452 |
822c72e425c80a8513aad2b853755773aceddea5 | 6,453 | py | Python | docker/predictor/models/neural_network.py | MaximAdler/Cryptocurrency-Price-Prediction | f245cafe5080ff031dbe7a01a2cd8c5b790f689c | [
"MIT"
] | 2 | 2018-05-08T12:45:27.000Z | 2018-05-08T12:45:32.000Z | docker/predictor/models/neural_network.py | MaximAdler/Cryptocurrency-Price-Prediction | f245cafe5080ff031dbe7a01a2cd8c5b790f689c | [
"MIT"
] | 5 | 2019-07-30T11:18:51.000Z | 2022-02-09T23:45:26.000Z | docker/predictor/models/neural_network.py | MaximAdler/Cryptocurrency-Price-Prediction | f245cafe5080ff031dbe7a01a2cd8c5b790f689c | [
"MIT"
] | 1 | 2020-01-07T05:18:14.000Z | 2020-01-07T05:18:14.000Z | import pandas as pd
import matplotlib.pyplot as plt
import keras
from keras.models import Sequential
from keras.layers import Activation, Dense
from keras.layers import LSTM
from keras.layers import Dropout
from utils import helpers
from utils import constants as const
| 42.453947 | 143 | 0.596002 |
822db83806b67333621f43a0da86fd01683347d9 | 658 | py | Python | course_selection/migrations/0021_auto_20150905_0817.py | PrincetonUSG/ReCal | a65782602b1a6d8932ff4cca1526cb9a3addacf6 | [
"MIT"
] | 13 | 2017-01-27T18:07:04.000Z | 2022-02-11T19:32:29.000Z | course_selection/migrations/0021_auto_20150905_0817.py | kl29/recal | 1464d5922f3a1fcc0d756565a3a0e8689e9e154d | [
"MIT"
] | 14 | 2017-01-08T22:28:49.000Z | 2020-02-05T03:08:08.000Z | course_selection/migrations/0021_auto_20150905_0817.py | kl29/recal | 1464d5922f3a1fcc0d756565a3a0e8689e9e154d | [
"MIT"
] | 5 | 2017-12-07T17:41:35.000Z | 2020-04-27T18:24:52.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
| 26.32 | 143 | 0.592705 |
822e782f16bc428e61261ae8e8000a61fb92b939 | 1,972 | py | Python | utils.py | floschne/TERAN | 60a3644530ac3f28c89265a46d14e0c5fcf0da3d | [
"Apache-2.0"
] | null | null | null | utils.py | floschne/TERAN | 60a3644530ac3f28c89265a46d14e0c5fcf0da3d | [
"Apache-2.0"
] | null | null | null | utils.py | floschne/TERAN | 60a3644530ac3f28c89265a46d14e0c5fcf0da3d | [
"Apache-2.0"
] | 1 | 2020-12-20T20:15:29.000Z | 2020-12-20T20:15:29.000Z | from collections import OrderedDict
import numpy
from models.teran import TERAN
| 24.962025 | 75 | 0.564909 |
822fb9cc31bd7348cd34bf3de00f4ec07e26322e | 3,329 | py | Python | mantrap/utility/shaping.py | simon-schaefer/mantrap | 9a2b3f32a0005cc0cb79bb78924f09da5a94587d | [
"MIT"
] | 7 | 2020-05-11T18:13:27.000Z | 2022-03-09T02:52:48.000Z | mantrap/utility/shaping.py | StanfordASL/mantrap | 9a2b3f32a0005cc0cb79bb78924f09da5a94587d | [
"MIT"
] | null | null | null | mantrap/utility/shaping.py | StanfordASL/mantrap | 9a2b3f32a0005cc0cb79bb78924f09da5a94587d | [
"MIT"
] | 3 | 2020-12-09T00:03:26.000Z | 2022-03-03T10:39:03.000Z | import torch
| 30.541284 | 116 | 0.621808 |
82312520f76b0d8b36b7851b461ac612b47c0508 | 1,796 | py | Python | cookbooks/imagery/files/default/za_ngi_50k_prepare_vrt.py | pnorman/chef | ca266d181b37d2e2c3180e07a6ba801060a8ec1f | [
"Apache-2.0"
] | 91 | 2015-02-16T16:26:14.000Z | 2022-03-25T01:29:10.000Z | cookbooks/imagery/files/default/za_ngi_50k_prepare_vrt.py | pnorman/chef | ca266d181b37d2e2c3180e07a6ba801060a8ec1f | [
"Apache-2.0"
] | 239 | 2015-01-07T14:04:15.000Z | 2022-02-25T00:42:41.000Z | cookbooks/imagery/files/default/za_ngi_50k_prepare_vrt.py | pnorman/chef | ca266d181b37d2e2c3180e07a6ba801060a8ec1f | [
"Apache-2.0"
] | 80 | 2015-02-05T19:25:54.000Z | 2022-02-19T12:21:14.000Z | #!/usr/bin/env python
# The MIT License (MIT)
# Copyright (c) 2016 Adrian Frith (htonl)
# 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 righ... | 54.424242 | 462 | 0.727171 |
8232742150f7a12ea5530acd49f868c4446e4095 | 737 | py | Python | solutions/day_1/dayone.py | tylerkkp/adventofcode2020 | da5dcfb0ec1cc1bc0491c72596d2c3e5ea5ddbcd | [
"MIT"
] | null | null | null | solutions/day_1/dayone.py | tylerkkp/adventofcode2020 | da5dcfb0ec1cc1bc0491c72596d2c3e5ea5ddbcd | [
"MIT"
] | null | null | null | solutions/day_1/dayone.py | tylerkkp/adventofcode2020 | da5dcfb0ec1cc1bc0491c72596d2c3e5ea5ddbcd | [
"MIT"
] | null | null | null | # Advent of Code
# Day 1 Problem 1
import pandas as pd
nums = pd.read_csv('adventofcode2020_day1.csv')
numlist = nums.values.tolist()
flatList = [item for elem in numlist for item in elem]
for i in range(len(flatList)):
testnum = int(flatList[i])
neednum = 2020 - testnum
if neednum in flatList:
... | 20.472222 | 54 | 0.613297 |
8232e2ba7c239fb84fa8ac9f936ac3905c320bde | 151 | py | Python | adv_cache_tag/tests/__init__.py | pgcd/django-adv-cache-tag | 59671cc94160ba311833affc0619590275e49829 | [
"MIT"
] | 29 | 2015-01-27T13:04:26.000Z | 2022-03-30T18:11:20.000Z | adv_cache_tag/tests/__init__.py | pgcd/django-adv-cache-tag | 59671cc94160ba311833affc0619590275e49829 | [
"MIT"
] | 8 | 2015-09-10T10:29:52.000Z | 2022-03-30T17:33:05.000Z | adv_cache_tag/tests/__init__.py | pgcd/django-adv-cache-tag | 59671cc94160ba311833affc0619590275e49829 | [
"MIT"
] | 6 | 2015-03-10T19:46:19.000Z | 2021-02-12T07:02:24.000Z | from django import VERSION
if VERSION < (1, 6):
# Before django 1.6, Django was not able to find tests in tests/tests.py
from .tests import *
| 25.166667 | 76 | 0.688742 |
8233226df298c295da681cf34886ffe019630535 | 753 | py | Python | motion_analysis/gui/widgets/__init__.py | gemlongman/motion_preprocessing_tool | 0d46fc41ff951e7cc4788d1d9355b0346a9df306 | [
"MIT"
] | null | null | null | motion_analysis/gui/widgets/__init__.py | gemlongman/motion_preprocessing_tool | 0d46fc41ff951e7cc4788d1d9355b0346a9df306 | [
"MIT"
] | null | null | null | motion_analysis/gui/widgets/__init__.py | gemlongman/motion_preprocessing_tool | 0d46fc41ff951e7cc4788d1d9355b0346a9df306 | [
"MIT"
] | null | null | null |
from .animation_editor_widget import AnimationEditorWidget
from .animation_player_widget import AnimationPlayerWidget
from .blend_animation_controller_widget import BlendAnimationControllerWidget
from .character_widget import CharacterWidget
from .figure_controller_widget import FigureControllerWidget
from .group_anim... | 53.785714 | 79 | 0.918991 |
8233e77c449f33aa14324409d82a1ef9635d9309 | 1,169 | py | Python | sync.py | delanym/kala | b4e760d4def03198aacf182d279c5c97ddb04a01 | [
"BSD-3-Clause"
] | null | null | null | sync.py | delanym/kala | b4e760d4def03198aacf182d279c5c97ddb04a01 | [
"BSD-3-Clause"
] | null | null | null | sync.py | delanym/kala | b4e760d4def03198aacf182d279c5c97ddb04a01 | [
"BSD-3-Clause"
] | null | null | null |
# When does the synodic new moon come back to the same nakshatra. How many revolutions?
# By how many degrees does the new moon travel each synodic month? A: 29,105216732 degrees
# So in 12,368916655 months the new moon will have returned to the same sign, but it would
# have overshot or fallen short of the same naksh... | 22.056604 | 112 | 0.666382 |
8234fc5721781919e7bf6e4d1bddfdab3b0544f6 | 351 | py | Python | openbook_circles/validators.py | TamaraAbells/okuna-api | f87d8e80d2f182c01dbce68155ded0078ee707e4 | [
"MIT"
] | 164 | 2019-07-29T17:59:06.000Z | 2022-03-19T21:36:01.000Z | openbook_circles/validators.py | TamaraAbells/okuna-api | f87d8e80d2f182c01dbce68155ded0078ee707e4 | [
"MIT"
] | 188 | 2019-03-16T09:53:25.000Z | 2019-07-25T14:57:24.000Z | openbook_circles/validators.py | TamaraAbells/okuna-api | f87d8e80d2f182c01dbce68155ded0078ee707e4 | [
"MIT"
] | 80 | 2019-08-03T17:49:08.000Z | 2022-02-28T16:56:33.000Z | from rest_framework.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from openbook_circles.models import Circle
| 25.071429 | 55 | 0.720798 |
82375c0aea9e29d0883a083fde9e2658a9cd5fee | 203 | py | Python | Python/Numpy/002_Shape_and_Reshape.py | o-silva-1/HackerRank | be5241c1439e7ed54fe4a1847984a9ac79c6e2a9 | [
"MIT"
] | null | null | null | Python/Numpy/002_Shape_and_Reshape.py | o-silva-1/HackerRank | be5241c1439e7ed54fe4a1847984a9ac79c6e2a9 | [
"MIT"
] | null | null | null | Python/Numpy/002_Shape_and_Reshape.py | o-silva-1/HackerRank | be5241c1439e7ed54fe4a1847984a9ac79c6e2a9 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/np-shape-reshape/problem?h_r=next-challenge&h_v=zen
import numpy as np
arr = input().split(' ')
np_arr = np.array(arr, int)
np_arr.shape = (3, 3)
print(np_arr)
| 20.3 | 91 | 0.714286 |
8238b75b795c5c045c26d3856a893f7dbb885fc3 | 1,840 | py | Python | dbus-sma/bms_test.py | madsci1016/SMAVenusDriver | 726617151e3ad4769d65add8478f67e849c31443 | [
"MIT"
] | 7 | 2020-09-28T04:58:28.000Z | 2022-02-21T21:36:08.000Z | dbus-sma/bms_test.py | jaedog/SMAVenusDriver | 0d0f1ad3d2d6ad7032319b950687ed55acf6739c | [
"MIT"
] | null | null | null | dbus-sma/bms_test.py | jaedog/SMAVenusDriver | 0d0f1ad3d2d6ad7032319b950687ed55acf6739c | [
"MIT"
] | 3 | 2020-11-08T20:10:49.000Z | 2021-03-02T19:28:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
from bms_state_machine import BMSChargeStateMachine, BMSChargeModel, BMSChargeController
# 48V 16S LiFePO4 Battery
# Absorption: 58V (56.4 for longer life)
# Float: 54.4V
# Restart bulk voltage: Float-0.8 (max of 54V)
# Inverter Cut-off: 42.8V-48V (depending ... | 27.462687 | 153 | 0.676087 |
82396ad1bce1bce550d880cfd9ecc8e52152c15b | 3,435 | py | Python | geometry/eolearn/tests/test_morphology.py | dreampedia20/eo-learn | f4994a1d6e910ba5d6ad877726ac2367048a44a1 | [
"MIT"
] | 1 | 2019-04-08T02:26:40.000Z | 2019-04-08T02:26:40.000Z | geometry/eolearn/tests/test_morphology.py | dreampedia20/eo-learn | f4994a1d6e910ba5d6ad877726ac2367048a44a1 | [
"MIT"
] | 1 | 2019-11-27T09:44:40.000Z | 2019-11-27T09:44:40.000Z | geometry/eolearn/tests/test_morphology.py | dreampedia20/eo-learn | f4994a1d6e910ba5d6ad877726ac2367048a44a1 | [
"MIT"
] | 1 | 2019-01-30T09:08:23.000Z | 2019-01-30T09:08:23.000Z | """
Credits:
Copyright (c) 2017-2019 Matej Aleksandrov, Matej Bati, Andrej Burja, Eva Erzin (Sinergise)
Copyright (c) 2017-2019 Grega Milinski, Matic Lubej, Devis Peresutti, Jernej Puc, Tomislav Slijepevi (Sinergise)
Copyright (c) 2017-2019 Bla Sovdat, Jovan Vinji, Ane Zupanc, Lojze ust (Sinergise)
This source code is... | 41.890244 | 115 | 0.629112 |
8239956959c3ea13364b90ca9313ed95631c07f4 | 2,729 | py | Python | ECUSimulation/components/base/message/abst_bus_message.py | arturmrowca/IVNS | 8915142d16debe4af780a9eb6859e44dea2ca7e6 | [
"MIT"
] | 8 | 2016-03-02T11:47:16.000Z | 2021-11-05T07:49:25.000Z | ECUSimulation/components/base/message/abst_bus_message.py | arturmrowca/IVNS | 8915142d16debe4af780a9eb6859e44dea2ca7e6 | [
"MIT"
] | 1 | 2019-03-19T14:23:52.000Z | 2019-03-25T14:24:45.000Z | ECUSimulation/components/base/message/abst_bus_message.py | PhilippMundhenk/IVNS | b2e395611e9b5111aeda7ab128f3486354bbbf0d | [
"MIT"
] | 5 | 2016-02-11T10:12:27.000Z | 2020-10-09T02:27:41.000Z | from components.base.automotive_component import AutomotiveComponent
import uuid
| 29.663043 | 97 | 0.519604 |
823b8414a5ebce717cbda2f3afcb3d67b380e0ab | 182 | py | Python | mundo 1/029.py | thiagofreitascarneiro/Curso-de-Python---Curso-em-Video | 0342e482780b5a1c6f78cddd51d9bfad785c79fa | [
"MIT"
] | 1 | 2021-08-04T13:21:22.000Z | 2021-08-04T13:21:22.000Z | mundo 1/029.py | thiagofreitascarneiro/Curso-de-Python---Curso-em-Video | 0342e482780b5a1c6f78cddd51d9bfad785c79fa | [
"MIT"
] | null | null | null | mundo 1/029.py | thiagofreitascarneiro/Curso-de-Python---Curso-em-Video | 0342e482780b5a1c6f78cddd51d9bfad785c79fa | [
"MIT"
] | null | null | null | vel = int(input('digite a velocidade do carro:'))
multa = (vel - 80)*7
if vel>80:
print(f'MULTADO! voc excedeu o limite permitido que 80Km/h e vai pagar uma multa de {multa}')
| 26 | 97 | 0.692308 |
823ba2b7444f6b352c9e118a02c9be2cc0bd039f | 180 | py | Python | utils/errors.py | DiNitride/gafbot | fdf0b8c89f3ac0b23681ce656ca08a3e8f26071d | [
"MIT"
] | 51 | 2016-10-05T18:05:17.000Z | 2017-10-01T10:41:43.000Z | utils/errors.py | DiNitride/gafbot | fdf0b8c89f3ac0b23681ce656ca08a3e8f26071d | [
"MIT"
] | 6 | 2017-05-19T22:32:39.000Z | 2018-10-14T18:12:12.000Z | utils/errors.py | DiNitride/gafbot | fdf0b8c89f3ac0b23681ce656ca08a3e8f26071d | [
"MIT"
] | 9 | 2016-10-08T07:11:47.000Z | 2019-11-04T03:30:24.000Z | import discord
from discord.ext import commands
| 18 | 58 | 0.722222 |
823bc2df3d91d13afbcb72cf566da82d66ed2865 | 2,004 | py | Python | Tests/Methods/Simulation/test_Electrical.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 2 | 2020-08-28T14:54:55.000Z | 2021-03-13T19:34:45.000Z | Tests/Methods/Simulation/test_Electrical.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | null | null | null | Tests/Methods/Simulation/test_Electrical.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
from numpy import pi
from os.path import join
from pyleecan.Classes.LamSlotWind import LamSlotWind
from pyleecan.Classes.SlotW11 import SlotW11
from pyleecan.Classes.WindingDW1L import WindingDW1L
from pyleecan.Classes.CondType12 import CondType12
from pyleecan.Functions.load impo... | 35.785714 | 93 | 0.692116 |
823c3cf1bd3fb5282d32ba86288665b6f124aa05 | 2,069 | py | Python | gym_frozen_lake/learner.py | bemova/Q_reinforcement_learning | 289ab4f56c2e6707d9869936225f9704a37686e9 | [
"MIT"
] | 1 | 2018-05-03T02:42:09.000Z | 2018-05-03T02:42:09.000Z | gym_frozen_lake/learner.py | bemova/Q_reinforcement_learning | 289ab4f56c2e6707d9869936225f9704a37686e9 | [
"MIT"
] | null | null | null | gym_frozen_lake/learner.py | bemova/Q_reinforcement_learning | 289ab4f56c2e6707d9869936225f9704a37686e9 | [
"MIT"
] | null | null | null | import numpy as np
| 35.672414 | 116 | 0.603673 |
823e899aecf5881c99e791fd7099ceb1404c2f55 | 418 | py | Python | tests/test_api.py | pinntech/pinn-python | d7d3f2d2a4cdc3eb01ae85a117c0e3d8bc1732bd | [
"MIT"
] | 2 | 2019-03-29T17:36:44.000Z | 2021-11-20T00:05:04.000Z | tests/test_api.py | pinntech/pinn-python | d7d3f2d2a4cdc3eb01ae85a117c0e3d8bc1732bd | [
"MIT"
] | 4 | 2020-03-24T16:52:29.000Z | 2021-06-01T23:36:18.000Z | tests/test_api.py | pinntech/pinn-python | d7d3f2d2a4cdc3eb01ae85a117c0e3d8bc1732bd | [
"MIT"
] | 1 | 2021-11-20T00:05:07.000Z | 2021-11-20T00:05:07.000Z | """
:copyright: (c) 2019 Pinn Technologies, Inc.
:license: MIT
"""
| 16.076923 | 44 | 0.645933 |
823f981dae40e6a5d3229238d634439ab34bee76 | 72 | py | Python | brief/__init__.py | madre/PersonalWeb | 27d88a3c6c4f86028887b0455b60eceeeb663e25 | [
"Apache-2.0"
] | null | null | null | brief/__init__.py | madre/PersonalWeb | 27d88a3c6c4f86028887b0455b60eceeeb663e25 | [
"Apache-2.0"
] | null | null | null | brief/__init__.py | madre/PersonalWeb | 27d88a3c6c4f86028887b0455b60eceeeb663e25 | [
"Apache-2.0"
] | null | null | null | #coding=utf-8
"""
__create_time__ = '13-10-29'
__author__ = 'Madre'
"""
| 12 | 28 | 0.638889 |
823f9b13c3264d0462236aea283c12aa66c45463 | 74 | py | Python | dtreeviz/__init__.py | alitrack/dtreeviz | f5d3bcc25ebe87f00cdcb2defb203947283cd08d | [
"MIT"
] | 1,905 | 2018-09-29T20:41:19.000Z | 2022-03-28T07:45:07.000Z | dtreeviz/__init__.py | alitrack/dtreeviz | f5d3bcc25ebe87f00cdcb2defb203947283cd08d | [
"MIT"
] | 163 | 2018-09-29T15:57:07.000Z | 2022-03-30T16:43:05.000Z | dtreeviz/__init__.py | alitrack/dtreeviz | f5d3bcc25ebe87f00cdcb2defb203947283cd08d | [
"MIT"
] | 257 | 2018-09-30T21:49:45.000Z | 2022-03-23T11:41:56.000Z | from .version import __version__
from dtreeviz.classifiers import clfviz
| 18.5 | 39 | 0.851351 |
824098980dfc8c8bfc2f9dcb7018c7e3d07b7613 | 5,279 | py | Python | frites/conn/conn_sliding_windows.py | StanSStanman/frites | 53f4745979dc2e7b27145cd63eab6a82fe893ec7 | [
"BSD-3-Clause"
] | null | null | null | frites/conn/conn_sliding_windows.py | StanSStanman/frites | 53f4745979dc2e7b27145cd63eab6a82fe893ec7 | [
"BSD-3-Clause"
] | null | null | null | frites/conn/conn_sliding_windows.py | StanSStanman/frites | 53f4745979dc2e7b27145cd63eab6a82fe893ec7 | [
"BSD-3-Clause"
] | null | null | null | """Sliding windows for connectivity functions."""
from frites.io import set_log_level, logger
import numpy as np
def define_windows(times, windows=None, slwin_len=None, slwin_start=None,
slwin_stop=None, slwin_step=None, verbose=None):
"""Define temporal windows.
This function can be used... | 38.253623 | 79 | 0.613942 |
8241b48830c196c948bddcafa32803303e0b8203 | 541 | py | Python | solutions/347.top-k-frequent-elements/top-k-frequent-elements.py | wangsongiam/leetcode | 96ff21bca1871816ae51fccb1fa13587b378dc50 | [
"MIT"
] | 3 | 2018-11-25T15:19:57.000Z | 2019-09-28T03:01:11.000Z | solutions/347.top-k-frequent-elements/top-k-frequent-elements.py | casprwang/leetcode | 96ff21bca1871816ae51fccb1fa13587b378dc50 | [
"MIT"
] | null | null | null | solutions/347.top-k-frequent-elements/top-k-frequent-elements.py | casprwang/leetcode | 96ff21bca1871816ae51fccb1fa13587b378dc50 | [
"MIT"
] | 3 | 2018-02-11T20:23:44.000Z | 2020-06-05T15:39:56.000Z | import heapq
| 18.655172 | 55 | 0.401109 |
824307aac6164f932c19d3f6806e3b9d03687668 | 2,039 | py | Python | squirrelfriends/utils/storage.py | jacobyxu/squirrel-and-friends | 9fbd41953dd3b388fafa0fa963dfe6e59afef162 | [
"MIT"
] | 2 | 2020-08-09T15:13:44.000Z | 2020-09-04T21:44:23.000Z | squirrelfriends/utils/storage.py | JacobXPX/squirrel-and-friends | 9fbd41953dd3b388fafa0fa963dfe6e59afef162 | [
"MIT"
] | 1 | 2021-11-10T19:43:40.000Z | 2021-11-10T19:43:40.000Z | squirrelfriends/utils/storage.py | JacobXPX/squirrel-and-friends | 9fbd41953dd3b388fafa0fa963dfe6e59afef162 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import logging
def num2size(num, suffix="B"):
"""Convert byte num to formated size string.
"""
for unit in ["", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei", "Zi"]:
if abs(num) < 1024.0:
return "%3.1f%s%s" % (num, unit, suffix)
num /= 1024.0
re... | 38.471698 | 103 | 0.559098 |
8246bef53f647ed24cdb9294f764c94f0316156b | 1,016 | py | Python | IRN/train.py | Barry-Menglong-Yao/conll2019-snopes-crawling | f803a99e27866036b92175c7d9786611ad1f389b | [
"Apache-2.0"
] | 1 | 2021-12-28T16:28:19.000Z | 2021-12-28T16:28:19.000Z | IRN/train.py | Barry-Menglong-Yao/conll2019-snopes-crawling | f803a99e27866036b92175c7d9786611ad1f389b | [
"Apache-2.0"
] | null | null | null | IRN/train.py | Barry-Menglong-Yao/conll2019-snopes-crawling | f803a99e27866036b92175c7d9786611ad1f389b | [
"Apache-2.0"
] | null | null | null | import os
import torch
import random
import numpy as np
from network.image_reconstrcution_network import ImageReconstrcutionNetwork
from trainer import ImageReconstrcutionTrainer
from util.config import Config
seed=0
init_seeds(seed=seed)
cuda_device = None
if torch.cuda.is_available():
cuda_device = 0
os.en... | 28.222222 | 132 | 0.787402 |
8246f31f0574d0ce074a17f9d3a2a986693659d8 | 4,687 | py | Python | Harvest_Actor-Critic/source/networks/utils.py | jbr-ai-labs/BAROCCO | 799341cd76be88745086289583fc95ff9a2bc72e | [
"Apache-2.0"
] | 3 | 2021-04-14T17:01:49.000Z | 2021-07-09T11:24:25.000Z | Harvest_Actor-Critic/source/networks/utils.py | jbr-ai-labs/BAROCCO | 799341cd76be88745086289583fc95ff9a2bc72e | [
"Apache-2.0"
] | null | null | null | Harvest_Actor-Critic/source/networks/utils.py | jbr-ai-labs/BAROCCO | 799341cd76be88745086289583fc95ff9a2bc72e | [
"Apache-2.0"
] | 2 | 2021-09-15T09:36:49.000Z | 2021-10-18T08:49:01.000Z | import torch
from torch import nn
from torch.autograd import Variable
from torch.distributions import Categorical
from torch.nn import functional as F
####### Network Modules
####### End network modules
| 36.333333 | 115 | 0.591636 |
412dbf281fe1cffcfa8316b9c7c8e5af4f74820e | 918 | py | Python | getproxies.py | saisyam/ebay-scraper | ede9d7fd6e2af37ad4ab618b2327c98266112c14 | [
"Apache-2.0"
] | null | null | null | getproxies.py | saisyam/ebay-scraper | ede9d7fd6e2af37ad4ab618b2327c98266112c14 | [
"Apache-2.0"
] | null | null | null | getproxies.py | saisyam/ebay-scraper | ede9d7fd6e2af37ad4ab618b2327c98266112c14 | [
"Apache-2.0"
] | null | null | null | import requests
import sys
import json
from useragent import *
from bs4 import BeautifulSoup
providers = {
'ANONYMOUS':"https://free-proxy-list.net/anonymous-proxy.html",
'US':"https://www.us-proxy.org/",
'UK':"https://free-proxy-list.net/uk-proxy.html",
'SSL': "https://sslproxies.org/"
}
if len(sys.a... | 26.228571 | 67 | 0.642702 |
412e7307ec9dcf65ea18ba353869dbba281732f1 | 806 | py | Python | tests/core/actions/list_task_statuses/test_list_task_statuses_request.py | Himon-SYNCRAFT/taskplus | 9e6293840941d0cb4fd7bac0f8ff66f8e72cc62b | [
"BSD-3-Clause"
] | null | null | null | tests/core/actions/list_task_statuses/test_list_task_statuses_request.py | Himon-SYNCRAFT/taskplus | 9e6293840941d0cb4fd7bac0f8ff66f8e72cc62b | [
"BSD-3-Clause"
] | null | null | null | tests/core/actions/list_task_statuses/test_list_task_statuses_request.py | Himon-SYNCRAFT/taskplus | 9e6293840941d0cb4fd7bac0f8ff66f8e72cc62b | [
"BSD-3-Clause"
] | null | null | null | from taskplus.core.actions import ListTaskStatusesRequest
| 26.866667 | 63 | 0.756824 |
4132ee1fc59f8a54000d697da546e3d4ff89d737 | 1,646 | py | Python | src/platform/c2rs.py | nanpuyue/nc | 1fcbdae9726b52228d1ea6de08053911abb58b12 | [
"Apache-2.0"
] | null | null | null | src/platform/c2rs.py | nanpuyue/nc | 1fcbdae9726b52228d1ea6de08053911abb58b12 | [
"Apache-2.0"
] | null | null | null | src/platform/c2rs.py | nanpuyue/nc | 1fcbdae9726b52228d1ea6de08053911abb58b12 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import os
import re
import sys
if __name__ == "__main__":
main()
| 33.591837 | 97 | 0.447145 |
4134715d2933e2de6cfdb3868bb8ea8a28c91dbd | 836 | py | Python | main.py | dusansimic/analiza-melanoma | f3566fddaa0906773b25df0c0d9a771dc8075f9f | [
"MIT"
] | null | null | null | main.py | dusansimic/analiza-melanoma | f3566fddaa0906773b25df0c0d9a771dc8075f9f | [
"MIT"
] | null | null | null | main.py | dusansimic/analiza-melanoma | f3566fddaa0906773b25df0c0d9a771dc8075f9f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import matplotlib.pyplot as plt
import numpy as np
import math
from plotting import *
from sys import argv
asymmetryDataList = []
borderDataList = []
hsvStdDevDataList = []
hsvMeansDataList = []
with open(argv[1], 'r') as csvfile:
for line in csvfile.readlines():
splitLine = line.split(',')
... | 32.153846 | 91 | 0.760766 |
4134e88b2ea7ef2e868dfdd0990314fba3bb9cb3 | 25 | py | Python | libs/__init__.py | lianwutech/datasync | cd07ac854d83b859d6bffcff85a58c44cfb7f8fb | [
"Apache-2.0"
] | 1 | 2022-03-16T14:45:35.000Z | 2022-03-16T14:45:35.000Z | libs/__init__.py | lianwutech/datasync | cd07ac854d83b859d6bffcff85a58c44cfb7f8fb | [
"Apache-2.0"
] | null | null | null | libs/__init__.py | lianwutech/datasync | cd07ac854d83b859d6bffcff85a58c44cfb7f8fb | [
"Apache-2.0"
] | null | null | null | __author__ = 'daviddeng'
| 12.5 | 24 | 0.76 |
41355a13039174c7bfbe3a8ccc6eb4f22b921f59 | 5,872 | py | Python | benchmarks/call_benchmark.py | usalko/nogil | 7a480f849f1f12a159a10bb0aa0f3431f24ce5f6 | [
"0BSD"
] | 1 | 2021-11-19T02:20:24.000Z | 2021-11-19T02:20:24.000Z | benchmarks/call_benchmark.py | usalko/nogil | 7a480f849f1f12a159a10bb0aa0f3431f24ce5f6 | [
"0BSD"
] | null | null | null | benchmarks/call_benchmark.py | usalko/nogil | 7a480f849f1f12a159a10bb0aa0f3431f24ce5f6 | [
"0BSD"
] | null | null | null | import time
# N = 1000
N = 1000000
UNROLL = 10
loop_delta = 2.0 * N * UNROLL / 1e9
benchmark() | 24.881356 | 81 | 0.484673 |
413774dd6033e7fd0d26c92f081c52116887d13c | 2,203 | py | Python | assess_quality.py | brawer/PronunBot | 97070870d0c34d14913bec4f260f9f35c796e5a0 | [
"MIT"
] | null | null | null | assess_quality.py | brawer/PronunBot | 97070870d0c34d14913bec4f260f9f35c796e5a0 | [
"MIT"
] | null | null | null | assess_quality.py | brawer/PronunBot | 97070870d0c34d14913bec4f260f9f35c796e5a0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2018 Sascha Brawer <sascha@brawer.ch>
# SPDX-License-Identifier: MIT
#
# Tool for assessing the quality of recorded pronunciations
#
# For each recorded phrase or word, this tool asks the user to assess
# (vet) the recorded pronunciations. After hearing all the available
# varia... | 30.597222 | 82 | 0.617794 |
413786f0aa048f760bd8b47076ce27fd673fefe4 | 2,555 | py | Python | src/structure.py | WhiteRobe/DBVTranslator | 3a07b384de20bd5a57b7bcb5430bf73e02086487 | [
"MIT"
] | null | null | null | src/structure.py | WhiteRobe/DBVTranslator | 3a07b384de20bd5a57b7bcb5430bf73e02086487 | [
"MIT"
] | null | null | null | src/structure.py | WhiteRobe/DBVTranslator | 3a07b384de20bd5a57b7bcb5430bf73e02086487 | [
"MIT"
] | null | null | null | import xlwt
if __name__ == "__main__":
print("Non-executable file!") | 40.555556 | 126 | 0.630137 |
413791542e1e259fecd9575d5697cc211ad492b3 | 450 | py | Python | Python_version/elips.py | RomaniukVadim/ellipsometric-calculator | 629ae5c962dacd4416a180e0904b8ddcf642371a | [
"WTFPL"
] | null | null | null | Python_version/elips.py | RomaniukVadim/ellipsometric-calculator | 629ae5c962dacd4416a180e0904b8ddcf642371a | [
"WTFPL"
] | null | null | null | Python_version/elips.py | RomaniukVadim/ellipsometric-calculator | 629ae5c962dacd4416a180e0904b8ddcf642371a | [
"WTFPL"
] | null | null | null | #!/usr/env python3
import argparse
import math
if __name__ == '__main__':
main()
| 26.470588 | 104 | 0.684444 |
413809b3dc98458b4acb094a02a9c10328344308 | 685 | py | Python | tests/aliyun_iot_test.py | tenstone/xiaoyun-smart-speaker-server | 6afcdedd1a2485269afffb425803aff71b6cbd51 | [
"MIT"
] | 1 | 2020-05-18T06:58:25.000Z | 2020-05-18T06:58:25.000Z | tests/aliyun_iot_test.py | tenstone/xiaoyun-smart-speaker-server | 6afcdedd1a2485269afffb425803aff71b6cbd51 | [
"MIT"
] | 1 | 2022-02-10T12:45:45.000Z | 2022-02-10T12:45:45.000Z | tests/aliyun_iot_test.py | tenstone/xiaoyun-smart-speaker-server | 6afcdedd1a2485269afffb425803aff71b6cbd51 | [
"MIT"
] | null | null | null | # -*- coding: utf-8-*-
import unittest
import os
os.sys.path.append(os.path.join(os.path.dirname(__file__), '../'))
from app.components import logger
from app.components.aliyun_iot import IotServer
if __name__ == '__main__':
logger.init(info=True)
unittest.main()
| 20.147059 | 66 | 0.637956 |
413a72e93c9e1b703a41720eb1ac872d1daa4812 | 56,127 | py | Python | sdk/python/pulumi_openstack/objectstorage/container_object.py | pulumi/pulumi-openstack | 945eed22a82784e9f0b3aa56168b2397c2f503e8 | [
"ECL-2.0",
"Apache-2.0"
] | 34 | 2018-09-12T12:37:51.000Z | 2022-02-04T19:32:13.000Z | sdk/python/pulumi_openstack/objectstorage/container_object.py | pulumi/pulumi-openstack | 945eed22a82784e9f0b3aa56168b2397c2f503e8 | [
"ECL-2.0",
"Apache-2.0"
] | 72 | 2018-08-15T13:04:57.000Z | 2022-03-31T15:39:49.000Z | sdk/python/pulumi_openstack/objectstorage/container_object.py | pulumi/pulumi-openstack | 945eed22a82784e9f0b3aa56168b2397c2f503e8 | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2019-03-14T08:28:49.000Z | 2021-12-29T04:23:55.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 46.271228 | 134 | 0.634561 |
413a8fad8103f9fcd01ef276382539251a1628f6 | 1,296 | py | Python | Leetcode/Python Solutions/Depth-First Search/numberofDistinctIslands.py | Mostofa-Najmus-Sakib/Applied-Algorithm | bc656fd655617407856e0ce45b68585fa81c5035 | [
"MIT"
] | 1 | 2020-01-06T02:21:56.000Z | 2020-01-06T02:21:56.000Z | Leetcode/Python Solutions/Depth-First Search/numberofDistinctIslands.py | Mostofa-Najmus-Sakib/Applied-Algorithm | bc656fd655617407856e0ce45b68585fa81c5035 | [
"MIT"
] | null | null | null | Leetcode/Python Solutions/Depth-First Search/numberofDistinctIslands.py | Mostofa-Najmus-Sakib/Applied-Algorithm | bc656fd655617407856e0ce45b68585fa81c5035 | [
"MIT"
] | 3 | 2021-02-22T17:41:01.000Z | 2022-01-13T05:03:19.000Z | """
LeetCode Problem: 694. Number of Distinct Islands
Link: https://leetcode.com/problems/number-of-distinct-islands/
Language: Python
Written by: Mostofa Adib Shakib
Time Complexity: O(n)
Space Complexity: O(n)
X => Start
O => Out of bound or water
U => Up
L => Left
R => Right
D => Down
""" | 28.8 | 81 | 0.533179 |
413decd6b7ac0b8b57b4131955d7ec7af4d84bba | 3,201 | py | Python | eyelab/views/ui/ui_layergroup_entry.py | MedVisBonn/eyelab | 658997be88b87087e81820e26986b0fc938e5c2d | [
"MIT"
] | null | null | null | eyelab/views/ui/ui_layergroup_entry.py | MedVisBonn/eyelab | 658997be88b87087e81820e26986b0fc938e5c2d | [
"MIT"
] | null | null | null | eyelab/views/ui/ui_layergroup_entry.py | MedVisBonn/eyelab | 658997be88b87087e81820e26986b0fc938e5c2d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'ui_layergroup_entry.ui'
##
## Created by: Qt User Interface Compiler version 6.1.3
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
#######... | 38.566265 | 87 | 0.659794 |
413e5663a86c8d9a6caca85f978c49d585f6344f | 1,395 | py | Python | ScriptConverter2/scriptConverter2.py | Darkttd/Editor-fo-Kirino-Engine | cb4909e3cf47243ff53f6325e09c6da7a25970a7 | [
"MIT"
] | 2 | 2018-01-23T05:03:12.000Z | 2018-01-23T12:38:54.000Z | ScriptConverter2/scriptConverter2.py | Darkttd/Exclusive-Utility-for-Visual-Novel | cb4909e3cf47243ff53f6325e09c6da7a25970a7 | [
"MIT"
] | 1 | 2018-02-10T13:52:02.000Z | 2018-02-10T13:52:02.000Z | ScriptConverter2/scriptConverter2.py | Darkttd/Exclusive-Utility-for-Visual-Novel | cb4909e3cf47243ff53f6325e09c6da7a25970a7 | [
"MIT"
] | null | null | null | import os
import sys
import re
import openpyxl
if __name__ == "__main__":
if len(sys.argv) != 2:
print ('usage: python ' + sys.argv[0] + ' scriptName')
exit()
wb = openpyxl.load_workbook(sys.argv[1])
outputScript = None
for sheetname in wb.sheetnames:
ws = wb[sheetname]
... | 27.352941 | 90 | 0.430824 |
4140de9d37bf49db97ee18b1b93e50fb48ce366f | 7,737 | py | Python | codes/d_agents/off_policy/sac/sac_agent.py | linklab/link_rl | e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99 | [
"MIT"
] | null | null | null | codes/d_agents/off_policy/sac/sac_agent.py | linklab/link_rl | e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99 | [
"MIT"
] | null | null | null | codes/d_agents/off_policy/sac/sac_agent.py | linklab/link_rl | e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99 | [
"MIT"
] | 1 | 2021-11-23T12:30:37.000Z | 2021-11-23T12:30:37.000Z | # https://spinningup.openai.com/en/latest/algorithms/sac.html
# https://github.com/pranz24/pytorch-soft-actor-critic
# https://github.com/ku2482/soft-actor-critic.pytorch/blob/master/code/agent.py
# https://github.com/cyoon1729/Policy-Gradient-Methods/blob/master/sac/sac2019.py
# https://github.com/twni2016/Meta-SAC/bl... | 42.745856 | 131 | 0.659299 |
41412bc5381cb433028ac0a63f316ee07aece73a | 1,261 | py | Python | chap12/download_xkcd.py | asadmoosvi/automate-the-boring-stuff-solutions | 36c9fdf6706db64338e075a3367c4493bb62960f | [
"MIT"
] | null | null | null | chap12/download_xkcd.py | asadmoosvi/automate-the-boring-stuff-solutions | 36c9fdf6706db64338e075a3367c4493bb62960f | [
"MIT"
] | null | null | null | chap12/download_xkcd.py | asadmoosvi/automate-the-boring-stuff-solutions | 36c9fdf6706db64338e075a3367c4493bb62960f | [
"MIT"
] | null | null | null | import requests, os, bs4
import logging
logging.basicConfig(format='[%(levelname)s] %(message)s', level=logging.INFO)
url = 'https://xkcd.com'
os.makedirs('xkcd', exist_ok=True)
while True:
try:
limit = int(input('How many comics would you like to download? '))
break
except ValueError:
... | 25.22 | 82 | 0.61935 |
41427c19f5c17589b6ee9b04ef78b36cbeb6b0a0 | 965 | py | Python | UVa Online Judge/v2/271.py | mjenrungrot/algorithm | e0e8174eb133ba20931c2c7f5c67732e4cb2b703 | [
"MIT"
] | 1 | 2021-12-08T08:58:43.000Z | 2021-12-08T08:58:43.000Z | UVa Online Judge/v2/271.py | mjenrungrot/algorithm | e0e8174eb133ba20931c2c7f5c67732e4cb2b703 | [
"MIT"
] | null | null | null | UVa Online Judge/v2/271.py | mjenrungrot/algorithm | e0e8174eb133ba20931c2c7f5c67732e4cb2b703 | [
"MIT"
] | null | null | null | # =============================================================================
# Author: Teerapat Jenrungrot - https://github.com/mjenrungrot/
# FileName: 271.py
# Description: UVa Online Judge - 271
# =============================================================================
from collections... | 22.97619 | 79 | 0.409326 |
41427f394b3e7a0318de679494ed956a5bd82c72 | 5,240 | py | Python | setup.py | Liam-Deacon/antlr4-vba-parser | af273e6d7c4efd7660d647ad5b6e338a4ff46bd3 | [
"BSD-3-Clause"
] | 1 | 2021-07-23T19:28:59.000Z | 2021-07-23T19:28:59.000Z | setup.py | Liam-Deacon/antlr4-vba-parser | af273e6d7c4efd7660d647ad5b6e338a4ff46bd3 | [
"BSD-3-Clause"
] | null | null | null | setup.py | Liam-Deacon/antlr4-vba-parser | af273e6d7c4efd7660d647ad5b6e338a4ff46bd3 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# type: ignore
"""Setup script for package."""
import os
import sys
import configparser
import datetime
import distutils.cmd
import distutils.log
import subprocess
import glob
import shutil
from pathlib import Path
setup_kwargs = {}
from setuptools import find_packages, ... | 30.465116 | 112 | 0.644084 |
4142a722bde1ddff3f4dd78cd7f726007fba6f52 | 11,145 | py | Python | IdeaProjects/matplotDev/matplotlibDev1.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | 1 | 2018-12-30T14:07:42.000Z | 2018-12-30T14:07:42.000Z | IdeaProjects/matplotDev/matplotlibDev1.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | IdeaProjects/matplotDev/matplotlibDev1.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
#matplotlib inline
# 4.1.
#
# NumPy ndarray matplotlib Python 20NumPy ndarray
np.random.seed(1000)
y = np.random.standard_normal(20)
# pyplot plot
#
# x x
# y y
# x y
x = range(len(y))
plt.plot(x, y)
plt.show()
... | 27.518519 | 251 | 0.713863 |
4144494ee0e3b3e4000598d10e1ad2b268a018a5 | 1,361 | py | Python | tests/test_storages.py | ghuinker/django-easy-tenants | 1ff8fa34552974d88d7abda17eb8f24c84a71577 | [
"MIT"
] | 30 | 2020-03-13T18:00:38.000Z | 2022-02-24T10:25:19.000Z | tests/test_storages.py | ghuinker/django-easy-tenants | 1ff8fa34552974d88d7abda17eb8f24c84a71577 | [
"MIT"
] | 21 | 2020-04-08T21:12:13.000Z | 2022-02-10T12:55:12.000Z | tests/test_storages.py | ghuinker/django-easy-tenants | 1ff8fa34552974d88d7abda17eb8f24c84a71577 | [
"MIT"
] | 8 | 2020-04-09T14:45:46.000Z | 2021-12-07T11:53:19.000Z | from django.core.files.uploadedfile import SimpleUploadedFile
from easy_tenants import tenant_context_disabled
from easy_tenants.storage import TenantFileSystemStorage
| 36.783784 | 78 | 0.702425 |
414470a20b36382982558f1e95478f07692c39d3 | 472 | py | Python | tests/config.py | mizzy/maglica | 8bc19e7fc1bf632c9027ac80f6c3f39d8bd05f85 | [
"BSD-2-Clause"
] | 15 | 2015-02-01T17:36:18.000Z | 2021-06-10T20:51:14.000Z | tests/config.py | mizzy/maglica | 8bc19e7fc1bf632c9027ac80f6c3f39d8bd05f85 | [
"BSD-2-Clause"
] | null | null | null | tests/config.py | mizzy/maglica | 8bc19e7fc1bf632c9027ac80f6c3f39d8bd05f85 | [
"BSD-2-Clause"
] | null | null | null | # $ nosetests -v --rednose --with-coverage tests/config.py
from nose.tools import *
import maglica.config
if __name__ == "__main__":
test_config_load()
| 27.764706 | 60 | 0.690678 |
4144e079bc25114f81c5b9d3df198b460cec6a76 | 1,377 | py | Python | services/scope_external_service.py | projekt-scope/scope-admin | f8fa536f8a620b8047a34d81c9c3004b4ed0b331 | [
"MIT"
] | 2 | 2020-09-29T14:29:05.000Z | 2021-01-28T12:57:15.000Z | services/scope_external_service.py | projekt-scope/scope-admin | f8fa536f8a620b8047a34d81c9c3004b4ed0b331 | [
"MIT"
] | null | null | null | services/scope_external_service.py | projekt-scope/scope-admin | f8fa536f8a620b8047a34d81c9c3004b4ed0b331 | [
"MIT"
] | 1 | 2021-04-16T09:43:46.000Z | 2021-04-16T09:43:46.000Z | # FIXME this class is not done yet
import logging
import platform
import subprocess
LOGGER = logging.getLogger("scope-admin")
| 25.036364 | 101 | 0.622367 |
4146a11ae36e37d979012bdedf5e4d1627d1f3bf | 682 | py | Python | pipelines/h1c/idr2/v1/bad_ants/H1C_IDR2_bad_ants.py | HERA-Team/hera_pipelines | d2b46bb494dfb020093b807445fc2095d292e898 | [
"BSD-2-Clause"
] | null | null | null | pipelines/h1c/idr2/v1/bad_ants/H1C_IDR2_bad_ants.py | HERA-Team/hera_pipelines | d2b46bb494dfb020093b807445fc2095d292e898 | [
"BSD-2-Clause"
] | 9 | 2020-08-14T18:11:40.000Z | 2022-03-18T17:38:03.000Z | pipelines/h1c/idr2/v1/bad_ants/H1C_IDR2_bad_ants.py | HERA-Team/hera_pipelines | d2b46bb494dfb020093b807445fc2095d292e898 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""Script for producing bad_ants text files."""
JDs = [
2458098,
2458099,
2458101,
2458102,
2458103,
2458104,
2458105,
2458106,
2458107,
2458108,
2458109,
2458110,
2458111,
2458112,
2458113,
2458114,
2458115,
2458116,
245... | 17.487179 | 47 | 0.552786 |
41495f0ce52488a1e2cf143987377b0d9faaf6a0 | 2,464 | py | Python | Health_Care_Unit/health_main.py | Swagnick99/YouCure | 74d4da12fc402523ff3cd5c97ebca2d98b092617 | [
"MIT"
] | 7 | 2021-04-13T20:29:14.000Z | 2021-09-08T15:08:03.000Z | Health_Care_Unit/health_main.py | Swagnick99/YouCure | 74d4da12fc402523ff3cd5c97ebca2d98b092617 | [
"MIT"
] | 1 | 2021-05-17T19:15:17.000Z | 2021-05-17T19:15:17.000Z | Health_Care_Unit/health_main.py | purbayankar/YouCure | 17b0753fed346e1236dee4ad098992551de25ff1 | [
"MIT"
] | 3 | 2021-05-16T18:35:55.000Z | 2021-05-17T19:24:08.000Z | from flask import Flask, render_template, Blueprint, url_for, request, redirect
from flask_login import login_required, current_user
from . import symptomsuggestion as symp
main = Blueprint("health_main", __name__)
found_symptoms = list()
dict_symp_tup = list()
final_symp = list()
topk_index_mapping = dict()... | 32 | 119 | 0.699269 |
414bebb4ec2f87811d7e9e2ae07498f09ca0b943 | 6,596 | py | Python | DN/ioUtils.py | dendisuhubdy/dwt | 03fe206780ac6d72897ced75b38acb7c7635638c | [
"MIT"
] | 206 | 2017-05-10T08:14:30.000Z | 2022-03-28T09:38:09.000Z | DN/ioUtils.py | sunguanxiong/my_dwt | 9d642d0a1d8ab598e829b0604162da4795211e79 | [
"MIT"
] | 14 | 2017-07-29T12:35:59.000Z | 2019-12-19T02:10:15.000Z | DN/ioUtils.py | sunguanxiong/my_dwt | 9d642d0a1d8ab598e829b0604162da4795211e79 | [
"MIT"
] | 70 | 2017-05-09T03:15:58.000Z | 2021-12-17T10:33:28.000Z | import numpy as np
import skimage
import skimage.io
import scipy.io as sio
import skimage.transform
import sys
np.random.seed(0)
VGG_MEAN = [103.939, 116.779, 123.68]
| 38.573099 | 119 | 0.540024 |
414c48c6e674e2e17655442b6918903ce560a69e | 134 | py | Python | dagmc_h5m_file_inspector/__init__.py | fusion-energy/dagmc_h5m_file_inspector | 921164cf2e3e04871640cebc3422219c2bd50b74 | [
"MIT"
] | null | null | null | dagmc_h5m_file_inspector/__init__.py | fusion-energy/dagmc_h5m_file_inspector | 921164cf2e3e04871640cebc3422219c2bd50b74 | [
"MIT"
] | null | null | null | dagmc_h5m_file_inspector/__init__.py | fusion-energy/dagmc_h5m_file_inspector | 921164cf2e3e04871640cebc3422219c2bd50b74 | [
"MIT"
] | null | null | null |
from .core import get_volumes_from_h5m
from .core import get_materials_from_h5m
from .core import get_volumes_and_materials_from_h5m
| 26.8 | 52 | 0.880597 |
414c8298f30a7b847f338288476be8d8195ec872 | 6,227 | py | Python | tests/test_state.py | dexterous/celery-cloudwatch | c894dabf655860275edb1ecd7e1dfac223d78926 | [
"MIT"
] | 32 | 2015-03-29T17:00:50.000Z | 2021-01-22T23:26:59.000Z | tests/test_state.py | dexterous/celery-cloudwatch | c894dabf655860275edb1ecd7e1dfac223d78926 | [
"MIT"
] | 9 | 2015-02-15T12:45:12.000Z | 2018-03-29T14:05:39.000Z | tests/test_state.py | dexterous/celery-cloudwatch | c894dabf655860275edb1ecd7e1dfac223d78926 | [
"MIT"
] | 18 | 2015-03-29T17:00:36.000Z | 2021-12-14T14:53:44.000Z | import unittest
from celery_cloudwatch.state import State
| 43.852113 | 70 | 0.605107 |
4150929e942157f1bce17e4545425c85a0a9dfef | 16,023 | py | Python | main.py | impressive8/Practice | 6fc30fce500d97cb2091387bf2742b8e4cc4495d | [
"MIT"
] | 197 | 2018-04-08T01:37:29.000Z | 2022-03-25T07:17:18.000Z | main.py | impressive8/Practice | 6fc30fce500d97cb2091387bf2742b8e4cc4495d | [
"MIT"
] | 2 | 2020-02-01T17:42:41.000Z | 2021-06-09T10:38:49.000Z | main.py | impressive8/Practice | 6fc30fce500d97cb2091387bf2742b8e4cc4495d | [
"MIT"
] | 80 | 2018-06-29T04:00:34.000Z | 2022-03-24T07:57:33.000Z | # ===================================
# Import the libraries
# ===================================
import numpy as np
from matplotlib import pylab as plt
import imaging
import utility
import os,sys
# ===================================
# Which stages to run
# ===================================
do_add_noise = False
d... | 35.215385 | 135 | 0.576421 |
4150a5e0f2085d293f7b12df820c38652a42f8aa | 12,579 | py | Python | coldsweat/fetcher.py | jeroenh/coldsweat | 339f413ea6393c50c7b98b85a8c6fd74a4586567 | [
"MIT"
] | 106 | 2015-02-01T22:24:32.000Z | 2021-11-08T08:50:55.000Z | coldsweat/fetcher.py | jeroenh/coldsweat | 339f413ea6393c50c7b98b85a8c6fd74a4586567 | [
"MIT"
] | 47 | 2015-02-19T13:50:45.000Z | 2019-09-02T19:58:20.000Z | coldsweat/fetcher.py | jeroenh/coldsweat | 339f413ea6393c50c7b98b85a8c6fd74a4586567 | [
"MIT"
] | 23 | 2015-02-20T21:21:54.000Z | 2019-11-30T05:13:17.000Z | # -*- coding: utf-8 -*-
'''
Description: the feed fetcher
Copyright (c) 20132016 Andrea Peltrin
Portions are copyright (c) 2013 Rui Carmo
License: MIT (see LICENSE for details)
'''
import sys, os, re, time, urlparse
from datetime import datetime
from peewee import IntegrityError
import feedparser
import requests
fro... | 35.634561 | 144 | 0.565864 |
4150ac4926338fe0bae851eb3854a37415ff43d4 | 1,996 | py | Python | app/repositories/BaseRepository.py | owlvey/owlvey_sre | 2323f38bc673ce192e97634f968333d4fa956e26 | [
"Apache-2.0"
] | null | null | null | app/repositories/BaseRepository.py | owlvey/owlvey_sre | 2323f38bc673ce192e97634f968333d4fa956e26 | [
"Apache-2.0"
] | null | null | null | app/repositories/BaseRepository.py | owlvey/owlvey_sre | 2323f38bc673ce192e97634f968333d4fa956e26 | [
"Apache-2.0"
] | null | null | null | from app.components.ConfigurationComponent import ConfigurationComponent
import mysql.connector
from app.core.BaseFrame import BaseFrame
| 28.927536 | 106 | 0.54008 |
41525ac97019abeca7316f93967fbae3d019f470 | 357 | py | Python | data/type_registry/__init__.py | wax911/anime-meta | 5a707a75b277a9c0dc5b9d9447cea44a73d2f83c | [
"Apache-2.0"
] | 2 | 2021-04-08T19:55:02.000Z | 2021-04-08T19:57:07.000Z | data/type_registry/__init__.py | wax911/anime-meta | 5a707a75b277a9c0dc5b9d9447cea44a73d2f83c | [
"Apache-2.0"
] | null | null | null | data/type_registry/__init__.py | wax911/anime-meta | 5a707a75b277a9c0dc5b9d9447cea44a73d2f83c | [
"Apache-2.0"
] | null | null | null | from .type_registries import CoreEntityCodec, CacheLogEntityCodec, SigningPolicyEntityCodec, \
IndexEntityCodec, AdBreakEntityCodec, EpisodeEntityCodec, SeasonEntityCodec, SeriesEntityCodec, \
ImageContainerEntityCodec, MoviePanelEntityCodec, SearchMetaEntityCodec, SeriesPanelEntityCodec, \
ImageEntityCodec... | 71.4 | 102 | 0.857143 |
415322b657fb76b7952fd5713e8a31bf4ffebd12 | 1,687 | py | Python | lib/project.py | IASamoylov/vk-photo-downloader | 9bc1e7cd35a0882a7e9d41966cf3da6f341c583e | [
"Apache-2.0"
] | null | null | null | lib/project.py | IASamoylov/vk-photo-downloader | 9bc1e7cd35a0882a7e9d41966cf3da6f341c583e | [
"Apache-2.0"
] | null | null | null | lib/project.py | IASamoylov/vk-photo-downloader | 9bc1e7cd35a0882a7e9d41966cf3da6f341c583e | [
"Apache-2.0"
] | null | null | null | from .options import Options
from .os_wrapper import OSWrapper
from .photo_parser import PhotoParser
from .vk_api import Api as VK_api
| 33.078431 | 87 | 0.606402 |
4154bc47b02ae72fdba22c715daf34dd595edb9a | 414 | py | Python | redis-py-pubsub/publisher.py | bhavyagaur99/learn-redis-python | fabae09c1030bff7a394bbfaaa77894be36066e3 | [
"MIT"
] | null | null | null | redis-py-pubsub/publisher.py | bhavyagaur99/learn-redis-python | fabae09c1030bff7a394bbfaaa77894be36066e3 | [
"MIT"
] | null | null | null | redis-py-pubsub/publisher.py | bhavyagaur99/learn-redis-python | fabae09c1030bff7a394bbfaaa77894be36066e3 | [
"MIT"
] | null | null | null | import redis
import time
import json
redis_host = 'localhost'
redis_port = '6379'
channel = "hello-channel"
publisher = redis.Redis(host=redis_host, port=redis_port)
count = 0
while True:
count += 1
message = {
'text': 'Hello World',
'count': count
}
publisher.publish(channel, json.du... | 20.7 | 62 | 0.664251 |
4155a7014e6ae0023c1624daa0dd56f525549043 | 11,641 | py | Python | leo/modes/velocity.py | ATikhonov2/leo-editor | 225aac990a9b2804aaa9dea29574d6e072e30474 | [
"MIT"
] | 1,550 | 2015-01-14T16:30:37.000Z | 2022-03-31T08:55:58.000Z | leo/modes/velocity.py | ATikhonov2/leo-editor | 225aac990a9b2804aaa9dea29574d6e072e30474 | [
"MIT"
] | 2,009 | 2015-01-13T16:28:52.000Z | 2022-03-31T18:21:48.000Z | leo/modes/velocity.py | ATikhonov2/leo-editor | 225aac990a9b2804aaa9dea29574d6e072e30474 | [
"MIT"
] | 200 | 2015-01-05T15:07:41.000Z | 2022-03-07T17:05:01.000Z | # Leo colorizer control file for velocity mode.
# This file is in the public domain.
# Properties for velocity mode.
properties = {
"commentEnd": "*#",
"commentStart": "#*",
"lineComment": "##",
}
# Attributes dict for velocity_main ruleset.
velocity_main_attributes_dict = {
"default": "nu... | 33.355301 | 110 | 0.657332 |
41569e5e017f94b8bc03473ce433df43099554cf | 286 | py | Python | phanterpwa/interface/Admin/production.py | PhanterJR/phanterpwa | 6daff40845b3a853cd08d319c4ce148f8deebed7 | [
"MIT"
] | 2 | 2019-06-06T10:37:01.000Z | 2021-10-16T03:36:28.000Z | phanterpwa/interface/Admin/production.py | PhanterJR/phanterpwa | 6daff40845b3a853cd08d319c4ce148f8deebed7 | [
"MIT"
] | null | null | null | phanterpwa/interface/Admin/production.py | PhanterJR/phanterpwa | 6daff40845b3a853cd08d319c4ce148f8deebed7 | [
"MIT"
] | null | null | null | from phanterpwa.server import PhanterPWATornado
if __name__ == "__main__":
import os
projectPath = os.path.dirname(__file__)
print(projectPath)
AppRunv = PhanterPWATornado(projectPath)
try:
AppRunv.run()
except KeyboardInterrupt:
AppRunv.stop()
| 23.833333 | 47 | 0.695804 |
4157f4c0301f0e12e4e0a205e0e93b5fc26e0b6b | 7,076 | py | Python | Trojan.Android.GM/gmbot/apps/smsg_r/smsapp/admin_extra_views.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | 2 | 2021-02-04T06:47:45.000Z | 2021-07-28T10:02:10.000Z | Trojan.Android.GM/gmbot/apps/smsg_r/smsapp/admin_extra_views.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | null | null | null | Trojan.Android.GM/gmbot/apps/smsg_r/smsapp/admin_extra_views.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | null | null | null | import logging
from bson.objectid import ObjectId
from django import forms
from django.conf import settings
from django.contrib import messages
from django.contrib.admin.views.decorators import staff_member_required
from django.shortcuts import render, redirect, get_object_or_404
from django.utils.translation import u... | 36.287179 | 110 | 0.65277 |
41581af0408d3297a083392d71b95488c3b7cf70 | 1,741 | py | Python | phasing/utils/tag_bam_post_phasing.py | ArthurDondi/cDNA_Cupcake | 528b9593b0ad166ac720be7c5c07a968730a2ce2 | [
"BSD-3-Clause-Clear"
] | 205 | 2016-07-13T06:26:20.000Z | 2022-03-03T06:29:43.000Z | phasing/utils/tag_bam_post_phasing.py | ArthurDondi/cDNA_Cupcake | 528b9593b0ad166ac720be7c5c07a968730a2ce2 | [
"BSD-3-Clause-Clear"
] | 186 | 2017-02-22T22:46:46.000Z | 2022-03-23T16:16:15.000Z | phasing/utils/tag_bam_post_phasing.py | ArthurDondi/cDNA_Cupcake | 528b9593b0ad166ac720be7c5c07a968730a2ce2 | [
"BSD-3-Clause-Clear"
] | 93 | 2016-08-31T02:24:52.000Z | 2022-02-24T14:01:27.000Z | __author__ = "etseng@pacb.com"
"""
Tagging BAM files with phasing info
"""
import pysam
from csv import DictReader
if __name__ == "__main__":
from argparse import ArgumentParser
parser = ArgumentParser("Tagging BAM files with phasing info")
parser.add_argument("read_bam", help="Aligned BAM file that be ... | 39.568182 | 142 | 0.658242 |
41581dd5a29d0d2428a3d341c3227a0c254875b8 | 271 | py | Python | join.py | florisdenhengst/pydial-benchmark-stopos | 0c2c70f327bc6ef41cfa849852ffe6300cc4f27e | [
"MIT"
] | null | null | null | join.py | florisdenhengst/pydial-benchmark-stopos | 0c2c70f327bc6ef41cfa849852ffe6300cc4f27e | [
"MIT"
] | null | null | null | join.py | florisdenhengst/pydial-benchmark-stopos | 0c2c70f327bc6ef41cfa849852ffe6300cc4f27e | [
"MIT"
] | null | null | null | import argparse
parser = argparse.ArgumentParser(description="Generate path to config file given input")
parser.add_argument('vars', nargs='+')
args = parser.parse_args()
# The last item of vars contains the random seed
result = '-'.join(args.vars[:-1])
print(result)
| 24.636364 | 88 | 0.745387 |
41586123553d61d46d68062a5a5d11a5b1b8c403 | 2,959 | py | Python | colors.py | kevinyjiang/movie-colors | 020155652f969c2650fc15fe3cfad9bc2f244953 | [
"MIT"
] | null | null | null | colors.py | kevinyjiang/movie-colors | 020155652f969c2650fc15fe3cfad9bc2f244953 | [
"MIT"
] | null | null | null | colors.py | kevinyjiang/movie-colors | 020155652f969c2650fc15fe3cfad9bc2f244953 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
import sys
import random
import argparse
import os
"""
TODO:
Progress bar
Option to name output
"""
# Average of every pixel in a frame
# Randomly samples pixels from a sliding window
# Add black vignetting at the top and bottom of an image
if __name__ == '__main__':
parser = argpars... | 26.419643 | 101 | 0.688408 |
4158da6a5412871514696eb15534b043b4cdfaa8 | 236 | py | Python | bug-dist-not-found/setup.py | maphew/scraps | 01bf3e7bb3cee0fd5691eedf787fbc134059a974 | [
"MIT"
] | null | null | null | bug-dist-not-found/setup.py | maphew/scraps | 01bf3e7bb3cee0fd5691eedf787fbc134059a974 | [
"MIT"
] | null | null | null | bug-dist-not-found/setup.py | maphew/scraps | 01bf3e7bb3cee0fd5691eedf787fbc134059a974 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name='my_project',
version='0.1.0',
packages=['my_project'],
entry_points={
'console_scripts': [
'my_project = my_project.__main__:main'
]
},
)
| 19.666667 | 52 | 0.555085 |
415d2775306905aa53977c4f7334446d25f0bc58 | 1,364 | py | Python | exante/endpoints/payloads/orders.py | denisvolokh/exante-python-api | a22b558df105eb5e4d111c825fa742774e2f039b | [
"MIT"
] | null | null | null | exante/endpoints/payloads/orders.py | denisvolokh/exante-python-api | a22b558df105eb5e4d111c825fa742774e2f039b | [
"MIT"
] | null | null | null | exante/endpoints/payloads/orders.py | denisvolokh/exante-python-api | a22b558df105eb5e4d111c825fa742774e2f039b | [
"MIT"
] | null | null | null | from exante.endpoints.payloads.basepayload import BasePayload
from exante.definitions.orders import OrderSide, OrderType, OrderDuration
| 27.836735 | 84 | 0.616569 |
415d679dfdfe1e189c25d929013580ba1234f540 | 31 | py | Python | simple_xntwist_ui/__init__.py | xn-twist/demo-ui | 00f04add3a84b4e0f4ecf4e48063a9bb737f1814 | [
"MIT"
] | null | null | null | simple_xntwist_ui/__init__.py | xn-twist/demo-ui | 00f04add3a84b4e0f4ecf4e48063a9bb737f1814 | [
"MIT"
] | null | null | null | simple_xntwist_ui/__init__.py | xn-twist/demo-ui | 00f04add3a84b4e0f4ecf4e48063a9bb737f1814 | [
"MIT"
] | null | null | null | from . import simple_xntwist_ui | 31 | 31 | 0.870968 |
415e97c85977c4b6bac492435e3ce6daa5fad11e | 2,801 | py | Python | evaluation/eval_1v1.py | KaenChan/ProbFace | 80a4de290ae583c81714bd3e3446c039a010e095 | [
"MIT"
] | 28 | 2021-02-04T13:54:51.000Z | 2022-01-24T05:53:12.000Z | evaluation/eval_1v1.py | KaenChan/ProbFace | 80a4de290ae583c81714bd3e3446c039a010e095 | [
"MIT"
] | 4 | 2021-02-05T09:14:45.000Z | 2021-04-26T13:32:03.000Z | evaluation/eval_1v1.py | KaenChan/ProbFace | 80a4de290ae583c81714bd3e3446c039a010e095 | [
"MIT"
] | 5 | 2021-02-17T03:11:27.000Z | 2021-06-27T20:10:15.000Z | import os
import sys
import imp
import argparse
import time
import math
import numpy as np
from utils import utils
from utils.imageprocessing import preprocess
from utils.dataset import Dataset
from network import Network
from evaluation.lfw import LFWTest
if __name__ == '__main__':
parser = argparse.ArgumentPa... | 38.902778 | 142 | 0.693681 |
41612b688431101d4228b6a577f3b0ee96a44628 | 618 | py | Python | mysite/personal/urls.py | salimab/library1 | 9746329837ba40fa2d9816adf19ff9d9f559bbaa | [
"MIT"
] | null | null | null | mysite/personal/urls.py | salimab/library1 | 9746329837ba40fa2d9816adf19ff9d9f559bbaa | [
"MIT"
] | null | null | null | mysite/personal/urls.py | salimab/library1 | 9746329837ba40fa2d9816adf19ff9d9f559bbaa | [
"MIT"
] | null | null | null | from django.conf.urls import url
from personal.models import Book
from . import views
from django.contrib.auth.views import login
from django.views.generic import ListView, DetailView
urlpatterns = [
url(r'^$', views.index , name='index'),
url(r'^login/$', login, {'template_name': 'personal/login.html'}),
... | 34.333333 | 87 | 0.614887 |
41619fc16893077852a588c0d3ebc29c67fdbfcc | 2,455 | py | Python | carbon/lib/carbon/log.py | ehazlett/graphite | b20573e92cb90de254505baa160210483f203be9 | [
"Apache-2.0"
] | 1 | 2015-05-21T10:23:03.000Z | 2015-05-21T10:23:03.000Z | carbon/lib/carbon/log.py | Cue/graphite | 450eeeb0eacc433bc5914c1dff2e05dbf420cf8d | [
"Apache-2.0"
] | null | null | null | carbon/lib/carbon/log.py | Cue/graphite | 450eeeb0eacc433bc5914c1dff2e05dbf420cf8d | [
"Apache-2.0"
] | null | null | null | import time
from sys import stdout, stderr
from zope.interface import implements
from twisted.python.log import startLoggingWithObserver, textFromEventDict, msg, err, ILogObserver
from twisted.python.logfile import DailyLogFile
carbonLogObserver = CarbonLogObserver()
logToDir = carbonLogObserver.log_to_dir
de... | 24.306931 | 98 | 0.701833 |
4162108fdfdbff0b3bb2869d7e15630fbf21921a | 4,854 | py | Python | view/alertview.py | firebird631/siis | 8d64e8fb67619aaa5c0a62fda9de51dedcd47796 | [
"PostgreSQL"
] | null | null | null | view/alertview.py | firebird631/siis | 8d64e8fb67619aaa5c0a62fda9de51dedcd47796 | [
"PostgreSQL"
] | null | null | null | view/alertview.py | firebird631/siis | 8d64e8fb67619aaa5c0a62fda9de51dedcd47796 | [
"PostgreSQL"
] | null | null | null | # @date 2019-06-28
# @author Frederic Scherma, All rights reserved without prejudices.
# @license Copyright (c) 2019 Dream Overflow
# Alerts view.
from __future__ import annotations
from typing import List
import copy
import threading
import hashlib
from datetime import datetime
from common.signal import Signal
f... | 29.597561 | 109 | 0.568397 |
41654482609356835382912e76e6c71daf8e0c35 | 79 | py | Python | mindware/utils/constant.py | aman-gupta-1995/Machine-Learning-Mindware | 8b3050720711730520683c89949e3dbdfb168961 | [
"MIT"
] | 27 | 2021-07-19T09:03:34.000Z | 2022-03-31T06:19:23.000Z | mindware/utils/constant.py | aman-gupta-1995/Machine-Learning-Mindware | 8b3050720711730520683c89949e3dbdfb168961 | [
"MIT"
] | 4 | 2021-07-15T12:17:10.000Z | 2022-01-26T17:16:58.000Z | mindware/utils/constant.py | aman-gupta-1995/Machine-Learning-Mindware | 8b3050720711730520683c89949e3dbdfb168961 | [
"MIT"
] | 17 | 2020-05-12T20:24:50.000Z | 2021-07-11T03:31:38.000Z | """Constants used in Integer.
"""
MAX_INT = 2 ** 31 - 1
FAILED = -2147483646.0
| 15.8 | 29 | 0.632911 |
4168426ea90071471299e4b9f280c12cdbf222d9 | 183 | py | Python | riemann/vc_elasticity_2D_constants.py | ranocha/riemann | d7b4d72d1147eee12e60a64f46a7e076b28a212d | [
"BSD-3-Clause"
] | 27 | 2015-03-08T03:42:34.000Z | 2021-12-21T01:46:12.000Z | riemann/vc_elasticity_2D_constants.py | ranocha/riemann | d7b4d72d1147eee12e60a64f46a7e076b28a212d | [
"BSD-3-Clause"
] | 47 | 2015-02-11T15:39:22.000Z | 2021-04-25T01:56:46.000Z | riemann/vc_elasticity_2D_constants.py | ranocha/riemann | d7b4d72d1147eee12e60a64f46a7e076b28a212d | [
"BSD-3-Clause"
] | 37 | 2015-01-09T21:44:08.000Z | 2021-11-21T12:53:04.000Z | num_waves = 4
num_eqn = 5
num_aux = 5
# Conserved quantities
sigma_11 = 0
sigma_22 = 1
sigma_12 = 2
u = 3
v = 4
# Auxiliary variables
density = 0
lamda = 1
mu = 2
cp = 3
cs = 4
| 10.166667 | 22 | 0.639344 |
416ac82f7055497de375a8cf70f2dcdc6187f726 | 215 | py | Python | __main__.py | luluci/utilCParse | 2f4c736b5823efff97149eeaa48c736cf6385e9a | [
"MIT"
] | null | null | null | __main__.py | luluci/utilCParse | 2f4c736b5823efff97149eeaa48c736cf6385e9a | [
"MIT"
] | null | null | null | __main__.py | luluci/utilCParse | 2f4c736b5823efff97149eeaa48c736cf6385e9a | [
"MIT"
] | null | null | null | import pathlib
import utilCParse
if True:
# file
# path = pathlib.Path("./test/test_c_src/test1.c")
path = pathlib.Path("./test/test_c_src")
analyzer = utilCParse.analyzer.analyzer()
analyzer.analyze_dir(path)
| 21.5 | 50 | 0.744186 |
416cb71493c03a08bc88a4a894160d485266f4cf | 5,813 | py | Python | Agent.py | leonjovanovic/drl-ppo-bipedal-walker | 5005bb396b409079fbb2065a2ecd5c956ba86630 | [
"MIT"
] | 1 | 2022-01-21T23:19:20.000Z | 2022-01-21T23:19:20.000Z | Agent.py | leonjovanovic/drl-ppo-bipedal-walker | 5005bb396b409079fbb2065a2ecd5c956ba86630 | [
"MIT"
] | null | null | null | Agent.py | leonjovanovic/drl-ppo-bipedal-walker | 5005bb396b409079fbb2065a2ecd5c956ba86630 | [
"MIT"
] | null | null | null | import AgentControl
import Config
import Memory
import numpy as np
import itertools
| 62.505376 | 193 | 0.692414 |
416ea9fd8056f26889da4e772e2a3ac8b50231ab | 1,671 | py | Python | supports/pyload/src/pyload/plugins/accounts/EuroshareEu.py | LuckyNicky/pycrawler | 4b3fe2f6e8e51f236d95a64a89a44199e4e97743 | [
"Apache-2.0"
] | 1 | 2020-04-02T17:03:39.000Z | 2020-04-02T17:03:39.000Z | supports/pyload/src/pyload/plugins/accounts/EuroshareEu.py | LuckyNicky/pycrawler | 4b3fe2f6e8e51f236d95a64a89a44199e4e97743 | [
"Apache-2.0"
] | null | null | null | supports/pyload/src/pyload/plugins/accounts/EuroshareEu.py | LuckyNicky/pycrawler | 4b3fe2f6e8e51f236d95a64a89a44199e4e97743 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import re
import time
from ..base.account import BaseAccount
| 27.393443 | 107 | 0.519449 |
416f89409248687c2536788eb7a91cc62ec0a18a | 1,360 | py | Python | 2021/d13.py | shubham-goel/advent_of_code | a0df7d692f25489f980caacda9fe17e7ccc56503 | [
"MIT"
] | 1 | 2021-12-10T21:08:56.000Z | 2021-12-10T21:08:56.000Z | 2021/d13.py | shubham-goel/advent_of_code | a0df7d692f25489f980caacda9fe17e7ccc56503 | [
"MIT"
] | null | null | null | 2021/d13.py | shubham-goel/advent_of_code | a0df7d692f25489f980caacda9fe17e7ccc56503 | [
"MIT"
] | null | null | null | import numpy as np
from functools import reduce
from collections import defaultdict
from pprint import pprint
file = '2021/inputs/d13.txt'
# Read the file
with open(file) as f:
lines = [line.strip() for line in f if line.strip()]
dots = np.array([list(map(int, line.split(','))) for line in lines if not line.star... | 31.627907 | 106 | 0.575735 |
417221be3e316342a6fa9154928c6a83da99eeb9 | 499 | py | Python | tests/test_get_updates.py | concretesolutions/mysql-anonymous | a4246d657cb3749aa145c30320df78f9811b01d2 | [
"MIT"
] | null | null | null | tests/test_get_updates.py | concretesolutions/mysql-anonymous | a4246d657cb3749aa145c30320df78f9811b01d2 | [
"MIT"
] | null | null | null | tests/test_get_updates.py | concretesolutions/mysql-anonymous | a4246d657cb3749aa145c30320df78f9811b01d2 | [
"MIT"
] | null | null | null | from anonymize.anonymize import AnonymizeUpdate, AnonymizeScheme
| 29.352941 | 119 | 0.531062 |
417261de1fda825c0dff2e5114b84748a824aa8f | 1,179 | py | Python | day13/test_day13.py | hmcc/advent-of-code-2021 | 6f9a2fc713901ca03eecf90fb0c2fa183a2b323f | [
"MIT"
] | null | null | null | day13/test_day13.py | hmcc/advent-of-code-2021 | 6f9a2fc713901ca03eecf90fb0c2fa183a2b323f | [
"MIT"
] | null | null | null | day13/test_day13.py | hmcc/advent-of-code-2021 | 6f9a2fc713901ca03eecf90fb0c2fa183a2b323f | [
"MIT"
] | null | null | null | import pytest
from day13 import day13
def test_to_grid():
plots = [
(1, 3),
(0, 5),
(3, 4),
(3, 0)
]
grid = [
[0, 0, 0, 1],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 0, 1],
[1, 0, 0, 0],
]
assert day13.to_gri... | 17.863636 | 42 | 0.388465 |
41741b8352830c8f1ee32187b482c56b03ca6098 | 15,221 | py | Python | CrossLanguageOPMining-bert-3languageTrain-PGNAdapter/data/SRL.py | zenRRan/Chinese-ORL-with-Corpus-Translation | cf0e3db1c03c8f13f48ccd5ea1343d56e5513299 | [
"Apache-2.0"
] | 1 | 2021-09-09T02:38:19.000Z | 2021-09-09T02:38:19.000Z | CrossLanguageOPMining-bert-3languageTrain-PGNAdapter/data/SRL.py | zenRRan/Chinese-ORL-with-Corpus-Translation | cf0e3db1c03c8f13f48ccd5ea1343d56e5513299 | [
"Apache-2.0"
] | null | null | null | CrossLanguageOPMining-bert-3languageTrain-PGNAdapter/data/SRL.py | zenRRan/Chinese-ORL-with-Corpus-Translation | cf0e3db1c03c8f13f48ccd5ea1343d56e5513299 | [
"Apache-2.0"
] | 1 | 2021-09-09T02:38:20.000Z | 2021-09-09T02:38:20.000Z | # encoding:utf-8
def label_to_entity(labels):
length = len(labels)
entities = set()
idx = 0
while idx < length:
if labels[idx] == "O":
idx = idx + 1
elif labels[idx].startswith("B-"):
label = labels[idx][2:]
predict = False
if label.ends... | 40.481383 | 133 | 0.603968 |
41745c875d46144c780898ac9e32708828613eda | 846 | py | Python | machine-learning/shape-detection/live_shape_detector.py | gizzmo25/pythoncode-tutorials | 39a413fc1da232ad6de7e5f1e8955564dc65448e | [
"MIT"
] | null | null | null | machine-learning/shape-detection/live_shape_detector.py | gizzmo25/pythoncode-tutorials | 39a413fc1da232ad6de7e5f1e8955564dc65448e | [
"MIT"
] | null | null | null | machine-learning/shape-detection/live_shape_detector.py | gizzmo25/pythoncode-tutorials | 39a413fc1da232ad6de7e5f1e8955564dc65448e | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import cv2
cap = cv2.VideoCapture(0)
while True:
_, image = cap.read()
# convert to grayscale
grayscale = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
# perform edge detection
edges = cv2.Canny(grayscale, 30, 100)
# detect lines in the ... | 31.333333 | 74 | 0.599291 |
4174c16b7b44a20c364180859943cecb67d2ec6d | 447 | py | Python | TWLight/applications/factories.py | jajodiaraghav/TWLight | 22359ab0b95ee3653e8ffa0eb698acd7bb8ebf70 | [
"MIT"
] | 1 | 2019-10-24T04:49:52.000Z | 2019-10-24T04:49:52.000Z | TWLight/applications/factories.py | jajodiaraghav/TWLight | 22359ab0b95ee3653e8ffa0eb698acd7bb8ebf70 | [
"MIT"
] | 1 | 2019-03-29T15:29:45.000Z | 2019-03-29T15:57:20.000Z | TWLight/applications/factories.py | jajodiaraghav/TWLight | 22359ab0b95ee3653e8ffa0eb698acd7bb8ebf70 | [
"MIT"
] | 1 | 2019-09-26T14:40:27.000Z | 2019-09-26T14:40:27.000Z | # -*- coding: utf-8 -*-
import factory
from TWLight.resources.factories import PartnerFactory
from TWLight.users.factories import EditorFactory
from TWLight.applications.models import Application
| 23.526316 | 60 | 0.771812 |
4175cf33af0a9fc02e5954eff235d099ea9560df | 26,179 | py | Python | tests/unit/state_machines/ansible/machine.py | tessia-project/tessia | b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540 | [
"Apache-2.0"
] | 5 | 2020-06-04T10:20:33.000Z | 2020-10-26T15:09:19.000Z | tests/unit/state_machines/ansible/machine.py | tessia-project/tessia | b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540 | [
"Apache-2.0"
] | null | null | null | tests/unit/state_machines/ansible/machine.py | tessia-project/tessia | b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 IBM Corp.
#
# 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, sof... | 36.359722 | 79 | 0.527102 |
417697b1b7ac61c4a2484988800a81013b863e87 | 427 | py | Python | adv/marty.py | mattkw/dl | 45bfc28ad9ff827045a3734730deb893a2436c09 | [
"Apache-2.0"
] | null | null | null | adv/marty.py | mattkw/dl | 45bfc28ad9ff827045a3734730deb893a2436c09 | [
"Apache-2.0"
] | null | null | null | adv/marty.py | mattkw/dl | 45bfc28ad9ff827045a3734730deb893a2436c09 | [
"Apache-2.0"
] | null | null | null | import adv_test
import adv
if __name__ == '__main__':
conf = {}
conf['acl'] = """
`s1,fsc
`s3,fsc
`fs, seq=3
"""
adv_test.test(module(), conf, verbose=0)
| 17.08 | 60 | 0.545667 |
4176b3250f2179deaa30e43611510dfb698b6de1 | 2,143 | py | Python | python_project/DeleteElasticsearchIndices.py | wangyuqianily/bbotte.github.io | 7b7522c1db445179a5be029f1da4db70bcc154f4 | [
"Apache-2.0"
] | 2 | 2021-08-22T16:13:27.000Z | 2021-08-22T16:13:34.000Z | python_project/DeleteElasticsearchIndices.py | wangyuqianily/bbotte.github.io | 7b7522c1db445179a5be029f1da4db70bcc154f4 | [
"Apache-2.0"
] | null | null | null | python_project/DeleteElasticsearchIndices.py | wangyuqianily/bbotte.github.io | 7b7522c1db445179a5be029f1da4db70bcc154f4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#ecoding=utf8
#elasticsearch
#daysToKeepaccessaccess_date
#pip install elasticsearch elasticsearch
import datetime
import re
from elasticsearch import Elasticsearch
daysToKeep = 30
es = Elasticsearch('localhost:9200',timeout=60.0)
keep_time = (datetime.datetime.now() - datetime.timedelta(days=d... | 32.969231 | 104 | 0.698087 |
4177bf981529c6cc39592efae333854035eb3cbc | 2,123 | py | Python | cowait/cli/commands/cluster.py | backtick-se/cowa | 760ddb3ded1b3995bc68f4b74cf28af0c094481f | [
"Apache-2.0"
] | 51 | 2020-06-04T06:08:14.000Z | 2022-03-28T06:59:53.000Z | cowait/cli/commands/cluster.py | backtick-se/cowa | 760ddb3ded1b3995bc68f4b74cf28af0c094481f | [
"Apache-2.0"
] | 121 | 2020-06-01T12:09:32.000Z | 2022-03-31T20:47:57.000Z | cowait/cli/commands/cluster.py | backtick-se/cowa | 760ddb3ded1b3995bc68f4b74cf28af0c094481f | [
"Apache-2.0"
] | 6 | 2020-06-11T16:05:20.000Z | 2022-03-23T06:30:17.000Z | from ..config import Config
ADDABLE_PROVIDERS = {
'api': ['url', 'token'],
'kubernetes': ['context'],
}
| 24.686047 | 91 | 0.615638 |
4178a069f2f86e61c5c69465dfb96c3739edbd5d | 17,280 | py | Python | nhefner_pygame_menus/menus.py | noahhefner/nhefner_pygame_menus | f03d0d0b78d4513d81e80aec08bd7479ff6c62bf | [
"MIT"
] | null | null | null | nhefner_pygame_menus/menus.py | noahhefner/nhefner_pygame_menus | f03d0d0b78d4513d81e80aec08bd7479ff6c62bf | [
"MIT"
] | null | null | null | nhefner_pygame_menus/menus.py | noahhefner/nhefner_pygame_menus | f03d0d0b78d4513d81e80aec08bd7479ff6c62bf | [
"MIT"
] | null | null | null | """
Noah Hefner
Pygame Menu System
Last Edit: 1 January 2021
"""
# Imports
import pygame
import string
# Initialize pygame
pygame.init()
# Settings
menu_manager_settings = {
"element_colorkey" : [0, 0, 0],
"menu_background_color" : [0, 0, 0],
"menu_fps" : 60
}
| 27 | 103 | 0.571875 |
41790ebe5f5f127599395f466cada873263fbe37 | 753 | py | Python | vbdiar/kaldi/python_mfcc_features_extraction.py | Honghe/VBDiarization | 7a7f941ecb5e97bab02aa939cd30eb7519d67e21 | [
"Apache-2.0"
] | null | null | null | vbdiar/kaldi/python_mfcc_features_extraction.py | Honghe/VBDiarization | 7a7f941ecb5e97bab02aa939cd30eb7519d67e21 | [
"Apache-2.0"
] | null | null | null | vbdiar/kaldi/python_mfcc_features_extraction.py | Honghe/VBDiarization | 7a7f941ecb5e97bab02aa939cd30eb7519d67e21 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
import speechpy
from scipy.io import wavfile
from python_speech_features import mfcc
| 35.857143 | 100 | 0.705179 |
4179b159eec41f819f204bc24c5c98372e4dd229 | 6,866 | py | Python | blatann/nrf/nrf_types/smp.py | eriknyquist/blatann | 0c895e3a85a295047b0bdc5c142eb42ed8e36132 | [
"BSD-3-Clause"
] | 1 | 2019-06-17T01:12:31.000Z | 2019-06-17T01:12:31.000Z | blatann/nrf/nrf_types/smp.py | eriknyquist/blatann | 0c895e3a85a295047b0bdc5c142eb42ed8e36132 | [
"BSD-3-Clause"
] | null | null | null | blatann/nrf/nrf_types/smp.py | eriknyquist/blatann | 0c895e3a85a295047b0bdc5c142eb42ed8e36132 | [
"BSD-3-Clause"
] | null | null | null | from enum import Enum
import logging
from blatann.nrf.nrf_dll_load import driver
import blatann.nrf.nrf_driver_types as util
from blatann.nrf.nrf_types.enums import *
logger = logging.getLogger(__name__)
| 40.152047 | 120 | 0.513982 |