hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ec2449d25cfbee043e9bd16a7015de541580d5ac | 1,098 | py | Python | examples/spring_mass/mcmc_verify/spring_mass_mcmc.py | HarshilShrivastava/SMCPy | e3c958023aab3f3143e70de5a52e3c195e536dd1 | [
"NASA-1.3"
] | 1 | 2020-02-11T22:37:43.000Z | 2020-02-11T22:37:43.000Z | examples/spring_mass/mcmc_verify/spring_mass_mcmc.py | HarshilShrivastava/SMCPy | e3c958023aab3f3143e70de5a52e3c195e536dd1 | [
"NASA-1.3"
] | null | null | null | examples/spring_mass/mcmc_verify/spring_mass_mcmc.py | HarshilShrivastava/SMCPy | e3c958023aab3f3143e70de5a52e3c195e536dd1 | [
"NASA-1.3"
] | null | null | null | import numpy as np
from smcpy.smc.smc_sampler import SMCSampler
from smcpy.mcmc.mcmc_sampler import MCMCSampler
import sys
sys.path.append('../')
from spring_mass_model import SpringMassModel
# Initialize model
state0 = [0., 0.] #initial conditions
measure_t_grid = np.arange(0., 5., 0.2) #tim... | 27.45 | 79 | 0.696721 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.201275 |
ec24678a1a7f721fdf069408e673247022f3c8a5 | 4,463 | py | Python | dqn/AutoEncoder/simple_replay_memory.py | NoListen/ERL | 6216cccd5144fc3514db890d343fd4187f275c81 | [
"MIT"
] | 16 | 2017-07-03T06:48:17.000Z | 2021-09-02T04:42:04.000Z | dqn/AutoEncoder/simple_replay_memory.py | NoListen/ERL | 6216cccd5144fc3514db890d343fd4187f275c81 | [
"MIT"
] | 1 | 2018-01-08T15:26:52.000Z | 2018-01-08T18:37:35.000Z | dqn/AutoEncoder/simple_replay_memory.py | NoListen/ERL | 6216cccd5144fc3514db890d343fd4187f275c81 | [
"MIT"
] | 4 | 2017-07-26T22:34:01.000Z | 2020-04-11T15:04:02.000Z | """
This if for autoencoder not the RL-agent to learn
Just Serve as one buffer
"""
import os
import random
import logging
import numpy as np
from dqn.utils import save_npy, load_npy
# At first fill the replay buffer, then sample to learn.
import numpy as np
class SimpleDataSet(object):
"""A replay memory consis... | 33.810606 | 99 | 0.588618 | 4,200 | 0.941071 | 0 | 0 | 0 | 0 | 0 | 0 | 1,720 | 0.385391 |
ec25c2f31a3bb3c2ba005535c0d2769771012650 | 932 | py | Python | run_attack_classification.py | justusmattern/dist-embeds | 2a5fd97bcfc3eed5c7f11e76d82c4ff49709cbe8 | [
"MIT"
] | null | null | null | run_attack_classification.py | justusmattern/dist-embeds | 2a5fd97bcfc3eed5c7f11e76d82c4ff49709cbe8 | [
"MIT"
] | null | null | null | run_attack_classification.py | justusmattern/dist-embeds | 2a5fd97bcfc3eed5c7f11e76d82c4ff49709cbe8 | [
"MIT"
] | null | null | null | import os
# for wordLSTM target
command = 'python attack_classification.py --dataset_path data/mr/test.txt ' \
'--target_model wordLSTM --batch_size 128 ' \
'--target_model_path model_nondist.pt ' \
'--word_embeddings_path data/glove.6B.200d.txt ' \
'--counter_fitting_embedd... | 42.363636 | 81 | 0.664163 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 796 | 0.854077 |
ec2aed547019ea718fa0b562ff4098ff83dbf1cb | 3,242 | py | Python | tests/test_ideal_gas_flow.py | aanish94/apsCFD | 51ac84926d691ec80a46e877302ccbe47281f8f4 | [
"MIT"
] | 4 | 2021-01-22T14:17:17.000Z | 2021-01-23T16:29:41.000Z | tests/test_ideal_gas_flow.py | aanish94/apsCFD | 51ac84926d691ec80a46e877302ccbe47281f8f4 | [
"MIT"
] | 4 | 2018-02-01T05:40:09.000Z | 2018-02-02T07:35:11.000Z | tests/test_ideal_gas_flow.py | aanish94/apsCFD | 51ac84926d691ec80a46e877302ccbe47281f8f4 | [
"MIT"
] | 1 | 2021-01-22T02:14:49.000Z | 2021-01-22T02:14:49.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Test ideal gas flow calculations
"""
import unittest
from utils.utils import deg_to_rad
from ideal_gas_flow import (isentropic, normal_shock, rayleigh,
prandtl_meyer, oblique_shock)
class TestIdealGasFlow(unittest.TestCase):
"""
"... | 33.081633 | 95 | 0.639729 | 2,928 | 0.903146 | 0 | 0 | 0 | 0 | 0 | 0 | 468 | 0.144355 |
ec2b8f23f26b48259c53767971ede949f67de8b4 | 3,221 | py | Python | xcube/core/gen2/local/writer.py | bcdev/xcube | 9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3 | [
"MIT"
] | 97 | 2018-06-26T13:02:55.000Z | 2022-03-26T21:03:13.000Z | xcube/core/gen2/local/writer.py | bcdev/xcube | 9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3 | [
"MIT"
] | 524 | 2018-11-09T12:00:08.000Z | 2022-03-31T17:00:13.000Z | xcube/core/gen2/local/writer.py | bcdev/xcube | 9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3 | [
"MIT"
] | 15 | 2019-07-09T08:46:03.000Z | 2022-02-07T18:47:34.000Z | # The MIT License (MIT)
# Copyright (c) 2021 by the xcube development team and contributors
#
# 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... | 43.527027 | 81 | 0.671531 | 1,701 | 0.528097 | 0 | 0 | 0 | 0 | 0 | 0 | 1,231 | 0.382179 |
ec2c1d965129d29e1fe37c940c1a59e29fefae6c | 3,276 | py | Python | dimension_reduction_techniques/n_49300.py | benstear/vae-scRNA | 5fb4d0fd38810d86bd69130b911817432cb6facc | [
"MIT"
] | null | null | null | dimension_reduction_techniques/n_49300.py | benstear/vae-scRNA | 5fb4d0fd38810d86bd69130b911817432cb6facc | [
"MIT"
] | null | null | null | dimension_reduction_techniques/n_49300.py | benstear/vae-scRNA | 5fb4d0fd38810d86bd69130b911817432cb6facc | [
"MIT"
] | 1 | 2022-01-30T17:54:30.000Z | 2022-01-30T17:54:30.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 17 19:57:23 2018
@author: dawnstear
"""
from sklearn.manifold import TSNE
from sklearn.decomposition import PCA
import pandas as pd
from matplotlib.pyplot import scatter, figure, subplot, savefig
import matplotlib.pyplot as plt
from sklearn.utils i... | 31.2 | 148 | 0.657509 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,917 | 0.890415 |
ec2f222af58da2bc64e5b28bba59ebdceae5e124 | 4,148 | py | Python | tests/test_subspaces.py | ndem0/ATHENA | 87825ad95de539ac5e816a19922e9d615fabd5b8 | [
"MIT"
] | 33 | 2019-12-05T15:20:26.000Z | 2022-03-27T17:53:57.000Z | tests/test_subspaces.py | ndem0/ATHENA | 87825ad95de539ac5e816a19922e9d615fabd5b8 | [
"MIT"
] | 12 | 2020-03-23T08:54:32.000Z | 2021-11-07T14:33:04.000Z | tests/test_subspaces.py | ndem0/ATHENA | 87825ad95de539ac5e816a19922e9d615fabd5b8 | [
"MIT"
] | 16 | 2019-12-05T14:10:57.000Z | 2021-07-30T14:12:10.000Z | from unittest import TestCase
import numpy as np
from athena.subspaces import Subspaces
class TestUtils(TestCase):
def test_init_W1(self):
ss = Subspaces(dim=1)
self.assertIsNone(ss.W1)
def test_init_W2(self):
ss = Subspaces(dim=1)
self.assertIsNone(ss.W2)
def test_init_e... | 32.40625 | 72 | 0.5892 | 4,057 | 0.978062 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 0.012777 |
ec300133e36d8c7c6858a83eca5e80abaa22a5dc | 1,131 | py | Python | premium/backend/src/baserow_premium/api/license/urls.py | ashishdhngr/baserow | b098678d2165eb7c42930ee24dc6753a3cb520c3 | [
"MIT"
] | 1 | 2022-01-24T15:12:02.000Z | 2022-01-24T15:12:02.000Z | premium/backend/src/baserow_premium/api/license/urls.py | rasata/baserow | c6e1d7842c53f801e1c96b49f1377da2a06afaa9 | [
"MIT"
] | null | null | null | premium/backend/src/baserow_premium/api/license/urls.py | rasata/baserow | c6e1d7842c53f801e1c96b49f1377da2a06afaa9 | [
"MIT"
] | null | null | null | from django.conf.urls import re_path
from .views import (
AdminLicensesView,
AdminLicenseView,
AdminLicenseFillSeatsView,
AdminRemoveAllUsersFromLicenseView,
AdminLicenseUserView,
AdminLicenseLookupUsersView,
AdminCheckLicense,
)
app_name = "baserow_premium.api.license"
urlpatterns = [
... | 25.133333 | 75 | 0.591512 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 290 | 0.25641 |
ec330b8bd3eee04a448cd277aee3a50bec98e49d | 2,052 | py | Python | redirect_server/main.py | SantaSpeen/gitflic | 14c68092e238d6731863f9db29b304a9fad3e61c | [
"MIT"
] | 2 | 2022-03-16T10:18:38.000Z | 2022-03-16T13:08:51.000Z | redirect_server/main.py | SantaSpeen/gitflic | 14c68092e238d6731863f9db29b304a9fad3e61c | [
"MIT"
] | 1 | 2022-03-16T12:52:28.000Z | 2022-03-16T13:08:30.000Z | redirect_server/main.py | SantaSpeen/gitflic | 14c68092e238d6731863f9db29b304a9fad3e61c | [
"MIT"
] | 4 | 2022-03-16T09:33:05.000Z | 2022-03-30T05:46:58.000Z | """
This is redirect server for https://oauth.gitflic.ru/oauth/authorize
Base URL: https://gitflic.santaspeen.ru/
Author: @SantaSpeen
License: MIT
"""
import json
import random
from string import ascii_letters, digits
from flask import Flask, request, redirect, abort
app = Flask("gitflic oauth redirec... | 28.109589 | 107 | 0.615984 | 0 | 0 | 0 | 0 | 1,640 | 0.79922 | 0 | 0 | 694 | 0.338207 |
ec344b7aa9b7b7dc268010d8de19cfb167034b6e | 5,241 | py | Python | applied_python/applied_python/lib/python2.7/site-packages/ansible/modules/extras/packaging/language/cpanm.py | mith1979/ansible_automation | 013dfa67c6d91720b787fadb21de574b6e023a26 | [
"Apache-2.0"
] | 1 | 2020-10-14T00:06:54.000Z | 2020-10-14T00:06:54.000Z | applied_python/applied_python/lib/python2.7/site-packages/ansible/modules/extras/packaging/language/cpanm.py | mith1979/ansible_automation | 013dfa67c6d91720b787fadb21de574b6e023a26 | [
"Apache-2.0"
] | null | null | null | applied_python/applied_python/lib/python2.7/site-packages/ansible/modules/extras/packaging/language/cpanm.py | mith1979/ansible_automation | 013dfa67c6d91720b787fadb21de574b6e023a26 | [
"Apache-2.0"
] | 2 | 2015-08-06T07:45:48.000Z | 2017-01-04T17:47:16.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Franck Cuny <franck@lumberjaph.net>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the L... | 33.170886 | 126 | 0.672582 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,093 | 0.590155 |
ec34fcd27c4d0849f4617b2ff48d291c0d3e7793 | 5,877 | py | Python | python/pong.py | rajszym/Pong | ddf6e3a9853ce9d3487636f32b408677b4487210 | [
"MIT"
] | null | null | null | python/pong.py | rajszym/Pong | ddf6e3a9853ce9d3487636f32b408677b4487210 | [
"MIT"
] | null | null | null | python/pong.py | rajszym/Pong | ddf6e3a9853ce9d3487636f32b408677b4487210 | [
"MIT"
] | null | null | null | import os, sys, pygame
White = (0xFF, 0xFF, 0xFF)
Red = (0xFF, 0x00, 0x00)
Yellow = (0xFF, 0xFF, 0x00)
Green = (0x00, 0xFF, 0x00)
Blue = (0x00, 0x00, 0xFF)
Black = (0x00, 0x00, 0x00)
BKG = Black
class Player(pygame.Rect):
def __init__(self):
pygame.Rect.__init__(self, (0, 0), PlayerSize)
self.center... | 26.835616 | 75 | 0.652714 | 3,607 | 0.613749 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.014463 |
ec36f77c91a8f8042240f5809fbfdc767c72da16 | 46 | py | Python | game/components/__init__.py | MarsRaptor/battleships | 81e0a595c05f627de568dad49904be99f0cbf6ac | [
"MIT"
] | null | null | null | game/components/__init__.py | MarsRaptor/battleships | 81e0a595c05f627de568dad49904be99f0cbf6ac | [
"MIT"
] | null | null | null | game/components/__init__.py | MarsRaptor/battleships | 81e0a595c05f627de568dad49904be99f0cbf6ac | [
"MIT"
] | null | null | null | from .ships import *
from .battlegrid import * | 23 | 25 | 0.76087 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ec375bc4d8ef16784bec0fbac23a1ea72eb34608 | 13,406 | py | Python | RL-snake/main.py | Yashprime1/RL--Snake | 9eb1a6306bad83c263f2fec7752d2d772860990c | [
"MIT"
] | null | null | null | RL-snake/main.py | Yashprime1/RL--Snake | 9eb1a6306bad83c263f2fec7752d2d772860990c | [
"MIT"
] | null | null | null | RL-snake/main.py | Yashprime1/RL--Snake | 9eb1a6306bad83c263f2fec7752d2d772860990c | [
"MIT"
] | null | null | null | import pygame
import random
import random
import itertools
import json
import os
import matplotlib.pyplot as plt
from IPython import display
plt.ion()
def plot(scores, mean_scores,save=False):
display.clear_output(wait=True)
display.display(plt.gcf())
plt.clf()
plt.title('Training...')
plt.xlabel... | 31.84323 | 292 | 0.635313 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,774 | 0.132329 |
ec39ff5313fd7c3fd2b71acde83c9cf8579b9481 | 4,999 | py | Python | backend/boards/models.py | xelam11/TaskPlanner | c1e940d2a9babba7721c0f2d261e1c7df9c48581 | [
"BSD-3-Clause"
] | null | null | null | backend/boards/models.py | xelam11/TaskPlanner | c1e940d2a9babba7721c0f2d261e1c7df9c48581 | [
"BSD-3-Clause"
] | null | null | null | backend/boards/models.py | xelam11/TaskPlanner | c1e940d2a9babba7721c0f2d261e1c7df9c48581 | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
from users.models import CustomUser
class BoardManager(models.Manager):
def create_board(self, author, **kwargs):
current_user = author
board = Board.objects.create(author=current_user, **kwargs)
ParticipantInBoard.objects.create(board=board,
... | 34.475862 | 77 | 0.468894 | 5,180 | 0.984604 | 0 | 0 | 72 | 0.013686 | 0 | 0 | 922 | 0.175252 |
ec3a1ba3d6ddeb0aa249439a8c2888cd61f0d04f | 1,605 | py | Python | extractcondo.py | mattyschell/geodatabase-buildings-condoetl | b9be05f749d3c1d7c7dec2f86bbc8776141a93bf | [
"CC0-1.0"
] | null | null | null | extractcondo.py | mattyschell/geodatabase-buildings-condoetl | b9be05f749d3c1d7c7dec2f86bbc8776141a93bf | [
"CC0-1.0"
] | 4 | 2021-08-31T18:27:25.000Z | 2021-09-17T20:26:43.000Z | extractcondo.py | mattyschell/geodatabase-buildings-condoetl | b9be05f749d3c1d7c7dec2f86bbc8776141a93bf | [
"CC0-1.0"
] | null | null | null | import os
import logging
import time
import pathlib
import condo
def main(sourcesdeconn
,outputdir):
sourcecondo = condo.Condo()
sourcecondo.extracttofile('DOF_TAXMAP.Condo'
,outputdir)
return sourcecondo.countcondos()
if __name__ == '__main__'... | 25.887097 | 87 | 0.545794 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 457 | 0.284735 |
ec3aa0d2e05680652a1c6c5556aeb676e5bb64da | 141 | py | Python | sahi/scripts/predict_fiftyone.py | agat59/sahil6 | 1f413d3cba7fe058f663f8e0ff8c72981817c325 | [
"MIT"
] | 11 | 2022-02-21T23:00:02.000Z | 2022-03-11T02:55:07.000Z | sahi/scripts/predict_fiftyone.py | agat59/sahil6 | 1f413d3cba7fe058f663f8e0ff8c72981817c325 | [
"MIT"
] | 1 | 2022-03-11T13:48:28.000Z | 2022-03-11T13:48:28.000Z | sahi/scripts/predict_fiftyone.py | Kazuhito00/sahi-yolox-onnx-sample | 2019a35522d6b1add49fce6933def860bed39bc2 | [
"MIT"
] | 1 | 2021-12-01T12:01:05.000Z | 2021-12-01T12:01:05.000Z | import fire
from sahi.predict import predict_fiftyone
def main():
fire.Fire(predict_fiftyone)
if __name__ == "__main__":
main()
| 11.75 | 41 | 0.70922 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.070922 |
ec3ac3aaff08cf33fd3407062e48c690f394ad7a | 149 | py | Python | reagent/test/environment/__init__.py | cts198859/ReAgent | 20f3d333821bad364fd567cce97de51c44123484 | [
"BSD-3-Clause"
] | 1 | 2020-06-30T16:57:47.000Z | 2020-06-30T16:57:47.000Z | reagent/test/environment/__init__.py | OregonWebSells/ReAgent | 866f91785ca86db32fb67744aa063fe77791ff21 | [
"BSD-3-Clause"
] | null | null | null | reagent/test/environment/__init__.py | OregonWebSells/ReAgent | 866f91785ca86db32fb67744aa063fe77791ff21 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import logging
logger = logging.getLogger(__name__)
| 21.285714 | 71 | 0.758389 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 93 | 0.624161 |
ec3b0f1dfb39b25fc236995951ab1bc52cc30f8b | 690 | py | Python | MarketData/testMKup.py | yirencaifu/pyWindMongoDB | df1bf3d0bfe6872a5d18fa2f72beccafd7c93b73 | [
"MIT"
] | null | null | null | MarketData/testMKup.py | yirencaifu/pyWindMongoDB | df1bf3d0bfe6872a5d18fa2f72beccafd7c93b73 | [
"MIT"
] | null | null | null | MarketData/testMKup.py | yirencaifu/pyWindMongoDB | df1bf3d0bfe6872a5d18fa2f72beccafd7c93b73 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Sep 27 08:11:48 2014
@author: space_000
"""
from scipy.io import loadmat
from WindPy import w
import pymongo as mg
from wsiTools import findDate
from mgWsi import upiter
d=loadmat('D:\FieldSHSZ')
Field=d['Field'].tolist()
stride=100
numF=range(len(Field))[::stride]
dt=load... | 20.294118 | 124 | 0.678261 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 201 | 0.291304 |
ec3c2240f0d4e50a74ef174a4b79ed9be0810b76 | 1,976 | py | Python | test_regress.py | irskep/zhang-shasha | b108f6bb14409b87c44bf45ffd9a038475a9379a | [
"BSD-3-Clause"
] | 1 | 2021-08-12T19:38:44.000Z | 2021-08-12T19:38:44.000Z | test_regress.py | irskep/zhang-shasha | b108f6bb14409b87c44bf45ffd9a038475a9379a | [
"BSD-3-Clause"
] | null | null | null | test_regress.py | irskep/zhang-shasha | b108f6bb14409b87c44bf45ffd9a038475a9379a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#Author: Tim Henderson
#Email: tim.tadh@hackthology.com
#For licensing see the LICENSE file in the top level directory.
import unittest, os, sys, base64, itertools, random, time, copy
import copy, collections
from random import randint, seed, shuffle
from zss import compa... | 22.202247 | 63 | 0.480769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 313 | 0.158401 |
ec3e15a3f0d2a5295e65513f4e182448baf2f725 | 180 | py | Python | tracardi/process_engine/destination/rabbitmq_connector.py | bytepl/tracardi | e8fa4684fa6bd3d05165fe48aa925fc6c1e74923 | [
"MIT"
] | null | null | null | tracardi/process_engine/destination/rabbitmq_connector.py | bytepl/tracardi | e8fa4684fa6bd3d05165fe48aa925fc6c1e74923 | [
"MIT"
] | null | null | null | tracardi/process_engine/destination/rabbitmq_connector.py | bytepl/tracardi | e8fa4684fa6bd3d05165fe48aa925fc6c1e74923 | [
"MIT"
] | null | null | null | from tracardi.process_engine.destination.connector import Connector
class RabbitMqConnector(Connector):
async def run(self, mapping, delta):
print(mapping, delta)
| 18 | 67 | 0.755556 | 107 | 0.594444 | 0 | 0 | 0 | 0 | 66 | 0.366667 | 0 | 0 |
ec3ed91b0547d338c06ce42617025e071787d68a | 4,585 | py | Python | dokdo/api/beta_3d_plot.py | sbslee/dokdo | a528a830b3347c39e1dc415b0f3e2c6ad60b0a1d | [
"MIT"
] | 23 | 2020-11-01T21:55:30.000Z | 2021-12-05T14:03:05.000Z | dokdo/api/beta_3d_plot.py | sbslee/dokdo | a528a830b3347c39e1dc415b0f3e2c6ad60b0a1d | [
"MIT"
] | 25 | 2020-11-25T23:24:23.000Z | 2022-03-30T04:40:45.000Z | dokdo/api/beta_3d_plot.py | sbslee/dokdo | a528a830b3347c39e1dc415b0f3e2c6ad60b0a1d | [
"MIT"
] | 7 | 2020-11-27T06:46:47.000Z | 2021-09-25T03:26:07.000Z | from . import common
import pandas as pd
import matplotlib.pyplot as plt
from skbio.stats.ordination import OrdinationResults
from qiime2 import Artifact
def beta_3d_plot(
artifact, metadata=None, hue=None, azim=-60, elev=30, s=80, ax=None,
figsize=None, hue_order=None
):
"""
Create a 3D scatter plot ... | 32.062937 | 114 | 0.532606 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,279 | 0.715158 |
ec3edfbe3bdf65ebc6cecba5e84ff7e63361940c | 9,682 | py | Python | Human-Falling-Detect-Tracks/Actionsrecognition/Models.py | mathemusician/IncidenceReporting | d1cb747ecdbad641276981133a78813f878c89f3 | [
"MIT"
] | 2 | 2021-10-02T19:56:32.000Z | 2021-10-02T21:31:26.000Z | Human-Falling-Detect-Tracks/Actionsrecognition/Models.py | mathemusician/IncidenceReporting | d1cb747ecdbad641276981133a78813f878c89f3 | [
"MIT"
] | null | null | null | Human-Falling-Detect-Tracks/Actionsrecognition/Models.py | mathemusician/IncidenceReporting | d1cb747ecdbad641276981133a78813f878c89f3 | [
"MIT"
] | 1 | 2021-10-02T21:46:08.000Z | 2021-10-02T21:46:08.000Z | ### Reference from: https://github.com/yysijie/st-gcn/tree/master/net
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from Actionsrecognition.Utils import Graph
class GraphConvolution(nn.Module):
"""The basic module for applying a graph convolution.
Args:
- in_c... | 37.527132 | 92 | 0.575088 | 9,469 | 0.978 | 0 | 0 | 0 | 0 | 0 | 0 | 4,395 | 0.453935 |
ec3fe1d1b9136cf779530748aa16a309021ed5cb | 4,572 | py | Python | baselines_pharmaco_nontrainable.py | francescobarbara/idad | 7931daeec5ae7db0c212d0b13f3c13d4784ecfdb | [
"MIT"
] | 3 | 2021-11-03T07:30:16.000Z | 2021-12-18T16:26:14.000Z | baselines_pharmaco_nontrainable.py | francescobarbara/idad | 7931daeec5ae7db0c212d0b13f3c13d4784ecfdb | [
"MIT"
] | null | null | null | baselines_pharmaco_nontrainable.py | francescobarbara/idad | 7931daeec5ae7db0c212d0b13f3c13d4784ecfdb | [
"MIT"
] | 3 | 2022-01-31T10:21:38.000Z | 2022-03-04T23:56:58.000Z | import os
import math
import argparse
from tqdm import tqdm
import pandas as pd
import torch
import torch.nn as nn
import pyro
import mlflow
from pharmacokinetic import Pharmacokinetic
from experiment_tools.pyro_tools import auto_seed
from experiment_tools.output_utils import get_mlflow_meta
from estimators.mi import... | 33.617647 | 88 | 0.667323 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 630 | 0.137795 |
ec424d0484b0678464ceb56aac0631a916e0e37d | 311 | py | Python | bot/config.py | i-dubits/tg-bot-style | 798b42b2892307a668cc676be216634e7a7cf7de | [
"BSD-3-Clause"
] | null | null | null | bot/config.py | i-dubits/tg-bot-style | 798b42b2892307a668cc676be216634e7a7cf7de | [
"BSD-3-Clause"
] | null | null | null | bot/config.py | i-dubits/tg-bot-style | 798b42b2892307a668cc676be216634e7a7cf7de | [
"BSD-3-Clause"
] | null | null | null | TOKEN = '' # your token should be here
file_path_to_download = './images/'
checkpoint_dir = './scripts/checkpoints/'
nst_state_dict = './nst/vgg19-dcbb9e9d.pth' # you should download an vgg19 dict from here https://download.pytorch.org/models/vgg19-dcbb9e9d.pth
| 28.272727 | 144 | 0.639871 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 190 | 0.610932 |
ec4317b372f61389880e4f9eb445952855478c5e | 1,126 | py | Python | app/errors/__init__.py | vnappmob/vapi | ab7e8ecdb459227084c8f1dd65e18f5d668b1c43 | [
"MIT"
] | null | null | null | app/errors/__init__.py | vnappmob/vapi | ab7e8ecdb459227084c8f1dd65e18f5d668b1c43 | [
"MIT"
] | null | null | null | app/errors/__init__.py | vnappmob/vapi | ab7e8ecdb459227084c8f1dd65e18f5d668b1c43 | [
"MIT"
] | null | null | null | """app/errors.py"""
from flask import render_template, Blueprint, make_response, jsonify
from werkzeug.http import HTTP_STATUS_CODES
bp = Blueprint('errors', __name__) #pylint: disable=C
def error_response(status_code, message=None):
"""error_response"""
payload = {
'error':
str(status_code)... | 22.52 | 68 | 0.675844 | 0 | 0 | 0 | 0 | 565 | 0.501776 | 0 | 0 | 236 | 0.209591 |
ec431f839118040109012d9dbffe4ec8364d62fb | 3,700 | py | Python | bglcapi/bgapi/sm/cmd.py | edgebr/python-bgapi | 0aeb525edf605e892b20f5c3fb11269cce0c5bdf | [
"MIT"
] | null | null | null | bglcapi/bgapi/sm/cmd.py | edgebr/python-bgapi | 0aeb525edf605e892b20f5c3fb11269cce0c5bdf | [
"MIT"
] | null | null | null | bglcapi/bgapi/sm/cmd.py | edgebr/python-bgapi | 0aeb525edf605e892b20f5c3fb11269cce0c5bdf | [
"MIT"
] | null | null | null | from struct import pack
from bglcapi.base_command import command
from bglcapi.types import (MessageType, MessageClass)
def bonding_confirm(connection, confirm):
MSG_TYPE = MessageType.COMMAND_RESPONSE.value
MSG_CLASS = MessageClass.SM.value
MSG_ID = 0x0e
payload = pack('<BB', connection, confirm)
... | 29.6 | 65 | 0.73027 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.016757 |
ec437c281a42860d829cd0668161ff24325efb64 | 363 | py | Python | products/migrations/0003_rename_uodated_at_product_updated_at.py | flyguy21206/Price-Comparison-Group3-BE-1 | 7e03e1fc99892baf0da714bde1767a5e1060a714 | [
"MIT"
] | null | null | null | products/migrations/0003_rename_uodated_at_product_updated_at.py | flyguy21206/Price-Comparison-Group3-BE-1 | 7e03e1fc99892baf0da714bde1767a5e1060a714 | [
"MIT"
] | 1 | 2021-07-26T00:06:07.000Z | 2021-07-26T00:06:07.000Z | products/migrations/0003_rename_uodated_at_product_updated_at.py | flyguy21206/Price-Comparison-Group3-BE-1 | 7e03e1fc99892baf0da714bde1767a5e1060a714 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.4 on 2021-07-14 20:25
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('products', '0002_comments'),
]
operations = [
migrations.RenameField(
model_name='product',
old_name='uodated_at',
... | 19.105263 | 47 | 0.584022 | 278 | 0.76584 | 0 | 0 | 0 | 0 | 0 | 0 | 105 | 0.289256 |
ec43f38ce7e8616b6ecbb84b8e45c133aaf66327 | 2,849 | py | Python | blog/projectCode.py | iloveyougit/ylink2 | a87d8fde79ab259012cd6486299fcf86e1afc740 | [
"MIT"
] | null | null | null | blog/projectCode.py | iloveyougit/ylink2 | a87d8fde79ab259012cd6486299fcf86e1afc740 | [
"MIT"
] | null | null | null | blog/projectCode.py | iloveyougit/ylink2 | a87d8fde79ab259012cd6486299fcf86e1afc740 | [
"MIT"
] | null | null | null |
from django.shortcuts import redirect
from django.shortcuts import render
from django.utils import timezone
from .models import Post,views
from django.shortcuts import render, get_object_or_404
from .forms import PostForm
import youtube_dl
from django.core.files import File
from .models import FileSaver
import codecs... | 32.747126 | 100 | 0.531064 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 415 | 0.145665 |
ec442408ef5cfbb32ec2566e55d4fa5067d76b3e | 1,042 | py | Python | tests/test_helper.py | ajrox090/VaRA-Tool-Suite | 1550d36a4049e0615afb0bacfb96b1d506a29c98 | [
"BSD-2-Clause"
] | 8 | 2019-10-30T08:07:44.000Z | 2020-11-13T08:02:36.000Z | tests/test_helper.py | ajrox090/VaRA-Tool-Suite | 1550d36a4049e0615afb0bacfb96b1d506a29c98 | [
"BSD-2-Clause"
] | 342 | 2019-02-14T15:53:31.000Z | 2020-11-03T18:11:27.000Z | tests/test_helper.py | ajrox090/VaRA-Tool-Suite | 1550d36a4049e0615afb0bacfb96b1d506a29c98 | [
"BSD-2-Clause"
] | 5 | 2021-04-28T17:05:16.000Z | 2022-03-31T23:11:22.000Z | """Small helper classes for testing."""
import typing as tp
import plumbum as pb
from benchbuild.source import Variant, FetchableSource
class BBTestSource(FetchableSource):
"""Source test fixture class."""
test_versions: tp.List[str]
def __init__(
self, test_versions: tp.List[str], local: str,... | 26.717949 | 69 | 0.652591 | 901 | 0.864683 | 0 | 0 | 271 | 0.260077 | 0 | 0 | 169 | 0.162188 |
ec45f10d301fdd0d325a8177f688357eddd958d5 | 33,366 | py | Python | reference_kernels/PetFinder Slow and Steady Feature Building.py | MarcusJones/kaggle_petfinder_adoption | 2d745b48405f4d4211b523eae272b9169fcf9fa2 | [
"MIT"
] | 1 | 2019-01-24T04:22:39.000Z | 2019-01-24T04:22:39.000Z | reference_kernels/PetFinder Slow and Steady Feature Building.py | MarcusJones/kaggle_petfinder_adoption | 2d745b48405f4d4211b523eae272b9169fcf9fa2 | [
"MIT"
] | null | null | null | reference_kernels/PetFinder Slow and Steady Feature Building.py | MarcusJones/kaggle_petfinder_adoption | 2d745b48405f4d4211b523eae272b9169fcf9fa2 | [
"MIT"
] | null | null | null | '''
If you find this useful, please give a thumbs up!
Thanks!
- Claire & Alhan
https://github.com/alhankeser/kaggle-petfinder
'''
# External libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# from sklearn.linear_model import LogisticRegression
from sklearn.ensemb... | 35.723769 | 102 | 0.543457 | 29,122 | 0.872805 | 0 | 0 | 0 | 0 | 0 | 0 | 6,136 | 0.1839 |
ec4649677b2490023b21a9d452d053eff7e18fef | 58,219 | py | Python | bin/backup.py | TechGeek01/BackDrop | 9f72bcc4027df6bfa64b645cd6eb0e4148ae5557 | [
"MIT"
] | 49 | 2020-09-12T13:04:40.000Z | 2022-03-04T16:48:26.000Z | bin/backup.py | TechGeek01/BackDrop | 9f72bcc4027df6bfa64b645cd6eb0e4148ae5557 | [
"MIT"
] | 1 | 2021-03-12T03:14:31.000Z | 2021-03-12T03:14:31.000Z | bin/backup.py | TechGeek01/BackDrop | 9f72bcc4027df6bfa64b645cd6eb0e4148ae5557 | [
"MIT"
] | 1 | 2021-03-21T19:01:13.000Z | 2021-03-21T19:01:13.000Z | from tkinter import messagebox
import os
import itertools
from datetime import datetime
import shutil
import pickle
from bin.fileutils import human_filesize, get_directory_size
from bin.color import bcolor
from bin.threadmanager import ThreadManager
from bin.config import Config
from bin.status import Status
class Ba... | 51.796263 | 279 | 0.571892 | 57,906 | 0.994624 | 0 | 0 | 0 | 0 | 0 | 0 | 17,417 | 0.299164 |
ec4668ea105fe43b89baef884539542d10b494a5 | 1,134 | py | Python | From Another World/bullet.py | Grantlee11/From_Another_World_Pygame | 1aa98162a458a1a4aacfbc9170eaa233db055e9e | [
"CC-BY-3.0"
] | null | null | null | From Another World/bullet.py | Grantlee11/From_Another_World_Pygame | 1aa98162a458a1a4aacfbc9170eaa233db055e9e | [
"CC-BY-3.0"
] | null | null | null | From Another World/bullet.py | Grantlee11/From_Another_World_Pygame | 1aa98162a458a1a4aacfbc9170eaa233db055e9e | [
"CC-BY-3.0"
] | null | null | null | import pygame
from pygame.sprite import Sprite
class Bullet(Sprite):
"""A CLASS TO MANAGE BULLETS FIRED FROM THE SHIP"""
def __init__(self, ai_settings, screen, ship):
"""CREATE A BULLET OBJECT AT THE SHIP'S CURRENT POSITION"""
super(Bullet, self).__init__()
self.screen = screen
... | 34.363636 | 90 | 0.638448 | 1,077 | 0.949735 | 0 | 0 | 0 | 0 | 0 | 0 | 359 | 0.316578 |
ec4acbb13573dbfd3ec65423e098e4ec53a68a25 | 20 | py | Python | test/try.py | realjiangjiapeng/killing-time | ad9c60953b623e6701170a4d823afb492f6a0140 | [
"Apache-2.0"
] | null | null | null | test/try.py | realjiangjiapeng/killing-time | ad9c60953b623e6701170a4d823afb492f6a0140 | [
"Apache-2.0"
] | null | null | null | test/try.py | realjiangjiapeng/killing-time | ad9c60953b623e6701170a4d823afb492f6a0140 | [
"Apache-2.0"
] | null | null | null | print ('HELLO JJP')
| 10 | 19 | 0.65 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.55 |
ec4d41b5339a13570027a14f5668646325d52607 | 1,648 | py | Python | tcc_rpi/adafruit_mcp3008.py | MegaNo0body/tcc | 469824a8afc1cf846793212d42f6c8c43ee4b0bf | [
"MIT"
] | 1 | 2016-09-29T22:39:31.000Z | 2016-09-29T22:39:31.000Z | tcc_rpi/adafruit_mcp3008.py | MegaNo0body/tcc | 469824a8afc1cf846793212d42f6c8c43ee4b0bf | [
"MIT"
] | null | null | null | tcc_rpi/adafruit_mcp3008.py | MegaNo0body/tcc | 469824a8afc1cf846793212d42f6c8c43ee4b0bf | [
"MIT"
] | null | null | null | import time
import os
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
# read SPI data from MCP3008 chip, 8 possible adc's (0 thru 7)
def readadc(adcnum, clockpin, mosipin, misopin, cspin):
if ((adcnum > 7) or (adcnum < 0)):
return -1
GPIO.output(cspin, True)
GPIO.output(clockpin, False) # start clock low
GPIO.... | 21.684211 | 66 | 0.695995 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 372 | 0.225728 |
ec4ed3cf60eb8edf8d45b20754549aa35c4fac16 | 237 | py | Python | core/templatetags/core_tags.py | samshultz/techbitsdata | 753309cbfee7bfa9a08804786f29b37f2b058436 | [
"BSD-3-Clause"
] | null | null | null | core/templatetags/core_tags.py | samshultz/techbitsdata | 753309cbfee7bfa9a08804786f29b37f2b058436 | [
"BSD-3-Clause"
] | null | null | null | core/templatetags/core_tags.py | samshultz/techbitsdata | 753309cbfee7bfa9a08804786f29b37f2b058436 | [
"BSD-3-Clause"
] | null | null | null | from django import template
from ..models import HomePage
register = template.Library()
@register.simple_tag
def get_homepages(count=None):
if count:
return HomePage.objects.all()[:count]
return HomePage.objects.all()
| 19.75 | 45 | 0.734177 | 0 | 0 | 0 | 0 | 145 | 0.611814 | 0 | 0 | 0 | 0 |
ec50387d2267d7e50a0c69f978fb2011b6de161c | 1,720 | py | Python | apps/poker/views/settings.py | deniskrumko/izyan-poker | ce70c9c8f761409adad289809e5220237b312407 | [
"MIT"
] | 6 | 2019-08-05T07:37:52.000Z | 2021-12-30T20:07:01.000Z | apps/poker/views/settings.py | deniskrumko/izyan-poker | ce70c9c8f761409adad289809e5220237b312407 | [
"MIT"
] | 8 | 2019-10-25T11:07:03.000Z | 2021-06-10T18:43:42.000Z | apps/poker/views/settings.py | deniskrumko/izyan-poker | ce70c9c8f761409adad289809e5220237b312407 | [
"MIT"
] | 1 | 2019-10-07T15:44:26.000Z | 2019-10-07T15:44:26.000Z | from core.views import BaseView, LoginRequiredMixin
from ..models import PokerMember, PokerRoom
class SettingsView(LoginRequiredMixin, BaseView):
template_name = 'settings.html'
def get(self, request, token):
"""Handle GET request."""
if not self.member:
return self.redirect('po... | 29.655172 | 77 | 0.591279 | 1,620 | 0.94186 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.12907 |
ec514a23b742340bf44e16e67b44d06088405dd5 | 31 | py | Python | hyperhdr/__init__.py | mjoshd/hypehdr-py | 3810c53c9fe886f24709ef84dd8f18cb73ed5ef6 | [
"MIT"
] | null | null | null | hyperhdr/__init__.py | mjoshd/hypehdr-py | 3810c53c9fe886f24709ef84dd8f18cb73ed5ef6 | [
"MIT"
] | null | null | null | hyperhdr/__init__.py | mjoshd/hypehdr-py | 3810c53c9fe886f24709ef84dd8f18cb73ed5ef6 | [
"MIT"
] | null | null | null | """HyperHDR Client package."""
| 15.5 | 30 | 0.677419 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.967742 |
ec545f5cfc4fcdee419e0c7a9b54b019429904f9 | 6,268 | py | Python | test/phase_descriptor_test.py | frankalicious/openhtf | f74740065eac9b1af96638f100b816ec773f084b | [
"Apache-2.0"
] | null | null | null | test/phase_descriptor_test.py | frankalicious/openhtf | f74740065eac9b1af96638f100b816ec773f084b | [
"Apache-2.0"
] | null | null | null | test/phase_descriptor_test.py | frankalicious/openhtf | f74740065eac9b1af96638f100b816ec773f084b | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Google Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agre... | 32.989474 | 80 | 0.757339 | 4,750 | 0.757817 | 0 | 0 | 847 | 0.135131 | 0 | 0 | 1,394 | 0.222399 |
ec548b3d676f9272d1291e93d1e7d30817e527b7 | 94 | py | Python | dashtable/html2data/restructify/converters/convert_tt.py | r-dgreen/DashTable | 744cfb6a717fa75a8092c83ebcd49b2668023681 | [
"MIT"
] | 35 | 2017-04-25T04:37:16.000Z | 2022-02-23T05:44:37.000Z | dashtable/html2data/restructify/converters/convert_tt.py | r-dgreen/DashTable | 744cfb6a717fa75a8092c83ebcd49b2668023681 | [
"MIT"
] | 14 | 2016-12-11T12:00:48.000Z | 2021-06-13T06:52:09.000Z | dashtable/html2data/restructify/converters/convert_tt.py | r-dgreen/DashTable | 744cfb6a717fa75a8092c83ebcd49b2668023681 | [
"MIT"
] | 11 | 2017-04-05T14:10:16.000Z | 2022-02-14T16:32:18.000Z | def convert_tt(element, text):
if text:
text = "``" + text + "``"
return text
| 18.8 | 33 | 0.510638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.085106 |
ec58e48e50bae8cea63a104f2bb6e36683806f7e | 954 | py | Python | eureka/lib/models_c/py_func/fixipmapping.py | iancrossfield/Eureka | 88b178d1b830c16915045b6387cf91955e0071e2 | [
"MIT"
] | null | null | null | eureka/lib/models_c/py_func/fixipmapping.py | iancrossfield/Eureka | 88b178d1b830c16915045b6387cf91955e0071e2 | [
"MIT"
] | null | null | null | eureka/lib/models_c/py_func/fixipmapping.py | iancrossfield/Eureka | 88b178d1b830c16915045b6387cf91955e0071e2 | [
"MIT"
] | null | null | null |
def fixipmapping(ipparams, posflux, etc = [], retbinflux = False, retbinstd = False):
"""
This function returns the fixed best-fit intra-pixel mapping.
Parameters
----------
ipparams : tuple
unused
bestmip : 1D array, size = # of measurements
Best-fit ip mapping
... | 26.5 | 85 | 0.584906 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 539 | 0.56499 |
ec5935855d0506591f11a5c9e27865542c48e32b | 528 | py | Python | tests/wrapper/testsuite.py | gimbas/openinput | 9cbb4b22aebe46dfc33ae9c56b164baa6c1fe693 | [
"MIT"
] | 38 | 2020-05-11T10:54:15.000Z | 2022-03-30T13:19:09.000Z | tests/wrapper/testsuite.py | gimbas/openinput | 9cbb4b22aebe46dfc33ae9c56b164baa6c1fe693 | [
"MIT"
] | 45 | 2020-04-21T23:52:22.000Z | 2022-02-19T20:29:27.000Z | tests/wrapper/testsuite.py | gimbas/openinput | 9cbb4b22aebe46dfc33ae9c56b164baa6c1fe693 | [
"MIT"
] | 5 | 2020-08-29T02:10:42.000Z | 2021-08-31T03:12:15.000Z | # SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Filipe Laíns <lains@riseup.net>
from typing import List, Set
import _testsuite
import pages
class Device(_testsuite.Device):
def __init__(
self,
*,
name: str,
functions: Set[pages.Function],
) -> None:
supe... | 22 | 66 | 0.617424 | 369 | 0.697543 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.257089 |
6b4d9a6e0e5c5d86e75fae6c447399df838120d1 | 1,899 | py | Python | tests/test_api_custom_records.py | ujjwalsh/gfapy | 891ef3df695f20c67809e5a54549c876d90690b4 | [
"ISC"
] | 44 | 2017-03-18T08:08:04.000Z | 2021-11-10T16:11:15.000Z | tests/test_api_custom_records.py | ujjwalsh/gfapy | 891ef3df695f20c67809e5a54549c876d90690b4 | [
"ISC"
] | 22 | 2017-04-04T21:20:31.000Z | 2022-03-09T19:05:30.000Z | tests/test_api_custom_records.py | ujjwalsh/gfapy | 891ef3df695f20c67809e5a54549c876d90690b4 | [
"ISC"
] | 5 | 2017-07-07T02:56:56.000Z | 2020-09-30T20:10:49.000Z | import gfapy
import unittest
class TestApiCustomRecords(unittest.TestCase):
def test_from_string(self):
str1 = "X\tthis is a\tcustom line"
l1 = gfapy.Line(str1)
self.assertEqual(gfapy.line.CustomRecord, l1.__class__)
self.assertEqual("X", l1.record_type)
self.assertEqual("this is a", l1.field1)
... | 35.166667 | 77 | 0.685097 | 1,867 | 0.983149 | 0 | 0 | 0 | 0 | 0 | 0 | 308 | 0.162191 |
6b4e1b1bc987c52d6c0e7593fd09888aadeb2e7c | 2,562 | py | Python | apps/pet/models.py | glenjasper/cobija-web | 9a623daae9fba1b423b8fd690a25139ed8d06d7c | [
"MIT"
] | null | null | null | apps/pet/models.py | glenjasper/cobija-web | 9a623daae9fba1b423b8fd690a25139ed8d06d7c | [
"MIT"
] | null | null | null | apps/pet/models.py | glenjasper/cobija-web | 9a623daae9fba1b423b8fd690a25139ed8d06d7c | [
"MIT"
] | null | null | null | from django.db import models
from auditlog.registry import auditlog
from apps.core.models import (
TypePet,
PetSize,
PetColor,
)
from apps.partner.models import Partner
class Pet(models.Model):
MAN = 1
WOMAN = 2
SEX_CHOICES = (
(MAN, 'Male'),
(WOMAN, 'Female'),
)
name = ... | 44.172414 | 149 | 0.684621 | 2,325 | 0.907494 | 0 | 0 | 0 | 0 | 0 | 0 | 378 | 0.147541 |
6b4fc78528b44e95eeb827b77773dc7dd92da655 | 42 | py | Python | src/asphalt/__main__.py | agronholm/asphalt | 7b81a71941047770612aeea67e2b3332f92b5c18 | [
"Apache-2.0"
] | 226 | 2015-08-19T16:57:32.000Z | 2022-03-31T22:28:18.000Z | src/asphalt/__main__.py | Asphalt-framework/asphalt | 7b81a71941047770612aeea67e2b3332f92b5c18 | [
"Apache-2.0"
] | 31 | 2015-09-05T11:18:33.000Z | 2019-03-25T10:51:17.000Z | src/asphalt/__main__.py | Asphalt-framework/asphalt | 7b81a71941047770612aeea67e2b3332f92b5c18 | [
"Apache-2.0"
] | 11 | 2015-09-04T21:43:34.000Z | 2017-12-08T19:06:20.000Z | from asphalt.core.cli import main
main()
| 10.5 | 33 | 0.761905 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6b50bc21a879c10d78635d8cfc74815310051f21 | 171 | py | Python | examples/todo_app/app/main/__init__.py | MarkoShiva/quart | f6709c6082a3cab9dffdcd937122f4d65a5990f7 | [
"MIT"
] | 1,085 | 2017-11-12T10:56:50.000Z | 2022-03-31T15:14:26.000Z | examples/todo_app/app/main/__init__.py | MarkoShiva/quart | f6709c6082a3cab9dffdcd937122f4d65a5990f7 | [
"MIT"
] | 139 | 2017-12-04T09:22:48.000Z | 2022-03-26T08:34:07.000Z | examples/todo_app/app/main/__init__.py | MarkoShiva/quart | f6709c6082a3cab9dffdcd937122f4d65a5990f7 | [
"MIT"
] | 92 | 2017-12-08T09:55:02.000Z | 2022-03-29T20:45:44.000Z | from quart import Blueprint
main = Blueprint(
"main", __name__, template_folder="templates", static_folder="static", static_url_path="/main"
)
from .routes import *
| 21.375 | 98 | 0.74269 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.187135 |
6b51ed2276c15330f34681cdb67ebc37a03da0b9 | 19,172 | py | Python | instalation.py | hizulu/distributed-messaging-ZeroMQ-Pipeline | 801fc36db4d6d6db32c8303d555173ff6b509a1d | [
"MIT"
] | null | null | null | instalation.py | hizulu/distributed-messaging-ZeroMQ-Pipeline | 801fc36db4d6d6db32c8303d555173ff6b509a1d | [
"MIT"
] | null | null | null | instalation.py | hizulu/distributed-messaging-ZeroMQ-Pipeline | 801fc36db4d6d6db32c8303d555173ff6b509a1d | [
"MIT"
] | null | null | null | from DatabaseConnection import DatabaseConnection
import string
import random
class Instalation:
def __init__(self, dbhost, dbname, dbusername, dbpass):
self.dbName = dbname
# self.dbName = env.DB_NAME
self.db = DatabaseConnection(
dbhost, dbusername, dbpass, dbname)
def ... | 38.344 | 223 | 0.566086 | 18,823 | 0.981796 | 0 | 0 | 0 | 0 | 0 | 0 | 12,446 | 0.649176 |
6b52404b34e800022dd365893740527732762f87 | 1,846 | py | Python | board.py | Jonathantm0000/CSC_120_Tic_Tac_Toe | 0cd3931356ad666069e035725eefaf7c62a5147e | [
"MIT"
] | null | null | null | board.py | Jonathantm0000/CSC_120_Tic_Tac_Toe | 0cd3931356ad666069e035725eefaf7c62a5147e | [
"MIT"
] | null | null | null | board.py | Jonathantm0000/CSC_120_Tic_Tac_Toe | 0cd3931356ad666069e035725eefaf7c62a5147e | [
"MIT"
] | null | null | null | rows = [['-', '-', '-'], ['-', '-', '-'], ['-', '-', '-']]
turn = 'o'
def printboard():
for x in range(len(rows)):
print(rows[x])
def placexo(move1, move2, xoturn):
if rows[move1-1][move2-1] == '-':
rows[move1-1][move2-1] = xoturn
else:
print("that... | 29.774194 | 58 | 0.514626 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 392 | 0.212351 |
6b53c82a899931d14d8bb93ef6af1dd5a044eb99 | 1,267 | py | Python | Desafios/desafio033.py | VanessaCML/python | 56133b9000ba89154f37038e11a3c2d1aa6d1094 | [
"MIT"
] | null | null | null | Desafios/desafio033.py | VanessaCML/python | 56133b9000ba89154f37038e11a3c2d1aa6d1094 | [
"MIT"
] | null | null | null | Desafios/desafio033.py | VanessaCML/python | 56133b9000ba89154f37038e11a3c2d1aa6d1094 | [
"MIT"
] | null | null | null | '''n1 = int(input('Digite um número: '))
n2 = int(input('Digite outro: '))
n3 = int(input('Digite mais um número: '))
maior = n1
if n2 > n1 and n2 > n3:
maior = n2
if n3 > n1 and n3 > n2:
maior = n3
menor = n1
if n2 < n1 and n2 < 3:
menor = n2
if n3 < n1 and n3 < n2:
menor = n3
print(f'O maior é {maior}... | 26.395833 | 63 | 0.633781 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,164 | 0.904429 |
6b5777218307549903cb2345128d7e8e433b52f0 | 20,289 | py | Python | opencoverage/clients/scm/gitlab.py | everfighter/opencoverage | 7a01c2d11d1ad70aa41cca8c7b050af996a54b8a | [
"MIT"
] | 1 | 2021-03-19T06:20:49.000Z | 2021-03-19T06:20:49.000Z | opencoverage/clients/scm/gitlab.py | everfighter/opencoverage | 7a01c2d11d1ad70aa41cca8c7b050af996a54b8a | [
"MIT"
] | null | null | null | opencoverage/clients/scm/gitlab.py | everfighter/opencoverage | 7a01c2d11d1ad70aa41cca8c7b050af996a54b8a | [
"MIT"
] | null | null | null | import time
from datetime import datetime, timedelta, timezone
from typing import (
Any,
AsyncIterator,
Dict,
List,
Optional,
cast,
)
import aiohttp_client
import jwt
import pydantic
from cryptography.hazmat.backends import default_backend
from opencoverage.settings import Settings
from openco... | 33.315271 | 115 | 0.555818 | 15,874 | 0.782394 | 784 | 0.038642 | 0 | 0 | 6,514 | 0.321061 | 10,668 | 0.525802 |
6b57fc39f4fd2e01c5a6e624252774aacda18038 | 2,578 | py | Python | samples/summarize-bot/dialogs/main_dialog.py | tsuwandy/botbuilder-community-python | e035a993cd3b0fd8c7b2ff1126c4e993d0c8efc3 | [
"MIT"
] | null | null | null | samples/summarize-bot/dialogs/main_dialog.py | tsuwandy/botbuilder-community-python | e035a993cd3b0fd8c7b2ff1126c4e993d0c8efc3 | [
"MIT"
] | null | null | null | samples/summarize-bot/dialogs/main_dialog.py | tsuwandy/botbuilder-community-python | e035a993cd3b0fd8c7b2ff1126c4e993d0c8efc3 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""Main dialog. """
from botbuilder.dialogs import (
ComponentDialog,
WaterfallDialog,
WaterfallStepContext,
DialogTurnResult,
)
from botbuilder.dialogs.prompts import TextPrompt, PromptOptions
from botbuilder.... | 39.661538 | 135 | 0.689294 | 2,102 | 0.815361 | 0 | 0 | 0 | 0 | 1,497 | 0.580683 | 500 | 0.193949 |
6b5832f803883a22182b709c9785af4bb2e2a7ee | 3,642 | py | Python | handroll/composers/__init__.py | mblayman/handroll | 42703cf5c969dccd0eb0715402ab84056ab65e22 | [
"BSD-2-Clause"
] | null | null | null | handroll/composers/__init__.py | mblayman/handroll | 42703cf5c969dccd0eb0715402ab84056ab65e22 | [
"BSD-2-Clause"
] | null | null | null | handroll/composers/__init__.py | mblayman/handroll | 42703cf5c969dccd0eb0715402ab84056ab65e22 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2014, Matt Layman
import filecmp
import os
import shutil
import warnings
from pkg_resources import iter_entry_points
from handroll import logger
from handroll.i18n import _
class Composer(object):
"""Interface for all composers"""
def compose(self, catalog, source_file, out_dir):
"... | 36.787879 | 78 | 0.643053 | 3,441 | 0.944811 | 0 | 0 | 0 | 0 | 0 | 0 | 1,683 | 0.462109 |
6b5996da8b34c0a4be0d4d087a09cebecb6f4856 | 1,656 | py | Python | tests/test_volunteer.py | MissionBit/MB_Portal | a8bbde9c25b0863a193cb4adb7a419493dd322ff | [
"PostgreSQL"
] | 1 | 2019-08-12T01:57:11.000Z | 2019-08-12T01:57:11.000Z | tests/test_volunteer.py | MissionBit/MB_Portal | a8bbde9c25b0863a193cb4adb7a419493dd322ff | [
"PostgreSQL"
] | 35 | 2019-06-25T01:09:43.000Z | 2022-02-10T08:13:09.000Z | tests/test_volunteer.py | MissionBit/MB_Portal | a8bbde9c25b0863a193cb4adb7a419493dd322ff | [
"PostgreSQL"
] | 2 | 2019-07-02T17:25:42.000Z | 2019-07-18T00:05:58.000Z | from django.test import TestCase, RequestFactory
from volunteer.views import *
from django.contrib.auth.models import User, Group
from django.urls import reverse
from rest_framework import status
"""
class BaseTestCase(TestCase):
def create_authenticated_volunteer_user(self):
user = User.objects.create_use... | 36 | 76 | 0.677536 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,458 | 0.880435 |
6b5b594a8ddc22e1ab3c6c0d7edc6fdc3c650bfc | 14,791 | py | Python | git_jdime.py | xai/jdime-utils | b5978a4572afbeaa3e4a9f72cfdccc0a14ee0cf8 | [
"MIT"
] | null | null | null | git_jdime.py | xai/jdime-utils | b5978a4572afbeaa3e4a9f72cfdccc0a14ee0cf8 | [
"MIT"
] | null | null | null | git_jdime.py | xai/jdime-utils | b5978a4572afbeaa3e4a9f72cfdccc0a14ee0cf8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (C) 2017 Olaf Lessenich
import argparse
import csv
import os
import sys
import tempfile
import time
import signal
import statistics
import psutil
from plumbum import colors
from plumbum import local
from plumbum.cmd import grep
from plumbum.commands.processes import ProcessExecutio... | 38.719895 | 114 | 0.423366 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,334 | 0.157799 |
6b5ba9e7cc299303aeb45f7e67c51d27bbdf3426 | 3,863 | py | Python | wagtail_automatic_redirects/signal_handlers.py | tbrlpld/wagtail-automatic-redirects | 70ff04c7aeb64916f6827c4b84616a4c96d64a5e | [
"BSD-3-Clause"
] | 13 | 2020-02-13T20:55:32.000Z | 2021-12-11T21:20:20.000Z | wagtail_automatic_redirects/signal_handlers.py | tbrlpld/wagtail-automatic-redirects | 70ff04c7aeb64916f6827c4b84616a4c96d64a5e | [
"BSD-3-Clause"
] | 6 | 2020-05-19T21:06:20.000Z | 2021-05-28T13:31:09.000Z | wagtail_automatic_redirects/signal_handlers.py | tbrlpld/wagtail-automatic-redirects | 70ff04c7aeb64916f6827c4b84616a4c96d64a5e | [
"BSD-3-Clause"
] | 4 | 2020-05-19T13:40:05.000Z | 2021-03-03T21:36:48.000Z | from wagtail import VERSION as WAGTAIL_VERSION
if WAGTAIL_VERSION >= (2, 0):
from wagtail.core.signals import page_published
from wagtail.contrib.redirects.models import Redirect
if WAGTAIL_VERSION >= (2, 10):
from wagtail.core.signals import post_page_move
else:
post_page_move = None
... | 39.418367 | 79 | 0.683407 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,368 | 0.354129 |
6b5c6925b389b1b726a316fd95e267319608e4ab | 1,377 | py | Python | main.py | tegarimansyah/download-folder-manager | 1c93e5a513107fd65ac74ec5afb5f203d739b75e | [
"MIT"
] | null | null | null | main.py | tegarimansyah/download-folder-manager | 1c93e5a513107fd65ac74ec5afb5f203d739b75e | [
"MIT"
] | null | null | null | main.py | tegarimansyah/download-folder-manager | 1c93e5a513107fd65ac74ec5afb5f203d739b75e | [
"MIT"
] | null | null | null | import os
import glob
import pprint
from pathlib import Path
# Setup
pp = pprint.PrettyPrinter(indent=4)
# All variable
DOWNLOAD_FOLDER_PATH = os.path.join( # add trailing slash
os.getenv('DOWNLOAD_FOLDER_PATH', f'{Path.home()}/Downloads/') # get from env
)
def extract_file_data(filepath):
_, file_extension ... | 28.6875 | 97 | 0.69281 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 248 | 0.180102 |
6b5c790a442c8ec83937f33d65197c87f874fb7f | 4,295 | py | Python | dane/handlers/RabbitMQHandler.py | CLARIAH/DANE-util | 8a3edec69be18ac3bdee476b65059409af05c1bb | [
"Apache-2.0"
] | 2 | 2020-11-24T11:03:14.000Z | 2021-03-25T13:25:35.000Z | DANE/handlers/RabbitMQHandler.py | CLARIAH/DANE | c27b11d6fe6dc1da5097d90b32bcee64fdc27837 | [
"Apache-2.0"
] | 1 | 2019-12-11T19:46:20.000Z | 2019-12-11T21:30:38.000Z | DANE/handlers/RabbitMQHandler.py | CLARIAH/DANE | c27b11d6fe6dc1da5097d90b32bcee64fdc27837 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-present, Netherlands Institute for Sound and Vision (Nanne van Noord)
#
# 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
#
#... | 37.675439 | 86 | 0.56298 | 3,391 | 0.789523 | 0 | 0 | 0 | 0 | 0 | 0 | 1,089 | 0.253551 |
6b5f1427746108b86dc7e91797ab19861fcd228b | 947 | py | Python | src/Exercise_3/src/plots.py | djeada/Stanford-Machine-Learning | e6ef77939b7c581aebb5e9454669ad2dbb4f98f0 | [
"MIT"
] | null | null | null | src/Exercise_3/src/plots.py | djeada/Stanford-Machine-Learning | e6ef77939b7c581aebb5e9454669ad2dbb4f98f0 | [
"MIT"
] | null | null | null | src/Exercise_3/src/plots.py | djeada/Stanford-Machine-Learning | e6ef77939b7c581aebb5e9454669ad2dbb4f98f0 | [
"MIT"
] | null | null | null | """"
The goal of this module is to implement all the visualization
tools needed to graph the data and results of the computations
for the Task 3 from the coding homeworks in the Machine Learning
course on coursera.com.
"""
import numpy as np
import matplotlib.pyplot as plt
def display_random_grid(x: np.ndarray, n: i... | 27.057143 | 100 | 0.658923 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 611 | 0.645195 |
6b5fc469401c2f362fdf002998b116a3986b767e | 708 | py | Python | backend/schemas.py | gfoo/EcoPart-demo | d358df3187c442a0dacf455d49e274e2e9184a48 | [
"Unlicense"
] | null | null | null | backend/schemas.py | gfoo/EcoPart-demo | d358df3187c442a0dacf455d49e274e2e9184a48 | [
"Unlicense"
] | null | null | null | backend/schemas.py | gfoo/EcoPart-demo | d358df3187c442a0dacf455d49e274e2e9184a48 | [
"Unlicense"
] | null | null | null |
from datetime import datetime
from pydantic import BaseModel
class BaseObject(BaseModel):
class Config:
orm_mode = True
class Profile(BaseObject):
name: str
class Ship(BaseObject):
name: str
class Cruise(BaseObject):
name: str
class IdentifiedObject(BaseObject):
id: int
class ... | 13.111111 | 35 | 0.69774 | 614 | 0.867232 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6b5fd207e69fc80407e2e9f565ac8467717e39c5 | 986 | py | Python | dit/object_detection/adaptive_binarize.py | guotao0628/DeepNet | 1ae74d8b44d715bf67c7d64a8efafff4b7c7937a | [
"MIT"
] | 1 | 2021-11-07T00:30:05.000Z | 2021-11-07T00:30:05.000Z | dit/object_detection/adaptive_binarize.py | guotao0628/DeepNet | 1ae74d8b44d715bf67c7d64a8efafff4b7c7937a | [
"MIT"
] | null | null | null | dit/object_detection/adaptive_binarize.py | guotao0628/DeepNet | 1ae74d8b44d715bf67c7d64a8efafff4b7c7937a | [
"MIT"
] | null | null | null | import argparse
import os
import cv2
import tqdm
def convert(fn):
# given a file name, convert it into binary and store at the same position
img = cv2.imread(fn)
gim = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
gim = cv2.adaptiveThreshold(gim, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 45, 11)... | 29 | 100 | 0.649087 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 198 | 0.200811 |
6b6059c1ae8d47bd945bfad33b428be5907af739 | 1,233 | py | Python | 3. Numbers/numbers-python.py | guruawate/PYTHON-CODEBASE | 1a8eff9e81a49a2fc3ca99d26588c15a97cbe379 | [
"MIT"
] | 4 | 2017-03-29T17:03:22.000Z | 2018-10-17T11:50:43.000Z | 3. Numbers/numbers-python.py | guruawate/PYTHON-CODEBASE | 1a8eff9e81a49a2fc3ca99d26588c15a97cbe379 | [
"MIT"
] | null | null | null | 3. Numbers/numbers-python.py | guruawate/PYTHON-CODEBASE | 1a8eff9e81a49a2fc3ca99d26588c15a97cbe379 | [
"MIT"
] | 2 | 2017-09-13T18:17:22.000Z | 2018-10-17T11:50:44.000Z | message = """\n\nThere are 3 types of numbers in python-3
Now we will see python-3 numbers,
namely: int, float & complex. (there is no need for long)
ints are whole numbers and floats are real numbers.
w... | 26.234043 | 93 | 0.547445 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 991 | 0.803731 |
6b61dd6ba514fdd5aff437d1bd860e1a3aa68538 | 109 | py | Python | angr/procedures/libc/setvbuf.py | Kyle-Kyle/angr | 345b2131a7a67e3a6ffc7d9fd475146a3e12f837 | [
"BSD-2-Clause"
] | 6,132 | 2015-08-06T23:24:47.000Z | 2022-03-31T21:49:34.000Z | angr/procedures/libc/setvbuf.py | Kyle-Kyle/angr | 345b2131a7a67e3a6ffc7d9fd475146a3e12f837 | [
"BSD-2-Clause"
] | 2,272 | 2015-08-10T08:40:07.000Z | 2022-03-31T23:46:44.000Z | angr/procedures/libc/setvbuf.py | Kyle-Kyle/angr | 345b2131a7a67e3a6ffc7d9fd475146a3e12f837 | [
"BSD-2-Clause"
] | 1,155 | 2015-08-06T23:37:39.000Z | 2022-03-31T05:54:11.000Z | import angr
class setvbuf(angr.SimProcedure):
def run(self, stream, buf, type_, size):
return 0
| 18.166667 | 44 | 0.669725 | 95 | 0.87156 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6b62a1b0dff941851becc78ed4922a7c9853d341 | 3,685 | py | Python | src/mode/modeopening3.py | JovialKnoll/monsters | 15d969d0220fd003c2c28ae690f66633da370682 | [
"MIT"
] | 2 | 2017-05-14T06:37:14.000Z | 2022-03-07T02:25:32.000Z | src/mode/modeopening3.py | JovialKnoll/monsters | 15d969d0220fd003c2c28ae690f66633da370682 | [
"MIT"
] | 2 | 2017-10-08T19:41:18.000Z | 2021-04-08T04:40:50.000Z | src/mode/modeopening3.py | JovialKnoll/monsters | 15d969d0220fd003c2c28ae690f66633da370682 | [
"MIT"
] | null | null | null | import random
from collections import deque
import pygame
import constants
import shared
from monster import Monster
from .modeintroduction0 import ModeIntroduction0
from .modeopening import ModeOpening
class ModeOpening3(ModeOpening):
GROUND_LEVEL = constants.SCREEN_SIZE[1] - 8
CENTER_TIME = 2500
TRANS... | 34.439252 | 94 | 0.617096 | 3,477 | 0.943555 | 0 | 0 | 0 | 0 | 0 | 0 | 313 | 0.084939 |
6b630feef7b82478ebf730437b4ab760f83635c1 | 1,651 | py | Python | onadata/apps/logger/management/commands/sync_deleted_instances_fix.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/logger/management/commands/sync_deleted_instances_fix.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/logger/management/commands/sync_deleted_instances_fix.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4 fileencoding=utf-8
# coding: utf-8
from __future__ import unicode_literals, print_function, division, absolute_import
import json
from django.conf import settings
from django.core.management import BaseCommand
from django.utils import timezone
from django.utils.datep... | 36.688889 | 82 | 0.63295 | 1,201 | 0.727438 | 0 | 0 | 0 | 0 | 0 | 0 | 360 | 0.21805 |
6b637d51ee53d130d2f22a3cc30f1efdedb53487 | 445 | py | Python | douyinspider/structures/__init__.py | MisterZhouZhou/pythonThreeSpider | 0e120350402f690158c89b7431f243cb462ae12f | [
"Apache-2.0"
] | 3 | 2019-11-05T01:00:05.000Z | 2021-03-16T03:56:46.000Z | douyinspider/structures/__init__.py | bingwin/pythonThreeSpider | 0e120350402f690158c89b7431f243cb462ae12f | [
"Apache-2.0"
] | null | null | null | douyinspider/structures/__init__.py | bingwin/pythonThreeSpider | 0e120350402f690158c89b7431f243cb462ae12f | [
"Apache-2.0"
] | 1 | 2020-05-16T12:45:36.000Z | 2020-05-16T12:45:36.000Z | from douyinspider.structures.hot import *
from douyinspider.structures.base import Base
from douyinspider.structures.music import Music
from douyinspider.structures.user import User
from douyinspider.structures.video import Video
from douyinspider.structures.address import Address
from douyinspider.structures.topic imp... | 44.5 | 68 | 0.876404 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6b63ba2575b08e6d1979a05d2e94572ca308d8dd | 1,149 | py | Python | YOLO TESTS/grobotUtils.py | Lilly7777/GRobot---Server | d6261b72215ba0cdc281387c23427b04b2a9311d | [
"MIT"
] | null | null | null | YOLO TESTS/grobotUtils.py | Lilly7777/GRobot---Server | d6261b72215ba0cdc281387c23427b04b2a9311d | [
"MIT"
] | null | null | null | YOLO TESTS/grobotUtils.py | Lilly7777/GRobot---Server | d6261b72215ba0cdc281387c23427b04b2a9311d | [
"MIT"
] | null | null | null |
def convertBack(x, y, w, h):
xmin = int(round(x - (w / 2)))
xmax = int(round(x + (w / 2)))
ymin = int(round(y - (h / 2)))
ymax = int(round(y + (h / 2)))
return xmin, ymin, xmax, ymax
def cvDrawBoxes(detections, img):
# Colored labels dictionary
color_dict = {
'Tin can' : [0, 255, ... | 32.828571 | 80 | 0.442124 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.044386 |
6b65f49db99507614c35cf503467297c30872685 | 1,717 | py | Python | code/generate.py | karl-joan/text2art-gan | 86370667f9a62bab95968abe1990dcaa4760b333 | [
"MIT"
] | 5 | 2021-10-30T13:40:41.000Z | 2022-03-20T04:48:45.000Z | code/generate.py | karl-joan/text2art-gan | 86370667f9a62bab95968abe1990dcaa4760b333 | [
"MIT"
] | null | null | null | code/generate.py | karl-joan/text2art-gan | 86370667f9a62bab95968abe1990dcaa4760b333 | [
"MIT"
] | 2 | 2021-09-06T03:45:04.000Z | 2022-03-13T03:23:49.000Z | import argparse
import os
from datetime import datetime
from attngan import attngan
from cyclegan import cyclegan
def parse_args():
parser = argparse.ArgumentParser(description="Generate art from text")
parser.add_argument("caption", help="text to generate from", type=str, metavar="\"caption\"")
parser.ad... | 49.057143 | 161 | 0.633081 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 726 | 0.422831 |
6b66098a0ef59f405b36110fd1c33e17ce0c92bd | 182 | py | Python | config.py | harshmalik9423/python-sockets-projects | 6519cf65126af7c12683c29155200c9427941cc9 | [
"MIT"
] | null | null | null | config.py | harshmalik9423/python-sockets-projects | 6519cf65126af7c12683c29155200c9427941cc9 | [
"MIT"
] | null | null | null | config.py | harshmalik9423/python-sockets-projects | 6519cf65126af7c12683c29155200c9427941cc9 | [
"MIT"
] | null | null | null | #
# config.py
#
SERVER_HOSTNAME = "eecs325.local"
SERVER_PORT = 80
SERVER_MAX_CONN_QUEUE = 5 # Number of connection requests to queue.
BUFFER_SIZE = 4096
MESSAGE_ENCODING = "utf8"
| 16.545455 | 67 | 0.758242 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.412088 |
6b6681e427d456facc061c75cde2612fd3d99a96 | 115 | py | Python | app/__init__.py | MarciaAndrea/devweb_formulario | 8b038f81cdd58d2ec58c91d04ca892a4fa99f549 | [
"MIT"
] | null | null | null | app/__init__.py | MarciaAndrea/devweb_formulario | 8b038f81cdd58d2ec58c91d04ca892a4fa99f549 | [
"MIT"
] | null | null | null | app/__init__.py | MarciaAndrea/devweb_formulario | 8b038f81cdd58d2ec58c91d04ca892a4fa99f549 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
app.config['DEBUG'] = True
from app import models, views
| 12.777778 | 30 | 0.678261 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.06087 |
6b690cd5a48b3af4a8181ceed479f3b9df620a02 | 973 | py | Python | scipy_central/thumbs/models.py | wqshi/test | 63dc0c684ec749cd03e9c071176f30f439188f14 | [
"BSD-3-Clause"
] | 7 | 2016-02-03T12:44:33.000Z | 2020-08-26T09:22:23.000Z | scipy_central/thumbs/models.py | wqshi/test | 63dc0c684ec749cd03e9c071176f30f439188f14 | [
"BSD-3-Clause"
] | 19 | 2015-01-20T11:27:22.000Z | 2017-09-23T22:26:18.000Z | scipy_central/thumbs/models.py | wqshi/test | 63dc0c684ec749cd03e9c071176f30f439188f14 | [
"BSD-3-Clause"
] | 9 | 2015-01-03T02:56:33.000Z | 2021-02-20T10:45:11.000Z | from django.db import models
class Thumbs(models.Model):
"""
Class for handling thumbs up/thumbs down voting
"""
# Who is voting? Null for anonymous users.
person = models.ForeignKey('scipy_central.Person', null=True, blank=True)
# submission: if voting for a submission, otherwise Null.
s... | 32.433333 | 77 | 0.65776 | 942 | 0.96814 | 0 | 0 | 0 | 0 | 0 | 0 | 456 | 0.468654 |
6b69c34c228a53e48fd9981e515b4c0a974719ff | 260 | py | Python | sysroot/usr/lib/python3/dist-packages/ssh_import_id/version.py | 219-design/sysroot_qt5.15.0_binaries_armv6zk_rpizero_bullseye_gcc10.3 | 60545a4471090a4c9ffcf207fb5a71831bfc3bb2 | [
"MIT"
] | null | null | null | sysroot/usr/lib/python3/dist-packages/ssh_import_id/version.py | 219-design/sysroot_qt5.15.0_binaries_armv6zk_rpizero_bullseye_gcc10.3 | 60545a4471090a4c9ffcf207fb5a71831bfc3bb2 | [
"MIT"
] | null | null | null | sysroot/usr/lib/python3/dist-packages/ssh_import_id/version.py | 219-design/sysroot_qt5.15.0_binaries_armv6zk_rpizero_bullseye_gcc10.3 | 60545a4471090a4c9ffcf207fb5a71831bfc3bb2 | [
"MIT"
] | null | null | null | # This file is part of ssh-import-id. See LICENSE file for more info.
_LAST_RELEASE = "5.10"
_PACKAGED_VERSION = '5.10-1'
VERSION = _LAST_RELEASE
if not _PACKAGED_VERSION.startswith("@@"):
VERSION = _PACKAGED_VERSION
# vi: ts=4 expandtab syntax=python
| 21.666667 | 69 | 0.734615 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 121 | 0.465385 |
6b6c4918437ff01fd308871c7f88d92fe127782e | 7,590 | py | Python | offrl/base.py | dlqudwns/RepB-SDE | d799c3bbfc9aeca9251dfa84255d1c1b90af42ce | [
"MIT"
] | null | null | null | offrl/base.py | dlqudwns/RepB-SDE | d799c3bbfc9aeca9251dfa84255d1c1b90af42ce | [
"MIT"
] | null | null | null | offrl/base.py | dlqudwns/RepB-SDE | d799c3bbfc9aeca9251dfa84255d1c1b90af42ce | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
SCALE_DIAG_MIN_MAX = (-20, 2)
EPS = 1e-6
def apply_squashing_func(sample, logp):
"""
Squash the ouput of the gaussian distribution and account for that in the log probability.
:param sample: (tf.Tensor) Action sampled from Ga... | 40.15873 | 100 | 0.645059 | 6,902 | 0.909354 | 0 | 0 | 0 | 0 | 0 | 0 | 496 | 0.065349 |
6b6d4190127b487993f75e4be2892ed1328ace49 | 3,565 | py | Python | skinematics/sensors/xio.py | mohataher/scikit-kinematics | fa8c80c13981310666e22dcd35138be1af1b4318 | [
"BSD-3-Clause"
] | null | null | null | skinematics/sensors/xio.py | mohataher/scikit-kinematics | fa8c80c13981310666e22dcd35138be1af1b4318 | [
"BSD-3-Clause"
] | null | null | null | skinematics/sensors/xio.py | mohataher/scikit-kinematics | fa8c80c13981310666e22dcd35138be1af1b4318 | [
"BSD-3-Clause"
] | 1 | 2021-11-02T22:53:23.000Z | 2021-11-02T22:53:23.000Z | '''
Import data saved with XIO-sensors
'''
'''
Author: Thomas Haslwanter
Version: 0.2
Date: May-2016
'''
import os
import pandas as pd
def read_ratefile(reg_file):
'''Read send-rates from an XIO sensor.
"Disabled" channels have the "rate" set to "None".
Parameters
----------
in_file : string... | 24.756944 | 64 | 0.520898 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,914 | 0.536886 |
6b6d8a57cf3c3bcef5e955e400073f958cc91787 | 1,746 | py | Python | tests/core/utils/test_application_context.py | douwevandermeij/fractal | 66b04892b4d6fd8ee6a0c07b6e230f4321165085 | [
"MIT"
] | 2 | 2021-08-12T05:19:08.000Z | 2022-01-29T16:22:37.000Z | tests/core/utils/test_application_context.py | douwevandermeij/fractal | 66b04892b4d6fd8ee6a0c07b6e230f4321165085 | [
"MIT"
] | null | null | null | tests/core/utils/test_application_context.py | douwevandermeij/fractal | 66b04892b4d6fd8ee6a0c07b6e230f4321165085 | [
"MIT"
] | null | null | null | def test_load(fake_application_context_class, fake_service_class):
assert fake_application_context_class.instance.repositories == []
assert fake_application_context_class.instance.services == []
assert not hasattr(
fake_application_context_class.instance, fake_service_class.__class__.__name__
)
... | 29.59322 | 86 | 0.731959 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.022337 |
6b6de959719deda0bcf0d3617c5c148c46c3e48d | 2,166 | py | Python | zcls/util/cutmix.py | ZJCV/PyCls | 1ef59301646b6134f2ffcc009b4fd76550fa4089 | [
"Apache-2.0"
] | 110 | 2021-02-04T14:32:57.000Z | 2022-03-30T01:51:56.000Z | zcls/util/cutmix.py | ZJCV/PyCls | 1ef59301646b6134f2ffcc009b4fd76550fa4089 | [
"Apache-2.0"
] | 8 | 2021-04-11T02:46:57.000Z | 2021-12-14T19:30:58.000Z | zcls/util/cutmix.py | ZJCV/PyCls | 1ef59301646b6134f2ffcc009b4fd76550fa4089 | [
"Apache-2.0"
] | 20 | 2021-02-07T14:17:07.000Z | 2022-03-22T05:20:40.000Z | # -*- coding: utf-8 -*-
"""
@date: 2021/7/26 下午10:10
@file: cutmix.py
@author: zj
@description:
refer to [ clovaai/CutMix-PyTorch](https://github.com/clovaai/CutMix-PyTorch)
"""
import torch
import numpy as np
from zcls.config.key_word import KEY_LOSS
def rand_bbox(size, lam):
W = size[2]
H = size[3]
... | 26.740741 | 106 | 0.645891 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 304 | 0.140092 |
6b707cd697e11ff349acb292012f7c6bd2f868a2 | 4,625 | py | Python | jsk_2015_05_baxter_apc/node_scripts/common.py | pazeshun/jsk_apc | 0ff42000ad5992f8a31e719a5360a39cf4fa1fde | [
"BSD-3-Clause"
] | null | null | null | jsk_2015_05_baxter_apc/node_scripts/common.py | pazeshun/jsk_apc | 0ff42000ad5992f8a31e719a5360a39cf4fa1fde | [
"BSD-3-Clause"
] | 2 | 2019-04-11T05:36:23.000Z | 2019-08-19T12:58:10.000Z | jsk_2015_05_baxter_apc/node_scripts/common.py | pazeshun/jsk_apc | 0ff42000ad5992f8a31e719a5360a39cf4fa1fde | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
import os
import yaml
import gzip
import cPickle as pickle
import cv2
from catkin import terminal_color
import rospy
from jsk_2015_05_baxter_apc.srv import ObjectMatch, ObjectMatchResponse
def get_data_dir():
data_dir = os.path.join(os.path.dirname(os.path.abspath... | 32.570423 | 82 | 0.592432 | 519 | 0.112216 | 2,016 | 0.435892 | 0 | 0 | 0 | 0 | 711 | 0.15373 |
6b71925db630f1e5d7b40afa3a4eea245f2b4272 | 372 | py | Python | examples/timer.py | TeskaLabs/asab | f28894b62bad192d8d30df01a8ad1b842ee2a2fb | [
"BSD-3-Clause"
] | 23 | 2018-03-07T18:58:13.000Z | 2022-03-29T17:11:47.000Z | examples/timer.py | TeskaLabs/asab | f28894b62bad192d8d30df01a8ad1b842ee2a2fb | [
"BSD-3-Clause"
] | 87 | 2018-04-04T19:44:13.000Z | 2022-03-31T11:18:00.000Z | examples/timer.py | TeskaLabs/asab | f28894b62bad192d8d30df01a8ad1b842ee2a2fb | [
"BSD-3-Clause"
] | 10 | 2018-04-30T16:40:25.000Z | 2022-03-09T10:55:24.000Z | #!/usr/bin/env python3
import asab
class TimerApplication(asab.Application):
async def initialize(self):
# The timer will trigger a message publishing at every second
self.Timer = asab.Timer(self, self.on_tick, autorestart=True)
self.Timer.start(1)
async def on_tick(self):
print("Think!")
if __name__ ... | 17.714286 | 63 | 0.723118 | 268 | 0.72043 | 0 | 0 | 0 | 0 | 219 | 0.58871 | 101 | 0.271505 |
6b720ba819c29547ae26389980f418117f2a4a29 | 26,708 | py | Python | main.py | ikarmus2001/DziekanBOT | 393df5b5d4bdfa6e34bd44da0cca8e97fa51e46a | [
"MIT"
] | 2 | 2021-02-22T16:38:08.000Z | 2021-02-23T12:26:29.000Z | main.py | ikarmus2001/DziekanBOT | 393df5b5d4bdfa6e34bd44da0cca8e97fa51e46a | [
"MIT"
] | null | null | null | main.py | ikarmus2001/DziekanBOT | 393df5b5d4bdfa6e34bd44da0cca8e97fa51e46a | [
"MIT"
] | 1 | 2021-02-22T10:48:38.000Z | 2021-02-22T10:48:38.000Z | import discord as dc
from dotenv import load_dotenv
from os import getenv
import datetime as dt
import json, string
load_dotenv()
#*#*#*# variables #*#*#*#
config_relative_path = getenv("CONFIG")
database_relative_path = getenv("DATABASE")
token = getenv("TOKEN")
#*#*#*#*#*#*#*#*#*#*#*#*#
with open(co... | 48.648452 | 193 | 0.545305 | 26,181 | 0.979315 | 0 | 0 | 0 | 0 | 22,399 | 0.837847 | 6,977 | 0.260979 |
6b7335fdc121bab7e4b361e779e47bb56e5672d8 | 6,635 | py | Python | filter_cube.py | jd-au/thor-hi | 16a1326fcfe2ffaac496d2576b8727ca2f12dc9b | [
"Apache-2.0"
] | null | null | null | filter_cube.py | jd-au/thor-hi | 16a1326fcfe2ffaac496d2576b8727ca2f12dc9b | [
"Apache-2.0"
] | null | null | null | filter_cube.py | jd-au/thor-hi | 16a1326fcfe2ffaac496d2576b8727ca2f12dc9b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python -u
# Filter out emission from a THOR HI cube. Will 2D Fourier transform each plane of the cube and zero out the centre
# of the Fourier image and then inverse Fouroer transform back to the image domain. This produces a cube without the
# large scale emission
# Author James Dempsey
# Date 26 Nov ... | 32.52451 | 119 | 0.677468 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,970 | 0.447626 |
6b7384092723174901fdb2fe1b0d1247ce21ab53 | 2,383 | py | Python | niscv_v2/experiments/simulation/resampling_ratio.py | IanFla/Importance-Sampling | f2dd2164e95377d2cf025fcddd19b2592394e4d7 | [
"Apache-2.0"
] | null | null | null | niscv_v2/experiments/simulation/resampling_ratio.py | IanFla/Importance-Sampling | f2dd2164e95377d2cf025fcddd19b2592394e4d7 | [
"Apache-2.0"
] | null | null | null | niscv_v2/experiments/simulation/resampling_ratio.py | IanFla/Importance-Sampling | f2dd2164e95377d2cf025fcddd19b2592394e4d7 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import scipy.stats as st
from niscv_v2.basics.exp import Exp
from niscv_v2.basics import utils
import multiprocessing
import os
from functools import partial
from datetime import datetime as dt
import pickle
def experiment(dim, fun, size_est, sn, show, size_kn, ratio, bootstrap):
mean = np.zero... | 30.164557 | 100 | 0.632396 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.055812 |
6b73e119d61f8d0b2839a62674b1f7bc89fb2f58 | 2,641 | py | Python | 220_contains_duplicate_iii.py | gengwg/leetcode | 0af5256ec98149ef5863f3bba78ed1e749650f6e | [
"Apache-2.0"
] | 2 | 2018-04-24T19:17:40.000Z | 2018-04-24T19:33:52.000Z | 220_contains_duplicate_iii.py | gengwg/leetcode | 0af5256ec98149ef5863f3bba78ed1e749650f6e | [
"Apache-2.0"
] | null | null | null | 220_contains_duplicate_iii.py | gengwg/leetcode | 0af5256ec98149ef5863f3bba78ed1e749650f6e | [
"Apache-2.0"
] | 3 | 2020-06-17T05:48:52.000Z | 2021-01-02T06:08:25.000Z | # -*- coding: utf-8 -*-
# 220. Contains Duplicate III
#
# Given an array of integers,
# find out whether there are two distinct indices i and j in the array
# such that the absolute difference between nums[i] and nums[j] is at most t
# and the absolute difference between i and j is at most k.
import collections
cla... | 31.440476 | 108 | 0.523287 | 2,542 | 0.839775 | 0 | 0 | 0 | 0 | 0 | 0 | 1,743 | 0.575818 |
6b7420711037e6b6953b203dd71e4d0da3755188 | 312 | py | Python | pommerman/agents/frozen_agent.py | PBarde/ASAF-playground | 6567e5c56b6e077e0686376240bd3ccaa8a0da0c | [
"Apache-2.0"
] | 1 | 2020-12-22T06:45:18.000Z | 2020-12-22T06:45:18.000Z | pommerman/agents/frozen_agent.py | PBarde/ASAF-playground | 6567e5c56b6e077e0686376240bd3ccaa8a0da0c | [
"Apache-2.0"
] | null | null | null | pommerman/agents/frozen_agent.py | PBarde/ASAF-playground | 6567e5c56b6e077e0686376240bd3ccaa8a0da0c | [
"Apache-2.0"
] | null | null | null | from . import BaseAgent
from .. import constants
class FrozenAgent(BaseAgent):
"""This is a agent that just sits there."""
def __init__(self, *args, **kwargs):
super(FrozenAgent, self).__init__(*args, **kwargs)
def act(self, obs, action_space):
return constants.Action.Stop.value
| 24 | 58 | 0.673077 | 260 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.137821 |
6b759d3b1a6d1d1a23a8d58955f7fb20ffc91c12 | 3,630 | py | Python | Principles-of-Computing/project-4-planner-for-yahtzee.py | ugaliguy/Python-at-Rice | b145a4475bdd3e9250f88a01dff894945d9b3e4b | [
"MIT"
] | null | null | null | Principles-of-Computing/project-4-planner-for-yahtzee.py | ugaliguy/Python-at-Rice | b145a4475bdd3e9250f88a01dff894945d9b3e4b | [
"MIT"
] | null | null | null | Principles-of-Computing/project-4-planner-for-yahtzee.py | ugaliguy/Python-at-Rice | b145a4475bdd3e9250f88a01dff894945d9b3e4b | [
"MIT"
] | 2 | 2020-11-09T16:06:28.000Z | 2020-12-07T07:42:47.000Z | """
Planner for Yahtzee
Simplifications: only allow discard and roll, only score against upper level
"""
# Used to increase the timeout, if necessary
import codeskulptor
codeskulptor.set_timeout(20)
def gen_all_sequences(outcomes, length):
"""
Iterative function that enumerates the set of all sequ... | 25.928571 | 96 | 0.614601 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,478 | 0.407163 |
6b7921203d0b38a45781f77f3696c8da26caa2a9 | 3,079 | py | Python | pysnmp/AVAM-SNMPv1.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/AVAM-SNMPv1.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/AVAM-SNMPv1.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module AVAM-SNMPv1 (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/AVAM-SNMPv1
# Produced by pysmi-0.3.4 at Mon Apr 29 17:16:06 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 0... | 102.633333 | 543 | 0.755765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,079 | 0.350438 |
6b7b7ed1542c5197c3dec6914240d11b49526c97 | 4,649 | py | Python | engraving/engraving.py | catt0/lostarkthings | 72d8756d899c01e19884eebd3978d965f9073bba | [
"MIT"
] | 1 | 2022-03-24T12:29:54.000Z | 2022-03-24T12:29:54.000Z | engraving/engraving.py | catt0/lostarkthings | 72d8756d899c01e19884eebd3978d965f9073bba | [
"MIT"
] | null | null | null | engraving/engraving.py | catt0/lostarkthings | 72d8756d899c01e19884eebd3978d965f9073bba | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# MIT License
# Copyright (c) 2022 catt0
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy,... | 33.446043 | 178 | 0.670897 | 288 | 0.061949 | 0 | 0 | 0 | 0 | 0 | 0 | 2,301 | 0.494945 |
6b7cc6ba3cb5669cb102ecb6c5ae731e244b2f55 | 4,447 | py | Python | tests/topo_test.py | dlgeorge/geoclaw | 2b4ce9b1ba2532fe3ac38ee7c05297eb61e45bd1 | [
"BSD-3-Clause"
] | null | null | null | tests/topo_test.py | dlgeorge/geoclaw | 2b4ce9b1ba2532fe3ac38ee7c05297eb61e45bd1 | [
"BSD-3-Clause"
] | 2 | 2018-11-05T19:41:12.000Z | 2019-03-19T00:03:38.000Z | tests/topo_test.py | BrisaDavis/geoclaw | ccab58669bc2950de13cf0f35c10b3cd1cb1cda6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import
from __future__ import print_function
import os
import glob
import tempfile
import matplotlib.pyplot as plt
from clawpack.geoclaw import topotools
import clawpack.geoclaw.topo as topo
import numpy as np
def test1():
"""
Make two... | 28.690323 | 83 | 0.555431 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 955 | 0.214752 |
6b7cddd851735817010a31afc1a8841a61a5dfc8 | 3,443 | py | Python | moveit/moveit.py | pavel-paulau/moveit | 9572f3b4330b058c4cb324c774fff443a1ccb2f9 | [
"Apache-2.0"
] | 2 | 2015-09-28T13:54:43.000Z | 2015-09-28T16:59:43.000Z | moveit/moveit.py | pavel-paulau/moveit | 9572f3b4330b058c4cb324c774fff443a1ccb2f9 | [
"Apache-2.0"
] | null | null | null | moveit/moveit.py | pavel-paulau/moveit | 9572f3b4330b058c4cb324c774fff443a1ccb2f9 | [
"Apache-2.0"
] | 1 | 2020-03-10T20:17:28.000Z | 2020-03-10T20:17:28.000Z | #!/usr/bin/env python
import argparse
import json
from collections import defaultdict
def read_data(fname):
raw_data = defaultdict(list)
with open(fname) as fh:
for line in fh.readlines():
event = json.loads(line.strip())
if event['type'] == 'rebalanceStart': # only last rebal... | 32.481132 | 79 | 0.598606 | 0 | 0 | 393 | 0.114145 | 0 | 0 | 0 | 0 | 453 | 0.131571 |
6b7d62abec208b5d28e43bdb68af22c4c8b92da6 | 43,769 | py | Python | test/augmentation/test_augmentation_3d.py | prcaaf/kornia | a3eca7400e6da89b313549bbae751ff23a0e7bc5 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-12-13T16:13:08.000Z | 2020-12-13T16:13:08.000Z | test/augmentation/test_augmentation_3d.py | ZhiyuanChen/kornia | 87a0ead264ce5fc97997071acb9fe2286d6c425c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/augmentation/test_augmentation_3d.py | ZhiyuanChen/kornia | 87a0ead264ce5fc97997071acb9fe2286d6c425c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from typing import Union, Tuple
import pytest
import torch
import torch.nn as nn
from torch.testing import assert_allclose
from torch.autograd import gradcheck
import kornia
import kornia.testing as utils # test utils
from kornia.constants import pi
from kornia.augmentation import (
RandomDepthicalFlip3D,
R... | 43.378593 | 112 | 0.448125 | 43,278 | 0.988782 | 0 | 0 | 10,856 | 0.248029 | 0 | 0 | 3,412 | 0.077955 |
6b7e960044cdd21ef1c64e33f14c9a00d918de92 | 516 | py | Python | print_spelling_suggestions.py | tmills/econsult | a702948278bd9995623026702bcd4c4c9bd47159 | [
"Apache-2.0"
] | null | null | null | print_spelling_suggestions.py | tmills/econsult | a702948278bd9995623026702bcd4c4c9bd47159 | [
"Apache-2.0"
] | 3 | 2021-03-25T22:10:23.000Z | 2021-06-01T22:48:12.000Z | print_spelling_suggestions.py | tmills/econsult | a702948278bd9995623026702bcd4c4c9bd47159 | [
"Apache-2.0"
] | 1 | 2019-04-12T19:02:12.000Z | 2019-04-12T19:02:12.000Z | #!/usr/bin/env python
from pattern.en import spelling
import sys
def main(args):
if len(args) < 1:
sys.stderr.write("1 required argument: <input file>")
with open(args[0], 'r') as f:
for line in f.readlines():
word = line.rstrip()
try:
suggestions ... | 24.571429 | 61 | 0.542636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.178295 |
6b7f23ac39d6f288d7f8df3e114d47ba4ac7749a | 391 | py | Python | setup.py | opalmer/vpsutil | 3d589f0c6184a9ca79f0a96af1181bc4466b7095 | [
"MIT"
] | null | null | null | setup.py | opalmer/vpsutil | 3d589f0c6184a9ca79f0a96af1181bc4466b7095 | [
"MIT"
] | null | null | null | setup.py | opalmer/vpsutil | 3d589f0c6184a9ca79f0a96af1181bc4466b7095 | [
"MIT"
] | null | null | null | from distutils.core import setup
requires = ["requests", "paramiko"]
try:
import configparser
except ImportError:
requires.append("configparser")
setup(
name="vpsutil",
version="0.0.0",
license="MIT",
packages=["vpsutil"],
install_requires=requires,
entry_points={
"console_scr... | 17.772727 | 43 | 0.618926 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 112 | 0.286445 |
6b7f71ca34f365255fcb346d72fcc8edbf289a3b | 93 | py | Python | podstrony/apps.py | ArminD93/Django_test | 1f1de5976a1a8a46b7183200a22ef34500cdf1ee | [
"MIT"
] | null | null | null | podstrony/apps.py | ArminD93/Django_test | 1f1de5976a1a8a46b7183200a22ef34500cdf1ee | [
"MIT"
] | 6 | 2019-10-31T14:09:52.000Z | 2021-04-12T21:17:02.000Z | podstrony/apps.py | ArminD93/Django_test | 1f1de5976a1a8a46b7183200a22ef34500cdf1ee | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class PodstronyConfig(AppConfig):
name = 'podstrony'
| 15.5 | 33 | 0.763441 | 56 | 0.602151 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.11828 |
6b7fffb88d3d8522751df917d4f9168bc42ba45e | 4,117 | py | Python | aitlas/datasets/sat6.py | biasvariancelabs/aitlas | e36913c44d5a8393566b7271607ba839f9be0df3 | [
"MIT"
] | 32 | 2020-12-04T19:48:19.000Z | 2022-03-16T18:18:05.000Z | aitlas/datasets/sat6.py | biasvariancelabs/aitlas | e36913c44d5a8393566b7271607ba839f9be0df3 | [
"MIT"
] | 2 | 2021-04-11T17:09:14.000Z | 2021-05-14T13:22:41.000Z | aitlas/datasets/sat6.py | biasvariancelabs/aitlas | e36913c44d5a8393566b7271607ba839f9be0df3 | [
"MIT"
] | 8 | 2021-04-06T22:06:27.000Z | 2022-01-30T06:01:39.000Z | import csv
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import scipy.io
import numpy as np
import random
from ..base import BaseDataset
from .schemas import MatDatasetSchema
"""
The format of the mat dataset is:
train_x 28x28x4x400000 uint8 (containing 400000 training samples of 28x28 ima... | 35.188034 | 103 | 0.621326 | 3,395 | 0.82463 | 0 | 0 | 0 | 0 | 0 | 0 | 1,148 | 0.278844 |
6b8206189230c459d344d826bd836366d971ebcf | 6,768 | py | Python | src/config_gui.py | blaubachn/slideshow | 8f87db77502ee89a689a884ac2455d4019b20363 | [
"MIT"
] | null | null | null | src/config_gui.py | blaubachn/slideshow | 8f87db77502ee89a689a884ac2455d4019b20363 | [
"MIT"
] | null | null | null | src/config_gui.py | blaubachn/slideshow | 8f87db77502ee89a689a884ac2455d4019b20363 | [
"MIT"
] | null | null | null | import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
from config import Configuration_Manager
about_text = '''Welcome to Slideshow!
Photo Directory: The remote will diplay a slideshow of the photos in this folder (excluding photos in it's subfolders)
Installation Type: flatpak commands have an ext... | 45.12 | 120 | 0.494385 | 6,028 | 0.890662 | 0 | 0 | 0 | 0 | 0 | 0 | 2,555 | 0.377512 |
6b834a7d97ab58b448634df72525ae3e7aa49bda | 391 | py | Python | PythonExercicios/ex033.py | Lucas-ns/Python-3-Curso-Em-Video | f6d338fffd7a4606d34fab09634eea0fe4b3dfb3 | [
"MIT"
] | null | null | null | PythonExercicios/ex033.py | Lucas-ns/Python-3-Curso-Em-Video | f6d338fffd7a4606d34fab09634eea0fe4b3dfb3 | [
"MIT"
] | null | null | null | PythonExercicios/ex033.py | Lucas-ns/Python-3-Curso-Em-Video | f6d338fffd7a4606d34fab09634eea0fe4b3dfb3 | [
"MIT"
] | null | null | null | n1 = int(input('Primeiro Valor: '))
n2 = int(input('Segundo Valor: '))
n3 = int(input('Terceiro Valor: '))
maior = n1
menor = n1
if n2 < n3 and n2 < n1:
menor = n2
if n3 < n2 and n3 < n1:
menor = n3
print('O menor valor digitado foi {}'.format(menor))
if n2 > n3 and n2 > n1:
maior = n2
if n3 > n2 and n3 > n... | 24.4375 | 52 | 0.608696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.294118 |
6b84a8e0c10dad08caa3e4f6f99c18a7c9f285ee | 2,896 | py | Python | os_brick/initiator/connectors/local.py | ebalduf/os-brick-backports | 6a180265560d5e0bab80e47ac25c15906d1165fb | [
"Apache-2.0"
] | null | null | null | os_brick/initiator/connectors/local.py | ebalduf/os-brick-backports | 6a180265560d5e0bab80e47ac25c15906d1165fb | [
"Apache-2.0"
] | null | null | null | os_brick/initiator/connectors/local.py | ebalduf/os-brick-backports | 6a180265560d5e0bab80e47ac25c15906d1165fb | [
"Apache-2.0"
] | null | null | null | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 36.658228 | 79 | 0.649862 | 2,193 | 0.757251 | 0 | 0 | 1,370 | 0.473066 | 0 | 0 | 1,618 | 0.558702 |
6b8528a6311dd8c9d7d8cb2e04442a68e44c16ec | 46 | py | Python | petal/__init__.py | gidoBOSSftw5731/petal | 5d04796d9b74adfe8c022024945f6d0481f974ea | [
"MIT"
] | null | null | null | petal/__init__.py | gidoBOSSftw5731/petal | 5d04796d9b74adfe8c022024945f6d0481f974ea | [
"MIT"
] | null | null | null | petal/__init__.py | gidoBOSSftw5731/petal | 5d04796d9b74adfe8c022024945f6d0481f974ea | [
"MIT"
] | null | null | null | from .petal import Petal
__all__ = ["Petal"]
| 11.5 | 24 | 0.695652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.152174 |
6b85c3711ce945544b892923a3692a030d199f9f | 2,705 | py | Python | processing/data_collection/gazette/spiders/rj_rio_de_janeiro.py | gabubellon/querido-diario | b783dac359b86121173286869a8e0bbd31cf22af | [
"MIT"
] | null | null | null | processing/data_collection/gazette/spiders/rj_rio_de_janeiro.py | gabubellon/querido-diario | b783dac359b86121173286869a8e0bbd31cf22af | [
"MIT"
] | null | null | null | processing/data_collection/gazette/spiders/rj_rio_de_janeiro.py | gabubellon/querido-diario | b783dac359b86121173286869a8e0bbd31cf22af | [
"MIT"
] | null | null | null | from gazette.items import Gazette
import datetime as dt
import re
import scrapy
from gazette.spiders.base import BaseGazetteSpider
class RjRioDeJaneiroSpider(BaseGazetteSpider):
TERRITORY_ID = "3304557"
name = "rj_rio_de_janeiro"
allowed_domains = ["doweb.rio.rj.gov.br"]
start_urls = ["http://doweb.ri... | 38.642857 | 121 | 0.607024 | 2,576 | 0.950554 | 424 | 0.156458 | 0 | 0 | 0 | 0 | 562 | 0.20738 |
6b86ad80d46cd8819ce8434a7d769597836cdf0f | 3,502 | py | Python | 2c-AutopilotByColorSegmentation.py | Branyac/tello-innovation-challenge | 173087677bf2f964785ab76fae146b12e352ee0b | [
"MIT"
] | 1 | 2022-01-30T19:34:45.000Z | 2022-01-30T19:34:45.000Z | 2c-AutopilotByColorSegmentation.py | Branyac/tello-innovation-challenge | 173087677bf2f964785ab76fae146b12e352ee0b | [
"MIT"
] | null | null | null | 2c-AutopilotByColorSegmentation.py | Branyac/tello-innovation-challenge | 173087677bf2f964785ab76fae146b12e352ee0b | [
"MIT"
] | 1 | 2021-06-23T04:13:43.000Z | 2021-06-23T04:13:43.000Z | from djitellopy import Tello
import cv2
import numpy as np
import time
# Values for color segmentation
# It match an orange battery
LOWER = np.array([0, 239, 180])
UPPER = np.array([30, 255, 255])
DESIRED_OBJECT_SIZE = 100
MAX_SPEED_FORWARDBACK = 50
MAX_SPEED_UPDOWN = 50
MAX_SPEED_YAW = 100
MIN_MOV_TIME = 0.15
def ... | 35.734694 | 153 | 0.58538 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 602 | 0.171902 |
6b886eb9cef2b6008b055841d4decd5bf7c3d6ad | 135 | py | Python | okta/models/user/TempPassword.py | xmercury-qb/okta-sdk-python | a668a963b13fc61177b36c5438c6ec5fa6f17c4e | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-06-19T18:54:00.000Z | 2020-06-19T18:54:00.000Z | okta/models/user/TempPassword.py | xmercury-qb/okta-sdk-python | a668a963b13fc61177b36c5438c6ec5fa6f17c4e | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2018-01-05T20:23:12.000Z | 2019-03-06T12:00:58.000Z | okta/models/user/TempPassword.py | xmercury-qb/okta-sdk-python | a668a963b13fc61177b36c5438c6ec5fa6f17c4e | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2018-11-08T19:32:46.000Z | 2021-03-30T06:35:48.000Z | class TempPassword:
types = {
'tempPassword': str
}
def __init__(self):
self.tempPassword = None # str
| 13.5 | 39 | 0.555556 | 134 | 0.992593 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0.140741 |
6b8915baff1af0575cc4e24b0853c4cc6b8ad2a0 | 14,873 | py | Python | examples/CCS811UnitTest.py | Ekkehard/RBPiCCS811 | ca09d56b86afc92d253bdb630ddb815d04099edb | [
"Apache-2.0"
] | null | null | null | examples/CCS811UnitTest.py | Ekkehard/RBPiCCS811 | ca09d56b86afc92d253bdb630ddb815d04099edb | [
"Apache-2.0"
] | null | null | null | examples/CCS811UnitTest.py | Ekkehard/RBPiCCS811 | ca09d56b86afc92d253bdb630ddb815d04099edb | [
"Apache-2.0"
] | null | null | null | # Python Implementation: CCS811UnitTest
##
# @file CCS811UnitTest.py
#
# @version 1.0.1
#
# @par Purpose
# This module provides the Unit Test for the CCS811 module. It has been
# separated from the CCS811 module to conserve some resources, as this code is
# intended to also run on an Raspberry Pi Pico MCU. O... | 40.636612 | 80 | 0.408122 | 1,005 | 0.067572 | 0 | 0 | 305 | 0.020507 | 0 | 0 | 3,927 | 0.264036 |
6b8a00b506487aff2b0ea1fefe241cb675cb897d | 4,169 | py | Python | gcloud/commons/tastypie/resources.py | springborland/bk-sops | a9057672c10efb5f2414a805a30ead4092429c76 | [
"Apache-2.0"
] | 1 | 2021-05-19T04:31:34.000Z | 2021-05-19T04:31:34.000Z | gcloud/commons/tastypie/resources.py | sighttviewliu/bk-sops | 6bf2f38bd93990f20f7c3a4decafc310e09e679c | [
"Apache-2.0"
] | null | null | null | gcloud/commons/tastypie/resources.py | sighttviewliu/bk-sops | 6bf2f38bd93990f20f7c3a4decafc310e09e679c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 35.939655 | 115 | 0.633245 | 3,295 | 0.753832 | 0 | 0 | 0 | 0 | 0 | 0 | 1,718 | 0.393045 |