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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
eea0783e1d150b2a10a9b357db454fabc3181131 | 2,154 | py | Python | common_multicore.py | bgrayburn/itemSetCount | b1d8a9262a0d90a9038ecb7b38c94d3a33f235f1 | [
"MIT"
] | null | null | null | common_multicore.py | bgrayburn/itemSetCount | b1d8a9262a0d90a9038ecb7b38c94d3a33f235f1 | [
"MIT"
] | null | null | null | common_multicore.py | bgrayburn/itemSetCount | b1d8a9262a0d90a9038ecb7b38c94d3a33f235f1 | [
"MIT"
] | null | null | null | from multiprocessing import Process
import pymongo
from itertools import combinations
import csv
import time
import sys
mongo_ip = "192.168.1.127"
db_name = "analysis"
collection_name = "common_items"
max_item_threshold = 20
def load_transaction(filename):
transaction = []
with open(filename,'rb') as csvfile:
... | 29.916667 | 113 | 0.689415 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 218 | 0.101207 |
eea08039ae5c75a5d6c24f6bfa31fee73a4d653a | 1,962 | py | Python | 5_arborescences/code/noeud_bin_p1.py | efloti/cours-nsi-terminale | 091df5518c25b50ef523a803ac747c63be76f670 | [
"CC0-1.0"
] | null | null | null | 5_arborescences/code/noeud_bin_p1.py | efloti/cours-nsi-terminale | 091df5518c25b50ef523a803ac747c63be76f670 | [
"CC0-1.0"
] | null | null | null | 5_arborescences/code/noeud_bin_p1.py | efloti/cours-nsi-terminale | 091df5518c25b50ef523a803ac747c63be76f670 | [
"CC0-1.0"
] | null | null | null | class NoeudBin:
def __init__(self, valeur, gauche=None, droit=None):
self.valeur = valeur
# self.parent = None
self.gauche = gauche
self.droit = droit
def est_double(self):
"""Renvoie True si le noeud a deux enfants exactement, False autrement."""
return self.gau... | 38.470588 | 93 | 0.61315 | 1,962 | 0.999491 | 0 | 0 | 0 | 0 | 0 | 0 | 751 | 0.382578 |
eea2c9cc9d5f2240a45df9dae18361db691a6948 | 3,753 | py | Python | bluebottle/segments/migrations/0024_auto_20220210_1336.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | null | null | null | bluebottle/segments/migrations/0024_auto_20220210_1336.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | null | null | null | bluebottle/segments/migrations/0024_auto_20220210_1336.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.2.24 on 2022-02-10 12:36
import bluebottle.utils.fields
import bluebottle.utils.validators
import colorfield.fields
from django.db import migrations, models
import django_better_admin_arrayfield.models.fields
class Migration(migrations.Migration):
dependencies = [
('segments', '0... | 55.191176 | 425 | 0.679456 | 3,516 | 0.936851 | 0 | 0 | 0 | 0 | 0 | 0 | 1,180 | 0.314415 |
eea2f57d28acf6796635f1259b4f5d6adad79071 | 7,980 | py | Python | codeball/tests/test_models.py | metrica-sports/codeball | 60bfe54b7898bed87cbbbae9dfc0f3bc49d31025 | [
"MIT"
] | 54 | 2020-09-16T13:09:03.000Z | 2022-03-28T12:32:19.000Z | codeball/tests/test_models.py | metrica-sports/codeball | 60bfe54b7898bed87cbbbae9dfc0f3bc49d31025 | [
"MIT"
] | null | null | null | codeball/tests/test_models.py | metrica-sports/codeball | 60bfe54b7898bed87cbbbae9dfc0f3bc49d31025 | [
"MIT"
] | 9 | 2021-03-28T13:02:57.000Z | 2022-03-24T11:19:06.000Z | import os
import pandas as pd
from kloppy import (
load_epts_tracking_data,
to_pandas,
load_metrica_json_event_data,
load_xml_code_data,
)
from codeball import (
GameDataset,
DataType,
TrackingFrame,
EventsFrame,
CodesFrame,
PossessionsFrame,
BaseFrame,
Zones,
Area... | 30.930233 | 78 | 0.595614 | 7,565 | 0.947995 | 0 | 0 | 0 | 0 | 0 | 0 | 857 | 0.107393 |
eea39007c18df9bb3a13dd73ee8b29fd1990d82d | 2,025 | py | Python | 100dayspython/day004/main.py | mrqssjeff/project-python | b3b08f2acfe825640a5ee92cf9d6fa45ab580384 | [
"MIT"
] | null | null | null | 100dayspython/day004/main.py | mrqssjeff/project-python | b3b08f2acfe825640a5ee92cf9d6fa45ab580384 | [
"MIT"
] | null | null | null | 100dayspython/day004/main.py | mrqssjeff/project-python | b3b08f2acfe825640a5ee92cf9d6fa45ab580384 | [
"MIT"
] | null | null | null | import random
print("Rock, Paper, Scissors!")
player = int(input("What do you choose? Type 0 for Rock, 1 for paper, 2 for Scissors: "))
computer = random.randint(0, 2)
game = ["""
_______
---' ____)
(_____)
(_____)
(____)
---.__(___)
""", """
_______
---' ____)____
______)
... | 28.125 | 101 | 0.382222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,304 | 0.643951 |
eea423068f1d28596bc373c0840d0c29a2ee48d7 | 3,249 | py | Python | python/evaluation/track_detection/rpn/rpn_eval.py | billy000400/Mu2e_MLTracking | 675e62d844ff8a5ccba9019e316c374c40658101 | [
"MIT"
] | null | null | null | python/evaluation/track_detection/rpn/rpn_eval.py | billy000400/Mu2e_MLTracking | 675e62d844ff8a5ccba9019e316c374c40658101 | [
"MIT"
] | 1 | 2021-01-03T08:57:34.000Z | 2021-01-03T23:41:22.000Z | python/evaluation/track_detection/rpn/rpn_eval.py | billy000400/Mu2e_MLTracking | 675e62d844ff8a5ccba9019e316c374c40658101 | [
"MIT"
] | null | null | null | # Detector (Faster RCNN)
# forward propogate from input to output
# Goal: test if the validation output act as expected
import sys
from pathlib import Path
import pickle
import timeit
from datetime import datetime
import pandas as pd
import numpy as np
import tensorflow as tf
from tensorflow.keras.regularizers impor... | 36.505618 | 124 | 0.748538 | 458 | 0.140966 | 0 | 0 | 0 | 0 | 0 | 0 | 556 | 0.17113 |
eea44ef30a81ba67ad14a68694b3cdcb38fe067e | 1,686 | py | Python | cv_workshops/6-day/2-clazz.py | afterloe/opencv-practice | 83d76132d004ebbc96d99d34a0fd3fc37a044f9f | [
"MIT"
] | 5 | 2020-03-13T07:34:30.000Z | 2021-10-01T03:03:05.000Z | cv_workshops/6-day/2-clazz.py | afterloe/Opencv-practice | 83d76132d004ebbc96d99d34a0fd3fc37a044f9f | [
"MIT"
] | null | null | null | cv_workshops/6-day/2-clazz.py | afterloe/Opencv-practice | 83d76132d004ebbc96d99d34a0fd3fc37a044f9f | [
"MIT"
] | 1 | 2020-03-01T13:21:43.000Z | 2020-03-01T13:21:43.000Z | #!/usr/bin/env python3
# -*- coding=utf-8 -*-
import cv2 as cv
import numpy as np
"""
使用几何矩计算轮廓中心与横纵波比对过滤
对二值图像的各个轮廓进行计算获得对应的几何矩,根据几何矩计算轮廓点的中心位置。
cv.moments(contours, binaryImage)
- contours: 轮廓点集
- binaryImage: bool, default False;二值图返回
"""
def main():
... | 31.811321 | 87 | 0.541518 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 489 | 0.268386 |
eea59cf9926de3446a108f54259fdcc310099f7a | 172 | py | Python | api/utils/get_earnings.py | syth0le/REST-API_YANDEX | 7a693430973e4d0ae428860d17fc33504dc25fb2 | [
"MIT"
] | null | null | null | api/utils/get_earnings.py | syth0le/REST-API_YANDEX | 7a693430973e4d0ae428860d17fc33504dc25fb2 | [
"MIT"
] | null | null | null | api/utils/get_earnings.py | syth0le/REST-API_YANDEX | 7a693430973e4d0ae428860d17fc33504dc25fb2 | [
"MIT"
] | null | null | null | def get_salary(courier_type, completed_orders):
DATA = {"foot": 2, "bike": 5, "car": 9}
salary = 500 * DATA[str(courier_type)] * completed_orders
return salary
| 34.4 | 61 | 0.668605 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.098837 |
eea747f6a5f58fa9f7cb6e82312ed9dadca75ac3 | 1,967 | py | Python | war.py | Eduardojvr/Space_Atack_Game | f37e1891bf00af71f3c1758a0288a6b0b830bb9e | [
"MIT"
] | null | null | null | war.py | Eduardojvr/Space_Atack_Game | f37e1891bf00af71f3c1758a0288a6b0b830bb9e | [
"MIT"
] | null | null | null | war.py | Eduardojvr/Space_Atack_Game | f37e1891bf00af71f3c1758a0288a6b0b830bb9e | [
"MIT"
] | null | null | null | from settings import Settings
from ship import Ship
import pygame
import sys
from trap import Trap
from time import clock
from random import randint
def run_game():
tela1 = Settings()
screen = pygame.display.set_mode((tela1.altura, tela1.largura))
background = Settings()
pygame.display.set_caption("Spa... | 32.245902 | 101 | 0.516523 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 0.067107 |
eea8fc748971275806d47350049795a3a98b474a | 1,463 | py | Python | Project-2/doc/contingency_mat_parser.py | TooSchoolForCool/EE219-Larger-Scale-Data-Mining | 9a42c88169ace88f9b652d0e174c7f641fcc522e | [
"Apache-2.0"
] | null | null | null | Project-2/doc/contingency_mat_parser.py | TooSchoolForCool/EE219-Larger-Scale-Data-Mining | 9a42c88169ace88f9b652d0e174c7f641fcc522e | [
"Apache-2.0"
] | 12 | 2020-01-28T22:09:15.000Z | 2022-03-11T23:16:26.000Z | Project-2/doc/contingency_mat_parser.py | TooSchoolForCool/EE219-Larger-Scale-Data-Mining | 9a42c88169ace88f9b652d0e174c7f641fcc522e | [
"Apache-2.0"
] | null | null | null | import sys
import argparse
def read_in(file_path):
try:
file = open(file_path, 'r')
except:
sys.stderr.write("[ERROR] read_in(): Cannot open file '%s'\n" % file_path)
exit(1)
file_content = []
for line in file:
file_content.append(line)
i = 0
while i < len(fi... | 21.835821 | 82 | 0.514012 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 230 | 0.157211 |
eea9326c5e16b9ddd8185aff0917cab86602e465 | 5,426 | py | Python | voldemort_client/helper.py | mirko-lelansky/voldemort-client | a2839a0cc50ca4fdc5bdb36b2df3a3cf7f7d9db9 | [
"Apache-2.0"
] | null | null | null | voldemort_client/helper.py | mirko-lelansky/voldemort-client | a2839a0cc50ca4fdc5bdb36b2df3a3cf7f7d9db9 | [
"Apache-2.0"
] | null | null | null | voldemort_client/helper.py | mirko-lelansky/voldemort-client | a2839a0cc50ca4fdc5bdb36b2df3a3cf7f7d9db9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Mirko Lelansky <[email protected]>
#
# 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 a... | 29.32973 | 82 | 0.651493 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,435 | 0.633063 |
eea9c161475ffd63195c5ca94c42455b4deb9625 | 1,581 | py | Python | src/reddack/exceptions.py | diatomicDisaster/Reddit-Slackbot | 4f22af110e72eab19d9162a4428800a1895303f3 | [
"MIT"
] | null | null | null | src/reddack/exceptions.py | diatomicDisaster/Reddit-Slackbot | 4f22af110e72eab19d9162a4428800a1895303f3 | [
"MIT"
] | 10 | 2022-02-21T01:11:20.000Z | 2022-02-22T18:13:00.000Z | src/reddack/exceptions.py | diatomicDisaster/redack | 4f22af110e72eab19d9162a4428800a1895303f3 | [
"MIT"
] | null | null | null | from __future__ import (
annotations,
)
class ModFromSlackError(Exception):
"""Base class for modfromslack errors"""
def __init__(
self,
message: str,
*,
preamble: str | None = None,
afterword: str | None = None
) -> None:
if preamble is not None:
... | 26.79661 | 86 | 0.573688 | 1,527 | 0.965844 | 0 | 0 | 0 | 0 | 0 | 0 | 409 | 0.258697 |
eeaa2be76b33b3286d73455fcb963e240ddf8af4 | 7,276 | py | Python | cid/cli/cli_generator.py | zeljko-bal/CID | 52ecc445c441ec63386c9f092b226090588a3789 | [
"MIT"
] | 1 | 2017-09-15T06:14:54.000Z | 2017-09-15T06:14:54.000Z | cid/cli/cli_generator.py | zeljko-bal/CID | 52ecc445c441ec63386c9f092b226090588a3789 | [
"MIT"
] | null | null | null | cid/cli/cli_generator.py | zeljko-bal/CID | 52ecc445c441ec63386c9f092b226090588a3789 | [
"MIT"
] | null | null | null | from collections import defaultdict
from os import makedirs
from os.path import realpath, join, dirname, isdir, exists
from shutil import copy
from jinja2 import Environment, FileSystemLoader
from cid.cli.cli_model_specs import CliModelSpecs
from cid.cli import cli_post_processing
from cid.parser.cid_parser import pa... | 42.8 | 177 | 0.67276 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,289 | 0.177158 |
eeaa72a12bf7e9c9d8b1d3537dc9a129425ee115 | 2,037 | py | Python | container/sample-inf1/inf1_mx.py | yunma10/neo-ai-dlr | 1f5c65d9bf7155c016e5d2f78d273755760a4f2a | [
"Apache-2.0"
] | 446 | 2019-01-24T02:04:17.000Z | 2022-03-16T13:45:32.000Z | container/sample-inf1/inf1_mx.py | yunma10/neo-ai-dlr | 1f5c65d9bf7155c016e5d2f78d273755760a4f2a | [
"Apache-2.0"
] | 179 | 2019-01-24T10:03:34.000Z | 2022-03-19T02:06:56.000Z | container/sample-inf1/inf1_mx.py | yunma10/neo-ai-dlr | 1f5c65d9bf7155c016e5d2f78d273755760a4f2a | [
"Apache-2.0"
] | 111 | 2019-01-24T20:51:45.000Z | 2022-02-18T06:22:40.000Z | import mxnet as mx
#import neomxnet
import os
import json
import numpy as np
from collections import namedtuple
import os
dtype='float32'
Batch = namedtuple('Batch', ['data'])
ctx = mx.neuron()
is_gpu = False
def model_fn(model_dir):
print("param {}".format(os.environ.get('MODEL_NAME_CUSTOM')))
print("ctx {}".form... | 37.722222 | 121 | 0.675994 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 512 | 0.25135 |
eeab90972c87f9c41713b77c4809b4a9c645a33d | 4,040 | py | Python | data/process_data.py | KCKhoo/disaster_response_dashboard | ee337125121664503675bfb5bf01af85c7c1a8ca | [
"FTL",
"CNRI-Python",
"blessing"
] | null | null | null | data/process_data.py | KCKhoo/disaster_response_dashboard | ee337125121664503675bfb5bf01af85c7c1a8ca | [
"FTL",
"CNRI-Python",
"blessing"
] | null | null | null | data/process_data.py | KCKhoo/disaster_response_dashboard | ee337125121664503675bfb5bf01af85c7c1a8ca | [
"FTL",
"CNRI-Python",
"blessing"
] | null | null | null | import sys
import pandas as pd
from sqlalchemy import create_engine
def load_data(messages_filepath, categories_filepath):
''' Load and merge two CSV files - one containing messages and the other containing categories
Args:
messages_filepath (str): Path to the CSV file containing messages
... | 33.94958 | 98 | 0.658168 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,275 | 0.563119 |
eeaca61d7f8a12d9407b89ba0d429021d517e4c0 | 179 | py | Python | problem0650.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | problem0650.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | problem0650.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | ###########################
#
# #650 Divisors of Binomial Product - Project Euler
# https://projecteuler.net/problem=650
#
# Code by Kevin Marciniak
#
###########################
| 19.888889 | 51 | 0.502793 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.955307 |
eeacff18635731300c340b2e253ce1bf7ee2b4e0 | 3,432 | py | Python | pycle/bicycle-scrapes/bike-data-scrape/scraperMulti.py | fusuyfusuy/School-Projects | 8e38f19da90f63ac9c9ec91e550fc5aaab3d0234 | [
"MIT"
] | null | null | null | pycle/bicycle-scrapes/bike-data-scrape/scraperMulti.py | fusuyfusuy/School-Projects | 8e38f19da90f63ac9c9ec91e550fc5aaab3d0234 | [
"MIT"
] | null | null | null | pycle/bicycle-scrapes/bike-data-scrape/scraperMulti.py | fusuyfusuy/School-Projects | 8e38f19da90f63ac9c9ec91e550fc5aaab3d0234 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import os
import csv
bicycles = []
basepath = 'HTMLFiles/'
outputFile = open('scraped.py','a')
outputFile.write("list=[")
len1 = len(os.listdir(basepath))
counter1 = 0
for entry in os.listdir(basepath):
counter2 = 0
len2 = len(os.listdir(basepath+'/'+entry))
for folder in os.... | 28.840336 | 106 | 0.456002 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,474 | 0.429487 |
eeade2b142cd94a4f1b12d3d46fc0e265a2be53e | 642 | py | Python | python/283_move_zeroes.py | liaison/LeetCode | 8b10a1f6bbeb3ebfda99248994f7c325140ee2fd | [
"MIT"
] | 17 | 2016-03-01T22:40:53.000Z | 2021-04-19T02:15:03.000Z | python/283_move_zeroes.py | liaison/LeetCode | 8b10a1f6bbeb3ebfda99248994f7c325140ee2fd | [
"MIT"
] | null | null | null | python/283_move_zeroes.py | liaison/LeetCode | 8b10a1f6bbeb3ebfda99248994f7c325140ee2fd | [
"MIT"
] | 3 | 2019-03-07T03:48:43.000Z | 2020-04-05T01:11:36.000Z | class Solution:
def moveZeroes(self, nums: List[int]) -> None:
"""
Do not return anything, modify nums in-place instead.
"""
read_index, write_index = 0, -1
len_nums = len(nums)
# shift non-zero numbers to the head of the list
while read_index < len_nums:
... | 30.571429 | 61 | 0.542056 | 641 | 0.998442 | 0 | 0 | 0 | 0 | 0 | 0 | 162 | 0.252336 |
eeaeecc00f80638bdeeeac780d5b87b92462f522 | 464 | py | Python | dummyGPIO.py | yasokada/python-151127-7segLed_IPadrDisplay | eb97f17685ac2477e6a3a7321159d6463f736dd2 | [
"MIT"
] | 1 | 2017-01-13T23:57:21.000Z | 2017-01-13T23:57:21.000Z | toLearn/dummyGPIO.py | yasokada/python-151113-lineMonitor | 224342d5855d8ee6792fad6ad36399d95fce1b09 | [
"MIT"
] | 2 | 2015-12-08T23:40:12.000Z | 2015-12-24T22:09:07.000Z | dummyGPIO.py | yasokada/python-151127-7segLed_IPadrDisplay | eb97f17685ac2477e6a3a7321159d6463f736dd2 | [
"MIT"
] | null | null | null | '''
v0.1 2015/11/26
- add output()
- add setmode()
- add setup()
'''
class CDummyGPIO:
def __init__(self):
self.BOARD = 0;
self.OUT = 1;
# do nothing
return
def setmode(self, board):
# do nothing
return
def setup(self, pinnum, inout):
# do nothing
return
def output(self, pinnum, onoff):
... | 12.888889 | 33 | 0.642241 | 265 | 0.571121 | 0 | 0 | 0 | 0 | 0 | 0 | 240 | 0.517241 |
eeb4e80e6cc8868c343b5e9768135af13ccbaa18 | 380 | py | Python | setup.py | CyrusBiotechnology/django-headmaster | 0100b4086c09da43da5f2f68e3cb549dca8af96a | [
"MIT"
] | null | null | null | setup.py | CyrusBiotechnology/django-headmaster | 0100b4086c09da43da5f2f68e3cb549dca8af96a | [
"MIT"
] | null | null | null | setup.py | CyrusBiotechnology/django-headmaster | 0100b4086c09da43da5f2f68e3cb549dca8af96a | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name='django-headmaster',
version='0.0.1',
description='Add extra headers to your site via your settings file',
url='http://github.com/CyrusBiotechnology/django-headmaster',
author='Peter Novotnak',
author_email='[email protected]',
license='MIT',... | 31.666667 | 74 | 0.681579 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 197 | 0.518421 |
eeb69df1582f775092e1af736d2173a50d2365bb | 484 | py | Python | tests/test_lines_count.py | MacHu-GWU/single_file_module-project | 01f7a6b250853bebfd73de275895bf274325cfc1 | [
"MIT"
] | 3 | 2017-02-27T05:07:46.000Z | 2022-01-17T06:46:20.000Z | tests/test_lines_count.py | MacHu-GWU/single_file_module-project | 01f7a6b250853bebfd73de275895bf274325cfc1 | [
"MIT"
] | null | null | null | tests/test_lines_count.py | MacHu-GWU/single_file_module-project | 01f7a6b250853bebfd73de275895bf274325cfc1 | [
"MIT"
] | 1 | 2017-09-05T14:05:55.000Z | 2017-09-05T14:05:55.000Z | # -*- coding: utf-8 -*-
import os
import pytest
from sfm import lines_count
def test_lines_count():
assert lines_count.count_lines(__file__) >= 22
def test_lines_stats():
n_files, n_lines = lines_count.lines_stats(
os.path.dirname(__file__), lines_count.filter_python_script)
assert n_files >= 1... | 20.166667 | 68 | 0.688017 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.103306 |
eeb6fa5b0b347f06d9b353c9e9aeb47e31e57218 | 1,884 | py | Python | rrwebapp/accesscontrol.py | louking/rrwebapp | 5c73f84e1a21bc3b5fa51d83ba576c3152e6cf27 | [
"Apache-2.0"
] | null | null | null | rrwebapp/accesscontrol.py | louking/rrwebapp | 5c73f84e1a21bc3b5fa51d83ba576c3152e6cf27 | [
"Apache-2.0"
] | 417 | 2015-05-07T16:50:22.000Z | 2022-03-14T16:16:13.000Z | rrwebapp/accesscontrol.py | louking/rrwebapp | 5c73f84e1a21bc3b5fa51d83ba576c3152e6cf27 | [
"Apache-2.0"
] | null | null | null | ###########################################################################################
# accesscontrol - access control permission and need definitions
#
# Date Author Reason
# ---- ------ ------
# 01/18/14 Lou King Create
#
# Copyright 2014... | 34.254545 | 91 | 0.571656 | 350 | 0.185775 | 0 | 0 | 0 | 0 | 0 | 0 | 1,001 | 0.531316 |
eeb941243abfa405873eabb4951a2447d2772339 | 173 | py | Python | bareon_fuel_extension/tests.py | gitfred/bareon-fuel-extension | 0074f187a6244e786b37e551009fa2eadcae1d3a | [
"Apache-2.0"
] | null | null | null | bareon_fuel_extension/tests.py | gitfred/bareon-fuel-extension | 0074f187a6244e786b37e551009fa2eadcae1d3a | [
"Apache-2.0"
] | null | null | null | bareon_fuel_extension/tests.py | gitfred/bareon-fuel-extension | 0074f187a6244e786b37e551009fa2eadcae1d3a | [
"Apache-2.0"
] | null | null | null | from nailgun.extensions import BaseExtension
class NoElo(BaseExtension):
name = 'noelo'
description = 'no elo'
version = '1.0.0'
def test_ext():
NoElo()
| 14.416667 | 44 | 0.65896 | 95 | 0.549133 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.127168 |
eebab051d6bd2499eba549e8e5c3faefb5989879 | 1,404 | py | Python | email_utils/models/EmailMessage.py | E7ernal/quizwhiz | a271d40922eaad682a76d7700beafc7a5df51fac | [
"MIT"
] | null | null | null | email_utils/models/EmailMessage.py | E7ernal/quizwhiz | a271d40922eaad682a76d7700beafc7a5df51fac | [
"MIT"
] | 7 | 2020-02-12T00:31:35.000Z | 2022-03-11T23:19:21.000Z | email_utils/models/EmailMessage.py | E7ernal/quizwhiz | a271d40922eaad682a76d7700beafc7a5df51fac | [
"MIT"
] | null | null | null | # vim: ts=4:sw=4:expandtabs
__author__ = '[email protected]'
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from email_utils.tasks import send_mail
RESEND_EMAIL_PERMISSION = 'can_resend_email'
@python_2_unicode_c... | 29.87234 | 86 | 0.688034 | 1,073 | 0.764245 | 0 | 0 | 1,102 | 0.7849 | 0 | 0 | 212 | 0.150997 |
eebbbd0016582d70d21cbd69a90c5e0e380ce3d8 | 1,262 | py | Python | core/string_utils.py | phage-nz/observer | 2a2d9b5047c5b2aba0d102c0c21e97de472bbd39 | [
"Apache-2.0"
] | 2 | 2020-04-25T05:11:49.000Z | 2021-02-09T21:27:38.000Z | core/string_utils.py | phage-nz/observer | 2a2d9b5047c5b2aba0d102c0c21e97de472bbd39 | [
"Apache-2.0"
] | null | null | null | core/string_utils.py | phage-nz/observer | 2a2d9b5047c5b2aba0d102c0c21e97de472bbd39 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
from .log_utils import get_module_logger
from defang import defang
import random
import string
import urllib.parse
logger = get_module_logger(__name__)
def random_string(length):
return ''.join(
random.choice(
string.ascii_uppercase +
string.ascii_lowercase +
... | 20.354839 | 64 | 0.639461 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.057052 |
eebda7906979f96edc59138dae061c5c2c92e491 | 61 | py | Python | udp_decoders/__init__.py | ccgcyber/xpcap | a0e6fd1355fd0a9cbff4e074275b236ce8c6c3b8 | [
"MIT"
] | 5 | 2017-07-31T02:07:05.000Z | 2021-02-14T16:39:49.000Z | udp_decoders/__init__.py | ccgcyber/xpcap | a0e6fd1355fd0a9cbff4e074275b236ce8c6c3b8 | [
"MIT"
] | null | null | null | udp_decoders/__init__.py | ccgcyber/xpcap | a0e6fd1355fd0a9cbff4e074275b236ce8c6c3b8 | [
"MIT"
] | 4 | 2016-07-24T08:56:54.000Z | 2020-07-12T11:50:02.000Z | # empty file telling python that this directory is a package
| 30.5 | 60 | 0.803279 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.983607 |
eebdcac25970fd8db9e1b4ca1a89af16a4e7a240 | 803 | py | Python | slushtools/string/__init__.py | ZackPaceCoder/slushtools | 32bfee028d30fd8fd88e332bdd744a71e51d6dcc | [
"MIT"
] | null | null | null | slushtools/string/__init__.py | ZackPaceCoder/slushtools | 32bfee028d30fd8fd88e332bdd744a71e51d6dcc | [
"MIT"
] | null | null | null | slushtools/string/__init__.py | ZackPaceCoder/slushtools | 32bfee028d30fd8fd88e332bdd744a71e51d6dcc | [
"MIT"
] | null | null | null | # Slush Tools STRING Module
class String:
bu = None
dat = None
def __init__(str):
if str == None:
print("String argument required.")
exit()
else:
dat = str
bu = str
return dat
def reset():
dat = bu
return dat
def format(type="custom",args={}):
if type == "cus... | 20.075 | 48 | 0.523039 | 773 | 0.96264 | 0 | 0 | 0 | 0 | 0 | 0 | 99 | 0.123288 |
eebe3ee2689c486643e9c66684f0834e67a050c1 | 2,001 | py | Python | lib/gams/general_utils.py | zzzace2000/nodegam | 79c8675e65d75237f2e853ae55bbc40ae7124ee9 | [
"MIT"
] | 7 | 2021-11-06T14:26:07.000Z | 2022-03-17T10:27:17.000Z | lib/gams/general_utils.py | zzzace2000/node | 4501233177173ee9b246a5a5e462afd3b1d51bbb | [
"MIT"
] | 1 | 2022-03-22T01:08:27.000Z | 2022-03-22T17:19:50.000Z | lib/gams/general_utils.py | zzzace2000/node | 4501233177173ee9b246a5a5e462afd3b1d51bbb | [
"MIT"
] | 1 | 2021-11-06T14:27:05.000Z | 2021-11-06T14:27:05.000Z | import time, os
import numpy as np
import json
class Timer:
def __init__(self, name, remove_start_msg=True):
self.name = name
self.remove_start_msg = remove_start_msg
def __enter__(self):
self.start_time = time.time()
print('Run "%s".........' % self.name, end='\r' if self.remo... | 35.105263 | 111 | 0.592704 | 574 | 0.286857 | 0 | 0 | 0 | 0 | 0 | 0 | 198 | 0.098951 |
eebf77f5393d40a51825e9d1d10647b08c84de24 | 140 | py | Python | practica3/pregunta8.py | Vanesamorales/practica-N-3-python | e87d4662b5df208cfbc3a15db23d324f46ad838e | [
"Apache-2.0"
] | null | null | null | practica3/pregunta8.py | Vanesamorales/practica-N-3-python | e87d4662b5df208cfbc3a15db23d324f46ad838e | [
"Apache-2.0"
] | null | null | null | practica3/pregunta8.py | Vanesamorales/practica-N-3-python | e87d4662b5df208cfbc3a15db23d324f46ad838e | [
"Apache-2.0"
] | null | null | null | import carpeta8
# bloque principal
lista=carpeta8.cargar()
carpeta8.imprimir(lista)
carpeta8.ordenar(lista)
carpeta8.imprimir(lista) | 20 | 25 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0.135714 |
eebfbf0ca3fc84c6b27f16b71cc79b9f09285376 | 692 | py | Python | core/clean.py | Saij84/mediaRename | 984fbe47dfa27b8e229934e5b29c73dd0ab48c05 | [
"MIT"
] | null | null | null | core/clean.py | Saij84/mediaRename | 984fbe47dfa27b8e229934e5b29c73dd0ab48c05 | [
"MIT"
] | null | null | null | core/clean.py | Saij84/mediaRename | 984fbe47dfa27b8e229934e5b29c73dd0ab48c05 | [
"MIT"
] | null | null | null | import re
from mediaRename.constants import constants as CONST
def cleanReplace(data):
"""
Takes each dict object and clean
:param data: dict object
:return: none
"""
dataIn = data["files"]
# (regX, replaceSTR)
cleanPasses = [(CONST.CLEAN_PASSONE, ""), (CONST.CLEAN_PASSTWO, ""),
... | 28.833333 | 77 | 0.619942 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 149 | 0.215318 |
eec036acad92775b225df98eed2eda788c78e178 | 32,553 | py | Python | mindaffectBCI/decoder/utils.py | rohitvk1/pymindaffectBCI | 0348784d9b0fbd9d595e31ae46d2e74632399507 | [
"MIT"
] | 44 | 2020-02-07T15:01:47.000Z | 2022-03-21T14:36:15.000Z | mindaffectBCI/decoder/utils.py | CkiChen/pymindaffectBCI | 0119145a8b280c776f4c4e6cd776fed0f0156404 | [
"MIT"
] | 17 | 2020-02-07T17:11:23.000Z | 2022-02-20T18:01:42.000Z | mindaffectBCI/decoder/utils.py | CkiChen/pymindaffectBCI | 0119145a8b280c776f4c4e6cd776fed0f0156404 | [
"MIT"
] | 19 | 2020-02-07T17:13:22.000Z | 2022-03-17T01:22:35.000Z | # Copyright (c) 2019 MindAffect B.V.
# Author: Jason Farquhar <[email protected]>
# This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>.
#
# pymindaffectBCI is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published b... | 39.458182 | 183 | 0.595183 | 2,151 | 0.066077 | 0 | 0 | 95 | 0.002918 | 0 | 0 | 12,730 | 0.391055 |
eec107c75238eeb480e6c150f395182753824077 | 155 | py | Python | Tasks/task_7.py | madhubmvs/python-self-teaching | adce7a18553fc13a96d0319fdeb5ce9894ec74fc | [
"MIT"
] | null | null | null | Tasks/task_7.py | madhubmvs/python-self-teaching | adce7a18553fc13a96d0319fdeb5ce9894ec74fc | [
"MIT"
] | null | null | null | Tasks/task_7.py | madhubmvs/python-self-teaching | adce7a18553fc13a96d0319fdeb5ce9894ec74fc | [
"MIT"
] | null | null | null | a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
c = []
for x in a:
if x in b:
c.append(x)
print(c) | 17.222222 | 47 | 0.406452 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eec118b9402f1ab3d9a333bb53d8180c1858ff75 | 2,100 | py | Python | model/test.py | yacoubb/lang-classifier | d39a342cf8ad64b191ea235f9af3f833033f254a | [
"MIT"
] | 1 | 2019-07-03T11:28:55.000Z | 2019-07-03T11:28:55.000Z | model/test.py | yacoubb/lang-classifier | d39a342cf8ad64b191ea235f9af3f833033f254a | [
"MIT"
] | null | null | null | model/test.py | yacoubb/lang-classifier | d39a342cf8ad64b191ea235f9af3f833033f254a | [
"MIT"
] | null | null | null | from tensorflow import keras
import os
import numpy as np
import sys
import json
sys.path.append("/".join(os.path.abspath(__file__).split("/")[:-2]))
from model.dataset import utils, test_sampler
def estimate_model_accuracy(model):
def predict(word):
word = utils.total_conversion(word)
word = wor... | 28.378378 | 68 | 0.623333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 253 | 0.120476 |
eec16f1e4b653abf2db741d973b4bf4d50090976 | 927 | py | Python | codes/Layer/Layer.py | serenaklm/rumor_detection | 8f4822951db111cc2e21f9a2901872c9681a2cbb | [
"MIT"
] | 42 | 2020-03-24T03:09:19.000Z | 2022-02-15T14:13:13.000Z | codes/Layer/Layer.py | serenaklm/rumor_detection | 8f4822951db111cc2e21f9a2901872c9681a2cbb | [
"MIT"
] | 3 | 2020-08-18T13:15:20.000Z | 2021-06-15T12:17:08.000Z | codes/Layer/Layer.py | serenaklm/rumor_detection | 8f4822951db111cc2e21f9a2901872c9681a2cbb | [
"MIT"
] | 15 | 2020-03-22T23:48:02.000Z | 2022-03-14T23:53:42.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
import os
import numpy as np
from Layer import FeedForwardNetwork
from Layer import MultiHeadAttention
__author__ = "Serena Khoo"
class Layer(nn.Module):
def __init__(self, config, d_model, n_head):
super(Layer,self).__init__()
self.config =... | 28.96875 | 167 | 0.785329 | 725 | 0.782093 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.014024 |
eec22817edf6f5ff4caafda2c75d1273cb9edbb8 | 2,102 | py | Python | crawler/crawler2.py | labcontext/image-inpainting-oldpaper | da4683a2c58d662e443ea24ab93fd9d8fcb96bda | [
"Apache-2.0"
] | null | null | null | crawler/crawler2.py | labcontext/image-inpainting-oldpaper | da4683a2c58d662e443ea24ab93fd9d8fcb96bda | [
"Apache-2.0"
] | 3 | 2021-03-19T11:16:57.000Z | 2022-01-13T02:18:17.000Z | crawler/crawler2.py | labcontext/image-inpainting-oldpaper | da4683a2c58d662e443ea24ab93fd9d8fcb96bda | [
"Apache-2.0"
] | null | null | null | import requests
import urllib.request
import os
import pickle
import argparse
# file read folder
path = 'http://db.itkc.or.kr//data/imagedb/BOOK/ITKC_{0}/ITKC_{0}_{1}A/ITKC_{0}_{1}A_{2}{5}_{3}{4}.JPG'
# Manual
label = ['BT', 'MO']
middle = 1400
last = ['A', 'V'] # A ~400 V ~009
num = 10
num1 = 400
fin = ['A', 'B',... | 26.275 | 103 | 0.460038 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 382 | 0.181732 |
eec2dfa96c82d004b2ff333de47a8fe7f395770a | 2,646 | py | Python | src/spade/symbols/symbol.py | ArvinSKushwaha/SPADE | b9a0f7698606a698fbc5a44e3dd36cb40186bda3 | [
"MIT"
] | null | null | null | src/spade/symbols/symbol.py | ArvinSKushwaha/SPADE | b9a0f7698606a698fbc5a44e3dd36cb40186bda3 | [
"MIT"
] | null | null | null | src/spade/symbols/symbol.py | ArvinSKushwaha/SPADE | b9a0f7698606a698fbc5a44e3dd36cb40186bda3 | [
"MIT"
] | null | null | null | """This module holds the Symbol, ComputationalGraph, and ComputationalGraphNode classes and methods to help construct
a computational graph."""
from typing import Optional
from .operators import Add, Subtract, Multiply, Divide, Grad, Div, Curl, Laplacian
class Symbol:
"""The Symbol class is the superclass represe... | 38.347826 | 117 | 0.712018 | 2,382 | 0.900227 | 0 | 0 | 0 | 0 | 0 | 0 | 1,068 | 0.403628 |
eec6e813387d5c509fe53af51947031d9b165546 | 2,218 | py | Python | test-runner/measurement.py | brycewang-microsoft/iot-sdks-e2e-fx | 211c9c2615a82076bda02a27152d67366755edbf | [
"MIT"
] | 12 | 2019-02-02T00:15:13.000Z | 2022-02-08T18:20:08.000Z | test-runner/measurement.py | brycewang-microsoft/iot-sdks-e2e-fx | 211c9c2615a82076bda02a27152d67366755edbf | [
"MIT"
] | 36 | 2019-02-14T22:53:17.000Z | 2022-03-22T22:41:38.000Z | test-runner/measurement.py | brycewang-microsoft/iot-sdks-e2e-fx | 211c9c2615a82076bda02a27152d67366755edbf | [
"MIT"
] | 12 | 2019-02-19T13:28:25.000Z | 2022-02-08T18:20:55.000Z | # Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for
# full license information.
import datetime
import threading
import contextlib
class MeasureRunningCodeBlock(contextlib.AbstractContextManager):
def __init__(self, name):
self.count ... | 22.632653 | 82 | 0.596934 | 2,003 | 0.903066 | 0 | 0 | 0 | 0 | 0 | 0 | 148 | 0.066727 |
eeca3c40e6643d64e2cc7861e9484fa8ec9bd6f8 | 9,415 | py | Python | main.py | Arnav-Ghatti/Tkinter-Money-Tracker | 365dcafc78522d03062a8f062fa8167b9c015583 | [
"MIT"
] | null | null | null | main.py | Arnav-Ghatti/Tkinter-Money-Tracker | 365dcafc78522d03062a8f062fa8167b9c015583 | [
"MIT"
] | null | null | null | main.py | Arnav-Ghatti/Tkinter-Money-Tracker | 365dcafc78522d03062a8f062fa8167b9c015583 | [
"MIT"
] | null | null | null | import tkinter as tk
from tkinter import messagebox
import json
# Constants
FONT_NAME = "Open Sans"
BG_COLOR = "#f9f7f7"
FONT_COLOR = "#112d4e"
ACCENT = "#dbe2ef"
root = tk.Tk()
root.title("Money Tracker")
root.config(bg=BG_COLOR)
root.resizable(0, 0)
root.iconbitmap("C:\\Users\\ASUA\\Desktop\\Tests\\MoneyTransactio... | 40.235043 | 205 | 0.683696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,062 | 0.218317 |
eeca641ef832fde419fc26a2088df6a05f63fc33 | 519 | py | Python | ftmscan/utils/parsing.py | awilliamson10/ftmscan-python | d7ed384f1ac65461c86bed4a65f9332baf92c8f0 | [
"MIT"
] | 4 | 2022-01-10T21:58:02.000Z | 2022-03-27T20:21:35.000Z | polygonscan/utils/parsing.py | yusufseyrek/polygonscan-python | c58a8190e41a5c9bac0a5e88db809e5e207b1c77 | [
"MIT"
] | 3 | 2021-09-25T05:10:27.000Z | 2021-11-21T04:56:29.000Z | polygonscan/utils/parsing.py | yusufseyrek/polygonscan-python | c58a8190e41a5c9bac0a5e88db809e5e207b1c77 | [
"MIT"
] | 4 | 2021-09-25T05:11:08.000Z | 2022-03-09T01:01:33.000Z | import requests
class ResponseParser:
@staticmethod
def parse(response: dict):
result = response["result"]
if "status" in response.keys():
status = bool(int(response["status"]))
message = response["message"]
assert status, f"{result} -- {message}"
el... | 30.529412 | 51 | 0.554913 | 501 | 0.965318 | 0 | 0 | 475 | 0.915222 | 0 | 0 | 138 | 0.265896 |
eeca73f0a33396739525615f94801665b147bf27 | 12,725 | py | Python | empire_cellular_automaton/dataset_processing.py | ThomasMiller01/ProofOfConcept | 021bf29743309224628682d0f82b0be80ae83c95 | [
"MIT"
] | 1 | 2019-12-18T13:49:22.000Z | 2019-12-18T13:49:22.000Z | empire_cellular_automaton/dataset_processing.py | ThomasMiller01/Experiments | 021bf29743309224628682d0f82b0be80ae83c95 | [
"MIT"
] | null | null | null | empire_cellular_automaton/dataset_processing.py | ThomasMiller01/Experiments | 021bf29743309224628682d0f82b0be80ae83c95 | [
"MIT"
] | 1 | 2021-08-29T09:22:52.000Z | 2021-08-29T09:22:52.000Z | import json
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import os
import time
def people_distribution_map(data, file):
unique, indices, counts = np.unique(
data[:, 0], return_index=True, return_counts=True)
generations = list(zip(unique, indices, counts))
plt_size_x = int(... | 37.985075 | 122 | 0.558428 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,394 | 0.109548 |
eecf75568a4959cab7877ed219454c84c98b7e64 | 403 | py | Python | mindhome_alpha/erpnext/patches/v11_0/add_expense_claim_default_account.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | mindhome_alpha/erpnext/patches/v11_0/add_expense_claim_default_account.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | null | null | null | mindhome_alpha/erpnext/patches/v11_0/add_expense_claim_default_account.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("setup", "doctype", "company")
companies = frappe.get_all("Company", fields=["name", "default_payable_account"])
for company in companies:
if company.default_payable_account is not None:
frappe.db.set_value("Company", comp... | 36.636364 | 121 | 0.791563 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.280397 |
eed48753201aaf2076987680b987b0334df7af1f | 4,653 | py | Python | cliff/lister.py | tivaliy/cliff | a04a48f4f7dc72b1bcc95a5c6a550c7650e35ab3 | [
"Apache-2.0"
] | 187 | 2015-01-13T04:07:41.000Z | 2022-03-10T14:12:27.000Z | cliff/lister.py | tivaliy/cliff | a04a48f4f7dc72b1bcc95a5c6a550c7650e35ab3 | [
"Apache-2.0"
] | 3 | 2016-01-05T20:52:55.000Z | 2020-10-01T06:16:58.000Z | cliff/lister.py | tivaliy/cliff | a04a48f4f7dc72b1bcc95a5c6a550c7650e35ab3 | [
"Apache-2.0"
] | 69 | 2015-02-01T01:28:37.000Z | 2021-11-15T08:28:53.000Z | # 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, software
# distributed u... | 36.637795 | 78 | 0.585214 | 3,976 | 0.854502 | 0 | 0 | 630 | 0.135397 | 0 | 0 | 2,122 | 0.45605 |
eed5699e06d3cac61b4a945b53a1004046c608f3 | 1,026 | py | Python | task3/task3.py | ksmirenko/ml-homework | a5e558352ffc332ad5e40526dda21f205718a203 | [
"MIT"
] | 1 | 2020-08-05T08:06:33.000Z | 2020-08-05T08:06:33.000Z | task3/task3.py | ksmirenko/ml-homework | a5e558352ffc332ad5e40526dda21f205718a203 | [
"MIT"
] | null | null | null | task3/task3.py | ksmirenko/ml-homework | a5e558352ffc332ad5e40526dda21f205718a203 | [
"MIT"
] | null | null | null | from PIL import Image
import numpy as np
# Works when launched from terminal
# noinspection PyUnresolvedReferences
from k_means import k_means
input_image_file = 'lena.jpg'
output_image_prefix = 'out_lena'
n_clusters = [2, 3, 5]
max_iterations = 100
launch_count = 3
def main():
# Read input image
image = np... | 27.72973 | 104 | 0.692008 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 244 | 0.237817 |
eed63ef06321c79002e85fdaeb08205c4299ea39 | 3,389 | py | Python | dcrnn_train.py | syin3/cs224w-traffic | 284836b49404bfd38ae23b31f89f8e617548e286 | [
"MIT"
] | 9 | 2019-03-20T01:02:07.000Z | 2020-11-25T06:45:30.000Z | dcrnn_train.py | syin3/cs224w-traffic | 284836b49404bfd38ae23b31f89f8e617548e286 | [
"MIT"
] | null | null | null | dcrnn_train.py | syin3/cs224w-traffic | 284836b49404bfd38ae23b31f89f8e617548e286 | [
"MIT"
] | 2 | 2020-09-24T07:03:58.000Z | 2020-11-09T04:43:03.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import tensorflow as tf
import yaml
from model.dcrnn_supervisor import DCRNNSupervisor
def main(args):
with open(args.config_filename) as f:
supervisor_config = yaml.load(f)
... | 42.3625 | 162 | 0.689584 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,396 | 0.411921 |
eed698cee32da7af7d7cb366130b591986c4feae | 1,035 | py | Python | train.py | k2sebeom/DeepLOLCourt | 630f1eee1729c06f686abc7c2a7ecbdfe66803b3 | [
"MIT"
] | null | null | null | train.py | k2sebeom/DeepLOLCourt | 630f1eee1729c06f686abc7c2a7ecbdfe66803b3 | [
"MIT"
] | null | null | null | train.py | k2sebeom/DeepLOLCourt | 630f1eee1729c06f686abc7c2a7ecbdfe66803b3 | [
"MIT"
] | null | null | null | import torch.optim as optim
from torch import nn
from data.match_dataset import MatchDataset
from torch.utils.data import DataLoader
from models.lol_result_model import LOLResultModel
import torch
if __name__ == '__main__':
EPOCH = 50
BATCH_SIZE = 32
loader = DataLoader(MatchDataset('dataset/train_data.... | 30.441176 | 84 | 0.656039 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.12657 |
eed71f6a7395828dd1b7ba56051666be99d7beff | 774 | py | Python | src/cpfromddd.py | theonewolf/TripleD | 875c903a302d5502ac65224c16fa65da1246483e | [
"MIT"
] | 13 | 2015-04-04T14:41:38.000Z | 2021-12-28T12:24:29.000Z | src/cpfromddd.py | theonewolf/TripleD | 875c903a302d5502ac65224c16fa65da1246483e | [
"MIT"
] | null | null | null | src/cpfromddd.py | theonewolf/TripleD | 875c903a302d5502ac65224c16fa65da1246483e | [
"MIT"
] | 8 | 2015-01-26T17:15:27.000Z | 2019-09-14T03:22:46.000Z | #!/usr/bin/env python
import libtripled, logging, sys, os
# CONSTANTS
log = logging.getLogger('tripled.cpfromddd')
def next_chunk(tripled, path):
chunks = tripled.read_file(path)
for chunk in chunks:
log.debug('reading from worker[%s] path[%s]' % (chunk[0], chunk[1]))
yield tripled.read_block(c... | 28.666667 | 75 | 0.630491 | 0 | 0 | 220 | 0.284238 | 0 | 0 | 0 | 0 | 137 | 0.177003 |
eed75ce868931dabebd40ef5cd1f3bab8cc08cc7 | 10,094 | py | Python | torchrec/distributed/test_utils/test_sharding.py | samiwilf/torchrec | 50ff0973d5d01ec80fe36ba5f1d524c92c799836 | [
"BSD-3-Clause"
] | 1 | 2022-03-07T09:06:11.000Z | 2022-03-07T09:06:11.000Z | torchrec/distributed/test_utils/test_sharding.py | samiwilf/torchrec | 50ff0973d5d01ec80fe36ba5f1d524c92c799836 | [
"BSD-3-Clause"
] | null | null | null | torchrec/distributed/test_utils/test_sharding.py | samiwilf/torchrec | 50ff0973d5d01ec80fe36ba5f1d524c92c799836 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
from enum import Enum
from typing import cast, Dict, List, Optional, Tuple, Union
impor... | 36.705455 | 86 | 0.645928 | 220 | 0.021795 | 0 | 0 | 0 | 0 | 0 | 0 | 1,277 | 0.126511 |
eed876b1554e0a4c99de5f131d255d84ecaa3345 | 78 | py | Python | lyrebird/plugins/__init__.py | dodosophia/lyrebird | b3c3d6e0f0f47b8df0cc119a1e5d30763371fa3d | [
"MIT"
] | 1 | 2020-03-18T05:56:53.000Z | 2020-03-18T05:56:53.000Z | lyrebird/plugins/__init__.py | robert0825/lyrebird | 18bcbd2030bd4a506d1f519ae0316d8fc667db4f | [
"MIT"
] | null | null | null | lyrebird/plugins/__init__.py | robert0825/lyrebird | 18bcbd2030bd4a506d1f519ae0316d8fc667db4f | [
"MIT"
] | 1 | 2019-03-11T09:25:36.000Z | 2019-03-11T09:25:36.000Z | from .plugin_loader import manifest
from .plugin_manager import PluginManager
| 26 | 41 | 0.871795 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eed9c6dd573fe2bb3afc30e2202d6ac77f9cb554 | 330 | py | Python | examples/optimizers/science/create_hgso.py | anukaal/opytimizer | 5f1ccc0da80e6a4cabd99578fa24cf4f6466f9b9 | [
"Apache-2.0"
] | 528 | 2018-10-01T20:00:09.000Z | 2022-03-27T11:15:31.000Z | examples/optimizers/science/create_hgso.py | anukaal/opytimizer | 5f1ccc0da80e6a4cabd99578fa24cf4f6466f9b9 | [
"Apache-2.0"
] | 17 | 2019-10-30T00:47:03.000Z | 2022-03-21T11:39:28.000Z | examples/optimizers/science/create_hgso.py | anukaal/opytimizer | 5f1ccc0da80e6a4cabd99578fa24cf4f6466f9b9 | [
"Apache-2.0"
] | 35 | 2018-10-01T20:03:23.000Z | 2022-03-20T03:54:15.000Z | from opytimizer.optimizers.science import HGSO
# One should declare a hyperparameters object based
# on the desired algorithm that will be used
params = {
'n_clusters': 2,
'l1': 0.0005,
'l2': 100,
'l3': 0.001,
'alpha': 1.0,
'beta': 1.0,
'K': 1.0
}
# Creates an HGSO optimizer
o = HGSO(param... | 19.411765 | 51 | 0.633333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 162 | 0.490909 |
eedc7a11ee4379d86b302ba06badd9a7738a9e2e | 63 | py | Python | training_tools/architectures/image_generation/__init__.py | kylrth/training_tools | eccb19a28f65a83e40642c9761ccb1dd090a3e5d | [
"MIT"
] | null | null | null | training_tools/architectures/image_generation/__init__.py | kylrth/training_tools | eccb19a28f65a83e40642c9761ccb1dd090a3e5d | [
"MIT"
] | null | null | null | training_tools/architectures/image_generation/__init__.py | kylrth/training_tools | eccb19a28f65a83e40642c9761ccb1dd090a3e5d | [
"MIT"
] | null | null | null | """Image generating architectures.
Kyle Roth. 2019-07-10.
"""
| 12.6 | 34 | 0.698413 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.984127 |
eeddefbcddacdcd31162977b74fe0703603b2f9f | 2,668 | py | Python | adverse/urls.py | michael-xander/communique-webapp | 85b450d7f6d0313c5e5ef53a262a850b7e93c3d6 | [
"MIT"
] | null | null | null | adverse/urls.py | michael-xander/communique-webapp | 85b450d7f6d0313c5e5ef53a262a850b7e93c3d6 | [
"MIT"
] | null | null | null | adverse/urls.py | michael-xander/communique-webapp | 85b450d7f6d0313c5e5ef53a262a850b7e93c3d6 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from .views import (EmergencyContactCreateView, EmergencyContactUpdateView, EmergencyContactDeleteView,
EmergencyContactDetailView, EmergencyContactListView, AdverseEventTypeUpdateView,
AdverseEventTypeCreateView, AdverseEventTypeDeleteView, Adve... | 86.064516 | 172 | 0.725262 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,108 | 0.415292 |
eedf4a520738f711e0b9af209fc2128b16e46db5 | 1,133 | py | Python | qbflask/models.py | kevindkeogh/qbootstrapper-flask | 490906837d6522e3669193e5097bd33e1f953451 | [
"MIT"
] | 1 | 2017-04-27T08:59:01.000Z | 2017-04-27T08:59:01.000Z | qbflask/models.py | kevindkeogh/qbootstrapper-flask | 490906837d6522e3669193e5097bd33e1f953451 | [
"MIT"
] | null | null | null | qbflask/models.py | kevindkeogh/qbootstrapper-flask | 490906837d6522e3669193e5097bd33e1f953451 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
'''Handles all database interactions for qbootstrapper
'''
from flask import g
from qbflask import app
import sqlite3
def connect_db():
'''Connects to the database and returns the connection
'''
conn = sqlite3.connect(app.config['DATABASE'])
conn.row_factory = sqlite3.Row
retur... | 21.788462 | 79 | 0.655781 | 0 | 0 | 0 | 0 | 362 | 0.319506 | 0 | 0 | 553 | 0.488085 |
eee0e160c355877e9ab99acba82ef48b402d10db | 2,795 | py | Python | termlog/interpret.py | brianbruggeman/termlog | 361883f790ab6fae158095585370672e3ca8e354 | [
"MIT"
] | 1 | 2019-11-22T09:32:25.000Z | 2019-11-22T09:32:25.000Z | termlog/interpret.py | brianbruggeman/termlog | 361883f790ab6fae158095585370672e3ca8e354 | [
"MIT"
] | null | null | null | termlog/interpret.py | brianbruggeman/termlog | 361883f790ab6fae158095585370672e3ca8e354 | [
"MIT"
] | null | null | null | """Interprets each AST node"""
import ast
import textwrap
from typing import Any, Dict, List
def extract_fields(code: str) -> Dict[str, Any]:
"""Extracts data from code block searching for variables
Args:
code: the code block to parse
"""
# Parsing expects that the code have no indentation
... | 34.9375 | 132 | 0.544544 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 691 | 0.247227 |
eee2473186eac206c8388e1f0a6f771a7776dd49 | 4,757 | py | Python | python3/koans/about_strings.py | PatrickBoynton/python_koans | 12243005b6ca5145a3989eadc42d1cca122fe9a6 | [
"MIT"
] | null | null | null | python3/koans/about_strings.py | PatrickBoynton/python_koans | 12243005b6ca5145a3989eadc42d1cca122fe9a6 | [
"MIT"
] | null | null | null | python3/koans/about_strings.py | PatrickBoynton/python_koans | 12243005b6ca5145a3989eadc42d1cca122fe9a6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from runner.koan import *
class AboutStrings(Koan):
def test_double_quoted_strings_are_strings(self):
string = "Hello, world."
# self.assertEqual(__, isinstance(string, str))
# Returns true, because string and str are the same type.
s... | 36.875969 | 81 | 0.644103 | 4,681 | 0.984024 | 0 | 0 | 0 | 0 | 0 | 0 | 1,905 | 0.400462 |
eee41fee815cbfd9d791866ac61cc5f679e6a33c | 630 | py | Python | acmicpc/2798/2798.py | love-adela/algorithm | 4ccd02173c96f8369962f1fd4e5166a221690fa2 | [
"MIT"
] | 3 | 2019-03-09T05:19:23.000Z | 2019-04-06T09:26:36.000Z | acmicpc/2798/2798.py | love-adela/algorithm | 4ccd02173c96f8369962f1fd4e5166a221690fa2 | [
"MIT"
] | 1 | 2020-02-23T10:38:04.000Z | 2020-02-23T10:38:04.000Z | acmicpc/2798/2798.py | love-adela/algorithm | 4ccd02173c96f8369962f1fd4e5166a221690fa2 | [
"MIT"
] | 1 | 2019-05-22T13:47:53.000Z | 2019-05-22T13:47:53.000Z | params = [int(x) for x in input().split()]
point = params[-1]
card_numbers = sorted([int(i) for i in input().split()])
max_sum = 0
for i in range(len(card_numbers)):
for j in range(i+1, len(card_numbers)):
for k in range(j+1, len(card_numbers)):
if card_numbers[i] + card_numbers[j] + card_numbe... | 39.375 | 96 | 0.603175 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eee600143ae9d2506a33cc7fd8cd95666e09cf2a | 453 | py | Python | 2/2.py | pyl/AdventOfCode | 575a8ba2eb6bd597201986444a799a4384ac3983 | [
"MIT"
] | null | null | null | 2/2.py | pyl/AdventOfCode | 575a8ba2eb6bd597201986444a799a4384ac3983 | [
"MIT"
] | null | null | null | 2/2.py | pyl/AdventOfCode | 575a8ba2eb6bd597201986444a799a4384ac3983 | [
"MIT"
] | null | null | null | import os
import re
# from .m.red import readInput
data = open("2\\input.txt").read().split('\n')
parsedData = []
for x in data:
parsedData.append(list(filter(None, re.split("[- :]", x))))
parsedData.pop()
count = 0
for x in parsedData:
print(x)
if(x[3][int(x[0])-1] != x[3][int(x[1])-1]
and (... | 15.62069 | 63 | 0.527594 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.143488 |
eee70444919e0996101bd470d17bbcdf1da08d3b | 284 | py | Python | python/multi-2.6/simple.py | trammell/test | ccac5e1dac947032e64d813e53cb961417a58d05 | [
"Artistic-2.0"
] | null | null | null | python/multi-2.6/simple.py | trammell/test | ccac5e1dac947032e64d813e53cb961417a58d05 | [
"Artistic-2.0"
] | null | null | null | python/multi-2.6/simple.py | trammell/test | ccac5e1dac947032e64d813e53cb961417a58d05 | [
"Artistic-2.0"
] | null | null | null | #!/usr/bin/env python2.4
"""
"""
class MyClass(object):
def __init__(self, a, b):
print 'MyClass.__init__', a, b
#super(MyClass, self).__init__(a, b) # works in 2.4
super(MyClass, self).__init__() # works in 2.6
obj = MyClass(6, 7)
| 18.933333 | 66 | 0.542254 | 226 | 0.795775 | 0 | 0 | 0 | 0 | 0 | 0 | 121 | 0.426056 |
eee72143266c2f7d061e2031c509c2b48483a480 | 1,183 | py | Python | dd3/visitor/views.py | za/dd3 | b70d795fb3bd3ff805696b632beabf6d1f342389 | [
"Apache-2.0"
] | null | null | null | dd3/visitor/views.py | za/dd3 | b70d795fb3bd3ff805696b632beabf6d1f342389 | [
"Apache-2.0"
] | null | null | null | dd3/visitor/views.py | za/dd3 | b70d795fb3bd3ff805696b632beabf6d1f342389 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.http import JsonResponse
from django.db import connections
from django.db.models import Count
from django.contrib import admin
from visitor.models import Apache
import json
admin.site.register(Apache)
# Create your views here.
def text(request):
apachelogs_list = Ap... | 26.886364 | 55 | 0.718512 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 243 | 0.20541 |
eee85fe54b0a7025f321a3dcd3adecc8d263a047 | 2,451 | py | Python | 02_test_and_prototype/CBH file subset tests.py | pnorton-usgs/notebooks | 17a38ecd3f3c052b9bd785c2e53e16a9082d1e71 | [
"MIT"
] | null | null | null | 02_test_and_prototype/CBH file subset tests.py | pnorton-usgs/notebooks | 17a38ecd3f3c052b9bd785c2e53e16a9082d1e71 | [
"MIT"
] | null | null | null | 02_test_and_prototype/CBH file subset tests.py | pnorton-usgs/notebooks | 17a38ecd3f3c052b9bd785c2e53e16a9082d1e71 | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.13.7
# kernelspec:
# display_name: Python 2
# language: python
# name: python2
# ---
# %%
import pandas a... | 22.694444 | 88 | 0.575275 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,265 | 0.516116 |
eee96c8768d0bd73bfcc0b80259c717f22d6398d | 655 | py | Python | tests/test_time_compare.py | ludwiglierhammer/pyhomogenize | 339cd823b0e8ce618f1b2e42a69c20fb92ca7485 | [
"MIT"
] | null | null | null | tests/test_time_compare.py | ludwiglierhammer/pyhomogenize | 339cd823b0e8ce618f1b2e42a69c20fb92ca7485 | [
"MIT"
] | null | null | null | tests/test_time_compare.py | ludwiglierhammer/pyhomogenize | 339cd823b0e8ce618f1b2e42a69c20fb92ca7485 | [
"MIT"
] | null | null | null |
import pytest
import pyhomogenize as pyh
from . import has_dask, requires_dask
from . import has_xarray, requires_xarray
from . import has_numpy, requires_numpy
def test_time_compare():
netcdffile1 = pyh.test_netcdf[0]
netcdffile2 = pyh.test_netcdf[2]
time_control1 = pyh.time_control(netcdffile1)
ti... | 34.473684 | 107 | 0.79084 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.01374 |
eee9f9f542f197693a4587a809d1d13007ab6153 | 8,391 | py | Python | features/steps/zz_08_materials_steps.py | tewarfel/RayTracerChallenge_1 | 736cc5d159c267c9bcc14d42abb03eedc2f7e5f1 | [
"MIT"
] | 2 | 2020-05-13T20:54:50.000Z | 2021-06-06T03:37:41.000Z | features/steps/zz_08_materials_steps.py | tewarfel/RayTracerChallenge_1 | 736cc5d159c267c9bcc14d42abb03eedc2f7e5f1 | [
"MIT"
] | null | null | null | features/steps/zz_08_materials_steps.py | tewarfel/RayTracerChallenge_1 | 736cc5d159c267c9bcc14d42abb03eedc2f7e5f1 | [
"MIT"
] | null | null | null | from behave import *
from hamcrest import assert_that, equal_to
from vec3 import Vec3, vec3
from vec4 import Vec4, point, vector
from base import equal, normalize, transform, ray, lighting
import numpy as np
from shape import material, sphere, test_shape, normal_at, set_transform, intersect, glass_sphere, point_light
f... | 45.603261 | 196 | 0.725539 | 0 | 0 | 0 | 0 | 6,870 | 0.81543 | 0 | 0 | 1,680 | 0.199407 |
eeea795546b0f95cf627707162e00a3f25d014a4 | 2,073 | py | Python | wordfrequencies/wordfrequencies.py | chrisshiels/life | f6902ef656e0171c07eec3eb9343a275048ab849 | [
"MIT"
] | null | null | null | wordfrequencies/wordfrequencies.py | chrisshiels/life | f6902ef656e0171c07eec3eb9343a275048ab849 | [
"MIT"
] | null | null | null | wordfrequencies/wordfrequencies.py | chrisshiels/life | f6902ef656e0171c07eec3eb9343a275048ab849 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# 'wordfrequencies.py'.
# Chris Shiels.
import re
import sys
def pipemaybe(l):
def internal(v):
return reduce(lambda a, e: e(a) if a is not None else None, l, v)
return internal
def partial(f, *args):
args1 = args
def internal(*args):
return f(*(args1 + args))
return inter... | 19.556604 | 78 | 0.545586 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 185 | 0.089243 |
eeea7ce35f96919784a10c51746fa125d0fb04fb | 741 | py | Python | data/thread_generator.py | beesk135/ReID-Survey | d1467c0ce5d3ca78640196360a05df9ff9f9f42a | [
"MIT"
] | null | null | null | data/thread_generator.py | beesk135/ReID-Survey | d1467c0ce5d3ca78640196360a05df9ff9f9f42a | [
"MIT"
] | null | null | null | data/thread_generator.py | beesk135/ReID-Survey | d1467c0ce5d3ca78640196360a05df9ff9f9f42a | [
"MIT"
] | null | null | null | import threading
import time
import numpy as np
from collections import deque
class ThreadGenerator(threading.Thread):
def __init__(self, generator, max_queue_size=10):
threading.Thread.__init__(self)
self.generator = ThreadGenerator
self.buffer = deque(maxlen=max_queue_size)
self.m... | 29.64 | 55 | 0.62753 | 661 | 0.892038 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eeecbdae984ff942e14cb18d12ef5612889a5ac7 | 81 | py | Python | pbs/apps.py | AliTATLICI/django-rest-app | 901e1d50fe4c8732dccdb597d6cad6e099a2dbfa | [
"MIT"
] | null | null | null | pbs/apps.py | AliTATLICI/django-rest-app | 901e1d50fe4c8732dccdb597d6cad6e099a2dbfa | [
"MIT"
] | null | null | null | pbs/apps.py | AliTATLICI/django-rest-app | 901e1d50fe4c8732dccdb597d6cad6e099a2dbfa | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class PbsConfig(AppConfig):
name = 'pbs'
| 13.5 | 33 | 0.728395 | 44 | 0.54321 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.061728 |
eeee2179bf362d1c71b12b2f474e4d3a6d80e573 | 1,544 | py | Python | spug/data_pipeline/sources/stock.py | syeehyn/spug | 216976e0171bbc14042377fbbb535180bd2efaf3 | [
"Apache-2.0"
] | null | null | null | spug/data_pipeline/sources/stock.py | syeehyn/spug | 216976e0171bbc14042377fbbb535180bd2efaf3 | [
"Apache-2.0"
] | null | null | null | spug/data_pipeline/sources/stock.py | syeehyn/spug | 216976e0171bbc14042377fbbb535180bd2efaf3 | [
"Apache-2.0"
] | 1 | 2021-12-05T22:54:28.000Z | 2021-12-05T22:54:28.000Z | """
fetch historical stocks prices
"""
from tqdm import tqdm
import pandas as pd
import pandas_datareader as pdr
from .base import DataFetcher
def get_stock_price(symbol, start, end):
"""get stock price of a company over a time range
Args:
symbol (str): ticker symbol of a stock
start (datetime... | 31.510204 | 87 | 0.613342 | 802 | 0.51943 | 0 | 0 | 0 | 0 | 0 | 0 | 705 | 0.456606 |
eeee6f4fc03992c011356b8190353e8fc67ab368 | 809 | py | Python | parser/team07/Proyecto/clasesAbstractas/expresion.py | susanliss/tytus | a613a2352cf4a1d0e90ce27bb346ab60ed8039cc | [
"MIT"
] | null | null | null | parser/team07/Proyecto/clasesAbstractas/expresion.py | susanliss/tytus | a613a2352cf4a1d0e90ce27bb346ab60ed8039cc | [
"MIT"
] | null | null | null | parser/team07/Proyecto/clasesAbstractas/expresion.py | susanliss/tytus | a613a2352cf4a1d0e90ce27bb346ab60ed8039cc | [
"MIT"
] | null | null | null | from .instruccionAbstracta import InstruccionAbstracta
class Expresion(InstruccionAbstracta):
def __init__(self):
pass
def valorPrimitivo(self,valor,tipo):
self.valor = valor
self.tipoOperacion = tipo
self.opIzquierdo = None
self.opDerecho = None
def ope... | 23.794118 | 67 | 0.651422 | 746 | 0.922126 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eeef030e3640987cf35e25ed5365b60fde947fe0 | 2,963 | py | Python | src/gluonts/nursery/tsbench/src/tsbench/evaluations/metrics/performance.py | RingoIngo/gluon-ts | 62fb20c36025fc969653accaffaa783671709564 | [
"Apache-2.0"
] | 1 | 2022-03-28T01:17:00.000Z | 2022-03-28T01:17:00.000Z | src/gluonts/nursery/tsbench/src/tsbench/evaluations/metrics/performance.py | RingoIngo/gluon-ts | 62fb20c36025fc969653accaffaa783671709564 | [
"Apache-2.0"
] | null | null | null | src/gluonts/nursery/tsbench/src/tsbench/evaluations/metrics/performance.py | RingoIngo/gluon-ts | 62fb20c36025fc969653accaffaa783671709564 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | 31.521277 | 98 | 0.59433 | 2,195 | 0.740803 | 0 | 0 | 2,206 | 0.744516 | 0 | 0 | 1,167 | 0.393858 |
eef0f0b4303286161e71367939209bbe2bdf9cf9 | 1,940 | py | Python | Scripts/simulation/postures/posture_tunables.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/postures/posture_tunables.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/postures/posture_tunables.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | # uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\postures\posture_tunables.py
# Compiled at: 2016-02-19 01:17:07
# Size of source mod 2**32: 2003 byt... | 114.117647 | 1,122 | 0.635052 | 1,409 | 0.726289 | 0 | 0 | 0 | 0 | 0 | 0 | 1,401 | 0.722165 |
eef0f57e2e52d98324d6736af1814a7fec12251f | 23 | py | Python | Game/History/__init__.py | ritwikd/interom | 0b626351fd742f2a99d0a6d11ba8c1a214aab576 | [
"MIT"
] | null | null | null | Game/History/__init__.py | ritwikd/interom | 0b626351fd742f2a99d0a6d11ba8c1a214aab576 | [
"MIT"
] | 1 | 2021-03-06T22:08:32.000Z | 2021-03-06T22:09:07.000Z | Game/History/__init__.py | ritwikd/interom | 0b626351fd742f2a99d0a6d11ba8c1a214aab576 | [
"MIT"
] | 1 | 2021-03-03T22:48:07.000Z | 2021-03-03T22:48:07.000Z | from . import Log, Move | 23 | 23 | 0.73913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eef278f2f4e2c217a17b9bdf16a63771a1fe90a6 | 107 | py | Python | Guitarist.py | Stanels42/pythonic-garage-band | 7dfdec84073720998368cc2042bed011244c88ae | [
"MIT"
] | 1 | 2021-10-01T09:48:42.000Z | 2021-10-01T09:48:42.000Z | Guitarist.py | Stanels42/pythonic-garage-band | 7dfdec84073720998368cc2042bed011244c88ae | [
"MIT"
] | 1 | 2019-12-06T04:22:11.000Z | 2019-12-06T04:22:11.000Z | Guitarist.py | Stanels42/pythonic-garage-band | 7dfdec84073720998368cc2042bed011244c88ae | [
"MIT"
] | 1 | 2019-12-06T19:39:55.000Z | 2019-12-06T19:39:55.000Z | from Musician import Musician
class Guitarist(Musician):
solo = 'Guitar Sounds'
instrument = 'Guitar'
| 17.833333 | 29 | 0.747664 | 75 | 0.700935 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.214953 |
eef62d1ce6768e7a68a4a1159bbd33491dcbc7e8 | 6,126 | py | Python | tests/objects/fiber_manipulation_test.py | jifengting1/fastpliFork | 1ef7e2d268e03e21ded9390fc005b9fff2e0a3c1 | [
"MIT"
] | null | null | null | tests/objects/fiber_manipulation_test.py | jifengting1/fastpliFork | 1ef7e2d268e03e21ded9390fc005b9fff2e0a3c1 | [
"MIT"
] | null | null | null | tests/objects/fiber_manipulation_test.py | jifengting1/fastpliFork | 1ef7e2d268e03e21ded9390fc005b9fff2e0a3c1 | [
"MIT"
] | null | null | null | import unittest
import numpy as np
import fastpli.objects
import fastpli.tools
class MainTest(unittest.TestCase):
# TODO: implement object.fiber.*manipulations*
def setUp(self):
self.fiber = np.array([[0, 0, 0, 1], [1, 1, 1, 2]], dtype=float)
self.fiber_bundle = [self.fiber.copy()]
s... | 42.839161 | 79 | 0.538851 | 5,994 | 0.978452 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.01159 |
eef6f9b0de74e501a4d4981b8350d4bf8e08d58a | 4,403 | py | Python | kerascv/layers/matchers/argmax_matcher.py | tanzhenyu/keras-cv | b7208ee25735c492ccc171874e34076111dcf637 | [
"Apache-2.0"
] | null | null | null | kerascv/layers/matchers/argmax_matcher.py | tanzhenyu/keras-cv | b7208ee25735c492ccc171874e34076111dcf637 | [
"Apache-2.0"
] | null | null | null | kerascv/layers/matchers/argmax_matcher.py | tanzhenyu/keras-cv | b7208ee25735c492ccc171874e34076111dcf637 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
from kerascv.layers.iou_similarity import IOUSimilarity
iou_layer = IOUSimilarity()
class ArgMaxMatcher(tf.keras.layers.Layer):
"""ArgMax matcher"""
# [pos, neutral, neg]
def __init__(self, matched_threshold, unmatched_threshold):
self.matched_threshold = matched_threshol... | 39.666667 | 87 | 0.661821 | 2,782 | 0.631842 | 0 | 0 | 1,507 | 0.342267 | 0 | 0 | 384 | 0.087213 |
eef840e020a73705ee971a6562f13c86679b8ac7 | 538 | py | Python | Atv1-Distribuida/servidorBackup.py | rodolfotr/Computacao_Distribuida | 1d9db06ef4ab7290a6ce9666b5cb83987cc74e9d | [
"MIT"
] | null | null | null | Atv1-Distribuida/servidorBackup.py | rodolfotr/Computacao_Distribuida | 1d9db06ef4ab7290a6ce9666b5cb83987cc74e9d | [
"MIT"
] | null | null | null | Atv1-Distribuida/servidorBackup.py | rodolfotr/Computacao_Distribuida | 1d9db06ef4ab7290a6ce9666b5cb83987cc74e9d | [
"MIT"
] | null | null | null | import socket
import struct
IP_BACKUP = '127.0.0.1'
PORTA_BACKUP = 5000
ARQUIVO_BACKUP = "/home/aluno-uffs/Documentos/Trab_Final/Atv1-Distribuida/cliente_BACKUP.c"
#Recebe o arquivo.
sockReceber = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
sockReceber.setsockopt(socket.SOL_SOCKET, socket.SO_... | 25.619048 | 91 | 0.734201 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.198885 |
eef8835ed3e8db9f839217b35bfd1e4b67953a9b | 634 | py | Python | examples/example_regression.py | QuantLet/localpoly | 7db50e3fb2caf39af8f9db1f2108fd1a81fc51bc | [
"MIT"
] | 1 | 2021-04-28T09:39:53.000Z | 2021-04-28T09:39:53.000Z | examples/example_regression.py | QuantLet/localpoly | 7db50e3fb2caf39af8f9db1f2108fd1a81fc51bc | [
"MIT"
] | null | null | null | examples/example_regression.py | QuantLet/localpoly | 7db50e3fb2caf39af8f9db1f2108fd1a81fc51bc | [
"MIT"
] | 1 | 2021-05-11T19:06:17.000Z | 2021-05-11T19:06:17.000Z | import numpy as np
from matplotlib import pyplot as plt
from localpoly.base import LocalPolynomialRegression
# simulate data
np.random.seed(1)
X = np.linspace(-np.pi, np.pi, num=150)
y_real = np.sin(X)
y = np.random.normal(0, 0.3, len(X)) + y_real
# local polynomial regression
model = LocalPolynomialRegression(X=X, ... | 27.565217 | 86 | 0.706625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.15142 |
eefc2e95d04d1e10619a3cb3fe8a472e3a76f13a | 690 | py | Python | mint/modules/activations.py | remicongee/Mint | 0f2db9b4216d8e61ec6b6892fd5baf962847581c | [
"MIT"
] | null | null | null | mint/modules/activations.py | remicongee/Mint | 0f2db9b4216d8e61ec6b6892fd5baf962847581c | [
"MIT"
] | null | null | null | mint/modules/activations.py | remicongee/Mint | 0f2db9b4216d8e61ec6b6892fd5baf962847581c | [
"MIT"
] | 1 | 2020-12-02T09:02:55.000Z | 2020-12-02T09:02:55.000Z | ## Activation functions
from .module import Module
from ..utils import functional as F
class ReLU(Module):
def __init__(self, in_place=False):
super(ReLU, self).__init__()
self.in_place = in_place
self.init_buffer()
def init_buffer(self):
self.buffer['activated'] = None
... | 21.5625 | 49 | 0.592754 | 602 | 0.872464 | 0 | 0 | 0 | 0 | 0 | 0 | 89 | 0.128986 |
eefc3d409d2d8b66094f301c43a67fdc4a9f6792 | 2,829 | py | Python | utils/phase0/state_transition.py | hwwhww/eth2.0-specs | 729757d4279db4535b176361d67d1567c0df314b | [
"CC0-1.0"
] | 3 | 2020-07-22T14:51:07.000Z | 2022-01-02T12:02:45.000Z | utils/phase0/state_transition.py | hwwhww/eth2.0-specs | 729757d4279db4535b176361d67d1567c0df314b | [
"CC0-1.0"
] | null | null | null | utils/phase0/state_transition.py | hwwhww/eth2.0-specs | 729757d4279db4535b176361d67d1567c0df314b | [
"CC0-1.0"
] | null | null | null | from . import spec
from typing import ( # noqa: F401
Any,
Callable,
List,
NewType,
Tuple,
)
from .spec import (
BeaconState,
BeaconBlock,
)
def process_transaction_type(state: BeaconState,
transactions: List[Any],
max_transactio... | 28.009901 | 80 | 0.653588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.004242 |
eefc51b8229cb41587ef71a58d9e82472148716d | 1,419 | py | Python | greatbigcrane/buildout_manage/recipes/mercurial.py | pnomolos/greatbigcrane | db0763706e1e8ca1f2bd769aa79c99681f1a967e | [
"Apache-2.0"
] | 3 | 2015-11-19T21:35:22.000Z | 2016-07-17T18:07:07.000Z | greatbigcrane/buildout_manage/recipes/mercurial.py | pnomolos/greatbigcrane | db0763706e1e8ca1f2bd769aa79c99681f1a967e | [
"Apache-2.0"
] | null | null | null | greatbigcrane/buildout_manage/recipes/mercurial.py | pnomolos/greatbigcrane | db0763706e1e8ca1f2bd769aa79c99681f1a967e | [
"Apache-2.0"
] | null | null | null | """
Copyright 2010 Jason Chu, Dusty Phillips, and Phil Schalm
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 agre... | 33 | 72 | 0.725863 | 631 | 0.444679 | 0 | 0 | 0 | 0 | 0 | 0 | 672 | 0.473573 |
eefdcd3ea1af6682c969002f242acba638c23ea1 | 799 | py | Python | e2e/codebuild/results_comment.py | hixio-mh/taskcat | a5d23a4b05592250c2ec0304d77571675628b00d | [
"Apache-2.0"
] | 920 | 2016-12-03T01:41:25.000Z | 2021-11-04T13:52:21.000Z | e2e/codebuild/results_comment.py | hixio-mh/taskcat | a5d23a4b05592250c2ec0304d77571675628b00d | [
"Apache-2.0"
] | 544 | 2017-02-23T22:41:25.000Z | 2021-11-03T23:02:25.000Z | e2e/codebuild/results_comment.py | hixio-mh/taskcat | a5d23a4b05592250c2ec0304d77571675628b00d | [
"Apache-2.0"
] | 225 | 2016-12-11T13:36:21.000Z | 2021-11-04T14:43:53.000Z | import os
import sys
import boto3
from github import Github
SSM_CLIENT = boto3.client("ssm")
GITHUB_REPO_NAME = os.environ.get("GITHUB_REPO_NAME", "")
PR_NUMBER = os.environ.get("PR_NUMBER", "")
FAILED = bool(int(sys.argv[2]))
GITHUB_TOKEN = os.environ.get("GITHUB_TOKEN", "")
if __name__ == "__main__":
repo =... | 30.730769 | 84 | 0.653317 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 202 | 0.252816 |
eefe78a5c5393bb02f57187df46d42fbd870dd68 | 2,460 | py | Python | openghg/client/_search.py | openghg/openghg | 9a05dd6fe3cee6123898b8f390cfaded08dbb408 | [
"Apache-2.0"
] | 5 | 2021-03-02T09:04:07.000Z | 2022-01-25T09:58:16.000Z | openghg/client/_search.py | openghg/openghg | 9a05dd6fe3cee6123898b8f390cfaded08dbb408 | [
"Apache-2.0"
] | 229 | 2020-09-30T15:08:39.000Z | 2022-03-31T14:23:55.000Z | openghg/client/_search.py | openghg/openghg | 9a05dd6fe3cee6123898b8f390cfaded08dbb408 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from typing import TYPE_CHECKING, Dict, List, Optional, Union
from Acquire.Client import Wallet
if TYPE_CHECKING:
from openghg.dataobjects import SearchResults
__all__ = ["Search"]
class Search:
def __init__(self, service_url: Optional[str] = None):
if service_url... | 29.638554 | 96 | 0.597561 | 2,234 | 0.90813 | 0 | 0 | 0 | 0 | 0 | 0 | 634 | 0.257724 |
e1003c20209106cf6d3e01c2eabbb6012b595686 | 1,524 | py | Python | ikats/client/opentsdb_stub.py | IKATS/ikats_api | 86f965e9ea83fde1fb64f187b294d383d267f77f | [
"Apache-2.0"
] | null | null | null | ikats/client/opentsdb_stub.py | IKATS/ikats_api | 86f965e9ea83fde1fb64f187b294d383d267f77f | [
"Apache-2.0"
] | null | null | null | ikats/client/opentsdb_stub.py | IKATS/ikats_api | 86f965e9ea83fde1fb64f187b294d383d267f77f | [
"Apache-2.0"
] | 1 | 2020-01-27T14:44:27.000Z | 2020-01-27T14:44:27.000Z | # -*- coding: utf-8 -*-
"""
Copyright 2019 CS Systèmes d'Information
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... | 27.709091 | 81 | 0.694226 | 848 | 0.556066 | 0 | 0 | 0 | 0 | 0 | 0 | 722 | 0.473443 |
e101989a4d6808941cf59d0b6ca5c8dec9a09fac | 4,467 | py | Python | models/seeding/base.py | Sanzeed/balanced_influence_maximization | 0797b8a8f536cac8023e128ab13eb532f902bcad | [
"MIT"
] | 4 | 2021-06-03T02:53:46.000Z | 2022-01-25T07:07:08.000Z | models/seeding/base.py | Sanzeed/balanced_influence_maximization | 0797b8a8f536cac8023e128ab13eb532f902bcad | [
"MIT"
] | null | null | null | models/seeding/base.py | Sanzeed/balanced_influence_maximization | 0797b8a8f536cac8023e128ab13eb532f902bcad | [
"MIT"
] | 1 | 2021-06-17T02:17:22.000Z | 2021-06-17T02:17:22.000Z | import numpy as np
from scipy.stats import bernoulli
import heapq
class DiffusionModel:
def __init__(self, graph, majority, get_diffusion_probability, num_rels):
self.graph = graph
self.majority = majority
nodes = sorted(self.graph.nodes())
self.node_index_map = {nodes[i] :... | 44.227723 | 120 | 0.591896 | 4,397 | 0.98433 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.025297 |
e102bdd6852dce95483c7c8cdb3211b3d9ab7231 | 43 | py | Python | run_5395.py | mpi3d/goodix-fp-dump | 039940845bd5eeb98cd92d72f267e3be77feb156 | [
"MIT"
] | 136 | 2021-05-05T14:16:17.000Z | 2022-03-31T09:04:18.000Z | run_5395.py | tsunekotakimoto/goodix-fp-dump | b88ecbababd3766314521fe30ee943c4bd1810df | [
"MIT"
] | 14 | 2021-08-20T09:49:39.000Z | 2022-03-20T13:18:05.000Z | run_5395.py | tsunekotakimoto/goodix-fp-dump | b88ecbababd3766314521fe30ee943c4bd1810df | [
"MIT"
] | 11 | 2021-08-02T15:49:11.000Z | 2022-02-06T22:06:42.000Z | from driver_53x5 import main
main(0x5395)
| 10.75 | 28 | 0.813953 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e10338cc76f582f3f2a03b933dc6086137bca50f | 7,104 | py | Python | v2ray/com/core/proxy/vmess/inbound/config_pb2.py | xieruan/v2bp | 350b2f80d3a06494ed4092945804c1c851fdf1db | [
"MIT"
] | 7 | 2020-06-24T07:15:15.000Z | 2022-03-08T16:36:09.000Z | v2ray/com/core/proxy/vmess/inbound/config_pb2.py | xieruan/vp | 350b2f80d3a06494ed4092945804c1c851fdf1db | [
"MIT"
] | null | null | null | v2ray/com/core/proxy/vmess/inbound/config_pb2.py | xieruan/vp | 350b2f80d3a06494ed4092945804c1c851fdf1db | [
"MIT"
] | 6 | 2020-07-06T06:51:20.000Z | 2021-03-23T06:26:36.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: v2ray.com/core/proxy/vmess/inbound/config.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf i... | 39.248619 | 757 | 0.758164 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,320 | 0.326577 |
e103652358a900837a67abd9fbc1244e03d12a88 | 2,631 | py | Python | RedditReader/redditReader.py | Semicolon42/PythonProjects | eb6ec5d13594013a2703af43eb0d1c29406faaad | [
"Apache-2.0"
] | null | null | null | RedditReader/redditReader.py | Semicolon42/PythonProjects | eb6ec5d13594013a2703af43eb0d1c29406faaad | [
"Apache-2.0"
] | null | null | null | RedditReader/redditReader.py | Semicolon42/PythonProjects | eb6ec5d13594013a2703af43eb0d1c29406faaad | [
"Apache-2.0"
] | null | null | null | import logging
import csv
import time
from bs4 import BeautifulSoup
import requests
logging.basicConfig(
format='%(asctime)s %(levelname)s:%(message)s',
level=logging.INFO)
class Crawler:
def __init__(self, urls=[]):
self.visited_urls = []
self.urls_to_visit = urls
def download_url... | 30.241379 | 79 | 0.542379 | 2,267 | 0.86165 | 0 | 0 | 0 | 0 | 0 | 0 | 477 | 0.1813 |
e10557e7b3374a814dff92034c545370c1354b22 | 2,605 | py | Python | asteroid/repl.py | asteroid-lang/asteroid | 537c60dd639e4f83fdefff4d36e1d63c3b4139a4 | [
"MIT"
] | 2 | 2022-02-09T20:33:05.000Z | 2022-02-09T20:33:08.000Z | asteroid/repl.py | asteroid-lang/asteroid | 537c60dd639e4f83fdefff4d36e1d63c3b4139a4 | [
"MIT"
] | 40 | 2022-01-22T02:29:51.000Z | 2022-03-31T14:45:31.000Z | asteroid/repl.py | asteroid-lang/asteroid | 537c60dd639e4f83fdefff4d36e1d63c3b4139a4 | [
"MIT"
] | 2 | 2022-01-20T18:20:11.000Z | 2022-02-12T22:35:22.000Z | from asteroid.interp import interp
from asteroid.version import VERSION
from asteroid.state import state
from asteroid.globals import ExpectationError
from asteroid.walk import function_return_value
from asteroid.support import term2string
from sys import stdin
import readline
def repl():
state.initialize()
p... | 26.581633 | 83 | 0.554702 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 746 | 0.286372 |
e106417c74eb34df2f46cb1cc4d7afaf1c61501e | 1,762 | py | Python | apis/file_state.py | brockpalen/ltfsee-globus | 5cb322ef09cd4f883951de96e5cb242f876ccd9c | [
"MIT"
] | null | null | null | apis/file_state.py | brockpalen/ltfsee-globus | 5cb322ef09cd4f883951de96e5cb242f876ccd9c | [
"MIT"
] | null | null | null | apis/file_state.py | brockpalen/ltfsee-globus | 5cb322ef09cd4f883951de96e5cb242f876ccd9c | [
"MIT"
] | null | null | null | """API for eeadm file state."""
from http import HTTPStatus
from flask import request
from flask_restx import Namespace, Resource, fields
from core.eeadm.file_state import EEADM_File_State
from ltfsee_globus.auth import token_required
api = Namespace(
"file_state", description="Get state of a file in archive eea... | 32.036364 | 100 | 0.713394 | 908 | 0.515323 | 0 | 0 | 934 | 0.530079 | 0 | 0 | 774 | 0.439274 |
e1068254019048e1b19e7e8d94638f8a3b8808de | 1,350 | py | Python | src/helpers/fix_test_data_for_roc.py | Iretha/IoT23-network-traffic-anomalies-classification | 93c157589e8128e8d9d5091d93052b18cd3ac35d | [
"MIT"
] | 9 | 2021-04-07T18:16:54.000Z | 2021-12-08T16:49:03.000Z | src/helpers/fix_test_data_for_roc.py | Iretha/IoT-23-anomaly-detection | 93c157589e8128e8d9d5091d93052b18cd3ac35d | [
"MIT"
] | 2 | 2021-09-02T03:52:03.000Z | 2021-11-15T11:32:55.000Z | src/helpers/fix_test_data_for_roc.py | Iretha/IoT23-network-traffic-anomalies-classification | 93c157589e8128e8d9d5091d93052b18cd3ac35d | [
"MIT"
] | null | null | null | from numpy import sort
from src.helpers.dataframe_helper import df_get, write_to_csv
def add_missing_class_rows_to_test_data(train_data_path, test_data_path):
__add_missing_classes(train_data_path, test_data_path)
def __add_missing_classes(train_data_path, test_data_path):
if train_data_path is None or test... | 34.615385 | 110 | 0.718519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 175 | 0.12963 |
e106968b5aabed3c4faf9536ea2f316b06ae7ec9 | 7,925 | py | Python | 130_html_to_csv/150_mkcsv_t_info_d.py | takobouzu/BOAT_RACE_DB | f16ed8f55aef567c0ecc6ebd3ad0e917f5c600d8 | [
"MIT"
] | 6 | 2020-12-23T01:06:04.000Z | 2022-01-12T10:18:36.000Z | 130_html_to_csv/150_mkcsv_t_info_d.py | takobouzu/BOAT_RACE_DB | f16ed8f55aef567c0ecc6ebd3ad0e917f5c600d8 | [
"MIT"
] | 15 | 2021-03-02T05:59:24.000Z | 2021-09-12T08:12:38.000Z | 130_html_to_csv/150_mkcsv_t_info_d.py | takobouzu/BOAT_RACE_DB | f16ed8f55aef567c0ecc6ebd3ad0e917f5c600d8 | [
"MIT"
] | 1 | 2021-05-09T10:47:21.000Z | 2021-05-09T10:47:21.000Z | '''
【システム】BOAT_RACE_DB2
【ファイル】140_mkcsv_t_info_d.py
【機能仕様】直前情報HTMLファイルから直前情報明細テーブル「t_info_d」のインポートCSVファイルを作成する
【動作環境】macOS 11.1/Raspbian OS 10.4/python 3.9.1/sqlite3 3.32.3
【来 歴】2021.02.01 ver 1.00
'''
import os
import datetime
from bs4 import BeautifulSoup
#インストールディレクトの定義
BASE_DIR = '/home/pi/BOAT_RACE_DB'
'''
【関 数】... | 48.323171 | 120 | 0.418801 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,520 | 0.277075 |
e1071b566b934eed8eaf574357b76325acbfe989 | 174 | py | Python | python/show_nmc.py | Typas/Data-Assimilation-Project | 4b880c7faadf778d891ffab77ebfbde1db5c5baf | [
"MIT"
] | null | null | null | python/show_nmc.py | Typas/Data-Assimilation-Project | 4b880c7faadf778d891ffab77ebfbde1db5c5baf | [
"MIT"
] | null | null | null | python/show_nmc.py | Typas/Data-Assimilation-Project | 4b880c7faadf778d891ffab77ebfbde1db5c5baf | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import numpy as np
B = np.reshape(np.genfromtxt("data/b_nmc.txt"), (40, 40))
import matplotlib.pyplot as plt
plt.contourf(B)
plt.colorbar()
plt.show()
| 21.75 | 57 | 0.724138 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.218391 |
e10776844de6cd61363f91f2091e32c884366312 | 602 | py | Python | hello.py | QuocTrungTran/cgi-lab | fa79815b0e0ebd3d925e4d30043f2536ef2d9b4f | [
"Apache-2.0"
] | null | null | null | hello.py | QuocTrungTran/cgi-lab | fa79815b0e0ebd3d925e4d30043f2536ef2d9b4f | [
"Apache-2.0"
] | null | null | null | hello.py | QuocTrungTran/cgi-lab | fa79815b0e0ebd3d925e4d30043f2536ef2d9b4f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import os, json
print("Content-type:text/html\r\n\r\n")
print
print("<title>Test CGI</title>")
print("<p>Hello World!</>")
# #Q1
# print(os.environ)
# json_object = json.dumps(dict(os.environ), indent=4)
# #print(json_object)
#Q2
# for param in os.environ.keys():
# if (param=="QUERY_STRING"... | 26.173913 | 67 | 0.593023 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 539 | 0.895349 |
e1088f7eca5eb9b2a0d3d520b6c9dd794d84bb1c | 2,194 | py | Python | onetabtobear.py | vinceblake/saveTabToBear | 4b3a79c06e9130c95fa1f87b30999f2fbfe2e017 | [
"MIT"
] | null | null | null | onetabtobear.py | vinceblake/saveTabToBear | 4b3a79c06e9130c95fa1f87b30999f2fbfe2e017 | [
"MIT"
] | null | null | null | onetabtobear.py | vinceblake/saveTabToBear | 4b3a79c06e9130c95fa1f87b30999f2fbfe2e017 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3
from subprocess import Popen, PIPE
from urllib.parse import quote
import sqlite3, datetime, sys, re
# Global Variables
removeCheckedItems = True # Set to false if you want to keep "completed" to-do items when this is run
bearDbFile = str(sys.argv[3])
oneTabID = str(sys.argv[4])
# Methods
de... | 30.054795 | 115 | 0.639927 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 950 | 0.432999 |
e1093ea692aa40b78e1fe9867c9ec44b0222ae19 | 1,319 | py | Python | defects4cpp/d++.py | HansolChoe/defects4cpp | cb9e3db239c50e6ec38127cec117865f0ee7a5cf | [
"MIT"
] | 10 | 2021-06-23T01:53:19.000Z | 2022-03-31T03:14:01.000Z | defects4cpp/d++.py | HansolChoe/defects4cpp | cb9e3db239c50e6ec38127cec117865f0ee7a5cf | [
"MIT"
] | 34 | 2021-05-27T01:09:04.000Z | 2022-03-28T07:53:35.000Z | defects4cpp/d++.py | HansolChoe/defects4cpp | cb9e3db239c50e6ec38127cec117865f0ee7a5cf | [
"MIT"
] | 6 | 2021-09-03T07:16:56.000Z | 2022-03-29T07:30:35.000Z | import sys
from time import perf_counter
from command import CommandList
from errors import DppArgparseError, DppDockerError, DppError
from message import message
def _handle_cmdline_error(e: DppError):
if isinstance(e, DppArgparseError):
message.stdout_argparse_error(str(e))
elif isinstance(e, DppDo... | 24.425926 | 79 | 0.639121 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 124 | 0.094011 |
e109e7b0486674fec7a7133e0f5ef96b64e2f7e2 | 9,962 | py | Python | wz/ui/choice_grid.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/ui/choice_grid.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/ui/choice_grid.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
ui/choice_grid.py
Last updated: 2021-05-04
Manage the grid for the puil-subject-choice-editor.
=+LICENCE=============================
Copyright 2021 Michael Towers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with ... | 36.490842 | 76 | 0.511443 | 8,540 | 0.857086 | 0 | 0 | 0 | 0 | 0 | 0 | 3,074 | 0.308511 |
e10a689e78f45e04945a350aa7275406f0c3d7c2 | 72 | py | Python | numberstest.py | dreadnaught-ETES/school | 9faa2b6379db8f819872b8597896f5291812c5d6 | [
"CC0-1.0"
] | null | null | null | numberstest.py | dreadnaught-ETES/school | 9faa2b6379db8f819872b8597896f5291812c5d6 | [
"CC0-1.0"
] | null | null | null | numberstest.py | dreadnaught-ETES/school | 9faa2b6379db8f819872b8597896f5291812c5d6 | [
"CC0-1.0"
] | null | null | null | import math
result=(math.pow(3,2)+1)*(math.fmod(16,7))/7
print(result) | 24 | 45 | 0.680556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e10b54355c9e418ed2013419152b910332c40ec9 | 5,585 | py | Python | EPH_CORE_SkyObjectMgr.py | polsterc16/ephem | 70ac6c079c80344b83499b96edaff57fb5881efc | [
"MIT"
] | null | null | null | EPH_CORE_SkyObjectMgr.py | polsterc16/ephem | 70ac6c079c80344b83499b96edaff57fb5881efc | [
"MIT"
] | null | null | null | EPH_CORE_SkyObjectMgr.py | polsterc16/ephem | 70ac6c079c80344b83499b96edaff57fb5881efc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Feb 5 16:25:45 2019
@author: polsterc16
==============================================================================
LICENCE INFORMATION
==============================================================================
This Software uses Code (spg4) provided by "Brandon Rho... | 34.263804 | 78 | 0.476813 | 4,691 | 0.839477 | 0 | 0 | 0 | 0 | 0 | 0 | 2,021 | 0.361668 |
e10cde8f79b9f8a7e8e8be18b130895124b76c09 | 3,370 | py | Python | integration-test-reports/run_reports.py | sutoiku/autostat | b0e6588e587450c4cbdb19a021d847f7571ba466 | [
"MIT"
] | null | null | null | integration-test-reports/run_reports.py | sutoiku/autostat | b0e6588e587450c4cbdb19a021d847f7571ba466 | [
"MIT"
] | 1 | 2022-03-16T19:05:46.000Z | 2022-03-16T19:05:46.000Z | integration-test-reports/run_reports.py | sutoiku/autostat | b0e6588e587450c4cbdb19a021d847f7571ba466 | [
"MIT"
] | 1 | 2021-07-14T19:37:44.000Z | 2021-07-14T19:37:44.000Z | from autostat.run_settings import RunSettings, Backend
from autostat.kernel_search import kernel_search, get_best_kernel_info
from autostat.dataset_adapters import Dataset
from autostat.utils.test_data_loader import load_test_dataset
from html_reports import Report
from markdown import markdown
import matplotlib.py... | 26.124031 | 88 | 0.651929 | 621 | 0.184273 | 0 | 0 | 0 | 0 | 0 | 0 | 743 | 0.220475 |
e10f737d8a704aff53053429254515a89ebf061b | 424 | py | Python | backend/apps/lyusers/urls.py | lybbn/django-vue3-lyadmin | df8ed48971eb3e3da977e1fd0467b1230b56afe4 | [
"MIT"
] | 1 | 2022-03-01T07:20:36.000Z | 2022-03-01T07:20:36.000Z | backend/apps/lyusers/urls.py | lybbn/django-vue3-lyadmin | df8ed48971eb3e3da977e1fd0467b1230b56afe4 | [
"MIT"
] | null | null | null | backend/apps/lyusers/urls.py | lybbn/django-vue3-lyadmin | df8ed48971eb3e3da977e1fd0467b1230b56afe4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@Remark: 用户模块的路由文件
"""
from django.urls import path, re_path
from rest_framework import routers
from apps.lyusers.views import UserManageViewSet
system_url = routers.SimpleRouter()
system_url.register(r'users', UserManageViewSet)
urlpatterns = [
re_path('users/disableuser/(?P<pk>.... | 21.2 | 110 | 0.731132 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.319383 |
e1124f5104c7b2ddd81c1b4c389bcffa152ee3a4 | 44,393 | py | Python | srt_gc_launchGui.py | OrigamiAztec/LaunchGUITesting | e097afb075b313e13550937f450adf6653f88812 | [
"MIT"
] | null | null | null | srt_gc_launchGui.py | OrigamiAztec/LaunchGUITesting | e097afb075b313e13550937f450adf6653f88812 | [
"MIT"
] | null | null | null | srt_gc_launchGui.py | OrigamiAztec/LaunchGUITesting | e097afb075b313e13550937f450adf6653f88812 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Texas A&M University Sounding Rocketry Team
SRT-6 | 2018-2019
SRT-9 | 2021-2022
%-------------------------------------------------------------%
TAMU SRT
_____ __ _____ __ __
/ ___/______ __ _____ ___/ / / ___... | 39.530721 | 193 | 0.493974 | 41,832 | 0.942205 | 0 | 0 | 0 | 0 | 0 | 0 | 13,945 | 0.314091 |
e11508b726f072695da36af59f196eefb588d2a7 | 1,359 | py | Python | setup.py | charettes/cricket | ed3ef911e0776e225291a370220f0d9476afdd4e | [
"BSD-3-Clause"
] | 1 | 2015-11-06T07:51:04.000Z | 2015-11-06T07:51:04.000Z | setup.py | charettes/cricket | ed3ef911e0776e225291a370220f0d9476afdd4e | [
"BSD-3-Clause"
] | null | null | null | setup.py | charettes/cricket | ed3ef911e0776e225291a370220f0d9476afdd4e | [
"BSD-3-Clause"
] | null | null | null | #/usr/bin/env python
import sys
from setuptools import setup
from cricket import VERSION
try:
readme = open('README.rst')
long_description = str(readme.read())
finally:
readme.close()
required_pkgs = [
'tkreadonly',
]
if sys.version_info < (2, 7):
required_pkgs.extend(['argparse', 'unittest2', 'p... | 25.641509 | 66 | 0.61663 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 647 | 0.476085 |
e117f67f0c631749e3bd721fb7eedb16a22bb6f3 | 2,701 | py | Python | experimentation/tools/sorald/legacy/violation_scraper_apache_commons.py | gothius/sorald | 4c8761da495e528389c033660fae1f3c3a18cac3 | [
"MIT"
] | 49 | 2020-06-04T20:30:20.000Z | 2022-03-16T01:30:20.000Z | experimentation/tools/sorald/legacy/violation_scraper_apache_commons.py | gothius/sorald | 4c8761da495e528389c033660fae1f3c3a18cac3 | [
"MIT"
] | 551 | 2020-06-02T13:33:56.000Z | 2022-03-31T15:58:17.000Z | experimentation/tools/sorald/legacy/violation_scraper_apache_commons.py | gothius/sorald | 4c8761da495e528389c033660fae1f3c3a18cac3 | [
"MIT"
] | 12 | 2020-06-04T11:39:43.000Z | 2022-03-27T20:04:30.000Z | import requests;
import json;
from collections import Counter # Counts and orders the list of violations
import sys;
from urllib.parse import quote_plus # Make sysarg url-safe
# List of Apache Commons libraries which I know can be analyzed (without crashing/failing their tests)
commonsList = ["bcel",
"beanutils",
... | 28.734043 | 157 | 0.640133 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,016 | 0.376157 |