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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8297797069048f1e64c87757d3ccf7043bd8704b | 3,690 | py | Python | src/tests/dao_test/guild_roles_dao_test.py | Veloxization/likahbot | 24e22711f514fc0878cf6fb9e516ad44425ea6a7 | [
"MIT"
] | null | null | null | src/tests/dao_test/guild_roles_dao_test.py | Veloxization/likahbot | 24e22711f514fc0878cf6fb9e516ad44425ea6a7 | [
"MIT"
] | null | null | null | src/tests/dao_test/guild_roles_dao_test.py | Veloxization/likahbot | 24e22711f514fc0878cf6fb9e516ad44425ea6a7 | [
"MIT"
] | null | null | null | import unittest
import os
from dao.guild_roles_dao import GuildRolesDAO
from dao.guild_role_categories_dao import GuildRoleCategoriesDAO
class TestGuildRolesDAO(unittest.TestCase):
def setUp(self):
self.db_addr = "database/test_db.db"
os.popen(f"sqlite3 {self.db_addr} < database/schema.sql")
... | 52.714286 | 103 | 0.746612 | 3,551 | 0.962331 | 0 | 0 | 0 | 0 | 0 | 0 | 158 | 0.042818 |
82995e877d2337617c9148dbf6692f9969d5a1fd | 1,115 | py | Python | qcic.py | milkllc/qcic | dfa8eae928689e3cb114587f62947b7d8397fdef | [
"MIT"
] | null | null | null | qcic.py | milkllc/qcic | dfa8eae928689e3cb114587f62947b7d8397fdef | [
"MIT"
] | null | null | null | qcic.py | milkllc/qcic | dfa8eae928689e3cb114587f62947b7d8397fdef | [
"MIT"
] | null | null | null | import picamera
import datetime
import os
delcount = 2
def check_fs():
global delcount
st = os.statvfs('/')
pct = 100 - st.f_bavail * 100.0 / st.f_blocks
print pct, "percent full"
if pct > 90:
# less than 10% left, delete a few minutes
files = os.listdir('.')
files.so... | 25.340909 | 74 | 0.574888 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 190 | 0.170404 |
8299b31e5521abb8d2f8dfff1c5df4a520607b18 | 164 | py | Python | exercises/allergies/allergies.py | akashsara/python | 6778e437487ad0e813959fe8a5e8fd37302704f5 | [
"MIT"
] | null | null | null | exercises/allergies/allergies.py | akashsara/python | 6778e437487ad0e813959fe8a5e8fd37302704f5 | [
"MIT"
] | 1 | 2019-12-17T18:24:34.000Z | 2019-12-18T12:16:52.000Z | exercises/allergies/allergies.py | akashsara/python | 6778e437487ad0e813959fe8a5e8fd37302704f5 | [
"MIT"
] | null | null | null | class Allergies(object):
def __init__(self, score):
pass
def allergic_to(self, item):
pass
@property
def lst(self):
pass
| 13.666667 | 32 | 0.560976 | 163 | 0.993902 | 0 | 0 | 41 | 0.25 | 0 | 0 | 0 | 0 |
8299ba8eed08b051c1bd7e22979a2992369a89ff | 4,398 | py | Python | forge/mock_handle.py | ujjwalsh/pyforge | 454d7df39f6d6cc7531d3f87e7b7f7d83ae6e66e | [
"BSD-3-Clause"
] | 7 | 2015-01-01T18:40:53.000Z | 2021-10-20T14:13:08.000Z | forge/mock_handle.py | ujjwalsh/pyforge | 454d7df39f6d6cc7531d3f87e7b7f7d83ae6e66e | [
"BSD-3-Clause"
] | 6 | 2016-03-31T16:40:30.000Z | 2020-12-23T07:24:53.000Z | forge/mock_handle.py | ujjwalsh/pyforge | 454d7df39f6d6cc7531d3f87e7b7f7d83ae6e66e | [
"BSD-3-Clause"
] | 9 | 2016-03-31T15:21:29.000Z | 2021-03-20T06:29:09.000Z | from .handle import ForgeHandle
class MockHandle(ForgeHandle):
def __init__(self, forge, mock, behave_as_instance=True):
super(MockHandle, self).__init__(forge)
self.mock = mock
self.behaves_as_instance = behave_as_instance
self._attributes = {}
self._is_hashable = False
... | 48.32967 | 116 | 0.705548 | 4,364 | 0.992269 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.007049 |
8299d63942c82469cfa51d90a39b4e86d506709d | 4,599 | py | Python | RecoBTag/PerformanceDB/python/measure/Pool_mistag110118.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | RecoBTag/PerformanceDB/python/measure/Pool_mistag110118.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | RecoBTag/PerformanceDB/python/measure/Pool_mistag110118.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from CondCore.DBCommon.CondDBCommon_cfi import *
PoolDBESSourceMistag110118 = cms.ESSource("PoolDBESSource",
CondDBCommon,
toGet = cms.VPSet(
#
# working points
#
cms.PSet(
record = cms.string('Per... | 37.390244 | 88 | 0.704718 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,960 | 0.42618 |
829b4d9d2ba83ae6309dbbbee76b950d8044a7f9 | 7,423 | py | Python | src/ScheduleEvaluation.py | franTarkenton/replication_health_check | 61d9197c6e007650437789ef7780da422af6b7fe | [
"Apache-2.0"
] | null | null | null | src/ScheduleEvaluation.py | franTarkenton/replication_health_check | 61d9197c6e007650437789ef7780da422af6b7fe | [
"Apache-2.0"
] | 3 | 2020-04-17T21:52:43.000Z | 2022-03-01T21:47:25.000Z | src/ScheduleEvaluation.py | franTarkenton/replication_health_check | 61d9197c6e007650437789ef7780da422af6b7fe | [
"Apache-2.0"
] | 3 | 2018-11-26T17:44:09.000Z | 2021-04-14T22:10:38.000Z | '''
Created on Nov 22, 2018
@author: kjnether
methods that evaluate the given schedule
'''
import logging
import FMEUtil.FMEServerApiData
import re
class EvaluateSchedule(object):
def __init__(self, schedulesData):
self.logger = logging.getLogger(__name__)
if not isinstance(sc... | 43.409357 | 78 | 0.555166 | 7,255 | 0.977368 | 0 | 0 | 0 | 0 | 0 | 0 | 2,372 | 0.319547 |
829c52d86cde3835b9fe8363fe095b5e95155b81 | 3,319 | py | Python | podcastista/ListenNowTab.py | andrsd/podcastista | c05a1de09d2820899aebe592d3d4b01d64d1e5fe | [
"MIT"
] | null | null | null | podcastista/ListenNowTab.py | andrsd/podcastista | c05a1de09d2820899aebe592d3d4b01d64d1e5fe | [
"MIT"
] | 17 | 2021-09-22T12:21:46.000Z | 2022-02-26T12:26:40.000Z | podcastista/ListenNowTab.py | andrsd/podcastista | c05a1de09d2820899aebe592d3d4b01d64d1e5fe | [
"MIT"
] | null | null | null | from PyQt5 import QtWidgets, QtCore
from podcastista.ShowEpisodeWidget import ShowEpisodeWidget
from podcastista.FlowLayout import FlowLayout
class FillThread(QtCore.QThread):
""" Worker thread for loading up episodes """
def __init__(self, spotify, shows):
super().__init__()
self._spotify = ... | 31.913462 | 77 | 0.617957 | 3,171 | 0.955408 | 0 | 0 | 57 | 0.017174 | 0 | 0 | 302 | 0.090991 |
829d0c9553bb774075d15e5e3d5751bc89e20c32 | 866 | py | Python | ggpy/cruft/prolog_pyparser.py | hobson/ggpy | 4e6e6e876c3a4294cd711647051da2d9c1836b60 | [
"MIT"
] | 1 | 2015-01-26T19:07:45.000Z | 2015-01-26T19:07:45.000Z | ggpy/cruft/prolog_pyparser.py | hobson/ggpy | 4e6e6e876c3a4294cd711647051da2d9c1836b60 | [
"MIT"
] | null | null | null | ggpy/cruft/prolog_pyparser.py | hobson/ggpy | 4e6e6e876c3a4294cd711647051da2d9c1836b60 | [
"MIT"
] | null | null | null | import pyparsing as pp
#relationship will refer to 'track' in all of your examples
relationship = pp.Word(pp.alphas).setResultsName('relationship')
number = pp.Word(pp.nums + '.')
variable = pp.Word(pp.alphas)
# an argument to a relationship can be either a number or a variable
argument = number | variable
# argument... | 37.652174 | 78 | 0.743649 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 445 | 0.513857 |
829d9d6e41067c52d752f4bdf77ffcbc9b8f2f17 | 4,496 | py | Python | Imaging/Core/Testing/Python/ReslicePermutations.py | inviCRO/VTK | a2dc2e79d4ecb8f6da900535b32e1a2a702c7f48 | [
"BSD-3-Clause"
] | null | null | null | Imaging/Core/Testing/Python/ReslicePermutations.py | inviCRO/VTK | a2dc2e79d4ecb8f6da900535b32e1a2a702c7f48 | [
"BSD-3-Clause"
] | null | null | null | Imaging/Core/Testing/Python/ReslicePermutations.py | inviCRO/VTK | a2dc2e79d4ecb8f6da900535b32e1a2a702c7f48 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import vtk
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# this script tests vtkImageReslice with various axes permutations,
# in order to cover a nasty set of "if" statements that check
# the intersections of the raster lines with the input bounding box.
# Image pipel... | 35.125 | 70 | 0.803158 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 317 | 0.070507 |
829dd3506bffa917743930aa6c0983eab6866732 | 2,916 | py | Python | neuronlp2/nn/utils.py | ntunlp/ptrnet-depparser | 61cb113327ede02996b16ea4b9e19311062603c3 | [
"MIT"
] | 9 | 2019-09-03T11:03:45.000Z | 2021-09-19T05:38:25.000Z | neuronlp2/nn/utils.py | danifg/BottomUp-Hierarchical-PtrNet | 2b6ebdb63825eafd63d86700bbbc278cabfafeb2 | [
"MIT"
] | null | null | null | neuronlp2/nn/utils.py | danifg/BottomUp-Hierarchical-PtrNet | 2b6ebdb63825eafd63d86700bbbc278cabfafeb2 | [
"MIT"
] | 1 | 2019-09-24T06:19:25.000Z | 2019-09-24T06:19:25.000Z | import collections
from itertools import repeat
import torch
import torch.nn as nn
import torch.nn.utils.rnn as rnn_utils
def _ntuple(n):
def parse(x):
if isinstance(x, collections.Iterable):
return x
return tuple(repeat(x, n))
return parse
_single = _ntuple(1)
_pair = _ntuple(2)
... | 32.043956 | 136 | 0.614883 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 614 | 0.210562 |
829dd5cc20b5aa7c14726c3c740aa687c0a9650d | 194 | py | Python | Data_Analyst/Step_2_Intermediate_Python_and_Pandas/2_Data_Analysis_with_Pandas_Intermediate/3_Introduction_to_Pandas/7_Selecting_a_row/script.py | ustutz/dataquest | 6fa64fc824a060b19649ef912d11bee9ed671025 | [
"MIT"
] | 8 | 2017-01-20T13:24:26.000Z | 2019-04-05T19:02:13.000Z | Data_Analyst/Step_2_Intermediate_Python_and_Pandas/2_Data_Analysis_with_Pandas_Intermediate/3_Introduction_to_Pandas/7_Selecting_a_row/script.py | ustutz/dataquest | 6fa64fc824a060b19649ef912d11bee9ed671025 | [
"MIT"
] | null | null | null | Data_Analyst/Step_2_Intermediate_Python_and_Pandas/2_Data_Analysis_with_Pandas_Intermediate/3_Introduction_to_Pandas/7_Selecting_a_row/script.py | ustutz/dataquest | 6fa64fc824a060b19649ef912d11bee9ed671025 | [
"MIT"
] | 25 | 2016-10-27T16:27:54.000Z | 2021-07-06T14:36:40.000Z | import pandas as pandas_Pandas_Module
class Script:
@staticmethod
def main():
food_info = pandas_Pandas_Module.read_csv("../food_info.csv")
print(str(food_info.dtypes))
Script.main() | 14.923077 | 63 | 0.752577 | 137 | 0.706186 | 0 | 0 | 121 | 0.623711 | 0 | 0 | 18 | 0.092784 |
829fa892ed939a93b224c00b60d5719ddb4dc7e0 | 2,176 | py | Python | examples/fire.py | pombreda/py-lepton | 586358747efe867208edafca112a3edbb24ff8f9 | [
"MIT"
] | 7 | 2018-02-20T02:56:03.000Z | 2020-01-23T05:35:55.000Z | examples/fire.py | caseman/py-lepton | 586358747efe867208edafca112a3edbb24ff8f9 | [
"MIT"
] | 1 | 2017-11-12T10:14:13.000Z | 2017-11-12T10:14:44.000Z | examples/fire.py | caseman/py-lepton | 586358747efe867208edafca112a3edbb24ff8f9 | [
"MIT"
] | 1 | 2019-01-05T00:38:50.000Z | 2019-01-05T00:38:50.000Z | #############################################################################
#
# Copyright (c) 2008 by Casey Duncan and contributors
# All Rights Reserved.
#
# This software is subject to the provisions of the MIT License
# A copy of the license should accompany this distribution.
# THE SOFTWARE IS PROVIDED "AS IS", W... | 27.544304 | 78 | 0.665901 | 0 | 0 | 0 | 0 | 79 | 0.036305 | 0 | 0 | 616 | 0.283088 |
829fbfa6185a88b37d0e4fc7be2c4271027f431b | 3,810 | py | Python | landspout/cli.py | gmr/landspout | 1df922aa96c42dbfaa28681e748fbd97dfaf9836 | [
"BSD-3-Clause"
] | null | null | null | landspout/cli.py | gmr/landspout | 1df922aa96c42dbfaa28681e748fbd97dfaf9836 | [
"BSD-3-Clause"
] | null | null | null | landspout/cli.py | gmr/landspout | 1df922aa96c42dbfaa28681e748fbd97dfaf9836 | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
"""
Command Line Interface
======================
"""
import argparse
import logging
import os
from os import path
import sys
from landspout import core, __version__
LOGGER = logging.getLogger('landspout')
LOGGING_FORMAT = '[%(asctime)-15s] %(levelname)-8s %(name)-15s: %(message)s'
def exit_applicat... | 36.990291 | 78 | 0.599475 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,398 | 0.366929 |
82a12ebdf14809677818644038ba067ccbd91713 | 474 | py | Python | examples/test_cross.py | rballester/ttpy | a2fdf08fae9d34cb1e5ba28482e82e04b249911b | [
"MIT"
] | null | null | null | examples/test_cross.py | rballester/ttpy | a2fdf08fae9d34cb1e5ba28482e82e04b249911b | [
"MIT"
] | null | null | null | examples/test_cross.py | rballester/ttpy | a2fdf08fae9d34cb1e5ba28482e82e04b249911b | [
"MIT"
] | 1 | 2021-01-10T07:02:09.000Z | 2021-01-10T07:02:09.000Z | import sys
sys.path.append('../')
import numpy as np
import tt
d = 30
n = 2 ** d
b = 1E3
h = b / (n + 1)
#x = np.arange(n)
#x = np.reshape(x, [2] * d, order = 'F')
#x = tt.tensor(x, 1e-12)
x = tt.xfun(2, d)
e = tt.ones(2, d)
x = x + e
x = x * h
sf = lambda x : np.sin(x) / x #Should be rank 2
y = tt.multifuncrs([x]... | 18.230769 | 56 | 0.516878 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 186 | 0.392405 |
82a1dcab7cd90d7023343f02b2320478208cc588 | 26,434 | py | Python | phone2board.py | brandjamie/phone2board | b27b6d8dfa944f03688df802a360f247f648b2f6 | [
"MIT"
] | null | null | null | phone2board.py | brandjamie/phone2board | b27b6d8dfa944f03688df802a360f247f648b2f6 | [
"MIT"
] | null | null | null | phone2board.py | brandjamie/phone2board | b27b6d8dfa944f03688df802a360f247f648b2f6 | [
"MIT"
] | null | null | null | import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
import tornado.auth
import tornado.escape
import os.path
import logging
import sys
import urllib
import json
from uuid import uuid4
from tornado.options import define, options
define("port", default=8000, help="run on the given... | 36.970629 | 209 | 0.591208 | 23,916 | 0.904744 | 0 | 0 | 1,146 | 0.043353 | 0 | 0 | 5,823 | 0.220284 |
82a2aae9ea64aaa7fb4b9cb2856b242dd76d5578 | 239 | py | Python | scripts/plotRUC.py | akrherz/radcomp | d44459f72891c6e1a92b61488e08422383b000d1 | [
"Apache-2.0"
] | 3 | 2015-04-18T22:23:27.000Z | 2016-05-12T11:24:32.000Z | scripts/plotRUC.py | akrherz/radcomp | d44459f72891c6e1a92b61488e08422383b000d1 | [
"Apache-2.0"
] | 4 | 2016-09-30T15:04:46.000Z | 2022-03-05T13:32:40.000Z | scripts/plotRUC.py | akrherz/radcomp | d44459f72891c6e1a92b61488e08422383b000d1 | [
"Apache-2.0"
] | 4 | 2015-04-18T22:23:57.000Z | 2017-05-07T15:23:37.000Z | import matplotlib.pyplot as plt
import netCDF4
import numpy
nc = netCDF4.Dataset("data/ructemps.nc")
data = nc.variables["tmpc"][17, :, :]
nc.close()
(fig, ax) = plt.subplots(1, 1)
ax.imshow(numpy.flipud(data))
fig.savefig("test.png")
| 17.071429 | 40 | 0.698745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.142259 |
82a4a9f7dd1ed9b3be8582ffaccf49c75f0cf8a6 | 3,031 | py | Python | tools/draw_cal_lr_ablation.py | twangnh/Calibration_mrcnn | e5f3076cefbe35297a403a753bb57e11503db818 | [
"Apache-2.0"
] | 87 | 2020-07-24T01:28:39.000Z | 2021-08-29T08:40:18.000Z | tools/draw_cal_lr_ablation.py | twangnh/Calibration_mrcnn | e5f3076cefbe35297a403a753bb57e11503db818 | [
"Apache-2.0"
] | 3 | 2020-09-27T12:59:28.000Z | 2022-01-06T13:14:08.000Z | tools/draw_cal_lr_ablation.py | twangnh/Calibration_mrcnn | e5f3076cefbe35297a403a753bb57e11503db818 | [
"Apache-2.0"
] | 20 | 2020-09-05T04:37:19.000Z | 2021-12-13T02:25:48.000Z |
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import math
from matplotlib.ticker import FormatStrFormatter
from matplotlib import scale as mscale
from matplotlib import transforms as mtransforms
# z = [0,0.1,0.3,0.9,1,2,5]
z = [7.8, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400, 500, 6... | 35.244186 | 134 | 0.61069 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,203 | 0.726823 |
82a4b552433b963daf6809d4d3f789619df85472 | 432 | py | Python | discord bot.py | salihdursun1/dc-bot | f5223f83134d6f8938d6bcf572613e80eb4ef33c | [
"Unlicense"
] | null | null | null | discord bot.py | salihdursun1/dc-bot | f5223f83134d6f8938d6bcf572613e80eb4ef33c | [
"Unlicense"
] | null | null | null | discord bot.py | salihdursun1/dc-bot | f5223f83134d6f8938d6bcf572613e80eb4ef33c | [
"Unlicense"
] | null | null | null | import discord
from discord.ext.commands import Bot
TOKEN = "<discordtoken>"
client = discord.Client()
bot = Bot(command_prefix="!")
@bot.event
async def on_ready():
print("Bot Hazır " + str(bot.user))
@bot.event
async def on_message(message):
if message.author == client.user:
ret... | 18 | 50 | 0.638889 | 0 | 0 | 0 | 0 | 261 | 0.602771 | 237 | 0.547344 | 52 | 0.120092 |
82a4daed7ce221589ab2b1a7f5ba42efc8b6ae34 | 653 | py | Python | Lesson08/problem/problem_optional_pandas.py | AlexMazonowicz/PythonFundamentals | 5451f61d3b4e7cd285dea442795c25baa5072ef9 | [
"MIT"
] | 2 | 2020-02-27T01:33:43.000Z | 2021-03-29T13:11:54.000Z | Lesson08/problem/problem_optional_pandas.py | AlexMazonowicz/PythonFundamentals | 5451f61d3b4e7cd285dea442795c25baa5072ef9 | [
"MIT"
] | null | null | null | Lesson08/problem/problem_optional_pandas.py | AlexMazonowicz/PythonFundamentals | 5451f61d3b4e7cd285dea442795c25baa5072ef9 | [
"MIT"
] | 6 | 2019-03-18T04:49:11.000Z | 2022-03-22T04:03:19.000Z | import pandas as pd
# Global variable to set the base path to our dataset folder
base_url = '../dataset/'
def update_mailing_list_pandas(filename):
"""
Your docstring documentation starts here.
For more information on how to proper document your function, please refer to the official PEP... | 29.681818 | 104 | 0.70291 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 497 | 0.761103 |
82a57dff7d64fdf50fbba80937d52605a8fc479c | 7,357 | py | Python | example_problems/tutorial/euler_dir/services/is_eulerian_server.py | romeorizzi/TALight | 2b694cb487f41dd0d36d7aa39f5c9c5a21bfc18e | [
"MIT"
] | 4 | 2021-06-27T13:27:24.000Z | 2022-03-24T10:46:28.000Z | example_problems/tutorial/euler_dir/services/is_eulerian_server.py | romeorizzi/TALight | 2b694cb487f41dd0d36d7aa39f5c9c5a21bfc18e | [
"MIT"
] | 1 | 2021-01-23T06:50:31.000Z | 2021-03-17T15:35:18.000Z | example_problems/tutorial/euler_dir/services/is_eulerian_server.py | romeorizzi/TALight | 2b694cb487f41dd0d36d7aa39f5c9c5a21bfc18e | [
"MIT"
] | 5 | 2021-04-01T15:21:57.000Z | 2022-01-29T15:07:38.000Z | #!/usr/bin/env python3
# "This service will check your statement that a directed graph you provide us admits an eulerian walk (of the specified type)""
from os import EX_TEMPFAIL
from sys import stderr, exit
import collections
from multilanguage import Env, Lang, TALcolors
from TALinputs import TALinput
from euler... | 43.532544 | 722 | 0.578904 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,077 | 0.417844 |
82a59289b498d6c0a5800f00f50c27c1b22e3ddd | 1,047 | py | Python | get_vocab.py | Amir-Mehrpanah/hgraph2graph | 6d37153afe09f7684381ce56e8366675e22833e9 | [
"MIT"
] | 182 | 2019-11-15T15:59:31.000Z | 2022-03-31T09:17:40.000Z | get_vocab.py | Amir-Mehrpanah/hgraph2graph | 6d37153afe09f7684381ce56e8366675e22833e9 | [
"MIT"
] | 30 | 2020-03-03T16:35:52.000Z | 2021-12-16T04:06:57.000Z | get_vocab.py | Amir-Mehrpanah/hgraph2graph | 6d37153afe09f7684381ce56e8366675e22833e9 | [
"MIT"
] | 60 | 2019-11-15T05:06:11.000Z | 2022-03-31T16:43:12.000Z | import sys
import argparse
from hgraph import *
from rdkit import Chem
from multiprocessing import Pool
def process(data):
vocab = set()
for line in data:
s = line.strip("\r\n ")
hmol = MolGraph(s)
for node,attr in hmol.mol_tree.nodes(data=True):
smiles = attr['smiles']
... | 27.552632 | 81 | 0.603629 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 0.050621 |
82a5daea9d746a5e0fd1a18fd73ba8a7a242e08f | 612 | py | Python | web_app/cornwall/views.py | blackradley/heathmynd | 4495f8fadef9d3a36a7d5b49fae2b61cceb158bc | [
"MIT"
] | null | null | null | web_app/cornwall/views.py | blackradley/heathmynd | 4495f8fadef9d3a36a7d5b49fae2b61cceb158bc | [
"MIT"
] | 4 | 2018-11-06T16:15:10.000Z | 2018-11-07T12:03:09.000Z | web_app/cornwall/views.py | blackradley/heathmynd | 4495f8fadef9d3a36a7d5b49fae2b61cceb158bc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" test """
from __future__ import unicode_literals
from django.template.loader import get_template
from django.contrib import messages
# Create your views here.
from django.http import HttpResponse
def index(request):
""" index """
template = get_template('cornwall/index.html')
m... | 32.210526 | 73 | 0.730392 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 157 | 0.256536 |
82a91b76040314d727ba1163f259b5cbea984d08 | 838 | py | Python | vshare/user_/urls.py | jeyrce/vshare | 269fe05a4dc36f6fbf831ddf5057af95312b75ca | [
"Apache-2.0"
] | 4 | 2019-11-30T06:07:14.000Z | 2020-10-27T08:48:23.000Z | vshare/user_/urls.py | jeeyshe/vshare | 269fe05a4dc36f6fbf831ddf5057af95312b75ca | [
"Apache-2.0"
] | null | null | null | vshare/user_/urls.py | jeeyshe/vshare | 269fe05a4dc36f6fbf831ddf5057af95312b75ca | [
"Apache-2.0"
] | null | null | null | # coding = utf-8
# env = python3.5.2
# author = lujianxin
# time = 201x-xx-xx
# purpose= - - -
from django.urls import re_path
from . import views
urlpatterns = [
# 此模块下的路径映射
re_path(r'usercenter$', views.UserCenter.as_view()),
re_path(r'details/(\d+)$', views.UserDetails.as_view()),
re_path(r'... | 27.032258 | 61 | 0.656325 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 280 | 0.327103 |
82a930b9747975fe0452c3e4307e6fa5f2321ccf | 1,825 | py | Python | Day_3/task2.py | DjaffDjaff/AdventOfCode | cf4f60dc71e349a44f4b5d07dbf4aa8555a4a37a | [
"MIT"
] | 2 | 2021-12-03T23:14:28.000Z | 2021-12-03T23:16:54.000Z | Day_3/task2.py | DjaffDjaff/AdventOfCode | cf4f60dc71e349a44f4b5d07dbf4aa8555a4a37a | [
"MIT"
] | null | null | null | Day_3/task2.py | DjaffDjaff/AdventOfCode | cf4f60dc71e349a44f4b5d07dbf4aa8555a4a37a | [
"MIT"
] | null | null | null | import math
oxygen_rating = 0
co2_rating = 0
length = 0
n_bits = 12
common = [0] * n_bits
anti = [0] * n_bits
numbers = []
def new_bitmap(old_list):
new_list = [0] * n_bits
for num in old_list:
for j, bit in enumerate(num):
new_list[j] += bit
return new_list
wit... | 23.701299 | 83 | 0.566575 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 312 | 0.170959 |
82a9ed6ace49d5ef752eef71a6cddc94ed97513e | 7,838 | py | Python | polyjuice/filters_and_selectors/perplex_filter.py | shwang/polyjuice | 5f9a3a23d95e4a3877cc048cbcef01f071dc6353 | [
"BSD-3-Clause"
] | 38 | 2021-05-25T02:18:40.000Z | 2022-03-25T12:09:58.000Z | polyjuice/filters_and_selectors/perplex_filter.py | shwang/polyjuice | 5f9a3a23d95e4a3877cc048cbcef01f071dc6353 | [
"BSD-3-Clause"
] | 7 | 2021-06-03T04:08:55.000Z | 2021-12-06T06:53:05.000Z | polyjuice/filters_and_selectors/perplex_filter.py | shwang/polyjuice | 5f9a3a23d95e4a3877cc048cbcef01f071dc6353 | [
"BSD-3-Clause"
] | 5 | 2021-11-12T21:43:59.000Z | 2022-03-22T21:51:08.000Z | import math
import numpy as np
from munch import Munch
from transformers import GPT2LMHeadModel, GPT2TokenizerFast
import torch
from copy import deepcopy
#########################################################################
### compute perplexity
###################################################################... | 43.787709 | 122 | 0.666114 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,749 | 0.223144 |
82ab0f9e283b82fa75f97cebd66085d095f1ab43 | 2,030 | py | Python | Python/example_controllers/visual_perception/flow.py | ricklentz/tdw | da40eec151acae20b28d6486defb4358d96adb0e | [
"BSD-2-Clause"
] | null | null | null | Python/example_controllers/visual_perception/flow.py | ricklentz/tdw | da40eec151acae20b28d6486defb4358d96adb0e | [
"BSD-2-Clause"
] | null | null | null | Python/example_controllers/visual_perception/flow.py | ricklentz/tdw | da40eec151acae20b28d6486defb4358d96adb0e | [
"BSD-2-Clause"
] | null | null | null | from tdw.controller import Controller
from tdw.tdw_utils import TDWUtils
from tdw.add_ons.image_capture import ImageCapture
from tdw.backend.paths import EXAMPLE_CONTROLLER_OUTPUT_PATH
"""
Get the _flow pass.
"""
c = Controller()
object_id_0 = c.get_unique_id()
object_id_1 = c.get_unique_id()
object_id_2 = c.get_uniq... | 39.803922 | 85 | 0.565025 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 302 | 0.148768 |
82ac7d1720a0d22103d819e764e895c0a4bca209 | 2,844 | py | Python | main.py | pepetox/gae-angular-materialize | c6aee16dcc2eba75a254d783661e3115e492faa8 | [
"MIT"
] | 1 | 2015-10-18T13:48:23.000Z | 2015-10-18T13:48:23.000Z | main.py | pepetox/gae-angular-materialize | c6aee16dcc2eba75a254d783661e3115e492faa8 | [
"MIT"
] | null | null | null | main.py | pepetox/gae-angular-materialize | c6aee16dcc2eba75a254d783661e3115e492faa8 | [
"MIT"
] | null | null | null | # Copyright 2013 Google, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 26.830189 | 128 | 0.619902 | 1,640 | 0.576653 | 0 | 0 | 0 | 0 | 0 | 0 | 872 | 0.30661 |
82aec0d620a3d2b504e341e4b1d842730a0ba06a | 586 | py | Python | config.py | laundmo/counter-generator | 52b96ede55ea0d961c414102762c6430275d9fb9 | [
"MIT"
] | null | null | null | config.py | laundmo/counter-generator | 52b96ede55ea0d961c414102762c6430275d9fb9 | [
"MIT"
] | 4 | 2021-02-27T07:56:25.000Z | 2021-02-27T08:00:10.000Z | config.py | laundmo/counter-generator | 52b96ede55ea0d961c414102762c6430275d9fb9 | [
"MIT"
] | null | null | null | from sys import platform
try:
from yaml import CSafeLoader as Loader # use the C loader when possible
except ImportError:
from yaml import SafeLoader as Loader
import yaml
with open("config.yml") as f:
config = yaml.load(f, Loader=Loader) # load the config yaml
if platform in ("linux", "linux2", "win32... | 30.842105 | 83 | 0.721843 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 252 | 0.430034 |
82affa262e4e61eb46885268e69de57c9213002a | 25,609 | py | Python | pysnmp/CISCO-IETF-PW-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/CISCO-IETF-PW-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/CISCO-IETF-PW-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 CISCO-IETF-PW-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-IETF-PW-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:43:40 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Ma... | 130.658163 | 3,605 | 0.7545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,790 | 0.226092 |
82b3cb2854e832088e3570125c2b7f5602582762 | 200 | py | Python | configs/sem_fpn/onaho_fpn.py | xiong-jie-y/mmsegmentation | 91159e2e5b9ac258440d714a40e0df6083aafee4 | [
"Apache-2.0"
] | 1 | 2021-09-20T22:48:16.000Z | 2021-09-20T22:48:16.000Z | configs/sem_fpn/onaho_fpn.py | xiong-jie-y/mmsegmentation | 91159e2e5b9ac258440d714a40e0df6083aafee4 | [
"Apache-2.0"
] | null | null | null | configs/sem_fpn/onaho_fpn.py | xiong-jie-y/mmsegmentation | 91159e2e5b9ac258440d714a40e0df6083aafee4 | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../_base_/models/fpn_r50.py', '../_base_/datasets/onaho.py',
'../_base_/default_runtime.py', '../_base_/schedules/schedule_160k.py'
]
model = dict(decode_head=dict(num_classes=2))
| 33.333333 | 74 | 0.685 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 126 | 0.63 |
82b3f2c4319142d22b0411ed2f4d9af5e7d4070c | 1,955 | py | Python | config.py | dhkim2810/MaskedDatasetCondensation | f52144e9cd68e46b4ebdbcaf96829edb732b79ae | [
"Apache-2.0"
] | null | null | null | config.py | dhkim2810/MaskedDatasetCondensation | f52144e9cd68e46b4ebdbcaf96829edb732b79ae | [
"Apache-2.0"
] | null | null | null | config.py | dhkim2810/MaskedDatasetCondensation | f52144e9cd68e46b4ebdbcaf96829edb732b79ae | [
"Apache-2.0"
] | null | null | null | def get_default_convnet_setting():
net_width, net_depth, net_act, net_norm, net_pooling = 128, 3, 'relu', 'instancenorm', 'avgpooling'
return net_width, net_depth, net_act, net_norm, net_pooling
def get_loops(ipc):
# Get the two hyper-parameters of outer-loop and inner-loop.
# The following values are ... | 45.465116 | 103 | 0.653708 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 710 | 0.363171 |
82b41b0e9cd71d4a56a4ea2a15f286f90fd054f6 | 4,324 | py | Python | jgem/dataset/__init__.py | kensugino/JUGEMu | 3ebf19c96e41f1c90d63d772fd4c9c5cc3d6886f | [
"MIT"
] | null | null | null | jgem/dataset/__init__.py | kensugino/JUGEMu | 3ebf19c96e41f1c90d63d772fd4c9c5cc3d6886f | [
"MIT"
] | null | null | null | jgem/dataset/__init__.py | kensugino/JUGEMu | 3ebf19c96e41f1c90d63d772fd4c9c5cc3d6886f | [
"MIT"
] | null | null | null | """
Expression Dataset for analysis of matrix (RNASeq/microarray) data with annotations
"""
import pandas as PD
import numpy as N
from matplotlib import pylab as P
from collections import OrderedDict
from ast import literal_eval
# from ..plot.matrix import matshow_clustered
class ExpressionSet(object):
def... | 35.442623 | 124 | 0.612165 | 821 | 0.18987 | 0 | 0 | 0 | 0 | 0 | 0 | 1,048 | 0.242368 |
82b4601eafecafbb6f782f6379a8c342a3e18c6c | 8,377 | py | Python | tests/test_sql.py | YPlan/django-perf-rec | e4face96502fda64c198e6e9951da91b0857eeec | [
"MIT"
] | 148 | 2016-09-19T13:53:34.000Z | 2018-06-27T11:48:00.000Z | tests/test_sql.py | YPlan/django-perf-rec | e4face96502fda64c198e6e9951da91b0857eeec | [
"MIT"
] | 36 | 2016-09-19T14:19:05.000Z | 2018-07-12T16:33:12.000Z | tests/test_sql.py | YPlan/django-perf-rec | e4face96502fda64c198e6e9951da91b0857eeec | [
"MIT"
] | 8 | 2016-09-29T12:13:07.000Z | 2018-07-11T07:53:33.000Z | from __future__ import annotations
from django_perf_rec.sql import sql_fingerprint
def test_empty():
assert sql_fingerprint("") == ""
assert sql_fingerprint("\n\n \n") == ""
def test_select():
assert sql_fingerprint("SELECT `f1`, `f2` FROM `b`") == "SELECT ... FROM `b`"
def test_select_show_column... | 26.178125 | 88 | 0.549481 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,997 | 0.47714 |
82b549e4607fd2be9e74cf5b94bf6e0c4162ac8a | 1,198 | py | Python | src/user_auth_api/serializers.py | Adstefnum/mockexams | af5681b034334be9c5aaf807161ca80a8a1b9948 | [
"BSD-3-Clause"
] | null | null | null | src/user_auth_api/serializers.py | Adstefnum/mockexams | af5681b034334be9c5aaf807161ca80a8a1b9948 | [
"BSD-3-Clause"
] | null | null | null | src/user_auth_api/serializers.py | Adstefnum/mockexams | af5681b034334be9c5aaf807161ca80a8a1b9948 | [
"BSD-3-Clause"
] | null | null | null | from rest_framework import serializers
from user_auth_api.models import User
# User Serializer
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = [
'user_name',
'email',
'current_jamb_score',
'phone_num',
'last_name',
... | 22.603774 | 73 | 0.576795 | 1,078 | 0.899833 | 0 | 0 | 0 | 0 | 0 | 0 | 368 | 0.307179 |
82b57b3ca054137769bfb034aa43dd12bdcde046 | 9,653 | py | Python | cenv_script/cenv_script.py | technic/cenv_script | 6c3a9047faec4723f61ad5795f0d8019c0de03ec | [
"MIT"
] | null | null | null | cenv_script/cenv_script.py | technic/cenv_script | 6c3a9047faec4723f61ad5795f0d8019c0de03ec | [
"MIT"
] | null | null | null | cenv_script/cenv_script.py | technic/cenv_script | 6c3a9047faec4723f61ad5795f0d8019c0de03ec | [
"MIT"
] | null | null | null | """Main module."""
import json
import os
import re
import shutil
import subprocess
import sys
from pathlib import Path
from typing import List, Optional
import yaml
ENV_FILE = "environment.yml"
class CondaEnvException(Exception):
pass
def find_environment_file():
p = Path(os.getcwd()).resolve()
while... | 33.171821 | 115 | 0.574536 | 8,649 | 0.895991 | 0 | 0 | 640 | 0.066301 | 0 | 0 | 2,452 | 0.254014 |
82b593a5d04b8635ad9d0bfca619ad7a94f582c9 | 2,671 | py | Python | cv_utils/cv_util_node.py | OAkyildiz/cibr_img_processing | 69f3293db80e9c0ae57369eaf2885b94adb330df | [
"MIT"
] | null | null | null | cv_utils/cv_util_node.py | OAkyildiz/cibr_img_processing | 69f3293db80e9c0ae57369eaf2885b94adb330df | [
"MIT"
] | null | null | null | cv_utils/cv_util_node.py | OAkyildiz/cibr_img_processing | 69f3293db80e9c0ae57369eaf2885b94adb330df | [
"MIT"
] | null | null | null | import sys
import rospy
import types
#from std_msgs.msg import String
from sensor_msgs.msg import Image
from cibr_img_processing.msg import Ints
from cv_bridge import CvBridge, CvBridgeError
#make int msgs
#TODO: get the img size from camera_indo topics
class CVUtilNode: # abstarct this, it can easily work with other ... | 33.810127 | 98 | 0.622613 | 2,415 | 0.904156 | 0 | 0 | 0 | 0 | 0 | 0 | 649 | 0.24298 |
82b8f3579fbf367d54a1259558d837656079d6f8 | 448 | py | Python | pokepay/request/get_shop.py | pokepay/pokepay-partner-python-sdk | 7437370dc1cd0bde38959713015074315291b1e1 | [
"MIT"
] | null | null | null | pokepay/request/get_shop.py | pokepay/pokepay-partner-python-sdk | 7437370dc1cd0bde38959713015074315291b1e1 | [
"MIT"
] | null | null | null | pokepay/request/get_shop.py | pokepay/pokepay-partner-python-sdk | 7437370dc1cd0bde38959713015074315291b1e1 | [
"MIT"
] | 1 | 2022-01-28T03:00:12.000Z | 2022-01-28T03:00:12.000Z | # DO NOT EDIT: File is generated by code generator.
from pokepay_partner_python_sdk.pokepay.request.request import PokepayRequest
from pokepay_partner_python_sdk.pokepay.response.shop_with_accounts import ShopWithAccounts
class GetShop(PokepayRequest):
def __init__(self, shop_id):
self.path = "/shops" + ... | 32 | 91 | 0.725446 | 222 | 0.495536 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.149554 |
82b9e4c2e702d4c81505c6425db3c75c45108c10 | 2,191 | py | Python | clearml/backend_interface/setupuploadmixin.py | arielleoren/clearml | 01f0be9895272c483129bab784a43cbd002022a7 | [
"Apache-2.0"
] | 2,097 | 2019-06-11T14:36:25.000Z | 2020-12-21T03:52:59.000Z | clearml/backend_interface/setupuploadmixin.py | arielleoren/clearml | 01f0be9895272c483129bab784a43cbd002022a7 | [
"Apache-2.0"
] | 347 | 2020-12-23T22:38:48.000Z | 2022-03-31T20:01:06.000Z | clearml/backend_interface/setupuploadmixin.py | arielleoren/clearml | 01f0be9895272c483129bab784a43cbd002022a7 | [
"Apache-2.0"
] | 256 | 2019-06-11T14:36:28.000Z | 2020-12-18T08:32:47.000Z | from abc import abstractproperty
from ..backend_config.bucket_config import S3BucketConfig
from ..storage.helper import StorageHelper
class SetupUploadMixin(object):
log = abstractproperty()
storage_uri = abstractproperty()
def setup_upload(
self, bucket_name, host=None, access_key=None, sec... | 45.645833 | 167 | 0.665906 | 2,053 | 0.937015 | 0 | 0 | 0 | 0 | 0 | 0 | 1,381 | 0.630306 |
82ba0e0fc40394fedf62fac1ec2c951372c86121 | 2,872 | py | Python | tests/test_parser.py | szymon6927/parcels-parser | c2cee7a75edfbb0abba0fc4ea99c7a84e24e3749 | [
"MIT"
] | null | null | null | tests/test_parser.py | szymon6927/parcels-parser | c2cee7a75edfbb0abba0fc4ea99c7a84e24e3749 | [
"MIT"
] | null | null | null | tests/test_parser.py | szymon6927/parcels-parser | c2cee7a75edfbb0abba0fc4ea99c7a84e24e3749 | [
"MIT"
] | null | null | null | import os
import unittest
import pandas as pd
from application.ParcelsParser import ParcelsParser
class TestPracelsParser(unittest.TestCase):
def setUp(self):
self.parser = ParcelsParser("./test_cadastral_parcels.tsv", "cadastral_parcel_identifier")
def test_if_file_exist(self):
file_path = ... | 37.789474 | 99 | 0.683496 | 2,722 | 0.947772 | 0 | 0 | 0 | 0 | 0 | 0 | 308 | 0.107242 |
82badbb757028140899a1d3ea355a9a115e4d31b | 726 | py | Python | dataStructures/complete.py | KarlParkinson/practice | 6bbbd4a8e320732523d83297c1021f52601a20d8 | [
"MIT"
] | null | null | null | dataStructures/complete.py | KarlParkinson/practice | 6bbbd4a8e320732523d83297c1021f52601a20d8 | [
"MIT"
] | null | null | null | dataStructures/complete.py | KarlParkinson/practice | 6bbbd4a8e320732523d83297c1021f52601a20d8 | [
"MIT"
] | null | null | null | import binTree
import queue
def complete(tree):
q = queue.Queue()
nonFull = False
q.enqueue(tree)
while (not q.isEmpty()):
t = q.dequeue()
if (t.getLeftChild()):
if (nonFull):
return False
q.enqueue(t.getLeftChild())
if (t.getLeftChild() ... | 21.352941 | 40 | 0.541322 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
82bbb29af0b1433647177912df15449203606a08 | 3,322 | py | Python | sd_maskrcnn/sd_maskrcnn/gop/src/eval_bnd.py | marctuscher/cv_pipeline | b641423e72ea292139a5e35a411e30c1e21c7070 | [
"MIT"
] | 1 | 2021-03-28T17:46:45.000Z | 2021-03-28T17:46:45.000Z | sd-maskrcnn/sd_maskrcnn/gop/src/eval_bnd.py | jayef0/cv_pipeline | dc3b79062174f583a3a90ac8deea918c498c0dd5 | [
"MIT"
] | null | null | null | sd-maskrcnn/sd_maskrcnn/gop/src/eval_bnd.py | jayef0/cv_pipeline | dc3b79062174f583a3a90ac8deea918c498c0dd5 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8
"""
Copyright (c) 2014, Philipp Krähenbühl
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
... | 53.580645 | 219 | 0.654425 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,948 | 0.585337 |
82bc8b7d1c31f1a7b50154e6eb1646fd9530ca29 | 1,473 | py | Python | ctr_prediction/datasets/Amazon/AmazonElectronics_x1/convert_amazonelectronics_x1.py | jimzhu/OpenCTR-benchmarks | e8e723cd7a0ef5ddd40e735b85ce7669955a3a99 | [
"Apache-2.0"
] | 59 | 2021-10-31T13:59:37.000Z | 2022-03-31T12:05:55.000Z | ctr_prediction/datasets/Amazon/AmazonElectronics_x1/convert_amazonelectronics_x1.py | jimzhu/OpenCTR-benchmarks | e8e723cd7a0ef5ddd40e735b85ce7669955a3a99 | [
"Apache-2.0"
] | 5 | 2021-12-06T12:11:21.000Z | 2022-03-18T06:21:13.000Z | ctr_prediction/datasets/Amazon/AmazonElectronics_x1/convert_amazonelectronics_x1.py | jimzhu/OpenCTR-benchmarks | e8e723cd7a0ef5ddd40e735b85ce7669955a3a99 | [
"Apache-2.0"
] | 17 | 2021-10-21T10:44:09.000Z | 2022-03-24T11:35:09.000Z | import pickle
import pandas as pd
# cat aa ab ac > dataset.pkl from https://github.com/zhougr1993/DeepInterestNetwork
with open('dataset.pkl', 'rb') as f:
train_set = pickle.load(f, encoding='bytes')
test_set = pickle.load(f, encoding='bytes')
cate_list = pickle.load(f, encoding='bytes')
user_count, i... | 42.085714 | 119 | 0.692464 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 285 | 0.193483 |
82bea645f31e2de3666e262ad0a20085ef770deb | 656 | py | Python | email_extras/admin.py | maqmigh/django-email-extras | c991b59fa53f9a5324ea7d9f3cc65bc1a9aa8e42 | [
"BSD-2-Clause"
] | 33 | 2015-03-17T12:08:05.000Z | 2021-12-17T23:06:26.000Z | email_extras/admin.py | maqmigh/django-email-extras | c991b59fa53f9a5324ea7d9f3cc65bc1a9aa8e42 | [
"BSD-2-Clause"
] | 26 | 2015-10-09T01:01:00.000Z | 2021-02-09T11:11:52.000Z | email_extras/admin.py | maqmigh/django-email-extras | c991b59fa53f9a5324ea7d9f3cc65bc1a9aa8e42 | [
"BSD-2-Clause"
] | 29 | 2015-02-25T07:51:12.000Z | 2022-02-27T07:05:40.000Z |
from email_extras.settings import USE_GNUPG
if USE_GNUPG:
from django.contrib import admin
from email_extras.models import Key, Address
from email_extras.forms import KeyForm
class KeyAdmin(admin.ModelAdmin):
form = KeyForm
list_display = ('__str__', 'email_addresses')
... | 26.24 | 54 | 0.652439 | 350 | 0.533537 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 0.088415 |
82c010e02b691e4b2aad5f24f459cf89f58d643c | 6,265 | py | Python | Tableau-Supported/Python/insert_data_with_expressions.py | TableauKyle/hyper-api-samples | 37c21c988122c6dbfb662d9ec72d90c4cd30e4cc | [
"MIT"
] | 73 | 2020-04-29T15:41:55.000Z | 2022-03-12T04:55:24.000Z | Tableau-Supported/Python/insert_data_with_expressions.py | TableauKyle/hyper-api-samples | 37c21c988122c6dbfb662d9ec72d90c4cd30e4cc | [
"MIT"
] | 32 | 2020-06-10T00:47:20.000Z | 2022-03-28T11:19:00.000Z | Tableau-Supported/Python/insert_data_with_expressions.py | TableauKyle/hyper-api-samples | 37c21c988122c6dbfb662d9ec72d90c4cd30e4cc | [
"MIT"
] | 54 | 2020-05-01T20:01:51.000Z | 2022-03-28T11:11:00.000Z | # -----------------------------------------------------------------------------
#
# This file is the copyrighted property of Tableau Software and is protected
# by registered patents and other applicable U.S. and international laws and
# regulations.
#
# You may adapt this file and modify it to fit into your context an... | 53.547009 | 160 | 0.653312 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,473 | 0.55435 |
82c029ca3481da78e9c1db45150fc5d81b30aeac | 2,234 | py | Python | dumplogs/bin.py | xinhuagu/dumplogs | 5580ff5fe4b054ab9a007e1a023b01fa71917f80 | [
"BSD-3-Clause"
] | 1 | 2021-05-02T11:51:45.000Z | 2021-05-02T11:51:45.000Z | dumplogs/bin.py | xinhuagu/dumplogs | 5580ff5fe4b054ab9a007e1a023b01fa71917f80 | [
"BSD-3-Clause"
] | null | null | null | dumplogs/bin.py | xinhuagu/dumplogs | 5580ff5fe4b054ab9a007e1a023b01fa71917f80 | [
"BSD-3-Clause"
] | null | null | null | import boto3
import argparse
import os,sys
def main(argv=None):
argv = (argv or sys.argv)[1:]
parser = argparse.ArgumentParser(description='dump all aws log streams into files')
parser.add_argument("--profile",
dest="aws_profile",
type=str,
... | 29.394737 | 87 | 0.581021 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 347 | 0.155327 |
82c2685c2ffd7e5c7861dd6a5e7721b4f4a54e32 | 5,239 | py | Python | ch5/gaussian_mixture.py | susantamoh84/HandsOn-Unsupervised-Learning-with-Python | 056953d0462923a674faf0a23b27239bc9f69975 | [
"MIT"
] | 25 | 2018-09-03T11:12:49.000Z | 2022-03-13T01:42:57.000Z | Chapter05/gaussian_mixture.py | AIRob/HandsOn-Unsupervised-Learning-with-Python | 1dbe9b3fdf5255f610e0c9c52a82935baa6a4a3e | [
"MIT"
] | null | null | null | Chapter05/gaussian_mixture.py | AIRob/HandsOn-Unsupervised-Learning-with-Python | 1dbe9b3fdf5255f610e0c9c52a82935baa6a4a3e | [
"MIT"
] | 35 | 2018-09-15T11:06:12.000Z | 2021-12-08T04:28:55.000Z | import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import make_blobs
from sklearn.mixture import GaussianMixture
from sklearn.cluster import KMeans
from matplotlib.patches import Ellipse
# For reproducibility
np.random.seed(1000)
nb_samples = 300
nb_centers = 2
if __na... | 32.339506 | 119 | 0.604314 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 883 | 0.168544 |
82c29ca8b328d9cb75ca5d391549720bbf654d8a | 5,771 | py | Python | shipyard2/shipyard2/rules/images/merge_image.py | clchiou/garage | 446ff34f86cdbd114b09b643da44988cf5d027a3 | [
"MIT"
] | 3 | 2016-01-04T06:28:52.000Z | 2020-09-20T13:18:40.000Z | shipyard2/shipyard2/rules/images/merge_image.py | clchiou/garage | 446ff34f86cdbd114b09b643da44988cf5d027a3 | [
"MIT"
] | null | null | null | shipyard2/shipyard2/rules/images/merge_image.py | clchiou/garage | 446ff34f86cdbd114b09b643da44988cf5d027a3 | [
"MIT"
] | null | null | null | __all__ = [
'DEFAULT_FILTERS',
'DEFAULT_XAR_FILTERS',
'merge_image',
]
import contextlib
import logging
import tempfile
from pathlib import Path
from g1 import scripts
from g1.containers import models
from g1.containers import scripts as ctr_scripts
from . import utils
LOG = logging.getLogger(__name__)
... | 34.35119 | 78 | 0.612199 | 0 | 0 | 0 | 0 | 1,445 | 0.25039 | 0 | 0 | 3,431 | 0.594524 |
82c30affdd6735cd19f09c9fa98712ebb317fd91 | 289 | py | Python | python3/best_time_stock1.py | joshiaj7/CodingChallenges | f95dd79132f07c296e074d675819031912f6a943 | [
"MIT"
] | 1 | 2020-10-08T09:17:40.000Z | 2020-10-08T09:17:40.000Z | python3/best_time_stock1.py | joshiaj7/CodingChallenges | f95dd79132f07c296e074d675819031912f6a943 | [
"MIT"
] | null | null | null | python3/best_time_stock1.py | joshiaj7/CodingChallenges | f95dd79132f07c296e074d675819031912f6a943 | [
"MIT"
] | null | null | null | """
Space : O(1)
Time : O(n)
"""
class Solution:
def maxProfit(self, prices: List[int]) -> int:
start, dp = 10**10, 0
for i in prices:
print(start)
start = min(start, i)
dp = max(dp, i-start)
return dp
| 19.266667 | 50 | 0.439446 | 242 | 0.83737 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.128028 |
82c33d6f16c0ad3e4c5059353c658ad5302c575d | 175 | py | Python | environments/assets/gym_collectball/__init__.py | GPaolo/SERENE | 83bc38a37ad8f1be9695d2483fd463428d4dae23 | [
"MIT"
] | 3 | 2021-04-19T21:55:00.000Z | 2021-12-20T15:26:12.000Z | environments/assets/gym_collectball/__init__.py | GPaolo/SERENE | 83bc38a37ad8f1be9695d2483fd463428d4dae23 | [
"MIT"
] | null | null | null | environments/assets/gym_collectball/__init__.py | GPaolo/SERENE | 83bc38a37ad8f1be9695d2483fd463428d4dae23 | [
"MIT"
] | null | null | null | # Created by Giuseppe Paolo
# Date: 27/08/2020
from gym.envs.registration import register
register(
id='CollectBall-v0',
entry_point='gym_collectball.envs:CollectBall'
) | 21.875 | 48 | 0.771429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.548571 |
82c36eb8e029351535cbcf82344721060c30bebf | 3,534 | py | Python | foreverbull/foreverbull.py | quantfamily/foreverbull-python | 4f8144b6d964e9c0d1209f0421dc960b82a15400 | [
"Apache-2.0"
] | null | null | null | foreverbull/foreverbull.py | quantfamily/foreverbull-python | 4f8144b6d964e9c0d1209f0421dc960b82a15400 | [
"Apache-2.0"
] | 9 | 2021-11-24T10:45:27.000Z | 2022-02-26T19:12:47.000Z | foreverbull/foreverbull.py | quantfamily/foreverbull-python | 4f8144b6d964e9c0d1209f0421dc960b82a15400 | [
"Apache-2.0"
] | null | null | null | import logging
import threading
from concurrent.futures import ThreadPoolExecutor
from multiprocessing import Queue
from foreverbull.worker.worker import WorkerHandler
from foreverbull_core.models.finance import EndOfDay
from foreverbull_core.models.socket import Request
from foreverbull_core.models.worker import Inst... | 36.061224 | 91 | 0.649689 | 3,003 | 0.849745 | 0 | 0 | 161 | 0.045557 | 0 | 0 | 338 | 0.095642 |
82c418de34320061d50470074e4e4e6e0fe9752b | 704 | py | Python | scopus/tests/test_AffiliationSearch.py | crew102/scopus | d8791c162cef4c2f830d983b435333d9d8eaf472 | [
"MIT"
] | null | null | null | scopus/tests/test_AffiliationSearch.py | crew102/scopus | d8791c162cef4c2f830d983b435333d9d8eaf472 | [
"MIT"
] | null | null | null | scopus/tests/test_AffiliationSearch.py | crew102/scopus | d8791c162cef4c2f830d983b435333d9d8eaf472 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `AffiliationSearch` module."""
from collections import namedtuple
from nose.tools import assert_equal, assert_true
import scopus
s = scopus.AffiliationSearch('af-id(60021784)', refresh=True)
def test_affiliations():
received = s.affiliations
asser... | 29.333333 | 79 | 0.691761 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 242 | 0.34375 |
82c5022208b58d4f46a1d7ce39f5bdeb44953f3f | 566 | py | Python | MechOS/simple_messages/int.py | PierceATronics/MechOS | 8eeb68b65b8c20b642db52baad1379fd0847b362 | [
"MIT"
] | null | null | null | MechOS/simple_messages/int.py | PierceATronics/MechOS | 8eeb68b65b8c20b642db52baad1379fd0847b362 | [
"MIT"
] | null | null | null | MechOS/simple_messages/int.py | PierceATronics/MechOS | 8eeb68b65b8c20b642db52baad1379fd0847b362 | [
"MIT"
] | null | null | null | '''
'''
import struct
class Int:
'''
'''
def __init__(self):
'''
'''
#construct the message format
self.message_constructor = 'i'
#number of bytes for this message
self.size = 4
def _pack(self, message):
'''
'''
encoded_message = ... | 20.962963 | 77 | 0.556537 | 542 | 0.957597 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.226148 |
82c56d7c16636bc69a537283da6c0edaf26dd821 | 377 | py | Python | Curso Python/PythonExercicios/ex017.py | marcos-saba/Cursos | 1c063392867e9ed86d141dad8861a2a35488b1c6 | [
"MIT"
] | null | null | null | Curso Python/PythonExercicios/ex017.py | marcos-saba/Cursos | 1c063392867e9ed86d141dad8861a2a35488b1c6 | [
"MIT"
] | null | null | null | Curso Python/PythonExercicios/ex017.py | marcos-saba/Cursos | 1c063392867e9ed86d141dad8861a2a35488b1c6 | [
"MIT"
] | null | null | null | #from math import hypot
import math
print('='*5, 'Cálculo triângulo retângulo', '='*5)
cat_op = float(input('Digite o comprimento do cateto oposto: '))
cat_adj = float(input('Digite o comprimento do cateto adjacente: '))
hip = math.hypot(cat_op, cat_adj)
print(f'O comprimento da hipotenusa do triângulo retângulo, cujos... | 47.125 | 121 | 0.729443 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 264 | 0.6875 |
82c5f5ed054e4540c225e7fd44668ed1c842c358 | 312 | py | Python | exercicios/ex074.py | CinatitBR/exercicios-phyton | 16d9c14a83c9dbd6f7bda5477d665848bcd91184 | [
"MIT"
] | null | null | null | exercicios/ex074.py | CinatitBR/exercicios-phyton | 16d9c14a83c9dbd6f7bda5477d665848bcd91184 | [
"MIT"
] | null | null | null | exercicios/ex074.py | CinatitBR/exercicios-phyton | 16d9c14a83c9dbd6f7bda5477d665848bcd91184 | [
"MIT"
] | null | null | null | from random import randint
numeros = (randint(0, 10), randint(0, 10), randint(0, 10), randint(0, 10), randint(0, 10))
print(f'Os cinco números são: ', end='')
for n in numeros: # Exibe números sorteados
print(n, end=' ')
print(f'\nO MAIOR número é {max(numeros)}')
print(f'O MENOR número é {min(numeros)}')
| 39 | 90 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 0.413793 |
82c61ef5a2ffb92917f588c48559df6bc3be2564 | 10,832 | py | Python | libs3/maxwellccs.py | tmpbci/LJ | 4c40e2ddf862f94dcfeb3cc48c41aad44a3a8d34 | [
"CNRI-Python"
] | 7 | 2019-03-20T00:09:14.000Z | 2022-03-06T23:18:20.000Z | libs3/maxwellccs.py | tmpbci/LJ | 4c40e2ddf862f94dcfeb3cc48c41aad44a3a8d34 | [
"CNRI-Python"
] | null | null | null | libs3/maxwellccs.py | tmpbci/LJ | 4c40e2ddf862f94dcfeb3cc48c41aad44a3a8d34 | [
"CNRI-Python"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Maxwell Macros
v0.7.0
by Sam Neurohack
from /team/laser
Launchpad set a "current path"
"""
from OSC3 import OSCServer, OSCClient, OSCMessage
import time
import numpy as np
import rtmidi
from rtmidi.midiutil import open_midiinput
from threading import Thread
from r... | 26.745679 | 110 | 0.625185 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,326 | 0.307053 |
82c72df17c47f59db7183dbcc92de68aef849d6a | 11,660 | py | Python | functions_alignComp.py | lauvegar/VLBI_spectral_properties_Bfield | 6d07b6b0549ba266d2c56adcf664219a500e75e8 | [
"MIT"
] | 1 | 2020-03-14T14:55:17.000Z | 2020-03-14T14:55:17.000Z | functions_alignComp.py | lauvegar/VLBI_spectral_properties_Bfield | 6d07b6b0549ba266d2c56adcf664219a500e75e8 | [
"MIT"
] | null | null | null | functions_alignComp.py | lauvegar/VLBI_spectral_properties_Bfield | 6d07b6b0549ba266d2c56adcf664219a500e75e8 | [
"MIT"
] | 1 | 2021-01-29T14:08:16.000Z | 2021-01-29T14:08:16.000Z | import numpy as np
import matplotlib.pyplot as plt
from pylab import *
#import pyspeckit as ps
from scipy import io
from scipy import stats
from scipy.optimize import leastsq
#from lmfit import minimize, Parameters, Parameter, report_fit
#from lmfit.models import GaussianModel
import scipy.optimize as optimization
impo... | 29.004975 | 140 | 0.613036 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,029 | 0.174014 |
82c74e30b862d202367459727b08bf47fdb074f4 | 1,762 | py | Python | osbuild/dist.py | dnarvaez/osbuild | 08031487481ba23597f19cb3e106628e5c9d440d | [
"Apache-2.0"
] | null | null | null | osbuild/dist.py | dnarvaez/osbuild | 08031487481ba23597f19cb3e106628e5c9d440d | [
"Apache-2.0"
] | 1 | 2016-11-13T01:04:18.000Z | 2016-11-13T01:04:18.000Z | osbuild/dist.py | dnarvaez/osbuild | 08031487481ba23597f19cb3e106628e5c9d440d | [
"Apache-2.0"
] | 2 | 2015-01-06T20:57:55.000Z | 2015-11-15T20:14:09.000Z | # Copyright 2013 Daniel Narvaez
#
# 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 writi... | 25.536232 | 74 | 0.715096 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 654 | 0.371169 |
82c7e82524f111efe667928715ea87dcc4155b43 | 1,194 | py | Python | neural_net/game_status.py | Ipgnosis/tic_tac_toe | e1519b702531965cc647ff37c1c46d72f4b3b24e | [
"BSD-3-Clause"
] | null | null | null | neural_net/game_status.py | Ipgnosis/tic_tac_toe | e1519b702531965cc647ff37c1c46d72f4b3b24e | [
"BSD-3-Clause"
] | 4 | 2021-03-25T19:52:40.000Z | 2021-12-12T17:57:11.000Z | neural_net/game_status.py | Ipgnosis/tic_tac_toe | e1519b702531965cc647ff37c1c46d72f4b3b24e | [
"BSD-3-Clause"
] | null | null | null | # node to capture and communicate game status
# written by Russell on 5/18
class Game_state():
node_weight = 1
# node_bias = 1 # not going to use this for now, but may need it later
list_of_moves = []
def __init__(self, node_list):
self.node_list = node_list
def num_moves(self):
... | 24.367347 | 101 | 0.569514 | 1,115 | 0.933836 | 0 | 0 | 0 | 0 | 0 | 0 | 257 | 0.215243 |
82c885deedbc0d14255bfcc8dfea36b0a64e58d5 | 13,340 | py | Python | alphatrading/system/db_methods/method_sqlite3.py | LoannData/Q26_AlphaTrading | b8e6983e59f942352150f76541d880143cca4478 | [
"MIT"
] | null | null | null | alphatrading/system/db_methods/method_sqlite3.py | LoannData/Q26_AlphaTrading | b8e6983e59f942352150f76541d880143cca4478 | [
"MIT"
] | null | null | null | alphatrading/system/db_methods/method_sqlite3.py | LoannData/Q26_AlphaTrading | b8e6983e59f942352150f76541d880143cca4478 | [
"MIT"
] | null | null | null | """
"""
import sqlite3
import numpy as np
import math
class SQL:
def __init__(self):
self.path = None
self.connexion = None
self.cursor = None
self.verbose = False
def to_SQL_type(self, type_, mode = "format"):
"""
Function allowing to... | 32.378641 | 139 | 0.422414 | 13,273 | 0.994754 | 0 | 0 | 0 | 0 | 0 | 0 | 5,400 | 0.404707 |
82c9034910103390615809d1175c2317626103b0 | 4,705 | py | Python | pysport/horseracing/lattice_calibration.py | notbanker/pysport | fbeb1f1efa493aa26ffb58156b86ce2aee3482bf | [
"MIT"
] | null | null | null | pysport/horseracing/lattice_calibration.py | notbanker/pysport | fbeb1f1efa493aa26ffb58156b86ce2aee3482bf | [
"MIT"
] | null | null | null | pysport/horseracing/lattice_calibration.py | notbanker/pysport | fbeb1f1efa493aa26ffb58156b86ce2aee3482bf | [
"MIT"
] | null | null | null | from .lattice import skew_normal_density, center_density,\
state_prices_from_offsets, densities_and_coefs_from_offsets, winner_of_many,\
expected_payoff, densities_from_offsets, implicit_state_prices, densitiesPlot
import pandas as pd # todo: get rid of this dependency
import numpy as np
def dividend_implied_... | 42.772727 | 160 | 0.671413 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 788 | 0.167481 |
82ca9321fb77ad0b8c97cc3c98eb832716ddecc4 | 4,832 | py | Python | var/spack/repos/builtin/packages/autoconf/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/autoconf/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/autoconf/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import re
class Autoconf(AutotoolsPackage, GNUMirrorPackage):
"""Autoconf -- system configuration part of autotools"... | 45.158879 | 112 | 0.657078 | 4,621 | 0.956333 | 0 | 0 | 707 | 0.146316 | 0 | 0 | 2,942 | 0.608858 |
82cb0803d2457f595d667a7981bfa23935775448 | 1,096 | py | Python | src/wallet/web/schemas/categories.py | clayman-micro/wallet | b78f650aed7d57167db81a0530fd78dbc12d527e | [
"MIT"
] | 2 | 2015-10-18T15:36:37.000Z | 2015-10-19T04:57:00.000Z | src/wallet/web/schemas/categories.py | clayman74/wallet | b78f650aed7d57167db81a0530fd78dbc12d527e | [
"MIT"
] | 7 | 2021-06-26T16:51:13.000Z | 2021-11-29T19:05:00.000Z | src/wallet/web/schemas/categories.py | clayman-micro/wallet | b78f650aed7d57167db81a0530fd78dbc12d527e | [
"MIT"
] | null | null | null | from aiohttp_micro.web.handlers.openapi import PayloadSchema, ResponseSchema
from marshmallow import fields, post_load, Schema
from wallet.core.entities.categories import CategoryFilters
from wallet.web.schemas.abc import CollectionFiltersSchema
class CategorySchema(Schema):
key = fields.Int(required=True, data_... | 29.621622 | 100 | 0.762774 | 834 | 0.760949 | 0 | 0 | 112 | 0.10219 | 0 | 0 | 163 | 0.148723 |
82cb1f7a824b2011c270ad30649e677322c356f9 | 127 | py | Python | scons_gbd_docs/Gbd/Docs/SConscript.py | ASoftTech/Scons.Gbd.Docs | 4d9fb7585d9565f57306774efb4342fe9b8822f2 | [
"MIT"
] | null | null | null | scons_gbd_docs/Gbd/Docs/SConscript.py | ASoftTech/Scons.Gbd.Docs | 4d9fb7585d9565f57306774efb4342fe9b8822f2 | [
"MIT"
] | null | null | null | scons_gbd_docs/Gbd/Docs/SConscript.py | ASoftTech/Scons.Gbd.Docs | 4d9fb7585d9565f57306774efb4342fe9b8822f2 | [
"MIT"
] | null | null | null | SConscript('Mkdocs/Common/SConscript.py')
SConscript('Pandoc/Common/SConscript.py')
SConscript('Doxygen/Common/SConscript.py')
| 31.75 | 42 | 0.811024 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.692913 |
82cb4d12dfd598eacff3048f5dbbafb527f62c06 | 11,563 | py | Python | seg/segmentor/tools/module_runner.py | Frank-Abagnal/HRFormer | d7d362770de8648f8e0a379a71cee25f42954503 | [
"MIT"
] | 254 | 2021-08-13T10:05:22.000Z | 2022-03-25T09:21:45.000Z | seg/segmentor/tools/module_runner.py | Sense-X/HRFormer | 1245b88b5824fbd8cdb358b5ee909a4e537a2ef5 | [
"MIT"
] | 17 | 2021-09-08T01:40:49.000Z | 2022-03-23T10:53:47.000Z | seg/segmentor/tools/module_runner.py | Sense-X/HRFormer | 1245b88b5824fbd8cdb358b5ee909a4e537a2ef5 | [
"MIT"
] | 48 | 2021-08-13T14:06:58.000Z | 2022-03-30T02:41:26.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: Donny You(youansheng@gmail.com)
# Some methods used by main methods.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import os
from collections import OrderedDict
import torch
import torch... | 41.894928 | 115 | 0.585488 | 10,985 | 0.950013 | 0 | 0 | 2,153 | 0.186197 | 0 | 0 | 2,952 | 0.255297 |
82cc626afaea4df2938aee10cb59917cc59cdc28 | 1,861 | py | Python | scripts/si_figs.py | gbirzu/density-dependent_dispersal_growth | edd1207f57b63e2827af385d4e868306ff308746 | [
"MIT"
] | null | null | null | scripts/si_figs.py | gbirzu/density-dependent_dispersal_growth | edd1207f57b63e2827af385d4e868306ff308746 | [
"MIT"
] | null | null | null | scripts/si_figs.py | gbirzu/density-dependent_dispersal_growth | edd1207f57b63e2827af385d4e868306ff308746 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import pickle
import scipy.stats as stats
data_path = '../data/het_average.dat'
output_dir = '../figures/'
# Configure matplotlib environment
helvetica_scale_factor = 0.92 # rescale Helvetica to other fonts of same size
mpl.rcParams['font.siz... | 33.836364 | 119 | 0.703923 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 443 | 0.238044 |
82cd32f83dde9f87b3ac04ec47ec6fefab6101d7 | 7,532 | py | Python | language.py | sanine-a/dream-atlas | cd44c43ec6cf5e7a95ae231ba7174a6891d93474 | [
"MIT"
] | null | null | null | language.py | sanine-a/dream-atlas | cd44c43ec6cf5e7a95ae231ba7174a6891d93474 | [
"MIT"
] | null | null | null | language.py | sanine-a/dream-atlas | cd44c43ec6cf5e7a95ae231ba7174a6891d93474 | [
"MIT"
] | null | null | null | from random import random, choice, seed, shuffle, randint
from math import ceil
import copy
target = [ 2, 2, 3, 1, 4, 5 ]
consonants_base = [ 'p', 't', 'k', 'm', 'n' ]
vowels = [ [ 'a', 'i', 'u' ],
[ 'a', 'i', 'u', 'e', 'o' ],
[ 'a', 'A', 'i', 'I', 'u', 'U', 'e', 'E', 'o', 'O' ] ]
consonants_ex... | 34.392694 | 175 | 0.454461 | 5,084 | 0.672843 | 0 | 0 | 0 | 0 | 0 | 0 | 1,362 | 0.180254 |
82cfea168601da39ca8ee801205fdee39d24a8a0 | 446 | py | Python | week/templatetags/sidebar_data.py | uno-isqa-8950/fitgirl-inc | 2656e7340e85ab8cbeb0de19dcbc81030b9b5b81 | [
"MIT"
] | 6 | 2018-09-11T15:30:10.000Z | 2020-01-14T17:29:07.000Z | week/templatetags/sidebar_data.py | uno-isqa-8950/fitgirl-inc | 2656e7340e85ab8cbeb0de19dcbc81030b9b5b81 | [
"MIT"
] | 722 | 2018-08-29T17:27:38.000Z | 2022-03-11T23:28:33.000Z | week/templatetags/sidebar_data.py | uno-isqa-8950/fitgirl-inc | 2656e7340e85ab8cbeb0de19dcbc81030b9b5b81 | [
"MIT"
] | 13 | 2018-08-29T07:42:01.000Z | 2019-04-21T22:34:30.000Z | from django import template
from week.models import SidebarContentPage,SidebarImagePage
register = template.Library()
@register.inclusion_tag('week/announcement.html')
def sidebar():
sidebar_data = SidebarContentPage.objects.get()
return {'sidebar_data':sidebar_data}
@register.inclusion_tag('week/advertise... | 26.235294 | 59 | 0.784753 | 0 | 0 | 0 | 0 | 323 | 0.724215 | 0 | 0 | 78 | 0.174888 |
82d236c6e0b9c063b565077e0441849e2549c37e | 1,097 | py | Python | tests/functional/Hydro/AcousticWave/CSPH_mod_package.py | jmikeowen/Spheral | 3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 22 | 2018-07-31T21:38:22.000Z | 2020-06-29T08:58:33.000Z | tests/Hydro/AcousticWave/CSPH_mod_package.py | markguozhiming/spheral | bbb982102e61edb8a1d00cf780bfa571835e1b61 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 41 | 2020-09-28T23:14:27.000Z | 2022-03-28T17:01:33.000Z | tests/Hydro/AcousticWave/CSPH_mod_package.py | markguozhiming/spheral | bbb982102e61edb8a1d00cf780bfa571835e1b61 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 7 | 2019-12-01T07:00:06.000Z | 2020-09-15T21:12:39.000Z | #-------------------------------------------------------------------------------
# A mock physics package to mess around with the CRKSPH corrections.
#-------------------------------------------------------------------------------
from Spheral1d import *
class CRKSPH_mod_package(Physics):
def __init__(self):
... | 26.756098 | 80 | 0.539654 | 839 | 0.764813 | 0 | 0 | 0 | 0 | 0 | 0 | 285 | 0.259799 |
82d391d63340bb25ffc76c9865651669de389703 | 8,452 | py | Python | fbm-scraper.py | cbdelavenne/fb-messenger-media-scraper | ff4ed228f3520f208e048e34ae24d7576b0089bc | [
"MIT"
] | 8 | 2019-11-23T17:45:11.000Z | 2021-05-27T10:41:47.000Z | fbm-scraper.py | cbdelavenne/fb-messenger-media-scraper | ff4ed228f3520f208e048e34ae24d7576b0089bc | [
"MIT"
] | 10 | 2019-11-23T17:41:22.000Z | 2022-01-03T11:10:50.000Z | fbm-scraper.py | cbdelavenne/fb-messenger-media-scraper | ff4ed228f3520f208e048e34ae24d7576b0089bc | [
"MIT"
] | 4 | 2020-03-21T23:24:40.000Z | 2022-02-20T10:40:38.000Z | import os
import requests
import time
import uuid
import configparser
import datetime
import fbchat
import re
from fbchat import Client, ImageAttachment
from fbchat import FBchatException
from pathlib import Path
politeness_index = 0.5 # ;)
epoch = datetime.datetime(1970, 1, 1)
# Hack to get the login to work, see:... | 41.229268 | 139 | 0.614411 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,710 | 0.320634 |
82d3afd1c39a5492eb62a1c160ebc7e3bbf21e20 | 1,565 | py | Python | guru/users/models.py | Jeromeschmidt/Guru | 3128a539e55b46afceb33b59c0bafaec7e9f630a | [
"MIT"
] | null | null | null | guru/users/models.py | Jeromeschmidt/Guru | 3128a539e55b46afceb33b59c0bafaec7e9f630a | [
"MIT"
] | 1 | 2021-02-26T02:49:34.000Z | 2021-02-26T02:49:34.000Z | guru/users/models.py | Jeromeschmidt/Guru | 3128a539e55b46afceb33b59c0bafaec7e9f630a | [
"MIT"
] | 1 | 2020-02-24T18:09:00.000Z | 2020-02-24T18:09:00.000Z | from django.contrib.auth.models import AbstractUser
from django.db.models import (BooleanField, CASCADE, CharField, FloatField,
IntegerField, ManyToManyField, Model,
OneToOneField, PositiveSmallIntegerField)
from django.contrib.postgres.fields import ArrayFiel... | 44.714286 | 75 | 0.676677 | 1,108 | 0.707987 | 0 | 0 | 0 | 0 | 0 | 0 | 348 | 0.222364 |
82d3d58b46fde9d57d6d1387e15cc36141a10208 | 7,676 | py | Python | movie.py | jmclinn/mapdraw | bdbddb164a82a3cf9b2673006caae4274948a420 | [
"MIT"
] | null | null | null | movie.py | jmclinn/mapdraw | bdbddb164a82a3cf9b2673006caae4274948a420 | [
"MIT"
] | null | null | null | movie.py | jmclinn/mapdraw | bdbddb164a82a3cf9b2673006caae4274948a420 | [
"MIT"
] | null | null | null | import os,time
## File Variable (USER INPUT)
## ==========================
## if multiple files are being accessed to create movie...
## ...specify the beginning and ending of the file names...
## ...and the date list text file in the variables below
## Please use True or False to set whether multiple files will be a... | 28.220588 | 98 | 0.549635 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,739 | 0.487103 |
82d45629fe3b78bf615a134ee2b08fe22d31ec28 | 4,544 | py | Python | gaetk2/tools/auth0tools.py | mdornseif/appengine-toolkit2 | 47ee6bf99b8e461ee64eae75bf24fb462d99b0ab | [
"MIT"
] | 1 | 2018-08-16T16:15:30.000Z | 2018-08-16T16:15:30.000Z | gaetk2/tools/auth0tools.py | mdornseif/appengine-toolkit2 | 47ee6bf99b8e461ee64eae75bf24fb462d99b0ab | [
"MIT"
] | 3 | 2018-08-14T09:52:11.000Z | 2021-12-13T19:54:07.000Z | gaetk2/tools/auth0tools.py | mdornseif/appengine-toolkit2 | 47ee6bf99b8e461ee64eae75bf24fb462d99b0ab | [
"MIT"
] | 1 | 2018-09-28T05:55:27.000Z | 2018-09-28T05:55:27.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""gaetk2.tools.auth0.py Tools for working with auth0
Created by Maximillian Dornseif on 2017-12-05.
Copyright 2017 HUDROA. MIT Licensed.
"""
from __future__ import unicode_literals
import logging
from google.appengine.api import memcache
from auth0.v3.authentication ... | 39.172414 | 107 | 0.590889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,220 | 0.268486 |
82d6583dc3d6537a4f4d2769235a1441edc42642 | 705 | py | Python | Q56MergeIntervals.py | ChenliangLi205/LeetCode | 6c547c338eb05042cb68f57f737dce483964e2fd | [
"MIT"
] | null | null | null | Q56MergeIntervals.py | ChenliangLi205/LeetCode | 6c547c338eb05042cb68f57f737dce483964e2fd | [
"MIT"
] | null | null | null | Q56MergeIntervals.py | ChenliangLi205/LeetCode | 6c547c338eb05042cb68f57f737dce483964e2fd | [
"MIT"
] | null | null | null | # Definition for an interval.
# class Interval:
# def __init__(self, s=0, e=0):
# self.start = s
# self.end = e
class Solution:
def merge(self, intervals):
"""
:type intervals: List[Interval]
:rtype: List[Interval]
"""
if len(intervals) <= 1:
... | 28.2 | 49 | 0.520567 | 571 | 0.809929 | 0 | 0 | 0 | 0 | 0 | 0 | 213 | 0.302128 |
82d79ad0214596b7ecad4fe78d6e48cdeddf92f7 | 843 | py | Python | .github/scripts/check-status.py | antmicro/f4pga-arch-defs | dac6ffd8890227ea541ee892549e41c68588ad99 | [
"ISC"
] | null | null | null | .github/scripts/check-status.py | antmicro/f4pga-arch-defs | dac6ffd8890227ea541ee892549e41c68588ad99 | [
"ISC"
] | 78 | 2022-03-01T19:40:20.000Z | 2022-03-31T19:56:24.000Z | .github/scripts/check-status.py | antmicro/f4pga-arch-defs | dac6ffd8890227ea541ee892549e41c68588ad99 | [
"ISC"
] | null | null | null | #!/usr/bin/env python3
from sys import argv
from pathlib import Path
from re import compile as re_compile
PACKAGE_RE = re_compile("symbiflow-arch-defs-([a-zA-Z0-9_-]+)-([a-z0-9])")
with (Path(__file__).parent.parent.parent / 'packages.list').open('r') as rptr:
for artifact in rptr.read().splitlines():
m ... | 35.125 | 94 | 0.622776 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 343 | 0.40688 |
82d83bbbc397d5fb8c89450eac58244503912c31 | 500 | py | Python | DocOCR/urls.py | trangnm58/DocOCR | 7ec6087323cf2d06906878c55be236fb1950ce57 | [
"Apache-2.0"
] | null | null | null | DocOCR/urls.py | trangnm58/DocOCR | 7ec6087323cf2d06906878c55be236fb1950ce57 | [
"Apache-2.0"
] | null | null | null | DocOCR/urls.py | trangnm58/DocOCR | 7ec6087323cf2d06906878c55be236fb1950ce57 | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url, include
urlpatterns = [
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
url(r'^api/viet_ocr/', include('viet_ocr.api.urls', namespace="viet_ocr-api")),
url(r'^api/post_process/', include('post_process.api.urls', namespace="post_process-api"... | 45.454545 | 95 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 268 | 0.536 |
82d9c382128c028bc583ab744d986723b6f36dd9 | 839 | py | Python | utils/neuron/models/metrics/multi_task_metrics.py | tsingqguo/ABA | c32edbbe5705b0332a08951b5ee436b5f58c2e70 | [
"MIT"
] | 12 | 2021-07-27T07:18:24.000Z | 2022-03-09T13:52:20.000Z | utils/neuron/models/metrics/multi_task_metrics.py | tsingqguo/ABA | c32edbbe5705b0332a08951b5ee436b5f58c2e70 | [
"MIT"
] | 2 | 2021-08-03T09:21:33.000Z | 2021-12-29T14:25:30.000Z | utils/neuron/models/metrics/multi_task_metrics.py | tsingqguo/ABA | c32edbbe5705b0332a08951b5ee436b5f58c2e70 | [
"MIT"
] | 3 | 2021-11-18T14:46:40.000Z | 2022-01-03T15:47:23.000Z | import torch
import torch.nn as nn
import neuron.ops as ops
from neuron.config import registry
@registry.register_module
class ReID_Metric(nn.Module):
def __init__(self, metric_cls, metric_rank):
super(ReID_Metric, self).__init__()
self.metric_cls = metric_cls
self.metric_rank = metr... | 27.064516 | 62 | 0.582837 | 714 | 0.851013 | 0 | 0 | 740 | 0.882002 | 0 | 0 | 45 | 0.053635 |
82da6f9da92810cdbbf538013279acc8cf63197f | 1,028 | py | Python | lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/myIntSynthProvider.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 2,338 | 2018-06-19T17:34:51.000Z | 2022-03-31T11:00:37.000Z | packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/myIntSynthProvider.py | DalavanCloud/lldb | e913eaf2468290fb94c767d474d611b41a84dd69 | [
"Apache-2.0"
] | 3,740 | 2019-01-23T15:36:48.000Z | 2022-03-31T22:01:13.000Z | packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/myIntSynthProvider.py | DalavanCloud/lldb | e913eaf2468290fb94c767d474d611b41a84dd69 | [
"Apache-2.0"
] | 500 | 2019-01-23T07:49:22.000Z | 2022-03-30T02:59:37.000Z | class myIntSynthProvider(object):
def __init__(self, valobj, dict):
self.valobj = valobj
self.val = self.valobj.GetChildMemberWithName("theValue")
def num_children(self):
return 0
def get_child_at_index(self, index):
return None
def get_child_index(self, name):
... | 22.844444 | 67 | 0.641051 | 1,024 | 0.996109 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.106031 |
82da9d5e6799fe68c63757266b57886cf2eb5dae | 3,198 | py | Python | incremental-update.py | tarasowski/apache-spark | e42d6abe5fa08ff1e231d16169efaed0e01fc4a9 | [
"MIT"
] | 1 | 2019-08-13T09:17:19.000Z | 2019-08-13T09:17:19.000Z | incremental-update.py | tarasowski/apache-spark | e42d6abe5fa08ff1e231d16169efaed0e01fc4a9 | [
"MIT"
] | null | null | null | incremental-update.py | tarasowski/apache-spark | e42d6abe5fa08ff1e231d16169efaed0e01fc4a9 | [
"MIT"
] | null | null | null | from pyspark.sql import SparkSession
from pyspark.sql.types import DateType
from pyspark.sql.functions import col
from pyspark.sql import types as t
import sys
from pyspark.sql.window import Window
from pyspark.sql.functions import spark_partition_id
from pyspark.sql import Row
def show_partition_id(df):
return d... | 35.932584 | 139 | 0.596936 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,973 | 0.616563 |
82dad9c48cf2ee5a8b767bdd94a5e6cdf8574098 | 116 | py | Python | asset/admin.py | shoaibsaikat/Django-Office-Management-BackEnd | bb8ec201e4d414c16f5bac1907a2641d80c5970a | [
"Apache-2.0"
] | null | null | null | asset/admin.py | shoaibsaikat/Django-Office-Management-BackEnd | bb8ec201e4d414c16f5bac1907a2641d80c5970a | [
"Apache-2.0"
] | null | null | null | asset/admin.py | shoaibsaikat/Django-Office-Management-BackEnd | bb8ec201e4d414c16f5bac1907a2641d80c5970a | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import Asset
# Register your models here.
admin.site.register(Asset) | 19.333333 | 32 | 0.801724 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.241379 |
82dd697abb6c6bff11f04261d8e04916561eba16 | 360 | py | Python | instagram_api/response/send_confirm_email.py | Yuego/instagram_api | b53f72db36c505a2eb24ebac1ba8267a0cc295bb | [
"MIT"
] | 13 | 2019-08-07T21:24:34.000Z | 2020-12-12T12:23:50.000Z | instagram_api/response/send_confirm_email.py | Yuego/instagram_api | b53f72db36c505a2eb24ebac1ba8267a0cc295bb | [
"MIT"
] | null | null | null | instagram_api/response/send_confirm_email.py | Yuego/instagram_api | b53f72db36c505a2eb24ebac1ba8267a0cc295bb | [
"MIT"
] | null | null | null | from .mapper import ApiResponse, ApiResponseInterface
from .mapper.types import Timestamp, AnyType
__all__ = ['SendConfirmEmailResponse']
class SendConfirmEmailResponseInterface(ApiResponseInterface):
title: AnyType
is_email_legit: AnyType
body: AnyType
class SendConfirmEmailResponse(ApiResponse, SendC... | 24 | 79 | 0.816667 | 215 | 0.597222 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.072222 |
82de56b86e1e73fa5d0bacfcbe9e4a18d9698647 | 1,256 | py | Python | webpages/views.py | 18praneeth/udayagiri-scl-maxo | 67ac939265d7837e39329162d7dd935a52130978 | [
"MIT"
] | 8 | 2021-01-01T17:04:45.000Z | 2021-06-24T05:53:13.000Z | webpages/views.py | 18praneeth/udayagiri-scl-maxo | 67ac939265d7837e39329162d7dd935a52130978 | [
"MIT"
] | 11 | 2021-01-01T15:04:04.000Z | 2021-01-10T07:47:12.000Z | webpages/views.py | 18praneeth/udayagiri-scl-maxo | 67ac939265d7837e39329162d7dd935a52130978 | [
"MIT"
] | 7 | 2020-12-14T12:44:17.000Z | 2021-01-15T14:29:13.000Z | from django.shortcuts import render, redirect
from django.contrib import messages
from .models import Contact
from django.contrib.auth.decorators import login_required
def home(request):
if request.user.is_authenticated:
return render(request, 'webpages/home.html')
else:
return render(request,... | 26.166667 | 62 | 0.680732 | 0 | 0 | 0 | 0 | 822 | 0.654459 | 0 | 0 | 218 | 0.173567 |
82df65585957bc89145bf1319aef1409ff095c3a | 3,281 | py | Python | src/pywbemReq/tupletree.py | sinbawang/smisarray | 698448c7661af1d1a4491e5aeb58825899aff710 | [
"MIT"
] | 2 | 2019-03-13T14:02:45.000Z | 2020-02-21T02:20:47.000Z | src/pywbemReq/tupletree.py | Foglight/foglight-smis-storage-array-community-cartridge | 64c070e6c62c5c8c2052af2b402103f78d72a330 | [
"MIT"
] | 1 | 2017-08-10T13:55:17.000Z | 2017-09-28T19:56:15.000Z | src/pywbemReq/tupletree.py | Foglight/foglight-smis-storage-array-community-cartridge | 64c070e6c62c5c8c2052af2b402103f78d72a330 | [
"MIT"
] | null | null | null | #
# (C) Copyright 2003,2004 Hewlett-Packard Development Company, L.P.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later ... | 32.81 | 73 | 0.719902 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,139 | 0.651935 |
82e04d672370030e6dd5e6577a1aa78e567b3a27 | 1,723 | py | Python | src/Word.py | AlexandreLadriere/ColorfulWords | 48219337946639306a6854ec3b5d8814ce86d609 | [
"MIT"
] | null | null | null | src/Word.py | AlexandreLadriere/ColorfulWords | 48219337946639306a6854ec3b5d8814ce86d609 | [
"MIT"
] | null | null | null | src/Word.py | AlexandreLadriere/ColorfulWords | 48219337946639306a6854ec3b5d8814ce86d609 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3*
import unicodedata
class Word:
"""
Object representation for a word
Parameters
----------
text : str
word text
formatedText : str
word text without accent, punctuation, etc (UTF-8)
color : List of integers
pixel color values in rgb for th... | 31.907407 | 108 | 0.546721 | 1,681 | 0.974493 | 0 | 0 | 618 | 0.358261 | 0 | 0 | 789 | 0.457391 |
82e0a5642e6f736fc7177658b00015f1cb62d455 | 2,605 | py | Python | LeetCode/Python3/DynamicProgramming/123. Best Time to Buy and Sell Stock III.py | WatsonWangZh/CodingPractice | dc057dd6ea2fc2034e14fd73e07e73e6364be2ae | [
"MIT"
] | 11 | 2019-09-01T22:36:00.000Z | 2021-11-08T08:57:20.000Z | LeetCode/Python3/DynamicProgramming/123. Best Time to Buy and Sell Stock III.py | WatsonWangZh/LeetCodePractice | dc057dd6ea2fc2034e14fd73e07e73e6364be2ae | [
"MIT"
] | null | null | null | LeetCode/Python3/DynamicProgramming/123. Best Time to Buy and Sell Stock III.py | WatsonWangZh/LeetCodePractice | dc057dd6ea2fc2034e14fd73e07e73e6364be2ae | [
"MIT"
] | 2 | 2020-05-27T14:58:52.000Z | 2020-05-27T15:04:17.000Z | # Say you have an array for which the ith element is the price of a given stock on day i.
# Design an algorithm to find the maximum profit. You may complete at most two transactions.
# Note: You may not engage in multiple transactions at the same time
# (i.e., you must sell the stock before you buy again).
# Example ... | 36.180556 | 98 | 0.558925 | 1,945 | 0.66089 | 0 | 0 | 0 | 0 | 0 | 0 | 2,303 | 0.782535 |
82e0abe3e486e3352d2b626c47850728c42c4ae5 | 2,719 | py | Python | robot_con/baxter/baxter_client.py | takuya-ki/wrs | f6e1009b94332504042fbde9b39323410394ecde | [
"MIT"
] | 23 | 2021-04-02T09:02:04.000Z | 2022-03-22T05:31:03.000Z | robot_con/baxter/baxter_client.py | takuya-ki/wrs | f6e1009b94332504042fbde9b39323410394ecde | [
"MIT"
] | 35 | 2021-04-12T09:41:05.000Z | 2022-03-26T13:32:46.000Z | robot_con/baxter/baxter_client.py | takuya-ki/wrs | f6e1009b94332504042fbde9b39323410394ecde | [
"MIT"
] | 16 | 2021-03-30T11:55:45.000Z | 2022-03-30T07:10:59.000Z | import robotconn.rpc.baxterrobot.baxter_server_pb2 as bxtsp
import robotconn.rpc.baxterrobot.baxter_server_pb2_grpc as bxtspgc
import grpc
import pickle
import numpy as np
class BaxterClient(object):
def __init__(self, host = "localhost:18300"):
channel = grpc.insecure_channel(host)
self.stub = b... | 38.842857 | 154 | 0.668996 | 1,804 | 0.663479 | 0 | 0 | 0 | 0 | 0 | 0 | 629 | 0.231335 |
82e393c148ab09bc52468154e5d5428989e2e585 | 5,232 | py | Python | pw_build/py/pw_build/copy_from_cipd.py | Tiggerlaboratoriet/pigweed | 7d7e7ad6223433f45af680f43ab4d75e23ad3257 | [
"Apache-2.0"
] | 1 | 2022-01-13T10:01:05.000Z | 2022-01-13T10:01:05.000Z | pw_build/py/pw_build/copy_from_cipd.py | Tiggerlaboratoriet/pigweed | 7d7e7ad6223433f45af680f43ab4d75e23ad3257 | [
"Apache-2.0"
] | null | null | null | pw_build/py/pw_build/copy_from_cipd.py | Tiggerlaboratoriet/pigweed | 7d7e7ad6223433f45af680f43ab4d75e23ad3257 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 36.082759 | 80 | 0.634939 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,511 | 0.479931 |
82e3d3ee1d9875b1bc637e5da752761092db4c4c | 1,248 | py | Python | globomap_api/api/v2/parsers/queries.py | pedrokiefer/globomap-api | 68e1e3a623cdb4df78327226eb5c665841d4823f | [
"Apache-2.0"
] | 15 | 2017-08-04T17:09:52.000Z | 2021-03-05T18:11:51.000Z | globomap_api/api/v2/parsers/queries.py | pedrokiefer/globomap-api | 68e1e3a623cdb4df78327226eb5c665841d4823f | [
"Apache-2.0"
] | 2 | 2017-09-03T23:39:35.000Z | 2019-10-07T17:18:35.000Z | globomap_api/api/v2/parsers/queries.py | pedrokiefer/globomap-api | 68e1e3a623cdb4df78327226eb5c665841d4823f | [
"Apache-2.0"
] | 6 | 2017-08-09T13:32:38.000Z | 2020-01-31T23:28:36.000Z | """
Copyright 2018 Globo.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writ... | 26 | 75 | 0.710737 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 724 | 0.580128 |
82e465ccd93333f53c7be0010a34ffe382b2a569 | 5,354 | py | Python | auto_pull_request/parser.py | Ruth-Seven/Auto-git-request | bd058707c174138efed0ffd7109cf70b25796e64 | [
"Apache-2.0"
] | 2 | 2021-10-05T11:12:46.000Z | 2021-10-05T11:12:56.000Z | auto_pull_request/parser.py | Ruth-Seven/Auto-git-request | bd058707c174138efed0ffd7109cf70b25796e64 | [
"Apache-2.0"
] | null | null | null | auto_pull_request/parser.py | Ruth-Seven/Auto-git-request | bd058707c174138efed0ffd7109cf70b25796e64 | [
"Apache-2.0"
] | null | null | null |
# -*- encoding: utf-8 -*-
#
# 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... | 49.119266 | 293 | 0.710497 | 0 | 0 | 0 | 0 | 4,376 | 0.816723 | 0 | 0 | 3,544 | 0.661441 |
82e4981e82370f4b216afc9af7f4136625ccd93f | 3,644 | py | Python | fit1d/common/fit1d.py | michael-amat/fit1d | 0cd42874e3eba4353c564809c317510b626dee25 | [
"BSD-2-Clause"
] | null | null | null | fit1d/common/fit1d.py | michael-amat/fit1d | 0cd42874e3eba4353c564809c317510b626dee25 | [
"BSD-2-Clause"
] | null | null | null | fit1d/common/fit1d.py | michael-amat/fit1d | 0cd42874e3eba4353c564809c317510b626dee25 | [
"BSD-2-Clause"
] | 9 | 2019-02-24T12:51:28.000Z | 2019-03-22T09:25:45.000Z | """
fit1d package is designed to provide an organized toolbox for different types of
1D fits that can be performed.
It is easy to add new fits and other functionalities
"""
from abc import ABC, abstractmethod
import numpy as np
from typing import List,Tuple
from fit1d.common.model import Model, ModelMock
from fit1d.co... | 30.366667 | 114 | 0.638035 | 3,247 | 0.891054 | 0 | 0 | 410 | 0.112514 | 0 | 0 | 926 | 0.254116 |
82e49f1ad3ed1e40ba856944b5ae80363654a869 | 133 | py | Python | ska_skeleton/__init__.py | Vinod-Sathe-Company-Limited/ska-skeleton | e93d131fc4d33d5b2f0cd715553fd5907955eccd | [
"BSD-3-Clause"
] | null | null | null | ska_skeleton/__init__.py | Vinod-Sathe-Company-Limited/ska-skeleton | e93d131fc4d33d5b2f0cd715553fd5907955eccd | [
"BSD-3-Clause"
] | null | null | null | ska_skeleton/__init__.py | Vinod-Sathe-Company-Limited/ska-skeleton | e93d131fc4d33d5b2f0cd715553fd5907955eccd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Module init code."""
__version__ = '0.0.0'
__author__ = 'Your Name'
__email__ = 'your.email@mail.com'
| 13.3 | 33 | 0.609023 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.639098 |
82e67a1fd499cdf5d94a3a3ff757c622620968ef | 2,669 | py | Python | src/users.py | dtekcth/tvmannen | 47d9441ee4000dc3600ae1a28580ba95a5b46a2a | [
"MIT"
] | null | null | null | src/users.py | dtekcth/tvmannen | 47d9441ee4000dc3600ae1a28580ba95a5b46a2a | [
"MIT"
] | null | null | null | src/users.py | dtekcth/tvmannen | 47d9441ee4000dc3600ae1a28580ba95a5b46a2a | [
"MIT"
] | 1 | 2019-12-25T21:49:16.000Z | 2019-12-25T21:49:16.000Z | # Blueprint for user management in /admin/users and /admin/users/delete
from tv import login_manager, db
from flask_login import LoginManager, current_user, login_user, logout_user, login_required
from flask import Blueprint, flash, redirect, render_template, request
from data import User
from forms import Registratio... | 32.156627 | 91 | 0.683402 | 0 | 0 | 0 | 0 | 2,088 | 0.782315 | 0 | 0 | 819 | 0.306857 |
7d5335d6ee6e5dd4d8013184f474bc8d3185581f | 337 | py | Python | mxfield/models.py | krescruz/django-mxfield | 98855412d4414e239a74370380aed5d28b52eeb1 | [
"MIT"
] | null | null | null | mxfield/models.py | krescruz/django-mxfield | 98855412d4414e239a74370380aed5d28b52eeb1 | [
"MIT"
] | null | null | null | mxfield/models.py | krescruz/django-mxfield | 98855412d4414e239a74370380aed5d28b52eeb1 | [
"MIT"
] | null | null | null | from django.db.models import CharField
from django.utils.translation import ugettext_lazy as _
import validators
class CURPField(CharField):
default_validators = [validators.CURPValidator()]
description = _("CURP")
def __init__(self, *args, **kwargs):
kwargs['max_length'] = 18
super(CURPField, self).__init__(... | 25.923077 | 55 | 0.759644 | 221 | 0.655786 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.053412 |
7d53f22522d63caa5e1b6eeef4ed280bfe59205b | 5,646 | py | Python | tests/unit/test_crypt.py | oba11/salt | ddc0286d57c5ce864b60bf43e5bc3007bf7c2549 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_crypt.py | oba11/salt | ddc0286d57c5ce864b60bf43e5bc3007bf7c2549 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_crypt.py | oba11/salt | ddc0286d57c5ce864b60bf43e5bc3007bf7c2549 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# python libs
from __future__ import absolute_import
import os
# salt testing libs
from tests.support.unit import TestCase, skipIf
from tests.support.mock import patch, call, mock_open, NO_MOCK, NO_MOCK_REASON, MagicMock
# salt libs
import salt.utils
import salt.utils.files
from salt import crypt
# ... | 49.526316 | 108 | 0.732554 | 1,491 | 0.264081 | 0 | 0 | 1,590 | 0.281615 | 0 | 0 | 3,473 | 0.615126 |
7d54215d7a89cdc6dee240942d655951555aa1e4 | 628 | py | Python | gubbins/tests/utils_tests.py | doismellburning/django-gubbins | d94e91082adfe2ae7462209a5793b479429d40d9 | [
"BSD-2-Clause"
] | null | null | null | gubbins/tests/utils_tests.py | doismellburning/django-gubbins | d94e91082adfe2ae7462209a5793b479429d40d9 | [
"BSD-2-Clause"
] | 4 | 2018-12-20T13:02:40.000Z | 2018-12-21T16:09:20.000Z | gubbins/tests/utils_tests.py | doismellburning/django-gubbins | d94e91082adfe2ae7462209a5793b479429d40d9 | [
"BSD-2-Clause"
] | 2 | 2015-01-05T10:13:42.000Z | 2020-05-29T08:17:58.000Z | import unittest
from gubbins.utils import append_params
class UtilsTest(unittest.TestCase):
def test_append_params(self):
url = 'http://www.fish.com/dir/page.html'
url = append_params(url, {'a': 1, 'b': 'a i'})
expected = 'http://www.fish.com/dir/page.html?a=1&b=a+i'
self.asse... | 31.4 | 65 | 0.603503 | 547 | 0.871019 | 0 | 0 | 0 | 0 | 0 | 0 | 179 | 0.285032 |
7d553204536b771ce8440161d9597d5690c1a810 | 2,804 | py | Python | tests/components/test_power_output.py | Shivam60/j5 | 18069737644c8f1c95944386773c7643d5df5aeb | [
"MIT"
] | null | null | null | tests/components/test_power_output.py | Shivam60/j5 | 18069737644c8f1c95944386773c7643d5df5aeb | [
"MIT"
] | null | null | null | tests/components/test_power_output.py | Shivam60/j5 | 18069737644c8f1c95944386773c7643d5df5aeb | [
"MIT"
] | null | null | null | """Tests for the power output classes."""
from typing import List, Optional, Type
from j5.backends import Backend
from j5.boards import Board
from j5.components.power_output import PowerOutput, PowerOutputInterface
class MockPowerOutputDriver(PowerOutputInterface):
"""A testing driver for power outputs."""
... | 30.813187 | 82 | 0.690442 | 1,558 | 0.555635 | 0 | 0 | 690 | 0.246077 | 0 | 0 | 836 | 0.298146 |
7d55cd544a02e7f8eda686f396f1e614dce7adb0 | 11,660 | py | Python | msg/tools/genmsg/test/test_genmsg_msgs.py | sikuner/Firmware_Marine | 80411dc4eb5aa9dc8eb3ca8ff6d59d1cf081a010 | [
"BSD-3-Clause"
] | 17 | 2020-03-13T00:10:28.000Z | 2021-09-06T17:13:17.000Z | msg/tools/genmsg/test/test_genmsg_msgs.py | sikuner/Firmware_Marine | 80411dc4eb5aa9dc8eb3ca8ff6d59d1cf081a010 | [
"BSD-3-Clause"
] | 1 | 2020-08-24T03:28:49.000Z | 2020-08-24T03:28:49.000Z | msg/tools/genmsg/test/test_genmsg_msgs.py | sikuner/Firmware_Marine | 80411dc4eb5aa9dc8eb3ca8ff6d59d1cf081a010 | [
"BSD-3-Clause"
] | 2 | 2020-03-13T09:05:32.000Z | 2021-08-13T08:28:14.000Z | # Software License Agreement (BSD License)
#
# Copyright (c) 2009, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above... | 38.996656 | 180 | 0.620583 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,766 | 0.408748 |
7d565d78426b6ee97241efc8582c656e0fcdebc5 | 4,118 | py | Python | custom_components/waste_collection_schedule/waste_collection_schedule/wizard/stadtreinigung_hamburg.py | UBS-P/hacs_waste_collection_schedule | 9ce0fd55010bbab3948f1ee0aa5edb4b65b7d866 | [
"MIT"
] | 142 | 2020-04-13T18:56:12.000Z | 2022-03-30T19:44:08.000Z | custom_components/waste_collection_schedule/waste_collection_schedule/wizard/stadtreinigung_hamburg.py | UBS-P/hacs_waste_collection_schedule | 9ce0fd55010bbab3948f1ee0aa5edb4b65b7d866 | [
"MIT"
] | 138 | 2020-04-30T18:11:30.000Z | 2022-03-30T20:56:33.000Z | custom_components/waste_collection_schedule/waste_collection_schedule/wizard/stadtreinigung_hamburg.py | UBS-P/hacs_waste_collection_schedule | 9ce0fd55010bbab3948f1ee0aa5edb4b65b7d866 | [
"MIT"
] | 89 | 2020-06-16T05:13:08.000Z | 2022-03-28T09:28:25.000Z | #!/usr/bin/env python3
from html.parser import HTMLParser
import inquirer
import requests
# Parser for HTML input
class InputParser(HTMLParser):
def __init__(self, input_name):
super().__init__()
self._input_name = input_name
self._value = None
@property
def value(self):
... | 29.205674 | 93 | 0.573579 | 2,045 | 0.4966 | 0 | 0 | 118 | 0.028655 | 0 | 0 | 962 | 0.233609 |
7d56702dbd9fe5b8f3529654e0855fa2b7b8f074 | 1,480 | py | Python | pythonstudy/convert.py | flyonskycn/pythonstudy | c2eabe40ed369046c80ba9882b2212feb34cdad6 | [
"Apache-2.0"
] | null | null | null | pythonstudy/convert.py | flyonskycn/pythonstudy | c2eabe40ed369046c80ba9882b2212feb34cdad6 | [
"Apache-2.0"
] | null | null | null | pythonstudy/convert.py | flyonskycn/pythonstudy | c2eabe40ed369046c80ba9882b2212feb34cdad6 | [
"Apache-2.0"
] | null | null | null | import chardet
import sys
import codecs
import os
def findEncoding(s):
file = open(s, mode='rb')
buf = file.read()
result = chardet.detect(buf)
file.close()
return result['encoding']
def convertEncoding(s):
if os.access(s,os.W_OK):
encoding = findEncoding(s)
... | 23.492063 | 84 | 0.531081 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 196 | 0.132432 |
7d56e588d7a6fdb0c64b6925b9b5823ebec11f36 | 4,547 | py | Python | tests/tests.py | arck1/aio-counter | ffff58bf14ca2f155be5a54c9385481fce5ee58c | [
"MIT"
] | null | null | null | tests/tests.py | arck1/aio-counter | ffff58bf14ca2f155be5a54c9385481fce5ee58c | [
"MIT"
] | null | null | null | tests/tests.py | arck1/aio-counter | ffff58bf14ca2f155be5a54c9385481fce5ee58c | [
"MIT"
] | null | null | null | import unittest
from asyncio import sleep
from async_unittest import TestCase
from aio_counter import AioCounter
from aio_counter.exceptions import AioCounterException
class TestAioCounter(TestCase):
TIK = float(0.3)
TAK = float(0.6)
TTL = int(1)
@classmethod
def setUpClass(cls) -> None:
... | 25.544944 | 96 | 0.61667 | 4,325 | 0.951177 | 0 | 0 | 230 | 0.050583 | 2,818 | 0.619749 | 512 | 0.112602 |
7d57683f060246ecdbe9fa25924715de937635d2 | 67 | py | Python | dexp/processing/remove_beads/__init__.py | haesleinhuepf/dexp | 2ea84f3db323724588fac565fae56f0d522bc5ca | [
"BSD-3-Clause"
] | 16 | 2021-04-21T14:09:19.000Z | 2022-03-22T02:30:59.000Z | dexp/processing/remove_beads/__init__.py | haesleinhuepf/dexp | 2ea84f3db323724588fac565fae56f0d522bc5ca | [
"BSD-3-Clause"
] | 28 | 2021-04-15T17:43:08.000Z | 2022-03-29T16:08:35.000Z | dexp/processing/remove_beads/__init__.py | haesleinhuepf/dexp | 2ea84f3db323724588fac565fae56f0d522bc5ca | [
"BSD-3-Clause"
] | 3 | 2022-02-08T17:41:30.000Z | 2022-03-18T15:32:27.000Z | from dexp.processing.remove_beads.beadsremover import BeadsRemover
| 33.5 | 66 | 0.895522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |