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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4156d6278870fbb774b81e7ffbdf14d0c4744d9b | 2,490 | py | Python | tf_encrypted/keras/layers/layers_utils.py | wqruan/tf-encrypted | 50ee4ae3ba76b7c1f70a90e18f875191adea0a07 | [
"Apache-2.0"
] | 825 | 2019-04-18T09:21:32.000Z | 2022-03-30T05:55:26.000Z | tf_encrypted/keras/layers/layers_utils.py | wqruan/tf-encrypted | 50ee4ae3ba76b7c1f70a90e18f875191adea0a07 | [
"Apache-2.0"
] | 354 | 2019-04-18T08:42:40.000Z | 2022-03-31T18:06:31.000Z | tf_encrypted/keras/layers/layers_utils.py | wqruan/tf-encrypted | 50ee4ae3ba76b7c1f70a90e18f875191adea0a07 | [
"Apache-2.0"
] | 161 | 2019-05-02T16:43:31.000Z | 2022-03-31T01:35:03.000Z | """TF Encrypted Keras layers utils"""
import inspect
import tensorflow as tf
class UnknownLayerArgError(ValueError):
"""Raise error for unknown layer arguments.
Args:
arg_name: TF Encrypted Keras layer argument name (string)
layer_sign: TensorFlow Keras layer signature (dict)
tf_layer_name... | 32.337662 | 82 | 0.675904 | 1,649 | 0.662249 | 0 | 0 | 0 | 0 | 0 | 0 | 972 | 0.390361 |
4158338da63ba358220ee7b0c0e8ce7b54fd01ff | 5,850 | py | Python | vharfbuzz.py | KazunariTsuboi/font-engineering | 2b80182d9cdfebf9853c01295ab13046f2ccb5a1 | [
"Apache-2.0"
] | null | null | null | vharfbuzz.py | KazunariTsuboi/font-engineering | 2b80182d9cdfebf9853c01295ab13046f2ccb5a1 | [
"Apache-2.0"
] | null | null | null | vharfbuzz.py | KazunariTsuboi/font-engineering | 2b80182d9cdfebf9853c01295ab13046f2ccb5a1 | [
"Apache-2.0"
] | null | null | null | """A user-friendlier way to use Harfbuzz in Python."""
import uharfbuzz as hb
from fontTools.ttLib import TTFont
import re
class Vharfbuzz:
def __init__(self, filename):
"""Opens a font file and gets ready to shape text."""
self.filename = filename
with open(self.filename, "rb") as fontfi... | 34.411765 | 88 | 0.558462 | 5,526 | 0.944615 | 0 | 0 | 0 | 0 | 0 | 0 | 1,587 | 0.271282 |
415a0184fc0cf2acf5e7fa555af6365ef819e0ca | 2,581 | py | Python | preprocessing/fields/amazon_fields.py | stungkit/Copycat-abstractive-opinion-summarizer | 04fe5393a7bb6883516766b762f6a0c530e95375 | [
"MIT"
] | 51 | 2020-09-25T07:05:01.000Z | 2022-03-17T12:07:40.000Z | preprocessing/fields/amazon_fields.py | stungkit/Copycat-abstractive-opinion-summarizer | 04fe5393a7bb6883516766b762f6a0c530e95375 | [
"MIT"
] | 4 | 2020-10-19T10:00:22.000Z | 2022-03-14T17:02:47.000Z | preprocessing/fields/amazon_fields.py | stungkit/Copycat-abstractive-opinion-summarizer | 04fe5393a7bb6883516766b762f6a0c530e95375 | [
"MIT"
] | 22 | 2020-09-22T01:06:47.000Z | 2022-01-26T14:20:09.000Z | class AmazonFields(object):
PROD_ID = "asin"
REV_TEXT = "reviewText"
OVERALL = 'overall'
# group ids there are used to produce summaries
EXCLUDED_GROUP_IDS = {'B005085X5Y',
'B0052PKEYK',
'B009L0KU46',
'B006QM4HOG',
... | 37.955882 | 51 | 0.279737 | 2,580 | 0.999613 | 0 | 0 | 0 | 0 | 0 | 0 | 794 | 0.307633 |
415b5b68914faf3e3638db9ddfedb6c109eb3f7e | 9,973 | py | Python | habitat_baselines/config/default.py | rpartsey/habitat-pointnav-aux | 03a24ddca8ab257f64092c70d4f2ff6805287b40 | [
"MIT",
"Unlicense"
] | 15 | 2020-07-10T15:43:02.000Z | 2022-03-09T03:11:30.000Z | habitat_baselines/config/default.py | rpartsey/habitat-pointnav-aux | 03a24ddca8ab257f64092c70d4f2ff6805287b40 | [
"MIT",
"Unlicense"
] | 2 | 2020-09-09T19:09:19.000Z | 2020-10-21T16:30:23.000Z | habitat_baselines/config/default.py | rpartsey/habitat-pointnav-aux | 03a24ddca8ab257f64092c70d4f2ff6805287b40 | [
"MIT",
"Unlicense"
] | 1 | 2021-02-05T14:50:30.000Z | 2021-02-05T14:50:30.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import List, Optional, Union
import numpy as np
from habitat import get_config as get_task_config
from hab... | 36.531136 | 108 | 0.684348 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,844 | 0.28517 |
415c300c1fc04be956dd24ffadcfc44181fd9b54 | 10,681 | py | Python | backup_client.py | evermind/restic-backupclient | 347fd6bfae0f967adac1b65775245f6e87a8c554 | [
"MIT"
] | null | null | null | backup_client.py | evermind/restic-backupclient | 347fd6bfae0f967adac1b65775245f6e87a8c554 | [
"MIT"
] | null | null | null | backup_client.py | evermind/restic-backupclient | 347fd6bfae0f967adac1b65775245f6e87a8c554 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from os import environ
import logging as log
import argparse
from crontab import CronTab
from datetime import datetime,timedelta
import time
import subprocess
import os.path
import re
import yaml
import shutil
import elasticdump
import mysqldump
import pgdump
import mongodump
import influxdump
... | 28.712366 | 155 | 0.735137 | 443 | 0.041476 | 0 | 0 | 0 | 0 | 0 | 0 | 3,181 | 0.297819 |
415db15c97efdf73489f6ae6ea62535109579cca | 3,883 | py | Python | lib/ezdxf/__init__.py | tapnair/DXFer | 8ec957d80c2f251bb78440147d1478106f99b3eb | [
"MIT"
] | 4 | 2019-03-31T00:41:13.000Z | 2021-07-31T05:09:07.000Z | lib/ezdxf/__init__.py | tapnair/DXFer | 8ec957d80c2f251bb78440147d1478106f99b3eb | [
"MIT"
] | null | null | null | lib/ezdxf/__init__.py | tapnair/DXFer | 8ec957d80c2f251bb78440147d1478106f99b3eb | [
"MIT"
] | 5 | 2018-03-29T06:28:07.000Z | 2021-07-31T05:09:08.000Z | # Purpose: ezdxf package
# Created: 10.03.2011
# Copyright (C) 2011, Manfred Moitzi
# License: MIT License
from __future__ import unicode_literals
version = (0, 8, 2) # also update VERSION in setup.py
VERSION = "%d.%d.%d" % version
__version__ = VERSION
__author__ = "mozman <mozman@gmx.at>"
import sys
if sys.version... | 35.3 | 112 | 0.701262 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,002 | 0.515581 |
415dfc81e1ad703ea86b474b35a040d48a33ce28 | 646 | py | Python | books/masteringPython/cp11/cp11_manual_trace.py | Bingwen-Hu/hackaway | 69727d76fd652390d9660e9ea4354ba5cc76dd5c | [
"BSD-2-Clause"
] | null | null | null | books/masteringPython/cp11/cp11_manual_trace.py | Bingwen-Hu/hackaway | 69727d76fd652390d9660e9ea4354ba5cc76dd5c | [
"BSD-2-Clause"
] | null | null | null | books/masteringPython/cp11/cp11_manual_trace.py | Bingwen-Hu/hackaway | 69727d76fd652390d9660e9ea4354ba5cc76dd5c | [
"BSD-2-Clause"
] | null | null | null | # manual trace
import sys
import trace as trace_module
import contextlib
@contextlib.contextmanager
def trace(count=False, trace=True, timing=True):
tracer = trace_module.Trace(
count=count, trace=trace, timing=timing)
sys.settrace(tracer.globaltrace)
yield tracer
sys.settrace(None)
result = tracer.results()
... | 19.575758 | 55 | 0.750774 | 0 | 0 | 389 | 0.602167 | 301 | 0.465944 | 0 | 0 | 47 | 0.072755 |
415fd9ca7dc3dd7e0ad28f54f3222836570e36ec | 229 | py | Python | helpers/version.py | Dabalon/blues_bot.py | b153f65054ce973e16c5fd1e2061ce1fe50145d1 | [
"MIT"
] | 5 | 2020-01-05T18:53:20.000Z | 2022-03-19T13:01:24.000Z | helpers/version.py | Dabalon/blues_bot.py | b153f65054ce973e16c5fd1e2061ce1fe50145d1 | [
"MIT"
] | 22 | 2019-10-27T00:56:30.000Z | 2021-07-13T16:42:24.000Z | helpers/version.py | Dabalon/blues_bot.py | b153f65054ce973e16c5fd1e2061ce1fe50145d1 | [
"MIT"
] | 11 | 2020-01-05T18:53:22.000Z | 2022-03-30T22:20:13.000Z | # Version command helper
def get_version():
""" Opens version file and returns it as a string """
file = open("assets/version", "r")
ret = ''
for line in file:
ret += line
file.close()
return ret
| 20.818182 | 57 | 0.585153 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 98 | 0.427948 |
416352a765ad965b8902ff0ad42dd03f68d57af2 | 3,542 | py | Python | code/tfidf.py | yekang/ccf_sougou | 1c65cd78407f14646bbf52140051fc5f239c31d3 | [
"MIT"
] | null | null | null | code/tfidf.py | yekang/ccf_sougou | 1c65cd78407f14646bbf52140051fc5f239c31d3 | [
"MIT"
] | null | null | null | code/tfidf.py | yekang/ccf_sougou | 1c65cd78407f14646bbf52140051fc5f239c31d3 | [
"MIT"
] | null | null | null | from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.feature_extraction.text import TfidfVectorizer,CountVectorizer
from sklearn.externals import joblib as jl
import data_preprocess
def tfidf_feature():
gender_label_cleaned_list=[]
age_label_cleaned_list=[]
education_label_cleaned... | 49.887324 | 88 | 0.732919 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 517 | 0.145963 |
4165009c85e483f589a199ebd8b12e333a80178e | 1,168 | py | Python | yqml/select.py | maztohir/YQML | 6e5eb06f2869a7309614120cc56ac04f5a689c9f | [
"MIT"
] | 2 | 2021-03-11T16:44:02.000Z | 2021-04-17T17:57:38.000Z | yqml/select.py | maztohir/yqml | 6e5eb06f2869a7309614120cc56ac04f5a689c9f | [
"MIT"
] | null | null | null | yqml/select.py | maztohir/yqml | 6e5eb06f2869a7309614120cc56ac04f5a689c9f | [
"MIT"
] | null | null | null | from yqml.keys import Keys
from .where import Where
from .join import Join, RightJoin, LeftJoin
from .fields import Fields
class Select:
def __init__(self, dict):
self._content = dict
def to_sql(self):
query = f"SELECT {self.field_clause} {self.from_clause} {self.join_clause} {self.left_join_c... | 26.545455 | 152 | 0.668664 | 1,042 | 0.892123 | 0 | 0 | 546 | 0.467466 | 0 | 0 | 154 | 0.131849 |
4165053f103fa07c4e3af8d74e151dd12dc1f794 | 904 | py | Python | manu_sawyer/src/GelSightA.py | robertocalandra/the-feeling-of-success | 7bb895897e369ae9f5fcaeed61d401e019a9cdf1 | [
"MIT"
] | 10 | 2018-05-31T04:57:25.000Z | 2021-05-28T11:22:29.000Z | manu_sawyer/src/GelSightA.py | robertocalandra/the-feeling-of-success | 7bb895897e369ae9f5fcaeed61d401e019a9cdf1 | [
"MIT"
] | null | null | null | manu_sawyer/src/GelSightA.py | robertocalandra/the-feeling-of-success | 7bb895897e369ae9f5fcaeed61d401e019a9cdf1 | [
"MIT"
] | 3 | 2018-05-31T05:00:08.000Z | 2019-02-25T06:32:45.000Z | #!/usr/bin/env python
import rospy
from cv_bridge import CvBridge, CvBridgeError
from sensor_msgs.msg import Image
import multiprocessing
class GelSightA:
def __init__(self, topic='/gelsightA/image_raw'): # '/gelsightA/image_raw' /image_view_A/output
# Variable
self.img = None
# Used to ... | 26.588235 | 100 | 0.67146 | 763 | 0.844027 | 0 | 0 | 0 | 0 | 0 | 0 | 159 | 0.175885 |
4165c6d113e9bcb67cd9c5283014beedef28535b | 2,142 | py | Python | ingest/common/python/package/streamsx_health/test/TestObservation.py | markheger/streamsx.health | 14c27e377aa5947e76b0b681c1d8f5350a56323c | [
"Apache-2.0"
] | 45 | 2016-06-23T21:47:52.000Z | 2021-09-06T02:44:51.000Z | ingest/common/python/package/streamsx_health/test/TestObservation.py | markheger/streamsx.health | 14c27e377aa5947e76b0b681c1d8f5350a56323c | [
"Apache-2.0"
] | 107 | 2016-06-23T21:49:16.000Z | 2020-07-10T13:01:28.000Z | ingest/common/python/package/streamsx_health/test/TestObservation.py | markheger/streamsx.health | 14c27e377aa5947e76b0b681c1d8f5350a56323c | [
"Apache-2.0"
] | 48 | 2016-12-01T23:05:38.000Z | 2021-12-14T17:11:56.000Z | #****************************************************************************
# Copyright (C) 2017 International Business Machines Corporation
# All Rights Reserved
# ****************************************************************************
import unittest
import json
from streamsx_health.ingest.Observation import ... | 34.548387 | 315 | 0.625117 | 1,769 | 0.825864 | 0 | 0 | 0 | 0 | 0 | 0 | 630 | 0.294118 |
416700a551016e3c3062ddbef52da0802e586ce3 | 1,849 | py | Python | podcastapi.py | rexxars/kodi-vg-podcasts | f5151b78717533e97a3d70439946654228adca70 | [
"MIT"
] | null | null | null | podcastapi.py | rexxars/kodi-vg-podcasts | f5151b78717533e97a3d70439946654228adca70 | [
"MIT"
] | null | null | null | podcastapi.py | rexxars/kodi-vg-podcasts | f5151b78717533e97a3d70439946654228adca70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2016 Espen Hovlandsdal
from requests import Session
API_URL = 'http://api.vg.no/podcast';
session = Session()
session.headers['User-Agent'] = 'kodi-vg-podcasts'
session.headers['Accept'] = 'application/json'
class Base(object):
id = None
title = None
subtit... | 22.277108 | 69 | 0.559221 | 1,017 | 0.550027 | 0 | 0 | 740 | 0.400216 | 0 | 0 | 314 | 0.169822 |
4168384f50e5cc2f231cecb8b748342434bfed92 | 554 | py | Python | LOGGING/logger.py | Couso99/EEG-Environment | d67de00c08c5892baebe5bf993cac0a5db6e70b1 | [
"MIT"
] | null | null | null | LOGGING/logger.py | Couso99/EEG-Environment | d67de00c08c5892baebe5bf993cac0a5db6e70b1 | [
"MIT"
] | null | null | null | LOGGING/logger.py | Couso99/EEG-Environment | d67de00c08c5892baebe5bf993cac0a5db6e70b1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: %(Mikel Val Calvo)s
@email: %(mikel1982mail@gmail.com)
@institution: %(Dpto. de Inteligencia Artificial, Universidad Nacional de Educación a Distancia (UNED))
@DOI: 10.5281/zenodo.3759306
"""
class logger():
# Inicializa la aplicación GUI
def __init__(self, gui):
... | 29.157895 | 103 | 0.666065 | 323 | 0.579892 | 0 | 0 | 0 | 0 | 0 | 0 | 352 | 0.631957 |
416ad546e81165ecbce7d3668b0084d159819a2c | 442 | py | Python | src/year2020/day05b.py | lancelote/advent_of_code | 06dda6ca034bc1e86addee7798bb9b2a34ff565b | [
"Unlicense"
] | 10 | 2017-12-11T17:54:52.000Z | 2021-12-09T20:16:30.000Z | src/year2020/day05b.py | lancelote/advent_of_code | 06dda6ca034bc1e86addee7798bb9b2a34ff565b | [
"Unlicense"
] | 260 | 2015-12-09T11:03:03.000Z | 2021-12-12T14:32:23.000Z | src/year2020/day05b.py | lancelote/advent_of_code | 06dda6ca034bc1e86addee7798bb9b2a34ff565b | [
"Unlicense"
] | null | null | null | """2020 - Day 5 Part 2: Binary Boarding."""
from src.year2020.day05a import process_data
def solve(task: str) -> int:
"""Find an empty seat."""
seats = process_data(task)
first = min(seats).pk
last = max(seats).pk
ideal = set(range(first, last))
real = set(seat.pk for seat in seats)
diffe... | 26 | 61 | 0.658371 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.228507 |
416ba491b8205e861203d98c397a2176ef1e5e99 | 6,451 | py | Python | app/src/original.py | chrisjim316/Amazon-Alexa-Hack | 8180520b3feb9ef8dc55aa69119b21436ee109d6 | [
"MIT"
] | null | null | null | app/src/original.py | chrisjim316/Amazon-Alexa-Hack | 8180520b3feb9ef8dc55aa69119b21436ee109d6 | [
"MIT"
] | null | null | null | app/src/original.py | chrisjim316/Amazon-Alexa-Hack | 8180520b3feb9ef8dc55aa69119b21436ee109d6 | [
"MIT"
] | null | null | null | from __future__ import print_function
import json
import urllib2
# properties needed to interact with the api
apiToken = //intentionally obfuscated
seToken = //intentionally obfuscated
baseUrl = 'https://www.secretescapes.com/v3'
numberOfRooms = 1
APP_ID = "amzn1.ask.skill.258c1e36-afd4-4d5b-8f50-fbab4ed83475"
def la... | 31.622549 | 118 | 0.637421 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,520 | 0.390637 |
416bf5d355c191581abaaf5baae4b6d02f53cd4e | 4,338 | py | Python | src/tools/files.py | cowboysmall/rosalind | 021e4392a8fc946b97bbf86bbb8227b28bb5e462 | [
"MIT"
] | null | null | null | src/tools/files.py | cowboysmall/rosalind | 021e4392a8fc946b97bbf86bbb8227b28bb5e462 | [
"MIT"
] | null | null | null | src/tools/files.py | cowboysmall/rosalind | 021e4392a8fc946b97bbf86bbb8227b28bb5e462 | [
"MIT"
] | null | null | null |
def write_lines(file_path, lines):
with open(file_path, 'w') as file:
for line in lines:
file.write(line + '\n')
def read_line(file_path):
with open(file_path) as file:
return file.readline().strip()
def read_lines(file_path):
lines = []
with open(file_path) as file:
... | 22.59375 | 68 | 0.542416 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.001614 |
416ecd1bf60b2f5dfac4a13faf4ce1dc4d266fd7 | 603 | py | Python | ebl/tests/transliteration/test_atf.py | ElectronicBabylonianLiterature/dictionary | 5977a57314cf57f94f75cd12520f178b1d6a6555 | [
"MIT"
] | 4 | 2020-04-12T14:24:51.000Z | 2020-10-15T15:48:15.000Z | ebl/tests/transliteration/test_atf.py | ElectronicBabylonianLiterature/dictionary | 5977a57314cf57f94f75cd12520f178b1d6a6555 | [
"MIT"
] | 200 | 2019-12-04T09:53:20.000Z | 2022-03-30T20:11:31.000Z | ebl/tests/transliteration/test_atf.py | ElectronicBabylonianLiterature/dictionary | 5977a57314cf57f94f75cd12520f178b1d6a6555 | [
"MIT"
] | 1 | 2021-09-06T16:22:39.000Z | 2021-09-06T16:22:39.000Z | import pytest
from ebl.transliteration.domain.atf import to_sub_index, sub_index_to_int
SUB_INDICES = [
(None, "ₓ"),
(1, ""),
(2, "₂"),
(3, "₃"),
(4, "₄"),
(5, "₅"),
(6, "₆"),
(7, "₇"),
(8, "₈"),
(9, "₉"),
(0, "₀"),
(1024, "₁₀₂₄"),
]
@pytest.mark.parametrize("number,e... | 20.793103 | 73 | 0.60199 | 0 | 0 | 0 | 0 | 315 | 0.49763 | 0 | 0 | 109 | 0.172196 |
416fc4132f82c94ae93a71e4d7f00ce6d134cda7 | 764 | py | Python | youtube/forms.py | shravs-cell/video | 0bc56062f8200049c85dd35eb0e07447289bc902 | [
"MIT"
] | null | null | null | youtube/forms.py | shravs-cell/video | 0bc56062f8200049c85dd35eb0e07447289bc902 | [
"MIT"
] | null | null | null | youtube/forms.py | shravs-cell/video | 0bc56062f8200049c85dd35eb0e07447289bc902 | [
"MIT"
] | null | null | null | from django import forms
class LoginForm(forms.Form):
username = forms.CharField(label='Username', max_length=300)
password = forms.CharField(label='Password', max_length=300)
class RegisterForm(forms.Form):
username = forms.CharField(label='Username', max_length=300)
password = forms.CharField(label... | 36.380952 | 71 | 0.732984 | 726 | 0.950262 | 0 | 0 | 0 | 0 | 0 | 0 | 140 | 0.183246 |
416fdbf082852439f1fed8fca80d233764759242 | 1,381 | py | Python | regcore/migrations/0015_auto_20210429_1708.py | cgodwin1/regulations-core | 1afad359f33655946d93da069bf58bb12ec4805e | [
"CC0-1.0"
] | 1 | 2021-04-14T06:08:10.000Z | 2021-04-14T06:08:10.000Z | regcore/migrations/0015_auto_20210429_1708.py | cgodwin1/regulations-core | 1afad359f33655946d93da069bf58bb12ec4805e | [
"CC0-1.0"
] | 2 | 2021-02-16T18:23:56.000Z | 2021-04-26T14:27:17.000Z | regcore/migrations/0015_auto_20210429_1708.py | cgodwin1/regulations-core | 1afad359f33655946d93da069bf58bb12ec4805e | [
"CC0-1.0"
] | 2 | 2020-12-07T16:46:30.000Z | 2021-02-23T14:28:35.000Z | # Generated by Django 3.2 on 2021-04-29 17:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('regcore', '0014_auto_20160504_0101'),
]
operations = [
migrations.AlterField(
model_name='document',
name='level',
... | 31.386364 | 114 | 0.534395 | 1,290 | 0.934106 | 0 | 0 | 0 | 0 | 0 | 0 | 231 | 0.16727 |
4170081c348b25a347acdd29605bf96b4bb56f60 | 59 | py | Python | testing/resources/test_pvector_in_imported_module.py | timgates42/processing.py | 78a237922c2a928b83f4ad579dbf8d32c0099890 | [
"Apache-2.0"
] | 1,224 | 2015-01-01T22:09:23.000Z | 2022-03-29T19:43:56.000Z | testing/resources/test_pvector_in_imported_module.py | timgates42/processing.py | 78a237922c2a928b83f4ad579dbf8d32c0099890 | [
"Apache-2.0"
] | 253 | 2015-01-14T03:45:51.000Z | 2022-02-08T01:18:19.000Z | testing/resources/test_pvector_in_imported_module.py | timgates42/processing.py | 78a237922c2a928b83f4ad579dbf8d32c0099890 | [
"Apache-2.0"
] | 225 | 2015-01-13T18:38:33.000Z | 2022-03-30T20:27:39.000Z | import imported_module_with_pvector as m
m.sayok()
exit()
| 11.8 | 40 | 0.79661 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
41716acd74ef124d89f5dce40e0eba84b378df21 | 43,180 | py | Python | src/pylogit/mixed_logit.py | mathijsvdv/pylogit | 2e7a06907d11b6fe02d3f3f9df91d374ed8a0c6d | [
"BSD-3-Clause"
] | 153 | 2016-03-22T05:52:41.000Z | 2022-02-09T13:33:20.000Z | src/pylogit/mixed_logit.py | mathijsvdv/pylogit | 2e7a06907d11b6fe02d3f3f9df91d374ed8a0c6d | [
"BSD-3-Clause"
] | 63 | 2016-03-22T05:47:56.000Z | 2021-12-23T12:01:29.000Z | src/pylogit/mixed_logit.py | mathijsvdv/pylogit | 2e7a06907d11b6fe02d3f3f9df91d374ed8a0c6d | [
"BSD-3-Clause"
] | 91 | 2016-05-27T06:04:38.000Z | 2022-03-13T20:00:15.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Jul 18 18:15:50 2016
@name: Mixed MultiNomial Logit
@author: Timothy Brathwaite
@summary: Contains functions necessary for estimating mixed multinomial logit
models (with the help of the "base_multinomial_cm.py" file).
Version 1 only works fo... | 44.979167 | 79 | 0.612297 | 36,850 | 0.853404 | 0 | 0 | 0 | 0 | 0 | 0 | 24,231 | 0.561163 |
4174d02ae022627c9a3fdf728ab8801e521bd891 | 7,836 | py | Python | node/blockchain/tests/test_models/test_signed_change_request/test_node_declaration.py | thenewboston-developers/Node | e71a405f4867786a54dd17ddd97595dd3a630018 | [
"MIT"
] | 18 | 2021-11-30T04:02:13.000Z | 2022-03-24T12:33:57.000Z | node/blockchain/tests/test_models/test_signed_change_request/test_node_declaration.py | thenewboston-developers/Node | e71a405f4867786a54dd17ddd97595dd3a630018 | [
"MIT"
] | 1 | 2022-02-04T17:07:38.000Z | 2022-02-04T17:07:38.000Z | node/blockchain/tests/test_models/test_signed_change_request/test_node_declaration.py | thenewboston-developers/Node | e71a405f4867786a54dd17ddd97595dd3a630018 | [
"MIT"
] | 5 | 2022-01-31T05:28:13.000Z | 2022-03-08T17:25:31.000Z | import json
import re
import pytest
from pydantic import ValidationError
from node.blockchain.inner_models import (
NodeDeclarationSignedChangeRequest, NodeDeclarationSignedChangeRequestMessage, SignedChangeRequest
)
from node.blockchain.mixins.crypto import HashableStringWrapper
from node.blockchain.tests.test_m... | 44.777143 | 119 | 0.727667 | 0 | 0 | 0 | 0 | 3,097 | 0.395227 | 0 | 0 | 1,264 | 0.161307 |
417535dcc542f83c434ea5ed0d71b62a8ea4e3dc | 1,552 | py | Python | playerdo/backends/socket.py | spookylukey/playerdo | d020ae43ddee1d77382c20a66b647489f366a9e9 | [
"BSD-2-Clause"
] | 5 | 2020-09-21T13:42:24.000Z | 2021-02-03T17:12:33.000Z | playerdo/backends/socket.py | spookylukey/playerdo | d020ae43ddee1d77382c20a66b647489f366a9e9 | [
"BSD-2-Clause"
] | 1 | 2020-01-13T12:31:07.000Z | 2020-01-13T12:34:21.000Z | playerdo/backends/socket.py | spookylukey/playerdo | d020ae43ddee1d77382c20a66b647489f366a9e9 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import absolute_import
import socket
class SocketPlayerBase(object):
def send_socket_command(self, command):
s = self.get_open_socket()
s.send((command + "\n").encode("ascii"))
# We never know how much to receive, most of these
# protocols send very little data bac... | 27.22807 | 66 | 0.657861 | 1,489 | 0.959407 | 0 | 0 | 0 | 0 | 0 | 0 | 350 | 0.225515 |
41754b7be3194cb3183aea7d9f558b7b18c2dc8f | 1,742 | py | Python | CodeComb_Core/config_shell.py | amartyaamp/CodeComb | 33fd50b91edd60dd08b1f4decc35e2fcf5f1a78d | [
"MIT"
] | 1 | 2019-09-06T07:14:57.000Z | 2019-09-06T07:14:57.000Z | CodeComb_Core/config_shell.py | amartyaamp/CodeComb | 33fd50b91edd60dd08b1f4decc35e2fcf5f1a78d | [
"MIT"
] | 12 | 2019-09-10T04:07:51.000Z | 2019-12-13T03:04:49.000Z | CodeComb_Core/config_shell.py | amartyaamp/CodeComb | 33fd50b91edd60dd08b1f4decc35e2fcf5f1a78d | [
"MIT"
] | 1 | 2019-09-11T04:12:03.000Z | 2019-09-11T04:12:03.000Z | import os
from pyfiglet import figlet_format
import cutie
import configparser
## Either colorama or termcolor
try:
import colorama
colorama.init()
except ImportError:
colorama = None
try:
from termcolor import colored
except ImportError:
colored = None
## Set the format config
def set_format():
form... | 23.226667 | 82 | 0.702641 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 525 | 0.301378 |
41757415060bd40b7bf8385c7ab3e828141ce2df | 637 | py | Python | Candlestick-mpl_finance.py | anablima/Python-Studies | 958e181a7b9ce0569259f67f2d87d78b90cb5aa1 | [
"MIT"
] | null | null | null | Candlestick-mpl_finance.py | anablima/Python-Studies | 958e181a7b9ce0569259f67f2d87d78b90cb5aa1 | [
"MIT"
] | null | null | null | Candlestick-mpl_finance.py | anablima/Python-Studies | 958e181a7b9ce0569259f67f2d87d78b90cb5aa1 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as fig
import datetime as dt
import mpl_finance as mpf
import matplotlib.dates as mdates
import pandas_datareader.data as web
inicio=dt.datetime(2019,1,1)
fim=dt.datetime(2022,2,2)
df=web.DataReader('MGLU3.SA','yahoo',inicio,fim)
df['med_mov']=df['Close'].rolling(window=20,min_periods=0).mean... | 30.333333 | 65 | 0.758242 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.138148 |
4177179531f58a2be53761395add53901bd1e218 | 1,901 | py | Python | components/eastereggs.py | n8wachT/BotListBot | 457160498a90c8d0a63d5a9f7400227e35431b6d | [
"MIT"
] | null | null | null | components/eastereggs.py | n8wachT/BotListBot | 457160498a90c8d0a63d5a9f7400227e35431b6d | [
"MIT"
] | null | null | null | components/eastereggs.py | n8wachT/BotListBot | 457160498a90c8d0a63d5a9f7400227e35431b6d | [
"MIT"
] | null | null | null | import random
from pprint import pprint
from peewee import fn
from model import Bot
from telegram import ReplyKeyboardMarkup
import util
from telegram import KeyboardButton
import captions
from model import track_activity
@track_activity('easteregg', '"crappy troll markup"')
def _crapPy_Tr0ll_kbmarkup(rows=None)... | 34.563636 | 127 | 0.652288 | 0 | 0 | 0 | 0 | 999 | 0.520584 | 0 | 0 | 422 | 0.219906 |
4177f78e0fda7c1ab99934917f15b1e0a6282a28 | 16,492 | py | Python | heat/tests/api/openstack_v1/test_routes.py | whitepages/heat | 4da2e1262fa42e6107389ba7a0e72ade024e316f | [
"Apache-2.0"
] | null | null | null | heat/tests/api/openstack_v1/test_routes.py | whitepages/heat | 4da2e1262fa42e6107389ba7a0e72ade024e316f | [
"Apache-2.0"
] | null | null | null | heat/tests/api/openstack_v1/test_routes.py | whitepages/heat | 4da2e1262fa42e6107389ba7a0e72ade024e316f | [
"Apache-2.0"
] | 1 | 2021-03-21T11:37:03.000Z | 2021-03-21T11:37:03.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
# ... | 28.288165 | 79 | 0.431057 | 15,845 | 0.960769 | 0 | 0 | 0 | 0 | 0 | 0 | 6,564 | 0.398011 |
417897748e026f4f02ed88c0117e7837109fc500 | 185 | py | Python | test_django/hello/urls.py | YEZHIAN1996/pythonstudy | a8774ef97266e8ab0289484ef190d2ee55f1d37c | [
"Apache-2.0"
] | 1 | 2022-02-22T01:54:56.000Z | 2022-02-22T01:54:56.000Z | test_django/hello/urls.py | YEZHIAN1996/pythonstudy | a8774ef97266e8ab0289484ef190d2ee55f1d37c | [
"Apache-2.0"
] | null | null | null | test_django/hello/urls.py | YEZHIAN1996/pythonstudy | a8774ef97266e8ab0289484ef190d2ee55f1d37c | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from hello.views import is_odd, http_req
urlpatterns = [
path('<int:num>/', is_odd, name='is_odd'),
path('http/req/', http_req, name='http_req')
]
| 23.125 | 48 | 0.681081 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.221622 |
417d85f2f2634da06e6ff80737c0f455994abeac | 5,398 | py | Python | sets/generator/nopattern/remote.py | ignacio-gallego/tbcnn_skill_pill | 66c3939e2944160c864b61495ac4c7aaa56acd18 | [
"MIT"
] | null | null | null | sets/generator/nopattern/remote.py | ignacio-gallego/tbcnn_skill_pill | 66c3939e2944160c864b61495ac4c7aaa56acd18 | [
"MIT"
] | null | null | null | sets/generator/nopattern/remote.py | ignacio-gallego/tbcnn_skill_pill | 66c3939e2944160c864b61495ac4c7aaa56acd18 | [
"MIT"
] | null | null | null | from pandas import DataFrame as PandasDataFrame
from optimus.engines.base.basedataframe import BaseDataFrame
class RemoteDummyAttribute:
def __init__(self, name, names, dummy_id, op):
self.__names = [*names, name]
self.__op = op
self.__id = dummy_id
def __getattr__(se... | 30.156425 | 115 | 0.567803 | 5,278 | 0.97777 | 0 | 0 | 372 | 0.068914 | 0 | 0 | 267 | 0.049463 |
417e3d6a00fec073fc8e5b110ada2e2d5309582c | 1,919 | py | Python | app/util/ML/dataset.py | SoftwareEngineerUB/SmartEnergy | 8893728eaf989a3b8bd2c1b3a8a1a5e6c4ce9c10 | [
"Apache-2.0"
] | null | null | null | app/util/ML/dataset.py | SoftwareEngineerUB/SmartEnergy | 8893728eaf989a3b8bd2c1b3a8a1a5e6c4ce9c10 | [
"Apache-2.0"
] | null | null | null | app/util/ML/dataset.py | SoftwareEngineerUB/SmartEnergy | 8893728eaf989a3b8bd2c1b3a8a1a5e6c4ce9c10 | [
"Apache-2.0"
] | null | null | null | import torch as T
import numpy as np
from app.util.ML.constants import *
DEVICE = T.device("cpu")
GPU_ENABLED = False
class DeviceMeterDataset(T.utils.data.Dataset):
@staticmethod
def createDatasets(device_id, mul_factor=1):
allData = np.load(BASE_PATH + TRAIN_FOLDER + DEVICE_BASE_NAME + str(device_... | 31.983333 | 112 | 0.625847 | 1,796 | 0.935904 | 0 | 0 | 1,256 | 0.654508 | 0 | 0 | 126 | 0.065659 |
417ee4d8de3b41665d6dba7dbc8fa1ba85341638 | 1,903 | py | Python | resource/v2.py | NuenoB/TheTeleop | 57e3f745d391743fac408fb44bf20ffad945aa19 | [
"BSD-3-Clause"
] | null | null | null | resource/v2.py | NuenoB/TheTeleop | 57e3f745d391743fac408fb44bf20ffad945aa19 | [
"BSD-3-Clause"
] | null | null | null | resource/v2.py | NuenoB/TheTeleop | 57e3f745d391743fac408fb44bf20ffad945aa19 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'AddBag.ui'
#
# Created: Mon Nov 30 10:24:59 2015
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Attribu... | 36.596154 | 79 | 0.687861 | 1,217 | 0.639517 | 0 | 0 | 0 | 0 | 0 | 0 | 332 | 0.174461 |
417fc0767f9f3045bfabe98057d3d6ae8df77d25 | 59,087 | py | Python | src/rgt/viz/Main.py | mguo123/pan_omics | e1cacd543635b398fb08c0b31d08fa6b7c389658 | [
"MIT"
] | null | null | null | src/rgt/viz/Main.py | mguo123/pan_omics | e1cacd543635b398fb08c0b31d08fa6b7c389658 | [
"MIT"
] | null | null | null | src/rgt/viz/Main.py | mguo123/pan_omics | e1cacd543635b398fb08c0b31d08fa6b7c389658 | [
"MIT"
] | null | null | null | # Python Libraries
from __future__ import division
from __future__ import print_function
import os
import sys
import time
import getpass
import argparse
import datetime
import matplotlib
matplotlib.use('Agg', warn=False)
from .boxplot import Boxplot
from .lineplot import Lineplot
from .jaccard_test import Jaccard
fr... | 66.764972 | 263 | 0.581803 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23,666 | 0.400528 |
417ffbd4ba1e57bb20138f983895a6ec4d8a43b6 | 324 | py | Python | server/quiz/urls.py | namanwfhsolve/Quiz-API | dcac94da3fb6ae514bbb4feb1abeb595903ce9aa | [
"MIT"
] | null | null | null | server/quiz/urls.py | namanwfhsolve/Quiz-API | dcac94da3fb6ae514bbb4feb1abeb595903ce9aa | [
"MIT"
] | 1 | 2021-07-11T18:37:34.000Z | 2021-07-11T18:37:34.000Z | server/quiz/urls.py | namanwfhsolve/Quiz-API | dcac94da3fb6ae514bbb4feb1abeb595903ce9aa | [
"MIT"
] | null | null | null | from django.urls import path
from .views import QuizView, QuizDetailView, QuizCreateView
urlpatterns = [
path("quizes/", QuizView.as_view(), name="quiz_list_create"),
path("create/", QuizCreateView.as_view(), name="quiz_create"),
path("quiz/<int:pk>/", QuizDetailView.as_view(), name="quiz_retrive_update")... | 32.4 | 81 | 0.722222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.265432 |
41801ea050275d49201c9b87f491278b3faaa4f9 | 23 | py | Python | mGdi32/__init__.py | SkyLined/mWindowsSDK | 931cc9d30316893662a3dc4e200dabe97122d216 | [
"CC-BY-4.0"
] | 2 | 2019-08-01T15:08:25.000Z | 2021-01-30T07:29:34.000Z | mGdi32/__init__.py | SkyLined/mWindowsSDK | 931cc9d30316893662a3dc4e200dabe97122d216 | [
"CC-BY-4.0"
] | null | null | null | mGdi32/__init__.py | SkyLined/mWindowsSDK | 931cc9d30316893662a3dc4e200dabe97122d216 | [
"CC-BY-4.0"
] | null | null | null | from .mGdi32 import *;
| 11.5 | 22 | 0.695652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
418053ee5e7fc1cc778869d9ebfee56bc7e30f8e | 190 | py | Python | built-in/TensorFlow/Official/nlp/Transformer_for_TensorFlow/noahnmt/attentions/__init__.py | Huawei-Ascend/modelzoo | df51ed9c1d6dbde1deef63f2a037a369f8554406 | [
"Apache-2.0"
] | null | null | null | built-in/TensorFlow/Official/nlp/Transformer_for_TensorFlow/noahnmt/attentions/__init__.py | Huawei-Ascend/modelzoo | df51ed9c1d6dbde1deef63f2a037a369f8554406 | [
"Apache-2.0"
] | 3 | 2021-03-31T20:15:40.000Z | 2022-02-09T23:50:46.000Z | built-in/TensorFlow/Official/nlp/Transformer_for_TensorFlow/noahnmt/attentions/__init__.py | Huawei-Ascend/modelzoo | df51ed9c1d6dbde1deef63f2a037a369f8554406 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright Huawei Noah's Ark Lab.
from noahnmt.attentions import dot_attention
from noahnmt.attentions import dot_prod_attention
from noahnmt.attentions import sum_attention | 31.666667 | 49 | 0.847368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.252632 |
4180dd4796db00aa27180113a9c270adce7f7aee | 8,390 | py | Python | viz/uncertainty.py | WadhwaniAI/covid-modelling | db9f89bfbec392ad4de6b4583cfab7c3d823c1c9 | [
"MIT"
] | 3 | 2021-06-23T10:27:11.000Z | 2022-02-09T07:50:42.000Z | viz/uncertainty.py | WadhwaniAI/covid-modelling | db9f89bfbec392ad4de6b4583cfab7c3d823c1c9 | [
"MIT"
] | 3 | 2021-06-23T09:36:29.000Z | 2022-01-13T03:38:16.000Z | viz/uncertainty.py | WadhwaniAI/covid-modelling | db9f89bfbec392ad4de6b4583cfab7c3d823c1c9 | [
"MIT"
] | null | null | null | import datetime
from copy import copy
from datetime import timedelta
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from adjustText import adjust_text
from matplotlib.lines import Line2D
from matplotlib.patches import Patch
from utils.generic.enums import Columns
from viz.... | 40.728155 | 104 | 0.586651 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,200 | 0.143027 |
418199c796f2780deea7cf4549a397f4a304c2c1 | 3,299 | py | Python | bookqlub_api/tests/test_user_schema.py | danifujii/bookqlub | c6543df63ccc4f403a86121224b26b12d587553b | [
"MIT"
] | null | null | null | bookqlub_api/tests/test_user_schema.py | danifujii/bookqlub | c6543df63ccc4f403a86121224b26b12d587553b | [
"MIT"
] | 26 | 2020-06-27T19:16:13.000Z | 2022-02-27T05:48:21.000Z | bookqlub_api/tests/test_user_schema.py | danifujii/bookqlub | c6543df63ccc4f403a86121224b26b12d587553b | [
"MIT"
] | null | null | null | import bcrypt
import jwt
from bookqlub_api import utils
from bookqlub_api.schema import models
from tests import base_test
class TestUserSchema(base_test.BaseTestSchema):
mutation = """
mutation CreateUser($full_name: String!, $username: String!, $pass: String!) {
createUser(fullName: $full... | 36.252747 | 92 | 0.61746 | 3,168 | 0.960291 | 0 | 0 | 0 | 0 | 0 | 0 | 1,087 | 0.329494 |
4182ec15967a7a53ca35c791ffcf894022ac1a7d | 618 | py | Python | maya/app/renderSetup/views/lightEditor/utils.py | arjun-namdeo/py_stubs | 605bb167e239978f5417f3f1fc1f5c12e2a243cc | [
"MIT"
] | null | null | null | maya/app/renderSetup/views/lightEditor/utils.py | arjun-namdeo/py_stubs | 605bb167e239978f5417f3f1fc1f5c12e2a243cc | [
"MIT"
] | null | null | null | maya/app/renderSetup/views/lightEditor/utils.py | arjun-namdeo/py_stubs | 605bb167e239978f5417f3f1fc1f5c12e2a243cc | [
"MIT"
] | null | null | null | def createDynamicAttribute(nodeName, attrName, attrType, value):
pass
def findNodeFromMaya(nodeName):
pass
def findSelectedNodeFromMaya():
pass
def resolveIconFile(filename):
"""
Resolve filenames using the XBMLANGPATH icon searchpath or look
through the embedded Qt resources (if the path ... | 20.6 | 99 | 0.65534 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 407 | 0.658576 |
41846f748394eaaab9d178f6abb98d1845018fdd | 395 | py | Python | app/core/migrations/0003_auto_20201129_1357.py | bondeveloper/maischool | 16bf2afe99d26caa067b7912e88839639cf2191e | [
"MIT"
] | null | null | null | app/core/migrations/0003_auto_20201129_1357.py | bondeveloper/maischool | 16bf2afe99d26caa067b7912e88839639cf2191e | [
"MIT"
] | null | null | null | app/core/migrations/0003_auto_20201129_1357.py | bondeveloper/maischool | 16bf2afe99d26caa067b7912e88839639cf2191e | [
"MIT"
] | null | null | null | # Generated by Django 3.1.3 on 2020-11-29 13:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0002_auto_20201129_1325'),
]
operations = [
migrations.AlterField(
model_name='attachment',
name='file',
... | 20.789474 | 60 | 0.602532 | 302 | 0.764557 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.275949 |
41850d2f20a25e9d6a0751208d08a9bcdd244bde | 3,429 | py | Python | knowledge/migrations/0001_initial.py | darth-dodo/hustlers-den | 74c375da1b82c6ad4d4f2b763bc8e47a3f73417d | [
"MIT"
] | 3 | 2019-07-27T08:42:27.000Z | 2020-04-02T14:26:35.000Z | knowledge/migrations/0001_initial.py | darth-dodo/hustlers-den | 74c375da1b82c6ad4d4f2b763bc8e47a3f73417d | [
"MIT"
] | 34 | 2019-08-14T19:05:56.000Z | 2022-02-10T10:54:45.000Z | knowledge/migrations/0001_initial.py | darth-dodo/hustlers-den | 74c375da1b82c6ad4d4f2b763bc8e47a3f73417d | [
"MIT"
] | null | null | null | # Generated by Django 2.0.6 on 2018-06-10 06:46
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="Category",
fields=[
... | 36.870968 | 83 | 0.449694 | 3,303 | 0.963255 | 0 | 0 | 0 | 0 | 0 | 0 | 515 | 0.15019 |
418670d002d663322a8f470f2873865170a66103 | 1,908 | py | Python | ScoringEngine/ScoringEngine/engine/options/__init__.py | norserage/scoring | b3f5c199b64bb3a78342924349fe6a713257b1a0 | [
"MIT"
] | 1 | 2020-07-29T16:12:02.000Z | 2020-07-29T16:12:02.000Z | ScoringEngine/ScoringEngine/engine/options/__init__.py | norserage/scoring | b3f5c199b64bb3a78342924349fe6a713257b1a0 | [
"MIT"
] | null | null | null | ScoringEngine/ScoringEngine/engine/options/__init__.py | norserage/scoring | b3f5c199b64bb3a78342924349fe6a713257b1a0 | [
"MIT"
] | null | null | null | """
Copyright 2016 Brandon Warner
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... | 25.783784 | 94 | 0.648847 | 1,331 | 0.697589 | 0 | 0 | 0 | 0 | 0 | 0 | 582 | 0.305031 |
4186a83376db6719d09806172772089d522d0c98 | 12,828 | py | Python | Game-TestHuman.py | brian1985/rl-wall-avoider | c6c5d87f3693bfd27f39a4015f361773bf219cd3 | [
"MIT"
] | null | null | null | Game-TestHuman.py | brian1985/rl-wall-avoider | c6c5d87f3693bfd27f39a4015f361773bf219cd3 | [
"MIT"
] | null | null | null | Game-TestHuman.py | brian1985/rl-wall-avoider | c6c5d87f3693bfd27f39a4015f361773bf219cd3 | [
"MIT"
] | null | null | null | from random import randint, choice
from collections import deque
from time import sleep
import pygame, time
import numpy as np
"""
Code to use arduino as input
import serial
import re
board = serial.Serial("/dev/ttyACM0")
data = board.readline()
data = data.decode()
data = re.sub("[^0-9|]", "", data)
xyz = data.spl... | 41.514563 | 116 | 0.528687 | 10,636 | 0.829124 | 0 | 0 | 0 | 0 | 0 | 0 | 3,072 | 0.239476 |
4186fcc1ce90afaf587b5f5bd0c8099ee8a70d32 | 26,536 | py | Python | backend/models_test.py | OmarThinks/PIM-API | b7259dd64b397844b26d5e190df5a8701be0ff85 | [
"MIT"
] | null | null | null | backend/models_test.py | OmarThinks/PIM-API | b7259dd64b397844b26d5e190df5a8701be0ff85 | [
"MIT"
] | null | null | null | backend/models_test.py | OmarThinks/PIM-API | b7259dd64b397844b26d5e190df5a8701be0ff85 | [
"MIT"
] | null | null | null | import json
import unittest
from models import (NotReceived, validate_key,
MyModel, Product,Category,ProductCategory,
populate_tables, db_drop_and_create_all,get_dict,)
#from app import create_app
from __init__ import session
unittest.TestLoader.sortTestMethodsUsing = None
class modelsTestCase(unittest.TestCase):
... | 28.021119 | 77 | 0.690496 | 26,134 | 0.984851 | 0 | 0 | 0 | 0 | 0 | 0 | 9,714 | 0.366069 |
4188e0bdb0246bed574781d83fd5dfac338b69bd | 218 | py | Python | compiler/python_compiler/engines/py3_8/Compiler.py | unknowncoder05/app-architect | 083278e1386562797614f320649ca85d1c44e009 | [
"MIT"
] | 3 | 2021-08-12T12:59:27.000Z | 2021-08-29T15:30:49.000Z | compiler/python_compiler/engines/py3_8/Compiler.py | unknowncoder05/app-architect | 083278e1386562797614f320649ca85d1c44e009 | [
"MIT"
] | null | null | null | compiler/python_compiler/engines/py3_8/Compiler.py | unknowncoder05/app-architect | 083278e1386562797614f320649ca85d1c44e009 | [
"MIT"
] | null | null | null | from utils.flags import *
from .get_fragment_class import get_fragment_class
def compile(blueprint:dict, *, level = 0)->str:
build = get_fragment_class(blueprint, compile, level=level)
return build.compile()
| 27.25 | 63 | 0.756881 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
41894b431af0af154e50d2e462dae772eb97b482 | 1,349 | py | Python | Programs/day_12.py | Yunram/python_training | be3fbab05511716757ecdacef827a16329a85e90 | [
"Apache-2.0"
] | null | null | null | Programs/day_12.py | Yunram/python_training | be3fbab05511716757ecdacef827a16329a85e90 | [
"Apache-2.0"
] | null | null | null | Programs/day_12.py | Yunram/python_training | be3fbab05511716757ecdacef827a16329a85e90 | [
"Apache-2.0"
] | null | null | null | import random
def generate_number():
return random.randint(1, 101)
def user_number():
return int(input("Make a guess: "))
def compare(random_number, user_guess):
if random_number == user_guess:
return "Wow, you win."
elif random_number > user_guess:
return f"{user_guess} is Too Low"
... | 29.326087 | 77 | 0.630096 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 397 | 0.294292 |
418a73ccd36a29573b20675d0e5a6f1331e0f75a | 1,986 | py | Python | jenskipper/cli/patch.py | flupke/jenskipper | bb3de3745142a5b1bf3df40409711ae74fdb07ea | [
"Apache-2.0"
] | 4 | 2016-04-30T12:43:01.000Z | 2016-12-02T17:42:47.000Z | jenskipper/cli/patch.py | Stupeflix/jenskipper | bb3de3745142a5b1bf3df40409711ae74fdb07ea | [
"Apache-2.0"
] | null | null | null | jenskipper/cli/patch.py | Stupeflix/jenskipper | bb3de3745142a5b1bf3df40409711ae74fdb07ea | [
"Apache-2.0"
] | null | null | null | import subprocess
import click
from .. import utils
from .. import exceptions
from .. import jenkins_api
from . import decorators
from . import diff
@click.command()
@decorators.repos_command
@decorators.jobs_command(num_jobs=1)
@decorators.handle_all_errors()
@click.argument('fname', type=click.Path(exists=True, d... | 35.464286 | 78 | 0.624371 | 0 | 0 | 0 | 0 | 1,832 | 0.922457 | 0 | 0 | 583 | 0.293555 |
418c971816ed357865734aae67a50b1c996358f8 | 592 | py | Python | tests/test_planning_graph_planner.py | debbynirwan/planning-graph | 2eb376fc29973e92d123adfd15640935214d3b40 | [
"Apache-2.0"
] | 5 | 2021-03-05T14:42:40.000Z | 2022-02-02T20:23:33.000Z | tests/test_planning_graph_planner.py | debbynirwan/planning-graph | 2eb376fc29973e92d123adfd15640935214d3b40 | [
"Apache-2.0"
] | null | null | null | tests/test_planning_graph_planner.py | debbynirwan/planning-graph | 2eb376fc29973e92d123adfd15640935214d3b40 | [
"Apache-2.0"
] | 2 | 2021-08-23T12:21:48.000Z | 2021-12-27T16:27:44.000Z | from planning_graph.planning_graph_planner import GraphPlanner
from planning_graph.planning_graph import PlanningGraph
class TestGraphPlanner:
def test_plan(self):
planning_graph = PlanningGraph(
'domain/dock-worker-robot-domain.pddl',
'domain/dock-worker-robot-problem.pddl')
... | 32.888889 | 62 | 0.711149 | 470 | 0.793919 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.130068 |
418dbdc2ab0a6e83c7236c8b810a43bb21ee2351 | 2,783 | py | Python | src/mykrobe/stats/stats.py | Phelimb/mykrobe-atlas-cli | 866471d0c2d7030698d37f5c90fd232cafc261d5 | [
"MIT"
] | 1 | 2020-01-10T06:43:22.000Z | 2020-01-10T06:43:22.000Z | src/mykrobe/stats/stats.py | Phelimb/mykrobe-atlas-cli | 866471d0c2d7030698d37f5c90fd232cafc261d5 | [
"MIT"
] | null | null | null | src/mykrobe/stats/stats.py | Phelimb/mykrobe-atlas-cli | 866471d0c2d7030698d37f5c90fd232cafc261d5 | [
"MIT"
] | null | null | null | from math import exp
from math import factorial
from math import log
import logging
logger = logging.getLogger(__name__)
def percent_coverage_from_expected_coverage(coverage):
# With low coverage we expect a lower percent of the sequence to be
# coverage.
return 1 - exp(-coverage)
def log_lik_probabilit... | 33.939024 | 106 | 0.684513 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 704 | 0.252964 |
418fb24b012a503b2e7384627bb584b231c134f7 | 6,660 | py | Python | keras/utils/losses_utils.py | PJmouraocs/keras | 7a39b6c62d43c25472b2c2476bd2a8983ae4f682 | [
"MIT"
] | 259 | 2016-02-09T09:06:29.000Z | 2021-07-29T05:27:40.000Z | keras/utils/losses_utils.py | PJmouraocs/keras | 7a39b6c62d43c25472b2c2476bd2a8983ae4f682 | [
"MIT"
] | 50 | 2016-02-24T14:46:57.000Z | 2020-01-20T07:34:19.000Z | keras/utils/losses_utils.py | PJmouraocs/keras | 7a39b6c62d43c25472b2c2476bd2a8983ae4f682 | [
"MIT"
] | 94 | 2016-02-17T20:59:27.000Z | 2021-04-19T08:18:16.000Z | """Utilities related to losses."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from .. import backend as K
class Reduction(object):
"""Types of loss reduction.
Contains the following values:
* `NONE`: Un-reduced weight... | 37.206704 | 84 | 0.633333 | 832 | 0.124925 | 0 | 0 | 227 | 0.034084 | 0 | 0 | 2,676 | 0.401802 |
418fce67b285434917158142db550cc3c4912d7c | 671 | py | Python | tests/test_utils.py | kelvinxu/blocks | 8081c0f00926e86d20731eb24cf8a61cab3a7529 | [
"BSD-3-Clause"
] | 1 | 2015-10-19T07:54:34.000Z | 2015-10-19T07:54:34.000Z | tests/test_utils.py | kelvinxu/blocks | 8081c0f00926e86d20731eb24cf8a61cab3a7529 | [
"BSD-3-Clause"
] | null | null | null | tests/test_utils.py | kelvinxu/blocks | 8081c0f00926e86d20731eb24cf8a61cab3a7529 | [
"BSD-3-Clause"
] | null | null | null | from numpy.testing import assert_raises
from theano import tensor
from blocks.utils import check_theano_variable, unpack
def test_unpack():
assert unpack((1, 2)) == [1, 2]
assert unpack([1, 2]) == [1, 2]
assert unpack([1]) == 1
test = object()
assert unpack(test) is test
assert_raises(ValueEr... | 29.173913 | 54 | 0.657228 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.035768 |
4191ed02b99fe80f0d4118fb2e70bad9e2f6b771 | 18,531 | py | Python | zeropdk/layout/waveguide_rounding.py | lightwave-lab/zeropdk | cc49eb1008c449185cf9dcdbb283ba086ebd8de0 | [
"MIT"
] | 17 | 2019-08-22T15:55:50.000Z | 2022-02-02T20:52:00.000Z | zeropdk/layout/waveguide_rounding.py | lightwave-lab/zeropdk | cc49eb1008c449185cf9dcdbb283ba086ebd8de0 | [
"MIT"
] | 1 | 2020-09-29T00:43:38.000Z | 2020-10-27T07:15:01.000Z | zeropdk/layout/waveguide_rounding.py | lightwave-lab/zeropdk | cc49eb1008c449185cf9dcdbb283ba086ebd8de0 | [
"MIT"
] | 3 | 2019-09-04T07:48:35.000Z | 2021-06-16T09:39:42.000Z | """ Straight waveguide rounding algorithms"""
from functools import lru_cache
from math import atan2, tan, inf
import numpy as np
import klayout.db as kdb
from zeropdk.layout.geometry import rotate, fix_angle, cross_prod
from zeropdk.layout.algorithms.sampling import sample_function
from zeropdk.layout.waveguides impor... | 29.744783 | 128 | 0.585667 | 3,351 | 0.180336 | 0 | 0 | 248 | 0.013346 | 0 | 0 | 3,707 | 0.199494 |
419209cfa7ba87d275b63ba33aa6f02f592a320e | 3,616 | py | Python | PyHART_tutorial/05_device_specific_commands_for_DDS.py | wdehoog/PyHART | abe410e45d66710f65d5499165aab066c9ad9fa3 | [
"MIT"
] | null | null | null | PyHART_tutorial/05_device_specific_commands_for_DDS.py | wdehoog/PyHART | abe410e45d66710f65d5499165aab066c9ad9fa3 | [
"MIT"
] | null | null | null | PyHART_tutorial/05_device_specific_commands_for_DDS.py | wdehoog/PyHART | abe410e45d66710f65d5499165aab066c9ad9fa3 | [
"MIT"
] | null | null | null | #
# In this module is shown how to send a command to an HART device.
# Encode/decode data, logging and manage responses codes.
#
'''
-------------------------------------------------------------------------------
SAME CODE OF EXAMPLE 01 - IGNORE THIS SECTION
This is included to test the example
-----------... | 29.16129 | 97 | 0.555586 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,555 | 0.430033 |
4192d1cec463e5f4665e763436ee29fbd56e053f | 9,315 | py | Python | productporter/product/views.py | kamidox/weixin_producthunt | 24269da93e75374ee481b1b78257b18abda4d0c7 | [
"BSD-3-Clause"
] | 10 | 2015-01-07T06:01:13.000Z | 2021-02-14T09:11:10.000Z | productporter/product/views.py | kamidox/weixin_producthunt | 24269da93e75374ee481b1b78257b18abda4d0c7 | [
"BSD-3-Clause"
] | 3 | 2015-01-01T09:56:04.000Z | 2015-01-06T01:34:44.000Z | productporter/product/views.py | kamidox/weixin_producthunt | 24269da93e75374ee481b1b78257b18abda4d0c7 | [
"BSD-3-Clause"
] | 5 | 2015-01-01T10:31:50.000Z | 2018-03-09T05:22:16.000Z | #!/bin/env python
# -*- coding: utf-8 -*-
"""
productporter.product.views
~~~~~~~~~~~~~~~~~~~~~~~~~
product blueprint
:copyright: (c) 2014 by the ProductPorter Team.
:license: BSD, see LICENSE for more details.
"""
import datetime
import json
from flask import Blueprint, request, current_app, flas... | 32.231834 | 95 | 0.615137 | 0 | 0 | 0 | 0 | 5,321 | 0.571229 | 0 | 0 | 2,787 | 0.299195 |
41937960edb49006b8dce4b16d90c212ae69d8f7 | 672 | py | Python | tests/wasp1/AllAnswerSets/choice_28.test.py | bernardocuteri/wasp | 05c8f961776dbdbf7afbf905ee00fc262eba51ad | [
"Apache-2.0"
] | 19 | 2015-12-03T08:53:45.000Z | 2022-03-31T02:09:43.000Z | tests/wasp1/AllAnswerSets/choice_28.test.py | bernardocuteri/wasp | 05c8f961776dbdbf7afbf905ee00fc262eba51ad | [
"Apache-2.0"
] | 80 | 2017-11-25T07:57:32.000Z | 2018-06-10T19:03:30.000Z | tests/wasp1/AllAnswerSets/choice_28.test.py | bernardocuteri/wasp | 05c8f961776dbdbf7afbf905ee00fc262eba51ad | [
"Apache-2.0"
] | 6 | 2015-01-15T07:51:48.000Z | 2020-06-18T14:47:48.000Z | input = """
% Similar to choice.12.
% Triggers a bug if we have positive possibly true atoms and no final
% totalised satisfied check for rules and constraints (nor anything
% equivalent).
% Using positive PTs, a, b and c are never PTs.
c :- a,b.
a :- c, not b.
b :- c, not a.
% Both d and e are positive PTs.
% If we... | 24 | 75 | 0.64881 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 652 | 0.970238 |
41938ce4b42c56cae2f2acd965aaf210dc6bfc5f | 415 | py | Python | origins/migrations/0055_alter_activenomen_options.py | dennereed/paleocore | d6da6c39cde96050ee4b9e7213ec1200530cbeee | [
"MIT"
] | 1 | 2021-02-05T19:50:13.000Z | 2021-02-05T19:50:13.000Z | origins/migrations/0055_alter_activenomen_options.py | dennereed/paleocore | d6da6c39cde96050ee4b9e7213ec1200530cbeee | [
"MIT"
] | 59 | 2020-06-17T22:21:51.000Z | 2022-02-10T05:00:01.000Z | origins/migrations/0055_alter_activenomen_options.py | dennereed/paleocore | d6da6c39cde96050ee4b9e7213ec1200530cbeee | [
"MIT"
] | 2 | 2020-07-01T14:11:09.000Z | 2020-08-10T17:27:26.000Z | # Generated by Django 3.2.5 on 2021-07-29 21:01
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('origins', '0054_activenomen'),
]
operations = [
migrations.AlterModelOptions(
name='activenomen',
options={'ordering': ['nam... | 23.055556 | 115 | 0.614458 | 330 | 0.795181 | 0 | 0 | 0 | 0 | 0 | 0 | 167 | 0.40241 |
419429d46af11923cde1d968263d403240c3dfee | 2,241 | py | Python | clintk/cat2vec/feature_selection.py | DITEP/db-cleansing | 9a2360d45bc250b9b1ec73ba7efc2d14b3250c74 | [
"MIT"
] | 5 | 2019-04-19T05:45:20.000Z | 2021-11-16T13:22:07.000Z | clintk/cat2vec/feature_selection.py | DITEP/db-cleansing | 9a2360d45bc250b9b1ec73ba7efc2d14b3250c74 | [
"MIT"
] | null | null | null | clintk/cat2vec/feature_selection.py | DITEP/db-cleansing | 9a2360d45bc250b9b1ec73ba7efc2d14b3250c74 | [
"MIT"
] | null | null | null | """
selects parameters with L1 logistic regression
"""
import pandas as pd
from sklearn.base import BaseEstimator
class LassoSelector(BaseEstimator):
"""
This class is made to be used after cat2vec.lasso_gridsearch since it
selects the features from a dataframe that have the most weighted
coefficient... | 29.486842 | 77 | 0.604641 | 2,123 | 0.947345 | 0 | 0 | 0 | 0 | 0 | 0 | 1,458 | 0.650602 |
419618fdd8ed14916e411a16d95f8129f3073e40 | 163 | py | Python | src/controllers/__init__.py | dennismalmgren/marl | baa846dc4144cf6f53e51d8cf1e2fcf5800c9f95 | [
"Apache-2.0"
] | null | null | null | src/controllers/__init__.py | dennismalmgren/marl | baa846dc4144cf6f53e51d8cf1e2fcf5800c9f95 | [
"Apache-2.0"
] | null | null | null | src/controllers/__init__.py | dennismalmgren/marl | baa846dc4144cf6f53e51d8cf1e2fcf5800c9f95 | [
"Apache-2.0"
] | null | null | null | REGISTRY = {}
from .basic_controller import BasicMAC
from .distri_controller import DistriMAC
REGISTRY["basic_mac"] = BasicMAC
REGISTRY["distri_mac"] = DistriMAC | 23.285714 | 40 | 0.797546 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.141104 |
4197fe5fe8d16fcca6d82bcf73ee4d6614030b79 | 3,407 | py | Python | src/onevision/nn/layer/padding.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/nn/layer/padding.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/nn/layer/padding.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Padding Layers.
"""
from __future__ import annotations
import math
from typing import Union
import torch.nn.functional as F
from torch import nn
from torch import Tensor
from onevision.factory import PADDING_LAYERS
from onevision.type import Int2T
__all__ = [
"... | 29.885965 | 85 | 0.606692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 943 | 0.276783 |
419b7fd6852c60efa1fd82faf32167dd58882039 | 236 | py | Python | demo/use_pickle.py | 1987539447/start-python | 06ee5eb30e7395cd8432e8e33d7209fa855f4ad9 | [
"Apache-2.0"
] | null | null | null | demo/use_pickle.py | 1987539447/start-python | 06ee5eb30e7395cd8432e8e33d7209fa855f4ad9 | [
"Apache-2.0"
] | null | null | null | demo/use_pickle.py | 1987539447/start-python | 06ee5eb30e7395cd8432e8e33d7209fa855f4ad9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# FileName:use_pickle.py
# -*- coding: utf-8 -*-
""" 通过pickle序列化对象"""
import pickle
bob = dict(name='Bob', age=20, score=88)
data = pickle.dumps(bob)
print(data)
re_bob = pickle.loads(data)
print(re_bob)
| 11.8 | 40 | 0.661017 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 108 | 0.432 |
419d836e21b88898e0497e1625d6eddb5fed1199 | 5,349 | py | Python | pycfmodel/model/cf_model.py | donatoaz/pycfmodel | 1586e290b67d2347493dd4a77d2b0c8ee6c0936b | [
"Apache-2.0"
] | null | null | null | pycfmodel/model/cf_model.py | donatoaz/pycfmodel | 1586e290b67d2347493dd4a77d2b0c8ee6c0936b | [
"Apache-2.0"
] | null | null | null | pycfmodel/model/cf_model.py | donatoaz/pycfmodel | 1586e290b67d2347493dd4a77d2b0c8ee6c0936b | [
"Apache-2.0"
] | null | null | null | from datetime import date
from typing import Any, ClassVar, Collection, Dict, List, Optional, Type, Union
from pycfmodel.action_expander import expand_actions
from pycfmodel.constants import AWS_NOVALUE
from pycfmodel.model.base import CustomModel
from pycfmodel.model.parameter import Parameter
from pycfmodel.model.re... | 39.043796 | 125 | 0.665919 | 4,763 | 0.890447 | 0 | 0 | 0 | 0 | 0 | 0 | 2,141 | 0.400262 |
419de91687fa41f1d418876dd9614a95ee81af4f | 39,788 | py | Python | nessus/scans.py | tharvik/nessus | 4551c319ac6cb3026ddb096a0f6f71f060a578ab | [
"CC0-1.0"
] | null | null | null | nessus/scans.py | tharvik/nessus | 4551c319ac6cb3026ddb096a0f6f71f060a578ab | [
"CC0-1.0"
] | null | null | null | nessus/scans.py | tharvik/nessus | 4551c319ac6cb3026ddb096a0f6f71f060a578ab | [
"CC0-1.0"
] | null | null | null | """
sub modules for everything about the scans
"""
from enum import Enum
from uuid import uuid4
from typing import Iterable, Mapping, Union, Optional, MutableMapping
from nessus.base import LibNessusBase
from nessus.editor import NessusTemplate
from nessus.model import lying_exist, lying_type, Object, lying_exist_an... | 41.970464 | 120 | 0.663894 | 39,257 | 0.986654 | 0 | 0 | 18,720 | 0.470494 | 0 | 0 | 6,936 | 0.174324 |
41a06f10c100f3cd38eb1a9e5dbb23f8546f5139 | 10,444 | py | Python | panopticon/wme.py | scyrusm/panopticon | bb28deffb97fd7c983a5abb8c2626c24d9f25e48 | [
"BSD-3-Clause"
] | 3 | 2021-01-14T13:38:32.000Z | 2021-09-07T12:18:48.000Z | panopticon/wme.py | scyrusm/panopticon | bb28deffb97fd7c983a5abb8c2626c24d9f25e48 | [
"BSD-3-Clause"
] | null | null | null | panopticon/wme.py | scyrusm/panopticon | bb28deffb97fd7c983a5abb8c2626c24d9f25e48 | [
"BSD-3-Clause"
] | 2 | 2020-12-22T03:15:27.000Z | 2020-12-22T03:16:50.000Z | """
wme.py
====================================
wme
"""
# second version
import numpy as np
from tqdm import tqdm
import pandas as pd
from scipy import stats
from itertools import islice
from scipy.sparse import coo_matrix, save_npz
from panopticon.utilities import get_valid_gene_info
def get_list_of_gene_windows(ge... | 33.155556 | 203 | 0.578514 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,831 | 0.271065 |
41a106d05012e4ff5dbc04ccdc03a0e70f7b8fee | 4,669 | py | Python | cogs/rr.py | D3monEmper0r/CA-Discord-Bot | 1d38e00582cd0ea84af72a39daedc963256fd57a | [
"MIT"
] | null | null | null | cogs/rr.py | D3monEmper0r/CA-Discord-Bot | 1d38e00582cd0ea84af72a39daedc963256fd57a | [
"MIT"
] | 1 | 2021-03-26T15:41:07.000Z | 2021-03-26T15:41:07.000Z | cogs/rr.py | D3monEmper0r/CA-Discord-Bot | 1d38e00582cd0ea84af72a39daedc963256fd57a | [
"MIT"
] | null | null | null | ##### Imports #####
import discord
import sqlite3
from .__init__ import c
from discord.ext import commands
def create(db):
conn = sqlite3.connect(db)
c = conn.cursor()
newDbTable = """CREATE TABLE IF NOT EXISTS
reactionRole(role TEXT PRIMARY KEY, emote TEXT UNIQUE)"""
c.execute(newDbTable)
co... | 31.126667 | 103 | 0.610409 | 3,483 | 0.743119 | 0 | 0 | 3,261 | 0.695754 | 2,553 | 0.544698 | 785 | 0.167485 |
41a206702b125bc76a8512deb0a07371c7d2b9ff | 1,922 | py | Python | tools/create_transaction_volumes_csv.py | alphagov/backdrop-transactions-explorer-collector | 60aeac8ddaebf46d24e662d907ffa6bdc9d2dfe7 | [
"MIT"
] | null | null | null | tools/create_transaction_volumes_csv.py | alphagov/backdrop-transactions-explorer-collector | 60aeac8ddaebf46d24e662d907ffa6bdc9d2dfe7 | [
"MIT"
] | 2 | 2015-07-22T11:15:08.000Z | 2015-07-22T12:10:52.000Z | tools/create_transaction_volumes_csv.py | alphagov/backdrop-transactions-explorer-collector | 60aeac8ddaebf46d24e662d907ffa6bdc9d2dfe7 | [
"MIT"
] | 2 | 2019-08-29T11:35:44.000Z | 2021-04-10T19:42:13.000Z | #!/usr/bin/env python
import argparse
import csv
import os
import sys
from distutils import dir_util
import unicodecsv
# from lib.filters import digest
from helper import create_parser
from helper import create_directory
from helper import map_services_to_csv_data
from service import Service
path_prefix = '/'
asset... | 28.686567 | 79 | 0.663371 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 456 | 0.237253 |
41a2184952e142a5afb3083c0dbf463ce07bbe9d | 462 | py | Python | eu/softfire/tub/exceptions/exceptions.py | softfire-eu/experiment-manager | 3e44c917e956bac0359a0303f9a3d0708481e1c9 | [
"Apache-2.0"
] | 3 | 2017-05-08T10:45:28.000Z | 2017-08-08T13:18:54.000Z | eu/softfire/tub/exceptions/exceptions.py | softfire-eu/experiment-manager | 3e44c917e956bac0359a0303f9a3d0708481e1c9 | [
"Apache-2.0"
] | null | null | null | eu/softfire/tub/exceptions/exceptions.py | softfire-eu/experiment-manager | 3e44c917e956bac0359a0303f9a3d0708481e1c9 | [
"Apache-2.0"
] | 1 | 2018-07-12T08:19:14.000Z | 2018-07-12T08:19:14.000Z | class _BaseException(Exception):
def __init__(self, message, *args) -> None:
self.message = message
super().__init__(*args)
class ManagerNotFound(_BaseException):
pass
class RpcFailedCall(_BaseException):
pass
class ExperimentValidationError(_BaseException):
pass
class ResourceNo... | 15.931034 | 48 | 0.733766 | 443 | 0.958874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
41a3c225eedd6acf9dfa7630da6b90b21ff018d4 | 18,539 | py | Python | python/erdos/__init__.py | objorkman/erdos | 13b3be477d6674e9e377a56dec484f80ba41e915 | [
"Apache-2.0"
] | null | null | null | python/erdos/__init__.py | objorkman/erdos | 13b3be477d6674e9e377a56dec484f80ba41e915 | [
"Apache-2.0"
] | null | null | null | python/erdos/__init__.py | objorkman/erdos | 13b3be477d6674e9e377a56dec484f80ba41e915 | [
"Apache-2.0"
] | null | null | null | import logging
import multiprocessing as mp
import signal
import sys
from functools import wraps
from typing import Optional, Tuple, Type
import erdos.context
import erdos.internal as _internal
import erdos.operator
import erdos.utils
from erdos.message import Message, WatermarkMessage
from erdos.profile import Profil... | 34.847744 | 87 | 0.663089 | 944 | 0.05092 | 0 | 0 | 1,246 | 0.06721 | 0 | 0 | 8,775 | 0.473327 |
41a3f81d4c1f4c13d941abba84f2c1450266e8a1 | 7,951 | py | Python | compyler/node.py | Fogelman/compyler | 76c6ba12f264131b6a5d800dd40bb76fe3155900 | [
"MIT"
] | null | null | null | compyler/node.py | Fogelman/compyler | 76c6ba12f264131b6a5d800dd40bb76fe3155900 | [
"MIT"
] | null | null | null | compyler/node.py | Fogelman/compyler | 76c6ba12f264131b6a5d800dd40bb76fe3155900 | [
"MIT"
] | null | null | null |
from llvmlite import ir
from rply.token import BaseBox
from abc import ABC, abstractmethod
import operator as op
from compyler.symboltable import FunctionSymbol, SymbolTable
class Node(BaseBox, ABC):
def __init__(self, value, children=None):
self.value = value
self.children = children
i... | 30.003774 | 127 | 0.599673 | 7,721 | 0.971073 | 0 | 0 | 61 | 0.007672 | 0 | 0 | 588 | 0.073953 |
41a41dfe04ba1695c5ba79a312ffef30febd8cc6 | 2,617 | py | Python | tests/test_gnmi.py | dmulyalin/nornir-salt | 184002995515dddc802b578400370c2219e94957 | [
"MIT"
] | 5 | 2021-01-22T09:34:55.000Z | 2021-12-22T08:12:34.000Z | tests/test_gnmi.py | dmulyalin/nornir-salt | 184002995515dddc802b578400370c2219e94957 | [
"MIT"
] | 2 | 2022-01-27T14:46:40.000Z | 2022-02-28T16:59:01.000Z | tests/test_gnmi.py | dmulyalin/nornir-salt | 184002995515dddc802b578400370c2219e94957 | [
"MIT"
] | 1 | 2021-01-10T04:37:08.000Z | 2021-01-10T04:37:08.000Z | """
At the moment this does not tests apat from testing import of PyGNMI library and gNMI
connecton and task plugins.
Was not able to find always-on endpoints that can test using gNMI, Cisco sandboxes has gRPC
API available but that is different.
"""
import sys
import pprint
import logging
import yaml
import pytest
im... | 25.910891 | 91 | 0.680168 | 0 | 0 | 0 | 0 | 63 | 0.024073 | 0 | 0 | 999 | 0.381735 |
41a45c2a64fe8ee34481934f5986ff7aa8e03131 | 6,886 | py | Python | bentoctl_aws_ec2/ec2/ec2_cloudformation_template.py | jjmachan/aws-ec2-deploy | e8a20816a84656502d9c6eb03e944e739efa0c1f | [
"Apache-2.0"
] | 5 | 2021-06-22T10:21:00.000Z | 2021-08-16T12:57:35.000Z | ec2/ec2_cloudformation_template.py | bentoml/aws-ec2-deploy | 6d453fd1afbdb07a080d9d38dcc89f9f6768603a | [
"Apache-2.0"
] | 15 | 2021-08-05T10:29:56.000Z | 2022-03-04T01:35:47.000Z | bentoctl_aws_ec2/ec2/ec2_cloudformation_template.py | jjmachan/aws-ec2-deploy | e8a20816a84656502d9c6eb03e944e739efa0c1f | [
"Apache-2.0"
] | 5 | 2021-06-22T14:39:48.000Z | 2022-03-25T09:19:03.000Z | EC2_CLOUDFORMATION_TEMPLATE = """\
AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31
Description: BentoML load balanced template
Parameters:
AmazonLinux2LatestAmiId:
Type: AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>
Default: {ami_id}
Resources:
SecurityGroupResource:... | 31.587156 | 78 | 0.523671 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,855 | 0.995498 |
41a614b41c6ed87485f48e036058ce573a7b945d | 690 | py | Python | src/tests/benchmarks/tools/bench/AnTuTu6.py | VirtualVFix/AndroidTestFramework | 1feb769c6aca39a78e6daefd6face0a1e4d62cd4 | [
"MIT"
] | null | null | null | src/tests/benchmarks/tools/bench/AnTuTu6.py | VirtualVFix/AndroidTestFramework | 1feb769c6aca39a78e6daefd6face0a1e4d62cd4 | [
"MIT"
] | null | null | null | src/tests/benchmarks/tools/bench/AnTuTu6.py | VirtualVFix/AndroidTestFramework | 1feb769c6aca39a78e6daefd6face0a1e4d62cd4 | [
"MIT"
] | null | null | null | # All rights reserved by forest fairy.
# You cannot modify or share anything without sacrifice.
# If you don't agree, keep calm and don't look at code bellow!
__author__ = "VirtualV <https://github.com/virtualvfix>"
__date__ = "$Apr 12, 2014 4:40:25 PM$"
import ast
from tests.benchmarks.tools.base import App
class ... | 31.363636 | 66 | 0.665217 | 375 | 0.543478 | 0 | 0 | 0 | 0 | 0 | 0 | 252 | 0.365217 |
41a6d2898476c90a1f687ee05cacf8a8f146ec52 | 1,496 | py | Python | osc_bge/users/admin.py | jisuhan3201/osc-bge | 125c441d23d7f1fdb2d9b8f42f859082e757e25a | [
"MIT"
] | null | null | null | osc_bge/users/admin.py | jisuhan3201/osc-bge | 125c441d23d7f1fdb2d9b8f42f859082e757e25a | [
"MIT"
] | 5 | 2020-06-05T19:49:47.000Z | 2021-09-08T00:50:55.000Z | osc_bge/users/admin.py | jisuhan3201/osc-bge | 125c441d23d7f1fdb2d9b8f42f859082e757e25a | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth import admin as auth_admin
from django.contrib.auth import get_user_model
from osc_bge.users.forms import UserChangeForm, UserCreationForm
from . import models
User = get_user_model()
@admin.register(User)
class UserAdmin(auth_admin.UserAdmin):
form = Us... | 22 | 103 | 0.681818 | 972 | 0.649733 | 0 | 0 | 1,237 | 0.826872 | 0 | 0 | 186 | 0.124332 |
41a79266ccd514b38d38bed6f38f0c721bb4fe9e | 3,949 | py | Python | scripts/ros_tensorflow_classify.py | xuanlvxin/blog_backup | 691c040efe4d752b4c4badbdd5dd78960ed966e2 | [
"Apache-2.0"
] | 45 | 2018-05-13T01:55:40.000Z | 2022-03-28T15:20:48.000Z | scripts/ros_tensorflow_classify.py | xuanlvxin/blog_backup | 691c040efe4d752b4c4badbdd5dd78960ed966e2 | [
"Apache-2.0"
] | 1 | 2018-06-06T10:39:02.000Z | 2018-09-05T01:52:19.000Z | scripts/ros_tensorflow_classify.py | xuanlvxin/blog_backup | 691c040efe4d752b4c4badbdd5dd78960ed966e2 | [
"Apache-2.0"
] | 17 | 2018-05-14T12:17:57.000Z | 2020-03-29T09:41:07.000Z | #!/usr/bin/env python
import rospy
from sensor_msgs.msg import Image
from std_msgs.msg import String
from cv_bridge import CvBridge
import cv2
import numpy as np
import tensorflow as tf
import os
import re
class RosTensorFlow():
def __init__(self):
self._session = tf.Session()
self._cv_bri... | 37.971154 | 100 | 0.640669 | 3,066 | 0.776399 | 0 | 0 | 0 | 0 | 0 | 0 | 759 | 0.192201 |
41a7a2ca9d0dcc0caead7e8e09caea9c36c46387 | 3,075 | py | Python | python/v1/generate_default_line_item.py | googleads/googleads-displayvideo-examples | cd1b4b3bc63e068fef4ff23264232a65f70207b5 | [
"Apache-2.0"
] | 2 | 2021-10-08T12:10:38.000Z | 2022-01-23T16:00:12.000Z | python/v1/generate_default_line_item.py | googleads/googleads-displayvideo-examples | cd1b4b3bc63e068fef4ff23264232a65f70207b5 | [
"Apache-2.0"
] | 1 | 2021-04-09T16:34:06.000Z | 2021-04-12T14:42:00.000Z | python/v1/generate_default_line_item.py | googleads/googleads-displayvideo-examples | cd1b4b3bc63e068fef4ff23264232a65f70207b5 | [
"Apache-2.0"
] | 4 | 2021-05-20T17:55:54.000Z | 2022-02-10T14:13:40.000Z | #!/usr/bin/python
#
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 33.791209 | 99 | 0.744715 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,893 | 0.61561 |
41a92c8d5a10768f359c0ce9e4aa075658259077 | 3,897 | py | Python | datacombine/tests/test_models.py | Crimson-Star-Software/data-combine | 3209ae2316afc38417e51c3261494d6e7d2e4e2a | [
"MIT"
] | null | null | null | datacombine/tests/test_models.py | Crimson-Star-Software/data-combine | 3209ae2316afc38417e51c3261494d6e7d2e4e2a | [
"MIT"
] | 3 | 2020-02-11T23:14:53.000Z | 2021-06-10T18:32:57.000Z | datacombine/tests/test_models.py | Crimson-Star-Software/data-combine | 3209ae2316afc38417e51c3261494d6e7d2e4e2a | [
"MIT"
] | null | null | null | from django.test import TestCase
from datacombine import models as dcmodels
from collections import namedtuple
from django.core.exceptions import FieldError
import re
Match = namedtuple("Match", ["object", "regex", "match"])
class PhoneTestCase(TestCase):
def setUp(self):
dcmodels.Phone.objects.create(a... | 36.083333 | 74 | 0.628689 | 3,664 | 0.94021 | 0 | 0 | 0 | 0 | 0 | 0 | 482 | 0.123685 |
41a96ce1cac04188c0692b34694f59bc91f568fc | 560 | py | Python | tests/jdi_uitests_webtests/main/page_objects/pages/home_page.py | jdi-testing/jdi-python | 7c0607b97d4d44b27ea8f532d47c68b8dd00e6f7 | [
"MIT"
] | 5 | 2020-02-14T10:32:01.000Z | 2021-07-22T08:20:28.000Z | tests/jdi_uitests_webtests/main/page_objects/pages/home_page.py | jdi-testing/jdi-python | 7c0607b97d4d44b27ea8f532d47c68b8dd00e6f7 | [
"MIT"
] | 54 | 2018-07-27T14:07:33.000Z | 2021-11-08T09:24:16.000Z | tests/jdi_uitests_webtests/main/page_objects/pages/home_page.py | jdi-testing/jdi-python | 7c0607b97d4d44b27ea8f532d47c68b8dd00e6f7 | [
"MIT"
] | 1 | 2021-01-20T14:31:52.000Z | 2021-01-20T14:31:52.000Z | from JDI.web.selenium.elements.api_interact.find_element_by import By
from JDI.web.selenium.elements.common.image import Image
from JDI.web.selenium.elements.common.link import Link
from JDI.web.selenium.elements.common.text import Text
from JDI.web.selenium.elements.composite.web_page import WebPage
class HomePage(W... | 32.941176 | 69 | 0.753571 | 255 | 0.455357 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.060714 |
41a96db7893cd10b83b375c1bfc15b8901d9c8f4 | 207 | py | Python | api/routes.py | santiagosilas/flask_sample_app | 1a2f19439c1efb25abdccdb26f303f9cff95c911 | [
"MIT"
] | null | null | null | api/routes.py | santiagosilas/flask_sample_app | 1a2f19439c1efb25abdccdb26f303f9cff95c911 | [
"MIT"
] | null | null | null | api/routes.py | santiagosilas/flask_sample_app | 1a2f19439c1efb25abdccdb26f303f9cff95c911 | [
"MIT"
] | null | null | null | from flask import render_template
from api import app
@app.route('/')
@app.route('/home')
def home():
return render_template('index.html', answer = 42)
@app.route('/test')
def test():
return 'test' | 18.818182 | 53 | 0.676329 | 0 | 0 | 0 | 0 | 150 | 0.724638 | 0 | 0 | 35 | 0.169082 |
41a9a2d818ad02b61cfd18575ed9cdd4ecccdb57 | 36,453 | py | Python | Capture the Flag/FirstRound.py | yokesh-git/Quiz-Application | 2b990ee9f711d05956e76ade0550bfa1abd86b08 | [
"MIT"
] | null | null | null | Capture the Flag/FirstRound.py | yokesh-git/Quiz-Application | 2b990ee9f711d05956e76ade0550bfa1abd86b08 | [
"MIT"
] | null | null | null | Capture the Flag/FirstRound.py | yokesh-git/Quiz-Application | 2b990ee9f711d05956e76ade0550bfa1abd86b08 | [
"MIT"
] | null | null | null | from tkinter import *
from firebase import firebase
from PIL import Image, ImageTk
fbconn = firebase.FirebaseApplication('https://samplefbtest-266bd.firebaseio.com/',None)
global crtans
crtans = 0
class FirstRound:
print("Done")
def __init__(self, master):
global w,h,ws,hs,x,y
... | 37.853583 | 206 | 0.555373 | 36,150 | 0.991362 | 0 | 0 | 0 | 0 | 0 | 0 | 5,352 | 0.146771 |
41a9d57be733f7ec06133940f72c9adc60cb07fd | 2,491 | py | Python | swap.py | garrettkatz/ghu | 2bf25ac6f8e82d3e7231c3381f7a4946db6dc59f | [
"MIT"
] | null | null | null | swap.py | garrettkatz/ghu | 2bf25ac6f8e82d3e7231c3381f7a4946db6dc59f | [
"MIT"
] | null | null | null | swap.py | garrettkatz/ghu | 2bf25ac6f8e82d3e7231c3381f7a4946db6dc59f | [
"MIT"
] | null | null | null | """
Swap input (rinp) on output (rout) with one extra registers (rtmp)
"""
import numpy as np
import torch as tr
import matplotlib.pyplot as pt
from ghu import *
from codec import Codec
from controller import Controller
from lvd import lvd
from reinforce import reinforce
if __name__ == "__main__":
print("*********... | 30.753086 | 83 | 0.608591 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 507 | 0.203533 |
41aa2d6b40a21820a8c6f0096cf82ccb5a78479c | 1,103 | py | Python | face-alignment.py | binhmuc/faced | cbc18f552da9c53628d61d56de7dfda451a6e25f | [
"MIT"
] | null | null | null | face-alignment.py | binhmuc/faced | cbc18f552da9c53628d61d56de7dfda451a6e25f | [
"MIT"
] | null | null | null | face-alignment.py | binhmuc/faced | cbc18f552da9c53628d61d56de7dfda451a6e25f | [
"MIT"
] | null | null | null | import face_alignment
from skimage import io
import cv2
from skimage import img_as_float
from skimage import io
import matplotlib.pyplot as plt
from faced import FaceDetector
from faced.utils import annotate_image
import time
fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, face_detector='... | 23.978261 | 94 | 0.664551 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.059837 |
41ac00fd9043a9b17ba6e49efc0299f2d40364b0 | 847 | py | Python | tests/test_fingers/test_theme/test_models.py | sonirico/wpoke | be193a41159dabf912d793eb5a6ebf2f0e9440bb | [
"MIT"
] | 4 | 2019-08-19T12:32:40.000Z | 2019-10-25T20:57:29.000Z | tests/test_fingers/test_theme/test_models.py | sonirico/wpoke | be193a41159dabf912d793eb5a6ebf2f0e9440bb | [
"MIT"
] | 15 | 2019-07-15T18:30:43.000Z | 2020-09-25T08:10:05.000Z | tests/test_fingers/test_theme/test_models.py | sonirico/wpoke | be193a41159dabf912d793eb5a6ebf2f0e9440bb | [
"MIT"
] | null | null | null | import unittest
from wpoke.fingers.theme.models import WPThemeMetadata
from wpoke.fingers.theme.serializers import WPThemeMetadataSerializer
class TestWPThemeMetadata(unittest.TestCase):
def test_serialize_empty_values(self):
wp_metadata_model = WPThemeMetadata()
serializer = WPThemeMetadataSeria... | 35.291667 | 88 | 0.747344 | 702 | 0.828808 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.101535 |
41ae040201f6c28a176e8746c32a9793421e405a | 2,989 | py | Python | src/Config.py | albertomn86/Weather-Station-Receiver | 53745e51e8227ab40ced665ec0083bfd62a951da | [
"Apache-2.0"
] | 1 | 2020-01-13T20:56:49.000Z | 2020-01-13T20:56:49.000Z | src/Config.py | albertomn86/Weather-Station-Receiver | 53745e51e8227ab40ced665ec0083bfd62a951da | [
"Apache-2.0"
] | null | null | null | src/Config.py | albertomn86/Weather-Station-Receiver | 53745e51e8227ab40ced665ec0083bfd62a951da | [
"Apache-2.0"
] | null | null | null | from yaml import safe_load, YAMLError
from os import path
from src.Device import Device
from typing import Any, Optional
class Config(object):
def __init__(self, file: str):
if not path.exists(file):
raise FileNotFoundError(f"Config file not found: {file}")
with open(file, 'r') as s... | 31.797872 | 76 | 0.636333 | 2,862 | 0.957511 | 0 | 0 | 1,395 | 0.466711 | 0 | 0 | 208 | 0.069588 |
41aeaa22875724364cf9ef95a6d424d9dc584608 | 3,687 | py | Python | LinkedInViewer.py | Glavin001/LinkedInProfileViewer | a743385a88b2a38b5d4fcae94b08d27dee43759a | [
"CC0-1.0"
] | 1 | 2015-07-25T16:20:18.000Z | 2015-07-25T16:20:18.000Z | LinkedInViewer.py | Glavin001/LinkedInProfileViewer | a743385a88b2a38b5d4fcae94b08d27dee43759a | [
"CC0-1.0"
] | null | null | null | LinkedInViewer.py | Glavin001/LinkedInProfileViewer | a743385a88b2a38b5d4fcae94b08d27dee43759a | [
"CC0-1.0"
] | null | null | null | import cookielib
import os
import urllib
import urllib2
import re
import string
from BeautifulSoup import BeautifulSoup
from random import random
from time import sleep
cookie_filename = "parser.cookies.txt"
#The script will go through this persons 'also viewed' people. Change this to a profile of any person in the... | 32.342105 | 125 | 0.606455 | 3,168 | 0.859235 | 0 | 0 | 0 | 0 | 0 | 0 | 1,065 | 0.288853 |
41af722e2abcb956634da9556cf5120ca6d46ddf | 6,316 | py | Python | cwVQ.py | USC-MCL/Func-Pool | 20c43df0eb2da68d8d2e01c03d66a1a4e4e06081 | [
"MIT"
] | 3 | 2020-01-24T19:03:44.000Z | 2021-04-13T17:22:36.000Z | cwVQ.py | USC-MCL/Func-Pool | 20c43df0eb2da68d8d2e01c03d66a1a4e4e06081 | [
"MIT"
] | null | null | null | cwVQ.py | USC-MCL/Func-Pool | 20c43df0eb2da68d8d2e01c03d66a1a4e4e06081 | [
"MIT"
] | 3 | 2020-01-24T19:03:45.000Z | 2020-04-13T08:27:13.000Z | # 2020.10.19
# @yifan
# channel-wise VQ
# input is asumed to be DCT/PCA coefficients
#
import numpy as np
from sklearn import cluster
import copy
from skimage.metrics import mean_squared_error
from sklearn.metrics.pairwise import euclidean_distances
from myPCA import myPCA
from util import *
def check_mse(X, km, PSNR_... | 33.417989 | 131 | 0.528816 | 4,954 | 0.784357 | 0 | 0 | 0 | 0 | 0 | 0 | 764 | 0.120963 |
41b0f6b2f2c3b8ff76594cc3ca1e5683847bdfa3 | 3,324 | py | Python | venv/Lib/site-packages/tests/unit/driver/test_base_generic_driver.py | melihteke/ebook_study | 4848ea42e37ee1d6ec777bfc33f49984653ace34 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/tests/unit/driver/test_base_generic_driver.py | melihteke/ebook_study | 4848ea42e37ee1d6ec777bfc33f49984653ace34 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/tests/unit/driver/test_base_generic_driver.py | melihteke/ebook_study | 4848ea42e37ee1d6ec777bfc33f49984653ace34 | [
"MIT"
] | null | null | null | from pathlib import Path
import pytest
import scrapli
from scrapli.response import MultiResponse, Response
TEST_DATA_DIR = f"{Path(scrapli.__file__).parents[1]}/tests/test_data/"
def test_pre_send_command_exception(sync_cisco_iosxe_conn):
with pytest.raises(TypeError) as exc:
sync_cisco_iosxe_conn._pre... | 36.933333 | 139 | 0.737365 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 720 | 0.216606 |
41b1d06924eae19655ba9eb1faf5d08b5dbcc871 | 2,384 | py | Python | polsalt/scrunch1d.py | Richard-Tarbell/polsalt | e953985ffbc786fd071d0b48ebca5bd1dac9a960 | [
"BSD-3-Clause"
] | 1 | 2017-09-22T17:04:06.000Z | 2017-09-22T17:04:06.000Z | polsalt/scrunch1d.py | Richard-Tarbell/polsalt | e953985ffbc786fd071d0b48ebca5bd1dac9a960 | [
"BSD-3-Clause"
] | 14 | 2015-12-22T17:56:38.000Z | 2021-07-30T15:36:23.000Z | polsalt/scrunch1d.py | Richard-Tarbell/polsalt | e953985ffbc786fd071d0b48ebca5bd1dac9a960 | [
"BSD-3-Clause"
] | 12 | 2015-12-21T15:12:44.000Z | 2021-08-12T18:58:12.000Z | #! /usr/bin/env python
# Resample data into new bins, preserving flux
# New version 150912, much faster
# New version 170504, fixed case where output bin coverage is larger than input bin coverage
# New version 170909, again fixed case where output bin coverage is larger than input bin coverage
import os, sys, time, ... | 40.40678 | 98 | 0.622903 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 915 | 0.383809 |
41b20f790b6985bfa1f3757a75cfaedc3ed0233b | 177 | py | Python | yosim/rules/apps.py | thoongnv/yosim | 22bcaceb2c40735363496d9404970a73c4b944bc | [
"MIT"
] | 2 | 2022-02-15T03:41:13.000Z | 2022-02-15T03:44:46.000Z | yosim/rules/apps.py | thoongnv/yosim | 22bcaceb2c40735363496d9404970a73c4b944bc | [
"MIT"
] | 5 | 2021-06-08T22:26:24.000Z | 2022-03-12T00:21:35.000Z | yosim/rules/apps.py | thoongnv/yosim | 22bcaceb2c40735363496d9404970a73c4b944bc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.apps import AppConfig
class RulesConfig(AppConfig):
name = 'yosim.rules'
verbose_name = "Rules"
def ready(self):
pass
| 16.090909 | 33 | 0.627119 | 116 | 0.655367 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.242938 |
41b2fdd3fcfe0d572fb266442a0cede294698396 | 1,157 | py | Python | pacote-download/Ex115a.py | nkonai/Curso-em-video-Python | c05a60b3daa7d448e1e7f0d4d23f62df5d2c8df2 | [
"MIT"
] | null | null | null | pacote-download/Ex115a.py | nkonai/Curso-em-video-Python | c05a60b3daa7d448e1e7f0d4d23f62df5d2c8df2 | [
"MIT"
] | null | null | null | pacote-download/Ex115a.py | nkonai/Curso-em-video-Python | c05a60b3daa7d448e1e7f0d4d23f62df5d2c8df2 | [
"MIT"
] | null | null | null |
print('-'*30)
print('MENU PRINCIPAL'.center(30))
print('-'*30)
print('\033[1;33m1\033[m - \033[1;34mVer pessoas cadastradas\033[m')
print('\033[1;33m2\033[m - \033[1;34mCadastrar nova pessoa\033[m')
print('\033[1;33m3\033[m - \033[1;34mSair do sistema\033[m')
print('-'*30)
def leiaopcao(msg):
while True:
... | 31.27027 | 68 | 0.475367 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 376 | 0.324978 |
41b34f1ab0810f5d2d8176ae3c4ecf1349c413df | 2,169 | py | Python | PosPy/frame/form.py | richierh/PointofSalePy | 54fc11b5f167d361c75b6b1cb890c7020393d46c | [
"Apache-2.0"
] | null | null | null | PosPy/frame/form.py | richierh/PointofSalePy | 54fc11b5f167d361c75b6b1cb890c7020393d46c | [
"Apache-2.0"
] | null | null | null | PosPy/frame/form.py | richierh/PointofSalePy | 54fc11b5f167d361c75b6b1cb890c7020393d46c | [
"Apache-2.0"
] | null | null | null | """Subclass of FForm, which is generated by wxFormBuilder."""
import wx
import frame.mainframe as mainframe
# Implementing FForm
class FFormEvent( mainframe.FForm ):
def __init__( self, parent ):
mainframe.FForm.__init__( self, parent )
self.custom_event()
def custom_event(self): ... | 28.539474 | 63 | 0.600738 | 2,035 | 0.93822 | 0 | 0 | 0 | 0 | 0 | 0 | 349 | 0.160904 |
41b47d2a2fab71fffa7fa7dc8edb5358a58ea4bf | 1,686 | py | Python | neutron_fwaas/tests/unit/cmd/upgrade_checks/test_checks.py | sapcc/neutron-fwaas | 59bad17387d15f86ea7d08f8675208160a999ffe | [
"Apache-2.0"
] | null | null | null | neutron_fwaas/tests/unit/cmd/upgrade_checks/test_checks.py | sapcc/neutron-fwaas | 59bad17387d15f86ea7d08f8675208160a999ffe | [
"Apache-2.0"
] | null | null | null | neutron_fwaas/tests/unit/cmd/upgrade_checks/test_checks.py | sapcc/neutron-fwaas | 59bad17387d15f86ea7d08f8675208160a999ffe | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Red Hat Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 35.87234 | 75 | 0.707592 | 927 | 0.549822 | 0 | 0 | 0 | 0 | 0 | 0 | 696 | 0.412811 |
41b838c1916c793c834d6840367d6af260c3208a | 4,822 | py | Python | licensegh/licensegh.py | sauljabin/licensegh | 01dad5a8934869423feb9bc59854631ab1cb6e08 | [
"MIT"
] | null | null | null | licensegh/licensegh.py | sauljabin/licensegh | 01dad5a8934869423feb9bc59854631ab1cb6e08 | [
"MIT"
] | null | null | null | licensegh/licensegh.py | sauljabin/licensegh | 01dad5a8934869423feb9bc59854631ab1cb6e08 | [
"MIT"
] | null | null | null | import os
import re
import shutil
import git
import yaml
from rich import box
from rich.console import Console
from rich.prompt import Prompt
from rich.table import Table
class Licensegh:
def __init__(self):
self.repository = TemplatesRepository()
self.licenses = []
def init(self):
s... | 29.950311 | 85 | 0.562837 | 4,641 | 0.962464 | 0 | 0 | 0 | 0 | 0 | 0 | 534 | 0.110742 |
41ba22bd38c8d51f5bf64e1e12f05338b9a305b8 | 247 | py | Python | onegreek/universities/views.py | goldhand/onegreek | 1ad105f15608284a9e80802734f0c6222413a4a0 | [
"BSD-3-Clause"
] | 1 | 2019-06-13T11:46:08.000Z | 2019-06-13T11:46:08.000Z | onegreek/universities/views.py | goldhand/onegreek | 1ad105f15608284a9e80802734f0c6222413a4a0 | [
"BSD-3-Clause"
] | null | null | null | onegreek/universities/views.py | goldhand/onegreek | 1ad105f15608284a9e80802734f0c6222413a4a0 | [
"BSD-3-Clause"
] | null | null | null | from rest_framework import viewsets
from .serializers import UniversitySerializer
from .models import University
class UniversityViewSet(viewsets.ModelViewSet):
queryset = University.objects.all()
serializer_class = UniversitySerializer
| 27.444444 | 47 | 0.82996 | 131 | 0.530364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
41bb07f1d7bec345e20d3accf21f60a21b94cceb | 192 | py | Python | ABC104/ABC104a.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | ABC104/ABC104a.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | ABC104/ABC104a.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | # ABC104a
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
r = int(input())
if r < 1200:
print('ABC')
exit(0)
if r < 2800:
print('ARC')
exit(0)
print('AGC')
| 13.714286 | 28 | 0.609375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.125 |
41bc1f9037b836003a997838387cdbfb375a905b | 1,509 | py | Python | com test.py | brainelectronics/Python-Arduino-Communicator | e721c06e4e2731402c61f553c780f6e6ad996587 | [
"FSFAP"
] | null | null | null | com test.py | brainelectronics/Python-Arduino-Communicator | e721c06e4e2731402c61f553c780f6e6ad996587 | [
"FSFAP"
] | 1 | 2015-10-24T14:33:11.000Z | 2015-10-24T14:38:09.000Z | com test.py | brainelectronics/Python-Arduino-Communicator | e721c06e4e2731402c61f553c780f6e6ad996587 | [
"FSFAP"
] | null | null | null | # -*- coding: UTF-8 -*-
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Tower Defense
# Copyright (c) 2015 brainelectronics
# Scharpf, Jonas
#
# All rights reserved.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRES... | 37.725 | 78 | 0.665341 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,392 | 0.922465 |
41be27ee6f0699ebf633e908194ed90a7940707d | 13,708 | py | Python | low_level_simulation/src/path_utilities/src/simulation_util.py | abiantorres/autonomous-vehicles-system-simulation | 3f0112036b2b270f5055729c648a1310976df933 | [
"Apache-2.0"
] | null | null | null | low_level_simulation/src/path_utilities/src/simulation_util.py | abiantorres/autonomous-vehicles-system-simulation | 3f0112036b2b270f5055729c648a1310976df933 | [
"Apache-2.0"
] | null | null | null | low_level_simulation/src/path_utilities/src/simulation_util.py | abiantorres/autonomous-vehicles-system-simulation | 3f0112036b2b270f5055729c648a1310976df933 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import rosbag, rospy, actionlib, time, sys, csv, rospkg, re, os
from gazebo_msgs.msg import ModelState
from std_msgs.msg import Empty
from std_srvs.srv import Empty
from gazebo_msgs.srv import SetModelState
from geometry_msgs.msg import PoseArray
from move_base_msgs.msg import MoveBaseAction, Mov... | 55.723577 | 170 | 0.619273 | 13,113 | 0.956595 | 0 | 0 | 0 | 0 | 0 | 0 | 2,938 | 0.214327 |
41bf0aa7aa8657c18ffec31a5eceb725b9f22e18 | 141 | py | Python | Chapter 07/Chap07_Example7.23.py | bpbpublications/Programming-Techniques-using-Python | 49b785f37e95a3aad1d36cef51e219ac56e5e9f0 | [
"MIT"
] | null | null | null | Chapter 07/Chap07_Example7.23.py | bpbpublications/Programming-Techniques-using-Python | 49b785f37e95a3aad1d36cef51e219ac56e5e9f0 | [
"MIT"
] | null | null | null | Chapter 07/Chap07_Example7.23.py | bpbpublications/Programming-Techniques-using-Python | 49b785f37e95a3aad1d36cef51e219ac56e5e9f0 | [
"MIT"
] | null | null | null | myl1 = [10, 20, -30.1, 'Hello']
list_length = len(myl1)
count = 0
while count<list_length:
print(count, myl1[count])
count +=1
| 20.142857 | 32 | 0.609929 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.049645 |
41c495323f09d70b9547788b90e0defddbe36bbc | 2,371 | py | Python | plugins/intern/markov.py | rbracken/internbot | 58b802e0dd7597ace12acd9342bb938e2f33c25d | [
"BSD-2-Clause"
] | 1 | 2016-09-24T16:00:06.000Z | 2016-09-24T16:00:06.000Z | plugins/intern/markov.py | rbracken/internbot | 58b802e0dd7597ace12acd9342bb938e2f33c25d | [
"BSD-2-Clause"
] | null | null | null | plugins/intern/markov.py | rbracken/internbot | 58b802e0dd7597ace12acd9342bb938e2f33c25d | [
"BSD-2-Clause"
] | null | null | null | import random
""" Credits for this code go to Shabda Raaj, pulled from the article
'Generating pseudo-random text with Markov chains using Python',
which can be found at:
http://agiliq.com/blog/2009/06/generating-pseudo-random-text-with-markov-chains-u/ """
class Markov(object):
def __init__(self, op... | 32.040541 | 90 | 0.557992 | 2,097 | 0.884437 | 388 | 0.163644 | 0 | 0 | 0 | 0 | 456 | 0.192324 |
41c53301d55d3133fde81eb12b2a9be32599efe5 | 3,590 | py | Python | isee/infrastructure/mdengine.py | team-mayes/isEE | c22d7cc78a43f0c0a7b2ec18fbc3b628ddef8d54 | [
"BSD-3-Clause"
] | null | null | null | isee/infrastructure/mdengine.py | team-mayes/isEE | c22d7cc78a43f0c0a7b2ec18fbc3b628ddef8d54 | [
"BSD-3-Clause"
] | 1 | 2021-09-17T18:20:36.000Z | 2021-10-06T16:56:34.000Z | isee/infrastructure/mdengine.py | team-mayes/isEE | c22d7cc78a43f0c0a7b2ec18fbc3b628ddef8d54 | [
"BSD-3-Clause"
] | null | null | null | """
Interface for MDEngine objects. New MDEngines can be implemented by constructing a new class that inherits from MDEngine
and implements its abstract methods.
"""
import abc
import os
import pytraj
import mdtraj
class MDEngine(abc.ABC):
"""
Abstract base class for molecular dynamics engines.
Implement... | 39.888889 | 145 | 0.618106 | 3,369 | 0.93844 | 0 | 0 | 720 | 0.200557 | 0 | 0 | 1,799 | 0.501114 |
41c6f084ce0e27af11e57d81c680c580e271abf4 | 3,899 | py | Python | data/feature_extraction.py | mlcruw/covid-news-analyzer | 76c6a906de20633ff0e325f1ebe669c1e0eac325 | [
"MIT"
] | 8 | 2020-04-11T23:13:58.000Z | 2021-05-06T02:39:45.000Z | data/feature_extraction.py | mlcruw/covid-news-analyzer | 76c6a906de20633ff0e325f1ebe669c1e0eac325 | [
"MIT"
] | null | null | null | data/feature_extraction.py | mlcruw/covid-news-analyzer | 76c6a906de20633ff0e325f1ebe669c1e0eac325 | [
"MIT"
] | 1 | 2020-05-26T01:56:24.000Z | 2020-05-26T01:56:24.000Z | import gensim
from gensim.models import Word2Vec
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
import numpy as np
class FeatureExtractor:
"""
Description
===========
Tranforms text to features
"""
def __init__(self, X_train, X_val, feat='none'):
feat... | 41.042105 | 161 | 0.588356 | 3,751 | 0.962042 | 0 | 0 | 0 | 0 | 0 | 0 | 1,133 | 0.290587 |
41c72ad44a90d0da8b7d83a6acf768aead8bfbf7 | 180 | py | Python | student/filters.py | Floran-Github/Project-code | 186ea185f1a5e57bf3fdc34b31b9979bafef4cfc | [
"Apache-2.0"
] | 3 | 2021-02-02T12:24:44.000Z | 2021-12-28T11:23:11.000Z | student/filters.py | Floran-Github/Project-code | 186ea185f1a5e57bf3fdc34b31b9979bafef4cfc | [
"Apache-2.0"
] | 8 | 2021-03-20T18:51:54.000Z | 2021-09-08T02:39:21.000Z | student/filters.py | Floran-Github/Project-code | 186ea185f1a5e57bf3fdc34b31b9979bafef4cfc | [
"Apache-2.0"
] | 1 | 2020-11-16T11:29:23.000Z | 2020-11-16T11:29:23.000Z | import django_filters
from .models import *
class StudentFilter(django_filters.FilterSet):
class Meta:
model = Student
fields = ['current_year','current_dept'] | 25.714286 | 48 | 0.711111 | 135 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.155556 |