hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f60bbe8d92cacc0baec1190db4c4305ce847b01a | 4,220 | py | Python | spanish_inflections.py | mathigatti/spanish_inflections | bb5d9677edec8862aaaf4a4f7c6ad5bc4c151c50 | [
"MIT"
] | null | null | null | spanish_inflections.py | mathigatti/spanish_inflections | bb5d9677edec8862aaaf4a4f7c6ad5bc4c151c50 | [
"MIT"
] | null | null | null | spanish_inflections.py | mathigatti/spanish_inflections | bb5d9677edec8862aaaf4a4f7c6ad5bc4c151c50 | [
"MIT"
] | null | null | null |
rules_adjetive = []
with open("MM.adj.txt",'r') as f:
for line in f.readlines():
rule = line.split()
rules_adjetive.append({"word":rule[0], "lemma":rule[1], "code":rule[2]})
rules_noun = []
with open("MM.nom.txt",'r') as f:
for line in f.readlines():
rule = line.split()
rules_n... | 29.929078 | 90 | 0.529384 |
f60d57417f085366ece3370fedcd7871a28b809a | 1,746 | py | Python | setup.py | T-FitAndFat/toucan-connectors | 7d03454e4d06f5cb2e9c2c778d99dd655efd14a7 | [
"BSD-3-Clause"
] | null | null | null | setup.py | T-FitAndFat/toucan-connectors | 7d03454e4d06f5cb2e9c2c778d99dd655efd14a7 | [
"BSD-3-Clause"
] | null | null | null | setup.py | T-FitAndFat/toucan-connectors | 7d03454e4d06f5cb2e9c2c778d99dd655efd14a7 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
auth_deps = ['oauthlib', 'requests_oauthlib']
extras_require = {
'adobe': ['adobe_analytics'],
'azure_mssql': ['pyodbc'],
'dataiku': ['dataiku-api-client'],
'elasticsearch': ['elasticsearch'],
'facebook': ['facebook-sdk'],
'google_analytics': ['google... | 30.631579 | 69 | 0.627148 |
f60db341e11a4c5477f8eb6e8054ce41e06f72fe | 367 | py | Python | create_tables.py | tomhyhan/final | 4d01fed5d738ff435ffa6f28b2943cb365939a2f | [
"MIT"
] | null | null | null | create_tables.py | tomhyhan/final | 4d01fed5d738ff435ffa6f28b2943cb365939a2f | [
"MIT"
] | null | null | null | create_tables.py | tomhyhan/final | 4d01fed5d738ff435ffa6f28b2943cb365939a2f | [
"MIT"
] | null | null | null | import sqlite3
conn = sqlite3.connect('bookstore.sqlite')
c = conn.cursor()
c.execute('''
CREATE TABLE books
(id INTEGER PRIMARY KEY ASC,
timestamp DATETIME NOT NULL,
title VARCHAR(250),
author VARCHAR(250),
rating INTEGER,
price REAL
... | 19.315789 | 42 | 0.542234 |
f60dc5242dc79fcf961a2da0cfd7f24d3f799fd1 | 1,125 | py | Python | pytest_unittest_filter.py | un-def/pytest-unittest-filter | 7919aff50c6b86c60d2c808c18f5e973db33f338 | [
"MIT"
] | 4 | 2018-10-26T13:17:05.000Z | 2019-03-22T06:51:50.000Z | pytest_unittest_filter.py | un-def/pytest-unittest-filter | 7919aff50c6b86c60d2c808c18f5e973db33f338 | [
"MIT"
] | null | null | null | pytest_unittest_filter.py | un-def/pytest-unittest-filter | 7919aff50c6b86c60d2c808c18f5e973db33f338 | [
"MIT"
] | null | null | null | import pytest
from _pytest.unittest import UnitTestCase
__version__ = '0.2.1'
INI_OPTION_CLASSES = 'python_unittest_classes'
INI_OPTION_UNDERSCORE = 'python_unittest_exclude_underscore'
| 28.125 | 79 | 0.714667 |
f60f25b9edeba5d195f1ac85237d350e8bef0818 | 210 | py | Python | ABC/ABC134/abc134_b.py | yatabis/AtCoder-in-Python3 | cc2948853b549a6b8f39df5685c9e84cda81499d | [
"MIT"
] | null | null | null | ABC/ABC134/abc134_b.py | yatabis/AtCoder-in-Python3 | cc2948853b549a6b8f39df5685c9e84cda81499d | [
"MIT"
] | null | null | null | ABC/ABC134/abc134_b.py | yatabis/AtCoder-in-Python3 | cc2948853b549a6b8f39df5685c9e84cda81499d | [
"MIT"
] | null | null | null | # URL: https://atcoder.jp/contests/abc134/tasks/abc134_b
# URL: https://atcoder.jp/contests/abc134/submissions/24157832
from math import ceil
n, d = map(int, input().split())
print(ceil(n / (2 * d + 1)))
| 26.25 | 64 | 0.7 |
f60f64227a4b588c259406487b84cb9a51b06bfb | 5,058 | py | Python | tests/unit/schema/wrappers/test_field.py | nsky80/gapic-generator-python | 6dd7498438e87329c69a27ac57bb1693b02471d3 | [
"Apache-2.0"
] | 1 | 2019-08-15T05:41:02.000Z | 2019-08-15T05:41:02.000Z | tests/unit/schema/wrappers/test_field.py | nsky80/gapic-generator-python | 6dd7498438e87329c69a27ac57bb1693b02471d3 | [
"Apache-2.0"
] | null | null | null | tests/unit/schema/wrappers/test_field.py | nsky80/gapic-generator-python | 6dd7498438e87329c69a27ac57bb1693b02471d3 | [
"Apache-2.0"
] | 1 | 2022-01-23T12:29:11.000Z | 2022-01-23T12:29:11.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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 31.030675 | 79 | 0.720245 |
f60fa01fcca07216f2bcd4f1876c31853730ce6d | 1,151 | py | Python | visual_mpc/envs/offline_env.py | Asap7772/visual_foresight | 13c631dc76ca1b61d7159473b3f2207ce2a3da04 | [
"MIT"
] | null | null | null | visual_mpc/envs/offline_env.py | Asap7772/visual_foresight | 13c631dc76ca1b61d7159473b3f2207ce2a3da04 | [
"MIT"
] | null | null | null | visual_mpc/envs/offline_env.py | Asap7772/visual_foresight | 13c631dc76ca1b61d7159473b3f2207ce2a3da04 | [
"MIT"
] | null | null | null | from visual_mpc.envs.base_env import BaseEnv
| 23.489796 | 106 | 0.588184 |
f60fc9552996ef7df081aa8b9626dbf47805b27b | 258 | py | Python | modules/test.py | Blackfoot50115/Password_Generator | 2e99708fae5a3cc91702b68497e4520a558481b3 | [
"MIT"
] | null | null | null | modules/test.py | Blackfoot50115/Password_Generator | 2e99708fae5a3cc91702b68497e4520a558481b3 | [
"MIT"
] | 7 | 2019-05-09T04:17:51.000Z | 2019-05-16T00:38:55.000Z | modules/test.py | Blackfoot50115/Password_Generator | 2e99708fae5a3cc91702b68497e4520a558481b3 | [
"MIT"
] | 1 | 2019-05-07T12:15:55.000Z | 2019-05-07T12:15:55.000Z | import unittest
import Export_To_File
import gen_rand_password
if __name__ == '__main__':
unittest.main()
| 16.125 | 46 | 0.728682 |
f610dbac8de212129b7046e3cdbabe6471f84f1c | 26 | py | Python | tests/__init__.py | web2py/rocket3 | ba941c3a1d5e4c8b16a22c9c5e3dd5442c1b7624 | [
"BSD-3-Clause"
] | 1 | 2021-02-11T03:48:41.000Z | 2021-02-11T03:48:41.000Z | tests/__init__.py | web2py/rocket3 | ba941c3a1d5e4c8b16a22c9c5e3dd5442c1b7624 | [
"BSD-3-Clause"
] | 1 | 2021-02-13T08:48:52.000Z | 2021-02-13T20:00:42.000Z | tests/__init__.py | web2py/rocket3 | ba941c3a1d5e4c8b16a22c9c5e3dd5442c1b7624 | [
"BSD-3-Clause"
] | 1 | 2021-02-08T20:07:48.000Z | 2021-02-08T20:07:48.000Z | from . import test_rocket
| 13 | 25 | 0.807692 |
f612776e5655cc35f2ff3a2714bb44593975be1d | 4,241 | py | Python | src/expressivity.py | elijahc/vae | 5cd80518f876d4ca9e97de2ece7c266e3df09cb7 | [
"MIT"
] | null | null | null | src/expressivity.py | elijahc/vae | 5cd80518f876d4ca9e97de2ece7c266e3df09cb7 | [
"MIT"
] | null | null | null | src/expressivity.py | elijahc/vae | 5cd80518f876d4ca9e97de2ece7c266e3df09cb7 | [
"MIT"
] | null | null | null | import numpy as np
# from ray.dataframe import pd
# def pairwise_correlations( g_t)
| 30.510791 | 91 | 0.569441 |
f61497e18155583cc5132e7e990b1097f82cff06 | 130 | py | Python | katas/kyu_7/genetic_algorithm_series_2_mutation.py | the-zebulan/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | 40 | 2016-03-09T12:26:20.000Z | 2022-03-23T08:44:51.000Z | katas/kyu_7/genetic_algorithm_series_2_mutation.py | akalynych/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | null | null | null | katas/kyu_7/genetic_algorithm_series_2_mutation.py | akalynych/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | 36 | 2016-11-07T19:59:58.000Z | 2022-03-31T11:18:27.000Z | from random import random
| 21.666667 | 74 | 0.615385 |
f61517f627009ff7f376b1194a4e917a81ddfd11 | 5,243 | py | Python | userbot/modules/misc.py | FS-Project/FeRuBoT | 54cc12243ccbeb289ed37d691698fbd42fd8f740 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2021-01-24T20:35:11.000Z | 2021-03-10T18:16:26.000Z | userbot/modules/misc.py | FS-Project/FeRuBoT | 54cc12243ccbeb289ed37d691698fbd42fd8f740 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/misc.py | FS-Project/FeRuBoT | 54cc12243ccbeb289ed37d691698fbd42fd8f740 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2021-03-10T18:16:25.000Z | 2021-03-10T18:16:25.000Z | # INFO : ini merupakan copy source code dari repo one4ubot, dan sudah mendapatkan izin dari pemilik.
# INFO : This is a copy of the source code from the One4ubot repo, and has the permission of the owner.
# Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d ... | 29.789773 | 107 | 0.662026 |
f61545386a7fef2d4116c979aa993983f37d1e73 | 1,291 | py | Python | stubs/micropython-v1_13-95-pyboard/uasyncio/core.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/micropython-v1_13-95-pyboard/uasyncio/core.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/micropython-v1_13-95-pyboard/uasyncio/core.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | """
Module: 'uasyncio.core' on pyboard 1.13.0-95
"""
# MCU: (sysname='pyboard', nodename='pyboard', release='1.13.0', version='v1.13-95-g0fff2e03f on 2020-10-03', machine='PYBv1.1 with STM32F405RG')
# Stubber: 1.3.4 - updated
from typing import Any
| 17.445946 | 145 | 0.568552 |
f617abbd37a250768e243f67f08bb7f3f81db933 | 1,675 | py | Python | util_scripts/test_zoom.py | ShuaiW/kaggle-heart | 022997f27add953c74af2b371c67d9d86cbdccc3 | [
"MIT"
] | 182 | 2016-03-15T01:51:29.000Z | 2021-04-21T09:49:05.000Z | util_scripts/test_zoom.py | weidezhang/kaggle-heart | 022997f27add953c74af2b371c67d9d86cbdccc3 | [
"MIT"
] | 1 | 2018-06-22T16:46:12.000Z | 2018-06-22T21:08:09.000Z | util_scripts/test_zoom.py | weidezhang/kaggle-heart | 022997f27add953c74af2b371c67d9d86cbdccc3 | [
"MIT"
] | 61 | 2016-03-15T00:58:28.000Z | 2020-03-06T22:00:41.000Z | import numpy as np
import matplotlib.pyplot as plt
from matplotlib import animation
from scipy.special import erf, erfinv
import cPickle as pickle
import glob
import os
import scipy
import scipy.ndimage.interpolation
#print glob.glob(os.path.expanduser("~/storage/metadata/kaggle-heart/predictions/j7_jeroen_ch.pkl"))
#... | 32.211538 | 145 | 0.640597 |
f618d376cd5f990c13a8674db30dbeb3c323537c | 437 | py | Python | config/api_router.py | anhlt59/django_celery | 4e3825752191067c71b25b1f932279961a6dde2a | [
"MIT"
] | null | null | null | config/api_router.py | anhlt59/django_celery | 4e3825752191067c71b25b1f932279961a6dde2a | [
"MIT"
] | null | null | null | config/api_router.py | anhlt59/django_celery | 4e3825752191067c71b25b1f932279961a6dde2a | [
"MIT"
] | null | null | null | from django.conf import settings
from rest_framework.routers import DefaultRouter, SimpleRouter
from django.urls import include, path
from django_celery.api.users.views import UserViewSet
if settings.DEBUG:
router = DefaultRouter()
else:
router = SimpleRouter()
router.register("users", UserViewSet)
app_name... | 23 | 74 | 0.76659 |
f618e484b7df2635b2d21ffd1f4a23e06f18555a | 3,366 | py | Python | src/praw_stream.py | jacobmas/docker-twitter-streamer | e24dd0ba500caae174609efbb8f2a63c6e69c511 | [
"MIT"
] | null | null | null | src/praw_stream.py | jacobmas/docker-twitter-streamer | e24dd0ba500caae174609efbb8f2a63c6e69c511 | [
"MIT"
] | null | null | null | src/praw_stream.py | jacobmas/docker-twitter-streamer | e24dd0ba500caae174609efbb8f2a63c6e69c511 | [
"MIT"
] | null | null | null | # stdlib
import os
import sys
import logging
import json
from json import JSONEncoder
import praw
from kinesis_producer import StdoutProducer
from twitter_query_parser import TwitterSeachQuery
log = logging.getLogger(__name__)
| 35.808511 | 154 | 0.639929 |
f618ea5cffb6353292606a5b9b153b42064483ff | 3,523 | py | Python | train_liner.py | ALEXKIRNAS/Toxic-Comment-Classification-Challenge | 1f86d113f38c6c9eaca03ec33c6467709bf2d652 | [
"MIT"
] | 2 | 2018-04-07T19:52:09.000Z | 2018-04-24T11:37:58.000Z | train_liner.py | ALEXKIRNAS/Toxic-Comment-Classification-Challenge | 1f86d113f38c6c9eaca03ec33c6467709bf2d652 | [
"MIT"
] | null | null | null | train_liner.py | ALEXKIRNAS/Toxic-Comment-Classification-Challenge | 1f86d113f38c6c9eaca03ec33c6467709bf2d652 | [
"MIT"
] | null | null | null | import concurrent.futures
import click
import numpy as np
import pandas as pd
from sklearn.metrics import roc_auc_score
from sklearn.model_selection import KFold
from models import NbSvmClassifier
from utils.constants import RANDOM_SEED, CLASS_NAMES
from utils.data_loader import tf_idf_vectors
cv_params = [
... | 33.552381 | 91 | 0.640931 |
f61a4fbc74f3de9d25b2fc9402a7de9aab4a6bbd | 15,217 | py | Python | bigfish/stack/tests/test_filter.py | 4DNucleome/big-fish | 5512b6e3274872793ef4365a6dc423c72add91f9 | [
"BSD-3-Clause"
] | 17 | 2020-03-04T10:46:37.000Z | 2022-03-10T13:15:16.000Z | bigfish/stack/tests/test_filter.py | 4DNucleome/big-fish | 5512b6e3274872793ef4365a6dc423c72add91f9 | [
"BSD-3-Clause"
] | 48 | 2020-03-16T13:39:44.000Z | 2022-03-31T17:26:50.000Z | bigfish/stack/tests/test_filter.py | 4DNucleome/big-fish | 5512b6e3274872793ef4365a6dc423c72add91f9 | [
"BSD-3-Clause"
] | 15 | 2020-03-04T16:02:31.000Z | 2022-02-17T14:11:15.000Z | # -*- coding: utf-8 -*-
# Author: Arthur Imbert <arthur.imbert.pro@gmail.com>
# License: BSD 3 clause
"""
Unitary tests for bigfish.stack.filter module.
"""
import pytest
import numpy as np
import bigfish.stack as stack
from bigfish.stack.filter import _define_kernel
from numpy.testing import assert_array_equal
fr... | 34.82151 | 71 | 0.556483 |
f61b4c3a467a7b980a56213bb7bb31c68ded2089 | 9,071 | py | Python | Python/qos_manager.py | Deyuan/qmsim | 8a34bc19c0bf614c9362e44b7170dbb3d54a9010 | [
"Apache-2.0"
] | null | null | null | Python/qos_manager.py | Deyuan/qmsim | 8a34bc19c0bf614c9362e44b7170dbb3d54a9010 | [
"Apache-2.0"
] | null | null | null | Python/qos_manager.py | Deyuan/qmsim | 8a34bc19c0bf614c9362e44b7170dbb3d54a9010 | [
"Apache-2.0"
] | null | null | null | # QoS Manager
# Managing all requests related to QoS
# Author: Deyuan Guo, Chunkun Bo
# Date: Dec 10, 2015
import sys
import os
import socket
import errno
import monitor_container
import qos_scheduler
import itf_spec
import itf_database
QOS_SERVER_ADDR = ('localhost', 20000)
# Define a class for QoS requests
# Mai... | 35.712598 | 90 | 0.556719 |
f61be4718911e196ba9094bf4af6f045bc2cf0e9 | 4,527 | py | Python | tools/python/bluebottle_flow_reader.py | GediZhou/bluebottle-3.0 | 645e6cbe257ad4f65456652a50d49e5f3059564f | [
"Apache-2.0"
] | 11 | 2018-02-20T15:58:07.000Z | 2021-12-27T09:02:30.000Z | tools/python/bluebottle_flow_reader.py | groundcherry/bluebottle-2.0 | 7adc8782ad269f06ab0edb0111500907757bea50 | [
"Apache-2.0"
] | 3 | 2018-12-11T13:44:45.000Z | 2021-03-10T15:13:38.000Z | tools/python/bluebottle_flow_reader.py | groundcherry/bluebottle-2.0 | 7adc8782ad269f06ab0edb0111500907757bea50 | [
"Apache-2.0"
] | 6 | 2018-09-21T11:36:22.000Z | 2021-03-13T09:15:35.000Z | ################################################################################
################################## BLUEBOTTLE ##################################
################################################################################
#
# Copyright 2012 - 2018 Adam Sierakowski and Daniel Willen,
# ... | 28.118012 | 80 | 0.608571 |
f61d162134f520eaed2779c8b47fde1648352f14 | 954 | py | Python | exerc_25.py | marcelocmedeiros/EstruturaDeRepeticao | 23e917377e41083901a4ffbf3e0fda31e3a78982 | [
"MIT"
] | null | null | null | exerc_25.py | marcelocmedeiros/EstruturaDeRepeticao | 23e917377e41083901a4ffbf3e0fda31e3a78982 | [
"MIT"
] | null | null | null | exerc_25.py | marcelocmedeiros/EstruturaDeRepeticao | 23e917377e41083901a4ffbf3e0fda31e3a78982 | [
"MIT"
] | null | null | null | # Marcelo Campos de Medeiros
# ADS UNIFIP
# Estrutura de Repetio
# 25/03/2020
'''
25 -Faa um programa que pea para n pessoas a sua idade,
ao final o programa devera verificar se a mdia de idade da turma
varia entre 0 e 25,26 e 60 e maior que 60; e ento, dizer se a turma jovem,
adulta ou idosa, conforme a mdia calcula... | 27.257143 | 78 | 0.659329 |
f61dc2bab26e07654cfc84f3ad968a59e5a75412 | 4,089 | py | Python | appengine/main.py | luiscielak/bl.ocks.org | c971a001fa9c1c65a64b641937b88d078376e77d | [
"BSD-3-Clause"
] | 6 | 2016-09-05T17:22:01.000Z | 2021-11-16T13:44:07.000Z | appengine/main.py | luiscielak/bl.ocks.org | c971a001fa9c1c65a64b641937b88d078376e77d | [
"BSD-3-Clause"
] | null | null | null | appengine/main.py | luiscielak/bl.ocks.org | c971a001fa9c1c65a64b641937b88d078376e77d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2007 Google 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 o... | 32.452381 | 107 | 0.63414 |
f61e9e34b58ff2774a550e28faa9fff8e5f174d1 | 8,658 | py | Python | S4/S4 Library/simulation/bucks/bucks_perk.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | 1 | 2021-05-20T19:33:37.000Z | 2021-05-20T19:33:37.000Z | S4/S4 Library/simulation/bucks/bucks_perk.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | null | null | null | S4/S4 Library/simulation/bucks/bucks_perk.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | null | null | null | from bucks.bucks_enums import BucksType
from buffs.tunable import TunableBuffReference
from event_testing.tests import TunableTestSetWithTooltip
from interactions.utils.tunable_icon import TunableIconFactory
from rewards.reward_tuning import TunableSpecificReward
from sims4.localization import TunableLocalizedStringFac... | 288.6 | 6,720 | 0.688496 |
f61ea36a80ff949ca3af1089782d87beac3f347c | 387 | py | Python | ml_algorithms/linear_model/__init__.py | f4str/neural-networks-sandbox | d771cf8f62fe33c1fcab614ad250af6d0ef30a23 | [
"MIT"
] | null | null | null | ml_algorithms/linear_model/__init__.py | f4str/neural-networks-sandbox | d771cf8f62fe33c1fcab614ad250af6d0ef30a23 | [
"MIT"
] | 8 | 2021-06-30T03:36:44.000Z | 2021-09-28T23:11:14.000Z | ml_algorithms/linear_model/__init__.py | f4str/neural-networks-sandbox | d771cf8f62fe33c1fcab614ad250af6d0ef30a23 | [
"MIT"
] | 1 | 2021-04-04T23:09:31.000Z | 2021-04-04T23:09:31.000Z | from .elasticnet_regression import ElasticNetRegression
from .lasso_regression import LassoRegression
from .linear_regression import LinearRegression
from .logistic_regression import LogisticRegression
from .ridge_regression import RidgeRegression
__all__ = [
'ElasticNetRegression',
'LassoRegression',
'Lin... | 27.642857 | 55 | 0.81137 |
f61f02c078332b8fc380bf074e7157b43f51dde5 | 831 | py | Python | junk.py | blue-army/azuretools-docker | 255a17b0adf25ccaf9797079fd59c98b3fc48095 | [
"MIT"
] | null | null | null | junk.py | blue-army/azuretools-docker | 255a17b0adf25ccaf9797079fd59c98b3fc48095 | [
"MIT"
] | 1 | 2021-06-01T22:07:59.000Z | 2021-06-01T22:07:59.000Z | junk.py | blue-army/azuretools-docker | 255a17b0adf25ccaf9797079fd59c98b3fc48095 | [
"MIT"
] | null | null | null | import os, uuid, sys
from azure.storage.blob import BlockBlobService, PublicAccess
# Main method.
if __name__ == '__main__':
run_sample() | 36.130435 | 172 | 0.700361 |
f621c4152cb5134441f2e29cffa3dab4475d0a8b | 2,078 | py | Python | examples/compare_methods_kld_air_quality.py | hsivan/automon | 222b17651533bdb2abce7de36a80156ab7b9cc21 | [
"BSD-3-Clause"
] | 1 | 2022-02-25T17:50:32.000Z | 2022-02-25T17:50:32.000Z | examples/compare_methods_kld_air_quality.py | hsivan/automon | 222b17651533bdb2abce7de36a80156ab7b9cc21 | [
"BSD-3-Clause"
] | null | null | null | examples/compare_methods_kld_air_quality.py | hsivan/automon | 222b17651533bdb2abce7de36a80156ab7b9cc21 | [
"BSD-3-Clause"
] | 1 | 2022-03-12T08:12:37.000Z | 2022-03-12T08:12:37.000Z | from automon import AutomonNode, AutomonCoordinator, RlvNode, RlvCoordinator
from test_utils.functions_to_monitor import func_kld
from test_utils.tune_neighborhood_size import tune_neighborhood_size
from test_utils.data_generator import DataGeneratorKldAirQuality
from test_utils.test_utils import start_test, end_test, ... | 53.282051 | 199 | 0.701155 |
f6224d3a2801a7df8d62a2a94a132fbef822cef0 | 902 | py | Python | test/test_default_not_tight.py | ttesileanu/pydove | 35fd2cd36c55d949d7d76add8ce026851e8c7dd1 | [
"MIT"
] | 6 | 2021-03-28T21:13:21.000Z | 2022-03-25T15:42:22.000Z | test/test_default_not_tight.py | ttesileanu/pygrutils | 35fd2cd36c55d949d7d76add8ce026851e8c7dd1 | [
"MIT"
] | 1 | 2021-03-30T22:24:51.000Z | 2021-04-01T19:20:23.000Z | test/test_default_not_tight.py | ttesileanu/pygrutils | 35fd2cd36c55d949d7d76add8ce026851e8c7dd1 | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.4.2
# kernelspec:
# display_name: pydove
# language: python
# name: pydove
# ---
# %% [markdown]
# # Test... | 20.5 | 82 | 0.575388 |
f622c63183c5ab98481217bec0358ab5279f4cbd | 643 | py | Python | beecrowd-1007.py | jessicabessaoliveira/Python | c4732f5e9528a40721b7c16364e6310e7ed8d490 | [
"MIT"
] | null | null | null | beecrowd-1007.py | jessicabessaoliveira/Python | c4732f5e9528a40721b7c16364e6310e7ed8d490 | [
"MIT"
] | null | null | null | beecrowd-1007.py | jessicabessaoliveira/Python | c4732f5e9528a40721b7c16364e6310e7ed8d490 | [
"MIT"
] | null | null | null | # https://www.beecrowd.com.br/judge/pt/problems/view/1007
'''
Leia quatro valores inteiros A, B, C e D. A seguir, calcule e mostre a diferena do produto de A e B pelo produto de C e D segundo a frmula: DIFERENCA = (A * B - C * D).
Entrada
O arquivo de entrada contm 4 valores inteiros.
Sada
Imprima a mensagem DIFEREN... | 27.956522 | 170 | 0.7014 |
f62329758cd5399f4ed0ac810b952ed937df5568 | 15,450 | py | Python | earthquake/generator.py | viktorsapozhok/earthquake-prediction | aca49d2c7e25deb385f98ef030c904ebae96135e | [
"MIT"
] | 8 | 2019-06-20T13:31:42.000Z | 2020-05-01T21:53:20.000Z | earthquake/generator.py | viktorsapozhok/earthquake-prediction | aca49d2c7e25deb385f98ef030c904ebae96135e | [
"MIT"
] | null | null | null | earthquake/generator.py | viktorsapozhok/earthquake-prediction | aca49d2c7e25deb385f98ef030c904ebae96135e | [
"MIT"
] | 1 | 2019-06-05T19:15:14.000Z | 2019-06-05T19:15:14.000Z | import argparse
from itertools import product
import warnings
from joblib import Parallel, delayed
import librosa
import numpy as np
import pandas as pd
from scipy import signal, stats
from sklearn.linear_model import LinearRegression
from tqdm import tqdm
from tsfresh.feature_extraction import feature_calculators
fr... | 36.438679 | 96 | 0.569968 |
f623afc62a37f314f4ef2755fd09527fe4c169f9 | 101 | py | Python | sd/VBx/__init__.py | DanBerrebbi/AISHELL-4 | 75ea24e547b671eae05aac365e32b3cd09bb3b3c | [
"Apache-2.0"
] | 77 | 2021-06-08T11:16:53.000Z | 2022-03-31T03:06:03.000Z | sd/VBx/__init__.py | DanBerrebbi/AISHELL-4 | 75ea24e547b671eae05aac365e32b3cd09bb3b3c | [
"Apache-2.0"
] | 5 | 2021-07-19T09:36:31.000Z | 2022-01-21T13:27:34.000Z | sd/VBx/__init__.py | DanBerrebbi/AISHELL-4 | 75ea24e547b671eae05aac365e32b3cd09bb3b3c | [
"Apache-2.0"
] | 15 | 2021-07-02T03:02:29.000Z | 2022-01-16T04:44:17.000Z | # Copyright (C) 2018 Phonexia
# Author: Jan Profant <jan.profant@phonexia.com>
# All Rights Reserved
| 25.25 | 48 | 0.752475 |
f62407c57d381ccdc8ffc3bcd761bf3a8e917443 | 378 | py | Python | criminals/migrations/0003_auto_20210219_1552.py | Three-Dev-Musketeers/Mumbai_Police | 293fbc1d81db459c23649c9c6b1eef8c38da1939 | [
"MIT"
] | 5 | 2021-02-19T20:37:35.000Z | 2021-12-19T06:41:50.000Z | criminals/migrations/0003_auto_20210219_1552.py | Divesh2201/Mumbai_Police | dfabf8494de2c790178541ee20d37d3002ca12af | [
"MIT"
] | 1 | 2021-10-04T17:37:51.000Z | 2021-10-05T10:50:36.000Z | criminals/migrations/0003_auto_20210219_1552.py | Divesh2201/Mumbai_Police | dfabf8494de2c790178541ee20d37d3002ca12af | [
"MIT"
] | 4 | 2021-03-05T05:44:20.000Z | 2021-04-25T17:23:16.000Z | # Generated by Django 3.1.6 on 2021-02-19 10:22
from django.db import migrations
| 19.894737 | 50 | 0.600529 |
f624a3b08dbe23f4cc9dd7e3eb52a25e697add1f | 13,281 | py | Python | SeenAPI.py | dxmahata/pySeen | 5cf9dbd33e4fce66de7d27af5c2b29d148c6359e | [
"Apache-2.0"
] | 1 | 2016-06-07T14:22:12.000Z | 2016-06-07T14:22:12.000Z | SeenAPI.py | dxmahata/pySeen | 5cf9dbd33e4fce66de7d27af5c2b29d148c6359e | [
"Apache-2.0"
] | null | null | null | SeenAPI.py | dxmahata/pySeen | 5cf9dbd33e4fce66de7d27af5c2b29d148c6359e | [
"Apache-2.0"
] | null | null | null | '''
Created on Dec 10, 2014
@author: Dxmahata
'''
__author__ = "Debanjan Mahata"
import requests
import sys
import json
API_REQUEST_COUNT = 0
#Base Url for calling Seen API
BASE_URL = "http://api.seen.co/v0.1"
#Setting up the endpoints
ENDPOINTS = {}
#setting up events endpoint
ENDPOINTS["events"] = {}
#setting ... | 33.622785 | 410 | 0.649575 |
f625073f4f20ce3c62fee8004fceed128eacec8d | 1,981 | py | Python | losses/test_ssim.py | sunshinnnn/DSMnet | eed7a4de12f93cd625e1e68758aa4c3193a60d28 | [
"Apache-2.0"
] | 31 | 2018-08-14T04:05:41.000Z | 2022-02-07T06:23:22.000Z | losses/test_ssim.py | sunshinnnn/DSMnet | eed7a4de12f93cd625e1e68758aa4c3193a60d28 | [
"Apache-2.0"
] | 3 | 2019-04-08T23:25:03.000Z | 2020-12-09T20:05:38.000Z | losses/test_ssim.py | sunshinnnn/DSMnet | eed7a4de12f93cd625e1e68758aa4c3193a60d28 | [
"Apache-2.0"
] | 8 | 2018-08-14T04:05:44.000Z | 2021-03-16T16:10:57.000Z | import sys
sys.path.append("../")
import torch
import matplotlib.pyplot as plt
from util.util import to_tensor, imsplot_tensor
from util.imwrap import imwrap_BCHW # as imwrap
from dataloader.imagerw import load_image, load_disp #, save_image
from SSIM import SSIM
test()
| 38.843137 | 74 | 0.638062 |
f6262ab64348d90863c6a1288397d28b818c68b1 | 6,611 | py | Python | main.py | haoyfan/SemiTime | 9604900bd5d67513d128d33d395bf78e5186b467 | [
"MIT"
] | 14 | 2020-10-28T11:29:43.000Z | 2022-03-31T02:20:27.000Z | main.py | haoyfan/SemiTime | 9604900bd5d67513d128d33d395bf78e5186b467 | [
"MIT"
] | 1 | 2022-03-31T08:16:35.000Z | 2022-03-31T08:16:35.000Z | main.py | haoyfan/SemiTime | 9604900bd5d67513d128d33d395bf78e5186b467 | [
"MIT"
] | 1 | 2021-06-21T16:30:43.000Z | 2021-06-21T16:30:43.000Z | # -*- coding: utf-8 -*-
import datetime
from optim.pretrain import *
import argparse
import torch
from optim.train import supervised_train
if __name__ == "__main__":
import os
import numpy as np
opt = parse_option()
os.environ['CUDA_VISIBLE_DEVICES']=opt.gpu
exp = 'exp-cls'
Seeds = [0, 1, ... | 36.932961 | 122 | 0.588262 |
f6294efecd7299adfde8c96549534a1b8251ef79 | 610 | py | Python | dash_app/config.py | pykcel/myportfolio | 958ffe6a8ab541007f7182e7ff5c86931a0c0ccd | [
"MIT"
] | null | null | null | dash_app/config.py | pykcel/myportfolio | 958ffe6a8ab541007f7182e7ff5c86931a0c0ccd | [
"MIT"
] | 1 | 2021-04-12T11:25:42.000Z | 2021-04-12T15:52:43.000Z | dash_app/config.py | pykcel/myportfolio | 958ffe6a8ab541007f7182e7ff5c86931a0c0ccd | [
"MIT"
] | null | null | null | import os
basedir = os.path.abspath(os.path.dirname(__file__))
DATA_PATH = os.path.join(os.path.dirname(basedir), "data")
DEGIRO_PATH = os.path.join(os.path.dirname(basedir), "degiro_creds.json")
EXCHANGE_MAPPING_PATH = os.path.join(DATA_PATH, "raw/exchange_symbol_map.json")
# Path to DB with SQLAlchemy syntax:
# Refe... | 35.882353 | 80 | 0.777049 |
f629e22842baa9b9e544f6bc70c6cffc9be541af | 57 | py | Python | groups/__init__.py | ThomasJunk/ToDo | 222a94c7d9e95f42333fbab303243a1b6b8d6810 | [
"MIT"
] | null | null | null | groups/__init__.py | ThomasJunk/ToDo | 222a94c7d9e95f42333fbab303243a1b6b8d6810 | [
"MIT"
] | 2 | 2021-07-17T14:51:10.000Z | 2021-07-17T14:51:11.000Z | groups/__init__.py | ThomasJunk/ToDo | 222a94c7d9e95f42333fbab303243a1b6b8d6810 | [
"MIT"
] | null | null | null | # SPDX-License-Identifier: MIT
default_groups = ["user"]
| 19 | 30 | 0.736842 |
f62b5eeb8c988346be283fc9dfbe7ef972666e1e | 713 | py | Python | src/controllers/out.py | marijadebe/lab | b3b213116b25fc89db374f6e61a2513508d00934 | [
"MIT"
] | null | null | null | src/controllers/out.py | marijadebe/lab | b3b213116b25fc89db374f6e61a2513508d00934 | [
"MIT"
] | null | null | null | src/controllers/out.py | marijadebe/lab | b3b213116b25fc89db374f6e61a2513508d00934 | [
"MIT"
] | null | null | null | import sys
import re
from models.types import Types | 44.5625 | 87 | 0.653576 |
f62f27041be15aaaced95b59a1845cdded1bc93a | 307 | py | Python | src/the_tale/the_tale/game/emissaries/management/commands/emissaries_remove_orphan_effects.py | Alacrate/the-tale | 43b211f3a99e93964e95abc20a8ed649a205ffcf | [
"BSD-3-Clause"
] | 85 | 2017-11-21T12:22:02.000Z | 2022-03-27T23:07:17.000Z | src/the_tale/the_tale/game/emissaries/management/commands/emissaries_remove_orphan_effects.py | Alacrate/the-tale | 43b211f3a99e93964e95abc20a8ed649a205ffcf | [
"BSD-3-Clause"
] | 545 | 2017-11-04T14:15:04.000Z | 2022-03-27T14:19:27.000Z | src/the_tale/the_tale/game/emissaries/management/commands/emissaries_remove_orphan_effects.py | Alacrate/the-tale | 43b211f3a99e93964e95abc20a8ed649a205ffcf | [
"BSD-3-Clause"
] | 45 | 2017-11-11T12:36:30.000Z | 2022-02-25T06:10:44.000Z |
import smart_imports
smart_imports.all()
| 17.055556 | 61 | 0.700326 |
f6306e5dbd5f299747a7bcacf37b900f61ec3359 | 2,731 | py | Python | boundingbox/distances.py | nickhalmagyi/boundingbox | 76aae366171b64ed938aa22912e0c9684fecd351 | [
"MIT"
] | 1 | 2019-05-10T13:07:40.000Z | 2019-05-10T13:07:40.000Z | boundingbox/distances.py | nickhalmagyi/BoundingBox | 76aae366171b64ed938aa22912e0c9684fecd351 | [
"MIT"
] | null | null | null | boundingbox/distances.py | nickhalmagyi/BoundingBox | 76aae366171b64ed938aa22912e0c9684fecd351 | [
"MIT"
] | null | null | null | from boundingbox.boundingbox import BoundingBox
from haversine import haversine
import numpy as np
import time
from importlib import reload
import boundingbox.validations; reload(boundingbox.validations)
from boundingbox.validations.numbers import validate_strictly_positive_integer, validate_positive_number
def get_... | 42.671875 | 119 | 0.737459 |
f630cd0ac8ff9fcf66251d9af12794677c609746 | 709 | py | Python | apis/betterself/v1/constants.py | jeffshek/betterself | 51468253fc31373eb96e0e82189b9413f3d76ff5 | [
"MIT"
] | 98 | 2017-07-29T14:26:36.000Z | 2022-02-28T04:10:15.000Z | apis/betterself/v1/constants.py | jeffshek/betterself | 51468253fc31373eb96e0e82189b9413f3d76ff5 | [
"MIT"
] | 1,483 | 2017-05-30T00:05:56.000Z | 2022-03-31T12:37:06.000Z | apis/betterself/v1/constants.py | lawrendran/betterself | 51468253fc31373eb96e0e82189b9413f3d76ff5 | [
"MIT"
] | 13 | 2017-11-08T00:02:35.000Z | 2022-02-28T04:10:32.000Z | from events.models import SupplementLog
from supplements.models import IngredientComposition, Supplement, Ingredient, Measurement
from vendors.models import Vendor
VALID_REST_RESOURCES = [
SupplementLog,
Supplement,
IngredientComposition,
Ingredient,
Measurement,
Vendor
]
# a lot of frontend (... | 33.761905 | 119 | 0.782793 |
f630fb65819047b6f622503fb05a79444a7a296e | 4,538 | py | Python | Data/DataExploitation.py | Someone-42/BonapioSQL | 1d059ed1796cfc33f1a580c6320b5e569db8cb5d | [
"MIT"
] | null | null | null | Data/DataExploitation.py | Someone-42/BonapioSQL | 1d059ed1796cfc33f1a580c6320b5e569db8cb5d | [
"MIT"
] | 1 | 2021-12-19T16:49:46.000Z | 2021-12-19T16:49:58.000Z | Data/DataExploitation.py | Someone-42/BonapioSQL | 1d059ed1796cfc33f1a580c6320b5e569db8cb5d | [
"MIT"
] | null | null | null | import os
_NamePath = "Data/noms2008nat_text.txt"
_SurnameGirlsPath = "Data/prenoms_donnees_filles.csv"
_SurnameBoysPath = "Data/prenoms_donnees_garcons.csv"
_FreqPathPrenom = "Data/freq_prenoms.csv"
_FreqPathNom = "Data/freq_noms.csv"
def _get_first_name_freq(file_name: str, d: dict) -> int:
""" Modifies the dic... | 41.254545 | 132 | 0.659982 |
f6323866975c2773aa564a86869863a47d476760 | 1,126 | py | Python | backend/moves/signals.py | mnieber/lindyscience | 468160aa6da42f45d8c37a2141a077a48410f81d | [
"MIT"
] | null | null | null | backend/moves/signals.py | mnieber/lindyscience | 468160aa6da42f45d8c37a2141a077a48410f81d | [
"MIT"
] | 21 | 2020-02-11T23:50:05.000Z | 2022-02-27T17:44:29.000Z | backend/moves/signals.py | mnieber/lindyscience | 468160aa6da42f45d8c37a2141a077a48410f81d | [
"MIT"
] | null | null | null | from django.dispatch import receiver
from django_rtk.signals import account_activated
from moves import models
from profiles.models import Profile, ProfileToMoveList
| 23.458333 | 84 | 0.60302 |
f6323adb71601500b2b7dcfcad40e64e877063c6 | 431 | py | Python | First_Flask_Platform/app/views.py | neuJump/COMP30670-Assignment2-Flask | 770b9fa0f18f7d0d4ea7a8fabe5ac5817c72dc2d | [
"MIT"
] | null | null | null | First_Flask_Platform/app/views.py | neuJump/COMP30670-Assignment2-Flask | 770b9fa0f18f7d0d4ea7a8fabe5ac5817c72dc2d | [
"MIT"
] | null | null | null | First_Flask_Platform/app/views.py | neuJump/COMP30670-Assignment2-Flask | 770b9fa0f18f7d0d4ea7a8fabe5ac5817c72dc2d | [
"MIT"
] | null | null | null | from flask import render_template
from app import app
import SystemInfo.main
| 33.153846 | 66 | 0.675174 |
f633bface7b821abb8c0114dbe26ac4f098225a4 | 535 | py | Python | python/plugin_unet/dataset.py | serjik85kg/UnetV2-pytorch-segmentation | c53598d00aeb0c79cb9dd52b6ab3b4976d127f21 | [
"MIT"
] | null | null | null | python/plugin_unet/dataset.py | serjik85kg/UnetV2-pytorch-segmentation | c53598d00aeb0c79cb9dd52b6ab3b4976d127f21 | [
"MIT"
] | null | null | null | python/plugin_unet/dataset.py | serjik85kg/UnetV2-pytorch-segmentation | c53598d00aeb0c79cb9dd52b6ab3b4976d127f21 | [
"MIT"
] | null | null | null | # coding: utf-8
import numpy as np
from torchvision.transforms import ToTensor, Normalize, Compose
# from sd_lib.nn.dataset import SlyDataset
input_image_normalizer = Compose([
ToTensor(),
Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
])
# class UnetV2Dataset(SlyDataset):
# def _get... | 28.157895 | 86 | 0.699065 |
f6347a3ec7983daa3f16a31ca1dbd8d5e0049877 | 5,131 | py | Python | Assets/Python/Victories.py | dguenms/Dawn-of-Civilization | 1c4f510af97a869637cddb4c0859759158cea5ce | [
"MIT"
] | 93 | 2015-11-20T04:13:36.000Z | 2022-03-24T00:03:08.000Z | Assets/Python/Victories.py | dguenms/Dawn-of-Civilization | 1c4f510af97a869637cddb4c0859759158cea5ce | [
"MIT"
] | 206 | 2015-11-09T00:27:15.000Z | 2021-12-04T19:05:18.000Z | Assets/Python/Victories.py | dguenms/Dawn-of-Civilization | 1c4f510af97a869637cddb4c0859759158cea5ce | [
"MIT"
] | 117 | 2015-11-08T02:43:46.000Z | 2022-02-12T06:29:00.000Z | from Core import *
from StoredData import data
from Events import handler
### SCENARIO SETUP ###
lLostIn1700AD = [iChina, iIndia, iTamils, iKorea, iVikings, iTurks, iSpain, iHolyRome, iPoland, iPortugal, iMughals, iOttomans, iThailand]
lWonIn1700AD = [(iIran, 0), (iJapan, 0), (iFrance, 0), (iCongo, 0), (iNetherland... | 27.586022 | 138 | 0.764958 |
f634d3bb4f093f386bc4f87d452b8f879ce45cb6 | 8,015 | py | Python | src/cpePaser/day_extract.py | MAE-M/PotentiallyInactiveCpeAnalysisTool | 58f897fb45437ff72a6db4d490f364061d779c50 | [
"Apache-2.0"
] | null | null | null | src/cpePaser/day_extract.py | MAE-M/PotentiallyInactiveCpeAnalysisTool | 58f897fb45437ff72a6db4d490f364061d779c50 | [
"Apache-2.0"
] | null | null | null | src/cpePaser/day_extract.py | MAE-M/PotentiallyInactiveCpeAnalysisTool | 58f897fb45437ff72a6db4d490f364061d779c50 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 Huawei Technologies Co., Ltd.
# foss@huawei.com
#
# 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 requi... | 37.629108 | 106 | 0.648534 |
f635b3eca92319c1097c2f0cdb0375a22892f53e | 1,138 | py | Python | module/seeding/seeder/threshold_seed.py | ObliviousJamie/opic-prototype | a925ce9faa38b9a6c8976d4c63b47349a53fd07e | [
"BSD-3-Clause"
] | null | null | null | module/seeding/seeder/threshold_seed.py | ObliviousJamie/opic-prototype | a925ce9faa38b9a6c8976d4c63b47349a53fd07e | [
"BSD-3-Clause"
] | null | null | null | module/seeding/seeder/threshold_seed.py | ObliviousJamie/opic-prototype | a925ce9faa38b9a6c8976d4c63b47349a53fd07e | [
"BSD-3-Clause"
] | null | null | null | import peakutils
from module.seeding.seeder.seeder import Seeder
| 29.947368 | 89 | 0.598418 |
f635f47508977479e51aeb2a2d9a8692db618aa8 | 1,620 | py | Python | ball.py | iliescua/Pong | 88c62cc9db44b76b98130546582aa601859e0041 | [
"MIT"
] | null | null | null | ball.py | iliescua/Pong | 88c62cc9db44b76b98130546582aa601859e0041 | [
"MIT"
] | null | null | null | ball.py | iliescua/Pong | 88c62cc9db44b76b98130546582aa601859e0041 | [
"MIT"
] | null | null | null | from turtle import Turtle
TOP_BORDER = 280
SIDE_BORDER = 380
P_SIZE = 50
P_POSITION = 320
| 23.142857 | 90 | 0.559877 |
f63677a352c96443fb84314f00dd42cf61e97b33 | 2,404 | py | Python | nicos_sinq/devices/epics/motor.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | nicos_sinq/devices/epics/motor.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | nicos_sinq/devices/epics/motor.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2022 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 36.424242 | 79 | 0.635191 |
f637709339851920c290c85068ff77de0d14dc64 | 2,941 | py | Python | tests/test_matrix.py | cmc333333/mapbox-sdk-py | c38d177fc4f235b08a9e8dcda711e09a6edf0e20 | [
"MIT"
] | null | null | null | tests/test_matrix.py | cmc333333/mapbox-sdk-py | c38d177fc4f235b08a9e8dcda711e09a6edf0e20 | [
"MIT"
] | null | null | null | tests/test_matrix.py | cmc333333/mapbox-sdk-py | c38d177fc4f235b08a9e8dcda711e09a6edf0e20 | [
"MIT"
] | null | null | null | import pytest
import responses
from mapbox import DirectionsMatrix
from mapbox.errors import MapboxDeprecationWarning
points = [{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [
-87, 36]}}, {
"type": "Feature",
"properties": {},
... | 31.287234 | 128 | 0.633798 |
f63771cbca3bfd63d672bd871a2472a63c4173ca | 41,409 | py | Python | code/adversarial/train.py | urkax/CollageNet | 337098b40afbf0b3c8514f80a9953a797988938d | [
"MIT"
] | 10 | 2021-07-12T14:32:16.000Z | 2021-12-10T09:11:30.000Z | code/adversarial/train.py | urkax/CollageNet | 337098b40afbf0b3c8514f80a9953a797988938d | [
"MIT"
] | null | null | null | code/adversarial/train.py | urkax/CollageNet | 337098b40afbf0b3c8514f80a9953a797988938d | [
"MIT"
] | 3 | 2021-11-16T12:54:19.000Z | 2022-01-07T13:52:26.000Z | import os
import sys
import json
import socket
import getpass
import glog as log
import numpy as np
import torch
import torch.nn.functional as F
from torch.utils.data import DataLoader
from tensorboardX import SummaryWriter
import time
p = os.path.dirname(os.path.dirname((os.path.abspath(__file__))))
if p not in sys.p... | 64.701563 | 327 | 0.698351 |
f637b629ac57da2447d1ec193883db4f65a06e49 | 784 | py | Python | base/migrations/0007_auto_20191031_1524.py | amin-da71/Benbb96 | 0c9e37425d0665e403ba6fecf0c4b17669c29ada | [
"MIT"
] | null | null | null | base/migrations/0007_auto_20191031_1524.py | amin-da71/Benbb96 | 0c9e37425d0665e403ba6fecf0c4b17669c29ada | [
"MIT"
] | 13 | 2021-02-13T20:15:18.000Z | 2022-03-11T23:57:07.000Z | base/migrations/0007_auto_20191031_1524.py | amin-da71/Benbb96 | 0c9e37425d0665e403ba6fecf0c4b17669c29ada | [
"MIT"
] | null | null | null | # Generated by Django 2.1.11 on 2019-10-31 14:24
from django.db import migrations, models
| 32.666667 | 171 | 0.647959 |
f637e3392c8c6461ada801c17a43ac56bfdc0ba3 | 123 | py | Python | python/pygimli/misc/__init__.py | mjziebarth/gimli | 196ac4d6dd67e0326cccc44a87b367f64051e490 | [
"Apache-2.0"
] | 3 | 2021-07-10T00:56:59.000Z | 2022-02-17T12:43:38.000Z | python/pygimli/misc/__init__.py | ivek1312/gimli | 5fafebb7c96dd0e04e2616df402fa27a01609d63 | [
"Apache-2.0"
] | null | null | null | python/pygimli/misc/__init__.py | ivek1312/gimli | 5fafebb7c96dd0e04e2616df402fa27a01609d63 | [
"Apache-2.0"
] | 1 | 2022-03-29T04:28:40.000Z | 2022-03-29T04:28:40.000Z | # -*- coding: utf-8 -*-
"""
Unsorted miscellaneous stuff
"""
from .unsorted import *
from .unsorted import streamline
| 15.375 | 32 | 0.666667 |
f6380063f172c32604eb7d88b92e65b8adccba98 | 4,660 | py | Python | handlers/category.py | cstieg/Item-Catalog | 7e91c268872a6aaea231b979fdd27a666aab1764 | [
"MIT"
] | null | null | null | handlers/category.py | cstieg/Item-Catalog | 7e91c268872a6aaea231b979fdd27a666aab1764 | [
"MIT"
] | null | null | null | handlers/category.py | cstieg/Item-Catalog | 7e91c268872a6aaea231b979fdd27a666aab1764 | [
"MIT"
] | null | null | null | """Handlers for category"""
import flask
from werkzeug.exceptions import BadRequest, Unauthorized
from json import dumps
from itemcatalog import app
import models
import login
| 36.692913 | 105 | 0.670172 |
f63ae4ae1659c3703f55d9ef00455b73d7a5f9b7 | 2,801 | py | Python | scripts/no_bool_in_generic.py | umangino/pandas | c492672699110fe711b7f76ded5828ff24bce5ab | [
"BSD-3-Clause"
] | 28,899 | 2016-10-13T03:32:12.000Z | 2022-03-31T21:39:05.000Z | scripts/no_bool_in_generic.py | umangino/pandas | c492672699110fe711b7f76ded5828ff24bce5ab | [
"BSD-3-Clause"
] | 31,004 | 2016-10-12T23:22:27.000Z | 2022-03-31T23:17:38.000Z | scripts/no_bool_in_generic.py | umangino/pandas | c492672699110fe711b7f76ded5828ff24bce5ab | [
"BSD-3-Clause"
] | 15,149 | 2016-10-13T03:21:31.000Z | 2022-03-31T18:46:47.000Z | """
Check that pandas/core/generic.py doesn't use bool as a type annotation.
There is already the method `bool`, so the alias `bool_t` should be used instead.
This is meant to be run as a pre-commit hook - to run it manually, you can do:
pre-commit run no-bool-in-core-generic --all-files
The function `visit` is... | 31.829545 | 111 | 0.646912 |
f63b5c57bfdbb91b31f33dd30b40f9e108f599e0 | 4,786 | py | Python | tests/unit/configuration_subsystem/test_sample_configurations.py | richm/ansible-navigator | c9cd9a4b2eeb424145d4953aca79c4cc8ee8afd4 | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/unit/configuration_subsystem/test_sample_configurations.py | richm/ansible-navigator | c9cd9a4b2eeb424145d4953aca79c4cc8ee8afd4 | [
"Apache-2.0",
"MIT"
] | 1 | 2022-02-04T02:38:15.000Z | 2022-02-04T02:38:15.000Z | tests/unit/configuration_subsystem/test_sample_configurations.py | richm/ansible-navigator | c9cd9a4b2eeb424145d4953aca79c4cc8ee8afd4 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-11-17T09:45:18.000Z | 2021-11-17T09:45:18.000Z | """ Some tests using a alternate test configurations
to prove code paths not covered by the ansible-navigator
configuration
"""
import pytest
from ansible_navigator.configuration_subsystem.configurator import Configurator
from ansible_navigator.configuration_subsystem.navigator_post_processor import (
NavigatorP... | 34.431655 | 90 | 0.635395 |
f63c50d1bf29bb5718b52213b5b39bdaa380f0e3 | 199 | py | Python | Algorithms/Implementation/Kangaroo.py | gauthamkrishna-g/HackerRank | 472d7a56fc1c1c4f8f03fcabc09d08da4000efde | [
"MIT"
] | 1 | 2017-12-02T14:23:44.000Z | 2017-12-02T14:23:44.000Z | Algorithms/Implementation/Kangaroo.py | gauthamkrishna-g/HackerRank | 472d7a56fc1c1c4f8f03fcabc09d08da4000efde | [
"MIT"
] | null | null | null | Algorithms/Implementation/Kangaroo.py | gauthamkrishna-g/HackerRank | 472d7a56fc1c1c4f8f03fcabc09d08da4000efde | [
"MIT"
] | null | null | null | #!/bin/python3
x1,v1,x2,v2 = input().strip().split(' ')
x1,v1,x2,v2 = [int(x1),int(v1),int(x2),int(v2)]
print("YES" if (x2 - x1) * (v2 - v1) < 0 and (x2 - x1) % (v2 - v1) == 0 else "NO")
| 28.428571 | 83 | 0.492462 |
f63c6d71a21a96cea4d40db191c51264cea7cefe | 792 | py | Python | blog_app/posts/migrations/0001_initial.py | haddercone/Blog.github.io | 1908706312bfd2946b01e988806d37d861d6395d | [
"MIT"
] | 1 | 2019-06-10T10:49:02.000Z | 2019-06-10T10:49:02.000Z | blog_app/posts/migrations/0001_initial.py | haddercone/Blog.github.io | 1908706312bfd2946b01e988806d37d861d6395d | [
"MIT"
] | null | null | null | blog_app/posts/migrations/0001_initial.py | haddercone/Blog.github.io | 1908706312bfd2946b01e988806d37d861d6395d | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2019-04-17 16:19
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
| 29.333333 | 128 | 0.60101 |
f63d7e029bf5a5228b9983d3d3b72e181cfc36c8 | 2,313 | py | Python | tests/test_prometheus_querybuilder.py | m-chrome/prometheus-query-builder | 14c391346b99742909265fc00b0e620fc0d6134c | [
"MIT"
] | null | null | null | tests/test_prometheus_querybuilder.py | m-chrome/prometheus-query-builder | 14c391346b99742909265fc00b0e620fc0d6134c | [
"MIT"
] | null | null | null | tests/test_prometheus_querybuilder.py | m-chrome/prometheus-query-builder | 14c391346b99742909265fc00b0e620fc0d6134c | [
"MIT"
] | null | null | null | from prometheus_query_builder.query import Query
import pytest
def test_query():
""" Test query with only metric name """
query = Query("http_requests_total")
assert str(query) == "http_requests_total"
| 30.434211 | 85 | 0.722006 |
f63e34643f9ce8bcd233959f49016f41e28a7a1f | 699 | py | Python | tests/test_main.py | tokusumi/drudgeyer | 5282b92c22493ae43421493b9850e10df34ef34f | [
"MIT"
] | null | null | null | tests/test_main.py | tokusumi/drudgeyer | 5282b92c22493ae43421493b9850e10df34ef34f | [
"MIT"
] | 3 | 2021-03-06T11:28:39.000Z | 2021-03-11T08:12:07.000Z | tests/test_main.py | tokusumi/drudgeyer | 5282b92c22493ae43421493b9850e10df34ef34f | [
"MIT"
] | null | null | null | from typer.testing import CliRunner
from drudgeyer import app
runner = CliRunner()
| 26.884615 | 53 | 0.646638 |
f63e8c61c7288fdc96e3a4c021f87342a2409094 | 563 | py | Python | tests/shared.py | award7/dicomsort | b83a8d9468a6599cfc36f497dcdb38ea62c2c783 | [
"MIT"
] | 15 | 2015-02-26T17:27:48.000Z | 2019-10-22T12:28:24.000Z | tests/shared.py | BigHeartDB/dicomsort | e4e73241cc08e2fe34ea5a3fae606c9ce5afd3ff | [
"MIT"
] | 61 | 2020-02-07T21:56:23.000Z | 2022-03-31T22:12:08.000Z | tests/shared.py | suever/dicomsort | d2a09887ebe7e3f2bcdc07eb1375d995ba365205 | [
"MIT"
] | 7 | 2015-09-07T04:47:29.000Z | 2019-03-18T09:29:48.000Z | import wx
| 23.458333 | 68 | 0.479574 |
f63fd47e767276cc8e0cf77a0beb6b73482acef3 | 2,705 | py | Python | bin/scrape_software_versions.py | jpfeuffer/quantms | 4762fd62e59352cdf04797275c1aa50e11bea4dc | [
"MIT"
] | null | null | null | bin/scrape_software_versions.py | jpfeuffer/quantms | 4762fd62e59352cdf04797275c1aa50e11bea4dc | [
"MIT"
] | null | null | null | bin/scrape_software_versions.py | jpfeuffer/quantms | 4762fd62e59352cdf04797275c1aa50e11bea4dc | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
import os
import re
results = {}
version_files = [x for x in os.listdir(".") if x.endswith(".version.txt")]
# TODO https://github.com/nf-core/proteomicslfq/pull/165
for version_file in version_files:
software = version_file.replace(".version.txt", "")
... | 33.8125 | 259 | 0.603697 |
f6403a7748cde59ed1c5a1bdb63ee72fbf187a9c | 637 | py | Python | tests/utilities/read_properties.py | BSE21-13/FrontEndSite | 3592b7c0f62bdc3868d93221b27e9d365e9120b8 | [
"MIT"
] | null | null | null | tests/utilities/read_properties.py | BSE21-13/FrontEndSite | 3592b7c0f62bdc3868d93221b27e9d365e9120b8 | [
"MIT"
] | 5 | 2021-12-28T12:48:56.000Z | 2022-01-24T12:07:17.000Z | tests/utilities/read_properties.py | BSE21-13/FrontEndSite | 3592b7c0f62bdc3868d93221b27e9d365e9120b8 | [
"MIT"
] | null | null | null | import configparser
config = configparser.RawConfigParser()
config.read("../tests/configurations/config.ini")
| 27.695652 | 67 | 0.676609 |
f6406e119d2329e146c0e9ca048882d418cdc911 | 20,678 | py | Python | s2protocol/decoders.py | karlgluck/heroes-of-the-storm-replay-parser | 5dd407e3ce2bd06d1acd279dd85c2a2a924c3c62 | [
"MIT"
] | 31 | 2015-01-19T09:42:02.000Z | 2021-01-02T12:42:07.000Z | s2protocol/decoders.py | karlgluck/heroes-of-the-storm-replay-parser | 5dd407e3ce2bd06d1acd279dd85c2a2a924c3c62 | [
"MIT"
] | null | null | null | s2protocol/decoders.py | karlgluck/heroes-of-the-storm-replay-parser | 5dd407e3ce2bd06d1acd279dd85c2a2a924c3c62 | [
"MIT"
] | 9 | 2015-04-02T04:24:54.000Z | 2017-09-08T11:17:19.000Z | # Copyright (c) 2013 Blizzard Entertainment
#
# 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, publi... | 35.106961 | 146 | 0.587678 |
f6409463cc8856df6f86a4d40066e1cd24e510d1 | 9,669 | py | Python | eventbus/util/transcoding.py | adyshev/eventbus | 7479e42fe8d2749cc5798921a49a9e30bbbd7c29 | [
"MIT"
] | 2 | 2020-10-02T20:22:23.000Z | 2020-12-08T11:37:29.000Z | eventbus/util/transcoding.py | adyshev/eventbus | 7479e42fe8d2749cc5798921a49a9e30bbbd7c29 | [
"MIT"
] | 107 | 2020-12-03T09:44:06.000Z | 2022-03-31T22:58:40.000Z | eventbus/util/transcoding.py | adyshev/eventbus | 7479e42fe8d2749cc5798921a49a9e30bbbd7c29 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from enum import Enum
from json import JSONDecoder, JSONEncoder
from uuid import UUID
from types import MethodType, FunctionType
from base64 import b64decode, b64encode
from typing import Optional
from decimal import Decimal
from functools import wraps, singledispatch
from collec... | 26.203252 | 111 | 0.637088 |
f640c75d44329cd62f0bd63d9e71a578d7df4871 | 95 | py | Python | osc_bge/branch/apps.py | jisuhan3201/osc-bge | 125c441d23d7f1fdb2d9b8f42f859082e757e25a | [
"MIT"
] | null | null | null | osc_bge/branch/apps.py | jisuhan3201/osc-bge | 125c441d23d7f1fdb2d9b8f42f859082e757e25a | [
"MIT"
] | 5 | 2020-06-05T19:49:47.000Z | 2021-09-08T00:50:55.000Z | osc_bge/branch/apps.py | jisuhan3201/osc-bge | 125c441d23d7f1fdb2d9b8f42f859082e757e25a | [
"MIT"
] | null | null | null | from django.apps import AppConfig
| 15.833333 | 33 | 0.757895 |
f641c36178a65bbfc610b9a5571bcb7865d2f5ec | 16,135 | py | Python | magenta/models/lookback_rnn/lookback_rnn_encoder_decoder_test.py | Sprog-gle/Magenta | 55bfd53f8112cf34952e67efc646b98523837f8f | [
"Apache-2.0"
] | null | null | null | magenta/models/lookback_rnn/lookback_rnn_encoder_decoder_test.py | Sprog-gle/Magenta | 55bfd53f8112cf34952e67efc646b98523837f8f | [
"Apache-2.0"
] | null | null | null | magenta/models/lookback_rnn/lookback_rnn_encoder_decoder_test.py | Sprog-gle/Magenta | 55bfd53f8112cf34952e67efc646b98523837f8f | [
"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 ag... | 59.759259 | 80 | 0.464642 |
f644aba561ae3d5fafa3e422d691f77a18559858 | 3,594 | py | Python | util/Stacker.py | demetoir/ALLGANS | 2f972db5e9a65f18aee0695d817f4acc221e54da | [
"MIT"
] | 11 | 2018-01-25T15:31:54.000Z | 2019-12-17T06:12:57.000Z | util/Stacker.py | demetoir/ALLGANs | 2f972db5e9a65f18aee0695d817f4acc221e54da | [
"MIT"
] | 19 | 2018-01-29T16:12:09.000Z | 2018-02-15T15:56:48.000Z | util/Stacker.py | demetoir/ALLGANs | 2f972db5e9a65f18aee0695d817f4acc221e54da | [
"MIT"
] | 2 | 2018-02-06T00:31:55.000Z | 2018-02-19T15:29:10.000Z | from util.tensor_ops import *
| 32.378378 | 83 | 0.628548 |
f646c5cb4299bf70a2742fabb4cedc310b92d3e0 | 6,019 | py | Python | rl_rvo_nav/policy_test/post_train.py | hanruihua/rl_rvo_nav | 9ce17853336ee3231860e0a0f8df9269515adfb4 | [
"MIT"
] | 8 | 2022-03-18T06:41:07.000Z | 2022-03-31T03:49:55.000Z | rl_rvo_nav/policy_test/post_train.py | hanruihua/rl_rvo_nav | 9ce17853336ee3231860e0a0f8df9269515adfb4 | [
"MIT"
] | null | null | null | rl_rvo_nav/policy_test/post_train.py | hanruihua/rl_rvo_nav | 9ce17853336ee3231860e0a0f8df9269515adfb4 | [
"MIT"
] | 2 | 2022-03-29T01:43:54.000Z | 2022-03-29T07:47:02.000Z | import torch
import numpy as np
from pathlib import Path
import platform
from rl_rvo_nav.policy.policy_rnn_ac import rnn_ac
from math import pi, sin, cos, sqrt
import time | 41.510345 | 323 | 0.579 |
f6483d57aeed490b4f308d885d8bb0758430e6ca | 4,866 | py | Python | scripts/NIRISS_AMI_tutorial.py | vandalt/ImPlaneIA | 72b22e487ef45a8a665e4a6a88a91e99e382fdd0 | [
"BSD-3-Clause"
] | 6 | 2020-03-03T16:15:40.000Z | 2022-03-23T16:15:09.000Z | scripts/NIRISS_AMI_tutorial.py | vandalt/ImPlaneIA | 72b22e487ef45a8a665e4a6a88a91e99e382fdd0 | [
"BSD-3-Clause"
] | 5 | 2020-02-03T17:46:59.000Z | 2022-03-07T20:00:59.000Z | scripts/NIRISS_AMI_tutorial.py | vandalt/ImPlaneIA | 72b22e487ef45a8a665e4a6a88a91e99e382fdd0 | [
"BSD-3-Clause"
] | 1 | 2021-07-06T23:02:01.000Z | 2021-07-06T23:02:01.000Z | #!/usr/bin/env python
# coding: utf-8
# # A short Tutorial to process sample NIRISS AMI simulations
#
# * fit fringes for a simulated target and calibrator sequence (no WFE evolution between them)
# * calibrate target closure phases with the calibrator
# * fit for a binary
import glob
import os, sys, time
from astro... | 39.560976 | 101 | 0.723387 |
f6491069571690a0457248fa03941dc4de624512 | 139 | py | Python | python_tutorial/main.py | vchatchai/python101 | c2f1c7b0f62a4600f9c64af566dc5630742580f2 | [
"Apache-2.0"
] | null | null | null | python_tutorial/main.py | vchatchai/python101 | c2f1c7b0f62a4600f9c64af566dc5630742580f2 | [
"Apache-2.0"
] | null | null | null | python_tutorial/main.py | vchatchai/python101 | c2f1c7b0f62a4600f9c64af566dc5630742580f2 | [
"Apache-2.0"
] | null | null | null | from fibo import fib, fib2
import fibo
import importlib
print(fibo.__name__)
print(fib(1000))
print(fibo.fib2(100))
importlib.reload(fibo)
| 17.375 | 26 | 0.791367 |
f64b7a8173c2b1a5bbc6c0e6c85a655208cbfcdc | 1,363 | py | Python | openstacksdk_learn/connect_to_openstack.py | PyLearner/myworks | 6dd87bfce5d0b3b17d02248fceb3d91d97cab7d5 | [
"Apache-2.0"
] | null | null | null | openstacksdk_learn/connect_to_openstack.py | PyLearner/myworks | 6dd87bfce5d0b3b17d02248fceb3d91d97cab7d5 | [
"Apache-2.0"
] | null | null | null | openstacksdk_learn/connect_to_openstack.py | PyLearner/myworks | 6dd87bfce5d0b3b17d02248fceb3d91d97cab7d5 | [
"Apache-2.0"
] | null | null | null | import sys
from openstack import connection
from openstack import profile
from openstack import utils
# open logging
# utils.enable_logging(debug=True, stream=sys.stdout)
# get the connection to the
region_name = "RegionOne"
auth_url = "http://10.73.196.159:5000/v2.0"
project_name = "demo"
username = "demo"
passwor... | 26.72549 | 74 | 0.637564 |
f64bb2f111d4579927862540613c0debd02f8fa0 | 3,817 | py | Python | vilya/views/api/git.py | mubashshirjamal/code | d9c7adf7efed8e9c1ab3ff8cdeb94e7eb1a45382 | [
"BSD-3-Clause"
] | 1,582 | 2015-01-05T02:41:44.000Z | 2022-03-30T20:03:22.000Z | vilya/views/api/git.py | mubashshirjamal/code | d9c7adf7efed8e9c1ab3ff8cdeb94e7eb1a45382 | [
"BSD-3-Clause"
] | 66 | 2015-01-23T07:58:04.000Z | 2021-11-12T02:23:27.000Z | vilya/views/api/git.py | mubashshirjamal/code | d9c7adf7efed8e9c1ab3ff8cdeb94e7eb1a45382 | [
"BSD-3-Clause"
] | 347 | 2015-01-05T07:47:07.000Z | 2021-09-20T21:22:32.000Z | # coding: UTF-8
from __future__ import absolute_import
import json
import PyRSS2Gen as RSS2
from vilya.config import DOMAIN
from vilya.libs.reltime import compute_relative_time
from vilya.views.api.utils import jsonize
| 30.055118 | 75 | 0.530259 |
f64c6ab7f6e36bf7679b8e6652f68eaedb1efce2 | 3,237 | py | Python | source/tests/lineFollow_color_test.py | nikhilrj/CARDS | 509815f23c11881e6444308fa1014aed6a1af358 | [
"MIT"
] | null | null | null | source/tests/lineFollow_color_test.py | nikhilrj/CARDS | 509815f23c11881e6444308fa1014aed6a1af358 | [
"MIT"
] | null | null | null | source/tests/lineFollow_color_test.py | nikhilrj/CARDS | 509815f23c11881e6444308fa1014aed6a1af358 | [
"MIT"
] | null | null | null | import RPi.GPIO as GPIO
import sys,tty,termios,time
from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor
import atexit
import os
# create a default object, no changes to I2C address or frequency
mh = Adafruit_MotorHAT(addr=0x60)
# recommended for auto-disabling motors on shutdown!
atexit.register(turnOf... | 23.121429 | 120 | 0.697868 |
f64c8b2cad206f15a32b0791a1effdab5558a028 | 1,912 | py | Python | src/graph.py | kb2ma/nethead-ui | 950aa85806aa31e1d7857af8f933e75588c1fdc5 | [
"Apache-2.0"
] | null | null | null | src/graph.py | kb2ma/nethead-ui | 950aa85806aa31e1d7857af8f933e75588c1fdc5 | [
"Apache-2.0"
] | null | null | null | src/graph.py | kb2ma/nethead-ui | 950aa85806aa31e1d7857af8f933e75588c1fdc5 | [
"Apache-2.0"
] | null | null | null | import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
from app import app
from app import applog
from datetime import datetime
import json
import numpy as np
import pandas as pd
import plotly.express as px
import requests
"""Displays graph of time s... | 29.415385 | 88 | 0.605649 |
f64c8c0ad69d6d3faab6d5fe3c733e51363ca006 | 1,985 | py | Python | xprize_robojudge.py | anibalsolon/covid-xprize | cafc2c65c7e4f4184c16a1793da85371b6bc3218 | [
"Apache-2.0"
] | null | null | null | xprize_robojudge.py | anibalsolon/covid-xprize | cafc2c65c7e4f4184c16a1793da85371b6bc3218 | [
"Apache-2.0"
] | null | null | null | xprize_robojudge.py | anibalsolon/covid-xprize | cafc2c65c7e4f4184c16a1793da85371b6bc3218 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 (c) Cognizant Digital Business, Evolutionary AI. All rights reserved. Issued under the Apache 2.0 License.
import numpy as np
import pandas as pd
LATEST_DATA_URL = 'https://raw.githubusercontent.com/OxCGRT/covid-policy-tracker/master/data/OxCGRT_latest.csv'
LOCAL_DATA_URL = "tests/fixtures/OxCGRT_lat... | 43.152174 | 123 | 0.582872 |
f64c94177f64a2f9e4145e71f70d7ea87d65280f | 3,282 | py | Python | ooobuild/lo/frame/frame_action_event.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/frame/frame_action_event.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/frame/frame_action_event.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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... | 32.176471 | 221 | 0.666057 |
f64d006c79ff144996e84e5aa827cbb38d274052 | 4,446 | py | Python | actions/lib/bestfit.py | StackStorm-Exchange/manageiq | e94b3bb0f3d68fee4d749cee1b5d1d24012ffe81 | [
"Apache-2.0"
] | 1 | 2019-08-26T02:31:19.000Z | 2019-08-26T02:31:19.000Z | actions/lib/bestfit.py | StackStorm-Exchange/manageiq | e94b3bb0f3d68fee4d749cee1b5d1d24012ffe81 | [
"Apache-2.0"
] | 5 | 2018-09-27T16:51:18.000Z | 2020-09-25T18:06:05.000Z | actions/lib/bestfit.py | StackStorm-Exchange/manageiq | e94b3bb0f3d68fee4d749cee1b5d1d24012ffe81 | [
"Apache-2.0"
] | 2 | 2018-09-25T23:21:03.000Z | 2021-01-28T17:45:20.000Z | import base_action
import re
import json
| 39 | 95 | 0.593342 |
f64d45024fdca2b02f876052c1128c86faaa43e6 | 134 | py | Python | crypto/prime/admin.py | aberrier/crypto-api-back | 170014de1d4b7d8622e4e86d7bf75f6273d0f062 | [
"MIT"
] | null | null | null | crypto/prime/admin.py | aberrier/crypto-api-back | 170014de1d4b7d8622e4e86d7bf75f6273d0f062 | [
"MIT"
] | null | null | null | crypto/prime/admin.py | aberrier/crypto-api-back | 170014de1d4b7d8622e4e86d7bf75f6273d0f062 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Alert
# Register the Alert model in the admin panel
admin.site.register(Alert)
| 19.142857 | 45 | 0.798507 |
f64d4cb44725ca01b18c26fa31d360e83ae96dc0 | 622 | py | Python | tests/IOExpander.py | Footleg/rocky-rover-board | 83d2f7a75fe362304fbc54bf71b6cd89718098f6 | [
"MIT"
] | 1 | 2022-01-15T17:51:08.000Z | 2022-01-15T17:51:08.000Z | tests/IOExpander.py | Footleg/rocky-rover-board | 83d2f7a75fe362304fbc54bf71b6cd89718098f6 | [
"MIT"
] | null | null | null | tests/IOExpander.py | Footleg/rocky-rover-board | 83d2f7a75fe362304fbc54bf71b6cd89718098f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
""" Test case for the Footleg Robotics Sentinel robot controller board
Pulses all IO expander pins configured as outputs
"""
from time import sleep
import digitalio
from sentinelboard import SentinelHardware
sh = SentinelHardware()
# Set all pins as outputs, setting them LOW
for pin in ran... | 23.923077 | 70 | 0.686495 |
f64ef28d2932094a9e57197502304041dd4681ae | 882 | py | Python | airflow/upload.py | jordanparker6/coronva-virus | bd9ea4e8f3b9ebd193b5425bf4268bf6c0baf275 | [
"Apache-2.0"
] | 2 | 2020-05-09T06:45:38.000Z | 2020-06-01T21:50:27.000Z | airflow/upload.py | jordanparker6/coronva-virus | bd9ea4e8f3b9ebd193b5425bf4268bf6c0baf275 | [
"Apache-2.0"
] | 4 | 2021-03-10T11:46:52.000Z | 2022-02-27T01:33:20.000Z | airflow/upload.py | jordanparker6/COVID-19 | bd9ea4e8f3b9ebd193b5425bf4268bf6c0baf275 | [
"Apache-2.0"
] | null | null | null | import boto3, os
from datetime import datetime as dt
from botocore.client import Config
if __name__ == "__main__":
main() | 33.923077 | 79 | 0.600907 |
f64f0bf8607a8268530c54c53c865bb99234b740 | 491 | py | Python | k_road/entity/curb.py | NREL/K_Road | ec8049cf1b81c58dd3b95f8298a362d863cd4a68 | [
"BSD-3-Clause"
] | 1 | 2021-04-19T23:28:26.000Z | 2021-04-19T23:28:26.000Z | k_road/entity/curb.py | NREL/K_Road | ec8049cf1b81c58dd3b95f8298a362d863cd4a68 | [
"BSD-3-Clause"
] | null | null | null | k_road/entity/curb.py | NREL/K_Road | ec8049cf1b81c58dd3b95f8298a362d863cd4a68 | [
"BSD-3-Clause"
] | null | null | null | from typing import TYPE_CHECKING
from pymunk import Vec2d
from k_road.entity.entity_type import EntityType
from k_road.entity.linear_entity import LinearEntity
if TYPE_CHECKING:
from k_road.k_road_process import KRoadProcess
| 27.277778 | 109 | 0.733198 |
f64f2f22b9f3bcf769fdc52943788c73b7058eaa | 3,100 | py | Python | src/eduid_common/session/testing.py | SUNET/eduid-common | d666aec7e47e6b0ccb575d621bb6e9f40bcea4e4 | [
"BSD-3-Clause"
] | 1 | 2016-04-14T13:45:10.000Z | 2016-04-14T13:45:10.000Z | src/eduid_common/session/testing.py | SUNET/eduid-common | d666aec7e47e6b0ccb575d621bb6e9f40bcea4e4 | [
"BSD-3-Clause"
] | 16 | 2017-03-10T11:47:59.000Z | 2020-03-19T13:51:01.000Z | src/eduid_common/session/testing.py | SUNET/eduid-common | d666aec7e47e6b0ccb575d621bb6e9f40bcea4e4 | [
"BSD-3-Clause"
] | 3 | 2016-11-21T11:39:49.000Z | 2019-09-18T12:32:02.000Z | #
# Copyright (c) 2016 NORDUnet A/S
# Copyright (c) 2018 SUNET
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions of source code must retain the above copyright
# ... | 34.831461 | 91 | 0.671613 |
f65146c393969c774797935b3458611949f43a82 | 285 | py | Python | lectures/19-functional-ideas/examples/gematria2.py | mattmiller899/biosys-analytics | ab24a4c7206ed9a865e896daa57cee3c4e62df1f | [
"MIT"
] | 14 | 2019-07-14T08:29:04.000Z | 2022-03-07T06:33:26.000Z | lectures/19-functional-ideas/examples/gematria2.py | mattmiller899/biosys-analytics | ab24a4c7206ed9a865e896daa57cee3c4e62df1f | [
"MIT"
] | null | null | null | lectures/19-functional-ideas/examples/gematria2.py | mattmiller899/biosys-analytics | ab24a4c7206ed9a865e896daa57cee3c4e62df1f | [
"MIT"
] | 33 | 2019-01-05T17:03:47.000Z | 2019-11-11T20:48:24.000Z | #!/usr/bin/env python3
import os
import sys
args = sys.argv[1:]
if len(args) != 1:
print('Usage: {} WORD'.format(os.path.basename(sys.argv[0])))
sys.exit(1)
word = args[0]
number = 0
for letter in word:
number += ord(letter)
print('"{}" = "{}"'.format(word, number))
| 15 | 65 | 0.603509 |
f653d42bc6c243aed7bff8e1f420a4f32e076ef4 | 1,113 | py | Python | setup.py | andreped/livermask | 4bfc3dd858fc8ed6ee87468458cae7a4736e1551 | [
"MIT"
] | 38 | 2020-02-11T08:34:33.000Z | 2022-03-24T10:54:48.000Z | setup.py | andreped/livermask | 4bfc3dd858fc8ed6ee87468458cae7a4736e1551 | [
"MIT"
] | 9 | 2020-02-06T22:49:21.000Z | 2022-01-31T12:27:52.000Z | setup.py | andreped/livermask | 4bfc3dd858fc8ed6ee87468458cae7a4736e1551 | [
"MIT"
] | 6 | 2020-02-29T16:01:11.000Z | 2021-11-04T10:27:36.000Z | import setuptools
with open("README.md", "r") as f:
long_description = f.read()
with open('requirements.txt', 'r', encoding='utf-16') as ff:
required = ff.read().splitlines()
setuptools.setup(
name='livermask',
version='1.2.0',
author="Andr Pedersen",
author_email="andrped94@gmail.com",... | 30.916667 | 78 | 0.619946 |
f654fd291c8b54b41d59a2fb5e8750235276c4ea | 1,039 | py | Python | pycontrol/libcpu/discovery.py | Velko/8-bit-CPU | 30cab1bd157da01149898607a5c1a15961b56294 | [
"MIT"
] | 7 | 2021-02-22T19:29:35.000Z | 2022-03-27T23:17:04.000Z | pycontrol/libcpu/discovery.py | Velko/8-bit-CPU | 30cab1bd157da01149898607a5c1a15961b56294 | [
"MIT"
] | 8 | 2021-01-05T19:08:24.000Z | 2021-08-16T20:50:13.000Z | pycontrol/libcpu/discovery.py | Velko/8-bit-CPU | 30cab1bd157da01149898607a5c1a15961b56294 | [
"MIT"
] | null | null | null | import sys
from typing import Iterator, Tuple
from .pin import PinBase, Pin, MuxPin, Mux
from . import DeviceSetup | 37.107143 | 128 | 0.623677 |
f65533e82f38d22c049fe300eaa8d9c21a02aaae | 749 | py | Python | tests/apis/test_yara.py | ninoseki/uzen | 93726f22f43902e17b22dd36142dac05171d0d84 | [
"MIT"
] | 76 | 2020-02-27T06:36:27.000Z | 2022-03-10T20:18:03.000Z | tests/apis/test_yara.py | ninoseki/uzen | 93726f22f43902e17b22dd36142dac05171d0d84 | [
"MIT"
] | 33 | 2020-03-13T02:04:14.000Z | 2022-03-04T02:06:11.000Z | tests/apis/test_yara.py | ninoseki/uzen | 93726f22f43902e17b22dd36142dac05171d0d84 | [
"MIT"
] | 6 | 2020-03-17T16:42:25.000Z | 2021-04-27T06:35:46.000Z | import asyncio
import pytest
from fastapi.testclient import TestClient
| 29.96 | 78 | 0.715621 |
f65616e8ab785eb5bbe6be4380ea358255ea489d | 323 | py | Python | test/normalizer_issue_files/E21.py | bryanforbes/parso | 93206f6eba3fe29a200c328c11535e58c56e9635 | [
"PSF-2.0"
] | 6,989 | 2017-07-18T06:23:18.000Z | 2022-03-31T15:58:36.000Z | test/normalizer_issue_files/E21.py | bryanforbes/parso | 93206f6eba3fe29a200c328c11535e58c56e9635 | [
"PSF-2.0"
] | 1,978 | 2017-07-18T09:17:58.000Z | 2022-03-31T14:28:43.000Z | test/normalizer_issue_files/E21.py | bryanforbes/parso | 93206f6eba3fe29a200c328c11535e58c56e9635 | [
"PSF-2.0"
] | 1,228 | 2017-07-18T09:03:13.000Z | 2022-03-29T05:57:40.000Z | #: E211:4
spam (1)
#: E211:4 E211:19
dict ['key'] = list [index]
#: E211:11
dict['key'] ['subkey'] = list[index]
# Okay
spam(1)
dict['key'] = list[index]
# This is not prohibited by PEP8, but avoid it.
# Dave: I think this is extremely stupid. Use the same convention everywhere.
#: E211:9
| 19 | 77 | 0.647059 |
f6564c3aa86d6886e8b682e54e0af816a7485bc7 | 834 | py | Python | migdb/forms.py | roundium/migdb | b855b4126d614176913b453004f444af6b13c8a4 | [
"MIT"
] | 1 | 2019-07-31T11:33:55.000Z | 2019-07-31T11:33:55.000Z | migdb/forms.py | roundium/migdb | b855b4126d614176913b453004f444af6b13c8a4 | [
"MIT"
] | 6 | 2019-12-04T23:56:56.000Z | 2021-06-10T18:42:08.000Z | migdb/forms.py | roundium/migdb | b855b4126d614176913b453004f444af6b13c8a4 | [
"MIT"
] | 2 | 2019-07-31T11:40:31.000Z | 2019-08-05T17:11:17.000Z | from django import forms
# if you wanto add more actions add them here.
ACTIONS = (
("nochange", "No Change"),
("rename", "Rename"),
("format", "Format"),
("format_rename", "Format And Rename"),
("delete", "Delete"),
)
| 32.076923 | 68 | 0.707434 |
f656ca916c5e4b551ec247056d8e8cd69797a168 | 576 | py | Python | src/text/text_clean/rm_biaodian.py | TongtongSong/tools | 598417a018ab01b8dcda7fdbce118ce261246ea3 | [
"Apache-2.0"
] | null | null | null | src/text/text_clean/rm_biaodian.py | TongtongSong/tools | 598417a018ab01b8dcda7fdbce118ce261246ea3 | [
"Apache-2.0"
] | null | null | null | src/text/text_clean/rm_biaodian.py | TongtongSong/tools | 598417a018ab01b8dcda7fdbce118ce261246ea3 | [
"Apache-2.0"
] | null | null | null | import re
import sys
#!/bin/env python
import sys
import re
if len(sys.argv) != 1:
print >>sys.stderr,"%s < in > out"%(__file__)
sys.exit(1)
for line in sys.stdin:
#
zh_patt = u'[\u4e00-\u9fa5]'
#
en_patt = u'[A-Za-z]'
src_word_list = []
for word in line.strip().split(' '):
... | 20.571429 | 49 | 0.581597 |
f657d3da0f2df7785004ba54e89b91a1863dc311 | 2,343 | py | Python | king.py | iamaris/pystock | 864f8beba0cf50a7a4f52bf7c67e83fdfd774a9c | [
"Apache-2.0"
] | null | null | null | king.py | iamaris/pystock | 864f8beba0cf50a7a4f52bf7c67e83fdfd774a9c | [
"Apache-2.0"
] | null | null | null | king.py | iamaris/pystock | 864f8beba0cf50a7a4f52bf7c67e83fdfd774a9c | [
"Apache-2.0"
] | null | null | null | import urllib
import pandas as pd
import pandas.io.data as web
from datetime import datetime
import matplotlib.pyplot as plt
import pickle as pk
znga = web.DataReader("ZNGA", "yahoo", datetime(2009,1,1))
gluu = web.DataReader("GLUU", "yahoo", datetime(2009,1,1))
vix = web.DataReader("^vix", "yahoo", datetime(2009,1,1)... | 33 | 102 | 0.638498 |
f659b0d045cb305375adfbb54ef5b317d1bd67ed | 8,327 | py | Python | system.py | Attachment-Studios/PackedBerry | cb1d47c00cce8d31d6d1e95b1ec2deb330a184e0 | [
"CNRI-Python"
] | null | null | null | system.py | Attachment-Studios/PackedBerry | cb1d47c00cce8d31d6d1e95b1ec2deb330a184e0 | [
"CNRI-Python"
] | null | null | null | system.py | Attachment-Studios/PackedBerry | cb1d47c00cce8d31d6d1e95b1ec2deb330a184e0 | [
"CNRI-Python"
] | null | null | null | # PackedBerry System
import requests
import random
import os
import youtubesearchpython
vfile = open("data/version", "r")
version = vfile.read()
vfile.close()
hfile = open("data/help", "r")
help_data = hfile.read()
hfile.close()
wfile = open("data/whatsnew", "r")
whatsnew = wfile.read()
wfile.close()
| 29.424028 | 185 | 0.549418 |
f65a7ec7b72b3e226df57c1b794a36c6fc4b224e | 179 | py | Python | mapry/__main__.py | Parquery/mapry | 93515307f9eba8447fe64b0ac7cc68b2d07205a7 | [
"MIT"
] | 11 | 2019-06-26T05:56:41.000Z | 2021-03-28T16:44:16.000Z | mapry/__main__.py | Parquery/mapry | 93515307f9eba8447fe64b0ac7cc68b2d07205a7 | [
"MIT"
] | 4 | 2019-10-18T14:43:59.000Z | 2020-04-02T19:12:07.000Z | mapry/__main__.py | Parquery/mapry | 93515307f9eba8447fe64b0ac7cc68b2d07205a7 | [
"MIT"
] | 3 | 2019-06-17T07:39:03.000Z | 2020-04-01T14:01:23.000Z | """Link to ``mapry.main`` so that you can execute it with ``python`` CLI."""
import sys
import mapry.main
if __name__ == "__main__":
sys.exit(mapry.main.run(prog="mapry"))
| 19.888889 | 76 | 0.664804 |
f65ac0eedabd1229f3ef273bd194acbc19de95ce | 260 | py | Python | December-05/python_kamali1511_csvtohtml.py | subinvelleringatt/A-December-of-Algorithms-2019 | 504e4a688726ce92e1414114ebace5ea1fc9ece7 | [
"MIT"
] | 228 | 2019-11-20T12:57:05.000Z | 2021-12-09T03:35:09.000Z | December-05/python_kamali1511_csvtohtml.py | subinvelleringatt/A-December-of-Algorithms-2019 | 504e4a688726ce92e1414114ebace5ea1fc9ece7 | [
"MIT"
] | 29 | 2019-11-30T14:19:43.000Z | 2020-01-17T17:38:28.000Z | December-05/python_kamali1511_csvtohtml.py | subinvelleringatt/A-December-of-Algorithms-2019 | 504e4a688726ce92e1414114ebace5ea1fc9ece7 | [
"MIT"
] | 188 | 2019-11-27T14:29:55.000Z | 2021-12-25T02:18:29.000Z | import pandas
csv_location = 'C:\\Users\\KAMALI\\Documents\\ACM.csv'
html_location = 'C:\\Users\\KAMALI\\Desktop\\table.html'
dfObj = pandas.read_csv(csv_location)
htmlData = dfObj.to_html()
with open(html_location, 'w') as infile:
infile.write(htmlData)
| 21.666667 | 56 | 0.738462 |
f65acd232e8fbfd6fb6fb9d47b48f78f7cfaabe4 | 2,623 | py | Python | tests/test_modules/test_system/test_iociconpart.py | hir12111/pymalcolm | 689542711ff903ee99876c40fc0eae8015e13314 | [
"Apache-2.0"
] | 11 | 2016-10-04T23:11:39.000Z | 2022-01-25T15:44:43.000Z | tests/test_modules/test_system/test_iociconpart.py | hir12111/pymalcolm | 689542711ff903ee99876c40fc0eae8015e13314 | [
"Apache-2.0"
] | 153 | 2016-06-01T13:31:02.000Z | 2022-03-31T11:17:18.000Z | tests/test_modules/test_system/test_iociconpart.py | hir12111/pymalcolm | 689542711ff903ee99876c40fc0eae8015e13314 | [
"Apache-2.0"
] | 16 | 2016-06-10T13:45:27.000Z | 2020-10-24T13:45:04.000Z | import os
import unittest
from mock import ANY, patch
from malcolm.core import Context, Process, StringMeta
from malcolm.modules.ca.util import catools
from malcolm.modules.scanning.controllers import RunnableController
from malcolm.modules.system.parts import IocIconPart
defaultIcon = ""
with open(
os.path.spli... | 28.51087 | 88 | 0.629813 |
f65c06725e5ddb8fb4ebfd63d95e68a494b80930 | 416 | py | Python | aiida_mock_codes/_env_keys.py | greschd/aiida-mock-codes | 004e0ca603899eabe57f2768812e9459d3e0e5a9 | [
"Apache-2.0"
] | null | null | null | aiida_mock_codes/_env_keys.py | greschd/aiida-mock-codes | 004e0ca603899eabe57f2768812e9459d3e0e5a9 | [
"Apache-2.0"
] | 1 | 2020-11-28T21:03:55.000Z | 2020-11-30T12:40:45.000Z | aiida_mock_codes/_env_keys.py | greschd/aiida-mock-codes | 004e0ca603899eabe57f2768812e9459d3e0e5a9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Defines the environment variable names for the mock code execution.
"""
from enum import Enum
| 23.111111 | 67 | 0.706731 |
f65d05ee6da3acc0082713c25be1c98fa8f80dcf | 763 | py | Python | Chapter03/Chapter3_sniifing/Chapter3_sniifing/Chapter_3_programs/arpspex.py | kaisaryousuf/Python-Penetration-Testing-Essentials-Second-Edition | f2a666b62826b4adc334a8e69ccbfe20b5cf12c2 | [
"MIT"
] | 18 | 2018-06-04T08:27:25.000Z | 2022-02-24T02:08:51.000Z | Chapter03/Chapter3_sniifing/Chapter3_sniifing/Chapter_3_programs/arpspex.py | kaisaryousuf/Python-Penetration-Testing-Essentials-Second-Edition | f2a666b62826b4adc334a8e69ccbfe20b5cf12c2 | [
"MIT"
] | null | null | null | Chapter03/Chapter3_sniifing/Chapter3_sniifing/Chapter_3_programs/arpspex.py | kaisaryousuf/Python-Penetration-Testing-Essentials-Second-Edition | f2a666b62826b4adc334a8e69ccbfe20b5cf12c2 | [
"MIT"
] | 11 | 2018-04-12T00:43:49.000Z | 2022-03-13T18:24:55.000Z | import socket
import struct
import binascii
s = socket.socket(socket.PF_PACKET, socket.SOCK_RAW, socket.ntohs(0x0800))
s.bind(("eth0",socket.htons(0x0800)))
sor = '\x00\x0c\x29\x4f\x8e\x35'
victmac ='\x88\x53\x2e\x0a\x75\x3f'
gatemac = '\x84\x1b\x5e\x50\xc8\x6e'
code ='\x08\x06'
eth1 = victmac+sor+code #for victim
e... | 21.194444 | 74 | 0.711664 |
f65e003ea60103b50a34da17a8e176a9ae7573bb | 2,049 | py | Python | sentiments_in_political_speeches/main.py | Jana-Z/sentiments_in_german_political_speeches | 4ef558c5872202a7899c660b3e600c165f3a6ce2 | [
"MIT"
] | null | null | null | sentiments_in_political_speeches/main.py | Jana-Z/sentiments_in_german_political_speeches | 4ef558c5872202a7899c660b3e600c165f3a6ce2 | [
"MIT"
] | null | null | null | sentiments_in_political_speeches/main.py | Jana-Z/sentiments_in_german_political_speeches | 4ef558c5872202a7899c660b3e600c165f3a6ce2 | [
"MIT"
] | null | null | null | import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import collections
from itertools import cycle, islice
from readability import plotter as read
import speeches
from emotions import data
from emotions import stemmer
from emotions import calculator
from plotting import emotions_plott... | 31.523077 | 96 | 0.674963 |
f65e8499d1c5b6cd15665f571e02ba58033f1920 | 4,749 | py | Python | test/test_pipeline.py | MilesCranmer/bifrost | 951dd4a449850d22cfd74f4db13ecf806fe5cc30 | [
"BSD-3-Clause"
] | 1 | 2017-06-27T10:12:44.000Z | 2017-06-27T10:12:44.000Z | test/test_pipeline.py | MilesCranmer/bifrost | 951dd4a449850d22cfd74f4db13ecf806fe5cc30 | [
"BSD-3-Clause"
] | null | null | null | test/test_pipeline.py | MilesCranmer/bifrost | 951dd4a449850d22cfd74f4db13ecf806fe5cc30 | [
"BSD-3-Clause"
] | null | null | null |
# Copyright (c) 2016, The Bifrost Authors. All rights reserved.
# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must r... | 43.172727 | 73 | 0.730891 |
f66035f56d78b423d31ea48cacdd05224e0feb79 | 1,311 | py | Python | snakypy/zshpower/prompt/sections/hostname.py | williamcanin/zshpower | 797533b60cd7f9dbd8cf2162db9a19d970a7be33 | [
"MIT"
] | 10 | 2020-04-03T20:39:44.000Z | 2021-12-09T22:26:56.000Z | snakypy/zshpower/prompt/sections/hostname.py | williamcanin/zshpower | 797533b60cd7f9dbd8cf2162db9a19d970a7be33 | [
"MIT"
] | 9 | 2021-05-15T13:26:48.000Z | 2021-11-15T07:03:00.000Z | snakypy/zshpower/prompt/sections/hostname.py | williamcanin/zshpower | 797533b60cd7f9dbd8cf2162db9a19d970a7be33 | [
"MIT"
] | 2 | 2020-04-22T08:50:11.000Z | 2021-06-23T05:03:02.000Z | from os import environ as os_environ
from socket import gethostname
from snakypy.zshpower.utils.catch import get_key
from .utils import Color, element_spacing, symbol_ssh
| 34.5 | 83 | 0.592677 |