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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5510dc6e8363a437e31e7e5a4bf4b7a901eabff1 | 459 | py | Python | cliva_fl/utils/__init__.py | DataManagementLab/thesis-fl_client-side_validation | 0f6a35d08966133e6a8c13a110b9307d91f2d9cb | [
"MIT"
] | null | null | null | cliva_fl/utils/__init__.py | DataManagementLab/thesis-fl_client-side_validation | 0f6a35d08966133e6a8c13a110b9307d91f2d9cb | [
"MIT"
] | null | null | null | cliva_fl/utils/__init__.py | DataManagementLab/thesis-fl_client-side_validation | 0f6a35d08966133e6a8c13a110b9307d91f2d9cb | [
"MIT"
] | null | null | null | from .utils import vc, load_config, tensors_close, tensors_close_sum, rand_true, freivalds_rounds, submul_ratio
from .partial_class import partial_class
from .validation_set import ValidationSet
from .validation_buffer import ValidationBuffer
from .register_hooks import register_activation_hooks, register_gradient_hook... | 51 | 111 | 0.873638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5513ebc4d50ae6eaae27a3d7a14bbfdad406c427 | 712 | py | Python | brainframe/api/stubs/__init__.py | aotuai/brainframe_python | 8397f2fd7a4402716c65d402417995b4862eeb7a | [
"BSD-3-Clause"
] | 4 | 2020-05-20T01:06:10.000Z | 2020-09-12T14:23:05.000Z | brainframe/api/stubs/__init__.py | aotuai/brainframe-python | 8397f2fd7a4402716c65d402417995b4862eeb7a | [
"BSD-3-Clause"
] | 8 | 2021-04-22T00:02:45.000Z | 2022-02-01T08:08:07.000Z | brainframe/api/stubs/__init__.py | aotuai/brainframe-python | 8397f2fd7a4402716c65d402417995b4862eeb7a | [
"BSD-3-Clause"
] | 2 | 2021-02-18T07:28:27.000Z | 2021-10-08T03:22:10.000Z | from .alerts import AlertStubMixin
from .analysis import AnalysisStubMixin
from .identities import IdentityStubMixin
from .capsules import CapsuleStubMixin
from .streams import StreamStubMixin
from .zone_statuses import ZoneStatusStubMixin
from .zones import ZoneStubMixin
from .storage import StorageStubMixin
from .ala... | 37.473684 | 48 | 0.873596 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5515891d5f1f8f61ee9eb8bdb9f6ccda922b50fc | 118 | py | Python | shgo/__init__.py | rkern/shgo | 03315284025e705f64bf84f3f9ba36026f6a7236 | [
"MIT"
] | null | null | null | shgo/__init__.py | rkern/shgo | 03315284025e705f64bf84f3f9ba36026f6a7236 | [
"MIT"
] | null | null | null | shgo/__init__.py | rkern/shgo | 03315284025e705f64bf84f3f9ba36026f6a7236 | [
"MIT"
] | null | null | null | from shgo.shgo_m.triangulation import *
from ._shgo import shgo
__all__ = [s for s in dir() if not s.startswith('_')] | 29.5 | 53 | 0.728814 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0.025424 |
55169c728f2c5da43dc85a640e3450e734567aeb | 20,482 | py | Python | opusfilter/filters.py | BrightXiaoHan/OpusFilter | 804c82a46837fc57ca69934314622043248f6042 | [
"MIT"
] | null | null | null | opusfilter/filters.py | BrightXiaoHan/OpusFilter | 804c82a46837fc57ca69934314622043248f6042 | [
"MIT"
] | null | null | null | opusfilter/filters.py | BrightXiaoHan/OpusFilter | 804c82a46837fc57ca69934314622043248f6042 | [
"MIT"
] | null | null | null | """Corpus filtering"""
import difflib
import itertools
import logging
import math
import os
import string
from typing import Iterator, List, Tuple
import rapidfuzz
import regex
from langid.langid import LanguageIdentifier, model
import pycld2
from bs4 import BeautifulSoup as bs
import fasttext
from . import FilterAB... | 36.640429 | 122 | 0.621424 | 19,727 | 0.96295 | 3,917 | 0.191204 | 531 | 0.02592 | 0 | 0 | 5,381 | 0.262667 |
55180aff035712fdcf712454876146f0f9f3d598 | 180 | py | Python | Python_2/FOR e IN/programa -- Soma dos Pares.py | NicolasGandolfi/Exercicios-Python | 935fe3577c149192f9e29568e9798e970a620131 | [
"MIT"
] | null | null | null | Python_2/FOR e IN/programa -- Soma dos Pares.py | NicolasGandolfi/Exercicios-Python | 935fe3577c149192f9e29568e9798e970a620131 | [
"MIT"
] | null | null | null | Python_2/FOR e IN/programa -- Soma dos Pares.py | NicolasGandolfi/Exercicios-Python | 935fe3577c149192f9e29568e9798e970a620131 | [
"MIT"
] | null | null | null | s=0
c=0
for n in range(6):
num=int(input('digite o {}º número:'.format(n+1)))
if num%2==0:
s+=num
c+=1
print('a soma dos {} números pares é {}'.format(c,s)) | 22.5 | 54 | 0.533333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.326087 |
551845565ec5d90acf0eee28224a4ae202f9477d | 3,736 | py | Python | backend/FlaskAPI/mf_get_table_data.py | steruel/CovalentMFFPrototype | 275ade0fa0a2ce3c80ed3aaac3a861dd0e273622 | [
"MIT"
] | null | null | null | backend/FlaskAPI/mf_get_table_data.py | steruel/CovalentMFFPrototype | 275ade0fa0a2ce3c80ed3aaac3a861dd0e273622 | [
"MIT"
] | null | null | null | backend/FlaskAPI/mf_get_table_data.py | steruel/CovalentMFFPrototype | 275ade0fa0a2ce3c80ed3aaac3a861dd0e273622 | [
"MIT"
] | null | null | null |
# coding: utf-8
# In[1]:
##Includes
from flask import request, url_for
from flask_api import FlaskAPI, status, exceptions
from flask_cors import CORS, cross_origin
from flask import Blueprint, render_template, abort
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.rea... | 27.072464 | 159 | 0.738758 | 0 | 0 | 0 | 0 | 2,124 | 0.568522 | 0 | 0 | 1,484 | 0.397216 |
55192286c083738515eab7ff51801fcee926be51 | 2,119 | py | Python | dkr-py310/docker-student-portal-310/course_files/begin_advanced/py_numpy_1.py | pbarton666/virtual_classroom | a9d0dc2eb16ebc4d2fd451c3a3e6f96e37c87675 | [
"MIT"
] | null | null | null | dkr-py310/docker-student-portal-310/course_files/begin_advanced/py_numpy_1.py | pbarton666/virtual_classroom | a9d0dc2eb16ebc4d2fd451c3a3e6f96e37c87675 | [
"MIT"
] | null | null | null | dkr-py310/docker-student-portal-310/course_files/begin_advanced/py_numpy_1.py | pbarton666/virtual_classroom | a9d0dc2eb16ebc4d2fd451c3a3e6f96e37c87675 | [
"MIT"
] | null | null | null | #py_numpy_1.py
"""a snake-charming application"""
from PIL import Image
import numpy as np
import os
idir =os.getcwd()
iname= 'im3.png'# 'white_snake.PNG'
saveas='new_snake.PNG'
#sets up an array for pixel processing
white=np.array([255,255,255,0]) #r, g, b, a
transparent = np.array([0, 0, 0, 0])
background = whit... | 32.6 | 88 | 0.747994 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 841 | 0.396885 |
5519d50b257da54e3b0054563d77f75181fccdb3 | 2,958 | py | Python | zfg2parser.py | valoeghese/ZoesteriaConf | 10c3239acde2b4568bb48d1d71b3798ecff0afc3 | [
"MIT"
] | 1 | 2020-09-02T19:24:22.000Z | 2020-09-02T19:24:22.000Z | zfg2parser.py | valoeghese/ZoesteriaConf | 10c3239acde2b4568bb48d1d71b3798ecff0afc3 | [
"MIT"
] | 7 | 2020-08-08T01:57:29.000Z | 2021-05-08T08:50:19.000Z | zfg2parser.py | valoeghese/ZoesteriaConf | 10c3239acde2b4568bb48d1d71b3798ecff0afc3 | [
"MIT"
] | 1 | 2021-04-29T14:25:21.000Z | 2021-04-29T14:25:21.000Z | class Container:
def __init__(self):
self.data = {}
index = -1
# compound "container" entries
def parseContainer(container, data, size):
global index
mode = 0 # 0 = var names, 1 = var values
buffer = ""
while index + 1 < size:
index += 1
char = data[index]
... | 29.58 | 85 | 0.499324 | 65 | 0.021974 | 0 | 0 | 0 | 0 | 0 | 0 | 593 | 0.200473 |
551b09ca0d43e7df528a517a764809a6c7946e75 | 3,017 | py | Python | syndicate/connection/secrets_manager_connection.py | Dmytro-Skorniakov/aws-syndicate | 81363334886c53969f1f0a0c0ac0168318204990 | [
"Apache-2.0"
] | null | null | null | syndicate/connection/secrets_manager_connection.py | Dmytro-Skorniakov/aws-syndicate | 81363334886c53969f1f0a0c0ac0168318204990 | [
"Apache-2.0"
] | null | null | null | syndicate/connection/secrets_manager_connection.py | Dmytro-Skorniakov/aws-syndicate | 81363334886c53969f1f0a0c0ac0168318204990 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2018 EPAM Systems, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | 39.181818 | 101 | 0.670202 | 2,160 | 0.715943 | 0 | 0 | 2,192 | 0.72655 | 0 | 0 | 1,050 | 0.348028 |
551b46a9abb3f55dfb647a884266cebfd6c4db08 | 3,324 | py | Python | Simple GAN/networks.py | Srujan35007/My-GANs | 7953c859169134a0a84ac3cd674f629af9942465 | [
"MIT"
] | null | null | null | Simple GAN/networks.py | Srujan35007/My-GANs | 7953c859169134a0a84ac3cd674f629af9942465 | [
"MIT"
] | null | null | null | Simple GAN/networks.py | Srujan35007/My-GANs | 7953c859169134a0a84ac3cd674f629af9942465 | [
"MIT"
] | null | null | null | import time
b = time.time()
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchsummary import summary
from math import log2, exp
a = time.time()
print('Imports complete in %.3f seconds' % (a-b))
class Generator(nn.Module):
def __init__(self,latent_dims=128,n_channels=3,max_resolution=64,... | 39.571429 | 105 | 0.663357 | 2,753 | 0.828219 | 0 | 0 | 0 | 0 | 0 | 0 | 108 | 0.032491 |
551c341bfebf085d7288ee08b3180f837e7122dd | 2,607 | py | Python | ui/Rhino/RV2/dev/__temp/RV2init_console_cmd.py | tkmmark/compas-RV2 | bc18f4dada9c1e31a0f7df4ef981934c6d2b05b3 | [
"MIT"
] | null | null | null | ui/Rhino/RV2/dev/__temp/RV2init_console_cmd.py | tkmmark/compas-RV2 | bc18f4dada9c1e31a0f7df4ef981934c6d2b05b3 | [
"MIT"
] | null | null | null | ui/Rhino/RV2/dev/__temp/RV2init_console_cmd.py | tkmmark/compas-RV2 | bc18f4dada9c1e31a0f7df4ef981934c6d2b05b3 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import scriptcontext as sc
try:
import compas # noqa: F401
import compas_rhino # noqa: F401
import compas_ags # noqa: F401
import compas_tna # noqa: F401
import compas_cloud ... | 24.59434 | 80 | 0.542769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,137 | 0.436133 |
551c6b36cc572d6424d1e8e35b4d86a47b2d8f93 | 3,783 | py | Python | utils/count_supported.py | delcypher/smt-coral-wrapper | e7024efd83ba2da87fb178917f49a6b430b9c01c | [
"MIT"
] | 1 | 2018-05-04T03:51:58.000Z | 2018-05-04T03:51:58.000Z | utils/count_supported.py | delcypher/smt2coral | e7024efd83ba2da87fb178917f49a6b430b9c01c | [
"MIT"
] | null | null | null | utils/count_supported.py | delcypher/smt2coral | e7024efd83ba2da87fb178917f49a6b430b9c01c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# vim: set sw=4 ts=4 softtabstop=4 expandtab:
"""
Read invocation info file for smt-runner
and report which benchmarks are supported
by the CoralPrinter.
"""
# HACK: put smt2coral in search path
import os
import sys
_repo_root = os.path.dirname(os.path.dirname(__file__))
sys.path.insert(0, ... | 32.612069 | 78 | 0.662437 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 785 | 0.207507 |
551d7656dfcd2d9ac6106ecaf6448701f59205fd | 393 | py | Python | closest_numbers.py | odellus/year_of_code | bfa2b30893bcc12f46e73ac34c63b5b05b27af5f | [
"MIT"
] | 1 | 2017-01-03T02:24:34.000Z | 2017-01-03T02:24:34.000Z | closest_numbers.py | odellus/year_of_code | bfa2b30893bcc12f46e73ac34c63b5b05b27af5f | [
"MIT"
] | null | null | null | closest_numbers.py | odellus/year_of_code | bfa2b30893bcc12f46e73ac34c63b5b05b27af5f | [
"MIT"
] | null | null | null | def closestNumbers(numbers):
numbers.sort()
mindiff = sys.maxint
n = len(numbers)
for k in range(n-1):
absdiff = abs(numbers[k] - numbers[k+1])
if absdiff < mindiff:
mindiff = absdiff
for k in range(n-1):
absdiff = abs(numbers[k] - numbers[k+1])
if absdiff... | 30.230769 | 59 | 0.554707 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.022901 |
551f2a4107231a13573c3c3b43e182531e15c00c | 18,810 | py | Python | atoman/filtering/filterer.py | chrisdjscott/Atoman | e87ac31bbdcf53bb8f3efdfb109787d604890394 | [
"MIT"
] | 9 | 2015-11-23T12:13:34.000Z | 2021-11-18T05:23:35.000Z | atoman/filtering/filterer.py | chrisdjscott/Atoman | e87ac31bbdcf53bb8f3efdfb109787d604890394 | [
"MIT"
] | 1 | 2017-07-17T20:27:50.000Z | 2017-07-23T05:27:15.000Z | atoman/filtering/filterer.py | chrisdjscott/Atoman | e87ac31bbdcf53bb8f3efdfb109787d604890394 | [
"MIT"
] | 4 | 2015-11-23T12:13:37.000Z | 2017-05-03T08:24:19.000Z |
"""
The filterer object.
@author: Chris Scott
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import copy
import time
import logging
import numpy as np
import six
from six.moves import zip
from .filters import _filtering as filtering_c
from ..system.atoms import elements
from . i... | 42.080537 | 119 | 0.563477 | 18,362 | 0.976183 | 0 | 0 | 0 | 0 | 0 | 0 | 3,432 | 0.182456 |
551fb4d66e7bdb8b9da3ce7860f15d493f500f54 | 475 | py | Python | Entree_in/rou.py | dipkhandait/Entree_in | 5cc03555b1e8022262dffa0a0a459637fa9f49c7 | [
"MIT"
] | null | null | null | Entree_in/rou.py | dipkhandait/Entree_in | 5cc03555b1e8022262dffa0a0a459637fa9f49c7 | [
"MIT"
] | null | null | null | Entree_in/rou.py | dipkhandait/Entree_in | 5cc03555b1e8022262dffa0a0a459637fa9f49c7 | [
"MIT"
] | null | null | null | import sqlite3
connection = sqlite3.connect("Project.db")
cursor = connection.cursor()
S_user = cursor.execute(f"SELECT * FROM Current_login WHERE No = '{1}'")
record = S_user.fetchone()
user = record[0]
print(user)
try:
Spl_user = cursor.execute(f"SELECT * FROM Col_Pref_list where Username = '{user}'")
recor... | 26.388889 | 87 | 0.696842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 142 | 0.298947 |
5520df1b613fa85e6ad8dd2ba56eeb9d62e2e7df | 2,766 | py | Python | tests/cases/yield_test.py | MiguelMarcelino/py2many | 9b040b2a157e265df9c053eaf3e5cd644d3e30d0 | [
"MIT"
] | 2 | 2022-02-02T11:37:53.000Z | 2022-03-30T18:19:06.000Z | tests/cases/yield_test.py | MiguelMarcelino/py2many | 9b040b2a157e265df9c053eaf3e5cd644d3e30d0 | [
"MIT"
] | 25 | 2022-02-28T21:19:11.000Z | 2022-03-23T21:26:20.000Z | tests/cases/yield_test.py | MiguelMarcelino/py2many | 9b040b2a157e265df9c053eaf3e5cd644d3e30d0 | [
"MIT"
] | null | null | null | @resumable # For PyJL
def generator_func():
num = 1
yield num
num = 5
yield num
num = 10
yield num
@resumable
def generator_func_loop():
num = 0
for n in range(0, 3):
yield num + n
@resumable
def generator_func_loop_using_var():
num = 0
end = 2
end = 3 # should get ... | 22.487805 | 109 | 0.5141 | 166 | 0.060014 | 846 | 0.305857 | 949 | 0.343095 | 0 | 0 | 859 | 0.310557 |
5521cf44b0712c36f70ad0bbd932c50c521247f6 | 1,252 | py | Python | apps/api/quipper/main.py | phillamb168/system-design | d074409211521c930a2b355cac102caef827d627 | [
"Apache-2.0"
] | 3 | 2021-11-12T11:00:35.000Z | 2022-02-16T10:33:53.000Z | apps/api/quipper/main.py | phillamb168/system-design | d074409211521c930a2b355cac102caef827d627 | [
"Apache-2.0"
] | null | null | null | apps/api/quipper/main.py | phillamb168/system-design | d074409211521c930a2b355cac102caef827d627 | [
"Apache-2.0"
] | 8 | 2021-08-04T18:47:18.000Z | 2022-03-15T10:14:32.000Z | from fastapi import (
Depends,
FastAPI,
)
from fastapi.middleware.cors import CORSMiddleware
from sqlalchemy.orm import Session
from quipper import (
models,
schemas,
services,
)
from quipper.database import (
SessionLocal,
engine,
)
# Create the tables
models.Base.metadata.create_all(bin... | 21.220339 | 76 | 0.664537 | 0 | 0 | 95 | 0.075879 | 575 | 0.459265 | 0 | 0 | 170 | 0.135783 |
5522df8e11c9c1d695b6fd19a76f81ba0655ccc5 | 3,611 | py | Python | data_structures/adjacency_list_graph.py | avg-2049-joe/py-algo-ds | 4f9c3c086e134ee23fcc0ee3b981e81f40e860cd | [
"MIT"
] | null | null | null | data_structures/adjacency_list_graph.py | avg-2049-joe/py-algo-ds | 4f9c3c086e134ee23fcc0ee3b981e81f40e860cd | [
"MIT"
] | null | null | null | data_structures/adjacency_list_graph.py | avg-2049-joe/py-algo-ds | 4f9c3c086e134ee23fcc0ee3b981e81f40e860cd | [
"MIT"
] | null | null | null | """Adjacency list is a graph representation using array or a hash map"""
from collections import deque
class AdjacencyListGraph:
"""Graph representation using dictionary"""
def __init__(self):
self.__nodes = {}
def __str__(self):
return str(self.__nodes)
def insert_vertex(self, data... | 27.356061 | 79 | 0.623927 | 2,687 | 0.744115 | 0 | 0 | 0 | 0 | 0 | 0 | 1,029 | 0.284963 |
5523fbe79d2ce42233aa94670f1b7a5b2c7819fa | 4,515 | py | Python | monroe-netalyzr/files/runme2.py | ana-cc/dockerstuffs | 98131138731dd3c7a18e4e1a3b6975e3778502f9 | [
"BSD-2-Clause"
] | 1 | 2020-09-10T19:15:09.000Z | 2020-09-10T19:15:09.000Z | monroe-netalyzr/files/runme2.py | ana-cc/dockerstuffs | 98131138731dd3c7a18e4e1a3b6975e3778502f9 | [
"BSD-2-Clause"
] | null | null | null | monroe-netalyzr/files/runme2.py | ana-cc/dockerstuffs | 98131138731dd3c7a18e4e1a3b6975e3778502f9 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
import json
import subprocess
import logging
from pyroute2 import IPDB
import sys
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger("runme")
def add_dns(interface):
str = ""
try:
with open('/dns') as dnsfile:
dnsdata = dnsfile.readlines()
dn... | 32.021277 | 127 | 0.50897 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 937 | 0.20753 |
9b28efc68a829abe66b1f36c000e5c38c0f766de | 9,725 | py | Python | teptools/summarise.py | nelsyeung/teptools | 90a8cde2793e509b30c6fca0c3f64320855cf7c6 | [
"MIT"
] | null | null | null | teptools/summarise.py | nelsyeung/teptools | 90a8cde2793e509b30c6fca0c3f64320855cf7c6 | [
"MIT"
] | null | null | null | teptools/summarise.py | nelsyeung/teptools | 90a8cde2793e509b30c6fca0c3f64320855cf7c6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import os
import argparse
import subprocess
import textwrap
import helpers
class Summarise():
def __init__(self, file, term_cols):
self.term_cols = term_cols
self.cols_width = [21, 22, 11, 15, 22]
self.in_lnv = False
self.lnv_iteration = 0
... | 34.003497 | 79 | 0.55671 | 4,725 | 0.485861 | 0 | 0 | 0 | 0 | 0 | 0 | 2,014 | 0.207095 |
9b292f152e109d6afd9ce99c12e29518dfc1f37f | 3,202 | py | Python | catfeeder_stepper.py | novalis111/catfeeder | 4597bb24b4d159b9a79ef18e808ccab15391c659 | [
"MIT"
] | null | null | null | catfeeder_stepper.py | novalis111/catfeeder | 4597bb24b4d159b9a79ef18e808ccab15391c659 | [
"MIT"
] | null | null | null | catfeeder_stepper.py | novalis111/catfeeder | 4597bb24b4d159b9a79ef18e808ccab15391c659 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Import required libraries
import time
import random
import datetime
import RPi.GPIO as GPIO
# Use BCM GPIO references instead of physical pin numbers
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP)
# 1 step = 1/4 of full
def rotate(movesteps, rotat... | 25.212598 | 100 | 0.538101 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,041 | 0.325008 |
9b2ae5c5d7a422f9f2eda94d4feb8800f0416e6f | 604 | py | Python | SpoTwillio/search.py | Natfan/funlittlethings | 80d5378b45b5c0ead725942ee50403bd057514a6 | [
"MIT"
] | 1 | 2017-12-03T15:08:42.000Z | 2017-12-03T15:08:42.000Z | SpoTwillio/search.py | Natfan/funlittlethings | 80d5378b45b5c0ead725942ee50403bd057514a6 | [
"MIT"
] | 2 | 2017-09-25T12:43:41.000Z | 2021-05-07T14:29:27.000Z | SpoTwillio/search.py | Natfan/funlittlethings | 80d5378b45b5c0ead725942ee50403bd057514a6 | [
"MIT"
] | 1 | 2017-09-04T19:37:42.000Z | 2017-09-04T19:37:42.000Z | import spotipy
import argparse
sp = spotipy.Spotify()
parser = argparse.ArgumentParser()
parser.add_argument("term", help="The artist that you want to search for")
parser.add_argument("-c", "--count", help="The amount of results that you want, capped at 20", type=int)
args = parser.parse_args()
def spoprint():
re... | 27.454545 | 104 | 0.662252 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 175 | 0.289735 |
9b2b7e3184a648dffa11f8e71194a20d3c591394 | 13,484 | py | Python | denverapi/bdtp.py | xcodz-dot/denver | 4142594756ceb7edb23d77cf7549f8d770185def | [
"MIT"
] | 4 | 2020-09-26T08:48:53.000Z | 2020-12-02T21:50:28.000Z | denverapi/bdtp.py | xcodz-dot/denver | 4142594756ceb7edb23d77cf7549f8d770185def | [
"MIT"
] | 22 | 2020-09-26T08:12:13.000Z | 2020-12-03T04:01:13.000Z | denverapi/bdtp.py | xcodz-dot/denver-api | 4142594756ceb7edb23d77cf7549f8d770185def | [
"MIT"
] | 3 | 2020-09-26T17:25:14.000Z | 2020-12-02T21:47:18.000Z | """
##Big Data Transfer Protocol
###What does it do
This protocol sends big data on a address (IPv4,port)
without worrying about pipe errors.
"""
__author__ = "Xcodz"
__version__ = "2021.2.24"
import abc
import socket
import time
import typing
from . import thread_control
default_buffer_size = 100000
class _Base... | 30.575964 | 117 | 0.637867 | 5,600 | 0.415307 | 0 | 0 | 652 | 0.048354 | 0 | 0 | 6,550 | 0.485761 |
9b2b9f0e1320f2cd7097a2cc090fb00dcd38d4c6 | 1,431 | py | Python | wstest/handler/current_effect_status_handler_test.py | PedalController/PedalPiREST | aa9418d44f2f5dbec604753a03bf8a74057c627c | [
"Apache-2.0"
] | null | null | null | wstest/handler/current_effect_status_handler_test.py | PedalController/PedalPiREST | aa9418d44f2f5dbec604753a03bf8a74057c627c | [
"Apache-2.0"
] | 42 | 2016-07-04T11:17:54.000Z | 2018-03-18T18:36:09.000Z | wstest/handler/current_effect_status_handler_test.py | PedalController/PedalPiREST | aa9418d44f2f5dbec604753a03bf8a74057c627c | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 SrMouraSilva
#
# 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,... | 35.775 | 119 | 0.735849 | 806 | 0.563242 | 0 | 0 | 0 | 0 | 0 | 0 | 588 | 0.410901 |
9b2edfe2e18a8a45ebbb7dd7d27ff5218861d483 | 1,203 | py | Python | src/sample-scripts/solved_problems/Examples test_compare/make_prop.py | hpgl/hpgl | 72d8c4113c242295de740513093f5779c94ba84a | [
"BSD-3-Clause"
] | 70 | 2015-01-21T12:24:50.000Z | 2022-03-16T02:10:45.000Z | src/sample-scripts/solved_problems/Examples test_compare/make_prop.py | hpgl/hpgl | 72d8c4113c242295de740513093f5779c94ba84a | [
"BSD-3-Clause"
] | 8 | 2015-04-22T13:14:30.000Z | 2021-11-23T12:16:32.000Z | src/sample-scripts/solved_problems/Examples test_compare/make_prop.py | hpgl/hpgl | 72d8c4113c242295de740513093f5779c94ba84a | [
"BSD-3-Clause"
] | 18 | 2015-02-15T18:04:31.000Z | 2021-01-16T08:54:32.000Z | from geo import *
from geo.routines import *
from matplotlib import *
from sys import *
from pylab import *
import os
import time
import pylab
size = (166, 141, 20)
print "loading image..."
data_3D = load_ind_property("BIG_SOFT_DATA_160_141_20.INC", -99, [0,1], size)
data = data_3D[0][:,:,0]
mask =... | 24.06 | 78 | 0.60266 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 720 | 0.598504 |
9b34dab60e953e0b05289a4632892770d19cd60e | 533 | py | Python | ex039/exercicio039.py | ArthurAlesi/Python-Exercicios-CursoEmVideo | ed0f0086ddbc0092df9d16ec2d8fdbabcb480cdd | [
"MIT"
] | null | null | null | ex039/exercicio039.py | ArthurAlesi/Python-Exercicios-CursoEmVideo | ed0f0086ddbc0092df9d16ec2d8fdbabcb480cdd | [
"MIT"
] | null | null | null | ex039/exercicio039.py | ArthurAlesi/Python-Exercicios-CursoEmVideo | ed0f0086ddbc0092df9d16ec2d8fdbabcb480cdd | [
"MIT"
] | null | null | null | # faça um programa q leia o ano de nascimento de um jovem e informe de
# acordo com sua idade se ele ainda vai se alistar ao serviço miliar,
# se é a hora de se alistar ou se ja passsou do tempo do alistamento
from datetime import date
hoje = date.today().year
print(hoje)
nascimento = int(input("Diga o ano que voce na... | 33.3125 | 70 | 0.72045 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 342 | 0.63806 |
9b374ff2739d4dbdac37bc7c8c986c366e319b95 | 1,250 | py | Python | dmsl-runner/main.py | GloomyGhost-MosquitoSeal/DmslRunner | b541c27f9a9857012b465e153b5de827a8db4b29 | [
"Apache-2.0"
] | null | null | null | dmsl-runner/main.py | GloomyGhost-MosquitoSeal/DmslRunner | b541c27f9a9857012b465e153b5de827a8db4b29 | [
"Apache-2.0"
] | null | null | null | dmsl-runner/main.py | GloomyGhost-MosquitoSeal/DmslRunner | b541c27f9a9857012b465e153b5de827a8db4b29 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import json
import time
import base64
import subprocess
DEBUG = 0
def json_paser(injson):
injson = str.encode(injson)
injson = base64.b64decode(injson)
jsonin = json.loads(injson)
if jsonin["language"] == "dmsl":
code = jsonin["code"]
code = bytes.decode(base64.b... | 22.321429 | 79 | 0.5576 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.13302 |
9b37765b1ebe35daf9d92813e7199c416682ab3a | 1,313 | py | Python | modules/investigate/investigate.py | geekpy03/pgn-tactics-generator | a0509ec412b7163526aba3d29220b87d9cf7f688 | [
"MIT"
] | 68 | 2018-09-09T17:55:30.000Z | 2022-03-28T17:04:43.000Z | modules/investigate/investigate.py | geekpy03/pgn-tactics-generator | a0509ec412b7163526aba3d29220b87d9cf7f688 | [
"MIT"
] | 31 | 2018-09-07T19:32:27.000Z | 2022-01-25T13:25:29.000Z | modules/investigate/investigate.py | geekpy03/pgn-tactics-generator | a0509ec412b7163526aba3d29220b87d9cf7f688 | [
"MIT"
] | 20 | 2019-03-11T09:52:14.000Z | 2022-02-23T05:37:31.000Z | import chess
from chess import Board
from chess.engine import Score
def sign(a):
return (a > 0) - (a < 0)
def material_value(board):
return sum(v * (len(board.pieces(pt, True)) + len(board.pieces(pt, False))) for v, pt in
zip([0, 3, 3, 5.5, 9], chess.PIECE_TYPES))
def material_count(board):... | 32.02439 | 92 | 0.599391 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 195 | 0.148515 |
9b37f557e5299f598ed6cf66a7877c41c10b6ac2 | 3,212 | py | Python | src/endtype_controller/__init__.py | CadworkMontreal/CwAPI3D | 5a2c15ad9f334d6dbfa55d59b6a855ac5667f289 | [
"MIT"
] | null | null | null | src/endtype_controller/__init__.py | CadworkMontreal/CwAPI3D | 5a2c15ad9f334d6dbfa55d59b6a855ac5667f289 | [
"MIT"
] | null | null | null | src/endtype_controller/__init__.py | CadworkMontreal/CwAPI3D | 5a2c15ad9f334d6dbfa55d59b6a855ac5667f289 | [
"MIT"
] | null | null | null | from typing import List
def create_new_endtype(endtype_name: str, endtype_id: int, folder_name: str) -> int:
"""Create a new endtype
Args:
endtype_name (str): name
endtype_id (int): endtype id
folder_name (str): folder name
Returns:
int: endtype id
"""
def get_en... | 23.970149 | 84 | 0.615816 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,190 | 0.681818 |
9b38e1564807028d56e7217b8ffcc8fe5b8fefc8 | 399 | py | Python | Task2G.py | JoeBarney1/floodlevelmonitor131 | 98d93ca3d5bf6d1f2f105529d2f758450f791188 | [
"MIT"
] | 1 | 2022-01-23T19:30:19.000Z | 2022-01-23T19:30:19.000Z | Task2G.py | JoeBarney1/floodlevelmonitor131 | 98d93ca3d5bf6d1f2f105529d2f758450f791188 | [
"MIT"
] | null | null | null | Task2G.py | JoeBarney1/floodlevelmonitor131 | 98d93ca3d5bf6d1f2f105529d2f758450f791188 | [
"MIT"
] | null | null | null | from floodsystem.flood import highest_risk
from floodsystem.stationdata import build_station_list
def run():
"""Requirements for Task 2G"""
stations= build_station_list()
for s in highest_risk(stations,dt=3,N=10,y=3):
print(s)
#works with whole list but takes v. long time
if __name__ == "__mai... | 30.692308 | 63 | 0.691729 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 137 | 0.343358 |
9b39ad17854b7e4901af7b84394b158a0378ff8a | 621 | py | Python | testing/framework/factory/compare_utility.py | gigabackup/gigantum-client | 70fe6b39b87b1c56351f2b4c551b6f1693813e4f | [
"MIT"
] | 60 | 2018-09-26T15:46:00.000Z | 2021-10-10T02:37:14.000Z | testing/framework/factory/compare_utility.py | gigabackup/gigantum-client | 70fe6b39b87b1c56351f2b4c551b6f1693813e4f | [
"MIT"
] | 1,706 | 2018-09-26T16:11:22.000Z | 2021-08-20T13:37:59.000Z | testing/framework/factory/compare_utility.py | griffinmilsap/gigantum-client | 70fe6b39b87b1c56351f2b4c551b6f1693813e4f | [
"MIT"
] | 11 | 2019-03-14T13:23:51.000Z | 2022-01-25T01:29:16.000Z | class CompareUtility(object):
"""Compares the text with the passed argument"""
def compare_text(self, *args):
return self.get_text() == args[0]
def check_element(self, *args):
"""Check for an element by it's class name"""
try:
element = self.find_element_by_xpath(args[0]... | 31.05 | 62 | 0.573269 | 620 | 0.99839 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.236715 |
9b3a30a350d4766ec5248befbf7cb18770423342 | 10,867 | py | Python | molsysmt/forms/viewers/api_nglview_NGLWidget.py | uibcdf/MolSysMT | 9866a6fb090df9fff36af113a45164da4b674c09 | [
"MIT"
] | 3 | 2020-06-02T03:55:52.000Z | 2022-03-21T04:43:52.000Z | molsysmt/forms/viewers/api_nglview_NGLWidget.py | uibcdf/MolSysMT | 9866a6fb090df9fff36af113a45164da4b674c09 | [
"MIT"
] | 28 | 2020-06-24T00:55:53.000Z | 2021-07-16T22:09:19.000Z | molsysmt/forms/viewers/api_nglview_NGLWidget.py | uibcdf/MolSysMT | 9866a6fb090df9fff36af113a45164da4b674c09 | [
"MIT"
] | 1 | 2021-06-17T18:55:25.000Z | 2021-06-17T18:55:25.000Z | from molsysmt._private_tools.exceptions import *
from molsysmt.forms.common_gets import *
import numpy as np
from nglview import widget as _nglview_widget
import importlib
import sys
from molsysmt.molecular_system import molecular_system_components
form_name='nglview.NGLWidget'
is_form = {
_nglview_widget.NGLWidg... | 33.334356 | 164 | 0.767829 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 915 | 0.0842 |
9b3e5ba25f6539f2d54fc3ee309eb76f77501061 | 1,435 | py | Python | editor/plugins/example_app_keys.py | albertvisser/hotkeys | 73b2b10af326a37e4ae01294f44cd855ccb3ab99 | [
"MIT"
] | 1 | 2019-11-03T08:28:59.000Z | 2019-11-03T08:28:59.000Z | editor/plugins/example_app_keys.py | albertvisser/hotkeys | 73b2b10af326a37e4ae01294f44cd855ccb3ab99 | [
"MIT"
] | null | null | null | editor/plugins/example_app_keys.py | albertvisser/hotkeys | 73b2b10af326a37e4ae01294f44cd855ccb3ab99 | [
"MIT"
] | null | null | null | """Hotkeys plugin example
this module contains the general, non gui-toolkit specific part of the code
"""
# uncomment these where appropriate
# import collections
# from example_app_keys_gui import layout_extra_fields_* # om dit beschikbaar te maken voor import
# uncomment this to define a routine to (re)build the c... | 41 | 99 | 0.738676 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,404 | 0.978397 |
9b40ad333c949a389ee209ebc469efbe2a1da3d3 | 8,525 | py | Python | electrumx/lib/script.py | Electrum-RVN-SIG/electrumx-ravencoin | 6b888a9246257037c95cdaffcce3386181050398 | [
"MIT"
] | 11 | 2021-04-03T21:29:44.000Z | 2022-03-28T09:37:34.000Z | electrumx/lib/script.py | Electrum-RVN-SIG/electrumx-ravencoin | 6b888a9246257037c95cdaffcce3386181050398 | [
"MIT"
] | 4 | 2021-05-14T13:10:01.000Z | 2021-12-03T15:12:23.000Z | electrumx/lib/script.py | Electrum-RVN-SIG/electrumx-ravencoin | 6b888a9246257037c95cdaffcce3386181050398 | [
"MIT"
] | 4 | 2021-04-05T22:07:06.000Z | 2021-09-23T08:04:48.000Z | # Copyright (c) 2016-2017, Neil Booth
#
# All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation ... | 26.892744 | 110 | 0.598827 | 6,229 | 0.730674 | 0 | 0 | 3,044 | 0.357067 | 0 | 0 | 2,066 | 0.242346 |
9b4525dbfb8005b0d75af097477692fce19cafdb | 3,854 | py | Python | main.py | poplock1/Number_guesser | 2766d73e0f1babc980865de8fabe2f37d9ee43a6 | [
"MIT"
] | null | null | null | main.py | poplock1/Number_guesser | 2766d73e0f1babc980865de8fabe2f37d9ee43a6 | [
"MIT"
] | null | null | null | main.py | poplock1/Number_guesser | 2766d73e0f1babc980865de8fabe2f37d9ee43a6 | [
"MIT"
] | null | null | null | import pygame
import tensorflow as tf
import sys
import settings as stg
import matplotlib.pyplot as plt
from board import Grid
import gui
import numpy as np
class Game():
def __init__(self):
pygame.init()
self.game_display = pygame.display.set_mode(
(stg.display_x, stg.display_y))
... | 31.590164 | 123 | 0.577582 | 3,621 | 0.939543 | 0 | 0 | 0 | 0 | 0 | 0 | 562 | 0.145823 |
9b454cd03eb2a08f7263b1381a0130bff6f74d66 | 825 | py | Python | examples/maskrcnn_fastai.py | ramaneswaran/mantisshrimp | d30c056f1f9f26a2ce42da73cfb32d591321f426 | [
"Apache-2.0"
] | null | null | null | examples/maskrcnn_fastai.py | ramaneswaran/mantisshrimp | d30c056f1f9f26a2ce42da73cfb32d591321f426 | [
"Apache-2.0"
] | 8 | 2020-06-16T18:06:42.000Z | 2020-09-15T22:35:56.000Z | examples/maskrcnn_fastai.py | ramaneswaran/mantisshrimp | d30c056f1f9f26a2ce42da73cfb32d591321f426 | [
"Apache-2.0"
] | null | null | null | from mantisshrimp import *
from mantisshrimp.hub.pennfundan import *
from mantisshrimp.engines.fastai import *
import albumentations as A
source = get_pennfundan_data()
parser = PennFundanParser(source)
splitter = RandomSplitter([0.8, 0.2])
train_records, valid_records = parser.parse(splitter)
train_transforms = Alb... | 28.448276 | 79 | 0.796364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9b465713a6d45355da79d52e919ae9d389a96675 | 10,649 | py | Python | setup.py | mdavezac/bempp | bc573062405bda107d1514e40b6153a8350d5ab5 | [
"BSL-1.0"
] | null | null | null | setup.py | mdavezac/bempp | bc573062405bda107d1514e40b6153a8350d5ab5 | [
"BSL-1.0"
] | null | null | null | setup.py | mdavezac/bempp | bc573062405bda107d1514e40b6153a8350d5ab5 | [
"BSL-1.0"
] | null | null | null | from os.path import basename, dirname, join, abspath
from setuptools import setup, Extension
from distutils.command.build import build as dBuild
from setuptools.command.install import install as dInstall
from setuptools.command.build_ext import build_ext as dBuildExt
from setuptools.command.bdist_egg import bdist_egg a... | 35.855219 | 88 | 0.596676 | 6,938 | 0.651517 | 0 | 0 | 0 | 0 | 0 | 0 | 2,092 | 0.19645 |
9b465aec5248b4a295d099e00bd63dbcb0fdd474 | 677 | py | Python | config/__init__.py | CSuppan/two-shot-brdf-shape | 352201b66bfa5cd5e25111451a6583a3e7d499f0 | [
"BSD-Source-Code"
] | null | null | null | config/__init__.py | CSuppan/two-shot-brdf-shape | 352201b66bfa5cd5e25111451a6583a3e7d499f0 | [
"BSD-Source-Code"
] | null | null | null | config/__init__.py | CSuppan/two-shot-brdf-shape | 352201b66bfa5cd5e25111451a6583a3e7d499f0 | [
"BSD-Source-Code"
] | null | null | null | # -----------------------------------------------------------------------
# Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
#
# This work is made available
# under the Nvidia Source Code License (1-way Commercial).
#
# Official Implementation of the CVPR2020 Paper
# Two-shot Spatially-varying BRDF and Shap... | 28.208333 | 73 | 0.567208 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 499 | 0.737075 |
9b4985b49cd879340b47fb541710318c2bb259dc | 26,765 | py | Python | demo/rrteAutoLog.py | CharlesWangYu/guitest | 785f234321143a4a3f4afe92376dc4f138489b31 | [
"BSD-3-Clause"
] | null | null | null | demo/rrteAutoLog.py | CharlesWangYu/guitest | 785f234321143a4a3f4afe92376dc4f138489b31 | [
"BSD-3-Clause"
] | null | null | null | demo/rrteAutoLog.py | CharlesWangYu/guitest | 785f234321143a4a3f4afe92376dc4f138489b31 | [
"BSD-3-Clause"
] | null | null | null | import pdb
import logging
import os
import sys
import time
import subprocess
import xlrd
import win32gui
import win32api
import win32con
#import comtypes
from configparser import ConfigParser
from comtypes.client import *
from ctypes import *
def logTreeItem(node):
logging.info('--------------------------------------... | 37.173611 | 256 | 0.74986 | 25,672 | 0.959163 | 0 | 0 | 6,511 | 0.243265 | 0 | 0 | 4,525 | 0.169064 |
9b49b82dae00206e28c1ae751fd26cec3f45c20f | 1,052 | py | Python | eregs_core/migrations/0006_analysisparagraph_analysissection_footnote.py | cfpb/eregs-2.0 | 820bd56fa5265ee25f88fe8dce4c7aa092e5d6a3 | [
"CC0-1.0"
] | 1 | 2019-02-25T21:43:36.000Z | 2019-02-25T21:43:36.000Z | eregs_core/migrations/0006_analysisparagraph_analysissection_footnote.py | cfpb/eregs-2.0 | 820bd56fa5265ee25f88fe8dce4c7aa092e5d6a3 | [
"CC0-1.0"
] | 46 | 2017-03-16T21:58:49.000Z | 2017-09-05T16:21:29.000Z | eregs_core/migrations/0006_analysisparagraph_analysissection_footnote.py | cfpb/eregs-2.0 | 820bd56fa5265ee25f88fe8dce4c7aa092e5d6a3 | [
"CC0-1.0"
] | 7 | 2017-06-07T14:56:46.000Z | 2021-02-20T10:50:48.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-03 17:48
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('eregs_core', '0005_appendix_definition_paragraph_reference_... | 23.909091 | 95 | 0.497148 | 861 | 0.818441 | 0 | 0 | 0 | 0 | 0 | 0 | 280 | 0.26616 |
9b4a434127e56ce9f10a860ea190256cba7c7ff6 | 2,592 | py | Python | project-euler/261/euler_261_v3.py | zoffixznet/project-euler | 39921379385ae2521354c7266a541c46785e85a2 | [
"MIT"
] | null | null | null | project-euler/261/euler_261_v3.py | zoffixznet/project-euler | 39921379385ae2521354c7266a541c46785e85a2 | [
"MIT"
] | null | null | null | project-euler/261/euler_261_v3.py | zoffixznet/project-euler | 39921379385ae2521354c7266a541c46785e85a2 | [
"MIT"
] | null | null | null | # The Expat License
#
# Copyright (c) 2017, Shlomi Fish
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, ... | 28.483516 | 79 | 0.531636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,174 | 0.452932 |
9b4addb7383ad54fbd74f3fafd29a6bba825287f | 4,331 | py | Python | Naive_Bayes/lib/naive_bayes.py | DavexPro/MLStudy | 869ab4e569fe1cde1a3a6238977282b81a71fc81 | [
"MIT"
] | null | null | null | Naive_Bayes/lib/naive_bayes.py | DavexPro/MLStudy | 869ab4e569fe1cde1a3a6238977282b81a71fc81 | [
"MIT"
] | null | null | null | Naive_Bayes/lib/naive_bayes.py | DavexPro/MLStudy | 869ab4e569fe1cde1a3a6238977282b81a71fc81 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding=utf-8
# -*- utf8 -*-
# author=dave.fang@outlook.com
# create=20170330
import math
from lib.log import LOGGER
class NaiveBayes:
def __init__(self):
# 元数据
self.data_set = []
# 分类后的数据
self.separate_set = {}
# 分类后, 性别的先验概率
self.separate_p... | 31.384058 | 111 | 0.563842 | 4,074 | 0.827208 | 0 | 0 | 0 | 0 | 0 | 0 | 1,645 | 0.33401 |
9b4d709976efa66a27e01fd0d18980bfda0f6d63 | 1,004 | py | Python | views/sprite_views/combo_attack_sprite.py | kuyu12/pygame_fight_game | 3bbc286b9f33c6d6d9db9bea21f9b7af15247df5 | [
"MIT"
] | 1 | 2020-08-03T07:54:59.000Z | 2020-08-03T07:54:59.000Z | views/sprite_views/combo_attack_sprite.py | kuyu12/pygame_fight_game | 3bbc286b9f33c6d6d9db9bea21f9b7af15247df5 | [
"MIT"
] | null | null | null | views/sprite_views/combo_attack_sprite.py | kuyu12/pygame_fight_game | 3bbc286b9f33c6d6d9db9bea21f9b7af15247df5 | [
"MIT"
] | null | null | null | from views.sprite_views.attack_sprite import AttackSprite, AttackState
from views.sprite_views.movement_sprite import Direction, State
class ComboAttackSprite(AttackSprite):
def __init__(self, player_data, combo_attack, on_finish):
self.combo_attack = combo_attack
self.combo_images = player_data.... | 37.185185 | 115 | 0.721116 | 866 | 0.86255 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9b4eebb09566e097a91f5dda6e303d168c9b41e8 | 337 | py | Python | app/migrations/0024_auto_20190801_2013.py | olivierpons/evalr | 7c76474ad41769804965a11550501321d7b1889b | [
"MIT"
] | null | null | null | app/migrations/0024_auto_20190801_2013.py | olivierpons/evalr | 7c76474ad41769804965a11550501321d7b1889b | [
"MIT"
] | null | null | null | app/migrations/0024_auto_20190801_2013.py | olivierpons/evalr | 7c76474ad41769804965a11550501321d7b1889b | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2019-08-01 18:13
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('app', '0023_auto_20190801_2011'),
]
operations = [
migrations.RenameModel(
old_name='MotVoice',
new_name='ExpressionVoice',
... | 18.722222 | 47 | 0.602374 | 252 | 0.747774 | 0 | 0 | 0 | 0 | 0 | 0 | 104 | 0.308605 |
9b4f6caa8f4e00e79f672af5d86d90e4902524c8 | 548 | py | Python | app/users/__init__.py | niross/ftrack | 73196f8b72f52ad04fe67ffa2bd830e058ceaf7f | [
"MIT"
] | null | null | null | app/users/__init__.py | niross/ftrack | 73196f8b72f52ad04fe67ffa2bd830e058ceaf7f | [
"MIT"
] | null | null | null | app/users/__init__.py | niross/ftrack | 73196f8b72f52ad04fe67ffa2bd830e058ceaf7f | [
"MIT"
] | null | null | null | from flask import Blueprint
from flask_security import SQLAlchemyUserDatastore
from app import db
from app.users.models import User, Role
bp = Blueprint('users', __name__, template_folder='templates')
user_datastore = SQLAlchemyUserDatastore(db, User, Role)
# Create a user to test with
@bp.before_app_first_request... | 28.842105 | 86 | 0.755474 | 0 | 0 | 0 | 0 | 255 | 0.465328 | 0 | 0 | 102 | 0.186131 |
9b4fcde6493e496f8266585c418f51bc87980875 | 6,457 | py | Python | payctl/utils.py | arjanz/substrate-payctl | 57d13155ffd8e200d54ec4d4382a09b757fa8211 | [
"MIT"
] | null | null | null | payctl/utils.py | arjanz/substrate-payctl | 57d13155ffd8e200d54ec4d4382a09b757fa8211 | [
"MIT"
] | null | null | null | payctl/utils.py | arjanz/substrate-payctl | 57d13155ffd8e200d54ec4d4382a09b757fa8211 | [
"MIT"
] | null | null | null | from substrateinterface import SubstrateInterface, Keypair
from substrateinterface.utils.ss58 import ss58_encode, ss58_decode
#
# get_config - Get a default and validator specific config elements from args and config.
#
def get_config(args, config, key, section='Defaults'):
if vars(args)[key] is not None:
... | 32.447236 | 106 | 0.647205 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,666 | 0.258015 |
9b52940acbc894f83db7c38174cba4aed0fe37b6 | 7,279 | py | Python | Notepad++/programfiles/Notepad++/plugins/PythonScript/scripts/Samples/LogfileLexer.py | slim71/Utils | 5fcb0ec604cc039668f132c102d6bd2050bcea5c | [
"Unlicense"
] | null | null | null | Notepad++/programfiles/Notepad++/plugins/PythonScript/scripts/Samples/LogfileLexer.py | slim71/Utils | 5fcb0ec604cc039668f132c102d6bd2050bcea5c | [
"Unlicense"
] | null | null | null | Notepad++/programfiles/Notepad++/plugins/PythonScript/scripts/Samples/LogfileLexer.py | slim71/Utils | 5fcb0ec604cc039668f132c102d6bd2050bcea5c | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
LogfileLexer - Demo
Highlights whole lines which matches the regex.
Usage:
Load a logfile, modify error and warning regex and
run script to see how it works
Note: By commenting or deleting everything, including,
the <comment_or_delete> tags it is ready to be us... | 37.911458 | 96 | 0.615469 | 6,672 | 0.916609 | 0 | 0 | 0 | 0 | 0 | 0 | 3,501 | 0.480973 |
9b52da16ba296fc3a30eb27a8abe81a9c2046c19 | 913 | py | Python | py_mybatis/mapper_func.py | malone081021/py_mybatis | bea69b2aa0d17d9a96ddf596bc63bd88e5a2045e | [
"Apache-2.0"
] | 15 | 2020-08-20T03:57:13.000Z | 2022-02-01T03:08:14.000Z | py_mybatis/mapper_func.py | malone081021/py_mybatis | bea69b2aa0d17d9a96ddf596bc63bd88e5a2045e | [
"Apache-2.0"
] | 3 | 2020-08-20T05:43:22.000Z | 2020-09-23T08:08:10.000Z | py_mybatis/mapper_func.py | malone081021/py_mybatis | bea69b2aa0d17d9a96ddf596bc63bd88e5a2045e | [
"Apache-2.0"
] | 10 | 2020-12-10T06:17:20.000Z | 2022-02-26T07:07:48.000Z | from .logger import LOG
from .funs import *
# 函数容器
class PyFunction(object):
def __init__(self):
self.function_map = dict()
def register_func(self, function_name: str, func):
if function_name in self.function_map:
LOG.warning("function {} exist".format(function_name))
... | 25.361111 | 73 | 0.682366 | 650 | 0.674974 | 0 | 0 | 0 | 0 | 0 | 0 | 103 | 0.106957 |
9b5316477ce7fd6da19f6364699eb3e0afb2374d | 87 | py | Python | envisage/plugins/ipython_kernel/api.py | janvonrickenbach/Envisage_wxPhoenix_py3 | cf79e5b2a0c3b46898a60b5fe5a2fb580604808b | [
"BSD-3-Clause"
] | null | null | null | envisage/plugins/ipython_kernel/api.py | janvonrickenbach/Envisage_wxPhoenix_py3 | cf79e5b2a0c3b46898a60b5fe5a2fb580604808b | [
"BSD-3-Clause"
] | 1 | 2017-05-22T21:15:22.000Z | 2017-05-22T21:15:22.000Z | envisage/plugins/ipython_kernel/api.py | janvonrickenbach/Envisage_wxPhoenix_py3 | cf79e5b2a0c3b46898a60b5fe5a2fb580604808b | [
"BSD-3-Clause"
] | 1 | 2019-10-01T07:03:58.000Z | 2019-10-01T07:03:58.000Z | from ipython_kernel_plugin import IPythonKernelPlugin, IPYTHON_KERNEL_PROTOCOL # noqa
| 43.5 | 86 | 0.885057 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.068966 |
9b533be27e81a8ec5389e0a6e1d39a3dcf1f48a7 | 3,283 | py | Python | multiAgentEnv/maenv/mpe/_mpe_utils/forward_models/forward_model.py | eranbTAU/Closing-the-Reality-Gap-for-a-Multi-Agent-System-Using-GAN | 3df5f8ba1069ce3f16f1ab743da9cbdd3bddd43c | [
"MIT"
] | null | null | null | multiAgentEnv/maenv/mpe/_mpe_utils/forward_models/forward_model.py | eranbTAU/Closing-the-Reality-Gap-for-a-Multi-Agent-System-Using-GAN | 3df5f8ba1069ce3f16f1ab743da9cbdd3bddd43c | [
"MIT"
] | null | null | null | multiAgentEnv/maenv/mpe/_mpe_utils/forward_models/forward_model.py | eranbTAU/Closing-the-Reality-Gap-for-a-Multi-Agent-System-Using-GAN | 3df5f8ba1069ce3f16f1ab743da9cbdd3bddd43c | [
"MIT"
] | 1 | 2022-02-22T11:06:40.000Z | 2022-02-22T11:06:40.000Z | import torch
import numpy as np
import os
from ..utils import load_params, get_scaler, get_rescaler
class ForwardModel():
def __init__(self, robot_type=None):
try:
filename = f'.../maenv/mpe/_mpe_utils/{robot_type}_config.yaml'
params = load_params(filename).get('forward_model')
... | 35.301075 | 115 | 0.603412 | 3,035 | 0.924459 | 0 | 0 | 0 | 0 | 0 | 0 | 364 | 0.110874 |
9b5505ca703b310b156073810269854022e84cd6 | 948 | py | Python | src/personal/views.py | vybhavpai/Blog | 8e0adf52bfba5502f787dd339866f39b5f4856f4 | [
"bzip2-1.0.6"
] | null | null | null | src/personal/views.py | vybhavpai/Blog | 8e0adf52bfba5502f787dd339866f39b5f4856f4 | [
"bzip2-1.0.6"
] | 17 | 2020-06-06T00:04:23.000Z | 2022-03-12T00:25:43.000Z | src/personal/views.py | vybhavpai/Blog | 8e0adf52bfba5502f787dd339866f39b5f4856f4 | [
"bzip2-1.0.6"
] | null | null | null | from django.shortcuts import render
from blog.models import BlogPost
from operator import attrgetter
from blog.views import get_blog_queryset
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
# Create your views here.
BLOG_POSTS_PER_PAGE = 1
def home_screen_view(request):
context = {}
que... | 27.085714 | 90 | 0.781646 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 103 | 0.10865 |
9b551741cab1afbab203fa568039b9c06d277d87 | 5,771 | py | Python | tools/makeplugin.py | rhcad/x3py | a631b9130673683f9c0395209ff49b94eb0ceac6 | [
"Apache-2.0"
] | 214 | 2015-01-25T15:54:57.000Z | 2022-03-13T13:20:34.000Z | tools/makeplugin.py | HAERBINWINE/x3py | a631b9130673683f9c0395209ff49b94eb0ceac6 | [
"Apache-2.0"
] | 18 | 2015-03-11T15:42:56.000Z | 2021-12-23T10:11:03.000Z | tools/makeplugin.py | HAERBINWINE/x3py | a631b9130673683f9c0395209ff49b94eb0ceac6 | [
"Apache-2.0"
] | 126 | 2015-01-19T03:28:48.000Z | 2022-03-16T06:52:57.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Function: Create a plugin project based on example project.
This script has been tested with ActivePython 2.7/3.2.
Usage: python makeplugin.py [prjname [pkgname [srcprj [srcpkg [useswig]]]]]
or double click the file 'makeplugin.py'.
... | 41.517986 | 99 | 0.582741 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,794 | 0.310865 |
9b56838a87136d14ec040f4d65ab94a7e2ebd723 | 146,532 | py | Python | V1/R1/N2HF_armors_v1_r1.py | N2HF-OFFICIAL/n2hf | de4a26a3b70082cd2375cc3fe7a5c2fd09cec085 | [
"MIT"
] | null | null | null | V1/R1/N2HF_armors_v1_r1.py | N2HF-OFFICIAL/n2hf | de4a26a3b70082cd2375cc3fe7a5c2fd09cec085 | [
"MIT"
] | null | null | null | V1/R1/N2HF_armors_v1_r1.py | N2HF-OFFICIAL/n2hf | de4a26a3b70082cd2375cc3fe7a5c2fd09cec085 | [
"MIT"
] | null | null | null |
from PIL import Image
import os
import numpy as np
import pandas as pd
from random import seed
from random import randint
dirname = os.path.dirname('')
dimensions = 600, 600
def make_armors(ma, ma2, ma3):
count_doojunggap = 0
count_gyungbyungap = 0
count_chalgap = 0
... | 163.175947 | 364 | 0.591611 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,511 | 0.010286 |
9b57a3de7044f1cb8c387a458b45c232a75ebe2f | 700 | py | Python | maze/model/stack.py | cleuton/pythondrops | 8190567fc3c0b54b4cb2465d989f1bc992ca89da | [
"Apache-2.0"
] | 8 | 2018-06-15T05:37:41.000Z | 2021-05-23T23:40:45.000Z | maze/model/stack.py | cleuton/pythondrops | 8190567fc3c0b54b4cb2465d989f1bc992ca89da | [
"Apache-2.0"
] | 2 | 2018-06-15T05:39:59.000Z | 2019-08-30T01:16:30.000Z | maze/model/stack.py | cleuton/pythondrops | 8190567fc3c0b54b4cb2465d989f1bc992ca89da | [
"Apache-2.0"
] | 5 | 2018-06-15T05:37:42.000Z | 2019-08-29T10:19:22.000Z | from collections import namedtuple
class _Entry(namedtuple('_Entry', 'value next')):
def _repr_assist(self, postfix):
r = repr(self.value) + postfix
if self.next is not None:
return self.next._repr_assist(', ' + r)
return r
class Stack(object):
def __init__(self):
s... | 31.818182 | 61 | 0.594286 | 662 | 0.945714 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.092857 |
9b5a7ee5d76db4300a01a1e469082c5cdcc09d8b | 468 | py | Python | polynomials_on_simplices/calculus/test/real_interval_test.py | FAndersson/polynomials_on_simplices | f015a4772c817bfa99b0d6b726667a38a174b064 | [
"MIT"
] | 1 | 2021-03-17T11:41:21.000Z | 2021-03-17T11:41:21.000Z | polynomials_on_simplices/calculus/test/real_interval_test.py | FAndersson/polynomials_on_simplices | f015a4772c817bfa99b0d6b726667a38a174b064 | [
"MIT"
] | null | null | null | polynomials_on_simplices/calculus/test/real_interval_test.py | FAndersson/polynomials_on_simplices | f015a4772c817bfa99b0d6b726667a38a174b064 | [
"MIT"
] | null | null | null | import sys
import pytest
from polynomials_on_simplices.calculus.real_interval import equivalent_periodic_element
def test_equivalent_element():
b = equivalent_periodic_element(1.0, 2.0)
assert 1.0 == b
b = equivalent_periodic_element(3.0, 2.0)
assert 1.0 == b
b = equivalent_periodic_element(-3.0... | 22.285714 | 87 | 0.700855 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.021368 |
9b5b1c2f681b75f91aedc79ae49917274c836bb0 | 761 | py | Python | client codes/client v2/get_code_when_free.py | nathaniel-security/Localhost-distributed-computing-engine | 4643c22f563a969ccaf1062da17696819e00ab9a | [
"MIT"
] | null | null | null | client codes/client v2/get_code_when_free.py | nathaniel-security/Localhost-distributed-computing-engine | 4643c22f563a969ccaf1062da17696819e00ab9a | [
"MIT"
] | null | null | null | client codes/client v2/get_code_when_free.py | nathaniel-security/Localhost-distributed-computing-engine | 4643c22f563a969ccaf1062da17696819e00ab9a | [
"MIT"
] | null | null | null | from client_database_connection import mycursor
from ftp import *
from config import free
config = json.loads(open('config.json').read())
node_id = config['node id']
local_path = config['local path']
while free:
sql = "SELECT code_id FROM code_node where node_id = " + node_id
mycursor.execute(... | 22.382353 | 69 | 0.680683 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.193167 |
9b5be5c5ed6504a2c9ccae3984febdda2e35498d | 5,862 | py | Python | server/app.py | LeartKrasniqi/Sign-Language-Interpreter | 46ffef29eaf3746d48654bc4430d6e921120d33e | [
"MIT"
] | 3 | 2020-02-25T14:43:33.000Z | 2020-10-10T08:42:27.000Z | server/app.py | LeartKrasniqi/Sign-Language-Interpreter | 46ffef29eaf3746d48654bc4430d6e921120d33e | [
"MIT"
] | null | null | null | server/app.py | LeartKrasniqi/Sign-Language-Interpreter | 46ffef29eaf3746d48654bc4430d6e921120d33e | [
"MIT"
] | 1 | 2020-02-24T19:46:11.000Z | 2020-02-24T19:46:11.000Z | import os
from flask import Flask, flash, request, redirect, url_for, jsonify
from flask_cors import CORS
from werkzeug.utils import secure_filename
import subprocess
# set up text to speech map
from nltk.stem import PorterStemmer
from nltk.tokenize import word_tokenize
# speech recognition
import speech_recognition ... | 31.686486 | 95 | 0.628796 | 0 | 0 | 0 | 0 | 3,148 | 0.537018 | 0 | 0 | 1,691 | 0.288468 |
9b5d3c5659fc7c63b174be7b4744d1de06e0f242 | 1,128 | py | Python | main/PluginDemos/MomentOfInertia/MomentOfInertia3D/Simulation/MomentOfInertia3DSteppables.py | JulianoGianlupi/nh-cc3d-4x-base-tool | c0f4aceebd4c5bf3ec39e831ef851e419b161259 | [
"CC0-1.0"
] | null | null | null | main/PluginDemos/MomentOfInertia/MomentOfInertia3D/Simulation/MomentOfInertia3DSteppables.py | JulianoGianlupi/nh-cc3d-4x-base-tool | c0f4aceebd4c5bf3ec39e831ef851e419b161259 | [
"CC0-1.0"
] | null | null | null | main/PluginDemos/MomentOfInertia/MomentOfInertia3D/Simulation/MomentOfInertia3DSteppables.py | JulianoGianlupi/nh-cc3d-4x-base-tool | c0f4aceebd4c5bf3ec39e831ef851e419b161259 | [
"CC0-1.0"
] | 1 | 2021-02-26T21:50:29.000Z | 2021-02-26T21:50:29.000Z | from cc3d.core.PySteppables import *
class MomentOfInertiaPrinter3D(SteppableBasePy):
def __init__(self, frequency=10):
SteppableBasePy.__init__(self, frequency)
self.semi_minor_axis = 15
self.semi_median_axis = 8
self.semi_major_axis = 5
def start(self):
self.generate... | 40.285714 | 98 | 0.618794 | 1,088 | 0.964539 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.088652 |
9b5d42d58638f8e19f6b1354d952d443c3e13a52 | 4,003 | py | Python | skirt-sniffer.py | macenpav/skirt-sniffer | 3ba45d5f7f22b83417525835dc594e698c4ebb1a | [
"MIT"
] | null | null | null | skirt-sniffer.py | macenpav/skirt-sniffer | 3ba45d5f7f22b83417525835dc594e698c4ebb1a | [
"MIT"
] | null | null | null | skirt-sniffer.py | macenpav/skirt-sniffer | 3ba45d5f7f22b83417525835dc594e698c4ebb1a | [
"MIT"
] | null | null | null | import data_module
import email_module
import db_module
from jinja2 import Environment, FileSystemLoader
from os import path
import time
from datetime import datetime
DIR_PATH = path.dirname(path.realpath(__file__))
NEW_SKIRT_SUBJECT = r"Novinka! - {0}"
NEW_PRINT_SUBJECT = r"NOVÉ TISKY! - {0}"
DAY_INIT_SUBJECT = r"Ke... | 32.024 | 101 | 0.671496 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 757 | 0.188919 |
9b5e52eda69e6b966095678067006f5bc461763d | 3,661 | py | Python | gos/manager.py | sergey-aganezov-jr/gos | fb4d210284f3037c5321250cb95f3901754feb6b | [
"MIT"
] | null | null | null | gos/manager.py | sergey-aganezov-jr/gos | fb4d210284f3037c5321250cb95f3901754feb6b | [
"MIT"
] | null | null | null | gos/manager.py | sergey-aganezov-jr/gos | fb4d210284f3037c5321250cb95f3901754feb6b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from gos.configuration import Configuration
from gos.exceptions import GOSTaskException, GOSExecutableContainerException
from gos.executable_containers import ExecutableContainer
from gos.tasks import TaskLoader
class Manager(object):
def __init__(self, config):
self.configuration ... | 50.847222 | 124 | 0.645179 | 3,422 | 0.934717 | 0 | 0 | 0 | 0 | 0 | 0 | 446 | 0.121825 |
9b5f11338fa982d437506f6ebd36acb9e68351e8 | 2,608 | py | Python | couchcrdt/crdt.py | drsm79/couch-crdt | 1717a8b03a488793984d7209f6da78c395b3477f | [
"Apache-2.0"
] | null | null | null | couchcrdt/crdt.py | drsm79/couch-crdt | 1717a8b03a488793984d7209f6da78c395b3477f | [
"Apache-2.0"
] | null | null | null | couchcrdt/crdt.py | drsm79/couch-crdt | 1717a8b03a488793984d7209f6da78c395b3477f | [
"Apache-2.0"
] | null | null | null | import requests
import json
class CRDT(object):
"""
A base class CRDT. This only takes care of getting the value and putting
the local state of the CRDT from/to the database. What those things mean is
up to specific implementations.
"""
def __init__(self, name, url, db, auth=(), params={}, alw... | 28.347826 | 79 | 0.546012 | 2,577 | 0.988113 | 0 | 0 | 0 | 0 | 0 | 0 | 1,098 | 0.421012 |
9b5f1ca95a4bf43c73f0a6830a6c9ae4f3d79f44 | 134 | py | Python | svreal/enums.py | sgherbst/svreal | 62811a3074732554db650b8decde60997fbe8b59 | [
"MIT"
] | 27 | 2019-05-14T10:14:21.000Z | 2022-01-22T03:00:05.000Z | svreal/enums.py | sgherbst/svreal | 62811a3074732554db650b8decde60997fbe8b59 | [
"MIT"
] | 8 | 2020-03-16T07:38:30.000Z | 2021-05-27T17:59:24.000Z | svreal/enums.py | sgherbst/svreal | 62811a3074732554db650b8decde60997fbe8b59 | [
"MIT"
] | 3 | 2020-10-21T19:10:13.000Z | 2022-02-23T12:34:12.000Z | from enum import Enum
class RealType(Enum):
FixedPoint = 'FIXED_POINT'
FloatReal = 'FLOAT_REAL'
HardFloat = 'HARD_FLOAT'
| 19.142857 | 30 | 0.701493 | 110 | 0.820896 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.276119 |
9b601d1541c40d95e59c43221fab5f52ddc75afd | 231 | py | Python | zvt/recorders/joinquant/overall/__init__.py | Evergreen2020/zvt | 446a2512d716a38a12164b6d4468a6c9de01b986 | [
"MIT"
] | 6 | 2020-09-03T10:02:00.000Z | 2021-02-04T02:51:47.000Z | zvt/recorders/joinquant/overall/__init__.py | Evergreen2020/zvt | 446a2512d716a38a12164b6d4468a6c9de01b986 | [
"MIT"
] | 2 | 2019-12-20T13:12:30.000Z | 2020-01-03T06:24:30.000Z | zvt/recorders/joinquant/overall/__init__.py | Evergreen2020/zvt | 446a2512d716a38a12164b6d4468a6c9de01b986 | [
"MIT"
] | 2 | 2020-07-08T04:15:40.000Z | 2021-06-08T08:51:31.000Z | # -*- coding: utf-8 -*-
from zvt.recorders.joinquant.overall.cross_market_recorder import *
from zvt.recorders.joinquant.overall.margin_trading_recorder import *
from zvt.recorders.joinquant.overall.stock_summary_recorder import *
| 46.2 | 69 | 0.822511 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.099567 |
9b6200504eb1e628d498d1956f71cf3b490895b3 | 1,708 | py | Python | legacy/dx/simulator/simulator_diagnoser/test/diagnosis/apt_diagnoser_test.py | GaloisInc/adapt | 2ccff778d3e77505899266572f8f7caacb5b630f | [
"BSD-3-Clause"
] | 2 | 2020-04-09T13:04:25.000Z | 2021-09-24T14:17:26.000Z | legacy/dx/simulator/simulator_diagnoser/test/diagnosis/apt_diagnoser_test.py | GaloisInc/adapt | 2ccff778d3e77505899266572f8f7caacb5b630f | [
"BSD-3-Clause"
] | null | null | null | legacy/dx/simulator/simulator_diagnoser/test/diagnosis/apt_diagnoser_test.py | GaloisInc/adapt | 2ccff778d3e77505899266572f8f7caacb5b630f | [
"BSD-3-Clause"
] | 3 | 2019-09-20T20:49:54.000Z | 2021-09-02T17:33:47.000Z | import unittest
from simulator_diagnoser.graph import InmemoryGraph
from simulator_diagnoser.diagnosis import APTDiagnoser
from simulator_diagnoser.matcher import Terminal, \
Sequence, \
StatelessMatcher
class APTDiagnoserTest(unittest.Tes... | 31.054545 | 65 | 0.527518 | 1,374 | 0.80445 | 0 | 0 | 0 | 0 | 0 | 0 | 118 | 0.069087 |
9b650fbea222942a995d60c70b774dcb9b12f9c7 | 888 | py | Python | etl/produce_map.py | hbmartin/sub9-client | 0f85639412e2a2d695e9f6a56913dcb055af82b2 | [
"CC-BY-4.0"
] | null | null | null | etl/produce_map.py | hbmartin/sub9-client | 0f85639412e2a2d695e9f6a56913dcb055af82b2 | [
"CC-BY-4.0"
] | null | null | null | etl/produce_map.py | hbmartin/sub9-client | 0f85639412e2a2d695e9f6a56913dcb055af82b2 | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python3
"""Roll up the geo6 json to produce a tree suitable for sub9 query"""
__author__ = "H. Martin"
__version__ = "0.1.0"
import json
import math
from random import randint
data = {}
transformed = {}
with open('geohash_counter_6.json', encoding='utf-8') as data_file:
data = json.loads(data_... | 24.666667 | 69 | 0.653153 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 200 | 0.225225 |
9b65e671e782ba8045e5362d7f2aa0daf9d92725 | 716 | py | Python | tests/factory_fixtures/notes.py | codeforpdx/dwellinglybackend | 92fee6d19a68ae00750927b8700eaa7195b57668 | [
"MIT"
] | 15 | 2020-07-09T20:51:09.000Z | 2021-11-28T21:59:02.000Z | tests/factory_fixtures/notes.py | codeforpdx/dwellinglybackend | 92fee6d19a68ae00750927b8700eaa7195b57668 | [
"MIT"
] | 148 | 2020-03-28T22:10:30.000Z | 2021-12-19T09:22:59.000Z | tests/factory_fixtures/notes.py | codeforpdx/dwellinglybackend | 92fee6d19a68ae00750927b8700eaa7195b57668 | [
"MIT"
] | 30 | 2020-03-12T02:31:27.000Z | 2021-07-29T02:40:36.000Z | import pytest
from models.notes import NotesModel
from schemas.notes import NotesSchema
from tests.attributes import note_attrs
@pytest.fixture
def note_attributes(faker):
def _note_attributes(text, user, ticket):
return {**note_attrs(faker, text), "user_id": user.id, "ticket_id": ticket.id}
yield _n... | 27.538462 | 86 | 0.726257 | 0 | 0 | 550 | 0.768156 | 582 | 0.812849 | 0 | 0 | 20 | 0.027933 |
9b6659e81f23a3d9ae4d6dd42d1200115d52d82d | 2,220 | py | Python | src/routers/v1/endpoints/facetime.py | kal-byte/my-api | e1fccfa57cda874753d48411f7bfff06afbdb019 | [
"MIT"
] | 2 | 2021-03-13T14:43:05.000Z | 2021-03-13T15:10:58.000Z | src/routers/v1/endpoints/facetime.py | kal-byte/my-api | e1fccfa57cda874753d48411f7bfff06afbdb019 | [
"MIT"
] | null | null | null | src/routers/v1/endpoints/facetime.py | kal-byte/my-api | e1fccfa57cda874753d48411f7bfff06afbdb019 | [
"MIT"
] | 2 | 2021-03-13T14:42:40.000Z | 2021-03-17T18:18:10.000Z | """
MIT License
Copyright 2021-Present kal-byte
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, ... | 34.153846 | 102 | 0.763964 | 0 | 0 | 0 | 0 | 969 | 0.436486 | 366 | 0.164865 | 1,206 | 0.543243 |
9b695e220684cc34d44b4b158affb4987027de4f | 213 | py | Python | test/test_hook.py | mudox/pytav | 4124628c45ffd3fc35913d781278eb349d9c8559 | [
"MIT"
] | null | null | null | test/test_hook.py | mudox/pytav | 4124628c45ffd3fc35913d781278eb349d9c8559 | [
"MIT"
] | null | null | null | test/test_hook.py | mudox/pytav | 4124628c45ffd3fc35913d781278eb349d9c8559 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from tav.tmux import hook
def test_hook_suppression():
hook.disable('testing')
assert not hook.isEnabled()
hook.enable('testing')
assert hook.isEnabled()
| 16.384615 | 29 | 0.690141 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.295775 |
9b6a583e7f9d54f4d8150fa8893fc6c891b5dbd8 | 172 | py | Python | falcon/core/events/handling/base_handler.py | jopereira/horus-tracer | 03671206f02c5ebea18f5682b346f59884e0a538 | [
"MIT"
] | 21 | 2018-04-18T19:01:09.000Z | 2021-11-24T19:22:33.000Z | falcon/core/events/handling/base_handler.py | jopereira/horus-tracer | 03671206f02c5ebea18f5682b346f59884e0a538 | [
"MIT"
] | 29 | 2018-04-30T16:39:27.000Z | 2021-04-03T16:04:19.000Z | falcon/core/events/handling/base_handler.py | jopereira/horus-tracer | 03671206f02c5ebea18f5682b346f59884e0a538 | [
"MIT"
] | 7 | 2018-04-21T13:04:03.000Z | 2021-03-07T08:24:26.000Z | class BaseHandler(object):
def boot(self):
pass
def handle(self, cpu, data, size):
raise NotImplementedError
def shutdown(self):
pass
| 17.2 | 38 | 0.604651 | 171 | 0.994186 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9b6bba0de98dfc7b9557b30776b8cee5fb813b43 | 445 | py | Python | app/accounts/migrations/0003_auto_20190323_1709.py | NjengaSaruni/Accountant-Web-Server | e77124307f235a4a446e1251d2830d7587cb8719 | [
"MIT"
] | null | null | null | app/accounts/migrations/0003_auto_20190323_1709.py | NjengaSaruni/Accountant-Web-Server | e77124307f235a4a446e1251d2830d7587cb8719 | [
"MIT"
] | 19 | 2018-12-10T20:06:21.000Z | 2021-06-10T21:03:31.000Z | app/accounts/migrations/0003_auto_20190323_1709.py | NjengaSaruni/Accountant-Web-Server | e77124307f235a4a446e1251d2830d7587cb8719 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.7 on 2019-03-23 17:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0002_auto_20190113_1602'),
]
operations = [
migrations.AlterField(
model_name='user',
name='created_at',... | 23.421053 | 106 | 0.626966 | 352 | 0.791011 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.305618 |
9b6c6e386630575a00a0344243a155f4ff7c4cd5 | 979 | py | Python | src/components/sidebar1.py | DishaDH123/Disha551Dashboard | 3354ff94134e6094f7e5759f17abe5d988a32198 | [
"MIT"
] | null | null | null | src/components/sidebar1.py | DishaDH123/Disha551Dashboard | 3354ff94134e6094f7e5759f17abe5d988a32198 | [
"MIT"
] | null | null | null | src/components/sidebar1.py | DishaDH123/Disha551Dashboard | 3354ff94134e6094f7e5759f17abe5d988a32198 | [
"MIT"
] | null | null | null | import dash
from dash import dcc
from dash import html,Input, Output
import dash_bootstrap_components as dbc
from ..app import app
from .sidebar_function_tab1 import TAB1_DROPDOWN,time_scale,date_slider,choose_fun_tab1
SIDEBAR1 = [dbc.Row("Energy Dashboard",class_name="title",style={"font-size":"30px","padding-left":... | 34.964286 | 181 | 0.763023 | 0 | 0 | 0 | 0 | 141 | 0.144025 | 0 | 0 | 394 | 0.402451 |
9b6d446a16c44d84b91f269a1e5ec023a880fe0e | 4,176 | py | Python | interbotix_examples/interbotix_moveit_interface/get_trajectory_server.py | junyaoshi/interbotix_ros_arms | ca37aa98a66acdbd17557d6808d6c32f0ad4799b | [
"BSD-2-Clause"
] | null | null | null | interbotix_examples/interbotix_moveit_interface/get_trajectory_server.py | junyaoshi/interbotix_ros_arms | ca37aa98a66acdbd17557d6808d6c32f0ad4799b | [
"BSD-2-Clause"
] | null | null | null | interbotix_examples/interbotix_moveit_interface/get_trajectory_server.py | junyaoshi/interbotix_ros_arms | ca37aa98a66acdbd17557d6808d6c32f0ad4799b | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
from moveit_python_interface import MoveGroupPythonInteface
from geometry_msgs.msg import Pose
import rospy
from interbotix_moveit_interface.srv import GetTrajectory, GetTrajectoryResponse
# flags
GO_TO_START_JOINT_VALUES = False # whether to use ... | 48 | 130 | 0.677443 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,579 | 0.378113 |
9b6da7ce7169ebed552ff066ea4c100e67f503a4 | 573 | py | Python | importers/base_importer.py | lwhjon/repo-labels-cli | 5a16638f45f0b13e9fdddc59b1a0952f3ba51287 | [
"MIT"
] | 1 | 2021-07-14T06:32:50.000Z | 2021-07-14T06:32:50.000Z | importers/base_importer.py | lwhjon/repo-labels-cli | 5a16638f45f0b13e9fdddc59b1a0952f3ba51287 | [
"MIT"
] | 2 | 2021-08-31T18:14:03.000Z | 2021-12-29T18:14:25.000Z | importers/base_importer.py | lwhjon/repo-labels-cli | 5a16638f45f0b13e9fdddc59b1a0952f3ba51287 | [
"MIT"
] | null | null | null | """
This module contains the BaseImporter Abstract class which all other importers are inherited from.
"""
from abc import ABC, abstractmethod
from utilities.constants import ImportModes
class BaseImporter(ABC):
def __init__(self, link, loaded_json_data):
self.link = link
self.json_data = loaded... | 23.875 | 98 | 0.713787 | 382 | 0.666667 | 0 | 0 | 169 | 0.294939 | 0 | 0 | 106 | 0.184991 |
9b6ff38b27b5eaa149ea68c6674af0e96146a1de | 28 | py | Python | trump/extensions/source/tx-worldbankst/__init__.py | Equitable/trump | a2802692bc642fa32096374159eea7ceca2947b4 | [
"BSD-3-Clause"
] | 8 | 2015-03-14T13:09:46.000Z | 2020-08-29T17:49:52.000Z | trump/extensions/source/tx-worldbankst/__init__.py | Equitable/trump | a2802692bc642fa32096374159eea7ceca2947b4 | [
"BSD-3-Clause"
] | 64 | 2015-03-14T12:14:17.000Z | 2015-08-15T12:31:42.000Z | trump/extensions/source/tx-worldbankst/__init__.py | Equitable/trump | a2802692bc642fa32096374159eea7ceca2947b4 | [
"BSD-3-Clause"
] | 10 | 2015-03-14T12:18:02.000Z | 2022-01-18T21:44:27.000Z | from worldbankstext import * | 28 | 28 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9b70b9748dd8ac6b70d6284121fe398a2d54b264 | 367 | py | Python | ScratchPad/TestSendWeb.py | jdzawodniak/TempMonitorWeb | 280ce2612af9125967b8113d50df945eaf532a5b | [
"MIT"
] | null | null | null | ScratchPad/TestSendWeb.py | jdzawodniak/TempMonitorWeb | 280ce2612af9125967b8113d50df945eaf532a5b | [
"MIT"
] | null | null | null | ScratchPad/TestSendWeb.py | jdzawodniak/TempMonitorWeb | 280ce2612af9125967b8113d50df945eaf532a5b | [
"MIT"
] | null | null | null | # Imports
import requests
import os
import sys
import lcddriver
import time
import datetime
import RPi.GPIO as GPIO
import dht11
thingspeak_key = 'ZHAO5MQEKA0B93P7'
temperature = 23
humidity = 35
# Send the data to Thingspeak
r = requests.post('https://api.thingspeak.com/update.json', data = {'api_key':thingspeak... | 19.315789 | 135 | 0.771117 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 121 | 0.3297 |
9b71684b4558f4e73ca309d8159aa55dc5c42ada | 51 | py | Python | storage/models/__init__.py | parveenchahal/python-common | 4e5488615db3e0f8ba7f0bfeee87304a98fee2d5 | [
"MIT"
] | null | null | null | storage/models/__init__.py | parveenchahal/python-common | 4e5488615db3e0f8ba7f0bfeee87304a98fee2d5 | [
"MIT"
] | null | null | null | storage/models/__init__.py | parveenchahal/python-common | 4e5488615db3e0f8ba7f0bfeee87304a98fee2d5 | [
"MIT"
] | null | null | null | from ._storage_entry_model import StorageEntryModel | 51 | 51 | 0.921569 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9b7271707272e07905c19e8e64deead59d30237a | 857 | py | Python | data_utils/merge_dev_set.py | weihezhai/HatefulMemesChallenge | 04f52643c0864d1efb6c0a9c674db42764f6834c | [
"MIT"
] | 63 | 2020-12-09T18:58:16.000Z | 2022-03-21T02:34:35.000Z | data_utils/merge_dev_set.py | weihezhai/HatefulMemesChallenge | 04f52643c0864d1efb6c0a9c674db42764f6834c | [
"MIT"
] | 5 | 2021-01-29T10:33:04.000Z | 2021-08-25T14:15:27.000Z | data_utils/merge_dev_set.py | weihezhai/HatefulMemesChallenge | 04f52643c0864d1efb6c0a9c674db42764f6834c | [
"MIT"
] | 18 | 2020-12-11T20:36:04.000Z | 2021-12-12T07:04:20.000Z | import os
import json
import fire
def main(meme_dir):
print("meme_dir: ", meme_dir)
print("-" * 100)
meme_val_anno_1 = []
with open(os.path.join(meme_dir, "dev_seen.jsonl")) as f:
for line in f:
meme_val_anno_1.append(json.loads(line))
meme_val_anno_2 = []
with open(os.pa... | 25.205882 | 63 | 0.606768 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.117853 |
9b739e9baaf2f66a5a0221be7c0052b516ff1db9 | 1,324 | py | Python | scripts/gen-go-pylons.py | KinSai1975/Menira.py | ca275ce244ee4804444e1827ba60010a55acc07c | [
"BSD-3-Clause"
] | 118 | 2015-01-04T06:55:14.000Z | 2022-01-14T08:32:41.000Z | scripts/gen-go-pylons.py | KinSai1975/Menira.py | ca275ce244ee4804444e1827ba60010a55acc07c | [
"BSD-3-Clause"
] | 21 | 2015-01-03T02:16:28.000Z | 2021-03-24T06:10:57.000Z | scripts/gen-go-pylons.py | KinSai1975/Menira.py | ca275ce244ee4804444e1827ba60010a55acc07c | [
"BSD-3-Clause"
] | 53 | 2015-01-04T03:21:08.000Z | 2021-08-04T20:52:01.000Z | #!/usr/bin/env python
"""Generate go-pylons.py"""
import sys
import textwrap
import virtualenv
filename = 'go-pylons.py'
after_install = """\
import os, subprocess
def after_install(options, home_dir):
etc = join(home_dir, 'etc')
## TODO: this should all come from distutils
## like distutils.sysconfig.get... | 25.461538 | 63 | 0.614804 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 792 | 0.598187 |
9b73b142beb25313894454214e85b3ed177d34f5 | 3,173 | py | Python | cweqgen/sphinx/utils.py | cwinpy/cweqgen | b76634f0cdd62ede3295c584027ff911897590be | [
"MIT"
] | 2 | 2022-01-14T18:09:15.000Z | 2022-01-15T22:37:29.000Z | cweqgen/sphinx/utils.py | cwinpy/cweqgen | b76634f0cdd62ede3295c584027ff911897590be | [
"MIT"
] | null | null | null | cweqgen/sphinx/utils.py | cwinpy/cweqgen | b76634f0cdd62ede3295c584027ff911897590be | [
"MIT"
] | null | null | null | import os
import pkg_resources
import shutil
from ..equations import equations
from ..definitions import EQN_DEFINITIONS
def generate_equations_doc(docfile):
"""
Helper function to automatically generate a documentation page containing
all the available equations within cweqgen.
Parameters
-----... | 22.188811 | 98 | 0.570753 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,409 | 0.444059 |
9b7594f95dc3f33774a8b817bdaeb1f8a8797812 | 3,624 | py | Python | employee-project/src/FileIO.py | NischayaSharma/python-codes | f2216002a82f17a9103544f6ba361ed31eb85654 | [
"MIT"
] | null | null | null | employee-project/src/FileIO.py | NischayaSharma/python-codes | f2216002a82f17a9103544f6ba361ed31eb85654 | [
"MIT"
] | null | null | null | employee-project/src/FileIO.py | NischayaSharma/python-codes | f2216002a82f17a9103544f6ba361ed31eb85654 | [
"MIT"
] | null | null | null | import os;
import sys;
FileName='FileIO.txt'
def fileInput(fw,numOfEmployees):
#Getting the value of counter
frc = open(os.path.dirname(os.path.realpath(__file__))+"/counter.txt","r");
counter = int(frc.read());
frc.close();
#Taking input and writing to the file
for i in range(counter,numOfE... | 30.2 | 213 | 0.63521 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,125 | 0.31043 |
9b76216fa16aa9281bbd570ee1371176ada29324 | 4,442 | py | Python | examples/cardless_credit_example.py | glendaesutanto/xendit-python | f9b131882ff7d045f2e2c6518933d1594efba3e6 | [
"MIT"
] | 10 | 2020-10-31T23:34:34.000Z | 2022-03-08T19:08:55.000Z | examples/cardless_credit_example.py | glendaesutanto/xendit-python | f9b131882ff7d045f2e2c6518933d1594efba3e6 | [
"MIT"
] | 22 | 2020-07-30T14:25:07.000Z | 2022-03-31T03:55:46.000Z | examples/cardless_credit_example.py | glendaesutanto/xendit-python | f9b131882ff7d045f2e2c6518933d1594efba3e6 | [
"MIT"
] | 11 | 2020-07-28T08:09:40.000Z | 2022-03-18T00:14:02.000Z | import time
from print_running_function import print_running_function
# Hackish method to import from another directory
# Useful while xendit-python isn't released yet to the public
import importlib.machinery
loader = importlib.machinery.SourceFileLoader("xendit", "../xendit/__init__.py")
xendit = loader.lo... | 35.822581 | 99 | 0.579244 | 3,159 | 0.711166 | 0 | 0 | 3,070 | 0.69113 | 0 | 0 | 1,300 | 0.292661 |
9b79ce41c55d1514dd77ba2f1d765d1a882ab8ed | 2,220 | py | Python | tests/test_lines.py | phipleg/trafaret-config | 0063a5027e7db015e0b0b0dafd8159df409121f2 | [
"Apache-2.0",
"MIT"
] | 26 | 2016-12-07T16:40:44.000Z | 2020-11-09T03:27:23.000Z | tests/test_lines.py | phipleg/trafaret-config | 0063a5027e7db015e0b0b0dafd8159df409121f2 | [
"Apache-2.0",
"MIT"
] | 6 | 2017-10-27T13:50:21.000Z | 2020-09-24T17:08:48.000Z | tests/test_lines.py | phipleg/trafaret-config | 0063a5027e7db015e0b0b0dafd8159df409121f2 | [
"Apache-2.0",
"MIT"
] | 5 | 2016-12-05T10:23:29.000Z | 2020-06-05T15:31:24.000Z | import unittest
from textwrap import dedent
import trafaret as T
from .util import get_err
class TestSMTP(unittest.TestCase):
TRAFARET = T.Dict({
T.Key('port'): T.Int(),
T.Key('smtp'): T.Dict({
'server': T.String(),
'port': T.Int(),
'ssl_port': T.Int(),
... | 27.75 | 75 | 0.476577 | 2,119 | 0.954505 | 0 | 0 | 0 | 0 | 0 | 0 | 1,189 | 0.535586 |
9b79f3b170c6f1c8996ced8d0a625ff3c7e18cd9 | 4,856 | py | Python | epytope/Data/pssms/arb/mat/B_5801_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 7 | 2021-02-01T18:11:28.000Z | 2022-01-31T19:14:07.000Z | epytope/Data/pssms/arb/mat/B_5801_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 22 | 2021-01-02T15:25:23.000Z | 2022-03-14T11:32:53.000Z | epytope/Data/pssms/arb/mat/B_5801_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 4 | 2021-05-28T08:50:38.000Z | 2022-03-14T11:45:32.000Z | B_5801_9 = {0: {'A': -0.3411047643185575, 'C': 0.003633483019123024, 'E': -0.4818751780000427, 'D': -0.48635888961606405, 'G': -0.2552323225624609, 'F': -0.18023397304713804, 'I': 0.3607439895775445, 'H': 0.020686177466924322, 'K': 0.8273437122618179, 'M': 0.47430136579724197, 'L': 0.17966127012728303, 'N': -0.32919669... | 4,856 | 4,856 | 0.706549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 558 | 0.114909 |
9b7a95fc7a817c6bbe96dbb60f85ab236a523c5a | 919 | py | Python | django_requests_logger/admin.py | mabouchama/django-requests-logger | d28bae0312878cb09f355e8793e56b6a7d1e6f72 | [
"MIT"
] | 1 | 2019-02-20T09:08:15.000Z | 2019-02-20T09:08:15.000Z | django_requests_logger/admin.py | mabouchama/django-requests-logger | d28bae0312878cb09f355e8793e56b6a7d1e6f72 | [
"MIT"
] | 4 | 2022-02-15T12:43:15.000Z | 2022-02-22T13:23:10.000Z | django_requests_logger/admin.py | mabouchama/django-requests-logger | d28bae0312878cb09f355e8793e56b6a7d1e6f72 | [
"MIT"
] | 2 | 2022-02-10T06:36:27.000Z | 2022-02-16T06:58:16.000Z | from django.contrib import admin
from django.utils.translation import gettext_lazy as _
from django_requests_logger.models import RequestLog
class RequestLogAdmin(admin.ModelAdmin):
list_display = (
'url', 'method', 'response_status_code', 'created'
)
list_filter = ('method', 'response_status_code... | 28.71875 | 72 | 0.558215 | 724 | 0.787813 | 0 | 0 | 0 | 0 | 0 | 0 | 271 | 0.294886 |
9b7acf5a00804730593a41046352d93d47c45b81 | 4,006 | py | Python | suspect/dag/expressions.py | michaelbynum/suspect | efbfbc4a004d8e167fd4a7247b465b6569818433 | [
"Apache-2.0"
] | 14 | 2018-07-10T20:15:15.000Z | 2022-02-10T09:55:45.000Z | suspect/dag/expressions.py | michaelbynum/suspect | efbfbc4a004d8e167fd4a7247b465b6569818433 | [
"Apache-2.0"
] | 9 | 2019-10-11T15:27:15.000Z | 2021-08-13T12:28:52.000Z | suspect/dag/expressions.py | michaelbynum/suspect | efbfbc4a004d8e167fd4a7247b465b6569818433 | [
"Apache-2.0"
] | 4 | 2019-10-07T14:57:31.000Z | 2021-08-20T19:17:53.000Z | # Copyright 2017 Francesco Ceccon
#
# 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 writ... | 25.0375 | 85 | 0.658512 | 3,292 | 0.821767 | 0 | 0 | 346 | 0.08637 | 0 | 0 | 908 | 0.22666 |
9b7cb7e95cec056b67de9696402880e28ea63ad1 | 5,662 | py | Python | rubybot/cogs/memes.py | lakepower/Ruby-Bot | 332d3f8bc9c8ba2902f67b59e360596778483473 | [
"MIT"
] | null | null | null | rubybot/cogs/memes.py | lakepower/Ruby-Bot | 332d3f8bc9c8ba2902f67b59e360596778483473 | [
"MIT"
] | null | null | null | rubybot/cogs/memes.py | lakepower/Ruby-Bot | 332d3f8bc9c8ba2902f67b59e360596778483473 | [
"MIT"
] | null | null | null | import requests
import bs4
import re
import random
import codecs
import os
from discord.ext import commands
from discord.ext.commands import BucketType
from cogs.utils import checks
path_qaz = os.path.join(os.getcwd(), 'files', 'qaz.txt')
path_riko = os.path.join(os.getcwd(), 'files', 'riko_meme')
nsfw... | 33.502959 | 132 | 0.575062 | 5,206 | 0.919463 | 0 | 0 | 2,691 | 0.475274 | 2,516 | 0.444366 | 1,276 | 0.225362 |
9b7cbdab3a8e39b99a930ed638449c9b5895940a | 803 | py | Python | src/python_parser/config.py | ttu/cubersensors-iot-azure | cdec18bb99f2316ed65179090f0f66b8791f57ca | [
"Apache-2.0"
] | 1 | 2016-05-29T10:53:09.000Z | 2016-05-29T10:53:09.000Z | src/python_parser/config.py | ttu/cubersensors-iot-azure | cdec18bb99f2316ed65179090f0f66b8791f57ca | [
"Apache-2.0"
] | null | null | null | src/python_parser/config.py | ttu/cubersensors-iot-azure | cdec18bb99f2316ed65179090f0f66b8791f57ca | [
"Apache-2.0"
] | 1 | 2018-03-02T05:19:08.000Z | 2018-03-02T05:19:08.000Z | # keys file is not included in repository
import keys
ROOT = "http://api.cubesensors.com"
AUTH = "%s/auth" % ROOT
RES = "%s/v1" % ROOT
logger_name = "cubesensors_parser"
# Define if should use event hub or insert data straight to db
use_event_hub = False
# CubeSensors config
consumer_key = keys.cube_consumer_key
co... | 25.09375 | 62 | 0.808219 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 243 | 0.302615 |
9b7d015d0188b694a8bc8e7bf62510306eb4231c | 375 | py | Python | airflow/ascii.py | dtardoin/airflow | 4d7f413c7db3ffdb1236e7799e4fe647842e5dbd | [
"Apache-2.0"
] | 1 | 2021-03-02T20:08:53.000Z | 2021-03-02T20:08:53.000Z | airflow/ascii.py | dtardoin/airflow | 4d7f413c7db3ffdb1236e7799e4fe647842e5dbd | [
"Apache-2.0"
] | null | null | null | airflow/ascii.py | dtardoin/airflow | 4d7f413c7db3ffdb1236e7799e4fe647842e5dbd | [
"Apache-2.0"
] | 1 | 2019-05-14T16:19:12.000Z | 2019-05-14T16:19:12.000Z | bug = r"""\
=, .=
=.| ,---. |.=
=.| "-(:::::)-" |.=
\\__/`-.|.-'\__//
`-| .::| .::|-' Pillendreher
_|`-._|_.-'|_ (Scarabaeus sacer)
/.-| | .::|-.\
// ,| .::|::::|. \\
|| //\::::|::' /\\ ||
/'\|| `.__|__.' ||/'\
^ \\ //... | 23.4375 | 46 | 0.114667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 368 | 0.981333 |
9b7e0fc01325c4db573e5b390f7ba040016a6e45 | 11,092 | py | Python | tooldb.py | SolidifiedRay/layout-web-tool | cefba938c1e03ea8da206ec7fb0c6d8a62f1fc1b | [
"MIT"
] | 1 | 2020-04-01T15:05:54.000Z | 2020-04-01T15:05:54.000Z | tooldb.py | SolidifiedRay/layout-web-tool | cefba938c1e03ea8da206ec7fb0c6d8a62f1fc1b | [
"MIT"
] | 42 | 2017-05-23T17:19:19.000Z | 2021-04-26T12:28:47.000Z | tooldb.py | SolidifiedRay/layout-web-tool | cefba938c1e03ea8da206ec7fb0c6d8a62f1fc1b | [
"MIT"
] | 7 | 2017-05-04T02:13:07.000Z | 2020-07-09T10:56:03.000Z | """
<Program Name>
tooldb.py
<Author>
Lukas Puehringer <lukas.puehringer@nyu.edu>
<Started>
June 12, 2017
<Copyright>
See LICENSE for licensing information.
<Purpose>
A basic collection of software supply chain tools in four categories
- vcs (version control systems)
- building
- qa (quality assu... | 26.857143 | 136 | 0.542102 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8,341 | 0.751983 |
9b7e283a083204b48c0d43c9af36980bb2c2c080 | 811 | py | Python | operations/constant.py | anon-cand/nexpreval | e033bb9f5f25c74c44d0eb29748bf48193c185ae | [
"MIT"
] | null | null | null | operations/constant.py | anon-cand/nexpreval | e033bb9f5f25c74c44d0eb29748bf48193c185ae | [
"MIT"
] | null | null | null | operations/constant.py | anon-cand/nexpreval | e033bb9f5f25c74c44d0eb29748bf48193c185ae | [
"MIT"
] | null | null | null | from operations.operation import Operation
class Constant(Operation):
"""
Class to represent a constant
"""
TAG = 'default'
__slots__ = 'value'
def __init__(self, value = None):
self.value = value
def __hash__(self):
return hash(self.value)
def __call__(self):
... | 23.852941 | 63 | 0.588163 | 764 | 0.942047 | 0 | 0 | 0 | 0 | 0 | 0 | 252 | 0.310727 |
9b7e3f441634f0a952e1cc4ac8faf39f1d5c0e8a | 3,587 | py | Python | flask_tutorial/marshmallow_demo/nesting_schemas.py | ftconan/python3 | eb63ba33960072f792ecce6db809866b38c402f8 | [
"MIT"
] | 1 | 2018-12-19T22:07:56.000Z | 2018-12-19T22:07:56.000Z | marshmallow_demo/nesting_schemas.py | ftconan/flask-tutorial | d5164c93b5e6a6e3d2b8980e4b846adb7cb21aee | [
"MIT"
] | 12 | 2020-03-14T05:32:26.000Z | 2022-03-12T00:08:49.000Z | marshmallow_demo/nesting_schemas.py | ftconan/flask-tutorial | d5164c93b5e6a6e3d2b8980e4b846adb7cb21aee | [
"MIT"
] | 1 | 2018-12-19T22:08:00.000Z | 2018-12-19T22:08:00.000Z | # coding=utf-8
"""
@author: magician
@date: 2018/9/13
"""
import datetime as dt
from marshmallow import Schema, fields, pprint
class User(object):
"""
User
"""
def __init__(self, name, email):
self.name = name
self.email = email
self.created_at = dt.datetime.now()
sel... | 23.444444 | 74 | 0.583496 | 1,593 | 0.444104 | 0 | 0 | 0 | 0 | 0 | 0 | 1,697 | 0.473097 |
9b7ec91f09b0e08306d5eb9d01d89bc063dc7870 | 3,906 | py | Python | integration_tests/util/generate_scene.py | carderne/raster-vision | 915fbcd3263d8f2193e65c2cd0eb53e050a47a01 | [
"Apache-2.0"
] | 1,577 | 2017-05-22T14:22:00.000Z | 2022-03-31T02:03:25.000Z | integration_tests/util/generate_scene.py | carderne/raster-vision | 915fbcd3263d8f2193e65c2cd0eb53e050a47a01 | [
"Apache-2.0"
] | 933 | 2017-05-09T20:25:02.000Z | 2022-03-31T10:22:59.000Z | integration_tests/util/generate_scene.py | monocilindro/raster-vision | fc181a6f31f085affa1ee12f0204bdbc5a6bf85a | [
"Apache-2.0"
] | 336 | 2017-05-15T16:30:44.000Z | 2022-03-28T06:19:33.000Z | import random
import click
import numpy as np
import rasterio
from rasterio.transform import from_origin
from rastervision.core.box import Box
from rastervision.data import (RasterioCRSTransformer, ObjectDetectionLabels,
ObjectDetectionGeoJSONStore)
from rastervision.core.class_map impo... | 33.965217 | 79 | 0.616999 | 0 | 0 | 0 | 0 | 3,508 | 0.898105 | 0 | 0 | 840 | 0.215054 |
9b7f4ac026f327923c4f012b100b9d4fe6b0b3e2 | 148 | py | Python | examples/test_hanzi_dict.py | smilelight/lightDict | bd21afd90777489b6a62b9f6954f0d24c3f772d1 | [
"Apache-2.0"
] | 4 | 2020-01-15T09:54:40.000Z | 2020-12-13T09:10:25.000Z | examples/test_hanzi_dict.py | smilelight/lightDict | bd21afd90777489b6a62b9f6954f0d24c3f772d1 | [
"Apache-2.0"
] | null | null | null | examples/test_hanzi_dict.py | smilelight/lightDict | bd21afd90777489b6a62b9f6954f0d24c3f772d1 | [
"Apache-2.0"
] | 1 | 2021-05-28T09:40:14.000Z | 2021-05-28T09:40:14.000Z | from lightdict import HanziDict
hanzi_dic = HanziDict(r'D:\Data\NLP\corpus\words\hanzi.csv')
print('和' in hanzi_dic)
x = hanzi_dic['哈']
print(x)
| 16.444444 | 60 | 0.72973 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 47 | 0.309211 |
9b814e62cd1712261791628b00ae51e5874b229d | 883 | py | Python | src/quill/fold/wire/html_util.py | spin-systems/quill | b210f840e228295e41feaf4ff79f2cc8bd96889d | [
"MIT"
] | null | null | null | src/quill/fold/wire/html_util.py | spin-systems/quill | b210f840e228295e41feaf4ff79f2cc8bd96889d | [
"MIT"
] | 14 | 2020-11-22T09:59:08.000Z | 2021-11-02T16:05:35.000Z | src/quill/fold/wire/html_util.py | spin-systems/quill | b210f840e228295e41feaf4ff79f2cc8bd96889d | [
"MIT"
] | null | null | null | from bs4 import Tag
__all__ = ["CustomHtmlTag", "Attrs", "PartialAttrs"]
######## General utility classes for tags and attrs
class CustomHtmlTag(Tag):
"Base class defining as_str for a bs4.Tag (may be overridden)"
def as_str(self):
return str(self)#.prettify()
class Attrs(dict):
"For pas... | 30.448276 | 81 | 0.682899 | 742 | 0.840317 | 0 | 0 | 227 | 0.257078 | 0 | 0 | 298 | 0.337486 |
9b81731e40409f7877598e1a56186915df1cedd5 | 573 | py | Python | pycess/wsgi.py | pycess/pycess | 07fa4cdd59fff5d51686bd6a769d78ece38a41d5 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2015-07-07T02:36:12.000Z | 2015-07-07T02:36:12.000Z | pycess/wsgi.py | pycess/pycess | 07fa4cdd59fff5d51686bd6a769d78ece38a41d5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | pycess/wsgi.py | pycess/pycess | 07fa4cdd59fff5d51686bd6a769d78ece38a41d5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | """
WSGI config for pycess project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pycess.settings")
from django.core.wsg... | 26.045455 | 79 | 0.788831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 276 | 0.481675 |
9b821c976ee4f99cdb762f5c8e9e17a0905d593c | 321 | py | Python | Problem Solving/Algorithms/Introduction to Nim Game.py | Muntaha-Islam0019/HackerRank-Solutions | caa687aab67461aba69026d3bdc44b62c1dec1c9 | [
"MIT"
] | null | null | null | Problem Solving/Algorithms/Introduction to Nim Game.py | Muntaha-Islam0019/HackerRank-Solutions | caa687aab67461aba69026d3bdc44b62c1dec1c9 | [
"MIT"
] | null | null | null | Problem Solving/Algorithms/Introduction to Nim Game.py | Muntaha-Islam0019/HackerRank-Solutions | caa687aab67461aba69026d3bdc44b62c1dec1c9 | [
"MIT"
] | null | null | null | from functools import reduce
games = int(input())
for game in range(games):
number_of_piles = int(input())
pile = list(map(int, input().rstrip().split()))
result = reduce((lambda x, y: x ^ y), pile)
# result = len(pile) % 2 [wont work on test case 2]
print('Second' if result == 0 else 'First')... | 21.4 | 55 | 0.616822 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.205607 |
9b822cf2e09599ac604bde44effce84c6a2e3f54 | 54 | py | Python | gr_module.py | GunarakulanGunaretnam/python-basic-fundamentals | c62bf939fbaef8895d28f85af9ef6ced70801f96 | [
"Apache-2.0"
] | null | null | null | gr_module.py | GunarakulanGunaretnam/python-basic-fundamentals | c62bf939fbaef8895d28f85af9ef6ced70801f96 | [
"Apache-2.0"
] | null | null | null | gr_module.py | GunarakulanGunaretnam/python-basic-fundamentals | c62bf939fbaef8895d28f85af9ef6ced70801f96 | [
"Apache-2.0"
] | null | null | null | def print_name():
print("My name is Gunarakulan")
| 10.8 | 32 | 0.685185 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.444444 |
9b82673b26c46b4b26d95c88f868cace6cd8a642 | 294 | py | Python | flows/statestore/tests/django_tests.py | sergioisidoro/django-flows | 326baa3e216a15bd7a8d13b2a09ba9752e250dbb | [
"BSD-2-Clause"
] | 104 | 2015-01-05T14:29:16.000Z | 2021-11-08T11:20:24.000Z | flows/statestore/tests/django_tests.py | sergioisidoro/django-flows | 326baa3e216a15bd7a8d13b2a09ba9752e250dbb | [
"BSD-2-Clause"
] | 4 | 2015-09-23T11:14:50.000Z | 2020-03-21T06:08:34.000Z | flows/statestore/tests/django_tests.py | sergioisidoro/django-flows | 326baa3e216a15bd7a8d13b2a09ba9752e250dbb | [
"BSD-2-Clause"
] | 16 | 2015-01-05T10:13:44.000Z | 2022-02-14T05:21:23.000Z |
import unittest
from flows.statestore.django_store import StateStore
from flows.statestore.tests.utils import store_state_works
class DjangoStateStoreTest(unittest.TestCase):
def test_django_store_state(self):
store = StateStore()
store_state_works(self, store)
| 24.5 | 58 | 0.765306 | 158 | 0.537415 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9b830f6c20e0821da065a595dcea7c80e7322901 | 4,238 | py | Python | tests/test_ann.py | mtezzele/EZyRB | 30e6db72d444a3a1713f0af63ceb0585350a7ecf | [
"MIT"
] | 39 | 2016-06-30T08:21:47.000Z | 2022-03-18T16:05:30.000Z | tests/test_ann.py | mtezzele/EZyRB | 30e6db72d444a3a1713f0af63ceb0585350a7ecf | [
"MIT"
] | 38 | 2016-09-21T08:45:27.000Z | 2022-03-07T13:48:59.000Z | tests/test_ann.py | mtezzele/EZyRB | 30e6db72d444a3a1713f0af63ceb0585350a7ecf | [
"MIT"
] | 47 | 2016-05-20T12:44:39.000Z | 2022-03-05T05:01:19.000Z | import numpy as np
import torch.nn as nn
from torch import Tensor, from_numpy
from unittest import TestCase
from ezyrb import ANN
np.random.seed(17)
def get_xy():
npts = 20
dinput = 4
inp = np.random.uniform(-1, 1, size=(npts, dinput))
out = np.array([
np.sin(inp[:, 0]) + np.sin(inp[:, 1]**2... | 30.710145 | 82 | 0.558046 | 3,834 | 0.904672 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.017461 |
9b838f908501c804e2f543284ab15cfe75ddca4d | 380 | py | Python | ipub/params.py | ms8r/scriv2epub | a8d4ee7abc5b5bef654e40fec25605b34ed43207 | [
"MIT"
] | 8 | 2016-01-15T21:12:50.000Z | 2021-10-17T18:47:40.000Z | ipub/params.py | ms8r/scriv2epub | a8d4ee7abc5b5bef654e40fec25605b34ed43207 | [
"MIT"
] | null | null | null | ipub/params.py | ms8r/scriv2epub | a8d4ee7abc5b5bef654e40fec25605b34ed43207 | [
"MIT"
] | null | null | null | import os.path
_PATH_PREFIX = os.path.dirname(os.path.realpath(__file__))
_TEMPLATE_PATH = os.path.join(_PATH_PREFIX, 'tmpl')
_TEMPLATE_EXT = '.jinja'
_EPUB_SKELETON_PATH = os.path.join(_PATH_PREFIX, 'epub')
_BASIC_CH_PAR_STYLE = 'par-indent'
_FIRST_CH_PAR_STYLE = 'texttop'
_DROP_CAP_STYLE = 'dropcap'
_CLEAR_STYLE... | 31.666667 | 59 | 0.776316 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.210526 |