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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
096e0c82b3230ff3e7a21ae6baf386609c988e98 | 2,354 | py | Python | flask_io/negotiation.py | theelous3/flask-io | 39745083a260bdda20d3a0712287aade9e0d8a97 | [
"MIT"
] | 17 | 2015-12-03T02:09:44.000Z | 2022-03-28T08:33:41.000Z | flask_io/negotiation.py | theelous3/flask-io | 39745083a260bdda20d3a0712287aade9e0d8a97 | [
"MIT"
] | 6 | 2015-12-31T06:31:03.000Z | 2021-05-27T10:13:34.000Z | flask_io/negotiation.py | theelous3/flask-io | 39745083a260bdda20d3a0712287aade9e0d8a97 | [
"MIT"
] | 7 | 2016-06-16T18:55:44.000Z | 2022-02-22T10:33:09.000Z | """
Content negotiation selects a appropriated parser and renderer for a HTTP request.
"""
from abc import ABCMeta, abstractmethod
from .mimetypes import MimeType
class ContentNegotiation(metaclass=ABCMeta):
"""
Base class for all content negotiations.
"""
@abstractmethod
def select_parser(self,... | 30.571429 | 93 | 0.641886 | 2,184 | 0.927782 | 0 | 0 | 604 | 0.256585 | 0 | 0 | 1,136 | 0.482583 |
096e0f5dcdfc6d12aa8ec7627807b41fbeb0e3df | 48,070 | py | Python | tests/test_integ_squash.py | pombredanne/docker-scripts | ecee9f921b22cd44943197635875572185dd015d | [
"MIT"
] | 513 | 2016-04-04T21:44:14.000Z | 2022-03-27T06:18:26.000Z | tests/test_integ_squash.py | pombredanne/docker-scripts | ecee9f921b22cd44943197635875572185dd015d | [
"MIT"
] | 106 | 2016-04-01T11:53:20.000Z | 2022-03-31T00:35:31.000Z | tests/test_integ_squash.py | pombredanne/docker-scripts | ecee9f921b22cd44943197635875572185dd015d | [
"MIT"
] | 75 | 2016-05-11T01:08:47.000Z | 2022-03-25T01:20:06.000Z | import unittest
import mock
import six
import codecs
import os
import json
import logging
import shutil
import tarfile
import io
from io import BytesIO
import uuid
from docker_squash.squash import Squash
from docker_squash.errors import SquashError, SquashUnnecessaryError
from docker_squash.lib import common
if not s... | 41.872822 | 319 | 0.608924 | 47,643 | 0.991117 | 0 | 0 | 1,187 | 0.024693 | 0 | 0 | 14,228 | 0.295985 |
096e973dacf00212d057f5f9f7861e73bb7168e0 | 1,627 | py | Python | models/bam.py | AnonymityCode/FastLFnet | cc4c1d9620fef5e75798f40084729d8d7fdd5a9a | [
"MIT"
] | 8 | 2021-10-13T01:31:25.000Z | 2022-03-18T03:13:15.000Z | models/bam.py | zcong17huang/FastLFnet | d86e9b333f6acb62e0b4d30ed14519fe39ef2963 | [
"MIT"
] | 5 | 2021-12-13T07:19:14.000Z | 2022-03-26T13:00:37.000Z | models/bam.py | AnonymityCode/FastLFnet | cc4c1d9620fef5e75798f40084729d8d7fdd5a9a | [
"MIT"
] | 2 | 2021-11-04T04:04:41.000Z | 2021-11-06T07:56:25.000Z | import torch
import math
import torch.nn as nn
import torch.nn.functional as F
class SpatialGate(nn.Module):
def __init__(self, gate_channel, reduction_ratio, dilation_conv_num=2):
super(SpatialGate, self).__init__()
dilation_val = [1, 2]
self.gate_s = nn.Sequential()
self... | 54.233333 | 146 | 0.671789 | 1,536 | 0.944069 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.082975 |
09706c6eb6ce8046078f05dc861a923a4dfa7d00 | 736 | py | Python | ML/Computer Vision/Lab7_face_detection_real_time.py | richeyphu/ITE-425 | 4210b692609fa04cdd00b76a45d9e1e5baacd6e3 | [
"MIT"
] | null | null | null | ML/Computer Vision/Lab7_face_detection_real_time.py | richeyphu/ITE-425 | 4210b692609fa04cdd00b76a45d9e1e5baacd6e3 | [
"MIT"
] | null | null | null | ML/Computer Vision/Lab7_face_detection_real_time.py | richeyphu/ITE-425 | 4210b692609fa04cdd00b76a45d9e1e5baacd6e3 | [
"MIT"
] | null | null | null | import cv2
faceCascade = cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_frontalface_default.xml")
#capture = cv2.VideoCapture(0)
capture = cv2.VideoCapture('Elon Musk 320.mp4')
while True:
_, frame = capture.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
#faces = faceCascade.de... | 30.666667 | 99 | 0.639946 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 165 | 0.224185 |
0970b9ad7614a84f468d83f8de90de992c7f521f | 1,110 | py | Python | setup.py | tabac/cprofilev | dd9ee42ef8e68d08dbdde88ddce854aac55ef934 | [
"MIT"
] | null | null | null | setup.py | tabac/cprofilev | dd9ee42ef8e68d08dbdde88ddce854aac55ef934 | [
"MIT"
] | null | null | null | setup.py | tabac/cprofilev | dd9ee42ef8e68d08dbdde88ddce854aac55ef934 | [
"MIT"
] | 1 | 2019-09-15T12:56:29.000Z | 2019-09-15T12:56:29.000Z | from setuptools import setup
import sys
if sys.version_info < (2,5):
raise NotImplementedError(
"Sorry, you need at least Python 2.5 to use cprofilev.")
VERSION = '1.0.4'
__doc__ = """\
An easier way to use cProfile.
Outputs a simpler html view of profiled stats.
Able to show stats while the code is st... | 24.130435 | 64 | 0.636937 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 660 | 0.594595 |
0971b6f1115e89b5d0376e06557390d061de5c54 | 566 | py | Python | bocce/__init__.py | brianjpetersen/bocce | 20a4845400e8759173c5391ce52f18dafbf4c678 | [
"MIT"
] | null | null | null | bocce/__init__.py | brianjpetersen/bocce | 20a4845400e8759173c5391ce52f18dafbf4c678 | [
"MIT"
] | null | null | null | bocce/__init__.py | brianjpetersen/bocce | 20a4845400e8759173c5391ce52f18dafbf4c678 | [
"MIT"
] | null | null | null | # standard libraries
import os
# third party libraries
pass
# first party libraries
from . import (application, routing, static, surly, requests, responses,
utils, cookies, exceptions, middleware, )
__where__ = os.path.dirname(os.path.abspath(__file__))
__all__ = ('Application', 'application', 'routin... | 26.952381 | 73 | 0.715548 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 159 | 0.280919 |
09722db03d2e3d65cdf0b22fef132df0fab89e4d | 5,947 | py | Python | classification.py | Sigmoid-Frontsquat-LLC/classification-model-backend | 7366302063315a245b7ab20219fb22ecf67bd377 | [
"MIT"
] | null | null | null | classification.py | Sigmoid-Frontsquat-LLC/classification-model-backend | 7366302063315a245b7ab20219fb22ecf67bd377 | [
"MIT"
] | null | null | null | classification.py | Sigmoid-Frontsquat-LLC/classification-model-backend | 7366302063315a245b7ab20219fb22ecf67bd377 | [
"MIT"
] | null | null | null | import sys # this is for extracting command line arguments.
def parse_activator(flag, value):
if flag[1] == 'a':
return (True, value)
else:
return (False,None)
pass
def parse_optimizer(flag, value):
if flag[1] == 'o':
return (True, value)
else:
return (False,None)
... | 23.230469 | 102 | 0.636624 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,579 | 0.265512 |
0972614a80b05e57c1220dbf0ff54e2fa988f86e | 7,658 | py | Python | wizard/gui/destination_manager.py | Wizard-collab/wizard_2 | a2cb23362e178a0205f6dd0b9b4328c329b5b142 | [
"MIT"
] | 1 | 2021-10-13T15:07:32.000Z | 2021-10-13T15:07:32.000Z | wizard/gui/destination_manager.py | Wizard-collab/wizard_2 | a2cb23362e178a0205f6dd0b9b4328c329b5b142 | [
"MIT"
] | null | null | null | wizard/gui/destination_manager.py | Wizard-collab/wizard_2 | a2cb23362e178a0205f6dd0b9b4328c329b5b142 | [
"MIT"
] | null | null | null | # coding: utf-8
# Author: Leo BRUNEL
# Contact: [email protected]
# Python modules
from PyQt5 import QtWidgets, QtCore, QtGui
from PyQt5.QtCore import pyqtSignal
import logging
# Wizard modules
from wizard.core import assets
from wizard.core import project
from wizard.vars import ressources
# Wizard gui modules
... | 42.076923 | 131 | 0.70619 | 7,227 | 0.943719 | 0 | 0 | 0 | 0 | 0 | 0 | 419 | 0.054714 |
0972acc5adf0761541464f2087b1feb90d1044ab | 1,591 | py | Python | algotrading/agents/six_month_cycle_agent.py | vrishank97/AlgoTrading | 41dd44f73d97267283032ed433dd0bfb3bd6c638 | [
"MIT"
] | 92 | 2018-12-21T11:21:17.000Z | 2022-03-27T13:01:45.000Z | build/lib/algotrader/agents/six_month_cycle_agent.py | ajmal017/AlgoTrading-5 | 41dd44f73d97267283032ed433dd0bfb3bd6c638 | [
"MIT"
] | 3 | 2018-12-19T16:33:36.000Z | 2019-05-28T10:08:40.000Z | build/lib/algotrader/agents/six_month_cycle_agent.py | ajmal017/AlgoTrading-5 | 41dd44f73d97267283032ed433dd0bfb3bd6c638 | [
"MIT"
] | 34 | 2019-05-28T21:31:51.000Z | 2022-02-06T20:25:54.000Z | from .BaseAgent import BaseAgent
import pandas as pd
import numpy as np
from itertools import islice
class SixMonthCycle_Agent(BaseAgent):
def __init__(self, window_size, small, large, signal, up, down):
super().__init__(window_size)
self.up = up
self.down = down
self.large = large
... | 29.462963 | 123 | 0.588938 | 1,489 | 0.935889 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.042112 |
09735c1ad6c8d9ce147599ce6ceedfef6549b227 | 116 | py | Python | 001085StepikPythonIntrO/Stepik001085PythonIntrOсh01p04st05С05_20200410.py | SafonovMikhail/python_000577 | 739f764e80f1ca354386f00b8e9db1df8c96531d | [
"Apache-2.0"
] | null | null | null | 001085StepikPythonIntrO/Stepik001085PythonIntrOсh01p04st05С05_20200410.py | SafonovMikhail/python_000577 | 739f764e80f1ca354386f00b8e9db1df8c96531d | [
"Apache-2.0"
] | null | null | null | 001085StepikPythonIntrO/Stepik001085PythonIntrOсh01p04st05С05_20200410.py | SafonovMikhail/python_000577 | 739f764e80f1ca354386f00b8e9db1df8c96531d | [
"Apache-2.0"
] | null | null | null | n = float(input())
m = float(input())
max = max(n, m)
min = min(n, m)
time = max - min
print(time // 60, time % 60)
| 16.571429 | 28 | 0.560345 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0973f9ff4b18475410c9ec73581276a3c910551c | 485 | py | Python | modu/linear_regression/linear_regression_cost_plot.py | godong9/ml | 2c735376f4366000685cd97de5df31aabc1c597e | [
"MIT"
] | null | null | null | modu/linear_regression/linear_regression_cost_plot.py | godong9/ml | 2c735376f4366000685cd97de5df31aabc1c597e | [
"MIT"
] | null | null | null | modu/linear_regression/linear_regression_cost_plot.py | godong9/ml | 2c735376f4366000685cd97de5df31aabc1c597e | [
"MIT"
] | null | null | null | import tensorflow as tf
import matplotlib.pyplot as plt
X = [1, 2, 3]
Y = [1, 2, 3]
W = tf.placeholder(tf.float32)
hypothesis = X * W
cost = tf.reduce_mean(tf.square(hypothesis - Y))
sess = tf.Session()
sess.run(tf.global_variables_initializer())
W_val = []
cost_val = []
for i in range(-30, 50):
feed_W = i *... | 18.653846 | 66 | 0.665979 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
09744b77cc03b6489272302bf793ec2a6a1a7ea2 | 2,078 | py | Python | dyno_pods/test/test_multisampling.py | louisXW/PODS-DYNO | 5cd3cced8f0556a5c42d9021ff1d965880f360dd | [
"MIT"
] | null | null | null | dyno_pods/test/test_multisampling.py | louisXW/PODS-DYNO | 5cd3cced8f0556a5c42d9021ff1d965880f360dd | [
"MIT"
] | 1 | 2022-03-24T18:17:50.000Z | 2022-03-24T18:17:50.000Z | dyno_pods/test/test_multisampling.py | louisXW/PODS-DYNO | 5cd3cced8f0556a5c42d9021ff1d965880f360dd | [
"MIT"
] | 1 | 2021-08-01T12:57:30.000Z | 2021-08-01T12:57:30.000Z | """
.. module:: test_multisampling
:synopsis: Test multisampling strategy
.. moduleauthor:: David Eriksson <[email protected]>
"""
from pySOT import Ackley, CandidateDYCORS, GeneticAlgorithm, \
MultiStartGradient, SyncStrategyNoConstraints, \
RBFInterpolant, CubicKernel, LinearTail, \
SymmetricLatinHyper... | 34.065574 | 95 | 0.682387 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 539 | 0.259384 |
09745d72d59a6783162603fbdf15fcd5912b5ca1 | 1,172 | py | Python | play_game.py | sanderland/SelfplayLab | 4ce5b8ffd8cfb5465196dddaa0142b2843570b98 | [
"MIT"
] | 2 | 2020-12-10T17:11:23.000Z | 2021-05-09T04:14:00.000Z | play_game.py | sanderland/SelfplayLab | 4ce5b8ffd8cfb5465196dddaa0142b2843570b98 | [
"MIT"
] | null | null | null | play_game.py | sanderland/SelfplayLab | 4ce5b8ffd8cfb5465196dddaa0142b2843570b98 | [
"MIT"
] | 2 | 2021-05-09T04:14:05.000Z | 2021-05-09T04:14:34.000Z | import torch
import argparse
from selfplaylab.game.go import CaptureGoState, PixelCaptureGoState, GoState
from selfplaylab.game.gomoku import GoMokuState, GoMokuStateAugmented, TicTacToe, TicTacToeAugmented
from selfplaylab.game.nim import NimState
from selfplaylab.game.othello import OthelloState
from selfplaylab.play... | 31.675676 | 100 | 0.75256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 173 | 0.147611 |
09761ad36a8d0fda1e1934f1d5836f763526e5ae | 558 | py | Python | tests/test_version.py | rndazurescript/Coco2CustomVision | c189109413b185a77f5d1de51fb2dbcc96139ff6 | [
"MIT"
] | null | null | null | tests/test_version.py | rndazurescript/Coco2CustomVision | c189109413b185a77f5d1de51fb2dbcc96139ff6 | [
"MIT"
] | 1 | 2022-02-23T13:01:38.000Z | 2022-02-23T13:01:38.000Z | tests/test_version.py | rndazurescript/Coco2CustomVision | c189109413b185a77f5d1de51fb2dbcc96139ff6 | [
"MIT"
] | null | null | null | import re
def try_parse_int(s, base=10, val=None):
try:
return int(s, base)
except ValueError:
return val
def test_version():
"""Test version string"""
from coco2customvision import __version__
version_parts = re.split("[.-]", __version__)
if __version__ != "UNKNOWN":
... | 26.571429 | 78 | 0.641577 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 0.256272 |
0976f09aff61c07c694ac80f44c6f37d65e2b8b2 | 1,266 | py | Python | Python/Pages/ITProPage.py | hirokundayon/koedo | 1d6fc0bb6045edb24253f039628104256896bd1a | [
"Apache-2.0"
] | 1 | 2019-02-04T15:13:51.000Z | 2019-02-04T15:13:51.000Z | Python/Pages/ITProPage.py | hirokundayon/koedo | 1d6fc0bb6045edb24253f039628104256896bd1a | [
"Apache-2.0"
] | null | null | null | Python/Pages/ITProPage.py | hirokundayon/koedo | 1d6fc0bb6045edb24253f039628104256896bd1a | [
"Apache-2.0"
] | 1 | 2018-02-26T15:12:04.000Z | 2018-02-26T15:12:04.000Z | # -*- coding: utf-8 -*-
from Pages.PageObject import PageObject
import time
class ITProPage(PageObject):
firstHandle = ""
secondHandle = ""
def __init__(self, driver):
PageObject.__init__(self, driver)
def click_picture(self):
self.firstHandle = self.driver.wi... | 32.461538 | 98 | 0.598736 | 1,177 | 0.922414 | 0 | 0 | 0 | 0 | 0 | 0 | 209 | 0.163793 |
0979c9e1fe818ea6f9a20142144fdc173a453a83 | 1,328 | py | Python | session04/movie.py | heawon99/Repository-NEXT_HW_new | e73fac56469b7518034322f0d2fefe5f95c8c164 | [
"MIT"
] | null | null | null | session04/movie.py | heawon99/Repository-NEXT_HW_new | e73fac56469b7518034322f0d2fefe5f95c8c164 | [
"MIT"
] | null | null | null | session04/movie.py | heawon99/Repository-NEXT_HW_new | e73fac56469b7518034322f0d2fefe5f95c8c164 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
notebook_html = requests.get('https://search.shopping.naver.com/search/all?pagingIndex=2&pagingSize=80&query=노트북')
notebook_soup = BeautifulSoup(notebook_html.text,"html.parser")
notebook_list_box = notebook_soup.find("ul", {"class" : "list_basis"})
notebook_list = noteboo... | 47.428571 | 286 | 0.745482 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 806 | 0.603293 |
097a67824a1ea5f6c93e2208bf5602c06cf66bd7 | 9,891 | py | Python | Chapter05/5B_MnA/5B_MnAPrediction.py | uyenphuong18406/Hands-On-Artificial-Intelligence-for-Banking | 3a10a14194368478bb8b78d3d17e9c6a7b7253db | [
"MIT"
] | 115 | 2020-06-18T15:00:58.000Z | 2022-03-02T10:13:19.000Z | Chapter05/5B_MnA/5B_MnAPrediction.py | uyenphuong18406/Hands-On-Artificial-Intelligence-for-Banking | 3a10a14194368478bb8b78d3d17e9c6a7b7253db | [
"MIT"
] | 2 | 2020-11-06T11:02:31.000Z | 2021-01-22T12:44:35.000Z | Chapter05/5B_MnA/5B_MnAPrediction.py | uyenphuong18406/Hands-On-Artificial-Intelligence-for-Banking | 3a10a14194368478bb8b78d3d17e9c6a7b7253db | [
"MIT"
] | 60 | 2020-07-22T14:53:10.000Z | 2022-03-23T10:17:59.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
QUANDLKEY = '<Enter your Quandl APT key here>'
"""
Created on Fri Oct 5 23:24:35 2018
@author: jeff
"""
'''*************************************
#1. Import libraries and define key variables
'''
import pandas as pd
import numpy as np
import quandl
import matplotlib.pyplo... | 32.860465 | 126 | 0.64958 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,487 | 0.251441 |
097bf627e47851400865727fdcce309364d45996 | 530 | py | Python | import random.py | joelkalonji/PasswordGeerator | 0f9ae4208f0c228c0b1e85241501f5d95b2b5013 | [
"MIT"
] | null | null | null | import random.py | joelkalonji/PasswordGeerator | 0f9ae4208f0c228c0b1e85241501f5d95b2b5013 | [
"MIT"
] | null | null | null | import random.py | joelkalonji/PasswordGeerator | 0f9ae4208f0c228c0b1e85241501f5d95b2b5013 | [
"MIT"
] | null | null | null | import random
uppercase_letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
lowercase_letters = "abcdefghijklmnopqrstuvwxyz"
digits = "0123456789"
symbols = "!@#$%^&*()_+-=[]{}|;':,./<>?"
upper, lower, digit, symbol = True, True, True, True
all = ""
if upper :
all += uppercase_letters
if lower :
all += lo... | 20.384615 | 53 | 0.620755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 102 | 0.192453 |
097c50a96728dff3d3f2f66802f6917cbcd87b74 | 20,517 | py | Python | scripts/all_to_all_analyzer.py | jweckstr/westmetro_scripts | a16385b00ac8d80f0068f348226ed89e2d0425a9 | [
"MIT"
] | null | null | null | scripts/all_to_all_analyzer.py | jweckstr/westmetro_scripts | a16385b00ac8d80f0068f348226ed89e2d0425a9 | [
"MIT"
] | null | null | null | scripts/all_to_all_analyzer.py | jweckstr/westmetro_scripts | a16385b00ac8d80f0068f348226ed89e2d0425a9 | [
"MIT"
] | null | null | null | import sqlite3
import pandas
import itertools
import networkx as nx
from gtfspy.gtfs import GTFS
from gtfspy.util import timeit
from scripts.all_to_all_settings import *
def attach_database(conn, other_db_path, name="other"):
cur = conn.cursor()
cur.execute("ATTACH '%s' AS '%s'" % (str(other_db_path), name)... | 53.569191 | 173 | 0.561096 | 18,506 | 0.901984 | 0 | 0 | 2,755 | 0.134279 | 0 | 0 | 9,575 | 0.466686 |
097cf870cfdf8eb690e3cbf5e80ead9f28adc1b0 | 2,258 | py | Python | tests/test_flow/test_snakemake_tutorial.py | flowsaber/flowsaber | 7d68d085bbd9165d2bc0e0acd7826e70569c5fa3 | [
"MIT"
] | 31 | 2021-05-08T06:35:07.000Z | 2022-03-05T05:58:24.000Z | tests/test_flow/test_snakemake_tutorial.py | flowsaber/flowsaber | 7d68d085bbd9165d2bc0e0acd7826e70569c5fa3 | [
"MIT"
] | 3 | 2021-05-10T12:36:57.000Z | 2021-05-15T14:01:15.000Z | tests/test_flow/test_snakemake_tutorial.py | zhqu1148980644/flowsaber | 7d68d085bbd9165d2bc0e0acd7826e70569c5fa3 | [
"MIT"
] | 1 | 2021-03-09T06:18:17.000Z | 2021-03-09T06:18:17.000Z | from flowsaber.api import *
def test_snakemake_workflow():
# EnvTask is the real dependent task when using conda/image option
@shell
def bwa(self, fa: File, fastq: File): # input will be automatically converted if has type annotation
"""bwa mem -t {self.config.cpu} {fa} {fastq} | samtools view -... | 30.931507 | 105 | 0.59876 | 0 | 0 | 0 | 0 | 1,719 | 0.761293 | 0 | 0 | 1,020 | 0.451727 |
097d4bce40bb327df22e412c466f7654eaea0ad3 | 282 | py | Python | code/chapter-2/exercise2_8.py | Kevin-Oudai/python-solutions | d67f6b14723b000fec0011c3e8156b805eb288f7 | [
"MIT"
] | null | null | null | code/chapter-2/exercise2_8.py | Kevin-Oudai/python-solutions | d67f6b14723b000fec0011c3e8156b805eb288f7 | [
"MIT"
] | null | null | null | code/chapter-2/exercise2_8.py | Kevin-Oudai/python-solutions | d67f6b14723b000fec0011c3e8156b805eb288f7 | [
"MIT"
] | null | null | null | mass = eval(input("Enter the amount of water in kilograms: "))
initial_temp = eval(input("Enter the initial temperature: "))
final_temp = eval(input("Enter the final temperature: "))
energy = mass * (final_temp - initial_temp) * 4184
print("The energy needed is {}".format(energy))
| 47 | 62 | 0.72695 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.464539 |
097f150675699f9f0fb29a948db31cc5196c818d | 129 | py | Python | portal_core/apps.py | kacotam-si/portal-core | 1580319520cc002371dcccb1bb4cb11125853121 | [
"MIT"
] | null | null | null | portal_core/apps.py | kacotam-si/portal-core | 1580319520cc002371dcccb1bb4cb11125853121 | [
"MIT"
] | 2 | 2020-06-05T20:45:19.000Z | 2020-10-13T04:25:55.000Z | portal_core/apps.py | kacotam-si/portal-core | 1580319520cc002371dcccb1bb4cb11125853121 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
from django.conf import settings
class PortalCoreConfig(AppConfig):
name = 'portal_core'
| 18.428571 | 34 | 0.790698 | 59 | 0.457364 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.100775 |
097f69d052a1e922b006db68fee1c80d1a486da1 | 1,482 | py | Python | kaggle-lung-cancer-approach2/modules/ctscan.py | flaviostutz/datascience-snippets | 768083c4eda972bc1f6548baa86751e0405bda9b | [
"MIT"
] | 2 | 2017-06-05T17:25:55.000Z | 2018-02-04T04:01:13.000Z | kaggle-lung-cancer-approach2/modules/ctscan.py | flaviostutz/datascience-snippets | 768083c4eda972bc1f6548baa86751e0405bda9b | [
"MIT"
] | null | null | null | kaggle-lung-cancer-approach2/modules/ctscan.py | flaviostutz/datascience-snippets | 768083c4eda972bc1f6548baa86751e0405bda9b | [
"MIT"
] | null | null | null | import glob
import SimpleITK as sitk
import numpy as np
class CTScanMhd(object):
def __init__(self, base_dir, filename):
self.filename = filename
self.coords = None
self.base_dir = base_dir
path = glob.glob(self.base_dir + '/*/' + self.filename + '.mhd')
self.ds = sitk.ReadI... | 30.244898 | 134 | 0.593117 | 1,422 | 0.959514 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.026316 |
098125b6bdbfea383598e527bbb70b034cf26260 | 1,324 | py | Python | py_ad_1_4.py | aisolab/con-par-python | e74cb9c30acfdd78c12c9f7aba039d16ed1f7e78 | [
"MIT"
] | 1 | 2022-02-20T03:14:50.000Z | 2022-02-20T03:14:50.000Z | py_ad_1_4.py | aisolab/con-par-python | e74cb9c30acfdd78c12c9f7aba039d16ed1f7e78 | [
"MIT"
] | null | null | null | py_ad_1_4.py | aisolab/con-par-python | e74cb9c30acfdd78c12c9f7aba039d16ed1f7e78 | [
"MIT"
] | null | null | null | """
Section 1
Multithreading - Thread (2) - Daemon, Join
Keyword - DaemonThread, Join
"""
"""
DaemonThread(데몬스레드)
(1). 백그라운드에서 실행
(2). 메인스레드 종료시 즉시 종료 (서브 스레드의 경우는 메인 스레드와 상관없이 자기 작업을 끝까지 수행함.)
(3). 주로 백그라운드 무한 대기 이벤트 발생 실행하는 부분 담당 -> JVM(가비지 컬렉션), 자동 저장
(4). 일반 스레드는 작업 종료시까지 실행
"""
import logging
import threading
# 스... | 24.981132 | 85 | 0.632175 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,025 | 0.62046 |
09821682a814779b24686f7214f05d5600259f1a | 287 | py | Python | listTest.py | diallog/GCPpy | dabd55ece1c12c1a390a228cd04cb7eb110e564b | [
"Unlicense"
] | null | null | null | listTest.py | diallog/GCPpy | dabd55ece1c12c1a390a228cd04cb7eb110e564b | [
"Unlicense"
] | null | null | null | listTest.py | diallog/GCPpy | dabd55ece1c12c1a390a228cd04cb7eb110e564b | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# PURPOSE: studying function side effects
import os
os.system('clear')
orgList = [5, 3, 2, 1, 4]
def sumList(myList):
for i in range(1, len(myList)):
myList[i] += myList[i-1]
return myList[len(myList)-1]
print(sumList(orgList))
print(orgList)
| 16.882353 | 41 | 0.655052 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.243902 |
09828a4b8ceea5e0df2ba0674a51b0b2f6523586 | 2,029 | py | Python | class/pandas_class.py | Danigore25/python2 | de6d582fcc35107aa21a1bd73fdf04a0d4209d31 | [
"MIT"
] | null | null | null | class/pandas_class.py | Danigore25/python2 | de6d582fcc35107aa21a1bd73fdf04a0d4209d31 | [
"MIT"
] | null | null | null | class/pandas_class.py | Danigore25/python2 | de6d582fcc35107aa21a1bd73fdf04a0d4209d31 | [
"MIT"
] | 2 | 2021-09-07T00:30:49.000Z | 2021-10-19T15:14:54.000Z | import pandas as pd
import numpy as np
serie = pd.Series(['a', 'b', 'c', 'd', 'e'],
index=['a', 'b', 'c', 'd', 'e'],
name="Ejemplo Serie")
print(serie)
ecoli_matraz = pd.Series([0.1, 0.15, 0.19, 0.5,
0.9, 1.4, 1.8, 2.1, 2.3],
... | 30.283582 | 110 | 0.485461 | 112 | 0.055172 | 0 | 0 | 0 | 0 | 0 | 0 | 563 | 0.27734 |
0986c2b4d466c529bcf1de02d35647e1f00797b3 | 6,209 | py | Python | scripts/datasets/mit67_install.py | cclauss/archai | a5fb8f937f7f1319e3204120803b2a045e9f768b | [
"MIT"
] | 344 | 2020-06-12T22:12:56.000Z | 2022-03-29T06:48:20.000Z | scripts/datasets/mit67_install.py | cclauss/archai | a5fb8f937f7f1319e3204120803b2a045e9f768b | [
"MIT"
] | 29 | 2020-06-13T19:56:49.000Z | 2022-03-30T20:26:48.000Z | scripts/datasets/mit67_install.py | cclauss/archai | a5fb8f937f7f1319e3204120803b2a045e9f768b | [
"MIT"
] | 68 | 2020-06-12T19:32:43.000Z | 2022-03-05T06:58:40.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
""" Script to prepare mit67 dataset for pytorch dataloader.
"""
from typing import List, Dict, Tuple, Union, Optional
import os
import pdb
import time
import argparse
import os
import tempfile
import requests
from torchvision.datasets.utils imp... | 35.683908 | 204 | 0.671445 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,845 | 0.297149 |
0986ca341593898178573e0a204ed21602be920f | 99 | py | Python | tail/__init__.py | 0eu/tail-assignment | a86cdcbee88a6d0bf07b7ab7175a7742a5188a2f | [
"MIT"
] | 1 | 2020-12-01T15:05:21.000Z | 2020-12-01T15:05:21.000Z | tail/__init__.py | 0eu/tail-assignment | a86cdcbee88a6d0bf07b7ab7175a7742a5188a2f | [
"MIT"
] | null | null | null | tail/__init__.py | 0eu/tail-assignment | a86cdcbee88a6d0bf07b7ab7175a7742a5188a2f | [
"MIT"
] | null | null | null | from tail.core import read_last_lines, follow_lines
__all__ = ["read_last_lines", "follow_lines"]
| 24.75 | 51 | 0.79798 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.313131 |
09871d53ff57c8147e01e850c7f2f9d9467db849 | 89,305 | py | Python | tests/unit/pywbemcli/test_class_cmds.py | pywbem/pywbemtools | 6b7c3f124324fd3ab7cffb82bc98c8f9555317e4 | [
"Apache-2.0"
] | 8 | 2017-04-01T13:55:00.000Z | 2022-03-15T18:28:47.000Z | tests/unit/pywbemcli/test_class_cmds.py | pywbem/pywbemtools | 6b7c3f124324fd3ab7cffb82bc98c8f9555317e4 | [
"Apache-2.0"
] | 918 | 2017-03-03T14:29:03.000Z | 2022-03-29T15:32:16.000Z | tests/unit/pywbemcli/test_class_cmds.py | pywbem/pywbemtools | 6b7c3f124324fd3ab7cffb82bc98c8f9555317e4 | [
"Apache-2.0"
] | 2 | 2020-01-17T15:56:46.000Z | 2020-02-12T18:49:30.000Z | # Copyright 2018 IBM Corp. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 37.241451 | 114 | 0.554639 | 787 | 0.008812 | 0 | 0 | 613 | 0.006864 | 0 | 0 | 57,146 | 0.639897 |
09887c8ffc4485168a4cf1dc2d552eb82e642cda | 713 | py | Python | src/python/T0/WMBS/Oracle/RunConfig/InsertRecoReleaseConfig.py | silviodonato/T0 | a093729d08b31175ed35cd20e889bd7094ce152a | [
"Apache-2.0"
] | 6 | 2016-03-09T14:36:19.000Z | 2021-07-27T01:28:00.000Z | src/python/T0/WMBS/Oracle/RunConfig/InsertRecoReleaseConfig.py | silviodonato/T0 | a093729d08b31175ed35cd20e889bd7094ce152a | [
"Apache-2.0"
] | 193 | 2015-01-07T21:03:43.000Z | 2022-03-31T12:22:18.000Z | src/python/T0/WMBS/Oracle/RunConfig/InsertRecoReleaseConfig.py | silviodonato/T0 | a093729d08b31175ed35cd20e889bd7094ce152a | [
"Apache-2.0"
] | 36 | 2015-01-28T19:01:54.000Z | 2021-12-15T17:18:20.000Z | """
_InsertRecoReleaseConfig_
Oracle implementation of InsertRecoReleaseConfig
"""
from WMCore.Database.DBFormatter import DBFormatter
class InsertRecoReleaseConfig(DBFormatter):
def execute(self, binds, conn = None, transaction = False):
sql = """INSERT INTO reco_release_config
(RUN_I... | 28.52 | 79 | 0.548387 | 574 | 0.805049 | 0 | 0 | 0 | 0 | 0 | 0 | 408 | 0.57223 |
0988ffb2a91dd9ac6ea127ee5939338c9d7b530e | 1,652 | py | Python | split_wav.py | tanacchi/sound-dataset-generator | a74363c35652dbb7e7cb2dfd390cf89302f3827e | [
"MIT"
] | 1 | 2020-12-02T02:31:33.000Z | 2020-12-02T02:31:33.000Z | split_wav.py | tanacchi/sound_dataset_generator | a74363c35652dbb7e7cb2dfd390cf89302f3827e | [
"MIT"
] | null | null | null | split_wav.py | tanacchi/sound_dataset_generator | a74363c35652dbb7e7cb2dfd390cf89302f3827e | [
"MIT"
] | null | null | null | import wave
import os
import sys
from glob import glob
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--length", type=int, default=30)
parser.add_argument("--offset", type=int, default=15)
args = parser.parse_args()
unit_time_length = args.length
start_time_offset = args.offset
output_dir =... | 33.714286 | 99 | 0.696126 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 167 | 0.10109 |
0989772d33a2049d0a4c7626cd1168ceea9a9af6 | 726 | py | Python | main.py | Code-Cecilia/DownloadArr | c61940e1e4c2ade9d1da4f2467b72dc8b24abcfd | [
"MIT"
] | 1 | 2022-01-30T15:28:19.000Z | 2022-01-30T15:28:19.000Z | main.py | Code-Cecilia/DownloadArr | c61940e1e4c2ade9d1da4f2467b72dc8b24abcfd | [
"MIT"
] | null | null | null | main.py | Code-Cecilia/DownloadArr | c61940e1e4c2ade9d1da4f2467b72dc8b24abcfd | [
"MIT"
] | null | null | null | import sys
import qbittorrentapi
import json
from ui import UI
print("Connecting to qBittorrent WebUI...")
with open('config.json') as json_file:
config = json.load(json_file)
host = config['host']
username = config['username']
password = config['password']
if not host:
host = inp... | 22 | 88 | 0.673554 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.199725 |
098a8775723a6e3a315440de72e96cd1befcdb31 | 2,454 | py | Python | ex075A.py | gabrieleliasdev/python-cev | 45390963b5112a982e673f6a6866da422bf9ae6d | [
"MIT"
] | null | null | null | ex075A.py | gabrieleliasdev/python-cev | 45390963b5112a982e673f6a6866da422bf9ae6d | [
"MIT"
] | null | null | null | ex075A.py | gabrieleliasdev/python-cev | 45390963b5112a982e673f6a6866da422bf9ae6d | [
"MIT"
] | null | null | null | from tkinter import *
janela = Tk()
lista = []
texto1 = StringVar()
texto2 = StringVar()
texto3 = StringVar()
texto4 = StringVar()
#--------------------- PROCESSAMENTO DO COMANDO ------
def click_bt1():
lista.append(int(et1.get()))
lista.append(int(et2.get()))
lista.append(int(et3.get()))
lista.appe... | 31.87013 | 86 | 0.601059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 806 | 0.326448 |
098be8e0625336c24e5f9477904a571723ffcc00 | 247 | py | Python | src/main/Computer.py | aseruneko/diceforge-ai | 546c4a62410f2b0da4de152f36245b22520304dc | [
"CC0-1.0"
] | 3 | 2020-05-14T03:31:13.000Z | 2020-05-14T04:20:19.000Z | src/main/Computer.py | aseruneko/diceforge-ai | 546c4a62410f2b0da4de152f36245b22520304dc | [
"CC0-1.0"
] | 23 | 2020-05-14T03:24:40.000Z | 2020-05-30T11:57:04.000Z | src/main/Computer.py | aseruneko/diceforge-ai | 546c4a62410f2b0da4de152f36245b22520304dc | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
"""
プレイヤーのうち、NPCのクラス
"""
"""
- Playerクラスを継承している
- 全体的に未実装
- 将来的にはここでAIを読み込ませる?
"""
__author__ = "aseruneko"
__date__ = "28 May 2020"
from main.Player import Player
class Computer(Player):
pass | 12.35 | 30 | 0.672065 | 32 | 0.094395 | 0 | 0 | 0 | 0 | 0 | 0 | 241 | 0.710914 |
098d7c6c55f7415535fddaa88a483e5bc3bc96a3 | 650 | py | Python | Python/[4 kyu] Sum of Intervals.py | KonstantinosAng/CodeWars | 9ec9da9ed95b47b9656a5ecf77f486230fd15e3a | [
"MIT"
] | null | null | null | Python/[4 kyu] Sum of Intervals.py | KonstantinosAng/CodeWars | 9ec9da9ed95b47b9656a5ecf77f486230fd15e3a | [
"MIT"
] | null | null | null | Python/[4 kyu] Sum of Intervals.py | KonstantinosAng/CodeWars | 9ec9da9ed95b47b9656a5ecf77f486230fd15e3a | [
"MIT"
] | null | null | null | # More details on this kata
# https://www.codewars.com/kata/52b7ed099cdc285c300001cd
def sum_of_intervals(intervals):
s, ret = [list(x) for x in sorted(intervals)], 0
if len(s) == 1: return abs(s[0][0] - s[0][1])
for i in range(len(s)):
if i + 1 > len(s) - 1: break
if s[i][0] <= s[i + 1][0]... | 32.5 | 56 | 0.432308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.127692 |
098ecd46fb3c22e9788a5fea3f7f90c4783dd2f7 | 59,170 | py | Python | tests/test_certdb.py | crocs-muni/cert-validataion-stats | bd61968c0487e634c160f6e25b7bb0eb1bab64fc | [
"MIT"
] | 3 | 2020-06-26T09:31:35.000Z | 2020-06-26T09:32:17.000Z | tests/test_certdb.py | crocs-muni/cert-validataion-stats | bd61968c0487e634c160f6e25b7bb0eb1bab64fc | [
"MIT"
] | null | null | null | tests/test_certdb.py | crocs-muni/cert-validataion-stats | bd61968c0487e634c160f6e25b7bb0eb1bab64fc | [
"MIT"
] | null | null | null | """
This module contains white-box unit tests of CertDB package
"""
# pylint: disable=W0212, C0103, C0302
import sys
import os
import subprocess
import time
import shutil
import string
import random
import unittest
import unittest.mock
from collections import OrderedDict
import toml
from cevast.utils import make_PEM_fi... | 43.86212 | 112 | 0.65905 | 56,852 | 0.960825 | 0 | 0 | 0 | 0 | 0 | 0 | 13,228 | 0.223559 |
09902a24aa7794ecafdf93045b5137f40aa8d310 | 2,325 | py | Python | src/utils/utils.py | T1b4lt/gen-alg-examples | 7498c3b96fbc2b6c968cc98d0f1ef6551345a1f4 | [
"MIT"
] | null | null | null | src/utils/utils.py | T1b4lt/gen-alg-examples | 7498c3b96fbc2b6c968cc98d0f1ef6551345a1f4 | [
"MIT"
] | null | null | null | src/utils/utils.py | T1b4lt/gen-alg-examples | 7498c3b96fbc2b6c968cc98d0f1ef6551345a1f4 | [
"MIT"
] | null | null | null | import uuid
import numpy as np
class BColors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
class Indv:
def __init__(self, indv_size):
self.indv_size = indv_size
self.weights = np.random.unifo... | 27.034884 | 112 | 0.743656 | 1,019 | 0.43828 | 0 | 0 | 0 | 0 | 0 | 0 | 475 | 0.204301 |
0990ac9875cade50ef8fa38605b20f842216c59c | 516 | py | Python | main/migrations/0023_auto_20200114_2019.py | Ducolnd/SQ37 | 2323c3bd07124f082f1bb018c6ae5ee4cb7c94d1 | [
"Apache-2.0"
] | null | null | null | main/migrations/0023_auto_20200114_2019.py | Ducolnd/SQ37 | 2323c3bd07124f082f1bb018c6ae5ee4cb7c94d1 | [
"Apache-2.0"
] | null | null | null | main/migrations/0023_auto_20200114_2019.py | Ducolnd/SQ37 | 2323c3bd07124f082f1bb018c6ae5ee4cb7c94d1 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.1 on 2020-01-14 19:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0022_auto_20200111_2058'),
]
operations = [
migrations.RemoveField(
model_name='users',
name='expires_at',
... | 22.434783 | 74 | 0.581395 | 423 | 0.819767 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.248062 |
0990bfe14e23c72b11bf2defe5e3302294dbdd91 | 11,197 | py | Python | unit_list.py | guliverza/AdditionalPylons | 37336dcd1678c6cdfa22d881c2178ba65cb1fd61 | [
"MIT"
] | null | null | null | unit_list.py | guliverza/AdditionalPylons | 37336dcd1678c6cdfa22d881c2178ba65cb1fd61 | [
"MIT"
] | null | null | null | unit_list.py | guliverza/AdditionalPylons | 37336dcd1678c6cdfa22d881c2178ba65cb1fd61 | [
"MIT"
] | null | null | null | import sc2
from sc2.constants import *
#our own classes
from unit_counters import UnitCounter
from warpprism import WarpPrism as wpControl
from immortal import Immortal as imControl
from stalker import Stalker as skControl
from zealot import Zealot as zlControl
from sentry import Sentry as snControl
from ade... | 34.24159 | 155 | 0.703224 | 10,214 | 0.912209 | 0 | 0 | 563 | 0.050281 | 0 | 0 | 1,529 | 0.136554 |
09912f75595653975287507558557321b7720adb | 619 | py | Python | src/lib/bver/Versioned/Addon.py | backboneHQ/bver | c3c929442fadb28a3f39d0ddec19fb2dfc7a4732 | [
"MIT"
] | 1 | 2021-09-09T01:22:37.000Z | 2021-09-09T01:22:37.000Z | src/lib/bver/Versioned/Addon.py | backboneHQ/bver | c3c929442fadb28a3f39d0ddec19fb2dfc7a4732 | [
"MIT"
] | null | null | null | src/lib/bver/Versioned/Addon.py | backboneHQ/bver | c3c929442fadb28a3f39d0ddec19fb2dfc7a4732 | [
"MIT"
] | 1 | 2021-09-03T18:45:15.000Z | 2021-09-03T18:45:15.000Z | from .Versioned import Versioned
class Addon(Versioned):
"""
Implements the addon support to the versioned.
"""
def __init__(self, *args, **kwargs):
"""
Create an addon object.
"""
super(Addon, self).__init__(*args, **kwargs)
# setting default options
s... | 23.807692 | 77 | 0.568659 | 583 | 0.941842 | 0 | 0 | 0 | 0 | 0 | 0 | 256 | 0.41357 |
099172de3e642bdeca5a27c254f8bd00fc1bca12 | 393 | py | Python | agendamentos/migrations/0002_rename_ponto_agendamentos.py | afnmachado/univesp_pi_1 | e6f2b545faaf53d14d17f751d2fb32e6618885b7 | [
"MIT"
] | null | null | null | agendamentos/migrations/0002_rename_ponto_agendamentos.py | afnmachado/univesp_pi_1 | e6f2b545faaf53d14d17f751d2fb32e6618885b7 | [
"MIT"
] | null | null | null | agendamentos/migrations/0002_rename_ponto_agendamentos.py | afnmachado/univesp_pi_1 | e6f2b545faaf53d14d17f751d2fb32e6618885b7 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.8 on 2021-11-15 20:32
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('usuarios', '0005_rename_ponto_id_funcionario_ponto'),
('agendamentos', '0001_initial'),
]
operations = [
migrations.RenameModel(
... | 20.684211 | 63 | 0.613232 | 308 | 0.783715 | 0 | 0 | 0 | 0 | 0 | 0 | 146 | 0.371501 |
09928e74c332f7b48d51ab003cf566958a601031 | 5,988 | py | Python | backend/filing/admin.py | bhardwajRahul/sec-filings-app | 8cf7f5956717db8fee1f9a20445986ad9cb831ca | [
"MIT"
] | 36 | 2020-12-04T08:16:38.000Z | 2022-03-22T02:30:49.000Z | backend/filing/admin.py | bhardwajRahul/sec-filings-app | 8cf7f5956717db8fee1f9a20445986ad9cb831ca | [
"MIT"
] | 1 | 2021-10-14T22:20:40.000Z | 2021-10-17T17:29:50.000Z | backend/filing/admin.py | briancaffey/sec-filings-app | 8cf7f5956717db8fee1f9a20445986ad9cb831ca | [
"MIT"
] | 16 | 2020-11-30T18:46:51.000Z | 2022-01-20T23:01:58.000Z | from datetime import date
from django.contrib import admin, messages
from django.core.management import call_command
from django.utils.html import format_html
from django.http import HttpResponseRedirect
from django.urls import path
# Register your models here.
from .models import (
FilingList,
Filing,
H... | 27.981308 | 129 | 0.644122 | 5,192 | 0.867067 | 0 | 0 | 0 | 0 | 0 | 0 | 1,797 | 0.3001 |
0993f348c7032c4b29ebad6f8cebebce182f1117 | 1,039 | py | Python | 2019/day_06.py | nabiirah/advent-of-code | 9c7e7cae437c024aa05d9cb7f9211fd47f5226a2 | [
"MIT"
] | 24 | 2020-12-08T20:07:52.000Z | 2022-01-18T20:08:06.000Z | 2019/day_06.py | nestorhf/advent-of-code | 1bb827e9ea85e03e0720e339d10b3ed8c44d8f27 | [
"MIT"
] | null | null | null | 2019/day_06.py | nestorhf/advent-of-code | 1bb827e9ea85e03e0720e339d10b3ed8c44d8f27 | [
"MIT"
] | 10 | 2020-12-04T10:04:15.000Z | 2022-02-21T22:22:26.000Z | """Advent of Code 2019 Day 6 - Universal Orbit Map."""
with open('inputs/day_06.txt', 'r') as f:
orbits = f.read().split()
objects_dict = {}
for orbit in orbits:
orbited, orbiter = orbit.split(')')
objects_dict[orbiter] = orbited
num_orbits = 0
for orbiter in objects_dict:
next_orbit = objects_dict.... | 25.975 | 79 | 0.704524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 186 | 0.179018 |
099616993ba496a5f298e789a5f964e19fc3db1f | 663 | py | Python | tests/test_handler.py | jbasko/hookery | 5638de2999ad533f83bc9a03110f85e5a0404257 | [
"MIT"
] | 3 | 2017-06-25T22:52:03.000Z | 2018-08-11T22:43:49.000Z | tests/test_handler.py | jbasko/hookery | 5638de2999ad533f83bc9a03110f85e5a0404257 | [
"MIT"
] | null | null | null | tests/test_handler.py | jbasko/hookery | 5638de2999ad533f83bc9a03110f85e5a0404257 | [
"MIT"
] | 1 | 2018-06-05T02:56:28.000Z | 2018-06-05T02:56:28.000Z | from hookery import Handler, Hook
def test_handler_from_func():
def f(a, b):
return a - b
h = Handler(f, Hook('hook1'))
assert callable(h)
assert h.__name__ == 'f'
assert h.name == 'f'
assert h.hook_name == 'hook1'
assert not h.is_generator
assert h(c=8, b=10, a=25) == 15
... | 22.1 | 66 | 0.641026 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.048265 |
0996b5a05af034475da68915d54936a0fd18f441 | 1,057 | py | Python | apps/permcontrol/router.py | zshengsheng/Swallow | dd5098e241c5b4e50e53abbb105fd45323abf4d5 | [
"MIT"
] | 10 | 2018-03-18T14:22:31.000Z | 2019-03-18T03:13:40.000Z | apps/permcontrol/router.py | zshengsheng/Swallow | dd5098e241c5b4e50e53abbb105fd45323abf4d5 | [
"MIT"
] | null | null | null | apps/permcontrol/router.py | zshengsheng/Swallow | dd5098e241c5b4e50e53abbb105fd45323abf4d5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/2/25 14:14
# @Author : ZJJ
# @Email : [email protected]
from .views import UserViewset, ChangeUserPasswdView, GroupsViewset, UserGroupViewset, GroupMemberViewset, \
PermissionViewset, GroupPermViewset, PersonalInfoViewset
from rest_framework... | 52.85 | 109 | 0.796594 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 298 | 0.28193 |
0996f3d1f1ac8a9ea6f99a214f2486805b79d23f | 3,742 | py | Python | __init__.py | FabienBasset/evolucare-skill | 4ecce1615cb11d72196ea745d2753fec19117b12 | [
"Apache-2.0"
] | null | null | null | __init__.py | FabienBasset/evolucare-skill | 4ecce1615cb11d72196ea745d2753fec19117b12 | [
"Apache-2.0"
] | null | null | null | __init__.py | FabienBasset/evolucare-skill | 4ecce1615cb11d72196ea745d2753fec19117b12 | [
"Apache-2.0"
] | null | null | null | # TODO: Add an appropriate license to your skill before publishing. See
# the LICENSE file for more information.
# Below is the list of outside modules you'll be using in your skill.
# They might be built-in to Python, from mycroft-core or from external
# libraries. If you use an external library, be sure to include... | 33.711712 | 84 | 0.638696 | 3,048 | 0.814538 | 0 | 0 | 1,898 | 0.507215 | 0 | 0 | 1,697 | 0.453501 |
0997546f6d77374f92afff882bacd381651ee0ae | 123 | py | Python | inconnu/traits/__init__.py | tiltowait/inconnu | 6cca5fed520899d159537701b695c94222d8dc45 | [
"MIT"
] | 4 | 2021-09-06T20:18:13.000Z | 2022-02-05T17:08:44.000Z | inconnu/traits/__init__.py | tiltowait/inconnu | 6cca5fed520899d159537701b695c94222d8dc45 | [
"MIT"
] | 7 | 2021-09-13T00:46:57.000Z | 2022-01-11T06:38:50.000Z | inconnu/traits/__init__.py | tiltowait/inconnu | 6cca5fed520899d159537701b695c94222d8dc45 | [
"MIT"
] | 2 | 2021-11-27T22:24:53.000Z | 2022-03-16T21:05:00.000Z | """Set up the package interface."""
from .add_update import add, update
from .show import show
from .delete import delete
| 20.5 | 35 | 0.756098 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0.284553 |
0997cd0a89022a9406ffd19fb23a90e8f3cec543 | 300 | py | Python | web/searching.py | Kabanosk/JAVRIS | f3fac115eb537e689c59bd093da34e7f0b34a035 | [
"MIT"
] | null | null | null | web/searching.py | Kabanosk/JAVRIS | f3fac115eb537e689c59bd093da34e7f0b34a035 | [
"MIT"
] | null | null | null | web/searching.py | Kabanosk/JAVRIS | f3fac115eb537e689c59bd093da34e7f0b34a035 | [
"MIT"
] | null | null | null | import webbrowser as web
from bs4 import BeautifulSoup
STARTING_URL = 'https://www.google.com/search?q='
def get_first_website(phrase):
phrase_split = phrase.split()
phrase_url = '+'.join(phrase_split)
search_url = STARTING_URL + phrase_url
web.open_new_tab(search_url)
| 25 | 50 | 0.716667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.123333 |
099a45ec8f275507986b6214bd241fe4b6c71ae3 | 54 | py | Python | tests/__init__.py | GDG-Ukraine/talks-feedback | 9016e2ecc35858d45f4979fab5a54ee953a75f04 | [
"MIT"
] | null | null | null | tests/__init__.py | GDG-Ukraine/talks-feedback | 9016e2ecc35858d45f4979fab5a54ee953a75f04 | [
"MIT"
] | null | null | null | tests/__init__.py | GDG-Ukraine/talks-feedback | 9016e2ecc35858d45f4979fab5a54ee953a75f04 | [
"MIT"
] | null | null | null | """Test suite for the Talks Feedback microservice."""
| 27 | 53 | 0.740741 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 0.981481 |
099a7200287e3918106aa13022ec6083c9f7a764 | 867 | py | Python | app/models.py | KhaledHamoul/nbo_cs_dashboard | 0fc5a3479da4346d3b8f5cf44b19292ea2b99b10 | [
"MIT"
] | null | null | null | app/models.py | KhaledHamoul/nbo_cs_dashboard | 0fc5a3479da4346d3b8f5cf44b19292ea2b99b10 | [
"MIT"
] | null | null | null | app/models.py | KhaledHamoul/nbo_cs_dashboard | 0fc5a3479da4346d3b8f5cf44b19292ea2b99b10 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
import json
class Attribute(models.Model):
name = models.CharField(max_length=200, unique=True)
label = models.CharField(max_length=200)
description = models.TextField()
attribute_type = models.CharField(max_length=30)
class Reco... | 29.896552 | 81 | 0.730104 | 773 | 0.89158 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.026528 |
099bd56c8872287f3abf2cdee5e4888979d01b99 | 86 | py | Python | bigGay/__init__.py | MayaValentia/byleth-bot-dev | d22290156fdac597aca2dd6d83020dbb49ad8ff0 | [
"MIT"
] | 1 | 2020-08-12T18:46:49.000Z | 2020-08-12T18:46:49.000Z | bigGay/__init__.py | MayaValentia/byleth-bot-dev | d22290156fdac597aca2dd6d83020dbb49ad8ff0 | [
"MIT"
] | null | null | null | bigGay/__init__.py | MayaValentia/byleth-bot-dev | d22290156fdac597aca2dd6d83020dbb49ad8ff0 | [
"MIT"
] | 2 | 2020-09-13T02:55:48.000Z | 2021-02-11T09:34:07.000Z | from .bigGay import bigGay
def setup(bot):
cog = bigGay(bot)
bot.add_cog(cog) | 17.2 | 26 | 0.674419 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
099c6d4626feec61b7b00c6c857042abd77c6c2a | 2,039 | py | Python | ai_script_writer.py | FLWL/aoc-ai-parser | 2e08fc7b0909579aced5a84bda3645dbe8834d39 | [
"MIT"
] | 10 | 2019-03-17T00:48:35.000Z | 2022-02-06T18:15:48.000Z | ai_script_writer.py | FLWL/aoc-ai-parser | 2e08fc7b0909579aced5a84bda3645dbe8834d39 | [
"MIT"
] | null | null | null | ai_script_writer.py | FLWL/aoc-ai-parser | 2e08fc7b0909579aced5a84bda3645dbe8834d39 | [
"MIT"
] | 1 | 2022-01-16T12:38:52.000Z | 2022-01-16T12:38:52.000Z | from ai_constants import *
import ai_generator
def get_tab_string(tabment):
return '\t' * tabment
def express_node(cur_node, tabment = 0):
child_nodes = cur_node.children
if cur_node.type == 'DEFRULE':
return "(defrule\n" \
+ express_node(child_nodes[0], tabment + 1) \
... | 30.432836 | 91 | 0.650809 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.095145 |
099d1dd35cd095ae208ec87e7df60676dd935b0a | 1,316 | py | Python | euler-148.py | simonolander/euler | 4d7c4cd9333201cd0065419a511f111b6d75d90c | [
"MIT"
] | null | null | null | euler-148.py | simonolander/euler | 4d7c4cd9333201cd0065419a511f111b6d75d90c | [
"MIT"
] | null | null | null | euler-148.py | simonolander/euler | 4d7c4cd9333201cd0065419a511f111b6d75d90c | [
"MIT"
] | null | null | null | import numpy as np
from tabulate import tabulate
np.set_printoptions(linewidth=400, threshold=100000)
def product(gen):
ans = 1
for g in gen:
ans *= g + 1
return ans
def count_divs_pow(p):
if p == 0 or p == 1:
return 0
else:
full_size = 7**(p-1) * (7**(p-1) - 1) // 2
... | 19.939394 | 70 | 0.506839 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.018237 |
099d22378abb2c23fd159020197e09cb83d9cba8 | 440 | py | Python | geotrek/common/utils/translation.py | GeotrekCE/Geotrek | c1393925c1940ac795ab7fc04819cd8c78bc79fb | [
"BSD-2-Clause"
] | null | null | null | geotrek/common/utils/translation.py | GeotrekCE/Geotrek | c1393925c1940ac795ab7fc04819cd8c78bc79fb | [
"BSD-2-Clause"
] | null | null | null | geotrek/common/utils/translation.py | GeotrekCE/Geotrek | c1393925c1940ac795ab7fc04819cd8c78bc79fb | [
"BSD-2-Clause"
] | null | null | null | from django.conf import settings
if 'modeltranslation' in settings.INSTALLED_APPS:
from modeltranslation.translator import translator, NotRegistered
def get_translated_fields(model):
"""Get translated fields from a model"""
try:
mto = translator.get_options_for_model(model)
except NotRegister... | 27.5 | 69 | 0.731818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 0.131818 |
099dcffa5aed44bda69a923f230dbcd1cba3e9b5 | 141,668 | py | Python | pysnmp-with-texts/OSPF-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/OSPF-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/OSPF-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module OSPF-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/OSPF-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:18:45 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:1... | 152.659483 | 9,786 | 0.785753 | 3,721 | 0.026266 | 0 | 0 | 0 | 0 | 0 | 0 | 65,576 | 0.462885 |
099e3f2b24bd01bfd5b7e1350533a5d17bf7ffdd | 1,695 | py | Python | abandoned-ideas/yml-generator.py | HenryZheng1/sengrep-cli-py | 89d2ffad813706a534290f248220f0d32aeb4c3c | [
"Apache-2.0"
] | null | null | null | abandoned-ideas/yml-generator.py | HenryZheng1/sengrep-cli-py | 89d2ffad813706a534290f248220f0d32aeb4c3c | [
"Apache-2.0"
] | null | null | null | abandoned-ideas/yml-generator.py | HenryZheng1/sengrep-cli-py | 89d2ffad813706a534290f248220f0d32aeb4c3c | [
"Apache-2.0"
] | 2 | 2021-07-23T16:46:16.000Z | 2021-07-30T02:59:43.000Z | from csv import reader
import yaml
import json
def splitrow(row, DELIMETER):
x = row.split(DELIMETER)
return ([] if row == '' else x)
def get_data_from_csv(settings, DELIMETER = '|'):
rules = []
with open(settings['CSV_FILENAME'], 'r') as csv_file:
csv_reader = reader(csv_file)
for r... | 35.3125 | 150 | 0.60118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 213 | 0.125664 |
099e6785d5350ed75115c74f1a4e9bf333839d99 | 4,018 | py | Python | linearizer/utils.py | Max1993Liu/Linearizer | 739c47c0d98d262a0bc962a450729bcf83c61212 | [
"MIT"
] | null | null | null | linearizer/utils.py | Max1993Liu/Linearizer | 739c47c0d98d262a0bc962a450729bcf83c61212 | [
"MIT"
] | null | null | null | linearizer/utils.py | Max1993Liu/Linearizer | 739c47c0d98d262a0bc962a450729bcf83c61212 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from types import FunctionType
import warnings
from .transform import BaseTransformer
def drop_na(x, y, according='both'):
""" Drop the values in both x and y if the element in `according` is missing
ex. drop_na([1, 2, np.nan], [1, 2, 3], 'x') => [1, 2], [1, 2]
... | 31.637795 | 106 | 0.612245 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,423 | 0.354156 |
099e97710e96accac9ae6950fc54a6209ae97168 | 821 | py | Python | lintcode/NineChapters/06/remove-duplicates-from-sorted-list-ii.py | shootsoft/practice | 49f28c2e0240de61d00e4e0291b3c5edd930e345 | [
"Apache-2.0"
] | null | null | null | lintcode/NineChapters/06/remove-duplicates-from-sorted-list-ii.py | shootsoft/practice | 49f28c2e0240de61d00e4e0291b3c5edd930e345 | [
"Apache-2.0"
] | null | null | null | lintcode/NineChapters/06/remove-duplicates-from-sorted-list-ii.py | shootsoft/practice | 49f28c2e0240de61d00e4e0291b3c5edd930e345 | [
"Apache-2.0"
] | null | null | null | __author__ = 'yinjun'
"""
Definition of ListNode
class ListNode(object):
def __init__(self, val, next=None):
self.val = val
self.next = next
"""
class Solution:
"""
@param head: A ListNode
@return: A ListNode
"""
def deleteDuplicates(self, head):
# write your code here
... | 22.805556 | 61 | 0.504263 | 652 | 0.794153 | 0 | 0 | 0 | 0 | 0 | 0 | 236 | 0.287454 |
09a082c5b766d52ac4bd284843a07b1bfbf38eba | 325 | py | Python | testings.py | GYosifov88/Python-Fundamentals | b46ba2822bd2dac6ff46830c6a520e559b448442 | [
"MIT"
] | null | null | null | testings.py | GYosifov88/Python-Fundamentals | b46ba2822bd2dac6ff46830c6a520e559b448442 | [
"MIT"
] | null | null | null | testings.py | GYosifov88/Python-Fundamentals | b46ba2822bd2dac6ff46830c6a520e559b448442 | [
"MIT"
] | null | null | null | class Object:
def __init__(self, type):
self.type = type
def square(self, a, b):
if self.type == 'square':
return a * b
if self.type == 'triangle':
return (a * b) / 2
vid = input()
object = Object(vid)
a = int(input())
b = int(input())
print(f'{object.square(a,b... | 18.055556 | 35 | 0.52 | 221 | 0.68 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.126154 |
09a0e0698bb4f209bcf75379d2f58d655b33426a | 809 | py | Python | argdeco/__main__.py | klorenz/python-argdeco | eb614d63430c5da68a972bdc40f8a1541070089d | [
"MIT"
] | null | null | null | argdeco/__main__.py | klorenz/python-argdeco | eb614d63430c5da68a972bdc40f8a1541070089d | [
"MIT"
] | null | null | null | argdeco/__main__.py | klorenz/python-argdeco | eb614d63430c5da68a972bdc40f8a1541070089d | [
"MIT"
] | null | null | null | from .main import Main
from .arguments import arg
from textwrap import dedent
main = Main()
command = main.command
@command('install-bash-completions',
arg('--dest', help="destination file. Typically ~/.bashrc or ~/.profile", default="~/.bashrc"),
arg('script_name'),
)
def install_bash_completions(dest, scr... | 28.892857 | 100 | 0.700865 | 0 | 0 | 0 | 0 | 680 | 0.840544 | 0 | 0 | 311 | 0.384425 |
09a18d4b2a0fa8ae47cff0df35320c0b38f5b9e2 | 1,500 | py | Python | Resources/Python Example Files/Prior_move_rel.py | stephf0716/MATLAB-scanning-stage | a4f5e96b86d1c95bf16ff7262959b7c0f8b8e51d | [
"MIT"
] | null | null | null | Resources/Python Example Files/Prior_move_rel.py | stephf0716/MATLAB-scanning-stage | a4f5e96b86d1c95bf16ff7262959b7c0f8b8e51d | [
"MIT"
] | null | null | null | Resources/Python Example Files/Prior_move_rel.py | stephf0716/MATLAB-scanning-stage | a4f5e96b86d1c95bf16ff7262959b7c0f8b8e51d | [
"MIT"
] | null | null | null | # *********************************************************
# Relative Stage Movement
#
# Stephanie Fung 2014
# *********************************************************
# Import modules.
# ---------------------------------------------------------
import visa
import string
import struct
import sys
import serial
# =... | 25.862069 | 59 | 0.420667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 869 | 0.579333 |
09a1a281f097af89e78698b2962835021fca03c7 | 7,794 | py | Python | ratatosk/lib/tools/picard.py | SciLifeLab/ratatosk | 4e9c9d8dc868b19a7c70eb7b326422c87bc3d7c0 | [
"Apache-2.0"
] | null | null | null | ratatosk/lib/tools/picard.py | SciLifeLab/ratatosk | 4e9c9d8dc868b19a7c70eb7b326422c87bc3d7c0 | [
"Apache-2.0"
] | null | null | null | ratatosk/lib/tools/picard.py | SciLifeLab/ratatosk | 4e9c9d8dc868b19a7c70eb7b326422c87bc3d7c0 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 Per Unneberg
#
# 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,... | 41.903226 | 186 | 0.673723 | 6,790 | 0.871183 | 0 | 0 | 0 | 0 | 0 | 0 | 1,982 | 0.254298 |
09a25fafbbc8341875cf49512a6963ebb67af9a9 | 1,092 | py | Python | working-with-data/part1/reading-and-writing-text-files.py | LucasHelal/data-science | 9b243be1dea23a521e6ebb49dc358708a9b17dbd | [
"MIT"
] | null | null | null | working-with-data/part1/reading-and-writing-text-files.py | LucasHelal/data-science | 9b243be1dea23a521e6ebb49dc358708a9b17dbd | [
"MIT"
] | null | null | null | working-with-data/part1/reading-and-writing-text-files.py | LucasHelal/data-science | 9b243be1dea23a521e6ebb49dc358708a9b17dbd | [
"MIT"
] | null | null | null | import sys
import pandas as pd
# Can open csv files as a dataframe
dframe = pd.read_csv('lec25.csv')
# Can also use read_table with ',' as a delimiter
dframe = pd.read_table('lec25.csv', sep=',')
# If we dont want the header to be the first row
dframe = pd.read_csv('lec25.csv', header=None)
# We can also indicate a... | 28.736842 | 79 | 0.739011 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 783 | 0.717033 |
09a28df0637d0c34e269ec275da4a8046d1b7543 | 385 | py | Python | python-framework/libs/crypto.py | huangxingx/python-framework | a62618b0ee5ecff9de426327892cdd690d10510d | [
"MIT"
] | 7 | 2019-10-24T03:26:22.000Z | 2019-10-27T14:55:07.000Z | python-framework/libs/crypto.py | PJoemu/python-framework | a62618b0ee5ecff9de426327892cdd690d10510d | [
"MIT"
] | 3 | 2021-06-08T19:13:10.000Z | 2022-01-13T00:38:48.000Z | python-framework/libs/crypto.py | PJoemu/python-framework | a62618b0ee5ecff9de426327892cdd690d10510d | [
"MIT"
] | 2 | 2019-10-25T03:54:51.000Z | 2020-06-28T08:50:12.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @author: x.huang
# @date:17-8-17
from Crypto.Hash import MD5
def encrypto(val):
# python3 需要把进行 encode
# todo 更改项目加密 key
m = MD5.new('python-framework'.encode('utf-8'))
m.update(val.encode('utf-8'))
return m.hexdigest()
def decrypto(val):
pa... | 15.4 | 51 | 0.623377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 191 | 0.469287 |
09a2b27d6e9143175c3eaab5d912857ca2f60085 | 1,428 | py | Python | comments/urls.py | ggetzie/greaterdebater | fb1739f3db42717f3d63fe6c9dbf0c2402fb1fd5 | [
"MIT"
] | null | null | null | comments/urls.py | ggetzie/greaterdebater | fb1739f3db42717f3d63fe6c9dbf0c2402fb1fd5 | [
"MIT"
] | 1 | 2020-05-02T02:03:08.000Z | 2020-05-02T02:03:08.000Z | comments/urls.py | ggetzie/greaterdebater | fb1739f3db42717f3d63fe6c9dbf0c2402fb1fd5 | [
"MIT"
] | null | null | null |
from django.conf.urls import patterns
from comments.views import CommentDebateList
# This url file is included from items.urls with the prefix /comments/
urlpatterns = patterns('',
# Add a comment to a topic
(r'^(?P<topic_id>\d+)/add/$', 'comments.views.add'),
... | 42 | 93 | 0.464286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 685 | 0.479692 |
09a4876d8faaee60c05b563c48e7b9207133b300 | 2,022 | py | Python | src/engine/app.py | vxlk/stoinks | afea92824a21d203098dd41137957f2343ec363d | [
"MIT"
] | 1 | 2020-12-30T23:54:58.000Z | 2020-12-30T23:54:58.000Z | src/engine/app.py | vxlk/stoinks | afea92824a21d203098dd41137957f2343ec363d | [
"MIT"
] | null | null | null | src/engine/app.py | vxlk/stoinks | afea92824a21d203098dd41137957f2343ec363d | [
"MIT"
] | null | null | null | import sys
from threading import Thread
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from pyqtconsole.console import PythonConsole
from view.console import Console
from view.gui_dock import *
from util.logger import *
from model.engine import *
# clear logs
logge... | 27.69863 | 67 | 0.787834 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 347 | 0.171612 |
09a62e7b8881c3b94a94393151fe47674d845dd0 | 845 | py | Python | Python/behavioral_patterns/command/history_command.py | ploukareas/Design-Patterns | 8effde38d73ae9058c3028c97ef395644a90d55b | [
"BSD-3-Clause",
"MIT"
] | 28 | 2018-09-28T07:45:35.000Z | 2022-02-12T12:25:05.000Z | Python/behavioral_patterns/command/history_command.py | ploukareas/Design-Patterns | 8effde38d73ae9058c3028c97ef395644a90d55b | [
"BSD-3-Clause",
"MIT"
] | null | null | null | Python/behavioral_patterns/command/history_command.py | ploukareas/Design-Patterns | 8effde38d73ae9058c3028c97ef395644a90d55b | [
"BSD-3-Clause",
"MIT"
] | 5 | 2021-05-10T23:19:55.000Z | 2022-03-04T20:26:35.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ˅
from behavioral_patterns.command.command import Command
# ˄
# Holder of the past commands
class HistoryCommand(Command):
# ˅
# ˄
def __init__(self):
# A set of past commands
self.__past_commands = []
# ˅
pass
# ... | 15.089286 | 55 | 0.502959 | 704 | 0.815759 | 0 | 0 | 0 | 0 | 0 | 0 | 220 | 0.254925 |
09a65708ef251f13b9781f1e9b250a16f7eb5521 | 8,710 | py | Python | Agents/agent.py | TylerJamesMalloy/bullet3 | e357853815c1e0297683218273de79e586b574c8 | [
"Zlib"
] | null | null | null | Agents/agent.py | TylerJamesMalloy/bullet3 | e357853815c1e0297683218273de79e586b574c8 | [
"Zlib"
] | null | null | null | Agents/agent.py | TylerJamesMalloy/bullet3 | e357853815c1e0297683218273de79e586b574c8 | [
"Zlib"
] | null | null | null | import logging, os, time, multiprocessing, sys, signal
logging.disable(logging.WARNING)
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
import tensorflow as tf
import gym
import pybullet, pybullet_envs, pybullet_data
import numpy as np
import pandas as pd
from stable_baselines.sac.policies import MlpPolicy
from stable_ba... | 46.57754 | 186 | 0.666475 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,587 | 0.182204 |
09a9810fc20f0e86e48fafc4f5dbb9adb6c5702a | 1,274 | py | Python | ToDoApp/todo/urls.py | akmcinto/ToDoApp | 2176294c1cfc33a2e651f613f23922a2c8879a84 | [
"Apache-2.0"
] | null | null | null | ToDoApp/todo/urls.py | akmcinto/ToDoApp | 2176294c1cfc33a2e651f613f23922a2c8879a84 | [
"Apache-2.0"
] | null | null | null | ToDoApp/todo/urls.py | akmcinto/ToDoApp | 2176294c1cfc33a2e651f613f23922a2c8879a84 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2016 Andrea McIntosh
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 i... | 39.8125 | 79 | 0.689953 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 888 | 0.697017 |
09a9fcdb559137e2907018a24bc26f28eb5ecd69 | 81,886 | py | Python | froi/main.py | sunshineDrizzle/FreeROI | e2bae1a19835667988e9dbe4a1a88e5b2778d819 | [
"BSD-3-Clause"
] | 13 | 2016-02-12T05:10:23.000Z | 2021-01-13T01:40:12.000Z | froi/main.py | sunshineDrizzle/FreeROI | e2bae1a19835667988e9dbe4a1a88e5b2778d819 | [
"BSD-3-Clause"
] | 14 | 2015-05-04T05:56:45.000Z | 2021-01-24T11:49:13.000Z | froi/main.py | sunshineDrizzle/FreeROI | e2bae1a19835667988e9dbe4a1a88e5b2778d819 | [
"BSD-3-Clause"
] | 8 | 2016-03-07T06:29:51.000Z | 2017-10-30T13:59:27.000Z | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Graphic User Interface."""
import sys
import os
import glob
import ConfigParser
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from version import __version__
from algorithm.imtool import label... | 46.97992 | 120 | 0.591078 | 79,266 | 0.968004 | 0 | 0 | 0 | 0 | 0 | 0 | 14,646 | 0.178858 |
09aba896248f30069fcb0a73d80efae7ce718e1a | 975 | py | Python | class1/exercise6&7.py | linkdebian/pynet_course | e0de498078ab914b3535fa2ea5c2e71d6e3799fb | [
"Apache-2.0"
] | null | null | null | class1/exercise6&7.py | linkdebian/pynet_course | e0de498078ab914b3535fa2ea5c2e71d6e3799fb | [
"Apache-2.0"
] | null | null | null | class1/exercise6&7.py | linkdebian/pynet_course | e0de498078ab914b3535fa2ea5c2e71d6e3799fb | [
"Apache-2.0"
] | null | null | null | import yaml
import json
from pprint import pprint as pp
my_list = []
while True:
x = raw_input("Enter num or text to add to list or press enter to finish: ")
if not x: break
my_list.append(x)
my_list.append({})
while True:
y = raw_input("Enter the name of the key in the list or press enter to finish... | 20.744681 | 85 | 0.58359 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 449 | 0.460513 |
09abc457e5bd1caa1d8046d6ee92bbfdae5edefe | 1,475 | py | Python | backend/naki/naki/model/digital_item.py | iimcz/emod | 432094c020247597a94e95f76cc524c20b68b685 | [
"MIT"
] | null | null | null | backend/naki/naki/model/digital_item.py | iimcz/emod | 432094c020247597a94e95f76cc524c20b68b685 | [
"MIT"
] | 6 | 2021-03-08T23:32:15.000Z | 2022-02-26T08:11:38.000Z | backend/naki/naki/model/digital_item.py | iimcz/emod | 432094c020247597a94e95f76cc524c20b68b685 | [
"MIT"
] | null | null | null | import colander
from sqlalchemy import Column, ForeignKey
from sqlalchemy.types import DateTime, Integer, Unicode, UnicodeText
from naki.model.meta import Base
class DigitalItem(Base):
__tablename__ = "tDigitalItem"
id_item = Column('sID_Item', Unicode(64), primary_key = True, info={'colanderalchemy': {'m... | 34.302326 | 110 | 0.602034 | 1,303 | 0.88339 | 0 | 0 | 0 | 0 | 0 | 0 | 299 | 0.202712 |
09ae724cdc803309af6a236723605a5ad5b9d098 | 4,389 | py | Python | z3/labeled_dice.py | Wikunia/hakank | 030bc928d2efe8dcbc5118bda3f8ae9575d0fd13 | [
"MIT"
] | 279 | 2015-01-10T09:55:35.000Z | 2022-03-28T02:34:03.000Z | z3/labeled_dice.py | Wikunia/hakank | 030bc928d2efe8dcbc5118bda3f8ae9575d0fd13 | [
"MIT"
] | 10 | 2017-10-05T15:48:50.000Z | 2021-09-20T12:06:52.000Z | z3/labeled_dice.py | Wikunia/hakank | 030bc928d2efe8dcbc5118bda3f8ae9575d0fd13 | [
"MIT"
] | 83 | 2015-01-20T03:44:00.000Z | 2022-03-13T23:53:06.000Z | #!/usr/bin/python -u
# -*- coding: latin-1 -*-
#
# Labeled dice and Building block problems in Z3
#
# * Labeled dice
#
# From Jim Orlin 'Colored letters, labeled dice: a logic puzzle'
# http://jimorlin.wordpress.com/2009/02/17/colored-letters-labeled-dice-a-logic-puzzle/
# '''
# My daughter Jenn bough a puzzle... | 26.281437 | 99 | 0.549784 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,093 | 0.476874 |
09af767430017771c3139a9ce09339ca19b87b16 | 2,741 | py | Python | samples/flat_sample/test.py | benlindsay/job_tree | 0cdb293fd166d8d1cd50e54ab090264029adf978 | [
"MIT"
] | null | null | null | samples/flat_sample/test.py | benlindsay/job_tree | 0cdb293fd166d8d1cd50e54ab090264029adf978 | [
"MIT"
] | null | null | null | samples/flat_sample/test.py | benlindsay/job_tree | 0cdb293fd166d8d1cd50e54ab090264029adf978 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 Ben Lindsay <[email protected]>
from job_tree import job_tree
# Tier 1 is 3 values of VAR_1 (1, 2, and 3) found in 'tier_1.csv'
tier_1_csv_file = 'tier_1.csv'
# Tier 2 is 2 values of VAR_2 for each VAR_1, defined as a function of VAR_1
def tier... | 24.256637 | 79 | 0.549435 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,323 | 0.847501 |
09b071406342703275a6a5f8df9c8ce73299146c | 1,602 | py | Python | scripts/ai/mle/test_ai.py | AlexGustafsson/word-frequencies | 21a73dc1e56770f5563f928b7e3943874c995bd9 | [
"Unlicense"
] | null | null | null | scripts/ai/mle/test_ai.py | AlexGustafsson/word-frequencies | 21a73dc1e56770f5563f928b7e3943874c995bd9 | [
"Unlicense"
] | null | null | null | scripts/ai/mle/test_ai.py | AlexGustafsson/word-frequencies | 21a73dc1e56770f5563f928b7e3943874c995bd9 | [
"Unlicense"
] | null | null | null | import pickle
import random
from argparse import ArgumentParser
# Requires NLTK to be installed:
# python3 -m pip install nltk
# python3 -c 'import nltk;nltk.download("punkt")'
# May be slow at first start due to NLTK preparing its dependencies
from nltk.tokenize.treebank import TreebankWordDetokenizer
from nltk.lm im... | 32.693878 | 115 | 0.692884 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 571 | 0.356429 |
09b38cadc8a5b66d765f9f62596709fa7325c773 | 7,529 | py | Python | lib/common/render_utils.py | YuliangXiu/ICON | ece5a09aa2d56aec28017430e65a0352622a0f30 | [
"Intel"
] | 486 | 2021-12-16T03:13:31.000Z | 2022-03-30T04:26:48.000Z | lib/common/render_utils.py | YuliangXiu/ICON | ece5a09aa2d56aec28017430e65a0352622a0f30 | [
"Intel"
] | 33 | 2021-12-30T07:28:10.000Z | 2022-03-30T08:04:06.000Z | lib/common/render_utils.py | YuliangXiu/ICON | ece5a09aa2d56aec28017430e65a0352622a0f30 | [
"Intel"
] | 38 | 2021-12-17T10:55:01.000Z | 2022-03-30T23:25:39.000Z |
# -*- coding: utf-8 -*-
# Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG) is
# holder of all proprietary rights on this computer program.
# You can only use this computer program if you have closed
# a license agreement with MPG or you get the right to use the computer
# program from someone who i... | 33.914414 | 79 | 0.592376 | 2,436 | 0.32342 | 0 | 0 | 0 | 0 | 0 | 0 | 2,976 | 0.395114 |
09b41443c1ba334ee6ad9dc77418ea29db20354e | 456 | py | Python | merge_string.py | mrillusi0n/compete | ac798e2b1ff27abddd8bebf113d079228f038e56 | [
"MIT"
] | null | null | null | merge_string.py | mrillusi0n/compete | ac798e2b1ff27abddd8bebf113d079228f038e56 | [
"MIT"
] | null | null | null | merge_string.py | mrillusi0n/compete | ac798e2b1ff27abddd8bebf113d079228f038e56 | [
"MIT"
] | null | null | null | ######################### AABCAAADA
from collections import OrderedDict
def remove_duplicates(block):
"""
>>> remove_duplicates('AAB')
>>> 'AB'
"""
freq = OrderedDict()
for c in block:
freq[c] = freq.get(c, 0) + 1
return ''.join(freq.keys())
def solve(text, block_size):
re... | 18.24 | 65 | 0.58114 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.239035 |
09b4cd6f2d42318aef248c6850aeea38ce8781bf | 335 | py | Python | src/art_of_geom/_util/_tmp.py | Mathverse/Art-of-Geometry | 8fd89fd3526f871815c38953580a48b017d39847 | [
"MIT"
] | 1 | 2021-12-25T01:16:10.000Z | 2021-12-25T01:16:10.000Z | src/art_of_geom/_util/_tmp.py | Mathverse/Art-of-Geometry | 8fd89fd3526f871815c38953580a48b017d39847 | [
"MIT"
] | null | null | null | src/art_of_geom/_util/_tmp.py | Mathverse/Art-of-Geometry | 8fd89fd3526f871815c38953580a48b017d39847 | [
"MIT"
] | null | null | null | __all__ = 'TMP_NAME_FACTORY', 'tmp_file_name', 'str_uuid'
import os
from tempfile import NamedTemporaryFile
from uuid import uuid4
def tmp_file_name():
with NamedTemporaryFile() as named_tmp_file:
return os.path.basename(named_tmp_file.name)
def str_uuid():
return str(uuid4())
TMP_NAME_FACTORY =... | 17.631579 | 57 | 0.755224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.128358 |
09b5a2bb038f2cac57634bfef33f5cb085b77a89 | 48 | py | Python | tests/__init__.py | jebabi/controllerx | bc68cdd69e416880e6394b3ecf92522b3871e959 | [
"MIT"
] | 1 | 2020-02-28T17:26:36.000Z | 2020-02-28T17:26:36.000Z | tests/__init__.py | jebabi/controllerx | bc68cdd69e416880e6394b3ecf92522b3871e959 | [
"MIT"
] | null | null | null | tests/__init__.py | jebabi/controllerx | bc68cdd69e416880e6394b3ecf92522b3871e959 | [
"MIT"
] | null | null | null | import sys
sys.path.append("apps/controllerx")
| 12 | 35 | 0.770833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.375 |
09b5d250f780316cd9c06c021e66be29bc76a8ed | 884 | py | Python | tests/views/test_is_component_field_model_or_unicorn_field.py | nerdoc/django-unicorn | e512b8f64f5c276a78127db9a05d9d5c042232d5 | [
"MIT"
] | 1 | 2021-12-21T16:20:49.000Z | 2021-12-21T16:20:49.000Z | tests/views/test_is_component_field_model_or_unicorn_field.py | teury/django-unicorn | 5e9142b8a7e13b862ece419d567e805cc783b517 | [
"MIT"
] | null | null | null | tests/views/test_is_component_field_model_or_unicorn_field.py | teury/django-unicorn | 5e9142b8a7e13b862ece419d567e805cc783b517 | [
"MIT"
] | 1 | 2022-02-10T07:47:01.000Z | 2022-02-10T07:47:01.000Z | from django_unicorn.components import UnicornView
from django_unicorn.views.utils import _is_component_field_model_or_unicorn_field
from example.coffee.models import Flavor
class TypeHintView(UnicornView):
model: Flavor = None
class ModelInstanceView(UnicornView):
model = Flavor()
def test_type_hint():
... | 27.625 | 81 | 0.7681 | 115 | 0.13009 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.042986 |
09bb144937911126f0899a4f90a8ca7646246b73 | 431 | py | Python | data_wrangling/data_manipulation/check_if_even.py | dkedar7/Notes | 08a9e710a774fd46ec525e0041c1cbd67fbe6c20 | [
"MIT"
] | 3 | 2021-05-28T09:00:56.000Z | 2021-12-21T01:12:20.000Z | data_wrangling/data_manipulation/check_if_even.py | dkedar7/Notes | 08a9e710a774fd46ec525e0041c1cbd67fbe6c20 | [
"MIT"
] | null | null | null | data_wrangling/data_manipulation/check_if_even.py | dkedar7/Notes | 08a9e710a774fd46ec525e0041c1cbd67fbe6c20 | [
"MIT"
] | null | null | null |
import pytest
testdata = [
(2, True),
(3, False),
(4, True),
(5, True) # We expect this test to fail
]
def check_if_even(a):
"""
Returns True if 'a' is an even number
"""
return a % 2 == 0
@pytest.mark.parametrize('sample, expected_output', testdata)
def test_check_if_even(sample... | 17.958333 | 61 | 0.612529 | 0 | 0 | 0 | 0 | 201 | 0.466357 | 0 | 0 | 140 | 0.324826 |
09bf7c1ce0c20840d83284f246ccdbf099539181 | 4,970 | py | Python | intvalpy/linear/system_properties.py | SShary/intvalpy | 42f4c8f6b23e6481f4032b0a0f7cc0d798fda3be | [
"MIT"
] | null | null | null | intvalpy/linear/system_properties.py | SShary/intvalpy | 42f4c8f6b23e6481f4032b0a0f7cc0d798fda3be | [
"MIT"
] | null | null | null | intvalpy/linear/system_properties.py | SShary/intvalpy | 42f4c8f6b23e6481f4032b0a0f7cc0d798fda3be | [
"MIT"
] | null | null | null | import numpy as np
from scipy.optimize import minimize
from intvalpy.MyClass import Interval
from intvalpy.intoper import zeros
def Uni(A, b, x=None, maxQ=False, x0=None, tol=1e-12, maxiter=1e3):
"""
Вычисление распознающего функционала Uni.
В случае, если maxQ=True то находится максимум функционала.
... | 31.257862 | 86 | 0.547485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,433 | 0.707808 |
09bffb272321cfeba42574b90d3f77c2507d62be | 3,648 | py | Python | libcity/utils/GPS_utils.py | moghadas76/test_bigcity | 607b9602c5b1113b23e1830455e174b0901d7558 | [
"Apache-2.0"
] | 221 | 2021-09-06T03:33:31.000Z | 2022-03-28T05:36:49.000Z | libcity/utils/GPS_utils.py | moghadas76/test_bigcity | 607b9602c5b1113b23e1830455e174b0901d7558 | [
"Apache-2.0"
] | 43 | 2021-09-19T16:12:28.000Z | 2022-03-31T16:29:03.000Z | libcity/utils/GPS_utils.py | moghadas76/test_bigcity | 607b9602c5b1113b23e1830455e174b0901d7558 | [
"Apache-2.0"
] | 64 | 2021-09-06T07:56:10.000Z | 2022-03-25T08:48:35.000Z | import math
R_EARTH = 6371000 # meter
def angle2radian(angle):
"""
convert from an angle to a radian
:param angle: (float)
:return: radian (float)
"""
return math.radians(angle)
def radian2angle(radian):
return math.degrees(radian)
def spherical_law_of_cosines(phi1, lambda1, phi2, la... | 32.283186 | 111 | 0.654331 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,595 | 0.436747 |
09c01d1c28ae990e8cd5cd83a9d33b741fa6c805 | 1,154 | py | Python | python/docstring/__init__.py | liguohao96/template | 31648c4334bdce50cadcfc707c5f64c483e1abce | [
"MIT"
] | null | null | null | python/docstring/__init__.py | liguohao96/template | 31648c4334bdce50cadcfc707c5f64c483e1abce | [
"MIT"
] | null | null | null | python/docstring/__init__.py | liguohao96/template | 31648c4334bdce50cadcfc707c5f64c483e1abce | [
"MIT"
] | null | null | null | """
Python Template for docstring
-----------------------------
python.docstring is a package cotaining TEMPLATE for docstring in python.
usage:
>>> from python import docstring
>>> help(docstring)
>>> print(docstring.module_.__doc__)
>>> print(docstring.class_.__doc__)
>>> print(docstrin... | 31.189189 | 90 | 0.714905 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 401 | 0.347487 |
09c0c79a0b5cfaa45266d9d9675a6a0f9435dae8 | 6,234 | py | Python | orwell/agent/main.py | dchilot/agent-server-game-python | ce8db9560047a06960343cc66a9eddb11e77f5a1 | [
"BSD-3-Clause"
] | null | null | null | orwell/agent/main.py | dchilot/agent-server-game-python | ce8db9560047a06960343cc66a9eddb11e77f5a1 | [
"BSD-3-Clause"
] | null | null | null | orwell/agent/main.py | dchilot/agent-server-game-python | ce8db9560047a06960343cc66a9eddb11e77f5a1 | [
"BSD-3-Clause"
] | null | null | null | import logging
import sys
import socket
from cliff.app import App
from cliff.command import Command
from cliff.commandmanager import CommandManager
class RegisteredCommand(Command):
def __init__(self, app, app_args):
super(RegisteredCommand, self).__init__(app, app_args)
@classmethod
def registe... | 26.193277 | 76 | 0.611806 | 5,875 | 0.942413 | 0 | 0 | 121 | 0.01941 | 0 | 0 | 826 | 0.132499 |
09c1b09e1644ac2346f010a7494eb66da023d9f8 | 88 | py | Python | yad2/encoders/__init__.py | odcinek/yad2 | 5ecf5073a7eb9651944837e33c083c4a1e7945bc | [
"MIT"
] | null | null | null | yad2/encoders/__init__.py | odcinek/yad2 | 5ecf5073a7eb9651944837e33c083c4a1e7945bc | [
"MIT"
] | null | null | null | yad2/encoders/__init__.py | odcinek/yad2 | 5ecf5073a7eb9651944837e33c083c4a1e7945bc | [
"MIT"
] | 1 | 2021-10-17T15:46:50.000Z | 2021-10-17T15:46:50.000Z | from format2 import Format2
from format40 import Format40
from format80 import Format80
| 22 | 29 | 0.863636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
09c1d29d541d96d593332dafbd24a6cf449f04ba | 20,705 | py | Python | bin/scripts/findsnps_refalt.py | smozaffari/ASE | ad0013daf8505227d1818ba8f9e4ea6cc1fd0f4b | [
"Apache-2.0"
] | null | null | null | bin/scripts/findsnps_refalt.py | smozaffari/ASE | ad0013daf8505227d1818ba8f9e4ea6cc1fd0f4b | [
"Apache-2.0"
] | null | null | null | bin/scripts/findsnps_refalt.py | smozaffari/ASE | ad0013daf8505227d1818ba8f9e4ea6cc1fd0f4b | [
"Apache-2.0"
] | 1 | 2016-01-26T07:15:50.000Z | 2016-01-26T07:15:50.000Z |
import sys
import os
import gzip
import argparse
import numpy as np
import pysam
import util
import snptable
import tables
MAX_SEQS_DEFAULT = 64
MAX_SNPS_DEFAULT = 6
class DataFiles(object):
"""Object to hold names and filehandles for all input / output
datafiles"""
def __init__(self, bam_filen... | 40.203883 | 205 | 0.543009 | 6,186 | 0.298768 | 0 | 0 | 0 | 0 | 0 | 0 | 7,476 | 0.361072 |
09c1f3727d6933c8c847df8d0be18f6dbfa8e1a9 | 25,145 | py | Python | bungieapi/generated/clients/group_v2.py | itemmanager/bungieapi | 0c4326f88ea0f28a1dcab683dc08c8d21c940fc1 | [
"MIT"
] | 5 | 2022-01-06T21:05:53.000Z | 2022-02-12T19:58:11.000Z | bungieapi/generated/clients/group_v2.py | itemmanager/bungieapi | 0c4326f88ea0f28a1dcab683dc08c8d21c940fc1 | [
"MIT"
] | 8 | 2021-12-25T02:40:56.000Z | 2022-03-28T03:31:41.000Z | bungieapi/generated/clients/group_v2.py | itemmanager/bungieapi | 0c4326f88ea0f28a1dcab683dc08c8d21c940fc1 | [
"MIT"
] | 1 | 2022-01-30T23:53:25.000Z | 2022-01-30T23:53:25.000Z | # generated by update to not change manually
import typing as t
from bungieapi.base import BaseClient, clean_query_value
from bungieapi.forge import forge
from bungieapi.generated.components.responses import (
CEListOfGroupOptionalConversationClientResponse,
DictionaryOfint32AndstringClientResponse,
ListOf... | 36.923642 | 197 | 0.643786 | 23,629 | 0.93971 | 0 | 0 | 0 | 0 | 23,401 | 0.930642 | 12,182 | 0.48447 |
09c267a3cb1cc17f6f5bb5ef69492d09f87a64fa | 1,475 | py | Python | tests/test_models.py | jimimvp/CausalProb | 900527725ad43eac258df2b16ef93fd1643deb3a | [
"MIT"
] | 3 | 2021-11-04T16:37:45.000Z | 2022-03-08T10:24:19.000Z | tests/test_models.py | jimimvp/CausalProb | 900527725ad43eac258df2b16ef93fd1643deb3a | [
"MIT"
] | 13 | 2021-11-07T11:11:54.000Z | 2021-11-20T10:40:39.000Z | tests/test_models.py | jimimvp/CausalProb | 900527725ad43eac258df2b16ef93fd1643deb3a | [
"MIT"
] | 1 | 2021-11-17T21:40:49.000Z | 2021-11-17T21:40:49.000Z | from causalprob import CausalProb
import unittest
import jax.numpy as jnp
import numpy as np
class TestNFConfounderModel(unittest.TestCase):
def test_is_inverse_function(self):
from models.nf_confounder_model import define_model
dim = 2
model = define_model(dim=dim)
cp = CausalPr... | 39.864865 | 122 | 0.547119 | 1,377 | 0.933559 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
09c2c4fe16627c25f8121510a450845e41ae70cc | 1,713 | py | Python | python/analysis/simulations/replot_as_bar.py | UKPLab/tacl2018-preference-convincing | 65eb1cd3bf76f8068889880e0f80178e790350ce | [
"Apache-2.0"
] | 13 | 2019-03-01T19:40:23.000Z | 2022-01-10T05:53:47.000Z | python/analysis/simulations/replot_as_bar.py | UKPLab/tacl2018-preference-convincing | 65eb1cd3bf76f8068889880e0f80178e790350ce | [
"Apache-2.0"
] | 12 | 2020-11-13T17:54:01.000Z | 2022-02-09T23:39:11.000Z | python/analysis/simulations/replot_as_bar.py | UKPLab/tacl2018-preference-convincing | 65eb1cd3bf76f8068889880e0f80178e790350ce | [
"Apache-2.0"
] | 5 | 2019-02-06T12:08:20.000Z | 2022-01-10T20:40:22.000Z | '''
Generate a bar chart with error bars -- might be easier to read than a line graph with error bars.
'''
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
def plot_result(idx, filename, xlabel, ylabel, linelabel, fig=None):
if fig is None:
fig = plt.figure(figsize=(5, 4))
else:
... | 32.320755 | 119 | 0.624051 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 784 | 0.457677 |
09c49181d3fdabb104e8b2473f43e07ce944fcb6 | 74 | py | Python | shapes-trainer/training_shapes_module/__init__.py | dakotaJang/shapes | 19ba73ad2a9b50b57cafca53560678273aeb7776 | [
"MIT"
] | 1 | 2019-02-02T11:46:55.000Z | 2019-02-02T11:46:55.000Z | shapes-trainer/training_shapes_module/__init__.py | dakotaJang/shapes | 19ba73ad2a9b50b57cafca53560678273aeb7776 | [
"MIT"
] | null | null | null | shapes-trainer/training_shapes_module/__init__.py | dakotaJang/shapes | 19ba73ad2a9b50b57cafca53560678273aeb7776 | [
"MIT"
] | null | null | null | from .loader import *
from .model import *
from .train_and_test import * | 24.666667 | 29 | 0.743243 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
09c6c74d8c24c276c440f25295526d610514d57d | 468 | py | Python | python-lab-file/78_tkintermenu.py | zshashz/py1729 | 3281ae2a20c665ebcc0d53840cc95143cbe6861b | [
"MIT"
] | 1 | 2021-01-22T09:03:59.000Z | 2021-01-22T09:03:59.000Z | python-lab-file/78_tkintermenu.py | zshashz/py1729 | 3281ae2a20c665ebcc0d53840cc95143cbe6861b | [
"MIT"
] | null | null | null | python-lab-file/78_tkintermenu.py | zshashz/py1729 | 3281ae2a20c665ebcc0d53840cc95143cbe6861b | [
"MIT"
] | 2 | 2021-05-04T11:29:38.000Z | 2021-11-03T13:09:48.000Z | # Program 77 : make Tkinter menu
from tkinter import *
from tkinter import *
root = Tk()
menu = Menu(root)
root.config(menu=menu)
filemenu = Menu(menu)
menu.add_cascade(label='File', menu=filemenu)
filemenu.add_command(label='New')
filemenu.add_command(label='Open...')
filemenu.add_separator()
filemenu.add_command(... | 23.4 | 53 | 0.75641 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.151709 |
09c972c8ee2252231ba255a8d7fd24be9200e9e4 | 445 | py | Python | chat/tests/factories.py | gurupratap-matharu/chatylon | d23ce4b9fa3954ad49fc18647ccf54cd0cc73cf8 | [
"MIT"
] | 4 | 2020-11-16T01:53:17.000Z | 2021-09-01T06:02:31.000Z | chat/tests/factories.py | gurupratap-matharu/chatylon | d23ce4b9fa3954ad49fc18647ccf54cd0cc73cf8 | [
"MIT"
] | null | null | null | chat/tests/factories.py | gurupratap-matharu/chatylon | d23ce4b9fa3954ad49fc18647ccf54cd0cc73cf8 | [
"MIT"
] | null | null | null | import factory
from chat.models import Chat, ChatRoom
from users.factories import UserFactory
class ChatRoomFactory(factory.django.DjangoModelFactory):
class Meta:
model = ChatRoom
name = factory.Faker('word')
class ChatFactory(factory.django.DjangoModelFactory):
class Meta:
model = Cha... | 22.25 | 57 | 0.730337 | 345 | 0.775281 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.035955 |
09c9a15d0f7a17f53680be679c2a6066d5b21c97 | 1,335 | py | Python | tools/prepare_data.py | xrick/CTC_DySpeechCommands | d92cb97f7344fb5acdb6aa3fc3dfb7c022fffc6e | [
"MIT"
] | 74 | 2018-05-05T18:43:28.000Z | 2022-03-21T13:00:14.000Z | tools/prepare_data.py | xrick/CTC_DySpeechCommands | d92cb97f7344fb5acdb6aa3fc3dfb7c022fffc6e | [
"MIT"
] | 5 | 2018-07-20T16:18:57.000Z | 2021-01-26T11:52:31.000Z | tools/prepare_data.py | xrick/CTC_DySpeechCommands | d92cb97f7344fb5acdb6aa3fc3dfb7c022fffc6e | [
"MIT"
] | 21 | 2018-06-18T07:21:19.000Z | 2021-04-11T06:49:03.000Z | """Downloads the training dataset and removes bad samples.
"""
import csv
import os
import urllib.request
import tarfile
import glob
DATA_URL = 'http://download.tensorflow.org/data/speech_commands_v0.01.tar.gz'
TRAIN_DIR = '../dataset/train/audio/'
FILE_BAD = 'bad_samples.txt'
def maybe_download(data_url, dest_di... | 26.7 | 77 | 0.698876 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 401 | 0.300375 |
09ca172ccac0fbc44db1af59fb9a28884f053bb0 | 162 | py | Python | remote_control/apps.py | adrienemery/auv-control-api | 44d04c070879be3a52633369886534657b2d67ca | [
"MIT"
] | null | null | null | remote_control/apps.py | adrienemery/auv-control-api | 44d04c070879be3a52633369886534657b2d67ca | [
"MIT"
] | 2 | 2016-08-03T00:37:37.000Z | 2016-08-03T00:46:12.000Z | remote_control/apps.py | adrienemery/auv-control | 44d04c070879be3a52633369886534657b2d67ca | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class RemoteControlConfig(AppConfig):
name = 'remote_control'
def ready(self):
import remote_control.signals
| 18 | 37 | 0.734568 | 125 | 0.771605 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.098765 |
09caab87d8b63d185ae16695cb5079d8b60078ed | 4,232 | py | Python | Dashboard_Relay/tests/unit/api/test_authorization.py | weiwa6/SecValidation | e899b7aa3f46ded3b39aeb6a1eeab95cc8dc21b5 | [
"BSD-3-Clause"
] | null | null | null | Dashboard_Relay/tests/unit/api/test_authorization.py | weiwa6/SecValidation | e899b7aa3f46ded3b39aeb6a1eeab95cc8dc21b5 | [
"BSD-3-Clause"
] | null | null | null | Dashboard_Relay/tests/unit/api/test_authorization.py | weiwa6/SecValidation | e899b7aa3f46ded3b39aeb6a1eeab95cc8dc21b5 | [
"BSD-3-Clause"
] | null | null | null | from http import HTTPStatus
from authlib.jose import jwt
from pytest import fixture
from .utils import get_headers
from api.errors import AUTH_ERROR
def routes():
yield '/health'
yield '/deliberate/observables'
yield '/observe/observables'
yield '/refer/observables'
yield '/respond/observables'
... | 27.660131 | 79 | 0.712193 | 0 | 0 | 195 | 0.046078 | 1,502 | 0.354915 | 0 | 0 | 580 | 0.137051 |
09cbcab75f8e35ba54cb7a9b30b5581da605210d | 1,562 | py | Python | ops-implementations/ads-ml-service/app/gunicorn.init.py | IBM/open-prediction-service-hub | 8b7db98f46a81b731d0dddfde8e3fb6f91ebc71a | [
"Apache-2.0"
] | 1 | 2021-09-14T18:40:33.000Z | 2021-09-14T18:40:33.000Z | ops-implementations/ads-ml-service/app/gunicorn.init.py | IBM/open-prediction-service-hub | 8b7db98f46a81b731d0dddfde8e3fb6f91ebc71a | [
"Apache-2.0"
] | 7 | 2021-04-23T13:41:39.000Z | 2021-08-12T09:33:10.000Z | ops-implementations/ads-ml-service/app/gunicorn.init.py | IBM/open-prediction-service-hub | 8b7db98f46a81b731d0dddfde8e3fb6f91ebc71a | [
"Apache-2.0"
] | 5 | 2020-12-10T14:27:23.000Z | 2022-03-29T08:44:22.000Z | #!/usr/bin/env python3
#
# Copyright 2020 IBM
# 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 t... | 33.956522 | 111 | 0.734955 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,057 | 0.676697 |
09cd5bd9b3afeaf12e00c4f547e27cdd27294e5a | 394 | py | Python | projecteuler/util/summation.py | Tenebrar/codebase | 59c9a35289fb29afedad0e3edd0519b67372ef9f | [
"Unlicense"
] | 1 | 2020-04-21T11:39:25.000Z | 2020-04-21T11:39:25.000Z | projecteuler/util/summation.py | Tenebrar/codebase | 59c9a35289fb29afedad0e3edd0519b67372ef9f | [
"Unlicense"
] | 7 | 2020-02-12T01:08:01.000Z | 2022-02-10T11:56:56.000Z | projecteuler/util/summation.py | Tenebrar/codebase | 59c9a35289fb29afedad0e3edd0519b67372ef9f | [
"Unlicense"
] | null | null | null | def sum_all_to(num: int) -> int:
""" Return the sum of all numbers up to and including the input number """
return num * (num + 1) // 2
def square_pyramidal_number(num: int) -> int:
""" Return the sum of the squares of all numbers up to and including the input number """
# https://en.wikipedia.org/wik... | 39.4 | 93 | 0.649746 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 218 | 0.553299 |
09ce6912201c289c5c7f36b054105384590d7dc8 | 2,143 | py | Python | graphics/place_camera.py | bdemin/M113_Visualization | bf863af9dfc2902ae9123afeae8d5bd413a4bedb | [
"MIT"
] | null | null | null | graphics/place_camera.py | bdemin/M113_Visualization | bf863af9dfc2902ae9123afeae8d5bd413a4bedb | [
"MIT"
] | null | null | null | graphics/place_camera.py | bdemin/M113_Visualization | bf863af9dfc2902ae9123afeae8d5bd413a4bedb | [
"MIT"
] | null | null | null | import numpy as np
def place_camera(time, data, camera, camera_distance, view):
# Define camera parameters
camera.SetViewUp([0,0,1])
if view == 1:
# General view
chs_pos = data[0][0].path_loc[time] # Chassis CG @ time
cam_d = 12 # [m]
cam_h = 4.5 # [m]
chs2cam... | 31.985075 | 133 | 0.585161 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 462 | 0.215586 |
09cf011d62fddefba9f4507356da24e66db71898 | 16,405 | py | Python | src/tools/api_compiler/compiler.py | facade-technologies-inc/facile | 4c9134dced71734641fed605e152880cd9ddefe3 | [
"MIT"
] | 2 | 2020-09-17T20:51:18.000Z | 2020-11-03T15:58:10.000Z | src/tools/api_compiler/compiler.py | facade-technologies-inc/facile | 4c9134dced71734641fed605e152880cd9ddefe3 | [
"MIT"
] | 97 | 2020-08-26T05:07:08.000Z | 2022-03-28T16:01:49.000Z | src/tools/api_compiler/compiler.py | facade-technologies-inc/facile | 4c9134dced71734641fed605e152880cd9ddefe3 | [
"MIT"
] | null | null | null | """
..
/------------------------------------------------------------------------------\
| -- FACADE TECHNOLOGIES INC. CONFIDENTIAL -- |
|------------------------------------------------------------------------------|
| ... | 40.208333 | 120 | 0.585431 | 13,746 | 0.837915 | 0 | 0 | 2,993 | 0.182444 | 0 | 0 | 6,578 | 0.400975 |