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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
410af5985b4b1c70714faefbc090b58a89a67ddd | 270 | py | Python | main/run_camera_calibrate.py | mcekwonu/pycamera | 0d2c9cb70e8cbc9012e252c06ff1827ae8544cf2 | [
"MIT"
] | null | null | null | main/run_camera_calibrate.py | mcekwonu/pycamera | 0d2c9cb70e8cbc9012e252c06ff1827ae8544cf2 | [
"MIT"
] | null | null | null | main/run_camera_calibrate.py | mcekwonu/pycamera | 0d2c9cb70e8cbc9012e252c06ff1827ae8544cf2 | [
"MIT"
] | null | null | null | """Script to run camera calibration"""
from camera import Camera
camera = Camera(source_dir='/home/mce/Documents/bubble3D/calibration/Cam01', outfilename='Cam01',
target_dir='results/camera', verbose=True)
camera.calibrate()
camera.compute_undistort()
| 30 | 97 | 0.740741 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.403704 |
410b5247c45f5769ae5e7ac2ac703fb1bb25e83e | 1,994 | py | Python | Hub/Program/Other/Class/ZThreadSingle.py | MPZinke/SmartCurtain | ef9976d7a6b982bb044e6fd914fdea4756d5b5c4 | [
"MIT"
] | null | null | null | Hub/Program/Other/Class/ZThreadSingle.py | MPZinke/SmartCurtain | ef9976d7a6b982bb044e6fd914fdea4756d5b5c4 | [
"MIT"
] | 18 | 2020-06-21T02:36:52.000Z | 2022-03-14T04:17:56.000Z | Hub/Program/Other/Class/ZThreadSingle.py | MPZinke/SmartCurtain | ef9976d7a6b982bb044e6fd914fdea4756d5b5c4 | [
"MIT"
] | 1 | 2020-01-19T02:24:38.000Z | 2020-01-19T02:24:38.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "MPZinke"
########################################################################################################################
# #
# cre... | 51.128205 | 120 | 0.336008 | 470 | 0.235707 | 0 | 0 | 0 | 0 | 0 | 0 | 1,496 | 0.750251 |
410eb00a7e9f189e5d58a886e9ad9987223272ea | 783 | py | Python | flasks/conver.py | edgells/python-commons | 38c0aa0ec10304a4147ea231c92c9e34da462052 | [
"MIT"
] | null | null | null | flasks/conver.py | edgells/python-commons | 38c0aa0ec10304a4147ea231c92c9e34da462052 | [
"MIT"
] | null | null | null | flasks/conver.py | edgells/python-commons | 38c0aa0ec10304a4147ea231c92c9e34da462052 | [
"MIT"
] | null | null | null | from flask import Flask
from werkzeug.routing import BaseConverter
class RegexConverter(BaseConverter):
def __init__(self, url_map, *args):
super(RegexConverter, self).__init__(url_map)
self.regex = args[0]
def to_python(self, value):
"""
匹配到的值
:param value:
:... | 19.575 | 53 | 0.583653 | 469 | 0.574051 | 0 | 0 | 110 | 0.134639 | 0 | 0 | 271 | 0.331701 |
4111e0047e651eec2b041b914921035fe36454e5 | 773 | py | Python | trend_analyze/src/model/entity_url.py | popper2710/Trend_Analyze | 0c98bcd7986bdb2d2b9bdc8022bfa08ddf0e7b0f | [
"MIT"
] | null | null | null | trend_analyze/src/model/entity_url.py | popper2710/Trend_Analyze | 0c98bcd7986bdb2d2b9bdc8022bfa08ddf0e7b0f | [
"MIT"
] | 2 | 2020-09-26T14:58:33.000Z | 2021-03-31T20:01:40.000Z | trend_analyze/src/model/entity_url.py | popper2710/Trend_Analyze | 0c98bcd7986bdb2d2b9bdc8022bfa08ddf0e7b0f | [
"MIT"
] | null | null | null | from pyfields import field
from trend_analyze.src.validate import Validate
from trend_analyze.config import *
class EntityUrl:
v = Validate().generate
url: str = field(default=DEFAULT_ENTITY_URL, validators=v(is_blank=True, max_len=150), check_type=True)
start: int = field(default=-1, check_type=True)
... | 32.208333 | 107 | 0.659767 | 659 | 0.852523 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.058215 |
41122da858230ceb4c96eb4a8c7375d59b77bc28 | 8,148 | py | Python | kotti/testing.py | mete0r/Kotti | e89103cc57d5d2af8d60eb8208ae9d04c068f6e7 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | kotti/testing.py | mete0r/Kotti | e89103cc57d5d2af8d60eb8208ae9d04c068f6e7 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | kotti/testing.py | mete0r/Kotti | e89103cc57d5d2af8d60eb8208ae9d04c068f6e7 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Inheritance Diagram
-------------------
.. inheritance-diagram:: kotti.testing
"""
import os
from os.path import join, dirname
from unittest import TestCase
from pytest import mark
from pyramid import testing
from pyramid.events import NewResponse
from pyramid.security import ALL_PERMISS... | 26.627451 | 78 | 0.676976 | 1,835 | 0.225209 | 0 | 0 | 509 | 0.062469 | 0 | 0 | 2,236 | 0.274423 |
4113d55c3875b03d32cbc830fabbfbb2cdd11046 | 694 | py | Python | leetcode/trees/level-order.py | vtemian/interviews-prep | ddef96b5ecc699a590376a892a804c143fe18034 | [
"Apache-2.0"
] | 8 | 2019-05-14T12:50:29.000Z | 2022-03-01T09:08:27.000Z | leetcode/trees/level-order.py | vtemian/interviews-prep | ddef96b5ecc699a590376a892a804c143fe18034 | [
"Apache-2.0"
] | 46 | 2019-03-24T20:59:29.000Z | 2019-04-09T16:28:43.000Z | leetcode/trees/level-order.py | vtemian/interviews-prep | ddef96b5ecc699a590376a892a804c143fe18034 | [
"Apache-2.0"
] | 1 | 2022-01-28T12:46:29.000Z | 2022-01-28T12:46:29.000Z | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def levelOrder(self, root: TreeNode) -> List[List[int]]:
if not root:
return []
result = []
queue = ... | 22.387097 | 60 | 0.487032 | 529 | 0.762248 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 0.224784 |
41141320d4d129bb735e6489daf0039fbb723f89 | 300 | py | Python | Python Files/count_down.py | gerryjenkinslb/cs22-slides-and-py-files | 9474f7a2e50d57afa13edc3b13c008f7295da747 | [
"MIT"
] | 28 | 2019-07-05T04:00:45.000Z | 2022-02-16T09:43:50.000Z | Python Files/count_down.py | gerryjenkinslb/cs22-slides-and-py-files | 9474f7a2e50d57afa13edc3b13c008f7295da747 | [
"MIT"
] | null | null | null | Python Files/count_down.py | gerryjenkinslb/cs22-slides-and-py-files | 9474f7a2e50d57afa13edc3b13c008f7295da747 | [
"MIT"
] | 22 | 2018-10-24T04:42:05.000Z | 2022-02-04T08:17:27.000Z | # simple recursions
def count_down(n): # print n, n-1, n-2, ... , 3, 2, 1
print(n, end=" ")
if n > 1: # check for end case
count_down(n-1) # do smaller problem
print("-"*5, "count down from 10")
count_down(10)
print()
print("-"*5, "count down from 5")
count_down(5)
print()
| 20 | 54 | 0.576667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 141 | 0.47 |
4116fb09afbe45f7f25e769dc8cd6a9b1dcfa4fc | 1,513 | py | Python | src/activations.py | saman-codes/dldojo | 9fd828f1902ba3d46e9bb5f554ef37d07335b29e | [
"MIT"
] | null | null | null | src/activations.py | saman-codes/dldojo | 9fd828f1902ba3d46e9bb5f554ef37d07335b29e | [
"MIT"
] | null | null | null | src/activations.py | saman-codes/dldojo | 9fd828f1902ba3d46e9bb5f554ef37d07335b29e | [
"MIT"
] | null | null | null | # Standard Python
import copy
# Thirdparty
import numpy as np
class Activation():
'''
Base class for an activation layer
Inspired by
https://github.com/eriklindernoren/ML-From-Scratch/blob/master/mlfromscratch/deep_learning/activation_functions.py
'''
def __call__(self, x):
return
... | 19.649351 | 118 | 0.604759 | 1,430 | 0.945142 | 0 | 0 | 0 | 0 | 0 | 0 | 259 | 0.171183 |
411e7327dfc8f59a57e3065bd00dbadcb1b1f18c | 302 | py | Python | mkdir.py | FunsomMars/Timg | 216c994fd0b100996e72f4cda4eace369c8452ef | [
"MIT"
] | null | null | null | mkdir.py | FunsomMars/Timg | 216c994fd0b100996e72f4cda4eace369c8452ef | [
"MIT"
] | null | null | null | mkdir.py | FunsomMars/Timg | 216c994fd0b100996e72f4cda4eace369c8452ef | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2019-07-23 22:47
# @Author : Simon Meng
# @Site :
# @File : mkdir.py
# @Software: PyCharm
import os
# Make a folder under the current path
def mkdir(path):
folder = os.path.exists(path)
if not folder:
os.makedirs(path)
| 17.764706 | 38 | 0.609272 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 185 | 0.612583 |
411fa137c5df36c387a70295ace27f0afc3352fe | 2,183 | py | Python | scripts/create-opencl-headers.py | molkoback/icemet-server | 9d7a29b38c711534923952d598fc37efff5db154 | [
"MIT"
] | null | null | null | scripts/create-opencl-headers.py | molkoback/icemet-server | 9d7a29b38c711534923952d598fc37efff5db154 | [
"MIT"
] | null | null | null | scripts/create-opencl-headers.py | molkoback/icemet-server | 9d7a29b38c711534923952d598fc37efff5db154 | [
"MIT"
] | 1 | 2020-09-16T15:33:23.000Z | 2020-09-16T15:33:23.000Z | import os
import sys
header_file_fmt = "{name}_ocl.hpp"
header_string = (
"#ifndef {definition}_OCL_HPP\n"
"#define {definition}_OCL_HPP\n"
"#include <opencv2/core/ocl.hpp>\n"
"const cv::ocl::ProgramSource& {module}_{name}_ocl() {{\n"
"static cv::ocl::ProgramSource source(\"{module}\", \"{name}\", \"{kernel}\", \"\");... | 27.987179 | 87 | 0.685295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 418 | 0.19148 |
4120f12f58edfe39a3cbad96c6f37cc20266c8ae | 251 | py | Python | main.py | aleattene/lotto-game | 6871699c44c988f926db986668524c002d3560f2 | [
"MIT"
] | null | null | null | main.py | aleattene/lotto-game | 6871699c44c988f926db986668524c002d3560f2 | [
"MIT"
] | null | null | null | main.py | aleattene/lotto-game | 6871699c44c988f926db986668524c002d3560f2 | [
"MIT"
] | null | null | null |
from lotto_game.lotto_game import LottoGame
def main():
# Play Tickets
LottoGame.acquire_tickets()
# Do Extraction
LottoGame.do_extraction()
# Check Results
LottoGame.check_results()
if __name__ == "__main__":
main()
| 14.764706 | 43 | 0.681275 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 0.215139 |
412189bdca83add7a6eee8aca45c35007f4cbdb4 | 256 | py | Python | models/mail_message.py | billhepeng/wx_tools | 64369531bd76a935eff547c50ff68150a240849d | [
"Apache-2.0"
] | 1 | 2021-01-19T02:49:14.000Z | 2021-01-19T02:49:14.000Z | models/mail_message.py | billhepeng/wx_tools | 64369531bd76a935eff547c50ff68150a240849d | [
"Apache-2.0"
] | null | null | null | models/mail_message.py | billhepeng/wx_tools | 64369531bd76a935eff547c50ff68150a240849d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class MailMessage(models.Model):
_inherit = 'mail.message'
weixin_id = fields.Char('微信ID', required=False)
| 21.333333 | 74 | 0.703125 | 119 | 0.457692 | 0 | 0 | 0 | 0 | 0 | 0 | 121 | 0.465385 |
41229bdd678deb184613795447a9a74eef973ea7 | 2,361 | py | Python | src/TheLanguage/Parser/Statements/BinaryStatementParserInfo.py | davidbrownell/DavidBrownell_TheLanguage | 07170b448a0ebd7fa2325c9ccd4cefdb3cf7eb98 | [
"BSL-1.0"
] | null | null | null | src/TheLanguage/Parser/Statements/BinaryStatementParserInfo.py | davidbrownell/DavidBrownell_TheLanguage | 07170b448a0ebd7fa2325c9ccd4cefdb3cf7eb98 | [
"BSL-1.0"
] | null | null | null | src/TheLanguage/Parser/Statements/BinaryStatementParserInfo.py | davidbrownell/DavidBrownell_TheLanguage | 07170b448a0ebd7fa2325c9ccd4cefdb3cf7eb98 | [
"BSL-1.0"
] | 1 | 2021-06-18T18:58:57.000Z | 2021-06-18T18:58:57.000Z | # ----------------------------------------------------------------------
# |
# | BinaryStatementParserInfo.py
# |
# | David Brownell <[email protected]>
# | 2021-10-12 13:55:27
# |
# ----------------------------------------------------------------------
# |
# | Copyright David Brownell 2021
# | Di... | 36.890625 | 79 | 0.454892 | 864 | 0.365947 | 0 | 0 | 182 | 0.077086 | 0 | 0 | 911 | 0.385853 |
4122eec27606ee355d75c58e79851c7226e97614 | 10,947 | py | Python | deprecated/finder_0.1.py | acic2015/findr | ac3061cb056cfe6a151c4096d04bce0d03545032 | [
"MIT"
] | 7 | 2015-11-24T04:44:55.000Z | 2018-02-08T02:13:14.000Z | deprecated/finder_0.1.py | acic2015/findr | ac3061cb056cfe6a151c4096d04bce0d03545032 | [
"MIT"
] | 9 | 2015-11-24T17:43:13.000Z | 2017-09-15T19:37:10.000Z | deprecated/finder_0.1.py | acic2015/findr | ac3061cb056cfe6a151c4096d04bce0d03545032 | [
"MIT"
] | 4 | 2015-12-15T03:39:40.000Z | 2021-07-20T11:28:09.000Z | __author__ = 'Daniel Kapellusch'
import astropy.io.fits as fits
import os
import csv
import json
import sys
import multiprocessing as mp #necessary imports. Note: this is written in python 2.
from os import path
import ConfigParser
from os import system
#necessary imports. Note: this is written in python 2.
global pa... | 37.108475 | 145 | 0.652325 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,556 | 0.416187 |
4122f41a65d52a80ce0e4e61b3b52bf36d00d875 | 3,143 | py | Python | concerned-coyotes/earlyinternet/news/tests.py | Vthechamp22/summer-code-jam-2021 | 0a8bf1f22f6c73300891fd779da36efd8e1304c1 | [
"MIT"
] | 40 | 2020-08-02T07:38:22.000Z | 2021-07-26T01:46:50.000Z | concerned-coyotes/earlyinternet/news/tests.py | Vthechamp22/summer-code-jam-2021 | 0a8bf1f22f6c73300891fd779da36efd8e1304c1 | [
"MIT"
] | 134 | 2020-07-31T12:15:45.000Z | 2020-12-13T04:42:19.000Z | concerned-coyotes/earlyinternet/news/tests.py | Vthechamp22/summer-code-jam-2021 | 0a8bf1f22f6c73300891fd779da36efd8e1304c1 | [
"MIT"
] | 101 | 2020-07-31T12:00:47.000Z | 2021-11-01T09:06:58.000Z | import datetime
import random
from django.test import TestCase
from django.utils.dateparse import parse_datetime
from .models import Article
class ArticleTestCase(TestCase):
def setUp(self) -> None:
self.article = Article.objects.create(
source="HackerNews",
author="Guido van Ro... | 39.2875 | 118 | 0.598473 | 2,997 | 0.953548 | 0 | 0 | 0 | 0 | 0 | 0 | 1,099 | 0.349666 |
4122fe432a52c30c10d6907870148cde9432de71 | 2,648 | py | Python | src/shake/sentence_nlp.py | makergabriel/gearmood | cd0e205e6e22f9f4b33d18d93e5bef5a39b8763e | [
"MIT"
] | null | null | null | src/shake/sentence_nlp.py | makergabriel/gearmood | cd0e205e6e22f9f4b33d18d93e5bef5a39b8763e | [
"MIT"
] | null | null | null | src/shake/sentence_nlp.py | makergabriel/gearmood | cd0e205e6e22f9f4b33d18d93e5bef5a39b8763e | [
"MIT"
] | null | null | null | import nltk
from nltk.tokenize import sent_tokenize
from nltk.tokenize import word_tokenize
from nltk.corpus import wordnet
# TODO move cut words to config
CUT_WORDS = (
"drop",
"cut",
"leave",
"lose",
"trim",
"shed",
"cast",
"unload",
"strike",
"skip",
"throw",
"shake",... | 31.52381 | 95 | 0.60423 | 1,894 | 0.715257 | 0 | 0 | 0 | 0 | 0 | 0 | 1,028 | 0.388218 |
412303d786bf1234fa947a471b024bc73e098561 | 173 | py | Python | Python/Programming Fundamentals/Exams/72. Ad Astra Second.py | teodoramilcheva/softuni-software-engineering | 98dc9faa66f42570f6538fd7ef186d2bd1d39bff | [
"MIT"
] | null | null | null | Python/Programming Fundamentals/Exams/72. Ad Astra Second.py | teodoramilcheva/softuni-software-engineering | 98dc9faa66f42570f6538fd7ef186d2bd1d39bff | [
"MIT"
] | null | null | null | Python/Programming Fundamentals/Exams/72. Ad Astra Second.py | teodoramilcheva/softuni-software-engineering | 98dc9faa66f42570f6538fd7ef186d2bd1d39bff | [
"MIT"
] | null | null | null | Python 3.9.2 (v3.9.2:1a79785e3e, Feb 19 2021, 09:06:10)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>> | 43.25 | 72 | 0.66474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.213873 |
412484a70f53006f985b8a1791e3e361afab8182 | 2,144 | py | Python | tests/test_iam/test_iam_groups.py | mrucci/moto | 076a6a7055ad18908b5661e599648c40b251cdc1 | [
"Apache-2.0"
] | 1 | 2021-03-06T22:01:41.000Z | 2021-03-06T22:01:41.000Z | tests/test_iam/test_iam_groups.py | mrucci/moto | 076a6a7055ad18908b5661e599648c40b251cdc1 | [
"Apache-2.0"
] | 2 | 2016-07-01T03:43:37.000Z | 2016-07-18T19:38:06.000Z | tests/test_iam/test_iam_groups.py | zenefits/moto | 8341c722a8e06decf23fd4b5e67de612accebb80 | [
"Apache-2.0"
] | 1 | 2017-10-19T00:53:28.000Z | 2017-10-19T00:53:28.000Z | from __future__ import unicode_literals
import boto
import sure # noqa
from nose.tools import assert_raises
from boto.exception import BotoServerError
from moto import mock_iam
@mock_iam()
def test_create_group():
conn = boto.connect_iam()
conn.create_group('my-group')
with assert_raises(BotoServerError... | 29.369863 | 122 | 0.712687 | 0 | 0 | 0 | 0 | 1,947 | 0.908116 | 0 | 0 | 461 | 0.215019 |
41252221870a25e5a2cfca108df770ea4c662895 | 2,955 | py | Python | test/test_storage_v1beta1_api.py | Arvinhub/client-python | d67df30f635231d68dc4c20b9b7e234c616c1e6a | [
"Apache-2.0"
] | 1 | 2021-06-16T02:57:18.000Z | 2021-06-16T02:57:18.000Z | test/test_storage_v1beta1_api.py | Arvinhub/client-python | d67df30f635231d68dc4c20b9b7e234c616c1e6a | [
"Apache-2.0"
] | null | null | null | test/test_storage_v1beta1_api.py | Arvinhub/client-python | d67df30f635231d68dc4c20b9b7e234c616c1e6a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: unversioned
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "Licens... | 23.085938 | 105 | 0.666328 | 1,881 | 0.636548 | 0 | 0 | 0 | 0 | 0 | 0 | 1,716 | 0.580711 |
4125c4ef4416a704e2a8626b154e255f03a002cf | 433 | py | Python | rampwf/utils/tests/test_sanitize.py | DimitriPapadopoulos/ramp-workflow | c235e80b81fc8d8a5e0c175df50a55cc58dd78aa | [
"BSD-3-Clause"
] | 66 | 2017-08-31T08:48:45.000Z | 2022-03-21T16:05:31.000Z | rampwf/utils/tests/test_sanitize.py | DimitriPapadopoulos/ramp-workflow | c235e80b81fc8d8a5e0c175df50a55cc58dd78aa | [
"BSD-3-Clause"
] | 265 | 2017-06-02T19:22:38.000Z | 2022-03-31T13:08:00.000Z | rampwf/utils/tests/test_sanitize.py | DimitriPapadopoulos/ramp-workflow | c235e80b81fc8d8a5e0c175df50a55cc58dd78aa | [
"BSD-3-Clause"
] | 44 | 2017-06-03T15:35:58.000Z | 2022-03-31T12:46:42.000Z | import pytest
from rampwf.utils.sanitize import _sanitize_input
def test_sanitize_input():
_sanitize_input('Harmess code')
msg = "forbidden key word open detected"
with pytest.raises(RuntimeError, match=msg):
_sanitize_input("with open('test.txt', 'wr') as fh")
msg = "forbidden key word sca... | 27.0625 | 60 | 0.709007 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 0.330254 |
4127cc56a9b643adacb0505a74b957d4c74ed758 | 118 | py | Python | issues/apps.py | 6aika/o3-6a-kkhprp | de0373733a0f4a936a86f6a19b28ca2e577beb71 | [
"MIT"
] | 6 | 2016-07-08T08:50:51.000Z | 2018-06-06T09:58:43.000Z | issues/apps.py | 6aika/issue-reporting | de0373733a0f4a936a86f6a19b28ca2e577beb71 | [
"MIT"
] | 50 | 2016-04-19T12:22:08.000Z | 2021-09-22T17:39:33.000Z | issues/apps.py | 6aika/o3-6a-kkhprp | de0373733a0f4a936a86f6a19b28ca2e577beb71 | [
"MIT"
] | 5 | 2016-07-08T08:50:56.000Z | 2019-07-06T11:34:42.000Z | from django.apps import AppConfig
class IssuesAppConfig(AppConfig):
name = 'issues'
verbose_name = 'Issues'
| 16.857143 | 33 | 0.728814 | 81 | 0.686441 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.135593 |
412aadfb4c71d1e45e7e11134561c9b5c2fc6eda | 2,018 | py | Python | FileNamePurifier/FileNamePurifier.py | dbpiper/FileNamePurifier | 620088ea3be1b8874609fa769cfb8e6b636d5e8b | [
"MIT"
] | null | null | null | FileNamePurifier/FileNamePurifier.py | dbpiper/FileNamePurifier | 620088ea3be1b8874609fa769cfb8e6b636d5e8b | [
"MIT"
] | null | null | null | FileNamePurifier/FileNamePurifier.py | dbpiper/FileNamePurifier | 620088ea3be1b8874609fa769cfb8e6b636d5e8b | [
"MIT"
] | null | null | null | from Parser import Parser
from LexicalAnalyzer import LexicalAnalyzer
class FileNamePurifier:
def __init__(self, stringAppendToFront, stringAppendToEnd, removeFirstInstanceOfStringsInList, removeAllInstancesOfStringsInList,
substringsToPreserve, oldSeperators, seperatorToUse, breakUpBy... | 46.930233 | 133 | 0.693756 | 1,941 | 0.961843 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
412b47d093592288c113a1eac3194f68134c0446 | 11,406 | py | Python | data/transforms.py | raja21068/Federated-Learning-For-Medical-Images | aa30ce9d8106fd4039188fc56fa99bdc9f46f0e0 | [
"MIT"
] | 27 | 2021-03-05T05:56:35.000Z | 2022-03-30T03:15:43.000Z | data/transforms.py | DiahannWu/FL-MRCM | 946c981a044452333791b7da26609c0874da292c | [
"MIT"
] | 8 | 2021-03-08T10:41:19.000Z | 2021-12-30T04:53:21.000Z | data/transforms.py | DiahannWu/FL-MRCM | 946c981a044452333791b7da26609c0874da292c | [
"MIT"
] | 5 | 2021-03-28T14:02:30.000Z | 2022-01-11T08:31:42.000Z | """
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.
"""
import numpy as np
import torch
def to_tensor(data):
"""
Convert numpy array to PyTorch tensor. For complex arrays, the real and im... | 29.703125 | 115 | 0.608276 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,827 | 0.598545 |
412b523c6ab5df841fbace6c8ecfb1e65fe6d301 | 171 | py | Python | tests/test_entries_to_mt.py | Hagihara-A/migrate-exblog | f5df20e07e74bc1bb14888c143bc43b2d775f666 | [
"MIT"
] | null | null | null | tests/test_entries_to_mt.py | Hagihara-A/migrate-exblog | f5df20e07e74bc1bb14888c143bc43b2d775f666 | [
"MIT"
] | 1 | 2019-01-07T14:34:14.000Z | 2019-01-07T14:34:14.000Z | tests/test_entries_to_mt.py | Hagihara-A/scrape-excite-blog | f5df20e07e74bc1bb14888c143bc43b2d775f666 | [
"MIT"
] | null | null | null | import doctest
from migrate_exblog import entries_to_mt
def load_tests(loader, tests, ignore):
tests.addTests(doctest.DocTestSuite(entries_to_mt))
return tests
| 19 | 55 | 0.795322 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
412d18a2cbe30949e9cef10400c6fc6b33fdbee8 | 97 | py | Python | deeppavlov/utils/server/__init__.py | xbodx/DeepPavlov | 4b60bf162df4294b8b0db3b72786cdd699c674fa | [
"Apache-2.0"
] | 5,893 | 2018-02-01T18:13:20.000Z | 2022-03-31T19:22:21.000Z | deeppavlov/utils/server/__init__.py | xbodx/DeepPavlov | 4b60bf162df4294b8b0db3b72786cdd699c674fa | [
"Apache-2.0"
] | 749 | 2018-01-31T11:36:02.000Z | 2022-03-30T07:24:22.000Z | deeppavlov/utils/server/__init__.py | xbodx/DeepPavlov | 4b60bf162df4294b8b0db3b72786cdd699c674fa | [
"Apache-2.0"
] | 1,155 | 2018-02-01T10:52:15.000Z | 2022-03-29T02:12:15.000Z | from .server import get_server_params, get_ssl_params, redirect_root_to_docs, start_model_server
| 48.5 | 96 | 0.886598 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f5aba0aa3a1bda30d3d5e14338fb55d72ab3b386 | 1,883 | py | Python | b5/lib/state.py | team23/b5 | 90f45e86966eeb7a259667bbe06a5555648d012d | [
"BSD-3-Clause"
] | 14 | 2018-11-24T23:33:35.000Z | 2022-02-04T23:46:49.000Z | b5/lib/state.py | team23/b5 | 90f45e86966eeb7a259667bbe06a5555648d012d | [
"BSD-3-Clause"
] | 3 | 2020-02-10T11:05:11.000Z | 2020-03-04T08:42:11.000Z | b5/lib/state.py | team23/b5 | 90f45e86966eeb7a259667bbe06a5555648d012d | [
"BSD-3-Clause"
] | 1 | 2020-02-11T19:45:13.000Z | 2020-02-11T19:45:13.000Z | import os
import tempfile
from types import TracebackType
from typing import Any, BinaryIO, Optional, TextIO, Type, Union
import yaml
class StoredState:
def __init__(self, state: "State") -> None:
self.state = state
if self.state.stored_name is not None:
raise RuntimeError('You may on... | 28.969231 | 115 | 0.60701 | 1,742 | 0.925119 | 0 | 0 | 203 | 0.107807 | 0 | 0 | 196 | 0.104089 |
f5ac35c88920717e7f434d347b3a61d75f1b9fd5 | 2,711 | py | Python | lines_ext.py | subhrajit02/handwritten-digit-recognision | 239a4bd1283393865d2655b91ad4674ce8450882 | [
"MIT"
] | null | null | null | lines_ext.py | subhrajit02/handwritten-digit-recognision | 239a4bd1283393865d2655b91ad4674ce8450882 | [
"MIT"
] | null | null | null | lines_ext.py | subhrajit02/handwritten-digit-recognision | 239a4bd1283393865d2655b91ad4674ce8450882 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
def rem_multi_lines(lines, thresh):
"""
to remove the multiple lines with close proximity
:param lines: initial list with all the lines(multiple in place of singular)
:param thresh: dist between two lines for them to be considered as same
:return: final list with sin... | 25.101852 | 88 | 0.560679 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 729 | 0.268904 |
f5acb14365decf5cb2d85dfdb8cc3ac0e9ffe41f | 1,553 | py | Python | examples/wmt/tools/scorer/nlm.py | godweiyang/ParaGen | 9665d1244ea38a41fc06b4e0a7f6411985e2221f | [
"Apache-2.0"
] | 50 | 2022-01-18T07:25:46.000Z | 2022-03-14T13:06:18.000Z | examples/wmt/tools/scorer/nlm.py | JiangtaoFeng/ParaGen | 509334bf16e3674e009bb9dc37ecc38ae3b5c977 | [
"Apache-2.0"
] | 2 | 2022-01-19T09:36:42.000Z | 2022-02-23T07:16:02.000Z | examples/wmt/tools/scorer/nlm.py | JiangtaoFeng/ParaGen | 509334bf16e3674e009bb9dc37ecc38ae3b5c977 | [
"Apache-2.0"
] | 6 | 2022-01-19T09:28:53.000Z | 2022-03-10T10:20:08.000Z | # Before running this command, you should firstly run:
# pip install fairseq
# pip install fastBPE
# wget https://dl.fbaipublicfiles.com/fairseq/models/lm/wmt19.en.tar.gz
# tar zxvf wmt19.en.tar.gz
import argparse
from itertools import islice
import numpy as np
from fairseq.models.transformer_lm import TransformerLang... | 36.116279 | 106 | 0.676755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 576 | 0.370895 |
f5accc4b43ec1556256e37986ed9a579a786c19a | 2,742 | py | Python | aioli_openapi/service.py | jimorie/aioli-openapi | 5a5ea6471d332adc8361ad39af7421e4686811fd | [
"MIT"
] | null | null | null | aioli_openapi/service.py | jimorie/aioli-openapi | 5a5ea6471d332adc8361ad39af7421e4686811fd | [
"MIT"
] | null | null | null | aioli_openapi/service.py | jimorie/aioli-openapi | 5a5ea6471d332adc8361ad39af7421e4686811fd | [
"MIT"
] | null | null | null | import warnings
from apispec import APISpec
from apispec.ext.marshmallow import MarshmallowPlugin
from aioli.service import BaseService
from aioli.controller import BaseHttpController
from aioli.exceptions import NoMatchFound
class OpenApiService(BaseService):
_specs = {}
def oas_schema(self, pkg):
... | 31.159091 | 106 | 0.496718 | 2,511 | 0.915755 | 0 | 0 | 0 | 0 | 402 | 0.146608 | 203 | 0.074034 |
f5ae655bb41bdfdac3cd957f9a322f3eb321c3ad | 124 | py | Python | wrangle_scripts/wrangle_data.py | es-g/dash | 443b04593e66f7f2dcea325937eee4683f4c7a13 | [
"MIT"
] | null | null | null | wrangle_scripts/wrangle_data.py | es-g/dash | 443b04593e66f7f2dcea325937eee4683f4c7a13 | [
"MIT"
] | null | null | null | wrangle_scripts/wrangle_data.py | es-g/dash | 443b04593e66f7f2dcea325937eee4683f4c7a13 | [
"MIT"
] | null | null | null | import pandas as pd
import plotly.graph_objs as go
def load_data():
df = pd.read_csv("data/Data.csv")
return df
| 12.4 | 37 | 0.685484 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.120968 |
f5ae7c5fd10eb5c3a55627538569669fa5235f04 | 399 | py | Python | cpdb/popup/factories.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 25 | 2018-07-20T22:31:40.000Z | 2021-07-15T16:58:41.000Z | cpdb/popup/factories.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 13 | 2018-06-18T23:08:47.000Z | 2022-02-10T07:38:25.000Z | cpdb/popup/factories.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 6 | 2018-05-17T21:59:43.000Z | 2020-11-17T00:30:26.000Z | import factory
from faker import Faker
from popup.models import Popup
fake = Faker()
class PopupFactory(factory.django.DjangoModelFactory):
class Meta:
model = Popup
name = factory.LazyFunction(lambda: fake.word())
page = factory.LazyFunction(lambda: fake.word())
title = factory.LazyFunctio... | 23.470588 | 55 | 0.719298 | 309 | 0.774436 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f5afafed15f47453d454c043799fdd7a4422ab1b | 1,863 | py | Python | src_old/tests/delete_migrations.py | rishikesh67/django-tenant-oracle-schemas | 918a64e842b678fc506eadbb4d7e51b0b38ab0a2 | [
"MIT"
] | null | null | null | src_old/tests/delete_migrations.py | rishikesh67/django-tenant-oracle-schemas | 918a64e842b678fc506eadbb4d7e51b0b38ab0a2 | [
"MIT"
] | 8 | 2019-12-04T23:26:11.000Z | 2022-02-10T09:42:18.000Z | src/tests/delete_migrations.py | rishikesh67/django-tenant-oracle-schemas | 918a64e842b678fc506eadbb4d7e51b0b38ab0a2 | [
"MIT"
] | 2 | 2019-06-26T05:31:16.000Z | 2019-07-01T12:22:50.000Z | import os
import glob
import shutil
import logging
# logging.basicConfig(level=logging.DEBUG)
# DEBUG:root:Skipping file /Users/hygull/Projects/Python3/DjangoTenantOracleSchemas/django-tenant-oracle-schemas/src/tenants/models.py
# logging.basicConfig(format='%(asctime)s %(message)s', level=logging.DEBUG)
# 2019-06-2... | 38.8125 | 139 | 0.7343 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,054 | 0.565754 |
f5b0b5d5e4ce7c8e9669a43f27a5226a60590d4f | 6,075 | py | Python | qa2nli/converters/processors.py | nli-for-qa/conversion | 588de7fbbcdeb9698fe888b6e3ece7dfadf25238 | [
"MIT"
] | null | null | null | qa2nli/converters/processors.py | nli-for-qa/conversion | 588de7fbbcdeb9698fe888b6e3ece7dfadf25238 | [
"MIT"
] | null | null | null | qa2nli/converters/processors.py | nli-for-qa/conversion | 588de7fbbcdeb9698fe888b6e3ece7dfadf25238 | [
"MIT"
] | 1 | 2021-07-04T01:59:56.000Z | 2021-07-04T01:59:56.000Z | from typing import Callable, List, Union, Optional, Dict, Tuple
import re
import spacy
import logging
import math
from enum import Enum
logger = logging.getLogger(__name__)
def remove_excess_space(inp: str) -> str:
return ' '.join(inp.split()).strip()
def get_spacy_model(model: str) -> spacy.language.Model:
... | 31.806283 | 82 | 0.597366 | 5,200 | 0.855967 | 0 | 0 | 0 | 0 | 0 | 0 | 877 | 0.144362 |
f5b0c54a48711381cd579c3094b7c9b18f185760 | 2,106 | py | Python | trphysx/data_utils/dataset_cylinder.py | zabaras/transformer-physx | eb28d09957641cc594b3e5acf4ace2e4dc193584 | [
"MIT"
] | 33 | 2020-10-15T06:43:36.000Z | 2022-03-24T10:46:12.000Z | trphysx/data_utils/dataset_cylinder.py | zabaras/transformer-physx | eb28d09957641cc594b3e5acf4ace2e4dc193584 | [
"MIT"
] | 2 | 2021-05-18T14:31:38.000Z | 2021-07-30T18:18:50.000Z | trphysx/data_utils/dataset_cylinder.py | zabaras/transformer-physx | eb28d09957641cc594b3e5acf4ace2e4dc193584 | [
"MIT"
] | 6 | 2020-12-01T05:54:01.000Z | 2022-03-25T21:22:09.000Z | """
=====
Distributed by: Notre Dame SCAI Lab (MIT Liscense)
- Associated publication:
url: https://arxiv.org/abs/2010.03957
doi:
github: https://github.com/zabaras/transformer-physx
=====
"""
import logging
import h5py
import torch
from .dataset_phys import PhysicalDataset
from ..embedding.embedding_model import Embe... | 37.607143 | 121 | 0.61396 | 1,735 | 0.823837 | 0 | 0 | 0 | 0 | 0 | 0 | 737 | 0.349953 |
f5b4beb61d529163a339e65d180ea7a983c8e73d | 359 | py | Python | HLTrigger/Configuration/python/HLT_75e33/paths/L1T_SingleTkMuon_22_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2021-11-30T16:24:46.000Z | 2021-11-30T16:24:46.000Z | HLTrigger/Configuration/python/HLT_75e33/paths/L1T_SingleTkMuon_22_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 4 | 2021-11-29T13:57:56.000Z | 2022-03-29T06:28:36.000Z | HLTrigger/Configuration/python/HLT_75e33/paths/L1T_SingleTkMuon_22_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2021-11-30T16:16:05.000Z | 2021-11-30T16:16:05.000Z | import FWCore.ParameterSet.Config as cms
#from ..modules.hltL1TkMuons_cfi import *
from ..modules.hltL1TkSingleMuFiltered22_cfi import *
from ..sequences.HLTBeginSequence_cfi import *
from ..sequences.HLTEndSequence_cfi import *
L1T_SingleTkMuon_22 = cms.Path(
HLTBeginSequence +
# hltL1TkMuons +
hltL1TkSin... | 25.642857 | 53 | 0.788301 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.167131 |
f5b575448dfd3070de7e8cc30de61a51b143522f | 927 | py | Python | strategies/forest.py | aladics/DeepBugHunter | 564f2417eafc50e99de60d5d6c0a1b4193d1bf8b | [
"Apache-2.0"
] | 6 | 2019-03-01T13:17:09.000Z | 2022-03-07T04:07:04.000Z | strategies/forest.py | aladics/DeepBugHunter | 564f2417eafc50e99de60d5d6c0a1b4193d1bf8b | [
"Apache-2.0"
] | null | null | null | strategies/forest.py | aladics/DeepBugHunter | 564f2417eafc50e99de60d5d6c0a1b4193d1bf8b | [
"Apache-2.0"
] | 2 | 2020-08-02T07:36:00.000Z | 2021-01-13T15:04:00.000Z | import os
import math
import argparse
import dbh_util as util
from sklearn.ensemble import RandomForestClassifier
parser = argparse.ArgumentParser()
parser.add_argument('--n-estimators', type=int, default=10, help='The number of trees in the forest')
parser.add_argument('--max-depth', type=int, default=5, help='Max d... | 34.333333 | 103 | 0.73247 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 190 | 0.204962 |
f5b7476abd3046a860b7d297b7e32e4ae0dcc3db | 9,476 | py | Python | vitrage_tempest_plugin/tests/e2e/test_overlapping_actions.py | openstack/vitrage-tempest-plugin | 69acc7f3ea26f8c3a652cdf9d1fd842dbf9af58f | [
"Apache-2.0"
] | 6 | 2018-08-02T12:11:09.000Z | 2019-03-05T11:45:09.000Z | vitrage_tempest_plugin/tests/e2e/test_overlapping_actions.py | openstack/vitrage-tempest-plugin | 69acc7f3ea26f8c3a652cdf9d1fd842dbf9af58f | [
"Apache-2.0"
] | null | null | null | vitrage_tempest_plugin/tests/e2e/test_overlapping_actions.py | openstack/vitrage-tempest-plugin | 69acc7f3ea26f8c3a652cdf9d1fd842dbf9af58f | [
"Apache-2.0"
] | 1 | 2018-08-22T12:29:54.000Z | 2018-08-22T12:29:54.000Z | # Copyright 2017 - Nokia
#
# 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, sof... | 40.495726 | 78 | 0.646264 | 7,323 | 0.772794 | 0 | 0 | 7,241 | 0.764141 | 0 | 0 | 1,626 | 0.171591 |
f5b80f86d6e5672de1791e2d08c1fbaf96195a02 | 4,137 | py | Python | clone_tests/clone_compilation_errors.py | dcz-purism/glib | eccd097166cdf7dfea9be17869868d45f8ef4ef6 | [
"MIT-0",
"MIT"
] | null | null | null | clone_tests/clone_compilation_errors.py | dcz-purism/glib | eccd097166cdf7dfea9be17869868d45f8ef4ef6 | [
"MIT-0",
"MIT"
] | null | null | null | clone_tests/clone_compilation_errors.py | dcz-purism/glib | eccd097166cdf7dfea9be17869868d45f8ef4ef6 | [
"MIT-0",
"MIT"
] | null | null | null | import json
import os
import subprocess
import sys
TEST_FILENAME = "tmp_py_file"
TEST_FOLDER = "clone_tests"
TESTS = [
("clone!( => move || {})",
"If you have nothing to clone, no need to use this macro!"),
("clone!(|| {})",
"If you have nothing to clone, no need to use this macro!"),
("cl... | 35.358974 | 117 | 0.578922 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,916 | 0.463138 |
f5b9371efb3fb18aace487077f47abfd7957e4b2 | 2,437 | py | Python | tests/test_tags.py | wbcsmarteezgithub/django-snakeoil | ae1a8dab9e14194e48963101ff3349f45aee0ccf | [
"BSD-2-Clause"
] | 1 | 2020-07-03T15:52:25.000Z | 2020-07-03T15:52:25.000Z | tests/test_tags.py | wbcsmarteezgithub/django-snakeoil | ae1a8dab9e14194e48963101ff3349f45aee0ccf | [
"BSD-2-Clause"
] | null | null | null | tests/test_tags.py | wbcsmarteezgithub/django-snakeoil | ae1a8dab9e14194e48963101ff3349f45aee0ccf | [
"BSD-2-Clause"
] | null | null | null | from __future__ import unicode_literals
from django.http import HttpRequest
from django.template import Context, Template, TemplateSyntaxError
from django.test import TestCase
from snakeoil.models import SeoUrl
from .models import TestModel
class GetSeoDataTagTests(TestCase):
def test_invalid_syntax(self):
... | 29.719512 | 66 | 0.531801 | 2,190 | 0.898646 | 0 | 0 | 0 | 0 | 0 | 0 | 609 | 0.249897 |
f5b9906a08803c2fec8e92b95456e8a8ee69c95c | 50 | py | Python | src/runner/__init__.py | Tung-I/nips2019_template | a1fcf35b7633d192d2706a533731cb8c457ac230 | [
"MIT"
] | 11 | 2020-08-09T08:08:56.000Z | 2022-01-18T14:25:22.000Z | src/runner/__init__.py | Tung-I/nips2019_template | a1fcf35b7633d192d2706a533731cb8c457ac230 | [
"MIT"
] | 2 | 2021-09-13T09:48:41.000Z | 2021-11-08T14:20:58.000Z | src/runner/__init__.py | Tung-I/nips2019_template | a1fcf35b7633d192d2706a533731cb8c457ac230 | [
"MIT"
] | 4 | 2020-08-30T14:13:35.000Z | 2021-09-14T09:26:55.000Z | from .trainers import *
from .predictors import *
| 16.666667 | 25 | 0.76 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f5ba98b5a8a467c1237f20ea32bee34cf54cde58 | 420 | py | Python | test/nn/conv/test_gravnet_conv.py | shrey-bansal/pytorch_geometric | 17108a08066b0a73530544d01719b186f2625ef2 | [
"MIT"
] | 2 | 2020-09-08T15:22:08.000Z | 2020-09-08T15:22:09.000Z | test/nn/conv/test_gravnet_conv.py | shrey-bansal/pytorch_geometric | 17108a08066b0a73530544d01719b186f2625ef2 | [
"MIT"
] | null | null | null | test/nn/conv/test_gravnet_conv.py | shrey-bansal/pytorch_geometric | 17108a08066b0a73530544d01719b186f2625ef2 | [
"MIT"
] | 1 | 2021-07-06T06:50:21.000Z | 2021-07-06T06:50:21.000Z | import torch
from torch_geometric.nn import GravNetConv
def test_gravnet_conv():
num_nodes, in_channels, out_channels = 20, 16, 32
x = torch.randn((num_nodes, in_channels))
conv = GravNetConv(in_channels, out_channels, space_dimensions=4,
propagate_dimensions=8, k=12)
assert co... | 32.307692 | 69 | 0.688095 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.064286 |
f5baf25c3fc1ee4bca1c0e0df333ed41bd65f476 | 2,216 | py | Python | base/CrossPlotter.py | pulsatrixwx/PulsatrixWx | aae6ac36e2460dcf7f4a592d709139cd0d6a2e91 | [
"MIT"
] | 3 | 2016-03-27T00:21:46.000Z | 2018-06-01T09:20:57.000Z | base/CrossPlotter.py | pulsatrixwx/PulsatrixWx | aae6ac36e2460dcf7f4a592d709139cd0d6a2e91 | [
"MIT"
] | null | null | null | base/CrossPlotter.py | pulsatrixwx/PulsatrixWx | aae6ac36e2460dcf7f4a592d709139cd0d6a2e91 | [
"MIT"
] | null | null | null | from datetime import datetime
from hootpy import HootPy
class CrossPlotter(HootPy):
"""
CrossPlotter
Purpose: Handles the plotting of cross section products.
Started: 14 June 2010 by Tim Supinie ([email protected])
Completed: [not yet]
Modified: [not yet]
"""
def __init__(self,... | 28.410256 | 108 | 0.581679 | 1,882 | 0.849278 | 0 | 0 | 0 | 0 | 0 | 0 | 1,418 | 0.639892 |
f5bb1ebe52102d71c8810bac844699880019ddf3 | 3,072 | py | Python | management/commands/syncldap.py | LUH-CHI/chiffee | 78ec85d36a6c757e5f56113089f1b56fdb0ed494 | [
"MIT"
] | 1 | 2018-03-22T09:53:06.000Z | 2018-03-22T09:53:06.000Z | management/commands/syncldap.py | LUH-CHI/chiffee | 78ec85d36a6c757e5f56113089f1b56fdb0ed494 | [
"MIT"
] | 4 | 2019-04-01T08:44:40.000Z | 2020-02-07T17:44:16.000Z | management/commands/syncldap.py | LUH-CHI/chiffee | 78ec85d36a6c757e5f56113089f1b56fdb0ed494 | [
"MIT"
] | 4 | 2018-05-04T12:01:50.000Z | 2019-10-11T09:47:33.000Z | import logging
import ldap
from django.conf import settings
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand
from django_auth_ldap.backend import LDAPBackend
from chiffee.models import User
logger = logging.getLogger('syncldap')
# This command synchronizes local data... | 36.571429 | 79 | 0.595378 | 2,619 | 0.852539 | 0 | 0 | 0 | 0 | 0 | 0 | 802 | 0.261068 |
f5bc7050656c4c3afee2238a72f86661143054d5 | 598 | py | Python | pysal/spreg/__init__.py | cubensys/pysal | 8d50990f6e6603ba79ae1a887a20a1e3a0734e51 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | pysal/spreg/__init__.py | cubensys/pysal | 8d50990f6e6603ba79ae1a887a20a1e3a0734e51 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | pysal/spreg/__init__.py | cubensys/pysal | 8d50990f6e6603ba79ae1a887a20a1e3a0734e51 | [
"MIT",
"BSD-3-Clause"
] | 1 | 2021-07-19T01:46:17.000Z | 2021-07-19T01:46:17.000Z | from ols import *
from diagnostics import *
from diagnostics_sp import *
from user_output import *
from twosls import *
from twosls_sp import *
from error_sp import *
from error_sp_het import *
from error_sp_hom import *
from ols_regimes import *
from twosls_regimes import *
from twosls_sp_regimes import *
from error_s... | 24.916667 | 34 | 0.807692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f5bdaf65264833d8c298cbab96f3a7c910693f18 | 209 | py | Python | tests/conftest.py | lambertsbennett/Encountertk | 708aedb38cb1689da8d2f39c68bd8694c64a79da | [
"MIT"
] | null | null | null | tests/conftest.py | lambertsbennett/Encountertk | 708aedb38cb1689da8d2f39c68bd8694c64a79da | [
"MIT"
] | null | null | null | tests/conftest.py | lambertsbennett/Encountertk | 708aedb38cb1689da8d2f39c68bd8694c64a79da | [
"MIT"
] | null | null | null | from pytest import fixture
from encountertk.e_model import EncounterModel, ps_encounter, mean_vol_encountered
@fixture(scope='function')
def EModel():
return EncounterModel(kernel=1,pop2c=[1],pop1c=[1])
| 26.125 | 82 | 0.789474 | 0 | 0 | 0 | 0 | 96 | 0.45933 | 0 | 0 | 10 | 0.047847 |
f5beb267f6635aef6117ff273b49cdca310125ca | 367 | py | Python | jp.atcoder/abc045/abc045_b/8983851.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/abc045/abc045_b/8983851.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/abc045/abc045_b/8983851.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null | import sys
from collections import deque
a, b, c = sys.stdin.read().split()
def main():
deck = dict([("a", deque(a)), ("b", deque(b)), ("c", deque(c))])
p = "a"
while True:
if deck[p]:
p = deck[p].popleft()
else:
return p.upper()
if __name__ == ... | 17.47619 | 69 | 0.46594 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.059946 |
f5bed273a043f28510a7c31520baff8cb6ddab43 | 16,504 | py | Python | src/pipelines/azureml/lightgbm_training.py | microsoft/lightgbm-benchmark | 286668d698d9d166857f924ecb775d5de224d489 | [
"MIT"
] | 13 | 2021-08-20T01:03:51.000Z | 2022-02-12T05:34:46.000Z | src/pipelines/azureml/lightgbm_training.py | microsoft/lightgbm-benchmark | 286668d698d9d166857f924ecb775d5de224d489 | [
"MIT"
] | 199 | 2021-08-21T21:18:53.000Z | 2022-03-27T23:08:44.000Z | src/pipelines/azureml/lightgbm_training.py | microsoft/lightgbm-benchmark | 286668d698d9d166857f924ecb775d5de224d489 | [
"MIT"
] | 4 | 2021-08-20T06:53:26.000Z | 2022-01-24T22:22:39.000Z | """
Runs LightGBM using distributed (mpi) training.
to execute:
> python src/pipelines/azureml/lightgbm_training.py --exp-config conf/experiments/lightgbm_training/cpu.yaml
"""
# pylint: disable=no-member
# NOTE: because it raises 'dict' has no 'outputs' member in dsl.pipeline construction
import os
import sys
import ... | 39.961259 | 154 | 0.673534 | 522 | 0.031629 | 0 | 0 | 11,241 | 0.681108 | 0 | 0 | 5,811 | 0.352096 |
f5bf990b580312d748c5534bd056ce7638df5fe7 | 3,319 | py | Python | twinfield/metadata.py | zypp-io/twinfield | b4306e79f514ae691584c2d47ce072a3619469b8 | [
"Apache-2.0"
] | 4 | 2020-12-20T23:02:33.000Z | 2022-01-13T19:40:13.000Z | twinfield/metadata.py | zypp-io/twinfield | b4306e79f514ae691584c2d47ce072a3619469b8 | [
"Apache-2.0"
] | 9 | 2020-12-18T07:27:07.000Z | 2022-02-17T09:23:51.000Z | twinfield/metadata.py | zypp-io/twinfield | b4306e79f514ae691584c2d47ce072a3619469b8 | [
"Apache-2.0"
] | null | null | null | from xml.etree import ElementTree as Et
import pandas as pd
import requests
from twinfield.core import Base
from twinfield.exceptions import ServerError
from twinfield.messages import METADATA_XML
class Metadata(Base):
def __init__(self, access_token: str, code: str, company: str):
"""
This clas... | 27.658333 | 98 | 0.577584 | 3,117 | 0.939138 | 0 | 0 | 0 | 0 | 0 | 0 | 1,599 | 0.481772 |
f5c0bee32dd9418b4866fcc07b3ab0eea9c2d30b | 172 | py | Python | sru_lm/load_data/__init__.py | Fast-LM-WordEvalRu/SRU-LM | dd69d6c7b7b6c0164e83a874aee5e6f6766070d5 | [
"Apache-2.0"
] | null | null | null | sru_lm/load_data/__init__.py | Fast-LM-WordEvalRu/SRU-LM | dd69d6c7b7b6c0164e83a874aee5e6f6766070d5 | [
"Apache-2.0"
] | null | null | null | sru_lm/load_data/__init__.py | Fast-LM-WordEvalRu/SRU-LM | dd69d6c7b7b6c0164e83a874aee5e6f6766070d5 | [
"Apache-2.0"
] | 2 | 2019-11-06T13:07:30.000Z | 2020-02-04T11:21:19.000Z | # Author: Artem Skiba
# Created: 20/01/2020
from .dataset import FastDataset
from .dataloader import get_dataloader
__all__ = [
'FastDataset', 'get_dataloader'
]
| 17.2 | 38 | 0.726744 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.436047 |
f5c48e8b3a21158680b98773692e8c83b730ba87 | 5,053 | py | Python | libs/complex2epz.py | ledummy/CoMPlEx | f315df7a1b13cfcbdafd9879ff93a974f2e2c38b | [
"MIT"
] | null | null | null | libs/complex2epz.py | ledummy/CoMPlEx | f315df7a1b13cfcbdafd9879ff93a974f2e2c38b | [
"MIT"
] | 1 | 2020-04-08T12:55:50.000Z | 2020-04-08T12:55:50.000Z | libs/complex2epz.py | ledummy/CoMPlEx | f315df7a1b13cfcbdafd9879ff93a974f2e2c38b | [
"MIT"
] | 1 | 2020-04-08T12:44:47.000Z | 2020-04-08T12:44:47.000Z | INIT = 1
REST = ['START_MODSAFE',[0,0]]
NEUTRAL = ['START_MODSAFE',[1,INIT]]
FDBK = ['START_MODSAFE',[2,INIT]]
LIN = ['START_MODSAFE',[3,INIT]]
SIN = ['START_MODSAFE',[4,INIT]]
TYPES = {'Vconst':LIN,'Fconst':FDBK,'Zconst':NEUTRAL}
try:
import epz as tempEpz
import inspect
_,_,keys,_ = inspect.getargspec(... | 23.723005 | 90 | 0.660993 | 3,645 | 0.721354 | 0 | 0 | 0 | 0 | 0 | 0 | 2,954 | 0.584603 |
f5c4f96d849731c4a186b3fef06e21bef4391f32 | 1,177 | py | Python | test/device/test_brakes.py | uOstar/barista | ab62ec6320fb9b5e9c305f23be7fc7e828c25ab1 | [
"MIT"
] | 4 | 2017-11-05T19:37:23.000Z | 2018-06-18T13:18:11.000Z | test/device/test_brakes.py | uOstar/barista | ab62ec6320fb9b5e9c305f23be7fc7e828c25ab1 | [
"MIT"
] | 24 | 2017-11-05T19:22:08.000Z | 2018-06-14T13:50:39.000Z | test/device/test_brakes.py | uorocketry/barista | ab62ec6320fb9b5e9c305f23be7fc7e828c25ab1 | [
"MIT"
] | 1 | 2022-03-25T04:01:25.000Z | 2022-03-25T04:01:25.000Z | import pytest
from mock import patch
from app.device.brakes import Brakes
from app.utils.servo import Servo
from app.utils.exceptions import InvalidArguments
@patch.object(Servo, 'write')
@patch.object(Servo, '__init__')
def test_init_creates_servo_on_pin_21(servo_init_mock, servo_write_mock):
servo_init_mock.ret... | 28.02381 | 75 | 0.773152 | 0 | 0 | 0 | 0 | 1,012 | 0.859813 | 0 | 0 | 51 | 0.043331 |
f5c957427e5b93fcfc4229d7e7efbe7a5cf8ce25 | 601 | py | Python | 4 kyu/Most_frequently_used_words_in_a_text.py | jonathansnolan/Codewars | 9d6a3fd10ffb2c61ae292961f384067cdede0470 | [
"MIT"
] | null | null | null | 4 kyu/Most_frequently_used_words_in_a_text.py | jonathansnolan/Codewars | 9d6a3fd10ffb2c61ae292961f384067cdede0470 | [
"MIT"
] | null | null | null | 4 kyu/Most_frequently_used_words_in_a_text.py | jonathansnolan/Codewars | 9d6a3fd10ffb2c61ae292961f384067cdede0470 | [
"MIT"
] | null | null | null | from collections import Counter
def top_3_words(text):
text = text.lower()
count = ""
j = []
for u in text:
if ord(u) > 96 and ord(u) < 123 or ord(u) == 39:
count += u
else:
j.append(count)
count = ""
i = []
for k in j:
temp = ""
... | 22.259259 | 75 | 0.425957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.013311 |
f5cb0863a83b32aad95be43c48206bffad748391 | 33 | py | Python | test/__init__.py | rbn920/robosync | 1d430f64f6c7156920f92546770a1d2ddb558fea | [
"MIT"
] | null | null | null | test/__init__.py | rbn920/robosync | 1d430f64f6c7156920f92546770a1d2ddb558fea | [
"MIT"
] | null | null | null | test/__init__.py | rbn920/robosync | 1d430f64f6c7156920f92546770a1d2ddb558fea | [
"MIT"
] | null | null | null | '''Test package for robosync'''
| 16.5 | 32 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.969697 |
f5cc6aee2d43d9f8f6fc9d61aea78cd19c169feb | 4,921 | py | Python | tadpole/template/app/lib/auth.py | echoyuanliang/pine | 22175e6aea0ca9b02d6542677b27a690c1501c9c | [
"MIT"
] | 2 | 2017-12-02T07:02:31.000Z | 2020-10-13T02:20:18.000Z | tadpole/template/app/lib/auth.py | echoyuanliang/pine | 22175e6aea0ca9b02d6542677b27a690c1501c9c | [
"MIT"
] | null | null | null | tadpole/template/app/lib/auth.py | echoyuanliang/pine | 22175e6aea0ca9b02d6542677b27a690c1501c9c | [
"MIT"
] | 1 | 2018-04-23T04:59:38.000Z | 2018-04-23T04:59:38.000Z | #!/usr/bin/env python
# coding: utf-8
"""
create at 2017/11/22 by allen
"""
import re
from flask import request, session, current_app
from app.lib.constant import ResourceType
from app.models.auth import Resource, role_resource, Role, user_role, User
from app.lib.exceptions import AuthError, PermissionError
cla... | 30.190184 | 79 | 0.65251 | 4,486 | 0.911603 | 0 | 0 | 1,139 | 0.231457 | 0 | 0 | 313 | 0.063605 |
f5d03f80ba9950414b41050d76a8ec9d43425ee6 | 656 | py | Python | src/easy/plus_one_66.py | ahmet9cengiz/leetCode | 9e9a61f059072d7791dd19706b7a3e0d0a446669 | [
"MIT"
] | null | null | null | src/easy/plus_one_66.py | ahmet9cengiz/leetCode | 9e9a61f059072d7791dd19706b7a3e0d0a446669 | [
"MIT"
] | null | null | null | src/easy/plus_one_66.py | ahmet9cengiz/leetCode | 9e9a61f059072d7791dd19706b7a3e0d0a446669 | [
"MIT"
] | null | null | null | class Solution(object):
# Time Complexity: O(n)
@staticmethod
def plus_one(digits):
keep_going = True
for i, e in reversed(list(enumerate(digits))):
if keep_going:
if e == 9:
digits[i] = 0
else:
digits[i] +=... | 24.296296 | 69 | 0.464939 | 577 | 0.879573 | 0 | 0 | 520 | 0.792683 | 0 | 0 | 33 | 0.050305 |
f5d07d12c4b5747b9b1b9f630c617df1ba338e16 | 1,607 | py | Python | timetracker/vms/test/models/test_client_admin_invite_model.py | comp523-jarvis/timetracker-web | af638f0b3aab8a69a974bdb9a18118198488657c | [
"Apache-2.0"
] | 1 | 2019-04-09T16:46:53.000Z | 2019-04-09T16:46:53.000Z | timetracker/vms/test/models/test_client_admin_invite_model.py | comp523-jarvis/timetracker-web | af638f0b3aab8a69a974bdb9a18118198488657c | [
"Apache-2.0"
] | 105 | 2018-10-12T17:57:20.000Z | 2020-06-05T19:35:21.000Z | timetracker/vms/test/models/test_client_admin_invite_model.py | comp523-jarvis/timetracker-web | af638f0b3aab8a69a974bdb9a18118198488657c | [
"Apache-2.0"
] | 1 | 2019-04-11T14:43:42.000Z | 2019-04-11T14:43:42.000Z | from django.conf import settings
from django.template.loader import render_to_string
from vms import models
def test_accept(client_admin_invite_factory, user_factory):
"""
Accepting the invitation should create a new client admin for the
user who accepts.
"""
invite = client_admin_invite_factory(... | 27.706897 | 72 | 0.701929 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 534 | 0.332296 |
f5d0bd552a2206b2e1b134ade80b6b88f2ce3b53 | 3,489 | py | Python | _from_pydot/lambdas/dev/pyppeteer.py | owasp-sbot/pbx-gs-python-utils | f448aa36c4448fc04d30c3a5b25640ea4d44a267 | [
"Apache-2.0"
] | 3 | 2018-12-14T15:43:46.000Z | 2019-04-25T07:44:58.000Z | _from_pydot/lambdas/dev/pyppeteer.py | owasp-sbot/pbx-gs-python-utils | f448aa36c4448fc04d30c3a5b25640ea4d44a267 | [
"Apache-2.0"
] | 1 | 2019-05-11T14:19:37.000Z | 2019-05-11T14:51:04.000Z | _from_pydot/lambdas/dev/pyppeteer.py | owasp-sbot/pbx-gs-python-utils | f448aa36c4448fc04d30c3a5b25640ea4d44a267 | [
"Apache-2.0"
] | 4 | 2018-12-27T04:54:14.000Z | 2019-05-11T14:07:47.000Z | import base64
import os
import asyncio
from pbx_gs_python_utils.utils.Process import Process
from osbot_aws.Dependencies import load_dependency
def run(event, context):
load_dependency("pyppeteer") # (on first run downloads a zip file from S3 to /tmp/lambdas-dependencies/pyppeteer/ whic... | 67.096154 | 162 | 0.509888 | 0 | 0 | 0 | 0 | 0 | 0 | 1,402 | 0.401719 | 1,373 | 0.39341 |
f5d23a181d6fd76675487606efe26f43a22cb25e | 2,757 | py | Python | filter_plugins/net_textfsm_parse.py | iamroddo/ansible_helpers | 420b9d7a1bb637f52209aeeea4cd424d03cf4eef | [
"Apache-2.0"
] | 44 | 2017-05-19T19:55:39.000Z | 2022-02-08T17:21:22.000Z | filter_plugins/net_textfsm_parse.py | iamroddo/ansible_helpers | 420b9d7a1bb637f52209aeeea4cd424d03cf4eef | [
"Apache-2.0"
] | 2 | 2017-07-17T14:28:23.000Z | 2020-12-11T15:54:00.000Z | filter_plugins/net_textfsm_parse.py | iamroddo/ansible_helpers | 420b9d7a1bb637f52209aeeea4cd424d03cf4eef | [
"Apache-2.0"
] | 18 | 2017-07-27T07:58:34.000Z | 2021-06-06T04:06:33.000Z | """
Filter to convert results from network device show commands obtained from ios_command,
eos_command, et cetera to structured data using TextFSM templates.
"""
from __future__ import unicode_literals
from __future__ import print_function
import os
from textfsm.clitable import CliTableError
import textfsm.clitable a... | 32.821429 | 93 | 0.696772 | 297 | 0.107726 | 0 | 0 | 0 | 0 | 0 | 0 | 1,026 | 0.372144 |
f5d2d84344ef95aeed5c0f078a4e133508f0ccd9 | 5,705 | py | Python | firebaseClient/firebaseClientGPIO.py | tabris2015/personCounter | 0cd7f8698afefdd9e913a97820b9ff9c01752274 | [
"MIT"
] | null | null | null | firebaseClient/firebaseClientGPIO.py | tabris2015/personCounter | 0cd7f8698afefdd9e913a97820b9ff9c01752274 | [
"MIT"
] | null | null | null | firebaseClient/firebaseClientGPIO.py | tabris2015/personCounter | 0cd7f8698afefdd9e913a97820b9ff9c01752274 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import threading
import Queue
import serial
import time
from datetime import datetime
from firebase import firebase
import sqlite3
from datetime import datetime, timedelta
from gpiozero import Button, LED
#///////////////////////////////////////////
import firebase_admin
from firebase_admin import c... | 26.784038 | 103 | 0.540053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,198 | 0.209991 |
f5d40b58d32d09631a74deab03cacd263794a4ed | 3,204 | py | Python | look-for.py | barnesrobert/find-aws-resource-in-all-accounts | 5f02aacca3ce3a28894d7d497c4158ed9b08c238 | [
"Apache-2.0"
] | null | null | null | look-for.py | barnesrobert/find-aws-resource-in-all-accounts | 5f02aacca3ce3a28894d7d497c4158ed9b08c238 | [
"Apache-2.0"
] | null | null | null | look-for.py | barnesrobert/find-aws-resource-in-all-accounts | 5f02aacca3ce3a28894d7d497c4158ed9b08c238 | [
"Apache-2.0"
] | null | null | null | #--------------------------------------------------------------------------------------------------
# Function: look-for
# Purpose: Loops through all AWS accounts and regions within an Organization to find a specific resource
# Inputs:
#
# {
# "view_only": "true|false",
# "regions": ["us-east-1", ...]
# }
#... | 32.693878 | 105 | 0.542447 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,696 | 0.529338 |
f5d6cff69b0e62527106143d8be0c05d4bcd4fe7 | 2,972 | py | Python | opennem/spiders/aemo/monitoring.py | paulculmsee/opennem | 9ebe4ab6d3b97bdeebc352e075bbd5c22a8ddea1 | [
"MIT"
] | 22 | 2020-06-30T05:27:21.000Z | 2022-02-21T12:13:51.000Z | opennem/spiders/aemo/monitoring.py | paulculmsee/opennem | 9ebe4ab6d3b97bdeebc352e075bbd5c22a8ddea1 | [
"MIT"
] | 71 | 2020-08-07T13:06:30.000Z | 2022-03-15T06:44:49.000Z | opennem/spiders/aemo/monitoring.py | paulculmsee/opennem | 9ebe4ab6d3b97bdeebc352e075bbd5c22a8ddea1 | [
"MIT"
] | 13 | 2020-06-30T03:28:32.000Z | 2021-12-30T08:17:16.000Z | import logging
from typing import Any, Dict
from pydantic import ValidationError
from scrapy import Spider
from scrapy.http import Response
from opennem.pipelines.aemo.downloads import DownloadMonitorPipeline
from opennem.schema.aemo.downloads import AEMOFileDownloadSection
from opennem.utils.dates import parse_date
... | 37.620253 | 175 | 0.657133 | 2,545 | 0.856326 | 0 | 0 | 0 | 0 | 0 | 0 | 666 | 0.224092 |
f5d87e21f9ec6f8ae018914ba1e9c0e382bc83dd | 319 | py | Python | python/13/servo.py | matsujirushi/raspi_parts_kouryaku | 35cd6f34d21c5e3160636671175fa8d5aff2d4dc | [
"Apache-2.0"
] | 6 | 2022-03-05T02:36:57.000Z | 2022-03-12T12:31:27.000Z | python/13/servo.py | matsujirushi/raspi_parts_kouryaku | 35cd6f34d21c5e3160636671175fa8d5aff2d4dc | [
"Apache-2.0"
] | null | null | null | python/13/servo.py | matsujirushi/raspi_parts_kouryaku | 35cd6f34d21c5e3160636671175fa8d5aff2d4dc | [
"Apache-2.0"
] | null | null | null | import wiringpi as pi
pi.wiringPiSetupGpio()
pi.pinMode(18, pi.PWM_OUTPUT)
pi.pwmSetMode(pi.PWM_MODE_MS)
pi.pwmSetClock(2)
pi.pwmSetRange(192000)
while True:
for i in list(range(-90, 90, 10)) + list(range(90, -90, -10)):
pi.pwmWrite(18, int(((i + 90) / 180 * (2.4 - 0.5) + 0.5) / 20 * 192000))
pi.delay(200)
| 26.583333 | 76 | 0.652038 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f5d9d9ea4f3e787d1de8f24aa36d4dcbede900ec | 2,549 | py | Python | src/vswarm/object_detection/blob_detector.py | Faust-Wang/vswarm | d18ce643218c18ef1e762f40562104b2a0926ad7 | [
"MIT"
] | 21 | 2021-03-03T10:51:46.000Z | 2022-03-28T11:00:35.000Z | src/vswarm/object_detection/blob_detector.py | Faust-Wang/vswarm | d18ce643218c18ef1e762f40562104b2a0926ad7 | [
"MIT"
] | 2 | 2021-07-21T07:57:16.000Z | 2022-03-17T12:41:51.000Z | src/vswarm/object_detection/blob_detector.py | hvourtsis/vswarm | d18ce643218c18ef1e762f40562104b2a0926ad7 | [
"MIT"
] | 8 | 2021-02-27T14:29:55.000Z | 2022-01-05T19:40:38.000Z | import cv2 as cv
from geometry_msgs.msg import Pose2D
from vision_msgs.msg import (BoundingBox2D, Detection2D, Detection2DArray,
ObjectHypothesisWithPose)
THRESHOLD_MAX = 255
THRESHOLD = 240
class BlobDetector:
def __init__(self):
pass
def detect_multi(self, images):
... | 32.265823 | 85 | 0.59592 | 2,325 | 0.912122 | 0 | 0 | 0 | 0 | 0 | 0 | 434 | 0.170263 |
f5dc231bdf053f390dc67dc11fbefb6147ad20d2 | 188 | py | Python | setup.py | wicrep/triplet-reid | 251c24d828e223de75b45ae65aa3f38171f9676b | [
"MIT"
] | null | null | null | setup.py | wicrep/triplet-reid | 251c24d828e223de75b45ae65aa3f38171f9676b | [
"MIT"
] | null | null | null | setup.py | wicrep/triplet-reid | 251c24d828e223de75b45ae65aa3f38171f9676b | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name="triplet-reid",
version="0.1.0",
description="Triplet-based Person Re-Identification",
packages=find_packages(),
)
| 20.888889 | 57 | 0.712766 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.324468 |
f5dc6d973bebdd28a311046ec3c5d189663906f8 | 530 | py | Python | sentences.py | vanatteveldt/perspectives | 6d537082b915ccde15031d94983bd2d575cdc380 | [
"MIT"
] | null | null | null | sentences.py | vanatteveldt/perspectives | 6d537082b915ccde15031d94983bd2d575cdc380 | [
"MIT"
] | null | null | null | sentences.py | vanatteveldt/perspectives | 6d537082b915ccde15031d94983bd2d575cdc380 | [
"MIT"
] | null | null | null | import csv
import sys
from KafNafParserPy import KafNafParser
from naflib import *
woorden = [r['original'] for r in csv.DictReader(open("klimaatwoorden.csv"))]
o = csv.writer(sys.stdout)
o.writerow(["file", "sentence", "term", "text"])
for fn in sys.argv[1:]:
naf = KafNafParser(fn)
for klimaterm in find_te... | 27.894737 | 85 | 0.677358 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.115094 |
f5dd11fe9a9263410d61440cc6794ca854255416 | 1,127 | py | Python | view/user/__init__.py | archever/flask-web | cd120f64deec31fd1a87285372abaa22fc379b9f | [
"MIT"
] | null | null | null | view/user/__init__.py | archever/flask-web | cd120f64deec31fd1a87285372abaa22fc379b9f | [
"MIT"
] | null | null | null | view/user/__init__.py | archever/flask-web | cd120f64deec31fd1a87285372abaa22fc379b9f | [
"MIT"
] | null | null | null | # coding=utf-8
from flask import Blueprint, render_template, redirect
from controlers.user import UserCtr
from libs.login import login_user, logout_user, current_user
bp = Blueprint("user", __name__, url_prefix="/user")
@bp.route("/login", methods=["GET"])
def login_form():
return render_template("user/login.htm... | 23.978723 | 60 | 0.668146 | 0 | 0 | 0 | 0 | 907 | 0.793526 | 0 | 0 | 203 | 0.177603 |
f5deb3f2744fe175063b1c389f169973e74ce044 | 9,607 | py | Python | recipes/Python/52275_sparse_dictionary_based_sparse_matrix/recipe-52275.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/52275_sparse_dictionary_based_sparse_matrix/recipe-52275.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/52275_sparse_dictionary_based_sparse_matrix/recipe-52275.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | #!/usr/bin/env python
import vector
import math, types, operator
"""
A sparse matrix class based on a dictionary, supporting matrix (dot)
product and a conjugate gradient solver.
In this version, the sparse class inherits from the dictionary; this
requires Python 2.2 or later.
"""
class sparse(dict):
"""
A compl... | 22.819477 | 90 | 0.565525 | 5,822 | 0.606016 | 0 | 0 | 0 | 0 | 0 | 0 | 2,363 | 0.245966 |
f5dedc85895871ad1a7086cfc4fa5d80500516b2 | 7,557 | py | Python | bibref_parser/parser.py | glooney/python-bibref-parser | 9ca6b99a917659425fe7b4759f523c78f0180124 | [
"MIT"
] | null | null | null | bibref_parser/parser.py | glooney/python-bibref-parser | 9ca6b99a917659425fe7b4759f523c78f0180124 | [
"MIT"
] | null | null | null | bibref_parser/parser.py | glooney/python-bibref-parser | 9ca6b99a917659425fe7b4759f523c78f0180124 | [
"MIT"
] | null | null | null | import re
class BibRefParser:
def __init__(self):
self.reset()
def reset(self, reference=''):
self._ref = reference
self.reference = reference
self.title = ''
self.authors = ''
# publication date
self.date = ''
self.publisher = ''
self... | 34.040541 | 93 | 0.382162 | 7,550 | 0.998281 | 0 | 0 | 117 | 0.01547 | 0 | 0 | 3,053 | 0.403676 |
f5e083f241a88c8c9d72629bf0fc59c5c51dd648 | 392 | py | Python | FlaskApp/sql_connection.py | pjneelam/pjneelam.eportfolio2022 | 3f55c1da6214e3eabab949ff83b34c0553c52866 | [
"CC-BY-3.0"
] | null | null | null | FlaskApp/sql_connection.py | pjneelam/pjneelam.eportfolio2022 | 3f55c1da6214e3eabab949ff83b34c0553c52866 | [
"CC-BY-3.0"
] | null | null | null | FlaskApp/sql_connection.py | pjneelam/pjneelam.eportfolio2022 | 3f55c1da6214e3eabab949ff83b34c0553c52866 | [
"CC-BY-3.0"
] | null | null | null | #https://www.youtube.com/watch?v=f9PR1qcwOyg
#create global convention
import mysql.connector
__cnx=None
def get_sql_connection():
global __cnx
if __cnx is None:
__cnx = mysql.connector.connect(user='root', password='password',
host='127.0.0.1',
... | 30.153846 | 74 | 0.584184 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 112 | 0.285714 |
f5e2b3958e10bba2c1126d9063cd6d9ca99a6bc2 | 1,217 | py | Python | kernellib/utils/visualization.py | jejjohnson/kernellib | eb9f80c1b605c8a6b5e8a324efd4ef07d8f59050 | [
"MIT"
] | 1 | 2021-02-04T08:52:04.000Z | 2021-02-04T08:52:04.000Z | kernellib/utils/visualization.py | jejjohnson/kernellib | eb9f80c1b605c8a6b5e8a324efd4ef07d8f59050 | [
"MIT"
] | null | null | null | kernellib/utils/visualization.py | jejjohnson/kernellib | eb9f80c1b605c8a6b5e8a324efd4ef07d8f59050 | [
"MIT"
] | 1 | 2018-04-17T06:42:09.000Z | 2018-04-17T06:42:09.000Z | import matplotlib.pyplot as plt
def plot_gp(xtest, predictions, std=None, xtrain=None, ytrain=None, title=None, save_name=None):
xtest, predictions = xtest.squeeze(), predictions.squeeze()
fig, ax = plt.subplots()
# Plot the training data
if (xtrain is not None) and (ytrain is not None):
... | 25.354167 | 97 | 0.612161 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 166 | 0.136401 |
f5e3743f51af18cff1772397d3d93a0c7e89bca0 | 2,780 | py | Python | edit/editseries.py | lokal-profil/isfdb_site | 0ce20d6347849926d4eda961ea9249c31519eea5 | [
"BSD-3-Clause"
] | null | null | null | edit/editseries.py | lokal-profil/isfdb_site | 0ce20d6347849926d4eda961ea9249c31519eea5 | [
"BSD-3-Clause"
] | null | null | null | edit/editseries.py | lokal-profil/isfdb_site | 0ce20d6347849926d4eda961ea9249c31519eea5 | [
"BSD-3-Clause"
] | null | null | null | #!_PYTHONLOC
#
# (C) COPYRIGHT 2004-2021 Al von Ruff, Bill Longley and Ahasuerus
# ALL RIGHTS RESERVED
#
# The copyright notice above does not evidence any actual or
# intended publication of such source code.
#
# Version: $Revision$
# Date: $Date$
from isfdb import *
from isfdblib impor... | 32.325581 | 130 | 0.685612 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,401 | 0.503957 |
f5e3d0985186fbf72ce1898f6d250fd384de7e07 | 2,154 | py | Python | sound.py | ITNano/soundserver | b84cbfd821987ad8af72a6c2677caa0b949abff6 | [
"MIT"
] | null | null | null | sound.py | ITNano/soundserver | b84cbfd821987ad8af72a6c2677caa0b949abff6 | [
"MIT"
] | null | null | null | sound.py | ITNano/soundserver | b84cbfd821987ad8af72a6c2677caa0b949abff6 | [
"MIT"
] | null | null | null | import pyaudio
import numpy as np
import mixer
class Sound(object):
def __init__(self):
self.p = pyaudio.PyAudio()
self.mixers = []
self.streams = []
for i in range(self.p.get_device_count()-3):
self.streams.append(SoundcardStream(self.p, i))
def start_... | 32.149254 | 176 | 0.596565 | 2,087 | 0.968895 | 0 | 0 | 0 | 0 | 0 | 0 | 102 | 0.047354 |
f5e5cd56b7a8f566083c50626d4a1f1f2165bd63 | 2,284 | py | Python | noxutils.py | sphinx-contrib/zopeext | b749d0023f4fb8b8eea3a8f3216f63397c6272de | [
"BSD-2-Clause"
] | 1 | 2020-03-16T07:20:58.000Z | 2020-03-16T07:20:58.000Z | noxutils.py | sphinx-contrib/zopeext | b749d0023f4fb8b8eea3a8f3216f63397c6272de | [
"BSD-2-Clause"
] | 3 | 2021-12-19T09:39:45.000Z | 2022-01-06T05:05:03.000Z | noxutils.py | sphinx-contrib/zopeext | b749d0023f4fb8b8eea3a8f3216f63397c6272de | [
"BSD-2-Clause"
] | null | null | null | """
From https://github.com/brechtm/rinohtype/blob/master/noxutil.py
https://github.com/cjolowicz/nox-poetry/discussions/289
"""
import json
from collections.abc import Iterable
from pathlib import Path
from typing import Optional
from urllib.request import urlopen, Request
from poetry.core.factory import Factory
f... | 35.138462 | 79 | 0.700088 | 0 | 0 | 293 | 0.128284 | 0 | 0 | 0 | 0 | 985 | 0.431261 |
f5e6032fc8e0c3163e2cd3542bdd970f3cb1268b | 423 | py | Python | tbutton_maker/admin.py | codefisher/tbutton_web | 357bddc26b42c8511e7b5ce087bb0ac115f97e4c | [
"MIT"
] | null | null | null | tbutton_maker/admin.py | codefisher/tbutton_web | 357bddc26b42c8511e7b5ce087bb0ac115f97e4c | [
"MIT"
] | null | null | null | tbutton_maker/admin.py | codefisher/tbutton_web | 357bddc26b42c8511e7b5ce087bb0ac115f97e4c | [
"MIT"
] | null | null | null | from django.contrib import admin
from tbutton_web.tbutton_maker.models import Application, Button, DownloadSession, UpdateSession
class DownloadSessionAdmin(admin.ModelAdmin):
list_display = ['time', 'query_string']
admin.site.register(DownloadSession, DownloadSessionAdmin)
class UpdateSessionAdmin(admin.ModelAdm... | 42.3 | 96 | 0.820331 | 176 | 0.416076 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.094563 |
f5e6080e840c71c64f246a6744ac59598bb42ed0 | 1,359 | py | Python | abi_recursion.py | Abirami33/python-75-hackathon | c15505615d92cf304c27eabd3136406b08c59078 | [
"MIT"
] | null | null | null | abi_recursion.py | Abirami33/python-75-hackathon | c15505615d92cf304c27eabd3136406b08c59078 | [
"MIT"
] | null | null | null | abi_recursion.py | Abirami33/python-75-hackathon | c15505615d92cf304c27eabd3136406b08c59078 | [
"MIT"
] | null | null | null | #PASCALS TRIANGLE USING RECURSION
def pascal(n):
if n == 0: #if 0 number of rows
return [] #return a null list
elif n == 1: ... | 48.535714 | 106 | 0.40103 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 561 | 0.412804 |
f5e6d7bb0bd30f9540f1c0b749f54516092b6ca3 | 3,806 | py | Python | nodes/centered_mocap_and_tag_rebroadcaster.py | rislab/apriltag_tracker | 41c4deb4b5bcd94e5f666f3d4b1f1d141c705582 | [
"BSD-3-Clause"
] | null | null | null | nodes/centered_mocap_and_tag_rebroadcaster.py | rislab/apriltag_tracker | 41c4deb4b5bcd94e5f666f3d4b1f1d141c705582 | [
"BSD-3-Clause"
] | null | null | null | nodes/centered_mocap_and_tag_rebroadcaster.py | rislab/apriltag_tracker | 41c4deb4b5bcd94e5f666f3d4b1f1d141c705582 | [
"BSD-3-Clause"
] | 1 | 2019-02-18T00:40:20.000Z | 2019-02-18T00:40:20.000Z | #!/usr/bin/env python2.7
from __future__ import division
import roslib
import rospy
import tf
from nav_msgs.msg import Odometry
from nav_msgs.msg import Path
from geometry_msgs.msg import PoseStamped
import numpy as np
import pdb
from message_filters import Subscriber, ApproximateTimeSynchronizer
class GT_cleaner:
... | 37.313725 | 142 | 0.59196 | 3,379 | 0.887809 | 0 | 0 | 0 | 0 | 0 | 0 | 334 | 0.087756 |
f5e74389c152886253bc86c73ff3f6d23bab1e6e | 3,266 | py | Python | garage.py | DidymusRex/garage-pi | 4f4dcc0251f8cb5f5150ddaff7dac01a64eac948 | [
"CC0-1.0"
] | null | null | null | garage.py | DidymusRex/garage-pi | 4f4dcc0251f8cb5f5150ddaff7dac01a64eac948 | [
"CC0-1.0"
] | null | null | null | garage.py | DidymusRex/garage-pi | 4f4dcc0251f8cb5f5150ddaff7dac01a64eac948 | [
"CC0-1.0"
] | null | null | null | from datetime import datetime
from gpiozero import DistanceSensor
from garage_door import garage_door
from garage_camera import garage_camera
import MQTT_Config
import paho.mqtt.client as mqtt
from temp_sensor import temp_sensor
from time import sleep
"""
GPIO pin assignments:
relays
range finder sensor (echo... | 26.33871 | 72 | 0.580527 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 973 | 0.297918 |
f5e7ef3d480cf9bb53271fcd48200dc95c179ef9 | 5,887 | py | Python | app.py | leemengtaiwan/gist-evernote | 90d8573870ded37dc82575ba25968d7a06efe219 | [
"MIT"
] | 35 | 2018-01-29T00:50:36.000Z | 2021-04-04T13:59:26.000Z | app.py | leemengtaiwan/gist-evernote | 90d8573870ded37dc82575ba25968d7a06efe219 | [
"MIT"
] | 5 | 2021-02-08T20:18:24.000Z | 2022-03-11T23:15:12.000Z | app.py | leemengtaiwan/gist-evernote | 90d8573870ded37dc82575ba25968d7a06efe219 | [
"MIT"
] | 4 | 2018-02-06T12:13:09.000Z | 2019-12-20T09:12:41.000Z | # encoding: utf-8
import os
import time
from multiprocessing import Pool, cpu_count
from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.common.exceptions import T... | 31.821622 | 118 | 0.674367 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,532 | 0.4301 |
f5e7fdab1587e4d6e66ab3defb25c9ecd73fb773 | 20 | py | Python | hello-fortran-dependency/hello/__init__.py | Nicholaswogan/skbuild-f2py-examples | e47d0a9ce483e54b678e31789dbfcc90ff4a8e74 | [
"MIT"
] | 4 | 2021-07-28T02:16:52.000Z | 2021-12-23T00:20:21.000Z | hello-fortran-dependency/hello/__init__.py | Nicholaswogan/skbuild-f2py-examples | e47d0a9ce483e54b678e31789dbfcc90ff4a8e74 | [
"MIT"
] | 1 | 2021-09-14T21:17:49.000Z | 2021-09-14T23:17:47.000Z | hello-fortran-dependency/hello/__init__.py | Nicholaswogan/skbuild-f2py-examples | e47d0a9ce483e54b678e31789dbfcc90ff4a8e74 | [
"MIT"
] | null | null | null | from .hola import *
| 10 | 19 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f5e81680dbe98070292ce77eaa7479aa8b7e1630 | 326 | py | Python | python-leetcode/350.py | MDGSF/interviews | 9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76 | [
"MIT"
] | 12 | 2020-01-16T08:55:27.000Z | 2021-12-02T14:52:39.000Z | python-leetcode/350.py | MDGSF/interviews | 9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76 | [
"MIT"
] | null | null | null | python-leetcode/350.py | MDGSF/interviews | 9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76 | [
"MIT"
] | 1 | 2019-12-11T12:00:38.000Z | 2019-12-11T12:00:38.000Z | import collections
class Solution:
def intersect(self, nums1: List[int], nums2: List[int]) -> List[int]:
m = collections.Counter(nums1)
result = []
for num in nums2:
if num in m:
result.append(num)
if m[num] == 1:
del m[num]
else:
m[num] -= 1
return r... | 21.733333 | 71 | 0.546012 | 305 | 0.935583 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f5e9dfce4e604e5d08d5833b9e96482b6754ad47 | 217 | py | Python | finally.py | rkjin/algorithm | 5661dd621a43bcbb37b4113fd0918854e7a24310 | [
"Apache-2.0"
] | null | null | null | finally.py | rkjin/algorithm | 5661dd621a43bcbb37b4113fd0918854e7a24310 | [
"Apache-2.0"
] | null | null | null | finally.py | rkjin/algorithm | 5661dd621a43bcbb37b4113fd0918854e7a24310 | [
"Apache-2.0"
] | null | null | null | import numpy as np
if __name__ == '__main__':
try:
f = open('test_file.txt', 'w')
f.write('this is exception finally')
except Exception as e:
pass
finally:
f.close
pass
| 15.5 | 44 | 0.557604 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 0.253456 |
f5ea24e7021ff1af76d60fe6869f59dd63386b1e | 198 | py | Python | autokey/data/Emacs/c_g.py | Curiosidad-Racional/.config | af5a8901510e4b87dff1be024d3d29987c148f3f | [
"MIT"
] | 2 | 2021-05-29T18:11:26.000Z | 2021-10-21T20:53:16.000Z | autokey/data/Emacs/c_g.py | Curiosidad-Racional/.config | af5a8901510e4b87dff1be024d3d29987c148f3f | [
"MIT"
] | null | null | null | autokey/data/Emacs/c_g.py | Curiosidad-Racional/.config | af5a8901510e4b87dff1be024d3d29987c148f3f | [
"MIT"
] | null | null | null | import os
store.set_global_value("ctrl-space", False)
with open(os.path.expanduser("~/.config/polybar/keys.fifo"), "wb") as f:
f.write(b"TITLE:\n")
store.set_global_value("emacs-chain-keys", []) | 39.6 | 72 | 0.712121 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.373737 |
f5eaea013c4c8e9169d5648e9946cf1e2ab0fb60 | 520 | py | Python | lupin/fields/__init__.py | Clustaar/lupin | 9ef73642d84a99adb80abf5a922a9422ddae9254 | [
"MIT"
] | 22 | 2017-10-18T08:27:20.000Z | 2022-03-25T18:53:43.000Z | lupin/fields/__init__.py | Clustaar/lupin | 9ef73642d84a99adb80abf5a922a9422ddae9254 | [
"MIT"
] | 5 | 2019-09-16T15:31:55.000Z | 2022-02-10T08:29:14.000Z | lupin/fields/__init__.py | Clustaar/lupin | 9ef73642d84a99adb80abf5a922a9422ddae9254 | [
"MIT"
] | null | null | null | from .field import Field # NOQA
from .datetime_field import DateTime # NOQA
from .date import Date # NOQA
from .string import String # NOQA
from .object import Object # NOQA
from .list import List # NOQA
from .polymorphic_object import PolymorphicObject # NOQA
from .polymorphic_list import PolymorphicList # NOQ... | 34.666667 | 57 | 0.757692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.161538 |
f5edd88e2d458d89d6714005f92ae5a2d900050e | 564 | py | Python | polls/urls.py | SkyFlame00/webpolls | d137da1aaaa8af78520af7762b8002428842d617 | [
"MIT"
] | null | null | null | polls/urls.py | SkyFlame00/webpolls | d137da1aaaa8af78520af7762b8002428842d617 | [
"MIT"
] | null | null | null | polls/urls.py | SkyFlame00/webpolls | d137da1aaaa8af78520af7762b8002428842d617 | [
"MIT"
] | null | null | null | from django.urls import path
from django.conf.urls import url
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('logout/', views.logoutView, name='logout'),
path('signup/', views.signup, name='signup'),
url(r'^activate/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}... | 37.6 | 132 | 0.654255 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 216 | 0.382979 |
f5ee0fc5d74aae0b09b30c0e37603f02a2ea4deb | 14,918 | py | Python | forceDAQ/gui/plotter.py | gftabor/pyForceDAQ | 3eababb41d855b961d228d8366fdd154bb6314ea | [
"MIT"
] | null | null | null | forceDAQ/gui/plotter.py | gftabor/pyForceDAQ | 3eababb41d855b961d228d8366fdd154bb6314ea | [
"MIT"
] | null | null | null | forceDAQ/gui/plotter.py | gftabor/pyForceDAQ | 3eababb41d855b961d228d8366fdd154bb6314ea | [
"MIT"
] | null | null | null | __version__ = "0.2"
import threading
import numpy as np
import pygame
from expyriment.stimuli import Canvas, Rectangle, TextLine
from expyriment.stimuli._visual import Visual
from expyriment.misc import constants
lock_expyriment = threading.Lock()
Numpy_array_type = type(np.array([]))
class Scaling(object):
"""... | 32.714912 | 88 | 0.58292 | 12,792 | 0.857488 | 0 | 0 | 1,872 | 0.125486 | 0 | 0 | 1,737 | 0.116437 |
f5eeb057bded5c49089e78a2d6eb892367d91cd2 | 3,528 | py | Python | gcp/extract/lib/weights_vcv.py | dylanhogan/prospectus-tools | 662b2629290cd27c74cd34769773e0d6e73c7048 | [
"MIT"
] | null | null | null | gcp/extract/lib/weights_vcv.py | dylanhogan/prospectus-tools | 662b2629290cd27c74cd34769773e0d6e73c7048 | [
"MIT"
] | null | null | null | gcp/extract/lib/weights_vcv.py | dylanhogan/prospectus-tools | 662b2629290cd27c74cd34769773e0d6e73c7048 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
################################################################################
# Copyright 2014, Distributed Meta-Analysis System
################################################################################
"""
This file provides methods for handling weighting across GCMs under
delta meth... | 40.551724 | 207 | 0.614229 | 1,338 | 0.379252 | 0 | 0 | 163 | 0.046202 | 0 | 0 | 1,583 | 0.448696 |
f5efba2cc27e11d0b24ffd544963fe1fe77b60d3 | 764 | py | Python | ecojunk/users/api/v1/resources.py | PIN-UPV/EcoJunkWebServer | 53a42687c303ffe345f59dc1f11fa41c3526f6d7 | [
"MIT"
] | 1 | 2018-10-02T11:54:26.000Z | 2018-10-02T11:54:26.000Z | ecojunk/users/api/v1/resources.py | PIN-UPV/EcoJunkWebServer | 53a42687c303ffe345f59dc1f11fa41c3526f6d7 | [
"MIT"
] | 8 | 2018-10-03T08:02:39.000Z | 2018-11-21T07:42:26.000Z | ecojunk/users/api/v1/resources.py | PIN-UPV/EcoJunkWebServer | 53a42687c303ffe345f59dc1f11fa41c3526f6d7 | [
"MIT"
] | 1 | 2018-10-02T11:54:32.000Z | 2018-10-02T11:54:32.000Z | from rest_framework import status
from rest_framework.generics import RetrieveUpdateAPIView
from rest_framework.response import Response
from ecojunk.users.api.v1.serializers import UserSerializer
class UserResource(RetrieveUpdateAPIView):
serializer_class = UserSerializer
def retrieve(self, request, *args,... | 31.833333 | 67 | 0.740838 | 563 | 0.736911 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f5f03ea17d8bc72c5ae1602cba0dbeef3ed61e6b | 2,905 | py | Python | app/modules/payments/resources.py | almlys/sample_paymentsapi | d7ba4d2effeb7654ee06aab6dbb15e22f8d213cc | [
"MIT"
] | null | null | null | app/modules/payments/resources.py | almlys/sample_paymentsapi | d7ba4d2effeb7654ee06aab6dbb15e22f8d213cc | [
"MIT"
] | null | null | null | app/modules/payments/resources.py | almlys/sample_paymentsapi | d7ba4d2effeb7654ee06aab6dbb15e22f8d213cc | [
"MIT"
] | null | null | null | # encoding: utf-8
# pylint: disable=bad-continuation
"""
RESTful API Payments resources
--------------------------
"""
import logging
from flask_login import current_user
from flask_restplus_patched import Resource
from flask_restplus._http import HTTPStatus
from app.extensions import db
from app.extensions.api impo... | 27.666667 | 85 | 0.640275 | 2,101 | 0.723236 | 0 | 0 | 2,280 | 0.784854 | 0 | 0 | 800 | 0.275387 |
f5f344323771b9cf37b06554ddc6a58b22178367 | 1,616 | py | Python | bin/list-teams.py | kws/python-msgraphy | a5dad8bd834c476974fae151f30865c229e0f798 | [
"MIT"
] | 1 | 2022-01-06T08:06:47.000Z | 2022-01-06T08:06:47.000Z | bin/list-teams.py | kws/python-msgraphy | a5dad8bd834c476974fae151f30865c229e0f798 | [
"MIT"
] | null | null | null | bin/list-teams.py | kws/python-msgraphy | a5dad8bd834c476974fae151f30865c229e0f798 | [
"MIT"
] | null | null | null | import msgraphy_util
import argparse
from msgraphy import GraphApi
def main(name, starts_with, exact, channels, folder):
api = GraphApi(scopes=["Group.Read.All"])
response = api.team.list_teams(search=name, starts_with=starts_with, exact=exact)
for team in response.value:
print(f"{team.display_na... | 41.435897 | 125 | 0.603342 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 445 | 0.275371 |
f5f35c0e3a98205f6d6bd8dde9d15ab552f7d436 | 21,372 | py | Python | tileEditor.py | haywireSSC/Level-Editor | 34fedbe36b90afeb8c0d995fcecbed845ffd6253 | [
"CC0-1.0"
] | null | null | null | tileEditor.py | haywireSSC/Level-Editor | 34fedbe36b90afeb8c0d995fcecbed845ffd6253 | [
"CC0-1.0"
] | null | null | null | tileEditor.py | haywireSSC/Level-Editor | 34fedbe36b90afeb8c0d995fcecbed845ffd6253 | [
"CC0-1.0"
] | null | null | null | import pygame as p
from math import floor
from copy import deepcopy
import Tkinter, tkFileDialog
root = Tkinter.Tk()
root.withdraw()
p.init()
running = True
tileWidth = 16
tileHeight = 16
mapWidth = 100
mapHeight = 100
camX = 0
camY = 0
scale = 2
uiScale = 2
hand = 1
layerStack = True
file_path = ''
file_path = t... | 48.794521 | 221 | 0.561623 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 225 | 0.010528 |
f5f4c4714755e8b9549c5e4949c349f3b753fe90 | 5,148 | py | Python | EditGroupWindow.py | TheYargonaut/lucre | 1abd472993df01b443ab4811379dfe52e18cf790 | [
"MIT"
] | null | null | null | EditGroupWindow.py | TheYargonaut/lucre | 1abd472993df01b443ab4811379dfe52e18cf790 | [
"MIT"
] | null | null | null | EditGroupWindow.py | TheYargonaut/lucre | 1abd472993df01b443ab4811379dfe52e18cf790 | [
"MIT"
] | null | null | null | import tkinter as tk
from tkinter.colorchooser import askcolor
from tkinter import ttk
from Scrollable import Scrollable
from ViewLedgerWidget import ViewLedgerWidget
from List import ListView
from Group import Group
# window for editing a group
prevLens = [ 10, 25, 100 ]
class EditGroupWindow( tk.Toplevel ):
de... | 43.260504 | 165 | 0.633061 | 4,636 | 0.900544 | 0 | 0 | 0 | 0 | 0 | 0 | 210 | 0.040793 |
f5f611d50ecae53133cd83f244cc01c20777a693 | 261 | py | Python | day_07/task_1.py | Korred/advent_of_code_2021 | 89afcaae3343653106d36fb7ad08558c0fbb4732 | [
"Unlicense"
] | null | null | null | day_07/task_1.py | Korred/advent_of_code_2021 | 89afcaae3343653106d36fb7ad08558c0fbb4732 | [
"Unlicense"
] | null | null | null | day_07/task_1.py | Korred/advent_of_code_2021 | 89afcaae3343653106d36fb7ad08558c0fbb4732 | [
"Unlicense"
] | null | null | null | crabs = sorted(map(int, open("input.txt", "r").readline().strip().split(",")))
# position with minimal fuel usage is at the median position
median_pos = crabs[len(crabs) // 2]
min_fuel = sum([abs(crab_pos - median_pos) for crab_pos in crabs])
print(min_fuel)
| 32.625 | 78 | 0.704981 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.295019 |
f5f839cc33260b873ad589657cb5b87f8a948df8 | 5,172 | py | Python | dialmonkey/nlu/basketball.py | alexandergazo/NPFL123 | c52b6a880abf9fe694ce6a2d775c7db1bd765fba | [
"Apache-2.0"
] | null | null | null | dialmonkey/nlu/basketball.py | alexandergazo/NPFL123 | c52b6a880abf9fe694ce6a2d775c7db1bd765fba | [
"Apache-2.0"
] | null | null | null | dialmonkey/nlu/basketball.py | alexandergazo/NPFL123 | c52b6a880abf9fe694ce6a2d775c7db1bd765fba | [
"Apache-2.0"
] | null | null | null | # Author: Matej Mik
from ..component import Component
from ..da import DAI
import re
def add_team_g(string, attributes):
if 'tym' in string:
if re.search('(muj|moj|meh)[^ ]{0,3} tym', string):
attributes.append('team=default')
else:
team = string.split('tym')[-1].split(' '... | 37.478261 | 97 | 0.552204 | 1,998 | 0.386311 | 0 | 0 | 0 | 0 | 0 | 0 | 1,091 | 0.210944 |
f5f954fff242094361f8f329de47188d709c63c7 | 1,447 | py | Python | test_SSstache.py | jonschull/Lyte | e9ba2bb1b07c9398b81a6f591898d2474d1a4609 | [
"MIT"
] | 1 | 2018-06-07T17:54:27.000Z | 2018-06-07T17:54:27.000Z | test_SSstache.py | jonschull/Lyte | e9ba2bb1b07c9398b81a6f591898d2474d1a4609 | [
"MIT"
] | 1 | 2018-06-28T05:08:57.000Z | 2018-06-28T05:08:57.000Z | test_SSstache.py | jonschull/Lyte | e9ba2bb1b07c9398b81a6f591898d2474d1a4609 | [
"MIT"
] | null | null | null | from SSstache import *
from plumbum.path.utils import delete
from plumbum.cmd import ls, touch, mkdir
def test_makeSupportScriptStache():
delete('xyz')
assert makeSupportScriptStache(stacheDir='xyz').endswith('xyz')
assert ls('xyz').split()==['RSrun.2.7.min.js', 'glow.2.7.min.js', 'ide.css', 'jquery-ui.cu... | 27.301887 | 148 | 0.608846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 388 | 0.268141 |
f5fc2d7fa7991a4448eb7eb0d16d8da0aa0e1f7e | 173 | py | Python | graphic/introductions/graficoNormal.py | jonathanccardoso/data-science | d5977e5cd26b6a9ad05ef8940841158911a91586 | [
"MIT"
] | null | null | null | graphic/introductions/graficoNormal.py | jonathanccardoso/data-science | d5977e5cd26b6a9ad05ef8940841158911a91586 | [
"MIT"
] | null | null | null | graphic/introductions/graficoNormal.py | jonathanccardoso/data-science | d5977e5cd26b6a9ad05ef8940841158911a91586 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
x = [1, 2, 5]
y = [2, 3, 7]
plt.title("1 grafico com python")
# Eixos
plt.xlabel("Eixo X")
plt.ylabel("Eixo Y")
plt.plot(x,y)
plt.show()
| 12.357143 | 33 | 0.630058 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.260116 |
f5fc99298c4f8aba96ad5b5882efa8fbf637939b | 421 | py | Python | makevideo.py | bitrogen/sorting-algorithms | f7eada32db9e0ce385878f49d79b3d6b8c09280a | [
"CC0-1.0"
] | null | null | null | makevideo.py | bitrogen/sorting-algorithms | f7eada32db9e0ce385878f49d79b3d6b8c09280a | [
"CC0-1.0"
] | 1 | 2021-04-05T20:20:30.000Z | 2021-04-05T20:22:41.000Z | makevideo.py | bitrogen/sorting-algorithms | f7eada32db9e0ce385878f49d79b3d6b8c09280a | [
"CC0-1.0"
] | null | null | null | import cv2
import numpy
import glob
import os
images = []
path = os.getcwd()+"\\frames\\"
myVideo = cv2.VideoWriter("quicksort-1.mkv", cv2.VideoWriter_fourcc(*"DIVX"), 60, (1920,1080))
for filename in range(len(os.listdir(path))):
filename = f"frame-{filename}.png"
img = cv2.imread(f"{path}{f... | 20.047619 | 95 | 0.638955 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.182898 |
f5fce2318bd81cf7ddc8f556365d8f472f7cc726 | 18,008 | py | Python | darknet.py | sugey/pytorch-yolov3 | cb6b46fd798debca5d8d066eabb2bd2e6c679953 | [
"MIT"
] | 3 | 2019-10-21T16:05:15.000Z | 2019-10-25T00:43:17.000Z | darknet.py | sugey/pytorch-yolov3 | cb6b46fd798debca5d8d066eabb2bd2e6c679953 | [
"MIT"
] | null | null | null | darknet.py | sugey/pytorch-yolov3 | cb6b46fd798debca5d8d066eabb2bd2e6c679953 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
from model.layers import *
from model.build import *
import cv2
from model.utils import *
def get_test_input():
img = cv2.imread("images/dog-cycle-car.png")
img = cv2.resize(img, (416, 416... | 44.907731 | 108 | 0.549034 | 17,182 | 0.954131 | 0 | 0 | 0 | 0 | 0 | 0 | 8,953 | 0.497168 |
f5fd8ae5a3e3e11874751c948747bc877e5305d4 | 1,131 | py | Python | src/icemac/addressbook/browser/search/result/handler/test_manager.py | icemac/icemac.addressbook | 6197e6e01da922feb100dd0943576523050cd703 | [
"BSD-2-Clause"
] | 1 | 2020-03-26T20:16:44.000Z | 2020-03-26T20:16:44.000Z | src/icemac/addressbook/browser/search/result/handler/test_manager.py | icemac/icemac.addressbook | 6197e6e01da922feb100dd0943576523050cd703 | [
"BSD-2-Clause"
] | 2 | 2020-02-21T13:04:23.000Z | 2020-02-21T13:06:10.000Z | src/icemac/addressbook/browser/search/result/handler/test_manager.py | icemac/icemac.addressbook | 6197e6e01da922feb100dd0943576523050cd703 | [
"BSD-2-Clause"
] | null | null | null | from icemac.addressbook.browser.search.result.handler.manager import (
SearchResultHandler)
def makeSRHandler(viewName):
"""Create a `SearchResultHandler` with the specified `viewName`."""
handler = SearchResultHandler(None, None, None, None)
handler.viewName = viewName
return handler
def test_m... | 31.416667 | 75 | 0.72237 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 448 | 0.39611 |
eb03b18815a588a66491abb92833213166f65e34 | 2,271 | py | Python | superset/shuju_into_mysql.py | LCM1999/superset_secondary_dev | 293e3df9d46ef6096d35ee7d523ce5c7898902bc | [
"Apache-2.0"
] | 1 | 2021-06-29T05:36:30.000Z | 2021-06-29T05:36:30.000Z | superset/shuju_into_mysql.py | LCM1999/superset_secondary_dev | 293e3df9d46ef6096d35ee7d523ce5c7898902bc | [
"Apache-2.0"
] | null | null | null | superset/shuju_into_mysql.py | LCM1999/superset_secondary_dev | 293e3df9d46ef6096d35ee7d523ce5c7898902bc | [
"Apache-2.0"
] | null | null | null | import json
import pymysql
import random
import string
import time
# def get_data():
# with open('E:\\QQ文档\\1420944066\\FileRecv\\Code (2)\\data\\nice looking data\\与gooddata里重复\\20_30(1).json', 'r') as f:
# camera_text = json.load(f) # 解析每一行数据
# print(camera_text)
# return camera_text
# def... | 37.85 | 180 | 0.607221 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,402 | 0.610361 |
eb03b84ad235ef7df8266830a1654259db309611 | 3,290 | py | Python | Experiments/create_mean_optimization_sets.py | ariel415el/PerceptualLossGLO-Pytorch | 7caa743b719cd95066103a69f3e78a70507de8b5 | [
"MIT"
] | null | null | null | Experiments/create_mean_optimization_sets.py | ariel415el/PerceptualLossGLO-Pytorch | 7caa743b719cd95066103a69f3e78a70507de8b5 | [
"MIT"
] | null | null | null | Experiments/create_mean_optimization_sets.py | ariel415el/PerceptualLossGLO-Pytorch | 7caa743b719cd95066103a69f3e78a70507de8b5 | [
"MIT"
] | null | null | null | import os
import random
import cv2
import numpy as np
import torch
from Experiments.all import load_models, embedd_data, save_batch
from GenerativeModels.utils.data_utils import get_dataset
device = torch.device("cuda")
def sample_latent_neighbors(outputs_dir, models_dir):
"""Find nearest latent neighbors of d... | 39.166667 | 115 | 0.643161 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 678 | 0.206079 |