hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
07984691c22bd4cb824530a6a0921c881974c3e7 | 8,235 | py | Python | gsum/datasets.py | ckoerber/gsum | 4174bd622e7a1b829baa1cf1d0857a70cec27537 | [
"MIT"
] | 7 | 2019-04-25T02:28:51.000Z | 2022-01-27T22:15:31.000Z | gsum/datasets.py | jordan-melendez/gsum | a9647d60eb5ef971caad88f97df8f1e9cc5286c2 | [
"MIT"
] | 2 | 2021-07-29T20:12:10.000Z | 2021-08-10T07:25:26.000Z | gsum/datasets.py | jordan-melendez/gsum | a9647d60eb5ef971caad88f97df8f1e9cc5286c2 | [
"MIT"
] | 2 | 2019-07-01T07:56:22.000Z | 2021-11-10T15:36:25.000Z | import numpy as np
import scipy.stats as stats
from sklearn.gaussian_process.kernels import RBF
from sklearn.utils import check_random_state
from . import cartesian, partials
def make_gaussian_partial_sums(
X, orders=5, kernel=None, mean=None, ratio=0.3,
ref=1., nugget=0, random_state=0, allow_singula... | 43.115183 | 119 | 0.676381 |
6a92494db1a1e81769e39355ddd6ed7c33df6420 | 760 | py | Python | tests/zoomus/components/phone/test_calling_plans.py | pjhinton/zoomus | 0fb4d5f5fd24c35ecaf4035332d0fb41c4c77068 | [
"Apache-2.0"
] | 1 | 2021-08-19T11:07:06.000Z | 2021-08-19T11:07:06.000Z | tests/zoomus/components/phone/test_calling_plans.py | pjhinton/zoomus | 0fb4d5f5fd24c35ecaf4035332d0fb41c4c77068 | [
"Apache-2.0"
] | 1 | 2021-03-23T11:27:37.000Z | 2021-03-23T11:27:37.000Z | tests/zoomus/components/phone/test_calling_plans.py | pjhinton/zoomus | 0fb4d5f5fd24c35ecaf4035332d0fb41c4c77068 | [
"Apache-2.0"
] | 2 | 2021-03-12T05:44:17.000Z | 2022-03-03T12:27:06.000Z | import unittest
from zoomus import components
import responses
def suite():
"""Define all the tests of the module."""
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(CallingPlansV2TestCase))
return suite
class CallingPlansV2TestCase(unittest.TestCase):
def setUp(self):
sel... | 23.030303 | 69 | 0.646053 |
e15549371bd96bb16a94bfb5c8adae9a0feb40bd | 896 | py | Python | Pygame/Bees/bee.py | kasztp/python-lessons | 2a159ad5e1186c749b96c5d0ede45b7142c6bbb5 | [
"MIT"
] | 35 | 2015-05-18T08:08:41.000Z | 2022-03-07T09:38:02.000Z | Pygame/Bees/bee.py | kasztp/python-lessons | 2a159ad5e1186c749b96c5d0ede45b7142c6bbb5 | [
"MIT"
] | 1 | 2021-09-29T02:08:26.000Z | 2021-09-29T02:08:26.000Z | Pygame/Bees/bee.py | kasztp/python-lessons | 2a159ad5e1186c749b96c5d0ede45b7142c6bbb5 | [
"MIT"
] | 40 | 2015-04-28T00:38:54.000Z | 2022-02-13T14:18:34.000Z | import pygame
from util import loadImages
class Bee(pygame.sprite.Sprite):
images = []
imagesRotated = []
@staticmethod
def loadImages():
Bee.images = loadImages('bee1.png', 'bee2.png', 'bee3.png')
Bee.imagesRotated = Bee.images
def __init__(self, screenRect):
... | 32 | 75 | 0.621652 |
a41018dd590dcf4383755cdf7eaaec7c346afafa | 604 | py | Python | hysia/core/hardware/cputil.py | fossabot/Video-to-Online-Platform | 46019562f072a5dc2a92684986411d7f88758882 | [
"Apache-2.0"
] | 82 | 2019-10-04T05:40:45.000Z | 2020-03-14T06:40:02.000Z | hysia/core/hardware/cputil.py | wangyongjie-ntu/Video-to-Online-Platform | b1230c8f702487225566b5be13947bd6f7904556 | [
"Apache-2.0"
] | 9 | 2020-06-04T19:31:59.000Z | 2021-01-10T02:32:02.000Z | hysia/core/hardware/cputil.py | wangyongjie-ntu/Video-to-Online-Platform | b1230c8f702487225566b5be13947bd6f7904556 | [
"Apache-2.0"
] | 24 | 2019-10-04T05:46:46.000Z | 2020-05-30T05:22:32.000Z | # 2018-9-30
# Author: Wang Yongjie
# Email: yongjie.wang@ntu.edu.sg
import os
import psutil
class cpu_usage(object):
def __init__(self):
self.cpu_num = 0
self.cpu_frequency = 0
self.cpu_percent = 0
self.cpu_info()
def cpu_info(self):
self.cpu_num = psutil.cpu_count()
... | 23.230769 | 96 | 0.652318 |
1ee8ee434287fd43638a8c027dd7927599baf207 | 94 | py | Python | Pacotes/ex024.py | TonyRio/Python-Exercicios | 8a72d1b12418c6485794dae184425df0daf098bb | [
"MIT"
] | null | null | null | Pacotes/ex024.py | TonyRio/Python-Exercicios | 8a72d1b12418c6485794dae184425df0daf098bb | [
"MIT"
] | null | null | null | Pacotes/ex024.py | TonyRio/Python-Exercicios | 8a72d1b12418c6485794dae184425df0daf098bb | [
"MIT"
] | null | null | null | cid = str (input('em que cidade vai viajar ? :')).strip()
print(cid.upper()[:5] == 'SANTO')
| 31.333333 | 59 | 0.585106 |
c3cec373e708cccecf2d8848e10e4040f5e4550f | 1,640 | py | Python | services/wikisearch.py | RezSat/nova | 450057295fe40d754fb5e5ead776af21f4d1b8fc | [
"Apache-2.0"
] | null | null | null | services/wikisearch.py | RezSat/nova | 450057295fe40d754fb5e5ead776af21f4d1b8fc | [
"Apache-2.0"
] | null | null | null | services/wikisearch.py | RezSat/nova | 450057295fe40d754fb5e5ead776af21f4d1b8fc | [
"Apache-2.0"
] | null | null | null | import pyttsx3
import speech_recognition as sr
import wolframalpha
import wikipedia
def speak(text):
engine = pyttsx3.init()
# voices = engine.getProperty('voices')
# engine.setProperty('voice', voices[1].id)
engine.setProperty('rate',155) #Speed Percent
engine.setProperty('volume', 2... | 25.625 | 73 | 0.631098 |
fdc6879e9c96db48a7f8ad12fb297e11962fdf34 | 760 | py | Python | tests/test_sts/test_server.py | EvaSDK/moto | 8095f31772fb144f2045c0991f4c8ed17f324b91 | [
"Apache-2.0"
] | null | null | null | tests/test_sts/test_server.py | EvaSDK/moto | 8095f31772fb144f2045c0991f4c8ed17f324b91 | [
"Apache-2.0"
] | 2 | 2016-07-01T03:43:37.000Z | 2016-07-18T19:38:06.000Z | tests/test_sts/test_server.py | EvaSDK/moto | 8095f31772fb144f2045c0991f4c8ed17f324b91 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import sure # noqa
import moto.server as server
'''
Test the different server responses
'''
def test_sts_get_session_token():
backend = server.create_backend_app("sts")
test_client = backend.test_client()
res = test_client.get('/?Action=GetSessionToken')
res... | 26.206897 | 65 | 0.742105 |
2d2825771d42b18e78652918f9c5d6c5fec9c6d7 | 137 | py | Python | agent/watcher/__init__.py | aaitor/agent | 835ddf5037b1b6254eda57f056f54195670c17ff | [
"Apache-2.0"
] | null | null | null | agent/watcher/__init__.py | aaitor/agent | 835ddf5037b1b6254eda57f056f54195670c17ff | [
"Apache-2.0"
] | null | null | null | agent/watcher/__init__.py | aaitor/agent | 835ddf5037b1b6254eda57f056f54195670c17ff | [
"Apache-2.0"
] | 1 | 2019-08-28T09:19:05.000Z | 2019-08-28T09:19:05.000Z | # -*- coding: utf-8 -*-
"""Watcher package for Agent."""
__author__ = """Aitor"""
__email__ = 'aaitor@gmail.com'
__version__ = '0.1.0'
| 17.125 | 32 | 0.613139 |
4d037d461545e1d494f137956335b7278f760574 | 1,772 | py | Python | main.py | kcomain/unnamed-launcher | ac1ca01f68a59790b6f47947eed4624185f964f1 | [
"MIT"
] | null | null | null | main.py | kcomain/unnamed-launcher | ac1ca01f68a59790b6f47947eed4624185f964f1 | [
"MIT"
] | null | null | null | main.py | kcomain/unnamed-launcher | ac1ca01f68a59790b6f47947eed4624185f964f1 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 kcomain 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 the rights
# to use, copy, modify, merge... | 41.209302 | 113 | 0.746614 |
3b7201de5ca2d4b474b365c0f6761fa0c175530b | 51,516 | py | Python | bokeh/models/tools.py | lzxyzq/bokeh | a8ca9d17fc34c49ee7ce261d9d5ff0fbd36ca391 | [
"BSD-3-Clause"
] | 1 | 2018-12-19T06:52:07.000Z | 2018-12-19T06:52:07.000Z | bokeh/models/tools.py | lzxyzq/bokeh | a8ca9d17fc34c49ee7ce261d9d5ff0fbd36ca391 | [
"BSD-3-Clause"
] | null | null | null | bokeh/models/tools.py | lzxyzq/bokeh | a8ca9d17fc34c49ee7ce261d9d5ff0fbd36ca391 | [
"BSD-3-Clause"
] | null | null | null | ''' Bokeh comes with a number of interactive tools.
There are five types of tool interactions:
.. hlist::
:columns: 5
* Pan/Drag
* Click/Tap
* Scroll/Pinch
* Actions
* Inspectors
For the first three comprise the category of gesture tools, and only
one tool for each gesture can be active at a... | 37.222543 | 124 | 0.679925 |
c53e359a8e828dcd496ab1b8e52097596e1b2177 | 6,239 | py | Python | face_sdk/models/network_def/mobilev3_pfld.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 1,329 | 2021-01-13T07:06:30.000Z | 2022-03-31T07:23:39.000Z | face_sdk/models/network_def/mobilev3_pfld.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 115 | 2021-01-13T10:42:57.000Z | 2022-03-28T03:57:52.000Z | face_sdk/models/network_def/mobilev3_pfld.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 351 | 2021-01-13T07:21:00.000Z | 2022-03-29T14:11:39.000Z | # derive from:
# https://github.com/Hsintao/pfld_106_face_landmarks/blob/master/models/mobilev3_pfld.py
import torch
import torch.nn as nn
import torch.nn.functional as F
def conv_bn(inp, oup, kernel_size, stride, padding=1, conv_layer=nn.Conv2d, norm_layer=nn.BatchNorm2d, nlin_layer=nn.ReLU):
return nn... | 31.831633 | 124 | 0.550088 |
2530264fb2f22e1ca3872d204d157655cf3f37e5 | 227 | py | Python | ehmatthes-pcc_2e-078318e/chapter_08/pets.py | charliechocho/py-crash-course | b42b8a4c1cb8d76e8316f55c1565ff42d920ee63 | [
"Apache-2.0"
] | 12 | 2020-10-22T14:03:27.000Z | 2022-03-28T08:14:22.000Z | ehmatthes-pcc_2e-078318e/chapter_08/pets.py | charliechocho/py-crash-course | b42b8a4c1cb8d76e8316f55c1565ff42d920ee63 | [
"Apache-2.0"
] | 4 | 2020-12-26T15:08:02.000Z | 2021-05-16T13:19:33.000Z | ehmatthes-pcc_2e-078318e/chapter_08/pets.py | charliechocho/py-crash-course | b42b8a4c1cb8d76e8316f55c1565ff42d920ee63 | [
"Apache-2.0"
] | 9 | 2020-12-22T10:22:12.000Z | 2022-03-28T08:14:53.000Z | def describe_pet(pet_name, animal_type='dog'):
"""Display information about a pet."""
print(f"\nI have a {animal_type}.")
print(f"My {animal_type}'s name is {pet_name.title()}.")
describe_pet(pet_name='willie') | 37.833333 | 60 | 0.674009 |
0253daf80e74b701cecb86f7bca58da8662c9342 | 16,026 | py | Python | aiohttp/test_utils.py | mosquito/aiohttp | cade625895a0a098981d8f1b52f78e49b4aae30e | [
"Apache-2.0"
] | null | null | null | aiohttp/test_utils.py | mosquito/aiohttp | cade625895a0a098981d8f1b52f78e49b4aae30e | [
"Apache-2.0"
] | null | null | null | aiohttp/test_utils.py | mosquito/aiohttp | cade625895a0a098981d8f1b52f78e49b4aae30e | [
"Apache-2.0"
] | null | null | null | """Utilities shared by tests."""
import asyncio
import contextlib
import functools
import gc
import socket
import sys
import unittest
from abc import ABC, abstractmethod
from unittest import mock
from multidict import CIMultiDict
from yarl import URL
import aiohttp
from aiohttp.client import _RequestContextManager, ... | 29.459559 | 79 | 0.618682 |
51f23ab1f5359edd477fed3073588d3b82035e33 | 13,214 | py | Python | src/compas_rhino/install.py | Sam-Bouten/compas | 011c7779ded9b69bb602568b470bb0443e336f62 | [
"MIT"
] | null | null | null | src/compas_rhino/install.py | Sam-Bouten/compas | 011c7779ded9b69bb602568b470bb0443e336f62 | [
"MIT"
] | null | null | null | src/compas_rhino/install.py | Sam-Bouten/compas | 011c7779ded9b69bb602568b470bb0443e336f62 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import importlib
import itertools
import os
import sys
import compas_rhino
import compas._os
import compas.plugins
__all__ = [
'install',
'installable_rhino_packages',
'after_rhino_install'
]
IN... | 36.502762 | 142 | 0.655895 |
179d6bc144a992b59092574832f397b68e6158b6 | 4,261 | py | Python | bulletin/tools/plugins/urls.py | rerb/django-bulletin | 0b64c9f2eeef4f60c54b54e720b7160aeafa9eb5 | [
"MIT"
] | 5 | 2015-03-13T19:17:23.000Z | 2016-08-07T00:12:23.000Z | bulletin/tools/plugins/urls.py | rerb/django-bulletin | 0b64c9f2eeef4f60c54b54e720b7160aeafa9eb5 | [
"MIT"
] | 54 | 2015-03-13T20:04:03.000Z | 2021-07-21T05:25:20.000Z | bulletin/tools/plugins/urls.py | rerb/django-bulletin | 0b64c9f2eeef4f60c54b54e720b7160aeafa9eb5 | [
"MIT"
] | 5 | 2015-02-12T20:19:19.000Z | 2020-02-26T22:11:47.000Z | from django.conf.urls import include, patterns, url
import views
from api import urls as api_urls
urlpatterns = patterns(
'',
########################
# Generic plugin views #
########################
# List installed plugins:
url(r'^submit/$',
views.plugin.PluginListView.as_view(),
... | 27.668831 | 74 | 0.504811 |
ffb1ad980cdd5997c39c52f6f67ccc22363d6b0f | 1,916 | py | Python | game_func_q.py | stephen447/CS7IS2-Artificial-Intelligence-AI---Group-project | 59a2a00af3a0bbf84ba5932ebd9efe362201ea89 | [
"MIT"
] | null | null | null | game_func_q.py | stephen447/CS7IS2-Artificial-Intelligence-AI---Group-project | 59a2a00af3a0bbf84ba5932ebd9efe362201ea89 | [
"MIT"
] | null | null | null | game_func_q.py | stephen447/CS7IS2-Artificial-Intelligence-AI---Group-project | 59a2a00af3a0bbf84ba5932ebd9efe362201ea89 | [
"MIT"
] | null | null | null | # 2048.py
# importing the logic.py file
# where we have written all the
# logic functions used.
import logic # Modified this to
import numpy as np
def game(current_matrix, x, curr_score):
# we have to move up
if (x == 'W' or x == 'w'):
# call the move_up function
mat, flag, score = logic.mov... | 29.476923 | 162 | 0.629958 |
29de4516489dfad4851cb8b2f9987baccd0064c6 | 1,079 | py | Python | tests/test_edge_odometry.py | Golbstein/python-graphslam | cccc022b2f5d797f6511bda9e7dd3a24af403016 | [
"MIT"
] | 97 | 2020-02-24T00:34:56.000Z | 2022-03-23T11:43:19.000Z | tests/test_edge_odometry.py | Golbstein/python-graphslam | cccc022b2f5d797f6511bda9e7dd3a24af403016 | [
"MIT"
] | 3 | 2020-02-18T15:46:40.000Z | 2022-03-17T02:01:51.000Z | tests/test_edge_odometry.py | Golbstein/python-graphslam | cccc022b2f5d797f6511bda9e7dd3a24af403016 | [
"MIT"
] | 13 | 2020-06-09T08:27:27.000Z | 2021-11-23T14:05:14.000Z | # Copyright (c) 2020 Jeff Irion and contributors
"""Unit tests for the graph.py module.
"""
import unittest
from graphslam.vertex import Vertex
from graphslam.edge.edge_odometry import EdgeOdometry
from graphslam.pose.r2 import PoseR2
from graphslam.pose.r3 import PoseR3
from graphslam.pose.se2 import PoseSE2
from... | 24.522727 | 67 | 0.613531 |
20ac501dcbb2e26df8785173889db5d7723a88f5 | 18,977 | py | Python | run_pretraining.py | xuanyuan14/PROP | 455db8370253d4132376500f2deb5d23c507a7aa | [
"Apache-2.0"
] | 87 | 2020-10-23T10:27:46.000Z | 2022-03-21T09:26:38.000Z | run_pretraining.py | shubhampachori12110095/PROP | 455db8370253d4132376500f2deb5d23c507a7aa | [
"Apache-2.0"
] | 11 | 2020-12-22T07:16:33.000Z | 2021-08-22T02:47:52.000Z | run_pretraining.py | shubhampachori12110095/PROP | 455db8370253d4132376500f2deb5d23c507a7aa | [
"Apache-2.0"
] | 12 | 2020-10-21T06:42:31.000Z | 2022-03-15T07:13:59.000Z | import os
import json
import random
import logging
import numpy as np
from tqdm import tqdm
from pathlib import Path
from collections import namedtuple
from argparse import ArgumentParser
from tempfile import TemporaryDirectory
import torch
from tensorboardX import SummaryWriter
from torch.utils.data.distributed impor... | 46.741379 | 140 | 0.609317 |
9b122a7f25762268fa7a78c33cfa5d9a49e24f6a | 630 | py | Python | gym/migrations/0007_auto_20210317_1154.py | Code-Institute-Submissions/danielboots-fytletic | 67c3000a4b681d7f76255ab11db841a7f2ba613e | [
"OLDAP-2.3"
] | 1 | 2021-03-31T18:54:25.000Z | 2021-03-31T18:54:25.000Z | gym/migrations/0007_auto_20210317_1154.py | Code-Institute-Submissions/danielboots-fytletic | 67c3000a4b681d7f76255ab11db841a7f2ba613e | [
"OLDAP-2.3"
] | null | null | null | gym/migrations/0007_auto_20210317_1154.py | Code-Institute-Submissions/danielboots-fytletic | 67c3000a4b681d7f76255ab11db841a7f2ba613e | [
"OLDAP-2.3"
] | 1 | 2021-03-31T11:00:11.000Z | 2021-03-31T11:00:11.000Z | # Generated by Django 3.1.6 on 2021-03-17 11:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gym', '0006_gym_about'),
]
operations = [
migrations.AddField(
model_name='gym',
name='gym_owner',
field... | 25.2 | 87 | 0.577778 |
f12ac401c64493f1fc0cd424d536c7773d40fec1 | 14,497 | py | Python | hydrus/test/TestServerDB.py | Trivernis/hydrus | 212088ba4b504c3dbce45c602741b0cce2e799b4 | [
"WTFPL"
] | null | null | null | hydrus/test/TestServerDB.py | Trivernis/hydrus | 212088ba4b504c3dbce45c602741b0cce2e799b4 | [
"WTFPL"
] | 23 | 2020-09-28T21:07:00.000Z | 2021-07-13T16:04:42.000Z | hydrus/test/TestServerDB.py | Trivernis/hydrus | 212088ba4b504c3dbce45c602741b0cce2e799b4 | [
"WTFPL"
] | 2 | 2021-01-04T14:12:38.000Z | 2021-04-18T03:37:02.000Z | import time
import unittest
from hydrus.core import HydrusConstants as HC
from hydrus.core import HydrusData
from hydrus.core import HydrusExceptions
from hydrus.core import HydrusGlobals as HG
from hydrus.core.networking import HydrusNetwork
from hydrus.core.networking import HydrusNetworking
from hydrus.server impo... | 42.764012 | 203 | 0.660964 |
23d1035ff68ec45edbbcfa9ffdf973f6455aeaf0 | 2,080 | py | Python | Tools/scons/scons-local/SCons/Tool/MSCommon/arch.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Tools/scons/scons-local/SCons/Tool/MSCommon/arch.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Tools/scons/scons-local/SCons/Tool/MSCommon/arch.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | #
# Copyright (c) 2001 - 2017 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify,... | 30.588235 | 81 | 0.670192 |
5178824357fc7db7a021861f18542425332bae28 | 369 | py | Python | geotrek/feedback/migrations/0029_auto_20220324_0944.py | GeotrekCE/Geotrek | c1393925c1940ac795ab7fc04819cd8c78bc79fb | [
"BSD-2-Clause"
] | null | null | null | geotrek/feedback/migrations/0029_auto_20220324_0944.py | GeotrekCE/Geotrek | c1393925c1940ac795ab7fc04819cd8c78bc79fb | [
"BSD-2-Clause"
] | null | null | null | geotrek/feedback/migrations/0029_auto_20220324_0944.py | GeotrekCE/Geotrek | c1393925c1940ac795ab7fc04819cd8c78bc79fb | [
"BSD-2-Clause"
] | null | null | null | # Generated by Django 3.1.14 on 2022-03-24 09:44
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('feedback', '0028_auto_20220316_0951'),
]
operations = [
migrations.RenameField(
model_name='report',
old_name='uid',
... | 19.421053 | 48 | 0.590786 |
088183274a9a4d2c1bce034cd75160d37640640a | 67,705 | py | Python | elkserver/docker/redelk-base/redelkinstalldata/scripts/modules/email/module.py | fastlorenzo/test-ci | cc4f221ec013e8b3d1b3d651c4698ecd3f810445 | [
"BSD-3-Clause"
] | null | null | null | elkserver/docker/redelk-base/redelkinstalldata/scripts/modules/email/module.py | fastlorenzo/test-ci | cc4f221ec013e8b3d1b3d651c4698ecd3f810445 | [
"BSD-3-Clause"
] | 1 | 2020-11-04T18:37:47.000Z | 2020-11-04T18:37:53.000Z | elkserver/docker/redelk-base/redelkinstalldata/scripts/modules/email/module.py | fastlorenzo/test-ci | cc4f221ec013e8b3d1b3d651c4698ecd3f810445 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python3
#
# Part of RedELK
# Script to check if there are alarms to be sent
#
# Author: Outflank B.V. / Mark Bergman / @xychix
# Contributor: Lorenzo Bernardi / @fastlorenzo
#
from config import notifications
import socket
import json
import argparse
import csv
import hashlib
import requests
i... | 391.358382 | 60,253 | 0.920641 |
97598790b59ac25684c5914151a3314045835995 | 5,798 | py | Python | wandb/__init__.py | tgisaturday/client | 9c3274cf6035636e0e05ce7e1d869bb2f5e03482 | [
"MIT"
] | 1 | 2020-09-16T19:06:01.000Z | 2020-09-16T19:06:01.000Z | wandb/__init__.py | ashzblum/client | 768ca0b40be3bbd58fc7bfe6211c06ca07e1b216 | [
"MIT"
] | null | null | null | wandb/__init__.py | ashzblum/client | 768ca0b40be3bbd58fc7bfe6211c06ca07e1b216 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Wandb is a library to help track machine learning experiments.
For more information on wandb see https://docs.wandb.com.
The most commonly used functions/objects are:
- wandb.init — initialize a new run at the top of your training script
- wandb.config — track hyperparameters
- wandb.log —... | 26.842593 | 102 | 0.754053 |
8ef9b278c59b97d06d0eddc028c98fd6bf7ef957 | 954 | py | Python | pyinterview/tries.py | jodahoney/pyinterview | 58662b569edf077fbea2cda8e2a045d5da55c7bf | [
"MIT"
] | 2 | 2021-08-20T22:28:26.000Z | 2021-10-03T06:11:23.000Z | pyinterview/tries.py | jodahoney/pyinterview | 58662b569edf077fbea2cda8e2a045d5da55c7bf | [
"MIT"
] | 15 | 2021-10-01T00:26:48.000Z | 2021-10-07T21:19:23.000Z | pyinterview/tries.py | jodahoney/pyinterview | 58662b569edf077fbea2cda8e2a045d5da55c7bf | [
"MIT"
] | 5 | 2021-10-02T22:20:45.000Z | 2021-10-04T05:47:45.000Z | class TrieNode:
def __init__(self, letter=None):
self.letter = letter
self.children = {}
self.is_end_of_word = False
class Trie:
def __init__(self):
self.root = TrieNode("*")
def add_word(self, word: str) -> None:
itr = self.root
for letter in word:
... | 27.257143 | 55 | 0.550314 |
72a99777dea025608390e4d0e81f8afe0eef7bc5 | 809 | py | Python | Lib/corpuscrawler/crawl_kac.py | cash/corpuscrawler | 8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d | [
"Apache-2.0"
] | 95 | 2019-06-13T23:34:21.000Z | 2022-03-12T05:22:49.000Z | Lib/corpuscrawler/crawl_kac.py | sahwar/corpuscrawler | 8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d | [
"Apache-2.0"
] | 31 | 2019-06-02T18:56:53.000Z | 2021-08-10T20:16:02.000Z | Lib/corpuscrawler/crawl_kac.py | sahwar/corpuscrawler | 8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d | [
"Apache-2.0"
] | 35 | 2019-06-18T08:26:24.000Z | 2022-01-11T13:59:40.000Z | # Copyright 2018 Google LLC
#
# 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, ... | 36.772727 | 74 | 0.770087 |
e99ce57d03981b064dd42f946e806317b9ac26a5 | 5,340 | py | Python | src/data/yahoofinance.py | philippschmalen/Alternative-ESG-data-codebase | bf8b1de3ff4e2deebc206270ce81cc8bc94028a8 | [
"MIT"
] | null | null | null | src/data/yahoofinance.py | philippschmalen/Alternative-ESG-data-codebase | bf8b1de3ff4e2deebc206270ce81cc8bc94028a8 | [
"MIT"
] | 1 | 2021-06-16T15:37:21.000Z | 2021-06-16T15:37:21.000Z | src/data/yahoofinance.py | philippschmalen/Alternative-ESG-data-codebase | bf8b1de3ff4e2deebc206270ce81cc8bc94028a8 | [
"MIT"
] | 1 | 2021-05-22T14:26:02.000Z | 2021-05-22T14:26:02.000Z | """
Retrieve firm-level esg scores, process firm names and construct query strings
"""
from yahooquery import Ticker
from pytickersymbols import PyTickerSymbols
import logging
import numpy as np
import pandas as pd
import yaml
# ---------------------------------------------------
# INDEX DETAILS
# -------------------... | 32.363636 | 111 | 0.687079 |
cb4a9d0d0e835f5ce9e9b9d013002a66721d67e9 | 624 | py | Python | conf_dev.py | tang3/DarkNet_ChineseTrading | 0d2d4c998fe7527ee5d0276d05e79b20e915873a | [
"MIT"
] | 1 | 2019-06-28T02:23:49.000Z | 2019-06-28T02:23:49.000Z | conf_dev.py | tang3/DarkNet_ChineseTrading | 0d2d4c998fe7527ee5d0276d05e79b20e915873a | [
"MIT"
] | null | null | null | conf_dev.py | tang3/DarkNet_ChineseTrading | 0d2d4c998fe7527ee5d0276d05e79b20e915873a | [
"MIT"
] | null | null | null | class ConfigDev:
debug = True
mysql_host = "1.2.3.4"
mysql_port = 3306
mysql_usr = "root"
mysql_pass = ""
mysql_db = "db"
redis_host = "127.0.0.1"
redis_port = 6379
telegram_proxy = None
telegram_token = "xxxxxxxxxxxxxxxxxxx"
darknetchannelID = "-100000000000"
ReportGro... | 17.828571 | 42 | 0.522436 |
38d2421bb4f2fd91abd7226c3c7551fe3d81a447 | 374 | py | Python | helixalm/__init__.py | tcrory/helixalm | a8a4fe7a5f845617f62d923974309228a0c412f5 | [
"MIT"
] | null | null | null | helixalm/__init__.py | tcrory/helixalm | a8a4fe7a5f845617f62d923974309228a0c412f5 | [
"MIT"
] | 1 | 2018-12-18T13:43:54.000Z | 2018-12-18T13:55:21.000Z | helixalm/__init__.py | tcrory/helixalm | a8a4fe7a5f845617f62d923974309228a0c412f5 | [
"MIT"
] | null | null | null | """
Helix ALM API Python Wrapper
helixalm is a python package that allows for simple access to Helix ALM's REST API.
"""
import sys
# Enforce Python 3.6+
if sys.verion_info.major != 3 or sys.verion_info.minor < 6:
raise ImportError('Helix ALM package requires Python 3.6 or greater.')
# Package level imports.
fr... | 23.375 | 83 | 0.748663 |
9b567d9c09ea25ef1fb4893ec006417cc777f574 | 3,761 | py | Python | app/uis/chat/message.py | CNC-Messenger/Desktop-Client | 8b3fc7b3bad78d8dbfcf806993f797c3f8932c51 | [
"MIT"
] | 86 | 2021-05-27T05:47:10.000Z | 2022-03-13T06:31:47.000Z | app/uis/chat/message.py | CNC-Messenger/Desktop-Client | 8b3fc7b3bad78d8dbfcf806993f797c3f8932c51 | [
"MIT"
] | 2 | 2021-05-26T19:00:41.000Z | 2021-06-29T13:17:38.000Z | app/uis/chat/message.py | CNC-Messenger/Desktop-Client | 8b3fc7b3bad78d8dbfcf806993f797c3f8932c51 | [
"MIT"
] | 38 | 2021-05-31T16:12:04.000Z | 2022-03-24T09:49:56.000Z | # ///////////////////////////////////////////////////////////////
#
# BY: WANDERSON M.PIMENTA
# PROJECT MADE WITH: Qt Designer and PySide6
# V: 1.0.0
#
# This project can be used freely for all uses, as long as they maintain the
# respective credits only in the Python scripts, any information in the visual
# interface ... | 33.882883 | 153 | 0.578835 |
b73c37e09180d9b145a7e1dcf4b27f2e3a0b1095 | 1,348 | py | Python | orders/models.py | faizalazman/Bakery | a22d9ec34ee0e3c91c7caf7d53cb2db730885e3f | [
"MIT"
] | null | null | null | orders/models.py | faizalazman/Bakery | a22d9ec34ee0e3c91c7caf7d53cb2db730885e3f | [
"MIT"
] | null | null | null | orders/models.py | faizalazman/Bakery | a22d9ec34ee0e3c91c7caf7d53cb2db730885e3f | [
"MIT"
] | null | null | null | from django.db import models
from menu.models import Menu
class Order(models.Model):
first_name = models.CharField(max_length=50)
last_name = models.CharField(max_length=50)
email = models.EmailField()
address = models.CharField(max_length=250)
phone = models.CharField(max_length=20)
created =... | 32.095238 | 64 | 0.649852 |
e78e432c494a2039e0a6691fab3f07475d185c7c | 1,608 | py | Python | envy/lib/file_downloader.py | magmastonealex/fydp | fe3df058c3a7036e7e87ce6e7837b598007d7740 | [
"MIT"
] | 6 | 2019-06-26T02:32:12.000Z | 2020-03-01T23:08:37.000Z | envy/lib/file_downloader.py | magmastonealex/fydp | fe3df058c3a7036e7e87ce6e7837b598007d7740 | [
"MIT"
] | 18 | 2019-06-26T04:08:33.000Z | 2021-06-01T23:53:08.000Z | envy/lib/file_downloader.py | envy-project/envy | fe3df058c3a7036e7e87ce6e7837b598007d7740 | [
"MIT"
] | null | null | null | import requests
from envy.lib.config.file import find_config_file
class ConfigExecFile:
def __init__(self, filename, byt):
self.filename = filename
self.bytes = byt
class FileDownloadError(Exception):
def __init__(self, requests_error):
super(FileDownloadError, self).__init__()
... | 34.956522 | 106 | 0.616294 |
6cdd3d7b38b29b49bf06bb9777a11f26053323e7 | 375 | py | Python | release/release-control-shell/service/java_service_action.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 39 | 2021-10-12T01:43:27.000Z | 2022-03-28T04:46:35.000Z | release/release-control-shell/service/java_service_action.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 6 | 2021-10-14T02:11:47.000Z | 2022-03-23T02:41:50.000Z | release/release-control-shell/service/java_service_action.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 10 | 2021-10-14T09:36:03.000Z | 2022-02-10T11:05:12.000Z | import os.path
from service.service_action import BaseServiceAction
class JavaServiceAction(BaseServiceAction):
def run(self):
download_path = self.download(self.config.service + ".jar")
target = os.path.join(
self.wefe_dir,
self.config.service + ".jar"
)
... | 22.058824 | 67 | 0.642667 |
40bbd2f16972dfc87130960d0ab83e9cf6534fb5 | 627 | py | Python | plotly/validators/scatter/marker/_color.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 2 | 2018-12-03T15:20:42.000Z | 2018-12-03T15:20:47.000Z | plotly/validators/scatter/marker/_color.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scatter/marker/_color.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 2 | 2019-06-17T01:35:57.000Z | 2020-11-03T01:07:19.000Z | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name='color', parent_name='scatter.marker', **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_n... | 31.35 | 73 | 0.606061 |
5f8d6bf088e739cdac2f5fc3d26c1e965648819c | 10,842 | py | Python | neutron/tests/unit/services/firewall/drivers/varmour/test_varmour_fwaas.py | JackyGao2016/OpenStack-ML2 | fc0569e72c7cfdbf9464c95572b242bfdd4cd79c | [
"Apache-2.0"
] | 1 | 2021-02-19T05:54:04.000Z | 2021-02-19T05:54:04.000Z | neutron/tests/unit/services/firewall/drivers/varmour/test_varmour_fwaas.py | JackyGao2016/OpenStack-ML2 | fc0569e72c7cfdbf9464c95572b242bfdd4cd79c | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/services/firewall/drivers/varmour/test_varmour_fwaas.py | JackyGao2016/OpenStack-ML2 | fc0569e72c7cfdbf9464c95572b242bfdd4cd79c | [
"Apache-2.0"
] | 2 | 2016-11-29T11:22:58.000Z | 2016-11-29T11:54:41.000Z | # Copyright 2013 vArmour Networks 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 req... | 37.003413 | 79 | 0.625254 |
c89b5952aee6d0a08245a3b5d49b3c5ec3bd5098 | 1,485 | py | Python | src/models/model_monitor.py | genbid007-ml/churn_model | cfd91bafd5089b4a29008305702e66d8f70d67b6 | [
"MIT"
] | null | null | null | src/models/model_monitor.py | genbid007-ml/churn_model | cfd91bafd5089b4a29008305702e66d8f70d67b6 | [
"MIT"
] | null | null | null | src/models/model_monitor.py | genbid007-ml/churn_model | cfd91bafd5089b4a29008305702e66d8f70d67b6 | [
"MIT"
] | null | null | null | import yaml
import argparse
import pandas as pd
from evidently.dashboard import Dashboard
from evidently.tabs import DataDriftTab, CatTargetDriftTab
def read_params(config_path):
"""
read parameters from the params.yaml file
input: params.yaml location
output: parameters as dictionary
"""
with... | 35.357143 | 87 | 0.758249 |
8e60971ac06c9e3758e1e063442de81cb6c976d7 | 425 | py | Python | backend/api/admin.py | sperrys/YEF_DEBUG | 8e09342ef9639c4f6abe1390f37dddb8e398784c | [
"MIT"
] | 2 | 2018-12-10T03:14:31.000Z | 2019-03-27T16:20:36.000Z | backend/api/admin.py | sperrys/YEF_DEBUG | 8e09342ef9639c4f6abe1390f37dddb8e398784c | [
"MIT"
] | 22 | 2018-12-06T23:54:20.000Z | 2019-04-17T18:15:43.000Z | backend/api/admin.py | sperrys/YEF_DEBUG | 8e09342ef9639c4f6abe1390f37dddb8e398784c | [
"MIT"
] | 1 | 2020-11-03T05:27:10.000Z | 2020-11-03T05:27:10.000Z | from django.contrib import admin
from api.models import Team, Tournament, Round, MemberPoint, JudgePoint, MatchUp, Judge, Member, Club
# Register your models here.
admin.site.register(Tournament)
admin.site.register(Team)
admin.site.register(Round)
admin.site.register(MemberPoint)
admin.site.register(JudgePoint)
admin... | 30.357143 | 101 | 0.814118 |
33247b217b290f05dcb38bc24b83683bd93e64fa | 2,044 | py | Python | session/pyrogram.py | aviskumar/speedo | 758e8ac1fdeeb0b72c3a57742032ca5c79f0b2fa | [
"BSD-3-Clause"
] | null | null | null | session/pyrogram.py | aviskumar/speedo | 758e8ac1fdeeb0b72c3a57742032ca5c79f0b2fa | [
"BSD-3-Clause"
] | null | null | null | session/pyrogram.py | aviskumar/speedo | 758e8ac1fdeeb0b72c3a57742032ca5c79f0b2fa | [
"BSD-3-Clause"
] | 1 | 2021-08-30T12:28:55.000Z | 2021-08-30T12:28:55.000Z |
import logging
import os
import time
import motor.motor_asyncio
from pyrogram import Client
from .config_var import Config
# Note StartUp Time - To Capture Uptime.
start_time = time.time()
speedo_version = "0.1"
# Enable Logging For Pyrogram
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - [Sp... | 22.217391 | 70 | 0.677104 |
f174cb1ff031740b0968a47b00108504fb91af85 | 2,806 | py | Python | sle_gan/data.py | kitbogashow/SLE-GAN | 6a7a6398d5124720315b92105e3a813934bb07bd | [
"MIT"
] | 63 | 2020-11-22T13:32:23.000Z | 2022-03-31T07:50:53.000Z | sle_gan/data.py | kitbogashow/SLE-GAN | 6a7a6398d5124720315b92105e3a813934bb07bd | [
"MIT"
] | 5 | 2020-11-27T06:26:29.000Z | 2022-01-14T04:42:53.000Z | sle_gan/data.py | kitbogashow/SLE-GAN | 6a7a6398d5124720315b92105e3a813934bb07bd | [
"MIT"
] | 11 | 2020-12-03T11:34:43.000Z | 2022-02-22T02:14:19.000Z | from functools import partial
import tensorflow as tf
def create_input_noise(batch_size: int):
return tf.random.normal(shape=(batch_size, 1, 1, 256), mean=0.0, stddev=1.0, dtype=tf.float32)
def read_image_from_path(image_path):
image = tf.io.read_file(image_path)
image = tf.image.decode_jpeg... | 31.177778 | 121 | 0.643977 |
67472a179edc48f5c65f30ee14c6f330e7f5fd0d | 2,138 | py | Python | fractal/contrib/gcp/firestore/specifications.py | douwevandermeij/fractal | 66b04892b4d6fd8ee6a0c07b6e230f4321165085 | [
"MIT"
] | 2 | 2021-08-12T05:19:08.000Z | 2022-01-29T16:22:37.000Z | fractal/contrib/gcp/firestore/specifications.py | douwevandermeij/fractal | 66b04892b4d6fd8ee6a0c07b6e230f4321165085 | [
"MIT"
] | null | null | null | fractal/contrib/gcp/firestore/specifications.py | douwevandermeij/fractal | 66b04892b4d6fd8ee6a0c07b6e230f4321165085 | [
"MIT"
] | null | null | null | from typing import Collection, Optional
from fractal.core.exceptions import DomainException
from fractal.core.specifications.generic.collections import AndSpecification
from fractal.core.specifications.generic.operators import (
EqualsSpecification,
GreaterThanEqualSpecification,
GreaterThanSpecification,
... | 41.921569 | 77 | 0.706735 |
58383f77c851ea9de5dcf86f1a4fb7ee54fc714f | 12,862 | py | Python | django/sierra/export/tasks.py | Miamiohlibs/catalog-api | dee81a808bbe55e4c8325945ebb559edba593819 | [
"BSD-3-Clause"
] | null | null | null | django/sierra/export/tasks.py | Miamiohlibs/catalog-api | dee81a808bbe55e4c8325945ebb559edba593819 | [
"BSD-3-Clause"
] | null | null | null | django/sierra/export/tasks.py | Miamiohlibs/catalog-api | dee81a808bbe55e4c8325945ebb559edba593819 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import logging
import sys, traceback
import pysolr
from django.core import mail
from django import template
from django.conf import settings
from django.contrib.auth.models import User
from django.utils import timezone as tz
from django.db import connections
from celery import... | 39.453988 | 79 | 0.625641 |
e24f22dab45888b99d720ae86257fa7c2874d468 | 13,541 | py | Python | robot/OutboundFundsNPSP/resources/OutboundFundsNPSP.py | SalesforceFoundation/OutboundFundsNPSP | 99072a88574d6daff4c186fa337eb99b7f341497 | [
"BSD-3-Clause"
] | 2 | 2018-08-03T17:12:08.000Z | 2020-05-23T21:18:40.000Z | robot/OutboundFundsNPSP/resources/OutboundFundsNPSP.py | SalesforceFoundation/OutboundFundsModuleNPSP | 68809978337ff0cf68cc73923de7cbd2e4dc4929 | [
"BSD-3-Clause"
] | 23 | 2021-03-29T19:41:15.000Z | 2022-02-23T19:51:36.000Z | robot/OutboundFundsNPSP/resources/OutboundFundsNPSP.py | SFDO-Community/OutboundFundsNPSP | 68809978337ff0cf68cc73923de7cbd2e4dc4929 | [
"BSD-3-Clause"
] | 4 | 2018-11-21T19:45:54.000Z | 2020-01-14T22:03:05.000Z | import logging
import random
import string
import warnings
from BaseObjects import BaseOutboundFundsNPSPPage
from robot.libraries.BuiltIn import RobotNotRunningError
from locators_52 import outboundfundsnpsp_lex_locators as locators_52
from locators_51 import outboundfundsnpsp_lex_locators as locators_51
from cumulusc... | 43.822006 | 90 | 0.642198 |
0a7b04a588c74e452af273b89e40dc2edfacdb94 | 1,170 | py | Python | Python/Examples/Scripts/CycleTimeDisplayAll.py | halmusaibeli/RoboDK-API | e017aa26715bc8d0fcbbc05e57acc32f2d2d6174 | [
"MIT"
] | null | null | null | Python/Examples/Scripts/CycleTimeDisplayAll.py | halmusaibeli/RoboDK-API | e017aa26715bc8d0fcbbc05e57acc32f2d2d6174 | [
"MIT"
] | null | null | null | Python/Examples/Scripts/CycleTimeDisplayAll.py | halmusaibeli/RoboDK-API | e017aa26715bc8d0fcbbc05e57acc32f2d2d6174 | [
"MIT"
] | null | null | null | # This example shows how to quickly calculate the cycle time of all programs in the RoboDK station
#
# Important notes and tips for accurate cycle time calculation:
# https://robodk.com/doc/en/General.html#CycleTime
# Start the RoboDK API
from robodk.robolink import * # RoboDK API
RDK = Robolink()
writeline = "Prog... | 34.411765 | 98 | 0.689744 |
2f66d6202eb48f20d4769b2f1fae2edf49114bcc | 1,667 | py | Python | StocksBROTHER/emailing.py | romainledru/WebBROTHER | b212c98e6a59ed80c2f8371cab57c887eab16a09 | [
"MIT"
] | null | null | null | StocksBROTHER/emailing.py | romainledru/WebBROTHER | b212c98e6a59ed80c2f8371cab57c887eab16a09 | [
"MIT"
] | null | null | null | StocksBROTHER/emailing.py | romainledru/WebBROTHER | b212c98e6a59ed80c2f8371cab57c887eab16a09 | [
"MIT"
] | null | null | null | import smtplib
class Emailing():
def __init__(self):
self.server = smtplib.SMTP("smtp.gmail.com",587)
self.server.ehlo()
self.server.starttls()
self.server.ehlo()
self.destination = self.takeData("txt.username")
self.server.login(self.takeData("txt.username"),self... | 30.87037 | 171 | 0.59988 |
b1efe502d0fdfce3d84a7fd294898e4a6b4cbcf3 | 1,182 | py | Python | state_machine/example_cqi.py | Stvad/pyconie_dsl | ef132b4cec9a8ae130732b690bf1003342af3c31 | [
"Apache-2.0"
] | 2 | 2018-11-07T17:43:57.000Z | 2020-12-07T13:13:11.000Z | state_machine/example_cqi.py | Stvad/pyconie_dsl | ef132b4cec9a8ae130732b690bf1003342af3c31 | [
"Apache-2.0"
] | null | null | null | state_machine/example_cqi.py | Stvad/pyconie_dsl | ef132b4cec9a8ae130732b690bf1003342af3c31 | [
"Apache-2.0"
] | 1 | 2020-01-23T22:15:28.000Z | 2020-01-23T22:15:28.000Z | from .model import State, Event, Action, Transition, StateMachine
tv_on = Event('tvOn', 'TVON')
couch_active = Event('couchActive', 'COAC')
it_is_evening = Event('itIsEvening', 'ITEV')
new_day = Event('newDay', 'NEDY')
turn_off_tv = Action('turnOffTv', 'TTOF')
order_pizza = Action('orderPizza', 'OPZZ')
idle = State(... | 30.307692 | 94 | 0.799492 |
6ef362ed2a145ca664bdfcc7750c98831f6e2443 | 675 | py | Python | sked/migrations/0001_initial.py | ABASystems/django-sked | 48a31291c9735b48fa734bf55b8697abc14788bb | [
"BSD-3-Clause"
] | null | null | null | sked/migrations/0001_initial.py | ABASystems/django-sked | 48a31291c9735b48fa734bf55b8697abc14788bb | [
"BSD-3-Clause"
] | null | null | null | sked/migrations/0001_initial.py | ABASystems/django-sked | 48a31291c9735b48fa734bf55b8697abc14788bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-05 22:26
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migr... | 25.961538 | 114 | 0.608889 |
9c0bec9e297261e9fac2959269db9758bd9b7f47 | 26,449 | py | Python | representation_batch_rl/representation_batch_rl/pse_pixels.py | xxdreck/google-research | dac724bc2b9362d65c26747a8754504fe4c615f8 | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | representation_batch_rl/representation_batch_rl/pse_pixels.py | xxdreck/google-research | dac724bc2b9362d65c26747a8754504fe4c615f8 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | representation_batch_rl/representation_batch_rl/pse_pixels.py | admariner/google-research | 7cee4b22b925581d912e8d993625c180da2a5a4f | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 35.549731 | 165 | 0.666037 |
82a772982bc6a81f416d6aa672e49f389fefebb0 | 422 | py | Python | plasmapy/formulary/__init__.py | KhalilBryant/PlasmaPy | 05f7cb60348c7048fb3b8fbaf25985f2fba47fb7 | [
"MIT",
"BSD-2-Clause-Patent",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2020-02-14T16:35:02.000Z | 2020-02-14T16:35:02.000Z | plasmapy/formulary/__init__.py | KhalilBryant/PlasmaPy | 05f7cb60348c7048fb3b8fbaf25985f2fba47fb7 | [
"MIT",
"BSD-2-Clause-Patent",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | plasmapy/formulary/__init__.py | KhalilBryant/PlasmaPy | 05f7cb60348c7048fb3b8fbaf25985f2fba47fb7 | [
"MIT",
"BSD-2-Clause-Patent",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | """
The `~plasmapy.formulary` subpackage contains commonly used formulae
from plasma science.
"""
from .braginskii import *
from .collisions import *
from .dielectric import *
from .dimensionless import *
from .dispersionfunction import *
from .distribution import *
from .drifts import *
from .magnetostatics import *
... | 23.444444 | 68 | 0.772512 |
ff20e20720de8a2dd248f3ad1a2044ca4f0864f5 | 2,400 | py | Python | setup.py | MartinHjelmare/cam_acq | 3a699f621bb0aa7729c8378f52aac647b7acbf3d | [
"Apache-2.0"
] | null | null | null | setup.py | MartinHjelmare/cam_acq | 3a699f621bb0aa7729c8378f52aac647b7acbf3d | [
"Apache-2.0"
] | null | null | null | setup.py | MartinHjelmare/cam_acq | 3a699f621bb0aa7729c8378f52aac647b7acbf3d | [
"Apache-2.0"
] | null | null | null | """Set up file for camacq package."""
from pathlib import Path
from setuptools import find_packages, setup
PROJECT_DIR = Path(__file__).parent.resolve()
VERSION = (PROJECT_DIR / "camacq" / "VERSION").read_text(encoding="utf-8").strip()
GITHUB_URL = "https://github.com/CellProfiling/cam_acq"
REQUIRES = [
"async_t... | 32 | 82 | 0.6475 |
f79ad7b14bff5001e18640b3929db9a8296e528e | 584 | py | Python | model/builder.py | BrokenShell/LabsStarter | 04c11aa4d7149f38ee5597cab46ea3ed0408ccf3 | [
"MIT"
] | null | null | null | model/builder.py | BrokenShell/LabsStarter | 04c11aa4d7149f38ee5597cab46ea3ed0408ccf3 | [
"MIT"
] | null | null | null | model/builder.py | BrokenShell/LabsStarter | 04c11aa4d7149f38ee5597cab46ea3ed0408ccf3 | [
"MIT"
] | null | null | null | from sklearn import svm, datasets
from joblib import dump
from sklearn.model_selection import train_test_split
X, y = datasets.load_iris(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(
X, y,
test_size=0.2,
stratify=y,
random_state=42,
)
model = svm.SVC(
class_weight='balanced... | 25.391304 | 71 | 0.72089 |
60efc6a80b7f176cdf44400ccadadbd7b0a34983 | 43,528 | py | Python | experiment_specific/transient_attention/HolcombeKristjansson.py | alexholcombe/MOTcircular | 6b4cfbf58a641a6b20b38e9acda11b114a60c060 | [
"MIT"
] | 2 | 2016-01-11T19:51:58.000Z | 2019-11-25T12:04:29.000Z | experiment_specific/transient_attention/HolcombeKristjansson.py | alexholcombe/MOTcircular | 6b4cfbf58a641a6b20b38e9acda11b114a60c060 | [
"MIT"
] | null | null | null | experiment_specific/transient_attention/HolcombeKristjansson.py | alexholcombe/MOTcircular | 6b4cfbf58a641a6b20b38e9acda11b114a60c060 | [
"MIT"
] | 2 | 2016-01-11T19:52:00.000Z | 2020-05-15T13:34:10.000Z | from __future__ import print_function
from __future__ import division
__author__ = """Alex "O." Holcombe""" ## double-quotes will be silently removed, single quotes will be left, eg, O'Connor
import helpersAOH
from psychopy import *
import psychopy.info
from psychopy import sound, monitors, logging
import numpy ... | 58.270415 | 200 | 0.678299 |
3963ed2560c11b7702d30d1e4fadc15f6a33bdf3 | 10,428 | py | Python | tests/mechanisms/test_contrastive_hebbian_mechanism.py | bdsinger/PsyNeuLink | 71d8a0bb1691ff85061d4ad3de866d9930a69a73 | [
"Apache-2.0"
] | null | null | null | tests/mechanisms/test_contrastive_hebbian_mechanism.py | bdsinger/PsyNeuLink | 71d8a0bb1691ff85061d4ad3de866d9930a69a73 | [
"Apache-2.0"
] | null | null | null | tests/mechanisms/test_contrastive_hebbian_mechanism.py | bdsinger/PsyNeuLink | 71d8a0bb1691ff85061d4ad3de866d9930a69a73 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import psyneulink as pnl
import pytest
import psyneulink.core.components.functions.learningfunctions
import psyneulink.core.components.functions.transferfunctions
class TestContrastiveHebbian:
def test_scheduled_contrastive_hebbian(self):
o = pnl.TransferMechanism()
m = pnl.Co... | 46.972973 | 143 | 0.573552 |
c2362a797949fb6e78b61e09010021aadf236b54 | 16,279 | py | Python | setup.py | shareablee/cassandra-python-driver | 0bc84227097d1304aaa8c22c9d5c68d83eb444a0 | [
"Apache-2.0"
] | null | null | null | setup.py | shareablee/cassandra-python-driver | 0bc84227097d1304aaa8c22c9d5c68d83eb444a0 | [
"Apache-2.0"
] | 1 | 2020-01-17T13:48:18.000Z | 2020-01-17T13:48:18.000Z | setup.py | shareablee/cassandra-python-driver | 0bc84227097d1304aaa8c22c9d5c68d83eb444a0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013-2016 DataStax, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 37.251716 | 157 | 0.61564 |
34158cc64450537c0d44bcc3a04a9d533b807c59 | 961 | py | Python | custom_components/ha_kia_hyundai/base_entity.py | jaywryan/ha_kia_hyundai | 422790bb42f0a402e9f9eb03834fca73fc195b09 | [
"MIT"
] | 9 | 2021-12-18T21:30:10.000Z | 2022-03-03T21:44:49.000Z | custom_components/ha_kia_hyundai/base_entity.py | jaywryan/ha_kia_hyundai | 422790bb42f0a402e9f9eb03834fca73fc195b09 | [
"MIT"
] | 34 | 2021-11-30T19:17:46.000Z | 2021-12-16T01:33:24.000Z | custom_components/ha_kia_hyundai/base_entity.py | jaywryan/ha_kia_hyundai | 422790bb42f0a402e9f9eb03834fca73fc195b09 | [
"MIT"
] | 1 | 2022-01-14T08:00:44.000Z | 2022-01-14T08:00:44.000Z | import logging
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.update_coordinator import (
CoordinatorEntity,
)
from .const import DOMAIN
from .vehicle import Vehicle
_LOGGER = logging.getLogger(__name__)
class DeviceInfoMixin:
@property
def device_info(self):
return {... | 27.457143 | 96 | 0.662851 |
81f45b174445ff45e11ab8dc03c9521a1b8c1bdb | 189,064 | py | Python | dace/frontend/python/replacements.py | meshtag/dace | e6751ee6a4f6356b47b93065d43cefb3fd54ebaa | [
"BSD-3-Clause"
] | null | null | null | dace/frontend/python/replacements.py | meshtag/dace | e6751ee6a4f6356b47b93065d43cefb3fd54ebaa | [
"BSD-3-Clause"
] | null | null | null | dace/frontend/python/replacements.py | meshtag/dace | e6751ee6a4f6356b47b93065d43cefb3fd54ebaa | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import dace
import ast
import copy
from copy import deepcopy as dcpy
import itertools
import warnings
from functools import reduce
from numbers import Number, Integral
from typing import Any, Callable, Dict, List, Optional, Sequence, Set, Tupl... | 42.117175 | 120 | 0.586135 |
1517e13d1fe37a4db2ecbb3e3dba4ed2f96d9cf8 | 1,834 | py | Python | deep_sort/detection.py | Raghav-B/CS3244_Project | 735aee8817f8e2649f8e214f0abc51bea07b8cc1 | [
"MIT"
] | null | null | null | deep_sort/detection.py | Raghav-B/CS3244_Project | 735aee8817f8e2649f8e214f0abc51bea07b8cc1 | [
"MIT"
] | null | null | null | deep_sort/detection.py | Raghav-B/CS3244_Project | 735aee8817f8e2649f8e214f0abc51bea07b8cc1 | [
"MIT"
] | null | null | null | # vim: expandtab:ts=4:sw=4
import numpy as np
class Detection(object):
"""
This class represents a bounding box detection in a single image.
Parameters
----------
tlwh : array_like
Bounding box in format `(x, y, w, h)`.
confidence : float
Detector confidence score... | 30.065574 | 80 | 0.577426 |
7bba99f22cbbcaf52d9367555e89b62e06fbfa46 | 351 | py | Python | board/migrations/0012_remove_notification_ipaddress.py | devunt/hydrocarbon | 3e13f03f8375533c422a6e609742b3d2f4c38c0f | [
"MIT"
] | 8 | 2015-04-14T00:36:08.000Z | 2017-06-02T06:08:51.000Z | board/migrations/0012_remove_notification_ipaddress.py | devunt/hydrocarbon | 3e13f03f8375533c422a6e609742b3d2f4c38c0f | [
"MIT"
] | 10 | 2020-03-24T15:33:11.000Z | 2022-03-11T23:16:05.000Z | board/migrations/0012_remove_notification_ipaddress.py | devunt/hydrocarbon | 3e13f03f8375533c422a6e609742b3d2f4c38c0f | [
"MIT"
] | 2 | 2016-08-04T23:58:29.000Z | 2016-09-22T10:20:05.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('board', '0011_auto_20150111_1842'),
]
operations = [
migrations.RemoveField(
model_name='notification',
name... | 18.473684 | 45 | 0.606838 |
7d322b28484ba16feeaec1ec64b39b056a1f834e | 8,589 | py | Python | avod/core/box_list.py | Ascend-Huawei/AVOD | ea62372517bbfa9d4020bc5ab2739ee182c63c56 | [
"BSD-2-Clause"
] | null | null | null | avod/core/box_list.py | Ascend-Huawei/AVOD | ea62372517bbfa9d4020bc5ab2739ee182c63c56 | [
"BSD-2-Clause"
] | null | null | null | avod/core/box_list.py | Ascend-Huawei/AVOD | ea62372517bbfa9d4020bc5ab2739ee182c63c56 | [
"BSD-2-Clause"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.937238 | 80 | 0.641751 |
827b2a7f65366c7ff770e8098fc885891fc58b00 | 8,598 | py | Python | matrices.py | seanstappas/ecse-543-assignment2 | d1d017f19c80c0102e9fd1f1135e13c25bcec640 | [
"MIT"
] | null | null | null | matrices.py | seanstappas/ecse-543-assignment2 | d1d017f19c80c0102e9fd1f1135e13c25bcec640 | [
"MIT"
] | null | null | null | matrices.py | seanstappas/ecse-543-assignment2 | d1d017f19c80c0102e9fd1f1135e13c25bcec640 | [
"MIT"
] | null | null | null | from __future__ import division
import copy
import csv
from ast import literal_eval
import math
class Matrix:
def __init__(self, data):
self.data = data
self.num_rows = len(data)
self.num_cols = len(data[0])
def __str__(self):
string = ''
for row in self.data:
... | 34.53012 | 118 | 0.564085 |
9e4b91a632d3a1aa1f09c51852e3dccfa0bde4f9 | 5,419 | py | Python | docs/samples/specification/multiapi/generated/azure/multiapi/sample/v3/operations/_operation_group_one_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | docs/samples/specification/multiapi/generated/azure/multiapi/sample/v3/operations/_operation_group_one_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | docs/samples/specification/multiapi/generated/azure/multiapi/sample/v3/operations/_operation_group_one_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 38.985612 | 133 | 0.682045 |
c7228c0171705b0039409d71cba6f805d3a588f9 | 425 | py | Python | tests/python/test_stencils.py | rezahojabr/taichi | 122c0352ec480b740a4118819458cbf08d2e5ddb | [
"MIT"
] | 3 | 2020-01-08T02:58:51.000Z | 2020-10-28T07:01:58.000Z | tests/python/test_stencils.py | rezahojabr/taichi | 122c0352ec480b740a4118819458cbf08d2e5ddb | [
"MIT"
] | null | null | null | tests/python/test_stencils.py | rezahojabr/taichi | 122c0352ec480b740a4118819458cbf08d2e5ddb | [
"MIT"
] | 1 | 2020-03-25T16:37:00.000Z | 2020-03-25T16:37:00.000Z | import taichi as ti
@ti.all_archs
def test_simple():
# Note: access simplification does not work in this case. Maybe worth fixing.
x = ti.var(ti.i32)
y = ti.var(ti.i32)
n = 128
@ti.layout
def place():
ti.root.dense(ti.i, n).place(x, y)
@ti.kernel
def run():
for i in range(n - 1):
x[i]... | 15.740741 | 79 | 0.552941 |
d45ebf0d49ee5be84f5d8a96b10de137eb0f968c | 2,684 | py | Python | trove/cmd/guest.py | sapcc/trove | c03ec0827687fba202f72f4d264ab70158604857 | [
"Apache-2.0"
] | 1 | 2019-09-20T08:31:54.000Z | 2019-09-20T08:31:54.000Z | trove/cmd/guest.py | sapcc/trove | c03ec0827687fba202f72f4d264ab70158604857 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | trove/cmd/guest.py | sapcc/trove | c03ec0827687fba202f72f4d264ab70158604857 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright 2011 OpenStack Foundation
# 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 requ... | 37.802817 | 78 | 0.688152 |
fe92b77d764d3ff9ea4b18a96073536c9452e41b | 1,040 | py | Python | papermache/common.py | Boukalikrates/papermache | 8099da45ee094467d0f052aa9f970d89e97ea502 | [
"MIT"
] | null | null | null | papermache/common.py | Boukalikrates/papermache | 8099da45ee094467d0f052aa9f970d89e97ea502 | [
"MIT"
] | null | null | null | papermache/common.py | Boukalikrates/papermache | 8099da45ee094467d0f052aa9f970d89e97ea502 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# coding=utf-8
from hashlib import md5
import json
import urllib
def loadconfig(path,local=False):
try:
f=open(path+('/.papermache-config.json' if local else '/papermache/config.json'),'r')
config=json.loads(f.read())
#config=json.loads('{}')
... | 23.636364 | 130 | 0.55 |
ded4125edda48933fd12bd1beaffc2b5d3b1f9f3 | 2,295 | py | Python | setup.py | Dennis-van-Gils/python-dvg-debug-functions | 377d25ccea817b06c502443639c2ba50ca3341f1 | [
"MIT"
] | null | null | null | setup.py | Dennis-van-Gils/python-dvg-debug-functions | 377d25ccea817b06c502443639c2ba50ca3341f1 | [
"MIT"
] | null | null | null | setup.py | Dennis-van-Gils/python-dvg-debug-functions | 377d25ccea817b06c502443639c2ba50ca3341f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
import io
import re
from glob import glob
from os.path import basename
from os.path import dirname
from os.path import join
from os.path import splitext
from setuptools import find_packages
fro... | 31.438356 | 126 | 0.624401 |
e2ca3775d496dd7a313861fcbc4ec499da9a9715 | 2,925 | py | Python | pyfeatures/app/tiles.py | ome/pydoop-features | 189ee7a8cd28e92be9b7e5f51b61f39449564d2a | [
"Apache-2.0"
] | 2 | 2017-03-21T14:05:19.000Z | 2017-05-20T17:33:55.000Z | pyfeatures/app/tiles.py | ome/pydoop-features | 189ee7a8cd28e92be9b7e5f51b61f39449564d2a | [
"Apache-2.0"
] | 15 | 2017-04-12T11:09:58.000Z | 2017-12-20T07:51:08.000Z | pyfeatures/app/tiles.py | IDR/pydoop-features | fcb21c69287910fbb5707b4f246ea526dc2b75a7 | [
"Apache-2.0"
] | 4 | 2017-03-13T16:00:58.000Z | 2017-11-30T15:33:29.000Z | # BEGIN_COPYRIGHT
#
# Copyright (C) 2014-2017 Open Microscopy Environment:
# - University of Dundee
# - CRS4
#
# 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/lice... | 37.5 | 78 | 0.653675 |
bd5a0ab6dcea5fb668589ca36264cad34d0cd1cf | 6,759 | py | Python | grvx/viz/compare_freq.py | UMCU-RIBS/grvx | 0343ffa3a211f28bbffb18d1fb4b2cadc4fda8a8 | [
"MIT"
] | 1 | 2021-11-25T08:12:48.000Z | 2021-11-25T08:12:48.000Z | grvx/viz/compare_freq.py | UMCU-RIBS/grvx | 0343ffa3a211f28bbffb18d1fb4b2cadc4fda8a8 | [
"MIT"
] | null | null | null | grvx/viz/compare_freq.py | UMCU-RIBS/grvx | 0343ffa3a211f28bbffb18d1fb4b2cadc4fda8a8 | [
"MIT"
] | null | null | null | from numpy import max, r_, mean
from scipy.stats import ttest_rel
from scipy.stats import linregress
from bidso.utils import read_tsv
import plotly.graph_objs as go
from .paths import get_path
axis_label = lambda freq: f'Frequency {freq[0]} - {freq[1]} Hz'
def plot_freq_comparison(parameters):
freqA = parameter... | 29.386957 | 234 | 0.389111 |
02bc8bee53339849ab0e688629574e63ec11531e | 7,821 | py | Python | tests/unit/test_helpers.py | KoffieLabs/python-bigquery-sqlalchemy | 8315ce5a4d9cd3428cbf8bfe8a7db9ae3990a2da | [
"MIT"
] | null | null | null | tests/unit/test_helpers.py | KoffieLabs/python-bigquery-sqlalchemy | 8315ce5a4d9cd3428cbf8bfe8a7db9ae3990a2da | [
"MIT"
] | null | null | null | tests/unit/test_helpers.py | KoffieLabs/python-bigquery-sqlalchemy | 8315ce5a4d9cd3428cbf8bfe8a7db9ae3990a2da | [
"MIT"
] | null | null | null | # Copyright 2021 The sqlalchemy-bigquery Authors
#
# Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
import base64
import json
from unittest import mock
import google.auth
import google.auth.credentials
import pytest
from... | 31.663968 | 88 | 0.730981 |
70fd69cdbb001947e6a818aefd0615cc8d8f0913 | 427 | py | Python | backend/ideapros_llc_synvio_31951/wsgi.py | crowdbotics-apps/ideapros-llc-synvio-31951 | 32b384f6a4975f8fc953bc7391d2843b719d2d13 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/ideapros_llc_synvio_31951/wsgi.py | crowdbotics-apps/ideapros-llc-synvio-31951 | 32b384f6a4975f8fc953bc7391d2843b719d2d13 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/ideapros_llc_synvio_31951/wsgi.py | crowdbotics-apps/ideapros-llc-synvio-31951 | 32b384f6a4975f8fc953bc7391d2843b719d2d13 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for ideapros_llc_synvio_31951 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdef... | 25.117647 | 85 | 0.803279 |
419646ec36f749816197ea4ffb69c76f75f3479a | 423 | py | Python | examples_to_use/all_features_example.py | Eegii2233/tradingbot | a4d8b048f90cef74136c12f9c45862ab390c6324 | [
"MIT"
] | null | null | null | examples_to_use/all_features_example.py | Eegii2233/tradingbot | a4d8b048f90cef74136c12f9c45862ab390c6324 | [
"MIT"
] | null | null | null | examples_to_use/all_features_example.py | Eegii2233/tradingbot | a4d8b048f90cef74136c12f9c45862ab390c6324 | [
"MIT"
] | null | null | null | """This is a example adding all technical analysis features implemented in
this library.
"""
import pandas as pd
import ta
# Load data
df = pd.read_csv('../data/datas.csv', sep=',')
# Clean nan values
df = ta.utils.dropna(df)
print(df.columns)
# Add all ta features filling nans values
df = ta.add_all_ta_features(df... | 21.15 | 90 | 0.711584 |
bf5ea75c0a67371f89833cc073f335bc92883e04 | 1,064 | py | Python | escher/cmd/esdsl.py | msh5/escher | 004e90e6df70a15a00331a5c27bf2aef77608d30 | [
"Apache-2.0"
] | null | null | null | escher/cmd/esdsl.py | msh5/escher | 004e90e6df70a15a00331a5c27bf2aef77608d30 | [
"Apache-2.0"
] | null | null | null | escher/cmd/esdsl.py | msh5/escher | 004e90e6df70a15a00331a5c27bf2aef77608d30 | [
"Apache-2.0"
] | null | null | null | '''
Define subcommands for 'esdsl'.
'''
import json
import click
from escher import __version__
@click.group()
@click.option('--pretty', '-p', is_flag=True)
@click.option('--indent', '-n', type=int)
@click.version_option(version=__version__, message='escher %(version)s')
@click.pass_context
def cli(ctx, pretty, ind... | 20.075472 | 72 | 0.660714 |
b2f96b92c7b232f7cc5c3c43391785bc19b7dc74 | 8,050 | py | Python | test/extensions/problem.py | jabader97/backpack | 089daafa0d611e13901fd7ecf8a0d708ce7a5928 | [
"MIT"
] | 395 | 2019-10-04T09:37:52.000Z | 2022-03-29T18:00:56.000Z | test/extensions/problem.py | jabader97/backpack | 089daafa0d611e13901fd7ecf8a0d708ce7a5928 | [
"MIT"
] | 78 | 2019-10-11T18:56:43.000Z | 2022-03-23T01:49:54.000Z | test/extensions/problem.py | jabader97/backpack | 089daafa0d611e13901fd7ecf8a0d708ce7a5928 | [
"MIT"
] | 50 | 2019-10-03T16:31:10.000Z | 2022-03-15T19:36:14.000Z | """Convert problem settings."""
import copy
from test.core.derivatives.utils import get_available_devices
from typing import Any, Iterator, List, Tuple
import torch
from torch import Tensor
from torch.nn.parameter import Parameter
from backpack import extend
from backpack.utils.subsampling import subsample
def mak... | 30.263158 | 91 | 0.583602 |
c5fc5d8dae93db4be1e46dc34f7eda19605e83f4 | 2,029 | py | Python | lib/python2.7/site-packages/rest_framework/utils/html.py | ervinpepic/E-commerce | 2c15255d1730728cf35c166b9f88cffcb99f5323 | [
"MIT"
] | null | null | null | lib/python2.7/site-packages/rest_framework/utils/html.py | ervinpepic/E-commerce | 2c15255d1730728cf35c166b9f88cffcb99f5323 | [
"MIT"
] | null | null | null | lib/python2.7/site-packages/rest_framework/utils/html.py | ervinpepic/E-commerce | 2c15255d1730728cf35c166b9f88cffcb99f5323 | [
"MIT"
] | null | null | null | """
Helpers for dealing with HTML input.
"""
import re
from django.utils.datastructures import MultiValueDict
def is_html_input(dictionary):
# MultiDict type datastructures are used to represent HTML form input,
# which may have more than one value for each key.
return hasattr(dictionary, 'getlist')
de... | 22.544444 | 74 | 0.507639 |
8a2f1ee05fe4956c711aed0db46d604055ce6e34 | 2,962 | py | Python | legged_gym/envs/__init__.py | chengxuxin/legged_gym_isaac | 458b4f70dc748867d1200827285a309d56e58ca7 | [
"BSD-3-Clause"
] | 1 | 2022-01-06T10:06:56.000Z | 2022-01-06T10:06:56.000Z | legged_gym/envs/__init__.py | chengxuxin/legged_gym_isaac | 458b4f70dc748867d1200827285a309d56e58ca7 | [
"BSD-3-Clause"
] | null | null | null | legged_gym/envs/__init__.py | chengxuxin/legged_gym_isaac | 458b4f70dc748867d1200827285a309d56e58ca7 | [
"BSD-3-Clause"
] | 1 | 2022-03-21T12:13:16.000Z | 2022-03-21T12:13:16.000Z | # SPDX-FileCopyrightText: Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of sourc... | 51.964912 | 98 | 0.810601 |
0252bcbae9e7673ea5ca952863c6d7e8e38b9e8b | 4,734 | py | Python | src/api-engine/api/common/enums.py | neocameback/cello-adv | 2844d580c5d25923b06391bd266c45b3c0972588 | [
"Apache-2.0"
] | null | null | null | src/api-engine/api/common/enums.py | neocameback/cello-adv | 2844d580c5d25923b06391bd266c45b3c0972588 | [
"Apache-2.0"
] | null | null | null | src/api-engine/api/common/enums.py | neocameback/cello-adv | 2844d580c5d25923b06391bd266c45b3c0972588 | [
"Apache-2.0"
] | null | null | null | #
# SPDX-License-Identifier: Apache-2.0
#
from enum import Enum, unique, EnumMeta
import inspect
def separate_upper_class(class_name):
x = ""
i = 0
for c in class_name:
if c.isupper() and not class_name[i - 1].isupper():
x += " %s" % c.lower()
else:
x += c
i... | 20.582609 | 76 | 0.566117 |
1326229757a5cc6a9adcc349d258451f4a562414 | 7,392 | py | Python | CNNectome/training/synapse_template.py | davidackerman/CNNectome | 2815f96f40f5df66cc0a17e33db1353b1d0b6351 | [
"BSD-2-Clause"
] | 4 | 2019-06-21T18:06:22.000Z | 2021-11-29T08:28:46.000Z | CNNectome/training/synapse_template.py | GenevieveBuckley/CNNectome | bde8528ed5adc0a4aefca3b19ecc4c2144f2cbcc | [
"BSD-2-Clause"
] | 4 | 2018-12-18T19:31:04.000Z | 2022-01-10T16:06:45.000Z | CNNectome/training/synapse_template.py | GenevieveBuckley/CNNectome | bde8528ed5adc0a4aefca3b19ecc4c2144f2cbcc | [
"BSD-2-Clause"
] | 9 | 2018-03-22T18:17:57.000Z | 2022-03-24T01:17:21.000Z | import logging
from CNNectome.utils.label import *
from CNNectome.networks.mk_dist_unet_with_labels import make_net
from CNNectome.networks import unet_class
from CNNectome.training.anisotropic.train_dist_syn import train_until
from CNNectome.inference.single_block_inference import single_block_inference
from gunpowder... | 35.2 | 120 | 0.653815 |
49f053373997236fc5dd6a3881b55e38e7361d4b | 3,200 | py | Python | src/modules/build_model.py | amirgholipour/mlops_project | ddd88886c4d887b756c79973ea5524660a2c82e1 | [
"BSD-3-Clause"
] | null | null | null | src/modules/build_model.py | amirgholipour/mlops_project | ddd88886c4d887b756c79973ea5524660a2c82e1 | [
"BSD-3-Clause"
] | null | null | null | src/modules/build_model.py | amirgholipour/mlops_project | ddd88886c4d887b756c79973ea5524660a2c82e1 | [
"BSD-3-Clause"
] | null | null | null | from tensorflow.keras.layers import Bidirectional, Dense, Input, LSTM, Embedding
from tensorflow.keras.models import Sequential
class BuildModel():
'''
Build Lstm model for tensorflow
----------
Returns
-------
self.model:
Deep learning based Model
'''
def __init__(self,... | 32.323232 | 216 | 0.545313 |
bf958144b7e9bf913e5c3ab050f3bd75d9783ab0 | 11,905 | py | Python | tools/test.py | zzx0226/mmocr | 50354895244339a392b4f1af5a35963883923cca | [
"Apache-2.0"
] | null | null | null | tools/test.py | zzx0226/mmocr | 50354895244339a392b4f1af5a35963883923cca | [
"Apache-2.0"
] | null | null | null | tools/test.py | zzx0226/mmocr | 50354895244339a392b4f1af5a35963883923cca | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) OpenMMLab. All rights reserved.
from mmocr.utils import revert_sync_batchnorm
from mmocr.models import build_detector
from mmocr.datasets import build_dataloader, build_dataset
from mmocr.apis.utils import (disable_text_recog_aug_test, replace_image_to_tensor)
from mmdet.core impor... | 45.26616 | 122 | 0.5895 |
545f2db199c4dbf4d15192cf010bb12c20536760 | 219 | py | Python | modules/persons/domain/repository/__init__.py | eduardolujan/hexagonal_architecture_django | 8055927cb460bc40f3a2651c01a9d1da696177e8 | [
"BSD-3-Clause"
] | 6 | 2020-08-09T23:41:08.000Z | 2021-03-16T22:05:40.000Z | modules/persons/domain/repository/__init__.py | eduardolujan/hexagonal_architecture_django | 8055927cb460bc40f3a2651c01a9d1da696177e8 | [
"BSD-3-Clause"
] | 1 | 2020-10-02T02:59:38.000Z | 2020-10-02T02:59:38.000Z | modules/persons/domain/repository/__init__.py | eduardolujan/hexagonal_architecture_django | 8055927cb460bc40f3a2651c01a9d1da696177e8 | [
"BSD-3-Clause"
] | 2 | 2021-03-16T22:05:43.000Z | 2021-04-30T06:35:25.000Z | from .person_repository import PersonRepository
from .address_repository import AddressRepository
from .phone_repository import PhoneRepository
__all__ = ('PersonRepository', 'AddressRepository', 'PhoneRepository', )
| 31.285714 | 72 | 0.840183 |
147fcbb5afc9dcb280311afc7f451957ea6fc2ce | 11,509 | py | Python | tests/parse_name_test.py | live-clones/pybtex | 892adfc6c2c55c5d7e3ff6b019b2d1fecdbf6405 | [
"MIT"
] | 4 | 2021-06-03T17:34:53.000Z | 2022-03-01T11:16:20.000Z | tests/parse_name_test.py | live-clones/pybtex | 892adfc6c2c55c5d7e3ff6b019b2d1fecdbf6405 | [
"MIT"
] | 1 | 2021-03-25T23:00:28.000Z | 2021-03-25T23:00:28.000Z | tests/parse_name_test.py | live-clones/pybtex | 892adfc6c2c55c5d7e3ff6b019b2d1fecdbf6405 | [
"MIT"
] | 1 | 2019-11-14T05:07:33.000Z | 2019-11-14T05:07:33.000Z | # vim:fileencoding=utf-8
# Copyright (c) 2006-2021 Andrey Golovizin
#
# 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, ... | 54.804762 | 105 | 0.464593 |
547ac58bbc49ba3310f0776ef064e5e531795e2b | 1,895 | py | Python | zunclient/tests/unit/base.py | wanghuiict/python-zunclient | 42d1a73eb01bda846f4815fee0cdefcdde1da081 | [
"Apache-2.0"
] | 15 | 2016-07-15T02:22:19.000Z | 2019-02-26T08:55:10.000Z | zunclient/tests/unit/base.py | wanghuiict/python-zunclient | 42d1a73eb01bda846f4815fee0cdefcdde1da081 | [
"Apache-2.0"
] | 2 | 2019-03-01T20:42:38.000Z | 2020-09-26T06:06:03.000Z | zunclient/tests/unit/base.py | wanghuiict/python-zunclient | 42d1a73eb01bda846f4815fee0cdefcdde1da081 | [
"Apache-2.0"
] | 6 | 2017-01-17T12:29:58.000Z | 2021-07-12T21:29:34.000Z |
# Copyright 2010-2011 OpenStack Foundation
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# 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/licen... | 35.754717 | 76 | 0.692876 |
5462e5d12825f3b3c154e99c672395cbfe1d911e | 7,275 | py | Python | gen/hooks.py | stmobo/robotpy-ctre | 7ef83ae6f6bc0d5ef793dfb6e96ac5d641320aeb | [
"Apache-2.0"
] | null | null | null | gen/hooks.py | stmobo/robotpy-ctre | 7ef83ae6f6bc0d5ef793dfb6e96ac5d641320aeb | [
"Apache-2.0"
] | null | null | null | gen/hooks.py | stmobo/robotpy-ctre | 7ef83ae6f6bc0d5ef793dfb6e96ac5d641320aeb | [
"Apache-2.0"
] | null | null | null |
import re
_annotations = {
'short': 'int',
'int': 'int',
'uint32_t': 'int',
'double': 'float',
'char': 'str',
'bool': 'bool',
'ctre::phoenix::ErrorCode': 'int',
}
def _gen_check(pname, ptype):
# TODO: This does checks on normal types, but if you pass a ctypes value
# in the... | 33.219178 | 115 | 0.535258 |
1501af3155ef0c8112273428a2ed43c1d91f139c | 3,236 | py | Python | profiles_project/settings.py | stuntbadger/profiles-rest-api | 1e4af74a458c40c9a8e015f7fdfeefa4168af1d6 | [
"MIT"
] | null | null | null | profiles_project/settings.py | stuntbadger/profiles-rest-api | 1e4af74a458c40c9a8e015f7fdfeefa4168af1d6 | [
"MIT"
] | 4 | 2021-03-19T11:24:50.000Z | 2021-06-10T20:20:41.000Z | profiles_project/settings.py | stuntbadger/profiles-rest-api | 1e4af74a458c40c9a8e015f7fdfeefa4168af1d6 | [
"MIT"
] | null | null | null | """
Django settings for profiles_project project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
impor... | 25.68254 | 91 | 0.699011 |
2157ccd94881b4eadcdfe6a5bdd24a03e5808694 | 19,635 | py | Python | main.py | majid-farhadloo/SAMCNet_2022 | 10f287890745e15974c9041ec32fc852eb43e802 | [
"MIT"
] | null | null | null | main.py | majid-farhadloo/SAMCNet_2022 | 10f287890745e15974c9041ec32fc852eb43e802 | [
"MIT"
] | null | null | null | main.py | majid-farhadloo/SAMCNet_2022 | 10f287890745e15974c9041ec32fc852eb43e802 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from audioop import avg
import sys
# sys.path.append('add you root path') # Root path
import os
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.optim.lr_sched... | 43.633333 | 162 | 0.618691 |
d0bf757cf4de671dd60f99e1bc35ff5497f008ac | 1,814 | py | Python | src/tickets/signals.py | flokli/bornhack-website | 9dd6b0b23c2e6b1fb2c5f03a8766d4aa96d4443d | [
"BSD-3-Clause"
] | null | null | null | src/tickets/signals.py | flokli/bornhack-website | 9dd6b0b23c2e6b1fb2c5f03a8766d4aa96d4443d | [
"BSD-3-Clause"
] | null | null | null | src/tickets/signals.py | flokli/bornhack-website | 9dd6b0b23c2e6b1fb2c5f03a8766d4aa96d4443d | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from datetime import timedelta, datetime
from django.db.models import Count
from django.utils import timezone
from events.handler import handle_team_event
def ticket_changed(sender, instance, created, **kwargs):
"""
This signal is called every time a ShopTicket is saved
""... | 32.392857 | 85 | 0.631753 |
612e7bb3e2f4a914e59a740edcfdadec033cb92b | 352 | py | Python | backend/common/databases/token.py | NezzarClp/Tosurnament | 7aa750f6f663ae0f3f875d5fb50a35b422bd0dd2 | [
"MIT"
] | 7 | 2018-03-13T12:21:37.000Z | 2021-07-10T21:47:05.000Z | backend/common/databases/token.py | NezzarClp/Tosurnament | 7aa750f6f663ae0f3f875d5fb50a35b422bd0dd2 | [
"MIT"
] | 44 | 2017-12-28T15:22:27.000Z | 2021-09-17T20:56:17.000Z | backend/common/databases/token.py | NezzarClp/Tosurnament | 7aa750f6f663ae0f3f875d5fb50a35b422bd0dd2 | [
"MIT"
] | 9 | 2020-07-03T10:07:05.000Z | 2022-02-27T15:09:11.000Z | """Token class"""
from mysqldb_wrapper import Base, Id
class Token(Base):
"""Token class"""
__tablename__ = "token"
id = Id()
session_token = bytes()
discord_user_id = str()
access_token = str()
token_type = str()
access_token_expiry_date = int()
refresh_token = str()
scope ... | 17.6 | 36 | 0.613636 |
0c05465cacb66f28ef26b8f8019b9de6b9eff6a4 | 184 | py | Python | EulerProject/euler_25.py | bruno-zaccariello/usefull | a334a4f6daf79101f48a0a98a665bf64c4354c18 | [
"Apache-2.0"
] | null | null | null | EulerProject/euler_25.py | bruno-zaccariello/usefull | a334a4f6daf79101f48a0a98a665bf64c4354c18 | [
"Apache-2.0"
] | null | null | null | EulerProject/euler_25.py | bruno-zaccariello/usefull | a334a4f6daf79101f48a0a98a665bf64c4354c18 | [
"Apache-2.0"
] | null | null | null | from my_generators.fibonacci import fibonacci
def get_result():
count = 0
for fib in fibonacci():
count += 1
if len(str(fib)) >= 1000:
return count | 23 | 45 | 0.592391 |
d24ae11cc4bd23d1ada20b8624f78b1e3f05e758 | 9,270 | py | Python | ietf/api/views.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | null | null | null | ietf/api/views.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 1 | 2022-03-11T08:20:11.000Z | 2022-03-11T08:21:53.000Z | ietf/api/views.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 1 | 2021-10-05T12:49:27.000Z | 2021-10-05T12:49:27.000Z | # Copyright The IETF Trust 2017-2020, All Rights Reserved
# -*- coding: utf-8 -*-
import json
import pytz
from jwcrypto.jwk import JWK
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.exceptions import ValidationE... | 41.2 | 167 | 0.637109 |
ddf40e4dc447d0d1a25a72aa087b5aff9d27566d | 1,171 | py | Python | app/core/models.py | jrgonh/recipe-app-api | bbef420372fab173583b5f035c86d714b0453a14 | [
"MIT"
] | null | null | null | app/core/models.py | jrgonh/recipe-app-api | bbef420372fab173583b5f035c86d714b0453a14 | [
"MIT"
] | null | null | null | app/core/models.py | jrgonh/recipe-app-api | bbef420372fab173583b5f035c86d714b0453a14 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager,\
PermissionsMixin
class UserManager(BaseUserManager):
def create_user(self, email, password=None, **extra_fields):
"""Creates and saves a new user"""
if not email:
raise ValueErr... | 30.815789 | 76 | 0.687447 |
8e622bbc00f92ecc32390b6b8feec381fa0a2980 | 1,657 | py | Python | vendor/github.com/elastic/beats/auditbeat/tests/system/test_base.py | fakturk/countbeat | bda27b7c8d903ab00d66f749e3491902e180d0f3 | [
"Apache-2.0"
] | 5 | 2018-05-10T17:46:22.000Z | 2020-11-19T06:06:27.000Z | vendor/github.com/elastic/beats/auditbeat/tests/system/test_base.py | fakturk/countbeat | bda27b7c8d903ab00d66f749e3491902e180d0f3 | [
"Apache-2.0"
] | 3 | 2018-03-05T08:57:45.000Z | 2020-05-11T17:19:17.000Z | vendor/github.com/elastic/beats/auditbeat/tests/system/test_base.py | fakturk/countbeat | bda27b7c8d903ab00d66f749e3491902e180d0f3 | [
"Apache-2.0"
] | 2 | 2020-09-21T03:25:18.000Z | 2020-11-19T06:06:22.000Z | import re
import sys
import unittest
from auditbeat import BaseTest
from elasticsearch import Elasticsearch
from beat.beat import INTEGRATION_TESTS
class Test(BaseTest):
@unittest.skipUnless(re.match("(?i)linux", sys.platform), "os")
def test_start_stop(self):
"""
Auditbeat starts and stops wi... | 33.14 | 70 | 0.601086 |
2b23ac568f339083a8bf24563a11147da62aa427 | 5,196 | py | Python | debug_and_testing/ipyleaflet_test.py | nathangeology/FORCE_Geolocation_Docs | 1f7ef447bacdbdd424dce5ba8f37e738462ba372 | [
"MIT"
] | 3 | 2019-09-18T07:17:29.000Z | 2019-11-01T16:32:24.000Z | debug_and_testing/ipyleaflet_test.py | nathangeology/FORCE_Geolocation_Docs | 1f7ef447bacdbdd424dce5ba8f37e738462ba372 | [
"MIT"
] | null | null | null | debug_and_testing/ipyleaflet_test.py | nathangeology/FORCE_Geolocation_Docs | 1f7ef447bacdbdd424dce5ba8f37e738462ba372 | [
"MIT"
] | null | null | null | import altair as alt
from data_load_functions import *
# import folium
import geopandas as gpd
# from folium.plugins import MarkerCluster
import numpy as np
from ipyleaflet import Polygon, Map, basemaps, basemap_to_tiles, GeoJSON, MarkerCluster, LayersControl, FullScreenControl
from ipywidgets import RadioButtons
impor... | 54.125 | 121 | 0.617013 |
386169f4240758941050281b465346c03f52ba4a | 360 | py | Python | blog/migrations/0027_auto_20190416_1119.py | akindele214/181hub_2 | 48b8814b5f66ad87f9a54721506076ddf70fe9bc | [
"MIT"
] | 1 | 2020-05-20T08:42:49.000Z | 2020-05-20T08:42:49.000Z | blog/migrations/0027_auto_20190416_1119.py | akindele214/181hub_2 | 48b8814b5f66ad87f9a54721506076ddf70fe9bc | [
"MIT"
] | 14 | 2020-03-24T17:31:08.000Z | 2022-03-11T23:59:30.000Z | blog/migrations/0027_auto_20190416_1119.py | akindele214/181hub_2 | 48b8814b5f66ad87f9a54721506076ddf70fe9bc | [
"MIT"
] | 1 | 2020-04-13T12:37:37.000Z | 2020-04-13T12:37:37.000Z | # Generated by Django 2.1.7 on 2019-04-16 10:19
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0026_auto_20190416_0712'),
]
operations = [
migrations.RenameField(
model_name='share',
old_name='user',
... | 18.947368 | 47 | 0.580556 |
d77ef700171752c26fba6a3ccbc4cc05d0ff050e | 1,389 | py | Python | tests/unittest/test_index_routes.py | jrrlokken/issue-tracking-system | 33b9b68dd821c8a05cdbc8de87645f61da06f0bd | [
"MIT"
] | 1 | 2021-02-20T04:26:36.000Z | 2021-02-20T04:26:36.000Z | tests/unittest/test_index_routes.py | jrrlokken/issue-tracking-system | 33b9b68dd821c8a05cdbc8de87645f61da06f0bd | [
"MIT"
] | 2 | 2021-04-06T18:14:38.000Z | 2021-06-02T02:45:15.000Z | tests/unittest/test_index_routes.py | jrrlokken/issue-tracking-system | 33b9b68dd821c8a05cdbc8de87645f61da06f0bd | [
"MIT"
] | null | null | null | import unittest
from app import app
class RenderTests(unittest.TestCase):
"""Test each route for proper render."""
def setUp(self):
app.config['TESTING'] = True
app.config['DEBUG'] = False
self.client = app.test_client()
def test_homepage(self):
"""Test root route."""
with self.client:
... | 27.78 | 62 | 0.664507 |
92a5ba49623514f5b86bff370a5ad00cfa8edf72 | 1,735 | py | Python | ckan/tests/legacy/models/test_misc.py | larrycameron80/ckan | fbab8f51b36a293206fdd998d71ece27d2565951 | [
"Apache-2.0"
] | 1 | 2022-02-14T20:25:34.000Z | 2022-02-14T20:25:34.000Z | ckan/tests/legacy/models/test_misc.py | larrycameron80/ckan | fbab8f51b36a293206fdd998d71ece27d2565951 | [
"Apache-2.0"
] | 4 | 2020-03-24T17:53:23.000Z | 2021-03-31T19:19:03.000Z | ckan/tests/legacy/models/test_misc.py | larrycameron80/ckan | fbab8f51b36a293206fdd998d71ece27d2565951 | [
"Apache-2.0"
] | 3 | 2020-01-02T10:32:37.000Z | 2021-12-22T07:20:21.000Z | # encoding: utf-8
from nose.tools import assert_equal
from ckan.tests.legacy import *
import ckan.model as model
from ckan.model.misc import escape_sql_like_special_characters
_sql_escape = escape_sql_like_special_characters
class TestEscapeSqlLikeCharacters(object):
"""
Tests for model.misc.escape_sql_like... | 33.365385 | 72 | 0.613833 |
7f18e842218c9762d2c6664fa456f9d23f5f20ad | 7,459 | py | Python | fate_flow/apps/data_access_app.py | yzjba/FATE | 9a6d252da637b2583a0f8a51f6cb4c615850bab9 | [
"Apache-2.0"
] | 1 | 2021-05-31T16:39:30.000Z | 2021-05-31T16:39:30.000Z | fate_flow/apps/data_access_app.py | ErikSun2020/FATE | bdda535c7d8a974fc2c43102837964b7da199730 | [
"Apache-2.0"
] | 9 | 2020-11-13T18:59:35.000Z | 2022-02-10T02:13:58.000Z | fate_flow/apps/data_access_app.py | ErikSun2020/FATE | bdda535c7d8a974fc2c43102837964b7da199730 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 40.983516 | 121 | 0.646333 |
029c719ef3a06da1e31964c4498882cc6ac0aca1 | 602 | py | Python | 9.classes/python_scopes_and_namespaces.py | yuishihara/python_tutorial | c88db5b1c002dcf69e183ed1a45c02a08aee905c | [
"MIT"
] | null | null | null | 9.classes/python_scopes_and_namespaces.py | yuishihara/python_tutorial | c88db5b1c002dcf69e183ed1a45c02a08aee905c | [
"MIT"
] | null | null | null | 9.classes/python_scopes_and_namespaces.py | yuishihara/python_tutorial | c88db5b1c002dcf69e183ed1a45c02a08aee905c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
def scope_test():
def do_local():
spam = "local spam"
def do_nonlocal():
nonlocal spam
spam = "nonlocal spam"
def do_global():
global spam
spam = "global spam"
spam = "test spam"
do_local()
print("After local assignment:", spam)... | 18.8125 | 45 | 0.619601 |
1850dd98502545a548ce0adafa21ba514e029703 | 634 | py | Python | costar_task_plan/python/costar_task_plan/agent/ou_process.py | cpaxton/costar_plan | be5c12f9d0e9d7078e6a5c283d3be059e7f3d040 | [
"Apache-2.0"
] | 66 | 2018-10-31T04:58:53.000Z | 2022-03-17T02:32:25.000Z | costar_task_plan/python/costar_task_plan/agent/ou_process.py | cpaxton/costar_plan | be5c12f9d0e9d7078e6a5c283d3be059e7f3d040 | [
"Apache-2.0"
] | 8 | 2018-10-23T21:19:25.000Z | 2018-12-03T02:08:41.000Z | costar_task_plan/python/costar_task_plan/agent/ou_process.py | cpaxton/costar_plan | be5c12f9d0e9d7078e6a5c283d3be059e7f3d040 | [
"Apache-2.0"
] | 25 | 2018-10-19T00:54:17.000Z | 2021-10-10T08:28:15.000Z | import numpy as np
import matplotlib.pyplot as plt
class OUProcess(object):
"""docstring for OUNoise"""
def __init__(self,action_dimension,mu=0, theta=0.15, sigma=0.1):
self.action_dimension = action_dimension
self.mu = mu
self.theta = theta
self.sigma = sigma
self.state = np.... | 26.416667 | 77 | 0.62776 |
b0155a6aeff03b143edf0f8963e411e2b524a58b | 6,044 | py | Python | sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/aio/_event_hub_management_client.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/aio/_event_hub_management_client.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/aio/_event_hub_management_client.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 1 | 2019-04-05T18:17:43.000Z | 2019-04-05T18:17:43.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 54.945455 | 173 | 0.759265 |
b23c6c503420c798fc685c8af2134bedd77113fe | 883 | py | Python | sentiment-analysis/log/log_config.py | arturgontijo/nlp-services | 2bb3cef4aea4cd0687e984ef2414d5d2b8edc134 | [
"MIT"
] | 15 | 2018-09-03T05:58:22.000Z | 2020-07-01T04:52:49.000Z | sentiment-analysis/log/log_config.py | arturgontijo/nlp-services | 2bb3cef4aea4cd0687e984ef2414d5d2b8edc134 | [
"MIT"
] | 33 | 2018-08-08T17:55:11.000Z | 2021-06-01T14:27:16.000Z | sentiment-analysis/log/log_config.py | arturgontijo/nlp-services | 2bb3cef4aea4cd0687e984ef2414d5d2b8edc134 | [
"MIT"
] | 25 | 2018-08-09T01:02:53.000Z | 2020-12-20T05:09:21.000Z |
# importing module
import logging
import logging.handlers
import sys
def getLogger(logger_name, test=None):
""" The method generates a logger instance to be reused.
:param logger_name: incoming logger name
:return: logger instance
"""
logger = logging.getLogger(str(logger_name))
log_level =... | 25.228571 | 112 | 0.703284 |
f892b87e991d5888bc6cb7dd6dfddca42968f182 | 17,278 | py | Python | simulator/ObdlRender.py | michaelyeah7/magics_mbrl | 7f1503986fd50c8336b8b9e7bb1d2f4be4e84b08 | [
"MIT"
] | 2 | 2021-10-02T21:58:02.000Z | 2022-03-23T15:34:46.000Z | simulator/ObdlRender.py | michaelyeah7/roblax | 7f1503986fd50c8336b8b9e7bb1d2f4be4e84b08 | [
"MIT"
] | null | null | null | simulator/ObdlRender.py | michaelyeah7/roblax | 7f1503986fd50c8336b8b9e7bb1d2f4be4e84b08 | [
"MIT"
] | null | null | null | import pybullet as p
import pybullet_data
import numpy as np
from simulator.UrdfUtils import matrix_to_rpy
from jbdl.rbdl.kinematics.calc_body_to_base_coordinates import calc_body_to_base_coordinates
from jbdl.rbdl.kinematics.transform_to_position import transform_to_position
import time
import math
import os
import ja... | 41.04038 | 182 | 0.549774 |
cec1de2a6639546d17fb7dd7eb09653aa22c391e | 3,158 | py | Python | src/freesound.py | lRomul/argus-birdsong | 2290bd78f462cedc2ae143ec0b5e6e0782cd2b19 | [
"MIT"
] | null | null | null | src/freesound.py | lRomul/argus-birdsong | 2290bd78f462cedc2ae143ec0b5e6e0782cd2b19 | [
"MIT"
] | null | null | null | src/freesound.py | lRomul/argus-birdsong | 2290bd78f462cedc2ae143ec0b5e6e0782cd2b19 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from pathlib import Path
import multiprocessing as mp
from functools import partial
from src.audio import read_as_melspectrogram
from src.utils import get_params_hash
from src import config
NOISE_SOUNDS = [
'Buzz',
'Car_passing_by',
'Crackle',
'Cricket',
'Hi... | 30.07619 | 82 | 0.674478 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.