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
d00b60aaa781272c43b31aa8c0398a217c133f07
1,863
py
Python
admin_reskin/templatetags/sort_menu_items.py
cuongnb14/django-admin-reskin
9245b60195892e8a3d51294ec70692714452bc29
[ "MIT" ]
null
null
null
admin_reskin/templatetags/sort_menu_items.py
cuongnb14/django-admin-reskin
9245b60195892e8a3d51294ec70692714452bc29
[ "MIT" ]
null
null
null
admin_reskin/templatetags/sort_menu_items.py
cuongnb14/django-admin-reskin
9245b60195892e8a3d51294ec70692714452bc29
[ "MIT" ]
null
null
null
from django import template from django.conf import settings from ..models import Bookmark register = template.Library() RESKIN_MENU_APP_ORDER = settings.RESKIN_MENU_APP_ORDER RESKIN_MENU_MODEL_ORDER = settings.RESKIN_MENU_MODEL_ORDER RESKIN_APP_ICON = settings.RESKIN_APP_ICON @register.filter def sort_apps(apps):...
27.397059
84
0.607085
0
0
0
0
1,576
0.845947
0
0
353
0.189479
d00bef4cf659464b2641f10ea3856a63d0a1dab5
1,537
py
Python
fda/db.py
tsbischof/fda510k
40065cc873547ceaf992bd0f51e24fe2b2ea4387
[ "BSD-2-Clause" ]
null
null
null
fda/db.py
tsbischof/fda510k
40065cc873547ceaf992bd0f51e24fe2b2ea4387
[ "BSD-2-Clause" ]
3
2021-08-31T14:00:17.000Z
2021-09-01T20:47:06.000Z
fda/db.py
tsbischof/fda
40065cc873547ceaf992bd0f51e24fe2b2ea4387
[ "BSD-2-Clause" ]
null
null
null
import os import io import urllib.request import zipfile import pandas import fda def get_510k_db(root_dir=os.path.join(fda.root_db_dir, "510k"), force_download=False): if not os.path.exists(root_dir): os.makedirs(root_dir) db_urls = [ "http://www.accessdata.fda.gov/...
34.155556
84
0.63175
0
0
0
0
0
0
0
0
395
0.256994
d00e57b669e23409bb8d461e39ac2d007f53bbe7
4,657
py
Python
inpr/get_num_plate.py
patrickn699/INPR
737a3454a4b83e51e50937bb227ac7f8bc01d0e9
[ "MIT" ]
2
2021-09-25T06:00:40.000Z
2021-10-14T13:24:43.000Z
inpr/get_num_plate.py
patrickn699/INPR
737a3454a4b83e51e50937bb227ac7f8bc01d0e9
[ "MIT" ]
null
null
null
inpr/get_num_plate.py
patrickn699/INPR
737a3454a4b83e51e50937bb227ac7f8bc01d0e9
[ "MIT" ]
1
2022-01-27T11:39:10.000Z
2022-01-27T11:39:10.000Z
import numpy as np import matplotlib.pyplot as plt import re as r import easyocr #import os #os.environ['KMP_DUPLICATE_LIB_OK']='True' re = easyocr.Reader(['en']) #pl = [] chk = [] a = '' a1 = '' #pl = [] #sym = ['{', ']', '[', '}'] class get_number_plate: def get_bboxes_from(self, output): """ returns...
26.01676
205
0.428817
4,418
0.948679
0
0
0
0
0
0
2,010
0.431608
d00eac7a88a79181fbec1ff905386e4e480a89db
3,632
py
Python
client/nodes/detector_docker/sign_filter_node.py
CanboYe/BusEdge
2e53e1d1d82559fc3e9f0029b2f0faf4e356b210
[ "MIT", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
2
2021-08-17T14:14:28.000Z
2022-02-02T02:09:33.000Z
client/nodes/detector_docker/sign_filter_node.py
cmusatyalab/gabriel-BusEdge
528a6ee337882c6e709375ecd7ec7e201083c825
[ "MIT", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
client/nodes/detector_docker/sign_filter_node.py
cmusatyalab/gabriel-BusEdge
528a6ee337882c6e709375ecd7ec7e201083c825
[ "MIT", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
1
2021-09-01T16:18:29.000Z
2021-09-01T16:18:29.000Z
# SPDX-FileCopyrightText: 2021 Carnegie Mellon University # # SPDX-License-Identifier: Apache-2.0 import logging import cv2 from busedge_protocol import busedge_pb2 from gabriel_protocol import gabriel_pb2 from sign_filter import SignFilter logger = logging.getLogger(__name__) import argparse import multiprocessing...
28.155039
87
0.681718
0
0
0
0
0
0
0
0
632
0.174009
d01001102fad7912a59abc8be03d31f0294830cb
3,095
py
Python
collector/cli.py
mvinii94/aws-lambda-log-collector
682850f282b70aa18663699c7e5e32bc4f6a8be1
[ "MIT" ]
4
2019-11-13T12:49:31.000Z
2020-11-19T06:59:45.000Z
collector/cli.py
mvinii94/aws-lambda-log-collector
682850f282b70aa18663699c7e5e32bc4f6a8be1
[ "MIT" ]
null
null
null
collector/cli.py
mvinii94/aws-lambda-log-collector
682850f282b70aa18663699c7e5e32bc4f6a8be1
[ "MIT" ]
null
null
null
import click from pathlib import Path # Local imports from .__init__ import * from .utils import parse_time, create_dir, write_file, get_profiles, compress, INVALID_PROFILE, INVALID_DATES from .lambda_log_collector import LambdaLogCollector @click.command() @click.version_option() @click.option("--function-name", "-...
41.824324
120
0.695315
0
0
0
0
2,850
0.92084
0
0
718
0.231987
d0108ea8045cdfac005ba75c029402f4c357985e
78
py
Python
Chapter11/flask-app.py
arifmudi/Data-Processing-with-Optimus
4f909c893e51a55714a85cf379b8e817b995612d
[ "MIT" ]
6
2020-12-08T15:21:08.000Z
2022-03-14T03:39:14.000Z
Chapter11/flask-app.py
arifmudi/Data-Processing-with-Optimus
4f909c893e51a55714a85cf379b8e817b995612d
[ "MIT" ]
null
null
null
Chapter11/flask-app.py
arifmudi/Data-Processing-with-Optimus
4f909c893e51a55714a85cf379b8e817b995612d
[ "MIT" ]
2
2021-06-24T14:09:38.000Z
2021-08-09T08:02:00.000Z
import sys sys.path.append('../../../optimus') from optimus.server import app
19.5
35
0.705128
0
0
0
0
0
0
0
0
18
0.230769
d0159e9e7bbcc76b698e4bc18244e26a32e8736f
1,068
py
Python
rllib/environment/mdps/__init__.py
shenao-zhang/DCPU
0da9aa2b7878b54ba4ee4dca894c2e86cdc0d559
[ "MIT" ]
8
2020-10-23T07:52:19.000Z
2022-03-06T13:35:12.000Z
rllib/environment/mdps/__init__.py
shenao-zhang/DCPU
0da9aa2b7878b54ba4ee4dca894c2e86cdc0d559
[ "MIT" ]
3
2021-03-04T13:44:01.000Z
2021-03-23T09:57:50.000Z
rllib/environment/mdps/__init__.py
shenao-zhang/DCPU
0da9aa2b7878b54ba4ee4dca894c2e86cdc0d559
[ "MIT" ]
3
2021-03-18T08:23:56.000Z
2021-07-06T11:20:12.000Z
"""Common MDPs in RL literature.""" from gym.envs.registration import register from .baird_star import BairdStar from .boyan_chain import BoyanChain from .double_chain import DoubleChainProblem from .grid_world import EasyGridWorld from .random_mdp import RandomMDP from .single_chain import SingleChainProblem from .tw...
33.375
88
0.801498
0
0
0
0
0
0
0
0
510
0.477528
d01640b2fef264dfd84ea3721e0ecaa46ce8a2a7
2,072
py
Python
common/data_helper.py
ThisIsSoSteve/Project-Tensorflow-Cars
6cdfedceffa56ac0885ce2253dae4549859b2dbf
[ "MIT" ]
1
2017-05-11T06:01:46.000Z
2017-05-11T06:01:46.000Z
common/data_helper.py
ThisIsSoSteve/Project-Tensorflow-Cars
6cdfedceffa56ac0885ce2253dae4549859b2dbf
[ "MIT" ]
2
2017-05-11T10:03:16.000Z
2017-06-21T18:25:00.000Z
common/data_helper.py
ThisIsSoSteve/Project-Tensorflow-Cars
6cdfedceffa56ac0885ce2253dae4549859b2dbf
[ "MIT" ]
null
null
null
import glob import pickle from shutil import copy from tqdm import tqdm class DataHelper: """ helpers to transform and move data around add more as needed. """ def copy_specific_training_data_to_new_folder(self, source_folder_path, destination_folder_path, ...
35.118644
100
0.639479
1,706
0.823359
0
0
0
0
0
0
993
0.479247
d017493522e0d4e934860f36259d7cd6e8ff4de0
1,009
py
Python
swifitool/faults/flp.py
chenoya/swifi-tool
9386fab56e12d83cbe14024b5d5edac0fd1e3baf
[ "MIT" ]
null
null
null
swifitool/faults/flp.py
chenoya/swifi-tool
9386fab56e12d83cbe14024b5d5edac0fd1e3baf
[ "MIT" ]
null
null
null
swifitool/faults/flp.py
chenoya/swifi-tool
9386fab56e12d83cbe14024b5d5edac0fd1e3baf
[ "MIT" ]
null
null
null
from faults.faultmodel import FaultModel from utils import * class FLP(FaultModel): name = 'FLP' docs = ' FLP addr significance \t flip one specific bit' nb_args = 2 def __init__(self, config, args): super().__init__(config, args) self.addr = parse_addr(args[0]) check_or_fa...
34.793103
93
0.617443
945
0.936571
0
0
0
0
0
0
164
0.162537
d0199dc840ae15f108dd63b1047696f29f1a9218
1,488
py
Python
tests/test_warp.py
Krande/ipygany
471355d043e3952ac68052613135fd5a5ee3a41b
[ "BSD-3-Clause" ]
450
2019-11-29T07:19:42.000Z
2022-03-27T08:38:18.000Z
tests/test_warp.py
Krande/ipygany
471355d043e3952ac68052613135fd5a5ee3a41b
[ "BSD-3-Clause" ]
47
2019-12-14T00:57:14.000Z
2022-01-27T16:14:40.000Z
tests/test_warp.py
Krande/ipygany
471355d043e3952ac68052613135fd5a5ee3a41b
[ "BSD-3-Clause" ]
51
2019-11-29T07:19:48.000Z
2022-03-25T13:07:19.000Z
import pytest from traitlets import TraitError from ipygany import PolyMesh, Warp from .utils import get_test_assets def test_default_input(): vertices, triangles, data_1d, data_3d = get_test_assets() poly = PolyMesh(vertices=vertices, triangle_indices=triangles, data=[data_1d, data_3d]) warped_mesh ...
26.571429
91
0.636425
0
0
0
0
0
0
0
0
88
0.05914
d01a949b661519f2a818675ee51e8c4ae04571b0
3,120
py
Python
MLGame/games/snake/ml/rule.py
Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING
f4a58d0d9f5832a77a4a86352e084065dc7bae50
[ "MIT" ]
null
null
null
MLGame/games/snake/ml/rule.py
Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING
f4a58d0d9f5832a77a4a86352e084065dc7bae50
[ "MIT" ]
null
null
null
MLGame/games/snake/ml/rule.py
Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING
f4a58d0d9f5832a77a4a86352e084065dc7bae50
[ "MIT" ]
null
null
null
""" The template of the script for playing the game in the ml mode """ class MLPlay: def __init__(self): """ Constructor """ self.direction = 0#上下左右 :1,2,3,4 self.current_x = 0 self.current_y = 0 self.last_x = 0 self.last_y = 0 self.x_dir = 0...
32.5
88
0.458013
3,079
0.97684
0
0
0
0
0
0
492
0.156091
d01ad5a73de06c489b92a116216a85d95752401d
856
py
Python
CodingInterviews/python/37_get_num_of_k_2.py
YorkFish/git_study
6e023244daaa22e12b24e632e76a13e5066f2947
[ "MIT" ]
null
null
null
CodingInterviews/python/37_get_num_of_k_2.py
YorkFish/git_study
6e023244daaa22e12b24e632e76a13e5066f2947
[ "MIT" ]
null
null
null
CodingInterviews/python/37_get_num_of_k_2.py
YorkFish/git_study
6e023244daaa22e12b24e632e76a13e5066f2947
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding:utf-8 class Solution: def GetNumberOfK(self, data, k): if data == [] or k > data[-1]: return 0 def binSearch(data, num): left = 0 right = len(data) - 1 while left < right: mid = left + (right - left) /...
20.878049
48
0.408879
593
0.692757
0
0
0
0
0
0
104
0.121495
d01b679428fa012cfcf64fb9a0547f3b7aa6be3a
2,850
py
Python
sborl/errors.py
canonical/sborl
f821ecfcbf977d0605def66dca19ea5e8e39b5a3
[ "Apache-2.0" ]
null
null
null
sborl/errors.py
canonical/sborl
f821ecfcbf977d0605def66dca19ea5e8e39b5a3
[ "Apache-2.0" ]
null
null
null
sborl/errors.py
canonical/sborl
f821ecfcbf977d0605def66dca19ea5e8e39b5a3
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 Canonical Ltd. # See LICENSE file for licensing details. from typing import Union from ops.model import Application, Relation, Unit class BaseException(Exception): """Base exception for exceptions from this library.""" class InvalidRoleError(BaseException): """The specified role is not one...
28.217822
88
0.698246
2,658
0.932632
0
0
0
0
0
0
1,432
0.502456
d01bbe0df932770a9de781be883abde7e781fb15
23,356
py
Python
PerceptualLoss.py
kirill-pinigin/DeepImageDenoiser
9a228c821bd3960688a4ed35f47f4767d226b57c
[ "Apache-2.0" ]
null
null
null
PerceptualLoss.py
kirill-pinigin/DeepImageDenoiser
9a228c821bd3960688a4ed35f47f4767d226b57c
[ "Apache-2.0" ]
null
null
null
PerceptualLoss.py
kirill-pinigin/DeepImageDenoiser
9a228c821bd3960688a4ed35f47f4767d226b57c
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn from torchvision import models from torch.autograd import Variable from torch.nn.parameter import Parameter from DeepImageDenoiser import LR_THRESHOLD, DIMENSION, LEARNING_RATE from NeuralModels import SpectralNorm ITERATION_LIMIT = int(1e6) SQUEEZENET_CONFIG = {'dnn' : models.squ...
45.088803
163
0.630074
22,527
0.964506
0
0
614
0.026289
0
0
490
0.02098
d01c9a230584278712c3050c6c3bb720320fb106
682
py
Python
app/main/views.py
diellamutoni8/NewsAPPS
09701c96f687e08de2992e56da4f261b1aadf93c
[ "MIT" ]
null
null
null
app/main/views.py
diellamutoni8/NewsAPPS
09701c96f687e08de2992e56da4f261b1aadf93c
[ "MIT" ]
null
null
null
app/main/views.py
diellamutoni8/NewsAPPS
09701c96f687e08de2992e56da4f261b1aadf93c
[ "MIT" ]
null
null
null
from flask import render_template,request,redirect,url_for from .import main from ..request import get_sources,get_articles from ..models import News_article,News_source @main.route('/') def index(): ''' Home page function returns news sources ''' news_sources = get_sources() title = "Welcome" ...
25.259259
82
0.717009
0
0
0
0
509
0.746334
0
0
197
0.288856
d01da04f511cea7e2cb3c255526d51bbef8b8016
724
py
Python
models/todo.py
chidaobanjiu/Flask_Web
7f8d33086ca307ae7f1b998ed7d52e27fc625388
[ "MIT" ]
1
2017-02-01T07:13:37.000Z
2017-02-01T07:13:37.000Z
models/todo.py
chidaobanjiu/mana2077
7f8d33086ca307ae7f1b998ed7d52e27fc625388
[ "MIT" ]
null
null
null
models/todo.py
chidaobanjiu/mana2077
7f8d33086ca307ae7f1b998ed7d52e27fc625388
[ "MIT" ]
null
null
null
from models import Mongua class Todo(Mongua): __field__ = Mongua.__fields__ + [ ('title', str, ''), ('completed', bool, False), ] @classmethod def update(cls, id, form): t = cls.find(id) valid_names = [ 'title', 'completed' ] for...
20.685714
42
0.476519
737
0.962141
0
0
598
0.780679
0
0
184
0.240209
d01f7d7cb1aafa6f0cf4dd66656aaf36d58e3686
371
py
Python
CanTingSystem/Party.py
scottyyf/oodoop
d254b8a355c985c7672381495ab8a44d7d55e153
[ "MIT" ]
2
2021-12-14T10:46:14.000Z
2021-12-14T10:47:00.000Z
CanTingSystem/Party.py
scottyyf/oodoop
d254b8a355c985c7672381495ab8a44d7d55e153
[ "MIT" ]
9
2021-12-06T06:16:15.000Z
2021-12-20T06:39:50.000Z
CanTingSystem/Party.py
scottyyf/oodoop
d254b8a355c985c7672381495ab8a44d7d55e153
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: Party.py Author: Scott Yang(Scott) Email: yangyingfa@skybility.com Copyright: Copyright (c) 2021, Skybility Software Co.,Ltd. All rights reserved. Description: """ class Party(object): def __init__(self, capacity): self._capacity = capacity def...
19.526316
79
0.684636
147
0.396226
0
0
0
0
0
0
217
0.584906
d0205b5caed2d6f638ffecd766f2e084e27abd9b
11,517
py
Python
Python/Unittest/Fixtures/tests.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
115
2015-03-23T13:34:42.000Z
2022-03-21T00:27:21.000Z
Python/Unittest/Fixtures/tests.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
56
2015-02-25T15:04:26.000Z
2022-01-03T07:42:48.000Z
Python/Unittest/Fixtures/tests.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
59
2015-11-26T11:44:51.000Z
2022-03-21T00:27:22.000Z
#!/usr/bin/env python import os import shutil import sqlite3 import unittest import init_db '''name of database to use as master''' master_name = 'projects.db' def setUpModule(): '''create and fill the database''' conn = sqlite3.connect(master_name) init_db.execute_file(conn, 'create_db.sql') init...
36.33123
76
0.581488
11,001
0.955197
0
0
234
0.020318
0
0
5,024
0.436225
d021199fc85a8a81bc13417b44056945e03b66e3
3,668
py
Python
backend/ids/views/ids.py
block-id/wallet
b5479df7df0e5b5733f0ae262ffc17f9b923347d
[ "Apache-2.0" ]
null
null
null
backend/ids/views/ids.py
block-id/wallet
b5479df7df0e5b5733f0ae262ffc17f9b923347d
[ "Apache-2.0" ]
null
null
null
backend/ids/views/ids.py
block-id/wallet
b5479df7df0e5b5733f0ae262ffc17f9b923347d
[ "Apache-2.0" ]
1
2021-12-31T17:27:44.000Z
2021-12-31T17:27:44.000Z
import json from django.http.response import JsonResponse from django.db.models import Q from django.contrib.auth import authenticate from rest_framework import viewsets, mixins from rest_framework.permissions import IsAuthenticated from rest_framework.exceptions import ValidationError, AuthenticationFailed from rest_...
33.045045
88
0.634133
2,898
0.790076
0
0
723
0.19711
0
0
324
0.088332
d0229c062e76ef7372542bd68ae2fdd99d5d9b15
1,257
py
Python
pattern.py
surajwate/textpattern
79869f932717bec47fc4a0e3e968c5a8321d8038
[ "MIT" ]
null
null
null
pattern.py
surajwate/textpattern
79869f932717bec47fc4a0e3e968c5a8321d8038
[ "MIT" ]
null
null
null
pattern.py
surajwate/textpattern
79869f932717bec47fc4a0e3e968c5a8321d8038
[ "MIT" ]
null
null
null
def plusdash(plus, dash): for i in range((plus-1)*dash + plus): if i%(dash+1)==0: print('+', end='') else: print('-', end='') print('') def pipe(pipe, space): for i in range((pipe-1)*space + pipe): if i % (space+1) == 0: print('|', end='') ...
22.854545
42
0.478123
0
0
0
0
0
0
0
0
47
0.037391
d028aa49515cb0d7956170029a3d7c9b7460dad7
2,624
py
Python
src/apps/analysis/gen/edgeWeightBipartiteGaphGenerator.py
JacobFV/mln-analysis
f78a6531e5126f29e6895e9b8e4b4600110b3858
[ "MIT" ]
null
null
null
src/apps/analysis/gen/edgeWeightBipartiteGaphGenerator.py
JacobFV/mln-analysis
f78a6531e5126f29e6895e9b8e4b4600110b3858
[ "MIT" ]
null
null
null
src/apps/analysis/gen/edgeWeightBipartiteGaphGenerator.py
JacobFV/mln-analysis
f78a6531e5126f29e6895e9b8e4b4600110b3858
[ "MIT" ]
null
null
null
import os def get_comm_no(community_id, community_dict): community_id = str(community_id) if community_id in community_dict: return community_dict[community_id] else: return 0 def edgeWeightBipartiteGraphGenerator( layer1, layer2, layer1CommunityFile, layer2CommunityFile, ...
35.459459
76
0.671113
0
0
0
0
0
0
0
0
146
0.05564
d029c8b65c82f8223b70d8ea031a22a8434f3b04
5,171
py
Python
pubs/utils.py
WIPACrepo/publication-web-db
f5d77f43c89377449f4fbe952f6b1dcfc458c91a
[ "MIT" ]
null
null
null
pubs/utils.py
WIPACrepo/publication-web-db
f5d77f43c89377449f4fbe952f6b1dcfc458c91a
[ "MIT" ]
16
2020-09-26T00:49:56.000Z
2021-09-09T19:03:42.000Z
pubs/utils.py
WIPACrepo/publication-web-db
f5d77f43c89377449f4fbe952f6b1dcfc458c91a
[ "MIT" ]
null
null
null
from datetime import datetime import logging import json import csv from io import StringIO import pymongo from bson.objectid import ObjectId from . import PUBLICATION_TYPES, PROJECTS, SITES def nowstr(): return datetime.utcnow().isoformat() def date_format(datestring): if 'T' in datestring: if '.' ...
34.704698
143
0.602591
0
0
0
0
0
0
3,103
0.600077
853
0.164958
d02b8e08d67537a0237e5ce61fdce30861d1d5de
2,534
py
Python
JTL/__init__.py
AgalmicVentures/JTL
967bc670bf696e0214a69bad619cf0148fec2fe6
[ "MIT" ]
3
2017-12-06T04:35:24.000Z
2020-01-29T14:29:57.000Z
JTL/__init__.py
AgalmicVentures/JTL
967bc670bf696e0214a69bad619cf0148fec2fe6
[ "MIT" ]
null
null
null
JTL/__init__.py
AgalmicVentures/JTL
967bc670bf696e0214a69bad619cf0148fec2fe6
[ "MIT" ]
2
2018-01-06T13:18:07.000Z
2019-09-01T01:24:04.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2021 Agalmic Ventures LLC (www.agalmicventures.com) # # 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 limit...
35.194444
118
0.757695
0
0
0
0
0
0
0
0
1,638
0.646409
d02bbe745d7a87ef8769d267b8913fe863e1ddc6
545
py
Python
tests/conftest.py
disktnk/onnx-chainer
e4542568009e63e7da83aa0f11b2cb5504e8cef8
[ "MIT" ]
null
null
null
tests/conftest.py
disktnk/onnx-chainer
e4542568009e63e7da83aa0f11b2cb5504e8cef8
[ "MIT" ]
null
null
null
tests/conftest.py
disktnk/onnx-chainer
e4542568009e63e7da83aa0f11b2cb5504e8cef8
[ "MIT" ]
null
null
null
import chainer import pytest def pytest_addoption(parser): parser.addoption( '--value-check-runtime', dest='value-check-runtime', default='onnxruntime', choices=['skip', 'onnxruntime', 'mxnet'], help='select test runtime') @pytest.fixture(scope='function') def disable_experimental_warnin...
27.25
77
0.722936
0
0
255
0.46789
289
0.530275
0
0
114
0.209174
d02ea29aa2c01102b027e646e76a227470fdeefe
200
py
Python
applications/physbam/physbam-lib/External_Libraries/Archives/boost/tools/build/v2/test/test1.py
schinmayee/nimbus
170cd15e24a7a88243a6ea80aabadc0fc0e6e177
[ "BSD-3-Clause" ]
20
2017-07-03T19:09:09.000Z
2021-09-10T02:53:56.000Z
applications/physbam/physbam-lib/External_Libraries/Archives/boost/tools/build/v2/test/test1.py
schinmayee/nimbus
170cd15e24a7a88243a6ea80aabadc0fc0e6e177
[ "BSD-3-Clause" ]
null
null
null
applications/physbam/physbam-lib/External_Libraries/Archives/boost/tools/build/v2/test/test1.py
schinmayee/nimbus
170cd15e24a7a88243a6ea80aabadc0fc0e6e177
[ "BSD-3-Clause" ]
9
2017-09-17T02:05:06.000Z
2020-01-31T00:12:01.000Z
#!/usr/bin/python import BoostBuild t = BoostBuild.Tester() t.write("test.jam",""" actions unbuilt { } unbuilt all ; ECHO "Hi" ; """) t.run_build_system("-ftest.jam", stdout="Hi\n") t.pass_test()
14.285714
47
0.66
0
0
0
0
0
0
0
0
98
0.49
d02f44da90d4e56a611cc2675d108a518117aaf4
295
py
Python
micro-benchmark/snippets/classes/tuple_assignment/main.py
WenJinfeng/PyCG
b45e8e04fe697d8301cf27222a8f37646d69f168
[ "Apache-2.0" ]
121
2020-12-16T20:31:37.000Z
2022-03-21T20:32:43.000Z
micro-benchmark/snippets/classes/tuple_assignment/main.py
WenJinfeng/PyCG
b45e8e04fe697d8301cf27222a8f37646d69f168
[ "Apache-2.0" ]
24
2021-03-13T00:04:00.000Z
2022-03-21T17:28:11.000Z
micro-benchmark/snippets/classes/tuple_assignment/main.py
WenJinfeng/PyCG
b45e8e04fe697d8301cf27222a8f37646d69f168
[ "Apache-2.0" ]
19
2021-03-23T10:58:47.000Z
2022-03-24T19:46:50.000Z
class MyClass: def __init__(self): pass def func1(self): pass def func2(self): pass def func3(self): pass class MyClass2: def __init__(self): pass a, b = MyClass(), MyClass2() c, (d, e) = a.func1, (a.func2, a.func3) c() d() e()
11.8
39
0.515254
208
0.705085
0
0
0
0
0
0
0
0
d02fffe94e43114a1dbd3bf9abf8e18b0238b4a0
72
py
Python
stweet/model/__init__.py
markowanga/stweet
7f103b5c88fcef1d993d8cdc99cec358e55293f7
[ "MIT" ]
101
2020-11-22T16:44:25.000Z
2022-03-30T08:42:07.000Z
stweet/model/__init__.py
markowanga/stweet
7f103b5c88fcef1d993d8cdc99cec358e55293f7
[ "MIT" ]
53
2020-11-21T19:40:36.000Z
2022-03-02T10:09:52.000Z
stweet/model/__init__.py
markowanga/stweet
7f103b5c88fcef1d993d8cdc99cec358e55293f7
[ "MIT" ]
16
2020-12-12T23:02:51.000Z
2022-03-01T12:10:32.000Z
from .language import Language from .user_tweet_raw import UserTweetRaw
24
40
0.861111
0
0
0
0
0
0
0
0
0
0
d030a03f345b6f7f695002177f49aa4bf23d3d3c
2,471
py
Python
src/ColorfulData_Package/ColorfulData.py
Alex8695/Colored
f72a5f5da041b73a8771c1b0f6ef80d5e0e83e7b
[ "MIT" ]
null
null
null
src/ColorfulData_Package/ColorfulData.py
Alex8695/Colored
f72a5f5da041b73a8771c1b0f6ef80d5e0e83e7b
[ "MIT" ]
null
null
null
src/ColorfulData_Package/ColorfulData.py
Alex8695/Colored
f72a5f5da041b73a8771c1b0f6ef80d5e0e83e7b
[ "MIT" ]
null
null
null
import numpy as np from math import ceil,floor class ColorfulData: """ Create custom evenly distributed color palete \n`Get_Colors_Matched`: key,value relationship evenly distributed for given unique values \n`Get_Colors`: Evenly distributed for given length """ @staticmethod def Get_Color...
39.222222
167
0.628086
2,413
0.976528
0
0
2,166
0.876568
0
0
1,197
0.484419
d031d9ffaf0e038bf3ce7cef8d63034738a6cd8f
6,453
py
Python
Algorithms/SPO2CART.py
rtm2130/SPOTree
0b92946a2d14202a1ca251201ddbb07892951e78
[ "MIT" ]
15
2020-03-06T23:07:09.000Z
2022-03-30T09:46:30.000Z
Algorithms/SPO2CART.py
Tobias272727/SPOTree
88e2e8423cb133f6c521bae5b8c7a0acba01ccab
[ "MIT" ]
1
2020-09-14T14:32:03.000Z
2020-10-16T02:39:24.000Z
Algorithms/SPO2CART.py
Tobias272727/SPOTree
88e2e8423cb133f6c521bae5b8c7a0acba01ccab
[ "MIT" ]
13
2020-04-04T16:43:56.000Z
2022-03-27T05:28:19.000Z
""" Encodes SPOT MILP as the structure of a CART tree in order to apply CART's pruning method Also supports traverse() which traverses the tree """ import numpy as np from mtp_SPO2CART import MTP_SPO2CART from decision_problem_solver import* from scipy.spatial import distance def truncate_train_x(train_x, train_x_pre...
44.8125
162
0.712692
6,066
0.940028
0
0
0
0
0
0
3,616
0.56036
d037b0f6bf8c9bdca8f41dcdf3788289e4161b30
2,954
py
Python
lib/m96_visualization.py
jaenrig-ifx/MID
a7284f50105575ed6675daeb8a70e144784a0550
[ "MIT" ]
2
2020-12-13T11:52:32.000Z
2022-01-06T20:41:24.000Z
lib/m96_visualization.py
jaenrig-ifx/MID
a7284f50105575ed6675daeb8a70e144784a0550
[ "MIT" ]
null
null
null
lib/m96_visualization.py
jaenrig-ifx/MID
a7284f50105575ed6675daeb8a70e144784a0550
[ "MIT" ]
null
null
null
# This package uses tk to create a simple graphical # output representing the iDrive state import tkinter as tk import numpy as np # why not use the numpy native? but whatever def rotate_2D(vector, angle): r = np.array([[np.cos(angle), np.sin(angle)], [-np.sin(angle), np.cos(angle)]]) return r.d...
38.868421
132
0.574475
2,459
0.832431
0
0
0
0
0
0
353
0.119499
d039ac9e3ce8ea272819341ba9dcf26eae196cff
2,054
py
Python
popoff/atom_types.py
pzarabadip/PopOff
4a9db1ff264ab96196014388721a832aea0f7325
[ "MIT" ]
4
2021-06-18T12:22:50.000Z
2021-12-27T16:00:31.000Z
popoff/atom_types.py
pzarabadip/PopOff
4a9db1ff264ab96196014388721a832aea0f7325
[ "MIT" ]
1
2021-06-27T23:02:23.000Z
2021-08-02T10:07:46.000Z
popoff/atom_types.py
pzarabadip/PopOff
4a9db1ff264ab96196014388721a832aea0f7325
[ "MIT" ]
2
2021-06-22T10:39:06.000Z
2021-12-27T17:52:16.000Z
class AtomType(): """ Class for each atom type. """ def __init__( self, atom_type_index, label, element_type, mass, charge, core_shell=None ): """ Initialise an instance for each atom type in the structure. Args: atom_type_index (int): Integer index for this ato...
36.678571
94
0.581792
2,053
0.999513
0
0
387
0.188413
0
0
1,046
0.50925
d03a2031481c07546efab82527c1c70cce0c1ac7
641
py
Python
30_day_leetcoding_challenge/2021_02/24-Score_of_Parentheses.py
QuenLo/leecode
ce861103949510dc54fd5cb336bd992c40748de2
[ "MIT" ]
6
2018-06-13T06:48:42.000Z
2020-11-25T10:48:13.000Z
30_day_leetcoding_challenge/2021_02/24-Score_of_Parentheses.py
QuenLo/leecode
ce861103949510dc54fd5cb336bd992c40748de2
[ "MIT" ]
null
null
null
30_day_leetcoding_challenge/2021_02/24-Score_of_Parentheses.py
QuenLo/leecode
ce861103949510dc54fd5cb336bd992c40748de2
[ "MIT" ]
null
null
null
class Solution: def scoreOfParentheses(self, S: str) -> int: stack, score = [], 0 for s in S: if s == '(': stack.append("(") else: last = stack[-1] if last == '(': stack.pop() sta...
27.869565
48
0.318253
640
0.99844
0
0
0
0
0
0
30
0.046802
d03a3dde95a4d151a055d00333559975c2f67791
2,116
py
Python
fastreg/ols.py
ajferraro/fastreg
32cdb15908480bd8d5a084126968c78b17010189
[ "MIT" ]
null
null
null
fastreg/ols.py
ajferraro/fastreg
32cdb15908480bd8d5a084126968c78b17010189
[ "MIT" ]
1
2017-11-28T16:21:09.000Z
2017-11-28T17:19:04.000Z
fastreg/ols.py
ajferraro/fastreg
32cdb15908480bd8d5a084126968c78b17010189
[ "MIT" ]
3
2017-11-28T16:56:25.000Z
2021-02-18T18:18:46.000Z
import numpy as np from scipy import stats import utils def fit(xdata, ydata): """Calculate 2D regression. Args: xdata (numpy.ndarray): 1D array of independent data [ntim], where ntim is the number of time points (or other independent points). ydata (numpy.ndarray): 2...
33.587302
75
0.614367
0
0
0
0
0
0
0
0
1,045
0.493856
d03b6aeb253fdd06dec81e7fe877f6830639e18f
796
py
Python
event/timeout.py
dannl/hunter-sim-classic
e32cccc8431cc3e78b08067dd58e10fec52aac6a
[ "MIT" ]
null
null
null
event/timeout.py
dannl/hunter-sim-classic
e32cccc8431cc3e78b08067dd58e10fec52aac6a
[ "MIT" ]
null
null
null
event/timeout.py
dannl/hunter-sim-classic
e32cccc8431cc3e78b08067dd58e10fec52aac6a
[ "MIT" ]
null
null
null
from event import Event class BuffTimeOut(Event): def __init__(self, buff, rotation, engine, char_state, priority): super().__init__('buff_time_out', priority) self.buff = buff self.rotation = rotation self.engine = engine self.char_state = char_state def act(self): ...
33.166667
77
0.653266
769
0.96608
0
0
0
0
0
0
157
0.197236
d03c4e907665dac0cd64374cfeb54bcf34b259de
2,017
py
Python
server.py
shawkyelshazly1/Chat-App
7cb27e9ad0e014409407bc7f2053caf406236797
[ "MIT" ]
null
null
null
server.py
shawkyelshazly1/Chat-App
7cb27e9ad0e014409407bc7f2053caf406236797
[ "MIT" ]
null
null
null
server.py
shawkyelshazly1/Chat-App
7cb27e9ad0e014409407bc7f2053caf406236797
[ "MIT" ]
null
null
null
import socket import threading import json PORT = 5000 SERVER = socket.gethostbyname(socket.gethostname()) ADDRESS = ('', PORT) FORMAT = 'utf-8' clients, names = [], [] server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind(ADDRESS) def StartChat(): print(f'server is working on: {SERVER}') ...
23.729412
89
0.562717
0
0
0
0
0
0
0
0
281
0.139316
d03d74f1871e0c66c83e4056b90ca19bdbdf3fd6
99
py
Python
mhs/outbound/outbound/request/synchronous/__init__.py
tomzo/integration-adaptors
d4f296d3e44475df6f69a78a27fac6ed5b67513b
[ "Apache-2.0" ]
15
2019-08-06T16:08:12.000Z
2021-05-24T13:14:39.000Z
mhs/outbound/outbound/request/synchronous/__init__.py
tomzo/integration-adaptors
d4f296d3e44475df6f69a78a27fac6ed5b67513b
[ "Apache-2.0" ]
75
2019-04-25T13:59:02.000Z
2021-09-15T06:05:36.000Z
mhs/outbound/outbound/request/synchronous/__init__.py
tomzo/integration-adaptors
d4f296d3e44475df6f69a78a27fac6ed5b67513b
[ "Apache-2.0" ]
7
2019-11-12T15:26:34.000Z
2021-04-11T07:23:56.000Z
"""Modules related specifically to the handling of synchronous requests from a supplier system."""
49.5
98
0.79798
0
0
0
0
0
0
0
0
98
0.989899
d040592f4a74f436af4d264afbb1ca2fae548dc3
3,636
py
Python
WiredQT/examples/Module Example/6.Servo/PIGPIO/frmmain.py
chiptrontech/WiredQTv1.0
760948bb736867db4e772031b23ed9151e0364b9
[ "MIT" ]
1
2021-12-18T09:17:08.000Z
2021-12-18T09:17:08.000Z
WiredQT/examples/Module Example/6.Servo/PIGPIO/frmmain.py
chiptrontech/WiredQTv1.0
760948bb736867db4e772031b23ed9151e0364b9
[ "MIT" ]
null
null
null
WiredQT/examples/Module Example/6.Servo/PIGPIO/frmmain.py
chiptrontech/WiredQTv1.0
760948bb736867db4e772031b23ed9151e0364b9
[ "MIT" ]
2
2021-12-18T09:15:53.000Z
2022-01-19T15:10:14.000Z
import gi import time gi.require_version('Gtk', '3.0') from gi.repository import Gtk,GObject,Gdk,Pango,GLib from wta_module import * # Generated By WiredGTK for Python: by Rocky Nuarin, 2018 Phils # #####################www.WireThemAll.com##################### class Handler(usercontrol): #WiredEvent def usercontrolev...
3,636
3,636
0.672717
0
0
0
0
0
0
0
0
3,513
0.966172
d041f4ae9fd51d426b42247db152f3d516a92484
561
py
Python
slam_recognition/filters/rgby.py
SimLeek/pySILEnT
feec2d1fb654d7c8dc25f610916f4e9b202a1092
[ "Apache-2.0", "MIT" ]
5
2018-11-18T17:35:59.000Z
2019-02-13T20:25:58.000Z
slam_recognition/filters/rgby.py
SimLeek/slam_recognition
feec2d1fb654d7c8dc25f610916f4e9b202a1092
[ "Apache-2.0", "MIT" ]
12
2018-10-31T01:57:55.000Z
2019-02-07T05:49:36.000Z
slam_recognition/filters/rgby.py
SimLeek/pySILEnT
feec2d1fb654d7c8dc25f610916f4e9b202a1092
[ "Apache-2.0", "MIT" ]
null
null
null
from slam_recognition.constant_convolutions.center_surround import rgby_3 from slam_recognition.util.get_dimensions import get_dimensions import tensorflow as tf def rgby_filter(tensor # type: tf.Tensor ): n_dimensions = get_dimensions(tensor) rgby = rgby_3(n_dimensions) conv_rgby = tf.co...
37.4
97
0.673797
0
0
0
0
0
0
0
0
23
0.040998
d042d23ac886c0996046b66ccaa7d239f4bcb644
6,293
py
Python
source/preprocessing/lm_text_generator.py
lzzhaha/self_talk
238e5583c0f6ca0ed8a4a035b74f366d376bcd6d
[ "Apache-2.0" ]
63
2020-04-14T03:40:12.000Z
2022-03-30T07:10:20.000Z
source/preprocessing/lm_text_generator.py
lzzhaha/self_talk
238e5583c0f6ca0ed8a4a035b74f366d376bcd6d
[ "Apache-2.0" ]
2
2021-07-10T04:10:18.000Z
2022-03-22T20:33:18.000Z
source/preprocessing/lm_text_generator.py
lzzhaha/self_talk
238e5583c0f6ca0ed8a4a035b74f366d376bcd6d
[ "Apache-2.0" ]
7
2020-12-06T03:22:17.000Z
2022-03-25T09:27:19.000Z
""" Adapted from https://github.com/huggingface/transformers/blob/master/examples/run_generation.py """ import re import torch import logging from typing import List from collections import defaultdict from transformers import GPT2Tokenizer, XLNetTokenizer, TransfoXLTokenizer, OpenAIGPTTokenizer from transformers impo...
39.33125
116
0.656444
3,688
0.586048
0
0
0
0
0
0
2,423
0.385031
d045397b0181a2b9e3e22ff62f63868e6793ee64
79
py
Python
src/semaphore/handlers/internal/__init__.py
lsst-sqre/semaphore
73164618ac0c8d0a03f3122f3ffe8b3820fa43f0
[ "MIT" ]
null
null
null
src/semaphore/handlers/internal/__init__.py
lsst-sqre/semaphore
73164618ac0c8d0a03f3122f3ffe8b3820fa43f0
[ "MIT" ]
2
2022-03-08T00:01:27.000Z
2022-03-28T17:45:01.000Z
src/semaphore/handlers/internal/__init__.py
lsst-sqre/semaphore
73164618ac0c8d0a03f3122f3ffe8b3820fa43f0
[ "MIT" ]
null
null
null
from .handlers import router as internal_router __all__ = ["internal_router"]
19.75
47
0.797468
0
0
0
0
0
0
0
0
17
0.21519
d04578120df1707824a754d31bbc073113fe0980
440
py
Python
Python_ABC/2-7dictionary/countLetter.py
Chandler-Song/Python_Awesome
a44b8b79de7b429a00ac5798e7ecdc26c79a09ed
[ "MIT" ]
null
null
null
Python_ABC/2-7dictionary/countLetter.py
Chandler-Song/Python_Awesome
a44b8b79de7b429a00ac5798e7ecdc26c79a09ed
[ "MIT" ]
null
null
null
Python_ABC/2-7dictionary/countLetter.py
Chandler-Song/Python_Awesome
a44b8b79de7b429a00ac5798e7ecdc26c79a09ed
[ "MIT" ]
null
null
null
import pprint # message message = ''' Books and doors are the same thing books. You open them, and you go through into another world. ''' # split message to words into a list words = message.split() # define dictionary counter count = {} # traverse every word and accumulate for word in words: if not word[-1].isal...
18.333333
53
0.702273
0
0
0
0
0
0
0
0
219
0.497727
d0458729a238b401f69f7c90aa4a7ae3169c62fa
1,959
py
Python
clouddq/classes/dq_rule.py
charleskubicek/cloud-data-quality
0f7dee7daeaaf974203ae154fc7ba729c05cee5d
[ "Apache-2.0" ]
1
2021-11-07T15:03:33.000Z
2021-11-07T15:03:33.000Z
clouddq/classes/dq_rule.py
ant-laz/cloud-data-quality
2f41ec692e7a0ec8988bb8e715fcf5e926fa47be
[ "Apache-2.0" ]
null
null
null
clouddq/classes/dq_rule.py
ant-laz/cloud-data-quality
2f41ec692e7a0ec8988bb8e715fcf5e926fa47be
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
23.890244
79
0.597754
1,216
0.620725
0
0
1,227
0.62634
0
0
948
0.48392
d0461663494469b9d6df96b164f06712f149aa53
749
py
Python
py/minsk/analysis/syntax/expressions/parenthesized.py
Phytolizer/Minsk
5fb59f0d5d8cf1f0046471b91e2f5d0c41fc874c
[ "MIT" ]
null
null
null
py/minsk/analysis/syntax/expressions/parenthesized.py
Phytolizer/Minsk
5fb59f0d5d8cf1f0046471b91e2f5d0c41fc874c
[ "MIT" ]
1
2022-03-23T03:34:48.000Z
2022-03-24T06:47:30.000Z
py/minsk/analysis/syntax/expressions/parenthesized.py
Phytolizer/Minsk
5fb59f0d5d8cf1f0046471b91e2f5d0c41fc874c
[ "MIT" ]
null
null
null
from dataclasses import dataclass from typing import Iterable from minsk.analysis.syntax.expression import ExpressionSyntax from minsk.analysis.syntax.kind import SyntaxKind from minsk.analysis.syntax.node import SyntaxNode from minsk.analysis.syntax.token import SyntaxToken @dataclass(frozen=True) class Parenthesiz...
29.96
61
0.791722
445
0.594126
158
0.210948
469
0.626168
0
0
0
0
d04a7bba3d57ad48f159bb585e370285252259ef
3,113
py
Python
src/peachyprintertools.py
PeachyPrinter/tkpeachyprinter
d88dcb4891d19c4b81a7f4f072e120d05c02124c
[ "Apache-2.0" ]
1
2017-03-08T02:48:19.000Z
2017-03-08T02:48:19.000Z
src/peachyprintertools.py
PeachyPrinter/tkpeachyprinter
d88dcb4891d19c4b81a7f4f072e120d05c02124c
[ "Apache-2.0" ]
null
null
null
src/peachyprintertools.py
PeachyPrinter/tkpeachyprinter
d88dcb4891d19c4b81a7f4f072e120d05c02124c
[ "Apache-2.0" ]
6
2016-05-12T04:10:18.000Z
2020-02-15T09:55:00.000Z
#!/usr/bin/python # -*- coding: iso-8859-1 -*- import logging from peachyprinter import config, PrinterAPI import argparse import os import sys import time from Tkinter import * from ui.main_ui import MainUI class PeachyPrinterTools(Tk): def __init__(self, parent, path): Tk.__init__(self, parent) ...
34.208791
186
0.666881
745
0.239319
0
0
0
0
0
0
598
0.192098
d04d2d19a25223c8c1cc1c6c129d213851622ac0
813
py
Python
db/db_create.py
dafarz/base-service
95791beac06c1ac58e0fa2050aa2cf3a3a22d8d7
[ "MIT" ]
null
null
null
db/db_create.py
dafarz/base-service
95791beac06c1ac58e0fa2050aa2cf3a3a22d8d7
[ "MIT" ]
null
null
null
db/db_create.py
dafarz/base-service
95791beac06c1ac58e0fa2050aa2cf3a3a22d8d7
[ "MIT" ]
null
null
null
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from env_variables import SQL_ALCHEMY_URL _db_url_without_db = '/'.join(SQL_ALCHEMY_URL.split('/')[:-1]) engine = create_engine(f'{_db_url_without_db}', isolation_level='AUTOCOMMIT', echo=True) Session = sessionmaker(engine) def create_dat...
32.52
109
0.676507
0
0
0
0
0
0
0
0
230
0.282903
d04dee56b2ed832a66c6149983ca467bfbbbbafc
404
py
Python
[5]-RailFence-Cipher.py
anuj0809/Fundamentals-Of-Cryptography
e6f88dcbd5f63f6938ddf5825bf9395d5ede9fe1
[ "Apache-2.0" ]
null
null
null
[5]-RailFence-Cipher.py
anuj0809/Fundamentals-Of-Cryptography
e6f88dcbd5f63f6938ddf5825bf9395d5ede9fe1
[ "Apache-2.0" ]
null
null
null
[5]-RailFence-Cipher.py
anuj0809/Fundamentals-Of-Cryptography
e6f88dcbd5f63f6938ddf5825bf9395d5ede9fe1
[ "Apache-2.0" ]
null
null
null
def threeRailEncrypt(plainText): plainText = plainText.lower() cipherText = "" rail1 = "" rail2 = "" rail3 = "" for i in range(len(plainText)): if i%3 == 0: rail1 += plainText[i] elif i%3 == 1: rail2 += plainText[i] else: rail3 += plainText[i] cipherTe...
19.238095
37
0.564356
0
0
0
0
0
0
0
0
16
0.039604
d04e92b69338a9a744afe83b7964f2f2ce880ffe
2,382
py
Python
util/data.py
arturb90/nl2pl
2cd37bdd7c6f9f99349f1235001a1755ba169f4a
[ "MIT" ]
null
null
null
util/data.py
arturb90/nl2pl
2cd37bdd7c6f9f99349f1235001a1755ba169f4a
[ "MIT" ]
null
null
null
util/data.py
arturb90/nl2pl
2cd37bdd7c6f9f99349f1235001a1755ba169f4a
[ "MIT" ]
1
2021-07-16T09:21:15.000Z
2021-07-16T09:21:15.000Z
import torch from random import random from torch.nn.utils.rnn import pad_sequence from torch.utils.data import Dataset def collate_fn(batch): ''' Batch-wise preprocessing and padding. :param batch: the current batch. :returns: padded sources, targets, alignments stacks an...
27.697674
73
0.615869
897
0.376574
0
0
0
0
0
0
495
0.207809
d04f4962f6074bb45c68186f6ea8419d8e3eca30
649
py
Python
stocklab/core/crawler.py
hchsiao/stocklab
9c8f786249d5fd5eb954829f63549f0635a428ff
[ "MIT" ]
1
2020-03-26T14:49:31.000Z
2020-03-26T14:49:31.000Z
stocklab/core/crawler.py
syoukore/stocklab
9c8f786249d5fd5eb954829f63549f0635a428ff
[ "MIT" ]
null
null
null
stocklab/core/crawler.py
syoukore/stocklab
9c8f786249d5fd5eb954829f63549f0635a428ff
[ "MIT" ]
1
2020-06-16T16:56:23.000Z
2020-06-16T16:56:23.000Z
from . import StocklabObject class Crawler(StocklabObject): """The base class for stocklab Crawlers.""" def __init__(self): super().__init__() class CrawlerTrigger(Exception): """ A `Node` will raise this exception when the required data is not locally available (e.g. not in the database)....
29.5
76
0.665639
616
0.949153
0
0
0
0
0
0
354
0.545455
d04fcbb17bf03785d02041e016915bdc95d6404c
4,514
py
Python
tiddlyweb/web/validator.py
tiddlyweb/tiddlyweb
376bcad280e24d2de4d74883dc4d8369abcb2c28
[ "BSD-3-Clause" ]
57
2015-02-01T21:03:34.000Z
2021-12-25T12:02:31.000Z
tiddlyweb/web/validator.py
tiddlyweb/tiddlyweb
376bcad280e24d2de4d74883dc4d8369abcb2c28
[ "BSD-3-Clause" ]
6
2016-02-05T11:43:32.000Z
2019-09-05T13:38:49.000Z
tiddlyweb/web/validator.py
tiddlyweb/tiddlyweb
376bcad280e24d2de4d74883dc4d8369abcb2c28
[ "BSD-3-Clause" ]
17
2015-05-12T08:53:23.000Z
2021-12-21T15:56:30.000Z
""" A collection of routines for validating, santizing and otherwise messing with content coming in from the web to be :py:class:`tiddlers <tiddlyweb.model.tiddler.Tidder>`, :py:class:`bags <tiddlyweb.model.bag.Bag>` or :py:class:`recipes <tiddlyweb.model.recipe.Recipe>`. The validators can be extended by adding funct...
31.347222
77
0.699158
843
0.186752
0
0
0
0
0
0
3,060
0.677891
d050c2f9fe46941d4dbe952021eec4b5d9528020
6,548
py
Python
mth5/io/lemi424.py
kujaku11/mth5
b7681335871f3cd1b652276fd93c08554c7538ff
[ "MIT" ]
5
2021-01-08T23:38:47.000Z
2022-03-31T14:13:47.000Z
mth5/io/lemi424.py
kujaku11/mth5
b7681335871f3cd1b652276fd93c08554c7538ff
[ "MIT" ]
76
2020-09-04T02:35:19.000Z
2022-03-31T22:18:09.000Z
mth5/io/lemi424.py
kujaku11/mth5
b7681335871f3cd1b652276fd93c08554c7538ff
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue May 11 15:31:31 2021 :copyright: Jared Peacock (jpeacock@usgs.gov) :license: MIT """ from pathlib import Path import pandas as pd import numpy as np import logging from mth5.timeseries import ChannelTS, RunTS from mt_metadata.timeseries import Station, Run class LE...
27.170124
81
0.464875
5,457
0.833384
0
0
2,902
0.443189
0
0
1,894
0.289249
d050d5f902907c952287689dc0a4c79b3535eea2
4,895
py
Python
preprocessing/encoder.py
mjlaali/housing-model
8f0286a4b1909b7e0218d9a8f1340b95d5b9463d
[ "Apache-2.0" ]
null
null
null
preprocessing/encoder.py
mjlaali/housing-model
8f0286a4b1909b7e0218d9a8f1340b95d5b9463d
[ "Apache-2.0" ]
3
2020-11-13T18:43:28.000Z
2022-02-10T01:18:05.000Z
preprocessing/encoder.py
mjlaali/housing_model
8f0286a4b1909b7e0218d9a8f1340b95d5b9463d
[ "Apache-2.0" ]
null
null
null
import abc import logging import os import pickle from collections import Counter from datetime import datetime from typing import List, Union import numpy as np _logger = logging.getLogger(__name__) class Transformation(abc.ABC): @abc.abstractmethod def analyze(self, raw: object) -> object: pass ...
28.459302
102
0.614913
4,663
0.952605
0
0
266
0.054341
0
0
394
0.08049
d05258e114b5375cb6f9a5865f707d6098504caa
27
py
Python
tests/unittests/__init__.py
p33t00/py-game
9a77dc0daf3def1f17d97887281078d8a0918090
[ "MIT" ]
null
null
null
tests/unittests/__init__.py
p33t00/py-game
9a77dc0daf3def1f17d97887281078d8a0918090
[ "MIT" ]
null
null
null
tests/unittests/__init__.py
p33t00/py-game
9a77dc0daf3def1f17d97887281078d8a0918090
[ "MIT" ]
null
null
null
"""Initialize unittest."""
13.5
26
0.666667
0
0
0
0
0
0
0
0
26
0.962963
d0526bab2f2fcce625c5809ae54737f104402629
2,402
py
Python
tests/test_anglicize.py
hugovk/python-anglicize
1284ec72026f78d56ff5e995328547565ddb4f0b
[ "BSD-2-Clause" ]
1
2020-03-08T09:33:14.000Z
2020-03-08T09:33:14.000Z
tests/test_anglicize.py
hugovk/python-anglicize
1284ec72026f78d56ff5e995328547565ddb4f0b
[ "BSD-2-Clause" ]
2
2020-03-08T16:45:08.000Z
2020-03-08T20:34:04.000Z
tests/test_anglicize.py
hugovk/python-anglicize
1284ec72026f78d56ff5e995328547565ddb4f0b
[ "BSD-2-Clause" ]
1
2020-03-08T16:33:22.000Z
2020-03-08T16:33:22.000Z
import pytest from pytest import param as p from anglicize import anglicize, build_mapping @pytest.mark.parametrize( "text, expected", [ p("Abc 123", "Abc 123", id="noop"), p("ĂaÂâÎîȘșȚț", "AaAaIiSsTt", id="romanian"), p("ĄąĆćĘꣳŃńŹźŻż", "AaCcEeLlNnZzZz", id="polish"), p("ÁáÉ...
37.53125
94
0.562448
0
0
0
0
2,637
0.964168
0
0
1,596
0.583547
d053babddc7a2862293a9876d42fa1a7ffe1dc9e
109
py
Python
control/City.py
ChreSyr/kerys
48749f15c8caed221598f350a2530f81dcf8f291
[ "MIT" ]
null
null
null
control/City.py
ChreSyr/kerys
48749f15c8caed221598f350a2530f81dcf8f291
[ "MIT" ]
null
null
null
control/City.py
ChreSyr/kerys
48749f15c8caed221598f350a2530f81dcf8f291
[ "MIT" ]
null
null
null
import baopig as bp import images as im # TODO : a city defines the style, a district defines the content
15.571429
65
0.752294
0
0
0
0
0
0
0
0
65
0.59633
d053ccfb39ce30bd9ced8dc52651dfaad639314a
11,426
py
Python
app/routes.py
mrtoronto/FAIPD
8cb4df2577af515238ce6ee12e627b830bec67a6
[ "MIT" ]
null
null
null
app/routes.py
mrtoronto/FAIPD
8cb4df2577af515238ce6ee12e627b830bec67a6
[ "MIT" ]
null
null
null
app/routes.py
mrtoronto/FAIPD
8cb4df2577af515238ce6ee12e627b830bec67a6
[ "MIT" ]
null
null
null
from datetime import datetime from flask import render_template, flash, redirect, url_for, request from flask_login import login_user, logout_user, current_user, login_required from werkzeug.urls import url_parse from app import app, db from app.forms import LoginForm, RegistrationForm, EditProfileForm, PostForm, ...
40.953405
105
0.647033
0
0
0
0
10,866
0.950989
0
0
1,787
0.156398
d053e208c7d7b16075409089cf697fffe7f24a16
2,147
py
Python
try_test.py
olvitar/python_training
4c2ca819b1781fc785dc634f4e13e88fc0b45fc2
[ "Apache-2.0" ]
null
null
null
try_test.py
olvitar/python_training
4c2ca819b1781fc785dc634f4e13e88fc0b45fc2
[ "Apache-2.0" ]
null
null
null
try_test.py
olvitar/python_training
4c2ca819b1781fc785dc634f4e13e88fc0b45fc2
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait success = True wd = webdriver.Firefox() wait = WebDriverWait(wd, 22) def is_alert_present(wd): try: wd.switch_to_alert().text return True except: return False try: wd.ge...
40.509434
93
0.723335
0
0
0
0
0
0
0
0
567
0.264089
d0543092d21f71915cd4c279a74f105e00c18015
7,035
py
Python
cogs/Reminders.py
noahkw/botw-bot
8d8c9515a177c52270093fb64abf34d111535d16
[ "MIT" ]
1
2020-11-29T23:00:27.000Z
2020-11-29T23:00:27.000Z
cogs/Reminders.py
noahkw/botw-bot
8d8c9515a177c52270093fb64abf34d111535d16
[ "MIT" ]
18
2020-08-05T11:59:31.000Z
2022-03-15T03:48:40.000Z
cogs/Reminders.py
noahkw/botw-bot
8d8c9515a177c52270093fb64abf34d111535d16
[ "MIT" ]
null
null
null
import logging import re from datetime import timezone import pendulum from aioscheduler import TimedScheduler from dateparser import parse from discord.ext import commands from discord.ext.menus import MenuPages import db from cogs import CustomCog, AinitMixin from cogs.Logging import log_usage from const import UNI...
33.341232
114
0.5828
5,908
0.839801
0
0
1,925
0.273632
5,193
0.738166
1,314
0.18678
d05487672c8369c2d9e228e3c2e3d6e6a8514f49
4,598
py
Python
lambda/code/lambda_function.py
acloudfan/Amazon-Aurora-DAS-Setup
9c5ca4ac3705e78e877fc51b9ba927a7d367d029
[ "MIT-0" ]
null
null
null
lambda/code/lambda_function.py
acloudfan/Amazon-Aurora-DAS-Setup
9c5ca4ac3705e78e877fc51b9ba927a7d367d029
[ "MIT-0" ]
null
null
null
lambda/code/lambda_function.py
acloudfan/Amazon-Aurora-DAS-Setup
9c5ca4ac3705e78e877fc51b9ba927a7d367d029
[ "MIT-0" ]
2
2021-05-25T16:14:13.000Z
2022-01-14T14:04:49.000Z
import json import base64 import os import boto3 import zlib # Used for decryption of the received payload import aws_encryption_sdk from aws_encryption_sdk import CommitmentPolicy from aws_encryption_sdk.internal.crypto import WrappingKey from aws_encryption_sdk.key_providers.raw import RawMasterKeyProvider from aws_...
38.316667
139
0.738582
566
0.123097
0
0
0
0
0
0
1,188
0.258373
d05800ed78f8e4d54ffdbd820c4452051fa6d0a1
195
py
Python
location/admin.py
GDG2021hackathon/modoogym-backend-dj
1af8c4132a8979bf333b725b73c3e5eab3e228b5
[ "MIT" ]
null
null
null
location/admin.py
GDG2021hackathon/modoogym-backend-dj
1af8c4132a8979bf333b725b73c3e5eab3e228b5
[ "MIT" ]
null
null
null
location/admin.py
GDG2021hackathon/modoogym-backend-dj
1af8c4132a8979bf333b725b73c3e5eab3e228b5
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Location class LocationAdmin(admin.ModelAdmin): list_display = ["id", "city", "region"] admin.site.register(Location, LocationAdmin)
17.727273
44
0.753846
82
0.420513
0
0
0
0
0
0
18
0.092308
d0592aa31ec2220c57276d8f6df3bc52f87e72e4
138
py
Python
SimCam/__init__.py
AgainstEntropy/my-interpretable-ConvNeXt
ec12be73dcd6c0b0f73bd90b61b5fce33246bdbb
[ "MIT" ]
null
null
null
SimCam/__init__.py
AgainstEntropy/my-interpretable-ConvNeXt
ec12be73dcd6c0b0f73bd90b61b5fce33246bdbb
[ "MIT" ]
null
null
null
SimCam/__init__.py
AgainstEntropy/my-interpretable-ConvNeXt
ec12be73dcd6c0b0f73bd90b61b5fce33246bdbb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Date : 2022/4/13 12:07 # @Author : WangYihao # @File : __init__.py.py from SimCam.simcam import SimCam
19.714286
32
0.608696
0
0
0
0
0
0
0
0
100
0.724638
d059502a7ec59d16005b90bde454a7338ee03251
3,315
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/iSCSI_Data_Out_template.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/iSCSI_Data_Out_template.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/iSCSI_Data_Out_template.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files class iSCSI_Data_Out(Base): __slots__ = () _SDM_NAME = 'iSCSI_Data_Out' _SDM_ATT_MAP = { 'Opcode': 'iSCSI_Data_Out.header.Opcode', 'Flags': 'iSCSI_Data_Out.header.Flags', 'TotalAHSLength': 'iSCSI_Data_O...
37.670455
92
0.715837
3,232
0.974962
0
0
2,170
0.6546
0
0
724
0.218401
d05a3552b3ed442094ecdba600618970c4eeddf8
289
py
Python
rated/migrations/0005_delete_profileapi.py
nyamzy/Rater
934a6600afe4b47742621bbe0a47c1afc6325a21
[ "Unlicense" ]
null
null
null
rated/migrations/0005_delete_profileapi.py
nyamzy/Rater
934a6600afe4b47742621bbe0a47c1afc6325a21
[ "Unlicense" ]
null
null
null
rated/migrations/0005_delete_profileapi.py
nyamzy/Rater
934a6600afe4b47742621bbe0a47c1afc6325a21
[ "Unlicense" ]
null
null
null
# Generated by Django 4.0.2 on 2022-02-16 14:11 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('rated', '0004_profileapi'), ] operations = [ migrations.DeleteModel( name='ProfileAPI', ), ]
17
47
0.595156
204
0.705882
0
0
0
0
0
0
83
0.287197
d05d10f97cc5c0bdb332b3fd013760d9dc94d719
9,449
py
Python
Code/Maskrcnn-keras/Experiments2/our_preprocessing.py
SZamboni/NightPedestrianDetection
fc492e0bd3f6f99070975d08a229cc6ef969f9e8
[ "MIT" ]
3
2020-04-03T06:25:23.000Z
2021-04-06T07:30:56.000Z
Code/Maskrcnn-keras/Experiments2/our_preprocessing.py
SZamboni/NightPedestrianDetection
fc492e0bd3f6f99070975d08a229cc6ef969f9e8
[ "MIT" ]
null
null
null
Code/Maskrcnn-keras/Experiments2/our_preprocessing.py
SZamboni/NightPedestrianDetection
fc492e0bd3f6f99070975d08a229cc6ef969f9e8
[ "MIT" ]
1
2021-04-06T07:40:26.000Z
2021-04-06T07:40:26.000Z
import cv2 import numpy as np from skimage import exposure as ex from skimage import data from PIL import Image import skfuzzy as fuzz import math import timeit import time ''' Histogram equalization with colour YCR_CB and histogram equalization only on Y @img: the image to modify @return: the image with the histogr...
31.288079
105
0.650122
0
0
0
0
0
0
0
0
2,236
0.236639
d05de342ea54b26f257e91dab0c259cdcde355f4
1,812
py
Python
bin/make_known_good_cice_masks.py
PRIMAVERA-H2020/pre-proc
0c47636cbe32a13a9544f3e5ce9f4c778dc55078
[ "BSD-3-Clause" ]
null
null
null
bin/make_known_good_cice_masks.py
PRIMAVERA-H2020/pre-proc
0c47636cbe32a13a9544f3e5ce9f4c778dc55078
[ "BSD-3-Clause" ]
null
null
null
bin/make_known_good_cice_masks.py
PRIMAVERA-H2020/pre-proc
0c47636cbe32a13a9544f3e5ce9f4c778dc55078
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ make_known_good_cice_masks.py Copy known good CICE masks for use in fixing the HadGEM CICE masks. """ import os import numpy as np from netCDF4 import Dataset OUTPUT_DIR = "/gws/nopw/j04/primavera1/masks/HadGEM3Ocean_fixes/cice_masks" def main(): """main entry""" rootgrp = Dataset...
31.241379
78
0.642936
0
0
0
0
0
0
0
0
520
0.286976
d05e365d3bba6c56cbc2fec6fc272d72dc471554
1,071
py
Python
plotmass/statistics.py
QUT-Motorsport/QUTMS_VehicleSim
5c69a76beb889f3e1fb8a157751f5b6dc12d6d10
[ "MIT" ]
2
2020-05-10T13:44:05.000Z
2021-11-30T14:59:26.000Z
plotmass/statistics.py
QUT-Motorsport/QUTMS_VehicleSim
5c69a76beb889f3e1fb8a157751f5b6dc12d6d10
[ "MIT" ]
24
2020-01-12T14:12:26.000Z
2020-07-22T02:34:53.000Z
plotmass/statistics.py
QUT-Motorsport/QUTMS_VehicleSim
5c69a76beb889f3e1fb8a157751f5b6dc12d6d10
[ "MIT" ]
2
2020-01-13T06:51:31.000Z
2021-12-30T16:45:43.000Z
from datetime import timedelta class Statistics: def __init__(self, velocity, dist): # Calculate time self.lap_time = 0 dist_travelled = [] self.time = [] for i in range(len(velocity)): dist_travelled.append(0) self.time.append(0) if i ...
25.5
79
0.577965
1,039
0.970121
0
0
0
0
0
0
54
0.05042
d05e5954805301cc10d8ab2d703ec21b5e037de7
756
py
Python
config.py
raspberry9/tinypost
6e4b4bf764e93f6d344fbdb9369f326f08146d00
[ "MIT" ]
null
null
null
config.py
raspberry9/tinypost
6e4b4bf764e93f6d344fbdb9369f326f08146d00
[ "MIT" ]
null
null
null
config.py
raspberry9/tinypost
6e4b4bf764e93f6d344fbdb9369f326f08146d00
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import logging import configparser class Config(object): def __init__(self, filename): logging.config.fileConfig(filename) config = configparser.RawConfigParser() config.read(filename) for option, value in config.items(self.name): try: ...
26.068966
53
0.539683
694
0.917989
0
0
0
0
0
0
45
0.059524
d05e5b044a9120637eea4c01afc5076feed78586
2,817
py
Python
database/database.py
Valzavator/YouTubeTrendingVideosAnalysis
4baca01a351a20bec04331936cd9f6eafaea815d
[ "MIT" ]
2
2019-06-11T03:26:50.000Z
2020-04-13T01:28:23.000Z
database/database.py
Valzavator/YouTubeTrendingVideosAnalysis
4baca01a351a20bec04331936cd9f6eafaea815d
[ "MIT" ]
2
2020-01-08T13:11:49.000Z
2020-01-08T13:11:54.000Z
database/database.py
Valzavator/YouTubeTrendingVideosAnalysis
4baca01a351a20bec04331936cd9f6eafaea815d
[ "MIT" ]
1
2019-06-11T03:26:54.000Z
2019-06-11T03:26:54.000Z
import os import subprocess from dotenv import load_dotenv import pymongo from pymongo import MongoClient from pymongo.cursor import Cursor from pymongo.errors import DuplicateKeyError, BulkWriteError from util.args import Args load_dotenv() class Database: def __init__(self, uri=Args.db_host()): self....
28.17
95
0.649627
2,569
0.911963
0
0
0
0
0
0
313
0.111111
d0629421490c20c90017965031c7298c1372c640
4,066
py
Python
messaging_components/services/service_docker.py
fgiorgetti/qpid-dispatch-tests
164c609d28db87692eed53d5361aa1ee5c97375c
[ "Apache-2.0" ]
null
null
null
messaging_components/services/service_docker.py
fgiorgetti/qpid-dispatch-tests
164c609d28db87692eed53d5361aa1ee5c97375c
[ "Apache-2.0" ]
null
null
null
messaging_components/services/service_docker.py
fgiorgetti/qpid-dispatch-tests
164c609d28db87692eed53d5361aa1ee5c97375c
[ "Apache-2.0" ]
null
null
null
from enum import Enum from typing import Union from iqa_common.executor import Command, Execution, ExecutorAnsible, CommandAnsible, ExecutorContainer, \ CommandContainer, Executor from iqa_common.utils.docker_util import DockerUtil from messaging_abstract.component import Service, ServiceStatus import logging cl...
38.72381
105
0.632809
3,747
0.921545
0
0
0
0
0
0
1,020
0.250861
d063b8972e4afe0fab8307dbfa94ac49321f94ea
4,836
py
Python
seatsvotes/bootstrap/abstracts.py
ljwolf/seatsvotes
6d44bba02016cc7ac24cebf6e0d70e1e9e801a5b
[ "MIT" ]
null
null
null
seatsvotes/bootstrap/abstracts.py
ljwolf/seatsvotes
6d44bba02016cc7ac24cebf6e0d70e1e9e801a5b
[ "MIT" ]
null
null
null
seatsvotes/bootstrap/abstracts.py
ljwolf/seatsvotes
6d44bba02016cc7ac24cebf6e0d70e1e9e801a5b
[ "MIT" ]
null
null
null
import numpy as np from ..mixins import Preprocessor, AlwaysPredictPlotter, AdvantageEstimator from warnings import warn class Bootstrap(Preprocessor, AlwaysPredictPlotter, AdvantageEstimator): def __init__(self, elex_frame, covariate_columns=None, weight_column=None, share_colum...
49.85567
121
0.575889
4,712
0.974359
0
0
57
0.011787
0
0
2,451
0.506824
d064480390cd469cea87e1fccaa98205621d8e9a
147
py
Python
Logging/log4.py
Anilkumar95/python-75-hackathon
0cc9304e46ceace826090614b46d8048a068d106
[ "MIT" ]
null
null
null
Logging/log4.py
Anilkumar95/python-75-hackathon
0cc9304e46ceace826090614b46d8048a068d106
[ "MIT" ]
null
null
null
Logging/log4.py
Anilkumar95/python-75-hackathon
0cc9304e46ceace826090614b46d8048a068d106
[ "MIT" ]
2
2019-01-27T16:59:48.000Z
2019-01-29T13:07:40.000Z
import logging logging.warning('warning message') logging.error('This is an error message') logging.critical('This is a critical error message')
21
52
0.782313
0
0
0
0
0
0
0
0
77
0.52381
d064ab0067234e99ee2f70ae98cf7d5fece967e6
304
py
Python
spellcheck.py
laiquzzama/laiquzzama
42393808ecb0342392ab055d9d94220de8a15796
[ "Apache-2.0" ]
3
2021-03-06T01:42:51.000Z
2021-04-13T12:02:47.000Z
spellcheck.py
laiquzzama/laiquzzama
42393808ecb0342392ab055d9d94220de8a15796
[ "Apache-2.0" ]
null
null
null
spellcheck.py
laiquzzama/laiquzzama
42393808ecb0342392ab055d9d94220de8a15796
[ "Apache-2.0" ]
null
null
null
from textblob import TextBlob a = str(input("enter your word to check spell") _b = TextBlob(a) print (_b.correct()) # from textblob import Textblob #mylst = ["firt","clor"] #correct_list = [] #for word in mylst: # correct_list.append(TextBlob()) # #for word in correct_list: # print (word.correct())
19
47
0.700658
0
0
0
0
0
0
0
0
208
0.684211
d064bc4db90fca2bed0f8cf38219eca21ad15605
1,657
py
Python
lessons/cse-numpy/drums/drums-5.py
uiuc-cse/2014-01-30-cse
de30ff0afdbb2030c3a844b9cd138177f38d3b76
[ "CC-BY-3.0" ]
1
2021-04-21T23:05:51.000Z
2021-04-21T23:05:51.000Z
lessons/cse-numpy/drums/drums-5.py
gitter-badger/2014-01-30-cse
de30ff0afdbb2030c3a844b9cd138177f38d3b76
[ "CC-BY-3.0" ]
null
null
null
lessons/cse-numpy/drums/drums-5.py
gitter-badger/2014-01-30-cse
de30ff0afdbb2030c3a844b9cd138177f38d3b76
[ "CC-BY-3.0" ]
2
2016-03-12T02:28:13.000Z
2017-05-01T20:43:22.000Z
from __future__ import division import numpy as np import scipy as sp import matplotlib as mpl import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from scipy.special import jn, jn_zeros import subprocess def drumhead_height(n, k, distance, angle, t): nth_zero = jn_zeros(n, k) return np.cos(...
31.865385
104
0.660229
0
0
0
0
0
0
0
0
298
0.179843
d065e2da402db36ecb6c887992ef35dec831f741
704
py
Python
QB5/spiders/qb5.py
smithgoo/Scrapy_books
b556714510473f324a2952b739d79c0c78f47398
[ "MIT" ]
null
null
null
QB5/spiders/qb5.py
smithgoo/Scrapy_books
b556714510473f324a2952b739d79c0c78f47398
[ "MIT" ]
null
null
null
QB5/spiders/qb5.py
smithgoo/Scrapy_books
b556714510473f324a2952b739d79c0c78f47398
[ "MIT" ]
null
null
null
import scrapy from bs4 import BeautifulSoup import requests from QB5.pipelines import dbHandle from QB5.items import Qb5Item class Qb5Spider(scrapy.Spider): name = 'qb5' allowed_domains = ['qb5.tw'] start_urls = ['https://qb5.tw'] def parse(self, response): soup = BeautifulSoup(response.text) ...
28.16
61
0.536932
595
0.8241
472
0.65374
0
0
0
0
153
0.211911
d0688c7557a32c0ad0f636ac14f06a163a2f4570
36,514
py
Python
BookDatabaseUtility.py
BitWorks/xbrlstudio
231beb46c56c8086f9fcc8846955667d947709c2
[ "MIT" ]
null
null
null
BookDatabaseUtility.py
BitWorks/xbrlstudio
231beb46c56c8086f9fcc8846955667d947709c2
[ "MIT" ]
null
null
null
BookDatabaseUtility.py
BitWorks/xbrlstudio
231beb46c56c8086f9fcc8846955667d947709c2
[ "MIT" ]
null
null
null
""" :mod: 'BookDatabaseUtility' ~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. py:module:: BookDatabaseUtility :copyright: Copyright BitWorks LLC, All rights reserved. :license: MIT :synopsis: SQLAlchemy ORM engine, metadata, and utility functions for working with dynamic sqlite databases :description: Contains the f...
50.019178
160
0.572082
0
0
0
0
0
0
0
0
5,190
0.142137
d0693c16999250ca2301257521cd46471a60d89e
58
py
Python
hela/math/__init__.py
erikmunkby/hela
915221386fbdb8d6f5783b97d44af036a5e5f7aa
[ "Apache-2.0" ]
1
2022-02-26T17:55:42.000Z
2022-02-26T17:55:42.000Z
hela/math/__init__.py
erikmunkby/hela
915221386fbdb8d6f5783b97d44af036a5e5f7aa
[ "Apache-2.0" ]
null
null
null
hela/math/__init__.py
erikmunkby/hela
915221386fbdb8d6f5783b97d44af036a5e5f7aa
[ "Apache-2.0" ]
null
null
null
""" Module for math and statistics related functions. """
14.5
49
0.724138
0
0
0
0
0
0
0
0
57
0.982759
d06a5181661f5f73feeb7820ddebac2f55560f7e
3,491
py
Python
src/models/markov_chain.py
dballesteros7/master-thesis-2015
8c0bf9a6eef172fc8167a30780ae0666f8ea2d88
[ "MIT" ]
null
null
null
src/models/markov_chain.py
dballesteros7/master-thesis-2015
8c0bf9a6eef172fc8167a30780ae0666f8ea2d88
[ "MIT" ]
null
null
null
src/models/markov_chain.py
dballesteros7/master-thesis-2015
8c0bf9a6eef172fc8167a30780ae0666f8ea2d88
[ "MIT" ]
null
null
null
import itertools import numpy as np import constants from utils import file class MarkovChain: def __init__(self, n_items: int, pseudo_count: int = 1, use_rejection: bool = True): self.n_items = n_items self.counts = np.empty(n_items) self.first_order_counts = np.empty((n...
42.573171
80
0.593813
1,793
0.513606
0
0
0
0
0
0
325
0.093097
d06ac96e9708483c7fba688eecfd660ccb68f5f6
31
py
Python
Tasks_codes/task1_catdog.py
manasviaggarwal/tipr-second-assignment
45869a71c9de1a1d66c3581a06854f330f38e14d
[ "MIT" ]
null
null
null
Tasks_codes/task1_catdog.py
manasviaggarwal/tipr-second-assignment
45869a71c9de1a1d66c3581a06854f330f38e14d
[ "MIT" ]
null
null
null
Tasks_codes/task1_catdog.py
manasviaggarwal/tipr-second-assignment
45869a71c9de1a1d66c3581a06854f330f38e14d
[ "MIT" ]
null
null
null
ACCURACY :::62.86377259982597
15.5
30
0.774194
0
0
0
0
0
0
0
0
0
0
d06c3b1e34c6a4e7355555a0f272e78441d27ce6
11,611
py
Python
lablog/python/ExperimentRepository.py
yonch/wireless
5e5a081fcf3cd49d901f25db6c4c1fabbfc921d5
[ "MIT" ]
29
2015-03-11T04:54:01.000Z
2021-09-20T06:07:59.000Z
lablog/python/ExperimentRepository.py
darksidelemm/wireless
5e5a081fcf3cd49d901f25db6c4c1fabbfc921d5
[ "MIT" ]
null
null
null
lablog/python/ExperimentRepository.py
darksidelemm/wireless
5e5a081fcf3cd49d901f25db6c4c1fabbfc921d5
[ "MIT" ]
16
2015-01-28T18:58:33.000Z
2021-08-29T02:00:24.000Z
import bsddb.db as bdb import os.path import cPickle from base64 import b64encode, b64decode from struct import pack def toUniqueString(d): if isinstance(d, int) or isinstance(d, float) or isinstance(d, long): s = 'n' + repr(d) elif isinstance(d, str): s = 's' + d elif isinstance(d, list):...
32.432961
112
0.571872
10,779
0.928344
0
0
0
0
0
0
2,561
0.220567
d06c950496205dbbc1ed9eef4c8c7e1dcbe953e8
1,668
py
Python
tests/pipeline/nodes/dabble/test_check_large_groups.py
ericleehy/PeekingDuck
8cf1be842235fa60bac13bc466cac09747a780ea
[ "Apache-2.0" ]
1
2021-12-02T05:15:58.000Z
2021-12-02T05:15:58.000Z
tests/pipeline/nodes/dabble/test_check_large_groups.py
ericleehy/PeekingDuck
8cf1be842235fa60bac13bc466cac09747a780ea
[ "Apache-2.0" ]
null
null
null
tests/pipeline/nodes/dabble/test_check_large_groups.py
ericleehy/PeekingDuck
8cf1be842235fa60bac13bc466cac09747a780ea
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 AI Singapore # # 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...
34.040816
87
0.678657
831
0.498201
0
0
168
0.100719
0
0
782
0.468825
d06e09e4639214f16deaafbd6112fa849f57cd73
2,684
py
Python
src/seisspark/seisspark_context.py
kdeyev/SeisSpark
528d22143acb72e78ed310091db07eb5d731ca09
[ "ECL-2.0", "Apache-2.0" ]
11
2017-08-16T02:32:37.000Z
2020-12-25T07:18:57.000Z
src/seisspark/seisspark_context.py
kdeyev/SeisSpark
528d22143acb72e78ed310091db07eb5d731ca09
[ "ECL-2.0", "Apache-2.0" ]
1
2018-10-15T14:44:17.000Z
2018-10-15T14:44:17.000Z
src/seisspark/seisspark_context.py
kdeyev/SeisSpark
528d22143acb72e78ed310091db07eb5d731ca09
[ "ECL-2.0", "Apache-2.0" ]
5
2018-05-16T02:36:38.000Z
2020-06-15T07:46:50.000Z
# ============================================================================= # Copyright (c) 2021 SeisSpark (https://github.com/kdeyev/SeisSpark). # # 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 Lice...
38.342857
117
0.616617
1,547
0.576379
0
0
88
0.032787
0
0
1,332
0.496274
d06f1cb2d99e6c91380d0f70f6e5f7c771735207
1,116
py
Python
tests/parsers/notifications/test_Notification.py
Tberdy/python-amazon-mws-tools
2925118ce113851a2d8db98ad7f99163154f4151
[ "Unlicense" ]
9
2017-03-28T12:58:36.000Z
2020-03-02T14:42:32.000Z
tests/parsers/notifications/test_Notification.py
Tberdy/python-amazon-mws-tools
2925118ce113851a2d8db98ad7f99163154f4151
[ "Unlicense" ]
5
2017-01-05T19:36:18.000Z
2021-12-13T19:43:42.000Z
tests/parsers/notifications/test_Notification.py
Tberdy/python-amazon-mws-tools
2925118ce113851a2d8db98ad7f99163154f4151
[ "Unlicense" ]
5
2017-02-15T17:29:02.000Z
2019-03-06T07:30:55.000Z
from unittest import TestCase from unittest import TestSuite from unittest import main from unittest import makeSuite from mwstools.parsers.notifications import Notification class Dummy(object): """ Only used for test_notification_payload since there is not actually a payload to test. """ def __init...
20.666667
90
0.669355
738
0.66129
0
0
0
0
0
0
337
0.301971
d06f2e4133f899f7d55993a62f6fac399373c048
1,025
py
Python
sec_certs/config/configuration.py
J08nY/sec-certs
d25a4a7c830c587a45eb8e37d99f8794dec1a5eb
[ "MIT" ]
2
2021-03-24T11:56:15.000Z
2021-04-12T12:22:16.000Z
sec_certs/config/configuration.py
J08nY/sec-certs
d25a4a7c830c587a45eb8e37d99f8794dec1a5eb
[ "MIT" ]
73
2021-04-12T14:04:04.000Z
2022-03-31T15:40:26.000Z
sec_certs/config/configuration.py
J08nY/sec-certs
d25a4a7c830c587a45eb8e37d99f8794dec1a5eb
[ "MIT" ]
3
2021-03-26T16:15:49.000Z
2021-05-10T07:26:23.000Z
import json from pathlib import Path from typing import Union import jsonschema import yaml class Configuration(object): def load(self, filepath: Union[str, Path]): with Path(filepath).open("r") as file: state = yaml.load(file, Loader=yaml.FullLoader) script_dir = Path(__file__).pare...
27.702703
75
0.643902
807
0.787317
0
0
0
0
0
0
85
0.082927
d0703322f54aad95ad1c141cfb0733e4dbc48655
25
py
Python
src/masonite/events/__init__.py
cercos/masonite
f7f220efa7fae833683e9f07ce13c3795a87d3b8
[ "MIT" ]
1,816
2018-02-14T01:59:51.000Z
2022-03-31T17:09:20.000Z
src/masonite/events/__init__.py
cercos/masonite
f7f220efa7fae833683e9f07ce13c3795a87d3b8
[ "MIT" ]
340
2018-02-11T00:27:26.000Z
2022-03-21T12:00:24.000Z
src/masonite/events/__init__.py
cercos/masonite
f7f220efa7fae833683e9f07ce13c3795a87d3b8
[ "MIT" ]
144
2018-03-18T00:08:16.000Z
2022-02-26T01:51:58.000Z
from .Event import Event
12.5
24
0.8
0
0
0
0
0
0
0
0
0
0
d0707615a365376fb262ae4ab58d6c156cbaf97a
4,415
py
Python
parlai/scripts/split_phrases.py
shigailowa/ParlAI
5bb359cdacb8f2b92ba482273cdff20f0d147a72
[ "MIT" ]
null
null
null
parlai/scripts/split_phrases.py
shigailowa/ParlAI
5bb359cdacb8f2b92ba482273cdff20f0d147a72
[ "MIT" ]
null
null
null
parlai/scripts/split_phrases.py
shigailowa/ParlAI
5bb359cdacb8f2b92ba482273cdff20f0d147a72
[ "MIT" ]
null
null
null
import nltk from nltk.chunk.regexp import ChunkString, ChunkRule, ChinkRule from nltk.tree import Tree from nltk.chunk import RegexpParser from nltk.corpus import conll2000 from nltk.tag import NgramTagger #class for Unigram Chunking class UnigramChunker(nltk.ChunkParserI): def __init__(self, train_sents): ...
29.433333
94
0.69966
1,890
0.428086
0
0
0
0
0
0
1,139
0.257984
d071b10778e993030b61af048f8e39a048b36969
3,014
py
Python
tests/test_class/import_export_test.py
ThomasLandstra/pysave
acc3da93858f541ea4f3ffc6062d9689d28f5ee5
[ "MIT" ]
1
2022-03-14T04:32:42.000Z
2022-03-14T04:32:42.000Z
tests/test_class/import_export_test.py
ThomasLandstra/pysave
acc3da93858f541ea4f3ffc6062d9689d28f5ee5
[ "MIT" ]
6
2021-10-11T07:20:40.000Z
2022-03-17T01:31:33.000Z
tests/test_class/import_export_test.py
ThomasLandstra/pysave
acc3da93858f541ea4f3ffc6062d9689d28f5ee5
[ "MIT" ]
null
null
null
# Imports from os.path import join, isfile from os import remove, rmdir from pysav import Save, does_save_exist, does_app_dir_exist, generate_environment_path from utils.random_data import generate_dict # Test def test_answer(): """Does Save work as expected""" # Test Importing # Create file to be importe...
29.54902
86
0.595886
0
0
0
0
0
0
0
0
680
0.225614
d0724f179ed3e0352058e826e5ed580723fd7c4d
1,250
py
Python
insights/parsers/tests/test_ansible_tower_settings.py
maxamillion/insights-core
aa11e07e68077df97b6c85219911f8382be6e2fa
[ "Apache-2.0" ]
null
null
null
insights/parsers/tests/test_ansible_tower_settings.py
maxamillion/insights-core
aa11e07e68077df97b6c85219911f8382be6e2fa
[ "Apache-2.0" ]
null
null
null
insights/parsers/tests/test_ansible_tower_settings.py
maxamillion/insights-core
aa11e07e68077df97b6c85219911f8382be6e2fa
[ "Apache-2.0" ]
null
null
null
import doctest import pytest from insights.parsers import ansible_tower_settings, SkipException from insights.tests import context_wrap ANSIBLE_TOWER_CONFIG_CUSTOM = ''' AWX_CLEANUP_PATHS = False LOGGING['handlers']['tower_warnings']['level'] = 'DEBUG' '''.strip() ANSIBLE_TOWER_CONFIG_CUSTOM_INVALID1 = ''' '''.strip...
32.051282
110
0.7848
0
0
0
0
0
0
0
0
202
0.1616
d073713261d4accea1d939cebd542842ecae613a
1,320
py
Python
app/utils/zones.py
Xerrors/Meco-Server
f2111bab7691c0b567d5c3b3f38b83fee152a689
[ "MIT" ]
1
2021-07-28T11:24:02.000Z
2021-07-28T11:24:02.000Z
app/utils/zones.py
Xerrors/Meco-Server
f2111bab7691c0b567d5c3b3f38b83fee152a689
[ "MIT" ]
null
null
null
app/utils/zones.py
Xerrors/Meco-Server
f2111bab7691c0b567d5c3b3f38b83fee152a689
[ "MIT" ]
null
null
null
import os import json from app.config import DATA_PATH """ _id: ID date: 日期 eg "2020-02-06T15:24:59.942Z" msg: 消息内容 eg "这是内容" status: 状态 eg "😫" (a emoji) """ def get_zones(): with open(os.path.join(DATA_PATH, 'zone.json'), 'r') as f: data = json.load(f) return data['data'] de...
18.082192
62
0.524242
0
0
0
0
0
0
0
0
301
0.220513
d078c0acdf412550824a96d5fadcbd21aeb88416
2,534
py
Python
fungal_automata/utils.py
ranyishere/fungal_automata_comap2021
1ef4f00a3e6f17413a60f6882dbee6f156aadfa0
[ "MIT" ]
null
null
null
fungal_automata/utils.py
ranyishere/fungal_automata_comap2021
1ef4f00a3e6f17413a60f6882dbee6f156aadfa0
[ "MIT" ]
null
null
null
fungal_automata/utils.py
ranyishere/fungal_automata_comap2021
1ef4f00a3e6f17413a60f6882dbee6f156aadfa0
[ "MIT" ]
null
null
null
import random import pprint import matplotlib.pyplot as plt import numpy as np from cells import * pp = pprint.PrettyPrinter(indent=2) random.seed(5) def get_image_from_state(cells, time, debug=False): """ Generates an image from the cell states """ # print("time: ", time) img = [] for rix,...
23.247706
83
0.54341
0
0
0
0
0
0
0
0
658
0.259669
d07c7ec019295c93900e320c5fcec0bc4db8705b
415
py
Python
src/server/event_test.py
cnlohr/bridgesim
ff33b63db813eedfc8155c9fecda4c8f1c06ab60
[ "MIT" ]
4
2015-05-03T07:37:34.000Z
2018-05-09T22:27:33.000Z
src/server/event_test.py
cnlohr/bridgesim
ff33b63db813eedfc8155c9fecda4c8f1c06ab60
[ "MIT" ]
1
2016-08-07T16:56:38.000Z
2016-08-07T16:56:38.000Z
src/server/event_test.py
cnlohr/bridgesim
ff33b63db813eedfc8155c9fecda4c8f1c06ab60
[ "MIT" ]
null
null
null
#! /usr/bin/python3 import time from events import * def test1(foo, *args): print("foo: %s otherargs: %s time: %06.3f" % (foo, args, time.time() % 100)) q = QueueExecutor() q.addEvent(test1, time.time() + 3, 1, 5, "foo", "bar", "baz") q.addEvent(test1, time.time() + .5, .3, 20, "foo2", "bar") print("Main thread as...
27.666667
78
0.621687
0
0
0
0
0
0
0
0
142
0.342169
d07d20e45fea750c32612fcddef24ffc98a05b67
1,845
py
Python
gd/iter_utils.py
nekitdev/gd.py
b9d5e29c09f953f54b9b648fb677e987d9a8e103
[ "MIT" ]
58
2020-09-30T16:51:22.000Z
2022-02-13T17:27:48.000Z
gd/iter_utils.py
NeKitDS/gd.py
b9d5e29c09f953f54b9b648fb677e987d9a8e103
[ "MIT" ]
30
2019-07-29T12:03:41.000Z
2020-09-15T17:01:37.000Z
gd/iter_utils.py
NeKitDS/gd.py
b9d5e29c09f953f54b9b648fb677e987d9a8e103
[ "MIT" ]
20
2019-12-06T03:16:57.000Z
2020-09-16T17:45:27.000Z
from typing import Any, Callable, Dict, Iterable, Mapping, Tuple, TypeVar, Union, cast, overload __all__ = ("extract_iterable_from_tuple", "is_iterable", "item_to_tuple", "mapping_merge") KT = TypeVar("KT") VT = TypeVar("VT") T = TypeVar("T") def mapping_merge(*mappings: Mapping[KT, VT], **arguments: VT) -> Dict[K...
24.276316
96
0.635772
0
0
0
0
471
0.255285
0
0
199
0.107859
d07d7eac9f05f51f4abf2075d7c3883791a41eb9
937
py
Python
spacetime/distort_ss.py
uhrwecker/GRDonuts
3087aeb5c169251bdb711b425dcc3040ff962da7
[ "MIT" ]
null
null
null
spacetime/distort_ss.py
uhrwecker/GRDonuts
3087aeb5c169251bdb711b425dcc3040ff962da7
[ "MIT" ]
25
2020-03-26T11:16:58.000Z
2020-09-10T18:31:52.000Z
spacetime/distort_ss.py
uhrwecker/GRDonuts
3087aeb5c169251bdb711b425dcc3040ff962da7
[ "MIT" ]
null
null
null
import numpy as np from spacetime.potential import Potential class DistortedSchwarzschild(Potential): def __init__(self, theta=np.pi/2, l=3.8, o=1, r_range=(2, 20), num=10000, cont_without_eq=False, verbose=True): super().__init__(r_range=r_range, num=num, cont_wit...
37.48
79
0.526147
874
0.932764
0
0
0
0
0
0
0
0
d07df814cb6748757669097a641e731236e968f6
7,672
py
Python
scripts/deploy.py
tallywiesenberg/algorand-tellorflex
5fa673a637338e4dfa15b0cf4937a757890a5e14
[ "MIT" ]
null
null
null
scripts/deploy.py
tallywiesenberg/algorand-tellorflex
5fa673a637338e4dfa15b0cf4937a757890a5e14
[ "MIT" ]
null
null
null
scripts/deploy.py
tallywiesenberg/algorand-tellorflex
5fa673a637338e4dfa15b0cf4937a757890a5e14
[ "MIT" ]
null
null
null
from typing import Tuple, List from algosdk.v2client.algod import AlgodClient from algosdk.future import transaction from algosdk.logic import get_application_address from algosdk import account, encoding from pyteal import compileTeal, Mode, Keccak256 from tellorflex.methods import report from utils.account import ...
37.607843
202
0.669317
5,808
0.757039
0
0
0
0
0
0
2,758
0.359489
d07f63644facb997bb2d4b1393d95a337bd66e35
11,118
py
Python
parse-vocab-list.py
kltm/kanji-textbook-table
e97630b47c4b00b734f0f29794331e7a0fd857d5
[ "BSD-3-Clause" ]
null
null
null
parse-vocab-list.py
kltm/kanji-textbook-table
e97630b47c4b00b734f0f29794331e7a0fd857d5
[ "BSD-3-Clause" ]
null
null
null
parse-vocab-list.py
kltm/kanji-textbook-table
e97630b47c4b00b734f0f29794331e7a0fd857d5
[ "BSD-3-Clause" ]
null
null
null
#### #### Convert a TSV into a fully parsed JSON list blob that could be #### used by a mustache (or other logicless) template. #### #### Example usage to analyze the usual suspects: #### python3 parse.py --help #### #### Get report of current problems: #### python3 parse-vocab-list.py --tsv ~/Downloads/UCSC中上級教科書_漢字...
48.977974
394
0.477154
0
0
0
0
0
0
0
0
4,050
0.35828
d080168f53e03ca48aa7bb5ade9767788f28ed6f
2,716
py
Python
expressy/importer.py
timedata-org/expressy
0aaeffa430c1ccfe649ee2bcdb69e7feb48ada95
[ "MIT" ]
1
2017-01-22T18:53:52.000Z
2017-01-22T18:53:52.000Z
expressy/importer.py
timedata-org/expressy
0aaeffa430c1ccfe649ee2bcdb69e7feb48ada95
[ "MIT" ]
10
2017-01-23T15:41:15.000Z
2017-07-11T11:55:46.000Z
expressy/importer.py
timedata-org/expressy
0aaeffa430c1ccfe649ee2bcdb69e7feb48ada95
[ "MIT" ]
null
null
null
import builtins, importlib class Importer(object): """An Importer imports either a namespace or a symbol within a namespace. It's like a more general version of importlib.import_module which handles builtins and attributes within a module. An Importer has a symbol_table that's always used to try to ...
33.121951
79
0.621134
2,662
0.980118
0
0
0
0
0
0
1,484
0.546392
d0805f0b04c5487557b620b5f784fdf929044314
13,190
py
Python
maintenance_utils.py
lawrluor/matchstats
0c8cd08403d5fa2772b3d5d9391a804866d15dce
[ "BSD-3-Clause" ]
6
2015-06-22T16:51:03.000Z
2017-12-05T22:18:39.000Z
maintenance_utils.py
lawrluor/matchstats
0c8cd08403d5fa2772b3d5d9391a804866d15dce
[ "BSD-3-Clause" ]
1
2021-06-01T21:44:48.000Z
2021-06-01T21:44:48.000Z
maintenance_utils.py
lawrluor/matchstats
0c8cd08403d5fa2772b3d5d9391a804866d15dce
[ "BSD-3-Clause" ]
null
null
null
from app import app, db from app.models import * import datetime import sys sys.path.append('./sanitize') from sanitize_utils import * from trueskill import setup, Rating, quality_1vs1, rate_1vs1 from trueskill_functions import MU, SIGMA, CONS_MU, BETA, TAU, DRAW_PROBABILITY, populate_trueskills from misc_utils impor...
37.050562
208
0.731463
0
0
0
0
0
0
0
0
4,171
0.316224
d08121c2bb321f45165a5c878bb41be255cfeaf3
406,902
py
Python
tools/tests/bourne.py
CoprHD/sds-controller
a575ec96928b1e9258313efe92c930bfe9d6753a
[ "Apache-2.0" ]
91
2015-06-06T01:40:34.000Z
2020-11-24T07:26:40.000Z
tools/tests/bourne.py
CoprHD/sds-controller
a575ec96928b1e9258313efe92c930bfe9d6753a
[ "Apache-2.0" ]
3
2015-07-14T18:47:53.000Z
2015-07-14T18:50:16.000Z
tools/tests/bourne.py
CoprHD/sds-controller
a575ec96928b1e9258313efe92c930bfe9d6753a
[ "Apache-2.0" ]
71
2015-06-05T21:35:31.000Z
2021-11-07T16:32:46.000Z
# coding=utf-8 # # Copyright (c) 2015 EMC Corporation # All Rights Reserved # import httplib import cjson import argparse import sys import os import time import json import uuid import base64 import urllib import requests import email from email.Utils import formatdate import cookielib import telnetlib import xml.etr...
41.213613
375
0.608569
370,642
0.910883
0
0
50,679
0.124548
0
0
73,587
0.180846
d08144c8fccf523fe00afd797e29a4fc88443666
851
py
Python
configuration.py
stoberblog/sunspec-modbus
2ce7cc6e92cb480cce4e488c8ffd716ec053ec01
[ "MIT" ]
22
2018-03-01T16:13:48.000Z
2022-02-27T07:59:24.000Z
configuration.py
msgis/sunspec-modbus
2ce7cc6e92cb480cce4e488c8ffd716ec053ec01
[ "MIT" ]
null
null
null
configuration.py
msgis/sunspec-modbus
2ce7cc6e92cb480cce4e488c8ffd716ec053ec01
[ "MIT" ]
7
2019-03-02T17:10:29.000Z
2021-06-19T00:26:05.000Z
# -*- coding: utf-8 -*- """ @author: stoberblog @detail: This is a configuration file for the Solar Modbus project. """ # MODBUS DETAILS INVERTER_IP = "192.168.1.29" MODBUS_PORT = 7502 METER_ADDR = 240 MODBUS_TIMEOUT = 30 #seconds to wait before failure # METER INSTALLED METER_INSTALLED =...
26.59375
129
0.673325
0
0
0
0
0
0
0
0
529
0.621622
d0814ab2d80cbf44bcd4c19447312d5ef89e098c
2,533
py
Python
tests/test_plain.py
Nafi-Amaan-Hossain/willpyre
a506d32765088c8e59c46672946891e61dce87f2
[ "BSD-3-Clause" ]
1
2021-08-16T08:18:22.000Z
2021-08-16T08:18:22.000Z
tests/test_plain.py
Nafi-Amaan-Hossain/willpyre
a506d32765088c8e59c46672946891e61dce87f2
[ "BSD-3-Clause" ]
null
null
null
tests/test_plain.py
Nafi-Amaan-Hossain/willpyre
a506d32765088c8e59c46672946891e61dce87f2
[ "BSD-3-Clause" ]
null
null
null
from async_asgi_testclient import TestClient from myapp import main import pytest @pytest.mark.asyncio async def test_willpyre_app(): async with TestClient(main) as client: resp = await client.get("/") assert resp.status_code == 200 assert resp.text == "index page" @pytest.mark.asyncio ...
25.585859
67
0.660087
0
0
0
0
2,418
0.954599
2,187
0.863403
340
0.134228
d0819d8d58bd2ac25c22fc55e6bd0a929bf9571f
122
py
Python
rangefinder/bosch/requests/constants/__init__.py
tothcs1105/BOSCH-GLM-rangefinder
419179bd63be97060d91cb87b075da47610dfbfb
[ "MIT" ]
1
2020-08-03T15:31:13.000Z
2020-08-03T15:31:13.000Z
rangefinder/bosch/requests/constants/__init__.py
tothcs1105/BOSCH-GLM-rangefinder
419179bd63be97060d91cb87b075da47610dfbfb
[ "MIT" ]
null
null
null
rangefinder/bosch/requests/constants/__init__.py
tothcs1105/BOSCH-GLM-rangefinder
419179bd63be97060d91cb87b075da47610dfbfb
[ "MIT" ]
null
null
null
from .backlight_mode import BacklightMode from .angle_unit import AngleUnit from .measurement_unit import MeasurementUnit
30.5
45
0.877049
0
0
0
0
0
0
0
0
0
0
d084098c117233a70fe62aa538d6aad7c2570d51
577
py
Python
operations/plus.py
Ootmann/einmaleins
aeb986cf40b7638d14ad69b68fc12b1445cf3c9a
[ "MIT" ]
null
null
null
operations/plus.py
Ootmann/einmaleins
aeb986cf40b7638d14ad69b68fc12b1445cf3c9a
[ "MIT" ]
null
null
null
operations/plus.py
Ootmann/einmaleins
aeb986cf40b7638d14ad69b68fc12b1445cf3c9a
[ "MIT" ]
null
null
null
import random from operations import abstract_operation class Plus(abstract_operation.AbstractOperation): a = 0 b = 0 def __init__(self): super().__init__("+", "Addieren") def get_question(self): return "{} + {}".format(str(self.a), str(self.b)) def solve(self): return ...
22.192308
60
0.573657
517
0.896014
0
0
0
0
0
0
22
0.038128