hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a41089c49435a2064c9c78cdd2d52364cce44984 | 127 | py | Python | textHandler/tests.py | surajsjain/social-media-analytics-app | 1f310dcf2f79c9f80edee80dd59d8c63f827f04a | [
"MIT"
] | null | null | null | textHandler/tests.py | surajsjain/social-media-analytics-app | 1f310dcf2f79c9f80edee80dd59d8c63f827f04a | [
"MIT"
] | 8 | 2020-06-05T20:49:10.000Z | 2022-02-10T00:37:59.000Z | textHandler/tests.py | surajsjain/social-media-analytics-app | 1f310dcf2f79c9f80edee80dd59d8c63f827f04a | [
"MIT"
] | 3 | 2020-01-26T10:48:25.000Z | 2020-08-25T17:47:54.000Z | version https://git-lfs.github.com/spec/v1
oid sha256:9ab6c6191360e63c1b4c9b5659aef348a743c9e078be68190917369e4e9563e8
size 60
| 31.75 | 75 | 0.88189 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a4109a9f5fcfaf5a3730a40e38d6e3b2c4713fea | 1,167 | py | Python | vizsgaremek/test_con_feed_list.py | boat83/conduit | eaef1c9f34dc7909f42022237815b37405e1885c | [
"MIT"
] | 1 | 2021-08-16T15:37:15.000Z | 2021-08-16T15:37:15.000Z | vizsgaremek/test_con_feed_list.py | boat83/conduit | eaef1c9f34dc7909f42022237815b37405e1885c | [
"MIT"
] | null | null | null | vizsgaremek/test_con_feed_list.py | boat83/conduit | eaef1c9f34dc7909f42022237815b37405e1885c | [
"MIT"
] | null | null | null | def test_con_feed_list():
from selenium import webdriver
import time
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
opt = Options()
opt.headless = True
driver = webdriver.Chrome(ChromeDriverManager().install(), options=opt)
... | 33.342857 | 110 | 0.689803 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 334 | 0.286204 |
a4119e1240314b1bbd0685ee534363309959e324 | 476 | py | Python | d3dshot/capture_outputs/pytorch_float_capture_output.py | Hualin-Peng/D3DShot | a506e1b3ab4effb49af5cc171fc87822a48b3ba9 | [
"MIT"
] | 238 | 2019-04-04T16:15:45.000Z | 2022-03-30T06:47:47.000Z | d3dshot/capture_outputs/pytorch_float_capture_output.py | Hualin-Peng/D3DShot | a506e1b3ab4effb49af5cc171fc87822a48b3ba9 | [
"MIT"
] | 51 | 2019-05-02T13:22:53.000Z | 2022-01-05T16:15:55.000Z | d3dshot/capture_outputs/pytorch_float_capture_output.py | Hualin-Peng/D3DShot | a506e1b3ab4effb49af5cc171fc87822a48b3ba9 | [
"MIT"
] | 41 | 2019-04-04T20:41:19.000Z | 2022-02-26T09:26:03.000Z | import numpy as np
from PIL import Image
from d3dshot.capture_outputs.pytorch_capture_output import PytorchCaptureOutput
class PytorchFloatCaptureOutput(PytorchCaptureOutput):
def process(self, pointer, pitch, size, width, height, region, rotation):
image = super().process(pointer, pitch, size, width, h... | 31.733333 | 86 | 0.737395 | 350 | 0.735294 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a413259a60fc0a267d12007e28ed945f8488cc02 | 1,359 | py | Python | todolistapi/authentication/tests/test_models.py | yaswanthsaivendra/django_projects | 9c4b3511d32eb3bfd0825480a5dd021bd865b16b | [
"MIT"
] | 3 | 2021-11-08T18:26:26.000Z | 2021-12-11T18:30:50.000Z | todolistapi/authentication/tests/test_models.py | yaswanthsaivendra/django_projects | 9c4b3511d32eb3bfd0825480a5dd021bd865b16b | [
"MIT"
] | null | null | null | todolistapi/authentication/tests/test_models.py | yaswanthsaivendra/django_projects | 9c4b3511d32eb3bfd0825480a5dd021bd865b16b | [
"MIT"
] | null | null | null | from rest_framework.test import APITestCase
from authentication.models import User
class TestModel(APITestCase):
def test_creates_user(self):
user=User.objects.create_user('username', 'user@gmail.com','password1!')
self.assertIsInstance(user,User)
def test_creates_superuser(self):
us... | 50.333333 | 129 | 0.754231 | 1,274 | 0.937454 | 0 | 0 | 0 | 0 | 0 | 0 | 282 | 0.207506 |
a415d7f8c6ee5c2c5870dba7dac2e114a845b4a4 | 1,395 | py | Python | app/models.py | herrkrebs/udacity-full-stack-web-developer-nanodegree-project-3-movie-catalog | d08947f7b0304d2e026e6a678b1197951e62137e | [
"MIT"
] | null | null | null | app/models.py | herrkrebs/udacity-full-stack-web-developer-nanodegree-project-3-movie-catalog | d08947f7b0304d2e026e6a678b1197951e62137e | [
"MIT"
] | null | null | null | app/models.py | herrkrebs/udacity-full-stack-web-developer-nanodegree-project-3-movie-catalog | d08947f7b0304d2e026e6a678b1197951e62137e | [
"MIT"
] | null | null | null | # Contains the domain models of the application
from flask_login import UserMixin
from . import db, login_manager
class Genre(db.Model):
__tablename__ = 'genre'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(250), unique=True)
movies = db.relationship('Movie', back_populate... | 25.363636 | 71 | 0.632258 | 1,187 | 0.850896 | 0 | 0 | 462 | 0.331183 | 0 | 0 | 161 | 0.115412 |
a41ba8d2cbc5f6d76cae7b7cd03a312bdb6d6150 | 1,046 | py | Python | payment/migrations/0010_auto__del_field_paymentpackage_name.py | rif/conference-registration | 2e83e98d68eff5c8ab6ae3a79db910e2e81c58ae | [
"BSD-3-Clause"
] | null | null | null | payment/migrations/0010_auto__del_field_paymentpackage_name.py | rif/conference-registration | 2e83e98d68eff5c8ab6ae3a79db910e2e81c58ae | [
"BSD-3-Clause"
] | null | null | null | payment/migrations/0010_auto__del_field_paymentpackage_name.py | rif/conference-registration | 2e83e98d68eff5c8ab6ae3a79db910e2e81c58ae | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'PaymentPackage.name'
db.delete_column('payment_paymentpackage', 'name')
def backwa... | 32.6875 | 117 | 0.624283 | 920 | 0.879541 | 0 | 0 | 0 | 0 | 0 | 0 | 550 | 0.525813 |
a41de5ab5171eca7eae4d7454bfa62824f7a06f5 | 15,529 | py | Python | eth_wallet/ui/gui.py | jgotanegra/wallet | cc746de4123eefef5c3148120593151536e381ef | [
"MIT"
] | 15 | 2019-05-01T06:21:41.000Z | 2021-12-31T10:18:51.000Z | eth_wallet/ui/gui.py | jackyjqcheung/eth-wallet | cc746de4123eefef5c3148120593151536e381ef | [
"MIT"
] | 17 | 2019-04-17T16:24:59.000Z | 2021-11-06T04:14:57.000Z | eth_wallet/ui/gui.py | jackyjqcheung/eth-wallet | cc746de4123eefef5c3148120593151536e381ef | [
"MIT"
] | 8 | 2019-05-03T14:56:47.000Z | 2022-01-14T14:08:25.000Z | import threading
from tkinter import (
Tk,
Frame,
Label,
Button,
Entry,
Message,
CENTER,
Menu,
Menubutton,
StringVar,
RAISED,
messagebox,
)
from eth_wallet.configuration import (
Configuration,
)
from eth_wallet.api import (
WalletAPI,
)
from eth_wallet.ui.page im... | 34.662946 | 98 | 0.458883 | 14,956 | 0.963101 | 0 | 0 | 0 | 0 | 0 | 0 | 1,297 | 0.083521 |
a420b5f8c2547bd492b541121354ca50d503baab | 10,273 | py | Python | code/palmnet/core/layer_replacer.py | lucgiffon/psm-nets | dec43c26281febf6e5c8b8f42bfb78098ae7101d | [
"MIT"
] | 1 | 2021-07-15T07:05:18.000Z | 2021-07-15T07:05:18.000Z | code/palmnet/core/layer_replacer.py | lucgiffon/psm-nets | dec43c26281febf6e5c8b8f42bfb78098ae7101d | [
"MIT"
] | 2 | 2021-07-15T06:12:47.000Z | 2021-07-16T10:05:36.000Z | code/palmnet/core/layer_replacer.py | lucgiffon/psm-nets | dec43c26281febf6e5c8b8f42bfb78098ae7101d | [
"MIT"
] | null | null | null | from abc import abstractmethod, ABCMeta
import pickle
import keras
# from self.keras_module.models import Model
# from self.keras_module.layers import InputLayer
# from self.keras_module.layers import Dense, Conv2D
from palmnet.core.palminizable import Palminizable
from palmnet.utils import get_idx_last_layer_of_class... | 44.280172 | 180 | 0.682566 | 9,819 | 0.955806 | 0 | 0 | 985 | 0.095882 | 0 | 0 | 2,346 | 0.228366 |
a422fb3416879c75a86139388d6af9e719ed842b | 1,469 | py | Python | kivyoav/emotion_feedback.py | yglazner/guess_the_bless | 99176759b3f3fb6a4fe0b4d32f70be582a0640af | [
"MIT"
] | 1 | 2017-07-18T10:25:43.000Z | 2017-07-18T10:25:43.000Z | kivyoav/emotion_feedback.py | yglazner/guess_the_bless | 99176759b3f3fb6a4fe0b4d32f70be582a0640af | [
"MIT"
] | null | null | null | kivyoav/emotion_feedback.py | yglazner/guess_the_bless | 99176759b3f3fb6a4fe0b4d32f70be582a0640af | [
"MIT"
] | null | null | null | '''
Created on Jun 29, 2017
@author: yglazner
'''
from kivy.uix.widget import Widget
from kivy.properties import *
from kivy.uix.boxlayout import BoxLayout
from kivy.base import runTouchApp
from kivy.uix.slider import Slider
Slider
class EmotionFeedBack(Widget):
'''
EmotionFeedBack - a widget that lets the use... | 28.25 | 92 | 0.607897 | 1,164 | 0.792376 | 0 | 0 | 79 | 0.053778 | 0 | 0 | 238 | 0.162015 |
a4233cffbf5beccc2cc2ebc7c2720114c2cce820 | 1,793 | py | Python | solutions/day12/test_lib.py | benjaminarjun/AdventOfCode2020 | b9ca2f5c6121c401eb79911dbbbd0d3188f38034 | [
"MIT"
] | 1 | 2020-12-04T17:57:24.000Z | 2020-12-04T17:57:24.000Z | solutions/day12/test_lib.py | benjaminarjun/AdventOfCode2020 | b9ca2f5c6121c401eb79911dbbbd0d3188f38034 | [
"MIT"
] | null | null | null | solutions/day12/test_lib.py | benjaminarjun/AdventOfCode2020 | b9ca2f5c6121c401eb79911dbbbd0d3188f38034 | [
"MIT"
] | null | null | null | import unittest
from .results import NavInstruction, Position, Ship
class TestNavInstruction(unittest.TestCase):
def test_nav_instruction_from_str(self):
instr_str = 'F10'
instr = NavInstruction.from_str(instr_str)
self.assertEqual('F', instr.direction)
self.assertEqual(10, instr.... | 24.902778 | 53 | 0.597323 | 1,716 | 0.957055 | 0 | 0 | 199 | 0.110987 | 0 | 0 | 37 | 0.020636 |
a4239e95f4d189e6430c6fd1dbf406378ad3126c | 4,507 | py | Python | scripts used in article/clustering_evaluation.py | BoyanZhou/starstr | 03280b0b280ef5be351b7ff285e90541baed3d63 | [
"Apache-2.0"
] | null | null | null | scripts used in article/clustering_evaluation.py | BoyanZhou/starstr | 03280b0b280ef5be351b7ff285e90541baed3d63 | [
"Apache-2.0"
] | 1 | 2018-09-06T16:50:46.000Z | 2018-09-06T16:50:46.000Z | scripts used in article/clustering_evaluation.py | BoyanZhou/starstr | 03280b0b280ef5be351b7ff285e90541baed3d63 | [
"Apache-2.0"
] | null | null | null | import sys
import numpy as np
A = int(sys.argv[2]) # start of the tree threshold
B = int(sys.argv[3]) # end of the tree threshold
N = int(sys.argv[1]) # repeat number now
threshold_list = [i/1000.0 for i in range(A, B)]
# compare cluster result with the nwk_tree
for i in threshold_list:
branch_length_thre... | 38.194915 | 103 | 0.652319 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 864 | 0.191702 |
a423ebdcfa4aac7d6ec8a3988d72013b56326556 | 236 | py | Python | celery/worker_a/__init__.py | tim-barnes/lang-python | 3dbbc7f38cec598e32bd1a06827246dcab3a0ced | [
"MIT"
] | 1 | 2021-06-16T23:43:27.000Z | 2021-06-16T23:43:27.000Z | celery/worker_a/__init__.py | tim-barnes/lang-python | 3dbbc7f38cec598e32bd1a06827246dcab3a0ced | [
"MIT"
] | null | null | null | celery/worker_a/__init__.py | tim-barnes/lang-python | 3dbbc7f38cec598e32bd1a06827246dcab3a0ced | [
"MIT"
] | null | null | null | from celery import Celery
app = Celery(__name__, broker="redis://redis//")
# app.conf.task_routes = {
# 'worker_a.pulse': {'queue': 'worker_a'}
# }
@app.task
def pulse(i):
print(f"Pulse: {i} ({__name__})")
return i + 1000
| 19.666667 | 48 | 0.618644 | 0 | 0 | 0 | 0 | 81 | 0.34322 | 0 | 0 | 117 | 0.495763 |
a4254aa2b6ed63ccd6175aec14c799cb09949454 | 960 | py | Python | main.py | MobinNesari81/Syquation_Solver | 9bfa5963d6ecdf0a529603daaee56900dc4b60a9 | [
"MIT"
] | 1 | 2022-01-11T13:39:26.000Z | 2022-01-11T13:39:26.000Z | main.py | MobinNesari81/Syquation_Solver | 9bfa5963d6ecdf0a529603daaee56900dc4b60a9 | [
"MIT"
] | null | null | null | main.py | MobinNesari81/Syquation_Solver | 9bfa5963d6ecdf0a529603daaee56900dc4b60a9 | [
"MIT"
] | null | null | null | # Main file which solve equation
import processor
coefficient_rows = int(input("Please enter coefficient matrix row numbers: "))
coefficient_columns = int(input("Please enter coefficient matrix column numbers: "))
coefficient_matrix = [[] for _ in range(coefficient_rows)]
print("Please enter coefficients in one row the... | 48 | 84 | 0.760417 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 306 | 0.31875 |
a42671651e3b71dc6f8347faea546f685c85f61f | 9,000 | py | Python | falcon_heavy/core/types/formats.py | NotJustAToy/falcon-heavy | 2e96f649daafc2707a01e38f403f1ce4268f4629 | [
"Apache-2.0"
] | 21 | 2020-01-02T10:44:42.000Z | 2022-02-11T14:27:05.000Z | falcon_heavy/core/types/formats.py | NotJustAToy/falcon-heavy | 2e96f649daafc2707a01e38f403f1ce4268f4629 | [
"Apache-2.0"
] | 2 | 2020-02-13T21:06:56.000Z | 2020-09-27T16:47:25.000Z | falcon_heavy/core/types/formats.py | NotJustAToy/falcon-heavy | 2e96f649daafc2707a01e38f403f1ce4268f4629 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2020 Not Just A Toy Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 26.162791 | 111 | 0.613333 | 7,435 | 0.826111 | 0 | 0 | 0 | 0 | 0 | 0 | 1,823 | 0.202556 |
a4292f81184da60467cc60d71bcf08055c6aed74 | 1,008 | py | Python | Desafio086 & 87 - Matriz 3x3.py | tmoura1981/Python_Exercicios | c873e2758dfd9058d2c2d83b5b38b522c6264029 | [
"MIT"
] | 1 | 2021-11-25T11:19:59.000Z | 2021-11-25T11:19:59.000Z | Desafio086 & 87 - Matriz 3x3.py | tmoura1981/Python_Exercicios | c873e2758dfd9058d2c2d83b5b38b522c6264029 | [
"MIT"
] | null | null | null | Desafio086 & 87 - Matriz 3x3.py | tmoura1981/Python_Exercicios | c873e2758dfd9058d2c2d83b5b38b522c6264029 | [
"MIT"
] | null | null | null | valores = [[], [], [],
[], [], [],
[], [], []]
num = linha = coluna = pos = soma = soma_ter_col = maior = 0
titulo = 'Matriz 3x3'
print(titulo.center(50, '='))
for v in range(9): # 9 valores da matriz
num = int(input(f'Linha[{linha}] Coluna[{coluna}]: '))
valores[pos].append(num)
po... | 37.333333 | 91 | 0.529762 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 492 | 0.483301 |
a42c0be3c130f39da6d363c285104e88b9933080 | 911 | py | Python | dags/word_count_dag.py | firasesbai/airflow-spark-jobs | 1925a20c212185843fcfb4c9349419bf8c418662 | [
"Apache-2.0"
] | null | null | null | dags/word_count_dag.py | firasesbai/airflow-spark-jobs | 1925a20c212185843fcfb4c9349419bf8c418662 | [
"Apache-2.0"
] | null | null | null | dags/word_count_dag.py | firasesbai/airflow-spark-jobs | 1925a20c212185843fcfb4c9349419bf8c418662 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from airflow.models import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.providers.apache.spark.operators.spark_submit import SparkSubmitOperator
spark_master = "spark://spark-master:7077"
input_path = "/usr/local/spark/data/ebook"
now = datetime.now()
wit... | 27.606061 | 85 | 0.706915 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 212 | 0.232711 |
a42c53b95de25e5c3963b4ce490f26df00cbe658 | 1,446 | py | Python | faker/providers/phone_number/en_NG/__init__.py | djunehor/faker-1 | e478c437fe3c05b02b7deffa43252f622ea45732 | [
"MIT"
] | null | null | null | faker/providers/phone_number/en_NG/__init__.py | djunehor/faker-1 | e478c437fe3c05b02b7deffa43252f622ea45732 | [
"MIT"
] | null | null | null | faker/providers/phone_number/en_NG/__init__.py | djunehor/faker-1 | e478c437fe3c05b02b7deffa43252f622ea45732 | [
"MIT"
] | null | null | null | # coding=utf-8
from __future__ import unicode_literals
from .. import Provider as PhoneNumberProvider
class Provider(PhoneNumberProvider):
formats = (
# National & Mobile dialing
'0{{area_code}}#######',
'0{{area_code}} ### ####',
'0{{area_code}}-###-####',
# International ... | 24.508475 | 68 | 0.45574 | 1,341 | 0.927386 | 0 | 0 | 0 | 0 | 0 | 0 | 615 | 0.425311 |
a42cb12c2f9525fc1e01261772b1444db88cd2dc | 3,794 | py | Python | EnemyStats.py | rohwid/rpg-stats-generator | 5a1fcdf713ec5d0af3cbf6dce3bcb21e6e363519 | [
"MIT"
] | null | null | null | EnemyStats.py | rohwid/rpg-stats-generator | 5a1fcdf713ec5d0af3cbf6dce3bcb21e6e363519 | [
"MIT"
] | null | null | null | EnemyStats.py | rohwid/rpg-stats-generator | 5a1fcdf713ec5d0af3cbf6dce3bcb21e6e363519 | [
"MIT"
] | null | null | null | import datetime
"""
STATS GENERATOR FOR TURN BASED OR ACTION RPG (ROLE PLAYING GAMES)
By: ROHMAN WIDIYANTO
GitHub: http://github.com/rohwid/
All component or object defined separately, here's the reason:
- Levels: Because sometimes the characters won't start from 1st level.
- Magic Point: Because sometimes t... | 28.961832 | 92 | 0.655245 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,919 | 0.505799 |
a42d8d5b67740ae561836c7a45d64c9f78eb7129 | 2,880 | py | Python | Day 14 - Coffee Machine Project/todos.py | secureterminal/100-Days-of-Code | 04383ae541938d8a551b5aac9a0dad3348a6ef23 | [
"MIT"
] | 1 | 2022-01-28T13:55:39.000Z | 2022-01-28T13:55:39.000Z | Day 14 - Coffee Machine Project/todos.py | secureterminal/100-Days-of-Code | 04383ae541938d8a551b5aac9a0dad3348a6ef23 | [
"MIT"
] | 1 | 2022-02-02T00:13:18.000Z | 2022-02-03T11:32:53.000Z | Day 14 - Coffee Machine Project/todos.py | secureterminal/100-Days-of-Code | 04383ae541938d8a551b5aac9a0dad3348a6ef23 | [
"MIT"
] | 2 | 2022-02-07T20:49:36.000Z | 2022-02-19T21:22:15.000Z | # TODO 1. Prompt user by asking “What would you like? (espresso/latte/cappuccino):” \ a. Check the user’s input to
# decide what to do next.\ b. The prompt should show every time action has completed, e.g. once the drink is
# dispensed. The prompt should show again to serve the next customer.
# TODO 2. Turn of... | 43.636364 | 115 | 0.698264 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,842 | 0.973955 |
a42e5d68ea357f4b16c9eced0c8eecd76665797a | 590 | py | Python | experiments/spanmaskhistogram/report_writer.py | WojciechMula/parsing-int-series | f0a45c8b1251018e52dac9ebf1d98e8dfb705755 | [
"BSD-2-Clause"
] | 19 | 2018-04-20T06:51:42.000Z | 2022-02-24T02:12:00.000Z | experiments/spanmaskhistogram/report_writer.py | WojciechMula/parsing-int-series | f0a45c8b1251018e52dac9ebf1d98e8dfb705755 | [
"BSD-2-Clause"
] | 2 | 2018-04-20T09:53:37.000Z | 2018-04-27T19:01:16.000Z | experiments/spanmaskhistogram/report_writer.py | WojciechMula/parsing-int-series | f0a45c8b1251018e52dac9ebf1d98e8dfb705755 | [
"BSD-2-Clause"
] | 3 | 2019-02-25T19:26:51.000Z | 2020-11-04T00:50:42.000Z | class RestWriter(object):
def __init__(self, file, report):
self.file = file
self.report = report
def write(self, restsection):
assert len(restsection) >= 1
for title, table in self.report:
self.write_header(title, restsection[0], 80)
self.file.write... | 23.6 | 56 | 0.537288 | 588 | 0.99661 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.037288 |
a42e667bd6ebb350e9c0d59466ded20c39b8c4ae | 9,005 | py | Python | pywgrib2_xr/dataset.py | yt87/pywgrib2_xr | 5c49eaaee12948ecc2f2aff526a9e51e6d4d98b5 | [
"0BSD"
] | 11 | 2021-01-05T03:26:51.000Z | 2022-02-15T02:44:39.000Z | pywgrib2_xr/dataset.py | yt87/pywgrib2_xr | 5c49eaaee12948ecc2f2aff526a9e51e6d4d98b5 | [
"0BSD"
] | 2 | 2020-12-18T02:35:08.000Z | 2021-07-11T13:01:53.000Z | pywgrib2_xr/dataset.py | yt87/pywgrib2_xr | 5c49eaaee12948ecc2f2aff526a9e51e6d4d98b5 | [
"0BSD"
] | null | null | null | from collections import defaultdict
from functools import partial
import logging
from typing import (
Any,
Callable,
DefaultDict,
Dict,
List,
NamedTuple,
Sequence,
Tuple,
Union,
cast,
)
try:
from numpy.typing import ArrayLike
except ImportError:
ArrayLike = Any
import n... | 33.726592 | 88 | 0.549139 | 4,446 | 0.493726 | 3,863 | 0.428984 | 0 | 0 | 0 | 0 | 1,536 | 0.170572 |
a42e9d2a1e7a9cf3db47e508fb6f4bf89cb81693 | 5,486 | py | Python | strategies/go_to_incarnam.py | ProjectBlackFalcon/BlackFalconCore | 23af1829224738c06092e3e513a0bf2753b4c35f | [
"MIT"
] | 8 | 2019-05-26T19:44:28.000Z | 2021-01-31T14:53:17.000Z | strategies/go_to_incarnam.py | ProjectBlackFalcon/BlackFalconCore | 23af1829224738c06092e3e513a0bf2753b4c35f | [
"MIT"
] | 8 | 2019-07-17T21:19:47.000Z | 2019-09-28T12:52:39.000Z | strategies/go_to_incarnam.py | ProjectBlackFalcon/BlackFalconCore | 23af1829224738c06092e3e513a0bf2753b4c35f | [
"MIT"
] | null | null | null | import json
import time
from tools import logger as log
import strategies
def go_to_incarnam(**kwargs):
"""
A strategy to go from Astrub to Incarnam trough the portal
:param kwargs: strategy, listener, and orders_queue
:return: the input strategy with a report
"""
strategy = kwargs['strategy... | 34.503145 | 111 | 0.595151 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,534 | 0.279621 |
a42f7f668f38670d489c9bdb6a6b76503b566b68 | 26 | py | Python | get_decks_ids/__init__.py | sarajaksa/anki-addons | 01e4cedca0cca1df11202c52c473a8c35eb5f0b8 | [
"Unlicense"
] | 3 | 2017-03-05T21:53:06.000Z | 2019-03-13T09:50:19.000Z | get_decks_ids/__init__.py | sarajaksa/anki-addons | 01e4cedca0cca1df11202c52c473a8c35eb5f0b8 | [
"Unlicense"
] | 3 | 2017-03-04T16:24:15.000Z | 2018-11-14T15:20:49.000Z | get_decks_ids/__init__.py | sarajaksa/anki-addons | 01e4cedca0cca1df11202c52c473a8c35eb5f0b8 | [
"Unlicense"
] | 1 | 2019-05-12T10:46:25.000Z | 2019-05-12T10:46:25.000Z | from . import get_deck_id
| 13 | 25 | 0.807692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a42fe444580c5e09c79668e45d2c77ef6d352594 | 1,473 | py | Python | stog/simple_predict.py | mg9/stog | 49d0d1ebc1ae666f79e43466fbdc33b1b12f1adf | [
"MIT"
] | null | null | null | stog/simple_predict.py | mg9/stog | 49d0d1ebc1ae666f79e43466fbdc33b1b12f1adf | [
"MIT"
] | null | null | null | stog/simple_predict.py | mg9/stog | 49d0d1ebc1ae666f79e43466fbdc33b1b12f1adf | [
"MIT"
] | null | null | null | import h5py,os
from transformers import T5Tokenizer, T5Model, T5ForConditionalGeneration
if __name__ == "__main__":
snt_0 = "amrgraphize: establish model in Industrial Innovation </s>"
snt_1 = "amrgraphize: raise standard to in excess of CITY_1 's 1 magnitude could leave authority with some breathing spa... | 32.021739 | 181 | 0.699932 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 796 | 0.540394 |
a431ecb8dce6d4bde6d87983adda3ad4f20a538e | 23,627 | py | Python | Experiments/evaluate_CAPe.py | Lorenzo-Perini/Active_PU_Learning | 83b608993586420bb84d1b4e6fc6c7cb561a382f | [
"Apache-2.0"
] | 10 | 2020-07-22T09:16:55.000Z | 2022-01-16T12:23:44.000Z | Experiments/evaluate_CAPe.py | Lorenzo-Perini/Active_PU_Learning | 83b608993586420bb84d1b4e6fc6c7cb561a382f | [
"Apache-2.0"
] | null | null | null | Experiments/evaluate_CAPe.py | Lorenzo-Perini/Active_PU_Learning | 83b608993586420bb84d1b4e6fc6c7cb561a382f | [
"Apache-2.0"
] | 1 | 2021-06-28T06:37:54.000Z | 2021-06-28T06:37:54.000Z | import numpy as np
import pandas as pd
from multiprocessing import Pool, freeze_support, cpu_count
from sklearn.metrics import confusion_matrix
from sklearn.preprocessing import MinMaxScaler
from sklearn.neighbors import KernelDensity
from sklearn.model_selection import StratifiedKFold
from anomatools.models import SSD... | 54.946512 | 129 | 0.629365 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12,143 | 0.513946 |
a4331a72af0d0109165afb03b5f32236c6ec4e77 | 28,470 | py | Python | __main__.py | wbrxcorp/genpack | 12cbbbf8306cb825c65d76ef55e85d24f1db0f90 | [
"MIT"
] | null | null | null | __main__.py | wbrxcorp/genpack | 12cbbbf8306cb825c65d76ef55e85d24f1db0f90 | [
"MIT"
] | null | null | null | __main__.py | wbrxcorp/genpack | 12cbbbf8306cb825c65d76ef55e85d24f1db0f90 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# Copyright (c) 2021 Walbrix Corporation
# https://github.com/wbrxcorp/genpack/blob/main/LICENSE
import os,re,argparse,subprocess,glob,json,uuid
import importlib.resources
import urllib.request
import initlib,init,util
import qemu
from sudo import sudo,Tee
BASE_URL="http://ftp.iij.ad.jp/pub/linux/... | 47.292359 | 216 | 0.638778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,356 | 0.223253 |
a434ec81bfc9e87e73d857293f1cc96d1049d22e | 207 | py | Python | debeauty/forms.py | gabriel-py/debeauty | fcb1b2afe72dd45ea1a6e673ce4eaf835f4f3030 | [
"MIT"
] | null | null | null | debeauty/forms.py | gabriel-py/debeauty | fcb1b2afe72dd45ea1a6e673ce4eaf835f4f3030 | [
"MIT"
] | null | null | null | debeauty/forms.py | gabriel-py/debeauty | fcb1b2afe72dd45ea1a6e673ce4eaf835f4f3030 | [
"MIT"
] | null | null | null | from django import forms
class NovoPedido(forms.Form):
data_realizacao_desejada = forms.DateField()
horario_inicio = forms.TimeField(required=False)
horario_fim = forms.TimeField(required=False) | 34.5 | 52 | 0.782609 | 181 | 0.874396 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a43510194fb5142b08027a9f1668afacfc38a044 | 873 | py | Python | src/task_preliminaries.py | yradeva93/random-grouping | 4955f8734bdd95f0e9fffaed6336c851bea156a0 | [
"MIT"
] | null | null | null | src/task_preliminaries.py | yradeva93/random-grouping | 4955f8734bdd95f0e9fffaed6336c851bea156a0 | [
"MIT"
] | null | null | null | src/task_preliminaries.py | yradeva93/random-grouping | 4955f8734bdd95f0e9fffaed6336c851bea156a0 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import pytask
from src.config import SRC
from src.read_and_write import read_config
from src.read_and_write import read_names
def create_matchings_history(names):
"""Create first instance of matchings history using names data file.
Returns:
matchings_history (p... | 24.942857 | 72 | 0.706758 | 0 | 0 | 0 | 0 | 355 | 0.406644 | 0 | 0 | 202 | 0.231386 |
a4368f5ea4098d66e119f2d225e904c8c5edfc95 | 26 | py | Python | sub/project6/package6/package/module.py | oshinko/py-pkgs | 332030ee35453441a1e870176954367798b206d8 | [
"MIT"
] | null | null | null | sub/project6/package6/package/module.py | oshinko/py-pkgs | 332030ee35453441a1e870176954367798b206d8 | [
"MIT"
] | null | null | null | sub/project6/package6/package/module.py | oshinko/py-pkgs | 332030ee35453441a1e870176954367798b206d8 | [
"MIT"
] | null | null | null | print(__file__, 'Hello!')
| 13 | 25 | 0.692308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.307692 |
a43726d4f10b72e38bf5d56c3f12c1aa7e2214e2 | 140 | py | Python | python_target/FoxySheep/Utils/__init__.py | rljacobson/FoxySheep | 78451ba9f868d21f20f23ee880649f20669e7644 | [
"BSD-2-Clause"
] | 41 | 2016-02-08T12:35:11.000Z | 2021-11-17T11:45:47.000Z | python_target/FoxySheep/Utils/__init__.py | rljacobson/FoxySheep | 78451ba9f868d21f20f23ee880649f20669e7644 | [
"BSD-2-Clause"
] | 4 | 2020-09-09T20:43:34.000Z | 2021-01-21T22:32:26.000Z | python_target/FoxySheep/Utils/__init__.py | rljacobson/FoxySheep | 78451ba9f868d21f20f23ee880649f20669e7644 | [
"BSD-2-Clause"
] | 4 | 2017-08-20T01:04:10.000Z | 2021-08-07T19:51:52.000Z | from .WolframLanguageData import find_symbol
# Mathematica's members are all module level, so no need to import then.
# import .Mathematica | 35 | 72 | 0.807143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 93 | 0.664286 |
a438f7b1e62d5a56791de43c94110f074a9264c7 | 7,752 | py | Python | python/fate_arch/federation/transfer_variable/_generated_enhance_variable.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | 3,787 | 2019-08-30T04:55:10.000Z | 2022-03-31T23:30:07.000Z | python/fate_arch/federation/transfer_variable/_generated_enhance_variable.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | 1,439 | 2019-08-29T16:35:52.000Z | 2022-03-31T11:55:31.000Z | python/fate_arch/federation/transfer_variable/_generated_enhance_variable.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | 1,179 | 2019-08-29T16:18:32.000Z | 2022-03-31T12:55:38.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# 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/lic... | 34.14978 | 86 | 0.665506 | 6,286 | 0.810888 | 0 | 0 | 145 | 0.018705 | 0 | 0 | 1,862 | 0.240196 |
a439fafd82d5aa8cd5f33e7668e9b80a3b2590de | 740 | py | Python | Arduino.py | dvcsciencealliance/vertical-farming-raspberry-pi | 58ca9d9677b9eb9251ff5b07cef3bd34bd11a178 | [
"MIT"
] | 5 | 2019-05-13T21:46:01.000Z | 2021-11-15T10:30:55.000Z | Arduino.py | dvcsciencealliance/vertical-farming-raspberry-pi | 58ca9d9677b9eb9251ff5b07cef3bd34bd11a178 | [
"MIT"
] | null | null | null | Arduino.py | dvcsciencealliance/vertical-farming-raspberry-pi | 58ca9d9677b9eb9251ff5b07cef3bd34bd11a178 | [
"MIT"
] | 3 | 2017-05-04T21:17:43.000Z | 2018-01-29T20:34:57.000Z | import time
import serial
from Sensor import *
class Arduino:
BaudRate = 9600
def __init__(self, specs):
self.name = specs['name']
self.port = specs['port']
self.ser = serial.Serial(self.port, timeout=2)
self.sensors = [Sensor.makeSensor(s)for s in specs['sensors']]
sel... | 24.666667 | 70 | 0.563514 | 691 | 0.933784 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.033784 |
a43a8a2442407e60f6d58636889003043e11690c | 2,716 | py | Python | ymir/backend/src/ymir-controller/controller/invoker/invoker_task_copy.py | elliotmessi/ymir | 3ec8145a1f894778116eb5218de223f6dd805b70 | [
"Apache-2.0"
] | null | null | null | ymir/backend/src/ymir-controller/controller/invoker/invoker_task_copy.py | elliotmessi/ymir | 3ec8145a1f894778116eb5218de223f6dd805b70 | [
"Apache-2.0"
] | null | null | null | ymir/backend/src/ymir-controller/controller/invoker/invoker_task_copy.py | elliotmessi/ymir | 3ec8145a1f894778116eb5218de223f6dd805b70 | [
"Apache-2.0"
] | null | null | null | import logging
import os
from typing import Dict
from controller.invoker.invoker_task_base import TaskBaseInvoker
from controller.utils import utils
from id_definition.error_codes import CTLResponseCode
from proto import backend_pb2
class TaskCopyInvoker(TaskBaseInvoker):
def task_pre_invoke(self, sandbox_root: ... | 48.5 | 109 | 0.641753 | 2,479 | 0.912739 | 0 | 0 | 1,552 | 0.571429 | 0 | 0 | 232 | 0.08542 |
a43dc50a6574d44ec26b352643549584b01d8720 | 209 | py | Python | character_sheet/src/player/classes/cleric.py | quintenpalmer/dnd | 0efa2b0ecfe886fde06a07ee5dc9475cd77f63a3 | [
"MIT"
] | 7 | 2016-11-13T18:50:39.000Z | 2021-02-11T01:38:36.000Z | character_sheet/src/player/classes/cleric.py | quintenpalmer/dnd | 0efa2b0ecfe886fde06a07ee5dc9475cd77f63a3 | [
"MIT"
] | null | null | null | character_sheet/src/player/classes/cleric.py | quintenpalmer/dnd | 0efa2b0ecfe886fde06a07ee5dc9475cd77f63a3 | [
"MIT"
] | 2 | 2016-11-04T13:07:58.000Z | 2017-09-22T07:36:20.000Z | from . import class_
class Cleric(class_.Class):
def __init__(self, channel_divinity):
class_.Class.__init__(self)
self.defs['will'] = 2
self.spec = 'cleric_%s' % channel_divinity | 26.125 | 50 | 0.655502 | 186 | 0.889952 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.08134 |
a43dd40cc07d8072ff6bb89e915bbbbd9aedea90 | 1,124 | py | Python | web/ask/ask/urls.py | artemsprygin/nginx-conf | f4f5fe0486d309619c5157a3ce690064b9850fd0 | [
"MIT"
] | null | null | null | web/ask/ask/urls.py | artemsprygin/nginx-conf | f4f5fe0486d309619c5157a3ce690064b9850fd0 | [
"MIT"
] | null | null | null | web/ask/ask/urls.py | artemsprygin/nginx-conf | f4f5fe0486d309619c5157a3ce690064b9850fd0 | [
"MIT"
] | 1 | 2021-07-27T17:35:56.000Z | 2021-07-27T17:35:56.000Z | """ask URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... | 37.466667 | 78 | 0.668149 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 802 | 0.713523 |
a43e71f21c48c0732c2979ae1cdef58103c6920f | 3,898 | py | Python | lambda/inventory-subs.py | dkeppel626/antiope-azure | 2c4ecccdb4d20c648fd750b6df7fbd6e44afb1bc | [
"Apache-2.0"
] | null | null | null | lambda/inventory-subs.py | dkeppel626/antiope-azure | 2c4ecccdb4d20c648fd750b6df7fbd6e44afb1bc | [
"Apache-2.0"
] | null | null | null | lambda/inventory-subs.py | dkeppel626/antiope-azure | 2c4ecccdb4d20c648fd750b6df7fbd6e44afb1bc | [
"Apache-2.0"
] | 4 | 2020-08-25T18:41:23.000Z | 2021-08-14T17:43:48.000Z | import json
import os
import time
import logging
import boto3
from botocore.exceptions import ClientError
from common import *
from subscription import *
from azure.mgmt.subscription import SubscriptionClient
# Setup Logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
logging.getLogger('botocore').setL... | 38.98 | 185 | 0.655208 | 86 | 0.022063 | 0 | 0 | 0 | 0 | 0 | 0 | 1,305 | 0.334787 |
a43f90a0bae76d7994937a72ad1940d58309ef25 | 7,443 | py | Python | src/cascade/executor/dismod_runner.py | skspoon/cascade | 00534bd7e2558b880dfeb2e8bb2248a104ba6083 | [
"MIT"
] | null | null | null | src/cascade/executor/dismod_runner.py | skspoon/cascade | 00534bd7e2558b880dfeb2e8bb2248a104ba6083 | [
"MIT"
] | null | null | null | src/cascade/executor/dismod_runner.py | skspoon/cascade | 00534bd7e2558b880dfeb2e8bb2248a104ba6083 | [
"MIT"
] | null | null | null | """
This stage runs Dismod-AT. Dismod gets called in very similar ways.
Let's look at them in order to narrow down configuration of this
stage.::
dismod_at database init
dismod_at database fit <variables>
dismod_at database fit <variables> <simulate_index>
dismod_at database set option <name> <value>
di... | 35.783654 | 119 | 0.680908 | 0 | 0 | 1,882 | 0.252855 | 1,920 | 0.25796 | 0 | 0 | 4,757 | 0.639124 |
a43fdd0da98368699ded07907d0510b59fd1edbd | 617 | py | Python | rpython/translator/platform/arch/test/test_s390x.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 381 | 2018-08-18T03:37:22.000Z | 2022-02-06T23:57:36.000Z | rpython/translator/platform/arch/test/test_s390x.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 16 | 2018-09-22T18:12:47.000Z | 2022-02-22T20:03:59.000Z | rpython/translator/platform/arch/test/test_s390x.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 55 | 2015-08-16T02:41:30.000Z | 2022-03-20T20:33:35.000Z | import py
import platform
from rpython.translator.platform.arch.s390x import (s390x_cpu_revision,
extract_s390x_cpu_ids)
if platform.machine() != 's390x':
py.test.skip("s390x tests only")
def test_cpuid_s390x():
revision = s390x_cpu_revision()
assert revision != 'unknown', 'the model you are runni... | 26.826087 | 81 | 0.65154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 176 | 0.285251 |
a44234fc46dd940bff4c26faf3da5eea2137bf9b | 1,155 | py | Python | app/core/tests/test_models.py | RISHABHKUSHWAH/recipe-app-api | 739befcc850e957f5ecde3dca9196f54f8885dde | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | RISHABHKUSHWAH/recipe-app-api | 739befcc850e957f5ecde3dca9196f54f8885dde | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | RISHABHKUSHWAH/recipe-app-api | 739befcc850e957f5ecde3dca9196f54f8885dde | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
class ModelTests(TestCase):
def test_create_user_with_email_successful(self):
""" Test create a new user with an email is successful"""
email ='rishabhkushwah208@gmail.com'
password ='kushwah20801'
use... | 28.170732 | 69 | 0.709957 | 434 | 0.375758 | 0 | 0 | 0 | 0 | 0 | 0 | 249 | 0.215584 |
a444a1ff0dbf9455487419d420d61e3a7955901b | 340 | py | Python | models/paste.py | iryaniv/pastebin-crawler | d15fd6781c6209c4620d96df985ec760ef3321ca | [
"MIT"
] | null | null | null | models/paste.py | iryaniv/pastebin-crawler | d15fd6781c6209c4620d96df985ec760ef3321ca | [
"MIT"
] | null | null | null | models/paste.py | iryaniv/pastebin-crawler | d15fd6781c6209c4620d96df985ec760ef3321ca | [
"MIT"
] | null | null | null |
class Paste:
def __init__(self, paste_id, name, user, date, content):
self.id = paste_id
self.name = name
self.user = user
self.date = date
self.content = content
def __str__(self):
return "{} - {} - by {} at {} \n {}".format(self.id, self.name, self.user, self.... | 28.333333 | 107 | 0.564706 | 338 | 0.994118 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.085294 |
a4459b0fbafee95c54aac59a2ffccbbf009eddf7 | 502 | py | Python | assignments/02_sum/sum.py | michaelandrewblum/be434-fall-2021 | 5c2281a99ece283e7ee7d1873708efbef473f3d3 | [
"MIT"
] | null | null | null | assignments/02_sum/sum.py | michaelandrewblum/be434-fall-2021 | 5c2281a99ece283e7ee7d1873708efbef473f3d3 | [
"MIT"
] | null | null | null | assignments/02_sum/sum.py | michaelandrewblum/be434-fall-2021 | 5c2281a99ece283e7ee7d1873708efbef473f3d3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Purpose: Sum any number of inputted integers together.
import argparse
def get_args():
parser = argparse.ArgumentParser(description='Add numbers')
parser.add_argument('integers', metavar='INT', type=int, nargs='+',
help='Numbers to add')
return parser.parse... | 27.888889 | 73 | 0.635458 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.288845 |
a44700a1f4cbe5d05ab638e44bb80fe2126da8f7 | 940 | py | Python | batch3/outputs/Alens_degeneracies.py | sjoudaki/CosmoJBD | 3c1d029b74034b92cb2974de15e4c18637a5277e | [
"MIT"
] | null | null | null | batch3/outputs/Alens_degeneracies.py | sjoudaki/CosmoJBD | 3c1d029b74034b92cb2974de15e4c18637a5277e | [
"MIT"
] | null | null | null | batch3/outputs/Alens_degeneracies.py | sjoudaki/CosmoJBD | 3c1d029b74034b92cb2974de15e4c18637a5277e | [
"MIT"
] | null | null | null | import planckStyle as s
g = s.getSubplotPlotter()
roots = ['base_Alens_plikHM_TT_lowl_lowE', 'base_Alens_plikHM_TTTEEE_lowl_lowE', 'base_plikHM_TTTEEE_lowl_lowE',
'base_Alens_CamSpecHM_TTTEEE_lowl_lowE']
for i, root in enumerate(roots):
samples = g.getSamples(root)
p = samples.getParams()
samples.... | 49.473684 | 118 | 0.620213 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 361 | 0.384043 |
a4474c9d9a91fc5ee6ad585e69583e1f8d1ffdf8 | 2,116 | py | Python | MHD/FEniCS/Orignal/Original.py | wathen/PhD | 35524f40028541a4d611d8c78574e4cf9ddc3278 | [
"MIT"
] | 3 | 2020-10-25T13:30:20.000Z | 2021-08-10T21:27:30.000Z | MHD/FEniCS/Orignal/Original.py | wathen/PhD | 35524f40028541a4d611d8c78574e4cf9ddc3278 | [
"MIT"
] | null | null | null | MHD/FEniCS/Orignal/Original.py | wathen/PhD | 35524f40028541a4d611d8c78574e4cf9ddc3278 | [
"MIT"
] | 3 | 2019-10-28T16:12:13.000Z | 2020-01-13T13:59:44.000Z |
from dolfin import *
from numpy import *
import scipy as Sci
import scipy.linalg
from math import pi,sin,cos,sqrt
import scipy.sparse as sps
import scipy.io as save
import scipy
import pdb
parameters['linear_algebra_backend'] = 'uBLAS'
j = 1
n = 2
n =2
# print n
mesh = UnitSquareMesh(n,n)
# mesh = Mesh('untitled.xml... | 25.493976 | 113 | 0.657372 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 972 | 0.459357 |
a44752508e5987daabff3d3e679ff820b8fb4ff1 | 1,010 | py | Python | scripts/map_interface.py | COHRINT/cops_and_robots | 1df99caa1e38bde1b5ce2d04389bc232a68938d6 | [
"Apache-2.0"
] | 3 | 2016-01-19T17:54:51.000Z | 2019-10-21T12:09:03.000Z | scripts/map_interface.py | COHRINT/cops_and_robots | 1df99caa1e38bde1b5ce2d04389bc232a68938d6 | [
"Apache-2.0"
] | null | null | null | scripts/map_interface.py | COHRINT/cops_and_robots | 1df99caa1e38bde1b5ce2d04389bc232a68938d6 | [
"Apache-2.0"
] | 5 | 2015-02-19T02:53:24.000Z | 2019-03-05T20:29:12.000Z | import rospy
import sys, time, logging, getch
from cops_and_robots.Map import Map
from std_msgs.msg import String
#<>NOTE: THIS WILL NOT WORK IN PYTHON AND HAS TO BE WRITTEN IN C++
#include <image_transport/image_transport.h>
#include <opencv2/highgui/highgui.hpp>
#include <cv_bridge/cv_bridge.h>
def callback(data)... | 24.047619 | 80 | 0.683168 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 286 | 0.283168 |
a448be34e5e9ec9f19e29113bb213defc64c3da8 | 17,495 | py | Python | pymatgen/analysis/path_finder.py | adozier/pymatgen | f1cc4d8db24ec11063be2fd84b4ea911f006eeb7 | [
"MIT"
] | null | null | null | pymatgen/analysis/path_finder.py | adozier/pymatgen | f1cc4d8db24ec11063be2fd84b4ea911f006eeb7 | [
"MIT"
] | null | null | null | pymatgen/analysis/path_finder.py | adozier/pymatgen | f1cc4d8db24ec11063be2fd84b4ea911f006eeb7 | [
"MIT"
] | 1 | 2018-10-28T01:41:38.000Z | 2018-10-28T01:41:38.000Z |
"""
This module finds diffusion paths through a structure based on a given potential field.
If you use PathFinder algorithm for your research, please consider citing the following work:
Ziqin Rong, Daniil Kitchaev, Pieremanuele Canepa, Wenxuan Huang, Gerbrand Ceder,
The Journal of Chemical Physics 145 (7), 074... | 46.405836 | 157 | 0.603658 | 16,346 | 0.934324 | 0 | 0 | 6,456 | 0.36902 | 0 | 0 | 7,358 | 0.420577 |
a44a2cb694a39b2bbae7d165505c809bd615ada2 | 3,501 | py | Python | mepo.d/command/clone/clone.py | GEOS-ESM/mepo | 41c20c286e7a9a11995f48fb5f3036e469d935e6 | [
"NASA-1.3",
"ECL-2.0",
"Apache-2.0"
] | null | null | null | mepo.d/command/clone/clone.py | GEOS-ESM/mepo | 41c20c286e7a9a11995f48fb5f3036e469d935e6 | [
"NASA-1.3",
"ECL-2.0",
"Apache-2.0"
] | 61 | 2020-01-08T20:01:16.000Z | 2022-03-24T19:44:38.000Z | mepo.d/command/clone/clone.py | GEOS-ESM/mepo | 41c20c286e7a9a11995f48fb5f3036e469d935e6 | [
"NASA-1.3",
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-02-28T14:29:12.000Z | 2020-07-08T15:56:55.000Z | from state.state import MepoState, StateDoesNotExistError
from repository.git import GitRepository
from command.init import init as mepo_init
from utilities import shellcmd, colors
from urllib.parse import urlparse
import os
import pathlib
import shutil
import shlex
def run(args):
# This protects aga... | 35.01 | 85 | 0.616967 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 694 | 0.198229 |
a44a423139f7734a4eb9ecbcd1b5b1f8c19e7ddf | 564 | py | Python | 07_commspeople/mail.py | Roboramv2/Random-projects | 7b80cc7427496d3e9a391ad68d26f6f504089da2 | [
"MIT"
] | 4 | 2021-06-21T03:40:09.000Z | 2021-07-05T03:23:40.000Z | 07_commspeople/mail.py | Roboramv2/Random-projects | 7b80cc7427496d3e9a391ad68d26f6f504089da2 | [
"MIT"
] | null | null | null | 07_commspeople/mail.py | Roboramv2/Random-projects | 7b80cc7427496d3e9a391ad68d26f6f504089da2 | [
"MIT"
] | null | null | null | import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
mails=['example1@gmail.com', 'example2@outlook.com']
outacc = "__outlook email id__"
outpwd = "__outlook password__"
def sendit(txt, sub):
s = smtplib.SMTP(host='smtp-mail.outlook.com', port=587)
s.starttls()
... | 26.857143 | 60 | 0.652482 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.239362 |
a44b0dc8fca4c0b10f05e699512cb5275897d550 | 1,388 | py | Python | doc/kubernetes/example.py | nlnjnj/ray | 8a829fbdcb09b30af27d09d372b53ed86fdacfaf | [
"Apache-2.0"
] | null | null | null | doc/kubernetes/example.py | nlnjnj/ray | 8a829fbdcb09b30af27d09d372b53ed86fdacfaf | [
"Apache-2.0"
] | null | null | null | doc/kubernetes/example.py | nlnjnj/ray | 8a829fbdcb09b30af27d09d372b53ed86fdacfaf | [
"Apache-2.0"
] | null | null | null | import os
import sys
import time
from collections import Counter
import ray
@ray.remote
def get_hostname(x):
import platform
import time
time.sleep(0.01)
return x + (platform.node(),)
def wait_for_nodes(expected):
# Wait for all nodes to join the cluster.
while True:
num_nodes = len... | 25.703704 | 101 | 0.623919 | 0 | 0 | 0 | 0 | 123 | 0.088617 | 0 | 0 | 432 | 0.311239 |
a44bdb80ae36c700d7a3190615830ddbcb5d0287 | 2,563 | py | Python | dataset_builder/domain/dataset_builder_script_service.py | statisticsnorway/microdata-dataset-builder | c58fe5804f146290e1d523536729f1a5b1ac2c73 | [
"Apache-2.0"
] | null | null | null | dataset_builder/domain/dataset_builder_script_service.py | statisticsnorway/microdata-dataset-builder | c58fe5804f146290e1d523536729f1a5b1ac2c73 | [
"Apache-2.0"
] | 3 | 2022-01-18T15:21:49.000Z | 2022-03-07T13:49:03.000Z | dataset_builder/domain/dataset_builder_script_service.py | statisticsnorway/microdata-dataset-builder | c58fe5804f146290e1d523536729f1a5b1ac2c73 | [
"Apache-2.0"
] | null | null | null | import logging
from dataset_builder.exceptions.exceptions import (
BuilderStepError
)
from dataset_builder.adapter import dataset_adapter
from dataset_builder.steps import (
dataset_validator,
dataset_converter,
dataset_transformer,
dataset_enricher,
dataset_mover,
directory_cleaner
)
from ... | 30.152941 | 79 | 0.712446 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.143972 |
a44e380834a5dfdfb2b5c4e05dca908375167ffe | 1,801 | py | Python | DFS/15.Permutations/Solution.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 12 | 2019-05-04T04:21:27.000Z | 2022-03-02T07:06:57.000Z | DFS/15.Permutations/Solution.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 1 | 2019-07-24T18:43:53.000Z | 2019-07-24T18:43:53.000Z | DFS/15.Permutations/Solution.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 10 | 2019-07-01T04:03:04.000Z | 2022-03-09T03:57:37.000Z | class Solution:
"""
@param: nums: A list of integers.
@return: A list of permutations.
"""
def permute(self, nums):
# write your code here
if not nums or len(nums) == 0:
return [[]]
nums.sort()
permutations = []
self._find_permutations(nums, permu... | 25.728571 | 72 | 0.540255 | 1,796 | 0.997224 | 0 | 0 | 0 | 0 | 0 | 0 | 305 | 0.16935 |
a44ee44527b1ddc9697f3b8d65d9da9c79901aae | 220 | py | Python | python/pangram/pangram.py | AnthonyRChao/Exercism | d477af77cf1bbd37ce5cc705f6d201daeda82df7 | [
"MIT"
] | null | null | null | python/pangram/pangram.py | AnthonyRChao/Exercism | d477af77cf1bbd37ce5cc705f6d201daeda82df7 | [
"MIT"
] | null | null | null | python/pangram/pangram.py | AnthonyRChao/Exercism | d477af77cf1bbd37ce5cc705f6d201daeda82df7 | [
"MIT"
] | null | null | null | from string import ascii_lowercase
ALPHABET = set(ascii_lowercase)
def is_pangram(sentence):
"""Checks if sentence uses every letter in the alphabet at least once"""
return ALPHABET.issubset(sentence.lower())
| 24.444444 | 76 | 0.763636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.327273 |
a44eef784294fa4dd44eb02e775237fbffd71180 | 1,676 | py | Python | code/generateForSimInputs/generateHumanGaitCycles.py | neurorestore/neuraldynamicplatform | ac32df03a8892dafdf9765c6148b60ccdd34f1d6 | [
"MIT"
] | 2 | 2020-12-27T03:46:03.000Z | 2021-05-01T10:29:45.000Z | code/generateForSimInputs/generateHumanGaitCycles.py | neurorestore/neuraldynamicplatform | ac32df03a8892dafdf9765c6148b60ccdd34f1d6 | [
"MIT"
] | null | null | null | code/generateForSimInputs/generateHumanGaitCycles.py | neurorestore/neuraldynamicplatform | ac32df03a8892dafdf9765c6148b60ccdd34f1d6 | [
"MIT"
] | null | null | null | import sys
sys.path.append('../code')
from tools import load_data_tools as ldt
from tools import emg_tools as et
from AfferentInput import AfferentInput
import matplotlib.pyplot as plt
import numpy as np
import pickle
""" get gait cycles """
kinFile = "./generateForSimInputs/data/human/HuMoD-database/generatedFiles/S... | 37.244444 | 118 | 0.754773 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 634 | 0.378282 |
a44f020b904b67da29fbc45f7db81180d181ac35 | 12,210 | py | Python | aries_cloudagent/commands/tests/test_upgrade.py | kuraakhilesh8230/aries-cloudagent-python | ee384d1330f6a50ff45a507392ce54f92900f23a | [
"Apache-2.0"
] | 4 | 2019-07-01T13:12:50.000Z | 2019-07-02T20:01:37.000Z | aries_cloudagent/commands/tests/test_upgrade.py | kuraakhilesh8230/aries-cloudagent-python | ee384d1330f6a50ff45a507392ce54f92900f23a | [
"Apache-2.0"
] | 29 | 2019-06-24T22:48:04.000Z | 2019-07-02T20:52:16.000Z | aries_cloudagent/commands/tests/test_upgrade.py | kuraakhilesh8230/aries-cloudagent-python | ee384d1330f6a50ff45a507392ce54f92900f23a | [
"Apache-2.0"
] | 12 | 2019-06-24T22:17:44.000Z | 2019-07-02T19:49:31.000Z | import asyncio
from asynctest import mock as async_mock, TestCase as AsyncTestCase
from ...core.in_memory import InMemoryProfile
from ...config.error import ArgsParseError
from ...connections.models.conn_record import ConnRecord
from ...storage.base import BaseStorage
from ...storage.record import StorageRecord
from ... | 35.289017 | 112 | 0.498198 | 11,783 | 0.965029 | 0 | 0 | 0 | 0 | 11,235 | 0.920147 | 1,851 | 0.151597 |
a44fcaf72af452eb78dae46d1d49a2249dd7f3c4 | 143 | py | Python | week1/2.py | kamorozov/coursera_python | 706bc1bc46839f8b3debdf293240ad5ce20c9775 | [
"Unlicense"
] | 2 | 2019-05-17T13:42:02.000Z | 2019-05-18T04:00:35.000Z | week1/2.py | kamorozov/coursera_python | 706bc1bc46839f8b3debdf293240ad5ce20c9775 | [
"Unlicense"
] | null | null | null | week1/2.py | kamorozov/coursera_python | 706bc1bc46839f8b3debdf293240ad5ce20c9775 | [
"Unlicense"
] | 2 | 2019-10-03T09:07:44.000Z | 2019-12-28T19:17:20.000Z | n = int(input())
print(' _~_ ' * n)
print(' (o o) ' * n)
print(' / V \ ' * n)
print('/( _ )\ ' * n)
print(' ^^ ^^ ' * n)
| 20.428571 | 24 | 0.314685 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.41958 |
a4513608264b5ef5fadbdb3f5d4972dad1c038cb | 8,235 | py | Python | chap05/ConvolutionalLayer.py | viekie/basic_deeplearning | 6c9e55cd621504da3d7ea1627e6783c9819a1916 | [
"Apache-2.0"
] | 3 | 2017-05-23T08:11:44.000Z | 2017-09-25T11:17:57.000Z | chap05/ConvolutionalLayer.py | viekie/basic_deeplearning | 6c9e55cd621504da3d7ea1627e6783c9819a1916 | [
"Apache-2.0"
] | null | null | null | chap05/ConvolutionalLayer.py | viekie/basic_deeplearning | 6c9e55cd621504da3d7ea1627e6783c9819a1916 | [
"Apache-2.0"
] | 1 | 2017-06-19T03:36:40.000Z | 2017-06-19T03:36:40.000Z | #!/usr/bin/env python
# -*- coding:utf8 -*-
# Power by viekie. 2017-05-27 08:35:06
import numpy as np
import Filter
class ConvolutionalLayer(object):
def __init__(self, input_width, input_height, channel_number,
filter_width, filter_height, filter_number, zero_padding,
stride, ac... | 39.401914 | 79 | 0.548877 | 8,818 | 0.986685 | 0 | 0 | 211 | 0.02361 | 0 | 0 | 1,526 | 0.170751 |
a451da894d989b6d53bdd9a5869aaa0646748dae | 4,521 | py | Python | src/thunder/text_processing/transform.py | rbracco/thunder-speech | 2b16abf1a14438b1174c168ad8252ad869f31139 | [
"MIT"
] | 8 | 2021-01-26T23:19:51.000Z | 2022-03-02T23:18:46.000Z | src/thunder/text_processing/transform.py | rbracco/thunder-speech | 2b16abf1a14438b1174c168ad8252ad869f31139 | [
"MIT"
] | 27 | 2021-01-28T06:50:11.000Z | 2022-02-27T08:21:12.000Z | src/thunder/text_processing/transform.py | rbracco/thunder-speech | 2b16abf1a14438b1174c168ad8252ad869f31139 | [
"MIT"
] | 3 | 2021-05-06T21:04:23.000Z | 2021-08-09T13:24:50.000Z | # This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Copyright (c) 2021 scart97
__all__ = ["BatchTextTransformer", "TextTransformConfig"]
from dataclasses import dataclass
from typing import List, Optional
import torch
from torch import nn
fro... | 35.880952 | 140 | 0.639681 | 4,008 | 0.886138 | 0 | 0 | 2,690 | 0.594738 | 0 | 0 | 1,874 | 0.414327 |
a454242a5d2a6fda9bc26f402c83e116c412e094 | 19,801 | py | Python | experiments/book_comparison.py | LasLitz/ma-doc-embeddings | e6edbb64a766b7906179b0cb767606c6f65cddb9 | [
"MIT"
] | 1 | 2022-01-10T20:29:42.000Z | 2022-01-10T20:29:42.000Z | experiments/book_comparison.py | LasLitz/ma-doc-embeddings | e6edbb64a766b7906179b0cb767606c6f65cddb9 | [
"MIT"
] | null | null | null | experiments/book_comparison.py | LasLitz/ma-doc-embeddings | e6edbb64a766b7906179b0cb767606c6f65cddb9 | [
"MIT"
] | null | null | null | import os
from collections import defaultdict
import random
from typing import Dict, List
import pandas as pd
from scipy.stats import stats
from lib2vec.corpus_structure import Corpus
from experiments.predicting_high_rated_books import mcnemar_sig_text, chi_square_test
from lib2vec.vectorization import Vectorizer
fro... | 44.697517 | 121 | 0.55477 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,746 | 0.34069 |
a455482b519ebf7d5a5c43050e5bd67e6d31bf48 | 759 | py | Python | mopidy_seeedrelays/__init__.py | rmichalak/mopidy-seeedrelays | 156dba89b19a8bd95af7e6fdb9d39ad9c91272b1 | [
"Apache-2.0"
] | null | null | null | mopidy_seeedrelays/__init__.py | rmichalak/mopidy-seeedrelays | 156dba89b19a8bd95af7e6fdb9d39ad9c91272b1 | [
"Apache-2.0"
] | null | null | null | mopidy_seeedrelays/__init__.py | rmichalak/mopidy-seeedrelays | 156dba89b19a8bd95af7e6fdb9d39ad9c91272b1 | [
"Apache-2.0"
] | null | null | null | import logging
import pathlib
import pkg_resources
from mopidy import config, ext
__version__ = pkg_resources.get_distribution("Mopidy-SeeedRelays").version
class Extension(ext.Extension):
dist_name = "Mopidy-SeeedRelays"
ext_name = "seeedrelays"
version = __version__
def get_default_config(self)... | 24.483871 | 74 | 0.693017 | 595 | 0.783926 | 0 | 0 | 0 | 0 | 0 | 0 | 94 | 0.123847 |
a45592f450830cd65a28e51d131d98bb598da933 | 12,729 | py | Python | armi/physics/neutronics/parameters.py | crisobg1/armi | 38d9febdbec7ab8a67dd9b8e50780e11ea127022 | [
"Apache-2.0"
] | 1 | 2020-10-14T15:18:11.000Z | 2020-10-14T15:18:11.000Z | armi/physics/neutronics/parameters.py | crisobg1/Framework | 87b56c2cf286b75e7cc2c02a1e2886d6ce3037b8 | [
"Apache-2.0"
] | null | null | null | armi/physics/neutronics/parameters.py | crisobg1/Framework | 87b56c2cf286b75e7cc2c02a1e2886d6ce3037b8 | [
"Apache-2.0"
] | 1 | 2020-08-26T09:02:06.000Z | 2020-08-26T09:02:06.000Z | # Copyright 2019 TerraPower, 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 writi... | 30.895631 | 164 | 0.569723 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,794 | 0.37662 |
a456f12f0c4a167d3c083c3079f270b436ec245d | 1,768 | py | Python | Software/Backend/app/controllers/Persona.py | davidsgv/Sistemas-Transaccionales | a26904742bd163461aca7e8039448441b4a98fb9 | [
"MIT"
] | null | null | null | Software/Backend/app/controllers/Persona.py | davidsgv/Sistemas-Transaccionales | a26904742bd163461aca7e8039448441b4a98fb9 | [
"MIT"
] | null | null | null | Software/Backend/app/controllers/Persona.py | davidsgv/Sistemas-Transaccionales | a26904742bd163461aca7e8039448441b4a98fb9 | [
"MIT"
] | null | null | null | from flask import Blueprint, jsonify, request
from flask_cors import cross_origin
#Model
from app.model.Persona import Persona
from app.model.Usuario import ManejoUsuarios
persona = Blueprint('persona', __name__, url_prefix="/persona/")
#listar todas las Personas
@persona.route("list", methods=["POST"])
@cross_ori... | 26.787879 | 64 | 0.635181 | 0 | 0 | 0 | 0 | 1,463 | 0.827489 | 0 | 0 | 499 | 0.28224 |
a457119ed41ff23e2d06d53d3b5c3c1e432eea7e | 421 | py | Python | travis_tests.py | JulianSobott/networking | 8ef64323ecb45b12ad21df372b28dfb131cec2f6 | [
"Apache-2.0"
] | null | null | null | travis_tests.py | JulianSobott/networking | 8ef64323ecb45b12ad21df372b28dfb131cec2f6 | [
"Apache-2.0"
] | 4 | 2019-06-06T19:47:03.000Z | 2020-02-18T17:48:42.000Z | travis_tests.py | JulianSobott/pynetworking | 8ef64323ecb45b12ad21df372b28dfb131cec2f6 | [
"Apache-2.0"
] | null | null | null | import unittest
if __name__ == '__main__':
from pynetworking.Logging import logger
import sys
logger.setLevel(30)
test_loader = unittest.TestLoader()
test_suite = test_loader.discover('pynetworking.tests', pattern='test_*.py')
# test_suite._tests.pop(1) # Exclude communication tests, becaus... | 32.384615 | 88 | 0.729216 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.296912 |
a458419f6584ac4036e6240f20d87f28078e862b | 947 | py | Python | sieve.py | rigewo02/rsa | 10736f695931ca835600410cd3f89b4f93b1e8e3 | [
"MIT"
] | null | null | null | sieve.py | rigewo02/rsa | 10736f695931ca835600410cd3f89b4f93b1e8e3 | [
"MIT"
] | null | null | null | sieve.py | rigewo02/rsa | 10736f695931ca835600410cd3f89b4f93b1e8e3 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
import random
import math
def sieve(n):
# Every number is assumed prime except 0 and 1
numbers = [False, False] + [True] * (n-2)
print("Numbers appended")
for i in range(int(math.sqrt(n))+1):
if not numbers[i]:
continue # Do not do a... | 23.097561 | 78 | 0.548046 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 331 | 0.349525 |
a4591e8c5e0a7f2482e3823831464176b3c6732c | 1,136 | py | Python | tests/api_tests/search/test_fetch_platsannons.py | JobtechSwe/castaway | e0917511b20152f0bd7e2802b73a0beae30a96f5 | [
"Apache-2.0"
] | null | null | null | tests/api_tests/search/test_fetch_platsannons.py | JobtechSwe/castaway | e0917511b20152f0bd7e2802b73a0beae30a96f5 | [
"Apache-2.0"
] | null | null | null | tests/api_tests/search/test_fetch_platsannons.py | JobtechSwe/castaway | e0917511b20152f0bd7e2802b73a0beae30a96f5 | [
"Apache-2.0"
] | null | null | null | import sys
import os
import requests
import pytest
from tests.test_resources.helper import get_with_path_return_json
from tests.test_resources.settings import SEARCH_URL
@pytest.mark.smoke
@pytest.mark.integration
def test_fetch_ad_by_id( session):
"""
Get an ad by a request to /search without a query,and li... | 31.555556 | 89 | 0.724472 | 0 | 0 | 0 | 0 | 851 | 0.74912 | 0 | 0 | 391 | 0.34419 |
a4593763071dd8759855cd9548469ab94309d4a3 | 5,300 | py | Python | test/test_pipeline.py | esalazarv/biggu-pipeline | b61c62409a9e6e8163038d1ffb0395ce1f87ecba | [
"MIT"
] | null | null | null | test/test_pipeline.py | esalazarv/biggu-pipeline | b61c62409a9e6e8163038d1ffb0395ce1f87ecba | [
"MIT"
] | null | null | null | test/test_pipeline.py | esalazarv/biggu-pipeline | b61c62409a9e6e8163038d1ffb0395ce1f87ecba | [
"MIT"
] | null | null | null | import unittest
from biggu_container import Container
from biggu_pipeline import Pipeline
class PipelineWithCustomException(Pipeline):
@staticmethod
def handle_exception(exception):
return "An error has occurred"
class Foo:
pass
class Bar:
def handle(self, name, next):
return "Hello "... | 34.193548 | 98 | 0.633774 | 5,181 | 0.977547 | 0 | 0 | 390 | 0.073585 | 0 | 0 | 529 | 0.099811 |
a4594629138b32b8247f47802290c69c6e81c198 | 349 | py | Python | fileshare/__init__.py | sqz269/fileshare-flask | 33459a10ea3abfda52867628d849231365b32b95 | [
"MIT"
] | 4 | 2018-12-26T02:14:29.000Z | 2019-12-05T05:37:07.000Z | fileshare/__init__.py | sqz269/ftp-flask | 33459a10ea3abfda52867628d849231365b32b95 | [
"MIT"
] | 6 | 2018-12-26T03:37:43.000Z | 2020-07-02T22:10:30.000Z | fileshare/__init__.py | sqz269/ftp-flask | 33459a10ea3abfda52867628d849231365b32b95 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
from fileshare.site.views import site
from fileshare.api.views import api
from fileshare.api_admin.views import api_admin
from fileshare.site_admin.views import site_admin
app.register_blueprint(site)
app.register_blueprint(api)
app.register_blueprint(site_admin)
app.r... | 21.8125 | 49 | 0.842407 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a45c6a40589988b06217c130fc291b75cbb96b4e | 2,835 | py | Python | dmaap/tests/test_consulif.py | onap/dcaegen2-platform-plugins | 64131311ba1d01ff7d20bca0c14d30a006b2e712 | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2020-07-14T14:22:04.000Z | 2020-07-14T14:22:04.000Z | dmaap/tests/test_consulif.py | alex-sh2020/dcaegen2-platform-plugins | c5abb9b34468400bdcdd3ce23595af41ac03cd80 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | dmaap/tests/test_consulif.py | alex-sh2020/dcaegen2-platform-plugins | c5abb9b34468400bdcdd3ce23595af41ac03cd80 | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2020-07-14T19:02:05.000Z | 2020-07-14T19:02:05.000Z | # ============LICENSE_START=======================================================
# org.onap.dcae
# ================================================================================
# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.
# =============================================================... | 38.835616 | 105 | 0.639153 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,697 | 0.598589 |
a4604dd97a62cdd689efd3c762a79b8a4f261912 | 763 | py | Python | tests/test_channel.py | Doerge/python-slackclient | 66a85de57b11c5c726734dd51b3be57427f544e1 | [
"MIT"
] | null | null | null | tests/test_channel.py | Doerge/python-slackclient | 66a85de57b11c5c726734dd51b3be57427f544e1 | [
"MIT"
] | null | null | null | tests/test_channel.py | Doerge/python-slackclient | 66a85de57b11c5c726734dd51b3be57427f544e1 | [
"MIT"
] | 1 | 2021-03-26T23:50:31.000Z | 2021-03-26T23:50:31.000Z | from slackclient._channel import Channel
import pytest
def test_channel(channel):
assert type(channel) == Channel
def test_channel_eq(channel):
channel = Channel(
'test-server',
'test-channel',
'C12345678',
)
assert channel == 'test-channel'
assert channel == '#test-channe... | 23.84375 | 51 | 0.653997 | 0 | 0 | 0 | 0 | 89 | 0.116645 | 0 | 0 | 141 | 0.184797 |
a460e1dfa6c011bfab82eb9a8d9a758c7919c5bd | 1,049 | py | Python | apps/database.py | 0x90E/PyWDI | d3742927478f57a4ef6ec7bf031f7d21ef68e678 | [
"MIT"
] | null | null | null | apps/database.py | 0x90E/PyWDI | d3742927478f57a4ef6ec7bf031f7d21ef68e678 | [
"MIT"
] | null | null | null | apps/database.py | 0x90E/PyWDI | d3742927478f57a4ef6ec7bf031f7d21ef68e678 | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from config import config
Base = declarative_base()
class DatabaseManager:
def __init__(self):
self.db_session = None
def init_db(self):
db_en... | 29.971429 | 115 | 0.709247 | 804 | 0.766444 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.020019 |
a463318d48a23200b05fe5c478703327af0250c6 | 5,411 | py | Python | utils/transforms.py | zdaiot/NAIC-Person-Re-identification | 762be875b68e85fbaab8b7730b5a857bfcc9e218 | [
"MIT"
] | null | null | null | utils/transforms.py | zdaiot/NAIC-Person-Re-identification | 762be875b68e85fbaab8b7730b5a857bfcc9e218 | [
"MIT"
] | null | null | null | utils/transforms.py | zdaiot/NAIC-Person-Re-identification | 762be875b68e85fbaab8b7730b5a857bfcc9e218 | [
"MIT"
] | null | null | null | import math
import random
import numpy as np
import torchvision.transforms as T
from albumentations import (
Compose, HorizontalFlip, VerticalFlip, CLAHE, RandomRotate90, HueSaturationValue,
RandomBrightness, RandomContrast, RandomGamma, OneOf,
ToFloat, ShiftScaleRotate, GridDistortion, ElasticTransform, Jp... | 32.993902 | 108 | 0.577342 | 4,444 | 0.790607 | 0 | 0 | 0 | 0 | 0 | 0 | 1,161 | 0.206547 |
a46426c4091f69e2bafaff6462b464224cf7d8e8 | 382 | py | Python | Day-017-MoreOOPS/main.py | codefather91/100DaysOfPython | 7c27e0b1af7b73c8fefdd8e3bd73f092ea665868 | [
"MIT"
] | null | null | null | Day-017-MoreOOPS/main.py | codefather91/100DaysOfPython | 7c27e0b1af7b73c8fefdd8e3bd73f092ea665868 | [
"MIT"
] | null | null | null | Day-017-MoreOOPS/main.py | codefather91/100DaysOfPython | 7c27e0b1af7b73c8fefdd8e3bd73f092ea665868 | [
"MIT"
] | null | null | null | from question_model import Question
from data import question_data
from quiz_brain import QuizBrain
question_bank = []
for question in question_data:
question_bank.append(Question(question['text'], question['answer']))
quiz = QuizBrain(question_bank)
while quiz.still_has_question():
quiz.next_question()
pr... | 25.466667 | 72 | 0.777487 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.185864 |
a464c2d34843871e0b098c7eded073e73e59a58c | 1,655 | py | Python | using_result.py | takat0m0/pix2pix | f6b0277fdd4bc98581db8cfd6dd6a039baf5e349 | [
"MIT"
] | 3 | 2017-02-09T14:26:12.000Z | 2017-02-20T03:21:26.000Z | using_result.py | takat0m0/pix2pix | f6b0277fdd4bc98581db8cfd6dd6a039baf5e349 | [
"MIT"
] | null | null | null | using_result.py | takat0m0/pix2pix | f6b0277fdd4bc98581db8cfd6dd6a039baf5e349 | [
"MIT"
] | null | null | null | #! -*- coding:utf-8 -*-
import os
import sys
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import cv2
from Model import Model
from util import get_figs, dump_figs
class FigGenerator(object):
def __init__(self, file_name, z_dim, batch_size):
self.batch_size = batch_size
... | 27.583333 | 79 | 0.64713 | 611 | 0.369184 | 0 | 0 | 0 | 0 | 0 | 0 | 258 | 0.155891 |
a465cded6b282420fb15a7a55e99a0790dcca303 | 1,300 | py | Python | prob_calculator.py | ZaatarX/probability-calculator | ae077db1eb435864ac5070c38d5794bccd0c92b8 | [
"MIT"
] | null | null | null | prob_calculator.py | ZaatarX/probability-calculator | ae077db1eb435864ac5070c38d5794bccd0c92b8 | [
"MIT"
] | null | null | null | prob_calculator.py | ZaatarX/probability-calculator | ae077db1eb435864ac5070c38d5794bccd0c92b8 | [
"MIT"
] | null | null | null | import copy
import random
# Consider using the modules imported above.
class Hat:
def __init__(self, **kwargs) -> None:
self.set_contents(**kwargs)
def set_contents(self, **kwargs):
contents = []
for key in kwargs:
for n in range(kwargs[key]):
contents.app... | 26 | 70 | 0.539231 | 687 | 0.528462 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.052308 |
a46624d14c9284368d486f5789d1189343a38de8 | 7,309 | py | Python | naivenmt/layers/transformer.py | luozhouyang/tf-nmt-keras | bcceeec0a477eb09c4a8915e638a27dae6c95562 | [
"Apache-2.0"
] | 7 | 2018-09-10T03:49:06.000Z | 2020-06-15T06:10:28.000Z | naivenmt/layers/transformer.py | luozhouyang/tf-nmt-keras | bcceeec0a477eb09c4a8915e638a27dae6c95562 | [
"Apache-2.0"
] | 1 | 2019-02-18T10:01:44.000Z | 2019-02-18T10:01:44.000Z | naivenmt/layers/transformer.py | luozhouyang/tf-nmt-keras | bcceeec0a477eb09c4a8915e638a27dae6c95562 | [
"Apache-2.0"
] | 1 | 2018-09-15T05:49:31.000Z | 2018-09-15T05:49:31.000Z | # Copyright 2018 luozhouyang
#
# 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, ... | 32.198238 | 95 | 0.629224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,317 | 0.453824 |
a468a8b6e34ed790b3ce0b746bd433ca486e1bd9 | 536 | py | Python | backend/core/migrations/0009_auto_20200518_1443.py | Critter-Inc/critter | 4399f240af79f97e89ac95c3e39535154faed37d | [
"MIT"
] | null | null | null | backend/core/migrations/0009_auto_20200518_1443.py | Critter-Inc/critter | 4399f240af79f97e89ac95c3e39535154faed37d | [
"MIT"
] | 5 | 2021-03-10T20:00:42.000Z | 2022-02-27T05:35:23.000Z | backend/core/migrations/0009_auto_20200518_1443.py | Critter-Inc/critter | 4399f240af79f97e89ac95c3e39535154faed37d | [
"MIT"
] | null | null | null | # Generated by Django 3.0.6 on 2020-05-18 14:43
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('auth', '0011_update_proxy_permissions'),
('core', '0008_auto_20200518_1442'),
]
operations = [
migr... | 25.52381 | 121 | 0.63806 | 410 | 0.764925 | 0 | 0 | 0 | 0 | 0 | 0 | 141 | 0.26306 |
a4696c2f89e7bc7a526efb0d4e80f4d3b7b63062 | 5,700 | py | Python | sudoku/models.py | mpilkou/django_code | 08e42ef3cdbbcdd9050e591fd97b0d8be060df6b | [
"Apache-2.0"
] | null | null | null | sudoku/models.py | mpilkou/django_code | 08e42ef3cdbbcdd9050e591fd97b0d8be060df6b | [
"Apache-2.0"
] | null | null | null | sudoku/models.py | mpilkou/django_code | 08e42ef3cdbbcdd9050e591fd97b0d8be060df6b | [
"Apache-2.0"
] | null | null | null | from django.db import models
from typing import List, Tuple
from django.core.exceptions import ValidationError
# Create your models here.
class Sudoku(models.Model):
puzzle_creation_date = models.DateField(verbose_name = 'creation date', help_text= 'puzzle creation date', auto_now=True, auto_now_add=False)
... | 41.605839 | 146 | 0.666842 | 5,553 | 0.974211 | 0 | 0 | 2,306 | 0.404561 | 0 | 0 | 449 | 0.078772 |
a46a6612483e49119e42e59a73001ccaee6e6e4f | 3,999 | py | Python | src/dbspro/cli/correctfastq.py | FrickTobias/iSeq | 3732de7716e2d379e9a4d7060dd4797fd1955ac4 | [
"MIT"
] | 1 | 2021-01-18T13:04:04.000Z | 2021-01-18T13:04:04.000Z | src/dbspro/cli/correctfastq.py | FrickTobias/iSeq | 3732de7716e2d379e9a4d7060dd4797fd1955ac4 | [
"MIT"
] | 27 | 2019-06-19T16:38:48.000Z | 2021-11-16T09:50:50.000Z | src/dbspro/cli/correctfastq.py | FrickTobias/DBSpro | 3732de7716e2d379e9a4d7060dd4797fd1955ac4 | [
"MIT"
] | 1 | 2020-02-06T10:23:00.000Z | 2020-02-06T10:23:00.000Z | """
Correct FASTQ/FASTA with the corrected sequences from starcode clustering
"""
from collections import defaultdict
import logging
import os
import statistics
from pathlib import Path
from typing import Iterator, Tuple, List, Set, Dict
import dnaio
from tqdm import tqdm
from xopen import xopen
from dbspro.utils imp... | 32.512195 | 117 | 0.656164 | 0 | 0 | 468 | 0.117029 | 0 | 0 | 0 | 0 | 908 | 0.227057 |
a46b3d879844d9ffcfd72b5b18f70207e6b4a14e | 7,204 | py | Python | quotesSpreadsheetCreator/audFileDecode.py | antoniou79/BladeRunnerSubtitles | 41cb4aaa22cba1b69f1a7dbc7d7b86dd789052e7 | [
"MIT"
] | 1 | 2018-06-19T12:32:46.000Z | 2018-06-19T12:32:46.000Z | quotesSpreadsheetCreator/audFileDecode.py | antoniou79/BladeRunnerSubtitles | 41cb4aaa22cba1b69f1a7dbc7d7b86dd789052e7 | [
"MIT"
] | null | null | null | quotesSpreadsheetCreator/audFileDecode.py | antoniou79/BladeRunnerSubtitles | 41cb4aaa22cba1b69f1a7dbc7d7b86dd789052e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
#
import ctypes
from struct import *
my_module_version = "0.50"
my_module_name = "audFileDecode"
aud_ima_index_adjust_table = [-1, -1, -1, -1, 2, 4, 6, 8]
# aud_ima_step_table has 89 entries
aud_ima_step_table = [
7, 8, 9, 10, 11, 12, 13, 14, 16,
17, 19, ... | 34.304762 | 163 | 0.658662 | 490 | 0.068018 | 0 | 0 | 0 | 0 | 0 | 0 | 2,399 | 0.333009 |
a46b76b7d31855db7ddb1a13d8f3e3d37eeece53 | 27,058 | py | Python | pythonFiles/ASCA_Functions.py | huangysh/ASCA_Cluster | 3f7ff5df514cbe48730ba0634abe7f9726d3b98e | [
"MIT"
] | null | null | null | pythonFiles/ASCA_Functions.py | huangysh/ASCA_Cluster | 3f7ff5df514cbe48730ba0634abe7f9726d3b98e | [
"MIT"
] | null | null | null | pythonFiles/ASCA_Functions.py | huangysh/ASCA_Cluster | 3f7ff5df514cbe48730ba0634abe7f9726d3b98e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# **********************************************************************************************************************
# MIT License
# Copyright (c) 2020 School of Environmental Science and Engineering, Shanghai Jiao Tong University
# Permission is hereby granted, free of charge, to any per... | 30.888128 | 120 | 0.594131 | 1,743 | 0.056898 | 0 | 0 | 0 | 0 | 0 | 0 | 12,690 | 0.414246 |
a46bdd40357855cde77818fa1c5c112a3e77af37 | 1,272 | py | Python | Chapter 10/05 - Mocks and unittest.mock module/test_mailer.py | bernoli/Expert-Python-Programming-Fourth-Edition | 05b4bd64c66bea3252f06afee7a7a1e2bd93d171 | [
"MIT"
] | 56 | 2021-05-24T15:24:51.000Z | 2022-03-21T19:38:27.000Z | Chapter 10/05 - Mocks and unittest.mock module/test_mailer.py | saibaldas/Expert-Python-Programming-Fourth-Edition | 572d47a802e7b1fe429f782d9aeb62f411cb5307 | [
"MIT"
] | 2 | 2020-11-03T12:53:26.000Z | 2021-05-11T23:47:39.000Z | Chapter 10/05 - Mocks and unittest.mock module/test_mailer.py | saibaldas/Expert-Python-Programming-Fourth-Edition | 572d47a802e7b1fe429f782d9aeb62f411cb5307 | [
"MIT"
] | 37 | 2021-05-27T12:32:21.000Z | 2022-03-10T23:05:54.000Z | from unittest.mock import patch, Mock
from mailer import send
import smtplib
def test_send_unittest():
sender = "john.doe@example.com"
to = "jane.doe@example.com"
body = "Hello jane!"
subject = "How are you?"
with patch("smtplib.SMTP") as mock:
client = mock.return_value
client.se... | 28.266667 | 57 | 0.65173 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 162 | 0.127358 |
a46bfc5a5b83914619c528c488aa8d9ed4d9753d | 6,162 | py | Python | workspace/.c9/metadata/workspace/crawl/urls.py | mannyhappenings/WebCrawler | 1451fe8e6dc55346a654665d736a7df2115e0c50 | [
"MIT"
] | null | null | null | workspace/.c9/metadata/workspace/crawl/urls.py | mannyhappenings/WebCrawler | 1451fe8e6dc55346a654665d736a7df2115e0c50 | [
"MIT"
] | null | null | null | workspace/.c9/metadata/workspace/crawl/urls.py | mannyhappenings/WebCrawler | 1451fe8e6dc55346a654665d736a7df2115e0c50 | [
"MIT"
] | null | null | null | {"filter":false,"title":"urls.py","tooltip":"/crawl/urls.py","undoManager":{"mark":41,"position":41,"stack":[[{"group":"doc","deltas":[{"start":{"row":5,"column":42},"end":{"row":6,"column":0},"action":"insert","lines":["",""]},{"start":{"row":6,"column":0},"end":{"row":6,"column":4},"action":"insert","lines":[" "]}... | 6,162 | 6,162 | 0.542681 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,333 | 0.703181 |
a46c23843edc73519673ebfe146fa5d2ec8aa8a4 | 7,000 | py | Python | legacy/notebooks/Language Model - BPE.py | ceshine/modern_chinese_nlp | e1d5941f381431ac114f440472d3e0f976437777 | [
"MIT"
] | 42 | 2018-08-21T05:31:18.000Z | 2021-08-30T02:00:05.000Z | legacy/notebooks/Language Model - BPE.py | ceshine/modern_chinese_nlp | e1d5941f381431ac114f440472d3e0f976437777 | [
"MIT"
] | null | null | null | legacy/notebooks/Language Model - BPE.py | ceshine/modern_chinese_nlp | e1d5941f381431ac114f440472d3e0f976437777 | [
"MIT"
] | 7 | 2018-08-21T09:04:17.000Z | 2021-03-28T06:25:28.000Z |
# coding: utf-8
# In[1]:
import sys
sys.path.append("../")
# In[2]:
from pathlib import Path
from functools import partial
import joblib
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from fastai.text import LanguageModelLoader, LanguageModelData
from fastai.core i... | 17.5 | 129 | 0.618286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,100 | 0.283937 |
a46caa769bacecd220bd2803dcc01b740d0f7a7d | 2,576 | py | Python | controller/components/badger.py | cclauss/flight-lab | d2dfcc842391c287970b14e470f209665a233b59 | [
"Apache-2.0"
] | 15 | 2018-10-18T07:50:46.000Z | 2021-10-21T03:40:55.000Z | controller/components/badger.py | cclauss/flight-lab | d2dfcc842391c287970b14e470f209665a233b59 | [
"Apache-2.0"
] | 9 | 2018-09-17T23:00:02.000Z | 2019-01-22T21:08:04.000Z | controller/components/badger.py | cclauss/flight-lab | d2dfcc842391c287970b14e470f209665a233b59 | [
"Apache-2.0"
] | 12 | 2019-01-07T12:43:37.000Z | 2021-10-21T03:40:44.000Z | # Copyright 2018 Flight Lab 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 33.025641 | 125 | 0.727873 | 1,830 | 0.710404 | 0 | 0 | 0 | 0 | 0 | 0 | 1,163 | 0.451475 |
a470aba9fce332f6e5b9f8335122d8eef4080e8a | 1,332 | py | Python | adhoc.py | oudmane/excelcy | 25263d16db0cda24fe66ab3d52ff08a770117dc1 | [
"MIT"
] | 99 | 2018-07-19T17:32:26.000Z | 2022-02-01T18:10:57.000Z | adhoc.py | oudmane/excelcy | 25263d16db0cda24fe66ab3d52ff08a770117dc1 | [
"MIT"
] | 15 | 2018-07-20T01:34:32.000Z | 2020-08-25T09:14:28.000Z | adhoc.py | oudmane/excelcy | 25263d16db0cda24fe66ab3d52ff08a770117dc1 | [
"MIT"
] | 11 | 2018-07-20T03:30:29.000Z | 2021-12-14T22:38:23.000Z | from excelcy import ExcelCy
from excelcy.storage import Config
# test_string = 'Android Pay expands to Canada'
# excelcy = ExcelCy()
# excelcy.storage.config = Config(nlp_base='en_core_web_sm', train_iteration=50, train_drop=0.2)
# doc = excelcy.nlp(test_string)
# # showing no ORG
# print([(ent.label_, ent.text) for e... | 40.363636 | 148 | 0.720721 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,043 | 0.783033 |
a4756366de9ce838849093fa734c08d1d1fc9abf | 4,978 | py | Python | lambda/frequencyQueries.py | NickStrick/Code-Challenges | b6c13357783d3b556e90349ccc6f9bb568a3531d | [
"MIT"
] | null | null | null | lambda/frequencyQueries.py | NickStrick/Code-Challenges | b6c13357783d3b556e90349ccc6f9bb568a3531d | [
"MIT"
] | null | null | null | lambda/frequencyQueries.py | NickStrick/Code-Challenges | b6c13357783d3b556e90349ccc6f9bb568a3531d | [
"MIT"
] | null | null | null | # https://youtu.be/O3HBd0ICJ2M
# defaultdict is the same as normal dictionaries, except a defaultdict
# sets a default value if a key has not been set yet; this is mostly
# for convenience
from collections import defaultdict
def freqQuery(queries):
val_counts = defaultdict(int)
freq_counts = defaultdict(int)... | 37.712121 | 87 | 0.546203 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,710 | 0.743785 |
a475dd4e9e3743b42f2405054585911fbb5f8a22 | 1,663 | py | Python | char-rnn-name-classification/train.py | StanleyLsx/practical-pytorch | ccc9ebad47ca6763c04dbb8574769cfe3f1acdde | [
"MIT"
] | null | null | null | char-rnn-name-classification/train.py | StanleyLsx/practical-pytorch | ccc9ebad47ca6763c04dbb8574769cfe3f1acdde | [
"MIT"
] | 2 | 2021-06-08T22:12:46.000Z | 2022-01-13T03:11:10.000Z | char-rnn-name-classification/train.py | StanleyLsx/practical-pytorch | ccc9ebad47ca6763c04dbb8574769cfe3f1acdde | [
"MIT"
] | null | null | null | from data import *
from model import *
import time
import math
n_hidden = 128
n_epochs = 100000
print_every = 5000
plot_every = 1000
learning_rate = 0.005 # If you set this too high, it might explode. If too low, it might not learn
rnn = RNN(n_letters, n_hidden, n_categories)
optimizer = torch.optim.SGD(rnn.paramet... | 25.584615 | 99 | 0.657246 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 280 | 0.167966 |
a4774d5aae891207d351e4416da7e1e5f7ee2c3e | 8,623 | py | Python | flow_models/elephants/plot.py | piotrjurkiewicz/flow_stats | cc97a8381275cb9dd23ed0c3432abffaf4198431 | [
"MIT"
] | 9 | 2019-07-08T09:53:22.000Z | 2021-11-19T07:50:11.000Z | flow_models/elephants/plot.py | ElsevierSoftwareX/SOFTX-D-21-00003 | cc97a8381275cb9dd23ed0c3432abffaf4198431 | [
"MIT"
] | 1 | 2021-02-23T16:01:21.000Z | 2021-04-03T02:06:32.000Z | flow_models/elephants/plot.py | ElsevierSoftwareX/SOFTX-D-21-00003 | cc97a8381275cb9dd23ed0c3432abffaf4198431 | [
"MIT"
] | 5 | 2019-09-27T14:52:54.000Z | 2022-01-25T07:58:24.000Z | #!/usr/bin/python3
import argparse
import collections
import pathlib
import matplotlib.pyplot as plt
import matplotlib.ticker
import numpy as np
import pandas as pd
from flow_models.elephants.calculate import calculate
from flow_models.lib.data import UNITS
from flow_models.lib.plot import save_figure, matplotlib_con... | 37.491304 | 108 | 0.542851 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,388 | 0.160965 |
a478270c7b8db02341ebf2b97bc4d6dc8730a15f | 6,828 | py | Python | config/settings/base.py | razortheory/who-iwg-webapp | e2318d286cd9ab87d4d8103bc7b3072cfb99bf76 | [
"MIT"
] | null | null | null | config/settings/base.py | razortheory/who-iwg-webapp | e2318d286cd9ab87d4d8103bc7b3072cfb99bf76 | [
"MIT"
] | null | null | null | config/settings/base.py | razortheory/who-iwg-webapp | e2318d286cd9ab87d4d8103bc7b3072cfb99bf76 | [
"MIT"
] | null | null | null | import environ
# Build paths inside the project like this: root(...)
from django.core.urlresolvers import reverse_lazy
env = environ.Env()
root = environ.Path(__file__) - 3
apps_root = root.path('iwg_blog')
BASE_DIR = root()
environ.Env.read_env()
# Base configurations
# ----------------------------------------... | 26.776471 | 111 | 0.596368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,781 | 0.700205 |
a4782d0bc5bb18270fcd908cc440367a270780e4 | 958 | py | Python | poptions/BlackScholes.py | Talha-Tariq/poptions | 4bc54b7c31ec57a3b1094aafdd103c7d0a711519 | [
"MIT"
] | 27 | 2021-12-06T21:56:56.000Z | 2022-03-13T20:44:30.000Z | poptions/BlackScholes.py | Talha-Tariq/poptions | 4bc54b7c31ec57a3b1094aafdd103c7d0a711519 | [
"MIT"
] | null | null | null | poptions/BlackScholes.py | Talha-Tariq/poptions | 4bc54b7c31ec57a3b1094aafdd103c7d0a711519 | [
"MIT"
] | 7 | 2021-12-06T23:13:31.000Z | 2021-12-18T04:00:58.000Z | from numba import jit
from math import log, sqrt, exp, erf
def blackScholesPut(s, k, rr, tt, sd):
if tt == 0 and (s / k > 1):
p = 0
elif tt == 0 and (s / k < 1):
p = k - s
elif tt == 0 and (s / k == 1):
p = 0
else:
d1 = (log(s / k) + (rr + (1 / 2) * sd ** 2) * tt) / (sd... | 28.176471 | 109 | 0.387265 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a4782f2535bfc86b20dfc387ade673021d013c90 | 2,088 | py | Python | multiview/db/saxs_v2/db_config.py | bsmind/react-multisciview | 613dbe327542d0384e5d6b87697a05db17f42ca8 | [
"MIT"
] | null | null | null | multiview/db/saxs_v2/db_config.py | bsmind/react-multisciview | 613dbe327542d0384e5d6b87697a05db17f42ca8 | [
"MIT"
] | null | null | null | multiview/db/saxs_v2/db_config.py | bsmind/react-multisciview | 613dbe327542d0384e5d6b87697a05db17f42ca8 | [
"MIT"
] | 1 | 2020-08-28T16:27:15.000Z | 2020-08-28T16:27:15.000Z | MONGODB_CONFIG = {
'ROOT': '/Users/scott/Documents/Work/bnl/MultiView/pyServer/data/saxs/',
# mongo db set-up
'DB': {
#'HOST': 'visws.csi.bnl.gov',
'HOST': 'localhost',
'PORT': 27017,
'NAME': 'multiview_saxs_v2',
'COLLECTION': 'saxs_v2'
},
# parsing xml file... | 22.212766 | 86 | 0.45546 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,185 | 0.567529 |
a479239492621d9e94b74d01d6b7559292d39674 | 415 | py | Python | ch06/hw06_03/hw06_03.py | z2x3c4v5bz/pybook_wenlongtsai_etc | 0a3e90d9f53a1d33e31b27f40de8abdce56e7e2a | [
"MIT"
] | 4 | 2021-06-12T07:51:22.000Z | 2021-12-20T11:35:12.000Z | ch06/hw06_03/hw06_03.py | z2x3c4v5bz/pybook_wenlongtsai_etc | 0a3e90d9f53a1d33e31b27f40de8abdce56e7e2a | [
"MIT"
] | null | null | null | ch06/hw06_03/hw06_03.py | z2x3c4v5bz/pybook_wenlongtsai_etc | 0a3e90d9f53a1d33e31b27f40de8abdce56e7e2a | [
"MIT"
] | 1 | 2021-11-08T03:36:43.000Z | 2021-11-08T03:36:43.000Z | # hw06_03
import random
def makesentence():
subjects = ['Dog', 'Cat', 'Monkey', 'Pig', 'Fox']
verbs = ['walks', 'runs', 'jumps']
advs = ['slowly', 'quickly']
print('%s %s %s.' % (random.choice(subjects), random.choice(verbs), random.choice(advs)))
for i in range(5):
makesentence()
'''
Cat walk... | 17.291667 | 93 | 0.624096 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 192 | 0.462651 |
a47acd60891c08f70a65acabe0a7b03b7c1a3a1f | 1,482 | py | Python | dci/api/v1/audits.py | redhat-cip/dci-control-server | 6dee30e7b8770fde2466f2b09554d299a3f3db4d | [
"Apache-2.0"
] | 17 | 2016-09-02T09:21:29.000Z | 2021-09-27T11:33:58.000Z | dci/api/v1/audits.py | redhat-cip/dci-control-server | 6dee30e7b8770fde2466f2b09554d299a3f3db4d | [
"Apache-2.0"
] | 80 | 2015-12-09T09:29:26.000Z | 2021-01-06T08:24:22.000Z | dci/api/v1/audits.py | redhat-cip/dci-control-server | 6dee30e7b8770fde2466f2b09554d299a3f3db4d | [
"Apache-2.0"
] | 10 | 2015-09-29T21:34:53.000Z | 2021-09-27T11:34:01.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2016 Red Hat, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 30.244898 | 75 | 0.695682 | 0 | 0 | 0 | 0 | 649 | 0.437922 | 0 | 0 | 661 | 0.446019 |
a47ad8b5997995620bf43529f5fc03e2a2cb0078 | 1,017 | py | Python | app/app.py | jaswged/die-detector-api | 249ce50ac340e73a3ce05a2c7ed4f5874a002ab9 | [
"MIT"
] | null | null | null | app/app.py | jaswged/die-detector-api | 249ce50ac340e73a3ce05a2c7ed4f5874a002ab9 | [
"MIT"
] | 2 | 2020-01-07T04:17:58.000Z | 2020-01-08T01:21:30.000Z | app/app.py | jaswged/die-detector-api | 249ce50ac340e73a3ce05a2c7ed4f5874a002ab9 | [
"MIT"
] | null | null | null | # Common python package imports.
from flask import Flask, jsonify, request, render_template
from fastai.vision import *
# Initialize the app and set a secret_key.
app = Flask(__name__)
app.secret_key = 'something_secret'
# Load the pickled model.
defaults.device = torch.device('cpu')
path = '.'
learn = load_learner(p... | 24.804878 | 63 | 0.654867 | 0 | 0 | 0 | 0 | 586 | 0.576205 | 0 | 0 | 256 | 0.251721 |
a47af5d98f82e7d880c1857ba14e7365fcae7341 | 651 | py | Python | junopy/entities/pix.py | robertons/junopy | 1acc64ab99d8ea49bb0dac979cd34da43541f243 | [
"MIT"
] | 3 | 2021-07-12T15:05:13.000Z | 2022-01-31T03:35:43.000Z | junopy/entities/pix.py | robertons/junopy | 1acc64ab99d8ea49bb0dac979cd34da43541f243 | [
"MIT"
] | 2 | 2022-01-29T20:14:51.000Z | 2022-02-07T16:16:24.000Z | junopy/entities/pix.py | robertons/junopy | 1acc64ab99d8ea49bb0dac979cd34da43541f243 | [
"MIT"
] | 1 | 2022-02-01T18:36:10.000Z | 2022-02-01T18:36:10.000Z | # -*- coding: utf-8 -*-
from .lib import *
class Pix(JunoEntity):
def __init__(cls, **kw):
cls.__metadata__ = {}
# FIELDS
cls.id = String(max=80)
cls.key = String(max=80)
cls.type = String(max=80)
cls.includeImage = Boolean()
cls.payloadInBase64 = String(... | 25.038462 | 54 | 0.574501 | 605 | 0.929339 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.06298 |
a47c334a555b693920253650bff0bc339bbe9c5d | 1,942 | py | Python | my_site/blog/migrations/0001_initial.py | goulartdev/udemy-django-course | f39ab36aacdf47d19f8c286c317cc54d8358dadc | [
"MIT"
] | null | null | null | my_site/blog/migrations/0001_initial.py | goulartdev/udemy-django-course | f39ab36aacdf47d19f8c286c317cc54d8358dadc | [
"MIT"
] | null | null | null | my_site/blog/migrations/0001_initial.py | goulartdev/udemy-django-course | f39ab36aacdf47d19f8c286c317cc54d8358dadc | [
"MIT"
] | null | null | null | # Generated by Django 3.2.6 on 2021-09-05 19:03
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Author',... | 38.84 | 132 | 0.572606 | 1,786 | 0.91967 | 0 | 0 | 0 | 0 | 0 | 0 | 256 | 0.131823 |
a47dcee5032ab075d6193e94f9980e3ad05e9976 | 808 | py | Python | tests/data/data_generator.py | stefan-feltmann/lands | b2f1fc3aab4895763160a135d085a17dceb5f58e | [
"MIT"
] | null | null | null | tests/data/data_generator.py | stefan-feltmann/lands | b2f1fc3aab4895763160a135d085a17dceb5f58e | [
"MIT"
] | null | null | null | tests/data/data_generator.py | stefan-feltmann/lands | b2f1fc3aab4895763160a135d085a17dceb5f58e | [
"MIT"
] | null | null | null | """ This program generates some of the data used by tests other data samples could have been
obtained simply by running the program.
The data lives in the worldengine-data repo: https://github.com/Mindwerks/worldengine-data
Note that we want to have common data in tests, instead of generating them on the fly
because ... | 35.130435 | 92 | 0.766089 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 448 | 0.554455 |
a47dfd8a85fa11294eeba0802fd320de772c838c | 569 | py | Python | django_select2_chained/__init__.py | djkartsa/django-select2-chained | 63a57065a92d2934bda345ca2301151c799a0971 | [
"MIT"
] | null | null | null | django_select2_chained/__init__.py | djkartsa/django-select2-chained | 63a57065a92d2934bda345ca2301151c799a0971 | [
"MIT"
] | 2 | 2016-02-11T14:53:54.000Z | 2016-04-09T04:06:26.000Z | django_select2_chained/__init__.py | djkartsa/django-select2-chained | 63a57065a92d2934bda345ca2301151c799a0971 | [
"MIT"
] | null | null | null | """
Chainable fields for Django-Select2_.
.. _Django-Select2: https://github.com/applegrew/django-select2
Widgets
-------
**Available widgets:**
- :py:class:`.ChainedAutoSelect2Widget`,
- :py:class:`.PrepopulatedSelect2Widget`
Fields
------
**Available fields and mixins:**
- :py:class:`.ChainedAutoModelSelect2Fi... | 18.354839 | 63 | 0.743409 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 498 | 0.87522 |
a47e22c2a0cc7d55c5e439122397bc64272708be | 11,203 | py | Python | rstring/__init__.py | phantie/mutable-string | 3a944528e777aecdec0ff8d6cc09585a8543874b | [
"MIT"
] | null | null | null | rstring/__init__.py | phantie/mutable-string | 3a944528e777aecdec0ff8d6cc09585a8543874b | [
"MIT"
] | null | null | null | rstring/__init__.py | phantie/mutable-string | 3a944528e777aecdec0ff8d6cc09585a8543874b | [
"MIT"
] | null | null | null | from __future__ import annotations
from functools import partialmethod, wraps
from array import array
from typing import NewType, Union, Callable, Iterable, Generator, Type
from ruption import some, none
from take import take
__all__ = ('String',)
__version__ = '0.5.3'
def no_mut(f):
if __debug__:
@wrap... | 27.060386 | 114 | 0.560743 | 10,564 | 0.942962 | 413 | 0.036865 | 6,495 | 0.579755 | 0 | 0 | 610 | 0.05445 |
a47ea1f3b9daa8db7fc8245fb0cffd99591ee6a0 | 2,160 | py | Python | portfolio/Python/scrapy/outillage/conrad.py | 0--key/lib | ba7a85dda2b208adc290508ca617bdc55a5ded22 | [
"Apache-2.0"
] | null | null | null | portfolio/Python/scrapy/outillage/conrad.py | 0--key/lib | ba7a85dda2b208adc290508ca617bdc55a5ded22 | [
"Apache-2.0"
] | null | null | null | portfolio/Python/scrapy/outillage/conrad.py | 0--key/lib | ba7a85dda2b208adc290508ca617bdc55a5ded22 | [
"Apache-2.0"
] | 5 | 2016-03-22T07:40:46.000Z | 2021-05-30T16:12:21.000Z | import re
import os
from scrapy.spider import BaseSpider
from scrapy.selector import HtmlXPathSelector
from scrapy.http import Request, HtmlResponse
from scrapy.utils.response import get_base_url
from scrapy.utils.url import urljoin_rfc
from urllib import urlencode
import hashlib
import csv
from product_spiders.item... | 36 | 99 | 0.635648 | 1,733 | 0.802315 | 1,475 | 0.68287 | 0 | 0 | 0 | 0 | 398 | 0.184259 |
a4802afac574148b5859220281cf9ffcab44e0f3 | 357 | py | Python | En Route Salute/solution.py | sark-2110/Foobar-Google | 51620fd3294c4fa24a4ba444534883a9eff5a7f9 | [
"MIT"
] | 1 | 2021-05-15T19:30:07.000Z | 2021-05-15T19:30:07.000Z | En Route Salute/solution.py | sark-2110/Foobar-Google | 51620fd3294c4fa24a4ba444534883a9eff5a7f9 | [
"MIT"
] | null | null | null | En Route Salute/solution.py | sark-2110/Foobar-Google | 51620fd3294c4fa24a4ba444534883a9eff5a7f9 | [
"MIT"
] | 3 | 2021-09-20T14:37:39.000Z | 2022-02-09T21:47:07.000Z | #python3 code
def count(i,s):
ans=0
for j in range(i,len(s)):
if(s[j]=="<"):
ans+=1
return ans
def higher(s):
res=0
for i in range(len(s)):
if(s[i]==">"):
b=count(i,s)
res=res+(b*2)
return res
def solution(s):
# Your code here
... | 16.227273 | 29 | 0.462185 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0.098039 |
a4826abb269c9b1e496e442524fa5f81ca95d1ce | 281 | py | Python | src/rubrix/server/tasks/api.py | drahnreb/rubrix | 340e545baf4d65a0d94e3c671ad6c93ff1d59700 | [
"Apache-2.0"
] | null | null | null | src/rubrix/server/tasks/api.py | drahnreb/rubrix | 340e545baf4d65a0d94e3c671ad6c93ff1d59700 | [
"Apache-2.0"
] | null | null | null | src/rubrix/server/tasks/api.py | drahnreb/rubrix | 340e545baf4d65a0d94e3c671ad6c93ff1d59700 | [
"Apache-2.0"
] | null | null | null | from fastapi import APIRouter
from .text_classification import api as text_classification
from .token_classification import api as token_classification
router = APIRouter()
for task_api in [text_classification, token_classification]:
router.include_router(task_api.router)
| 25.545455 | 61 | 0.836299 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |