hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 251 | max_forks_repo_name stringlengths 4 130 | 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 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7a5e39fe1eef3901acdd4ef96bf4275f32e60fa9 | 756 | py | Python | {{cookiecutter.project_slug}}/sources/app/utils/tests/backends/test_admin_backend.py | AsheKR/cookiecutter-django | d0402aefcc2eeaffa747faa7ef50ad97286bfcca | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/sources/app/utils/tests/backends/test_admin_backend.py | AsheKR/cookiecutter-django | d0402aefcc2eeaffa747faa7ef50ad97286bfcca | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/sources/app/utils/tests/backends/test_admin_backend.py | AsheKR/cookiecutter-django | d0402aefcc2eeaffa747faa7ef50ad97286bfcca | [
"BSD-3-Clause"
] | null | null | null | from django.contrib.auth import authenticate
from django.test import TestCase, override_settings
| 36 | 81 | 0.687831 |
7a5ea12ecc4b49137705efc9bc329a10e0a04827 | 1,560 | py | Python | lab3/test.py | dssgabriel/obhpc | 6358dffc85b18e1e65cb80f8e9b11b191b86463d | [
"MIT"
] | null | null | null | lab3/test.py | dssgabriel/obhpc | 6358dffc85b18e1e65cb80f8e9b11b191b86463d | [
"MIT"
] | null | null | null | lab3/test.py | dssgabriel/obhpc | 6358dffc85b18e1e65cb80f8e9b11b191b86463d | [
"MIT"
] | null | null | null | import numpy as np
import sys
import time
import mblas
# Python matrix multiplication
# Time measurement of Python sgemm
# Time measurement of Numpy sgemm
# Time measurement of C sgemm
# Main function
if __name__ == "__main__":
main()
| 23.636364 | 54 | 0.592949 |
7a5ef0d1d60184e8ef2a2b4a6360f59137607317 | 488 | py | Python | tests/conftest.py | odra/kelo | 22930954c6a75ba3e60ec07d258d65d13533b5b0 | [
"MIT"
] | null | null | null | tests/conftest.py | odra/kelo | 22930954c6a75ba3e60ec07d258d65d13533b5b0 | [
"MIT"
] | null | null | null | tests/conftest.py | odra/kelo | 22930954c6a75ba3e60ec07d258d65d13533b5b0 | [
"MIT"
] | null | null | null | import pytest
| 16.266667 | 95 | 0.655738 |
7a5efdd3fa22d91097ebe01edb43cd8a8309df98 | 2,817 | py | Python | main.py | devlocalhost/covidpy | 4c2e8ce8831a389b9ca5bad8ed64aa3c4fb5c60c | [
"MIT"
] | null | null | null | main.py | devlocalhost/covidpy | 4c2e8ce8831a389b9ca5bad8ed64aa3c4fb5c60c | [
"MIT"
] | null | null | null | main.py | devlocalhost/covidpy | 4c2e8ce8831a389b9ca5bad8ed64aa3c4fb5c60c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from traceback import format_exc
from requests import get
from colorhex import colorex, BOLD
from datetime import datetime
from sys import exit
from os import system
BLURPLE = '7289da'
GREEN = '43b581'
YELLOW = 'fdcc4b'
RED = 'f04947'
main() | 29.652632 | 188 | 0.709265 |
7a60e3f7182adc1bb57a1b4a891e3d337828847a | 676 | py | Python | Proj1/test.py | sebemery/EE559-DeepLearning-MiniProjects | 34ea114884e2e4f1416d63fa53466619e6a5c5fd | [
"MIT"
] | null | null | null | Proj1/test.py | sebemery/EE559-DeepLearning-MiniProjects | 34ea114884e2e4f1416d63fa53466619e6a5c5fd | [
"MIT"
] | null | null | null | Proj1/test.py | sebemery/EE559-DeepLearning-MiniProjects | 34ea114884e2e4f1416d63fa53466619e6a5c5fd | [
"MIT"
] | 1 | 2020-03-18T18:58:02.000Z | 2020-03-18T18:58:02.000Z | from models.Nets import *
from models.Basic import *
from models.Inception_Net import *
from models.Le_Net import *
from utils.dlc_practical_prologue import *
from utils.Evaluate import *
from utils.grid_search import *
from utils.loader import *
from utils.metrics import *
from utils.plot import *
from utils.training ... | 30.727273 | 117 | 0.683432 |
7a60ea9079d8b4f42edfd2138f6895976593e4dd | 905 | py | Python | examples/example4/sub_processt.py | bb515/probabilistic-peridynamics-project | 263c81b8736fd8308d3faf096714b12a2f787322 | [
"MIT"
] | null | null | null | examples/example4/sub_processt.py | bb515/probabilistic-peridynamics-project | 263c81b8736fd8308d3faf096714b12a2f787322 | [
"MIT"
] | null | null | null | examples/example4/sub_processt.py | bb515/probabilistic-peridynamics-project | 263c81b8736fd8308d3faf096714b12a2f787322 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat May 2 10:21:16 2020
@author: Ben Boys
"""
import subprocess
beams = ['3300beam952t.msh',
'3300beam2970t.msh',
'3300beam4392t.msh',
'3300beam6048t.msh',
'3300beam11836t.msh',
'3300beam17600t.msh',
'3300beam31680t.msh',
... | 33.518519 | 105 | 0.499448 |
7a60ed8d5b51faf0acae3eb73b2aefe676b8f9fb | 407 | py | Python | data-detective-airflow/dags/dags/dummy/code/code.py | dmitriy-e/metadata-governance | 018a879951dee3f3c2c05ac8e05b8360dd7f4ab3 | [
"Apache-2.0"
] | 5 | 2021-12-01T09:55:23.000Z | 2021-12-21T16:23:33.000Z | data-detective-airflow/dags/dags/dummy/code/code.py | dmitriy-e/metadata-governance | 018a879951dee3f3c2c05ac8e05b8360dd7f4ab3 | [
"Apache-2.0"
] | 1 | 2022-03-14T16:50:41.000Z | 2022-03-14T16:50:41.000Z | data-detective-airflow/dags/dags/dummy/code/code.py | dmitriy-e/metadata-governance | 018a879951dee3f3c2c05ac8e05b8360dd7f4ab3 | [
"Apache-2.0"
] | 2 | 2021-11-03T09:43:09.000Z | 2021-11-17T10:16:29.000Z | import yaml
from pandas import DataFrame
| 27.133333 | 79 | 0.633907 |
7a61638ec41b218d13f9ed19e5fe88c4dfeca072 | 331 | py | Python | Regex/3_Group_Groups_ Groupdict.py | FaranakAlikhah/ADM-HW1 | f4255112c58a4a200d04c943c74f096cc31e9dad | [
"MIT"
] | null | null | null | Regex/3_Group_Groups_ Groupdict.py | FaranakAlikhah/ADM-HW1 | f4255112c58a4a200d04c943c74f096cc31e9dad | [
"MIT"
] | null | null | null | Regex/3_Group_Groups_ Groupdict.py | FaranakAlikhah/ADM-HW1 | f4255112c58a4a200d04c943c74f096cc31e9dad | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # section 13.Regex and Parsing challenges :
#
# ### writer : Faranak Alikhah 1954128
# ### 3. Group(), Groups() & Groupdict() :
# In[ ]:
import re
s= input()
pattern=r'([A-Z a-z 0-9])\1+'#alphabet numeric
m=re.search(pattern,s)
if m:
print(m.group(1))
else:
prin... | 13.791667 | 47 | 0.589124 |
7a631c8b774ce30119cf2fb20a75fd6b612229ac | 2,238 | py | Python | checker/__main__.py | vyahello/pep8-checker | fe5d0746201d3a26ec2ae0c9c4a70203700af1f0 | [
"MIT"
] | 3 | 2020-08-09T15:17:44.000Z | 2022-03-19T22:16:25.000Z | checker/__main__.py | vyahello/pep8-checker | fe5d0746201d3a26ec2ae0c9c4a70203700af1f0 | [
"MIT"
] | 4 | 2020-08-12T21:25:16.000Z | 2021-04-17T10:57:57.000Z | checker/__main__.py | vyahello/pep8-checker | fe5d0746201d3a26ec2ae0c9c4a70203700af1f0 | [
"MIT"
] | 1 | 2020-12-17T10:06:37.000Z | 2020-12-17T10:06:37.000Z | """Represents executable entrypoint for `pep8-checker` application."""
import http
import os
from typing import Any, Dict, Optional
from pathlib import Path
import attr
from bottle import TEMPLATE_PATH, abort, request, route, run, view
import requests
TEMPLATE_PATH.append(str(Path('./') / 'checker' / 'views'))
def a... | 27.975 | 78 | 0.602324 |
7a645f8adcca004eb3891c7ce1a1f1c15e442c29 | 4,758 | py | Python | python/experiment.py | khoadoan/adversarial-hashing | eeeeb464b4fe7084efd38a6257499d674a9a7194 | [
"Apache-2.0"
] | 6 | 2020-06-26T09:51:07.000Z | 2021-09-09T09:48:55.000Z | python/experiment.py | khoadoan/adversarial-hashing | eeeeb464b4fe7084efd38a6257499d674a9a7194 | [
"Apache-2.0"
] | null | null | null | python/experiment.py | khoadoan/adversarial-hashing | eeeeb464b4fe7084efd38a6257499d674a9a7194 | [
"Apache-2.0"
] | 1 | 2020-07-21T19:34:38.000Z | 2020-07-21T19:34:38.000Z | import torch
from torch import nn
import torchvision.transforms as transforms
from tqdm import tqdm
import numpy as np
from train import model_helper
from models import mlp, dcgan
import data_manual
| 37.171875 | 121 | 0.648802 |
7a651dc10038b543bed65a91a976010e9fef4523 | 492 | py | Python | modules/vtk_basic/vtkDataObjectReader.py | chrisidefix/devide | 99bfe156e710fa47ba7ae88b0ce1eef592a3a439 | [
"BSD-3-Clause"
] | 25 | 2015-08-24T16:05:14.000Z | 2020-12-09T20:07:14.000Z | modules/vtk_basic/vtkDataObjectReader.py | chrisidefix/devide | 99bfe156e710fa47ba7ae88b0ce1eef592a3a439 | [
"BSD-3-Clause"
] | 1 | 2016-02-16T21:18:10.000Z | 2016-02-16T21:18:10.000Z | modules/vtk_basic/vtkDataObjectReader.py | chrisidefix/devide | 99bfe156e710fa47ba7ae88b0ce1eef592a3a439 | [
"BSD-3-Clause"
] | 5 | 2016-02-16T20:05:37.000Z | 2020-01-31T11:27:39.000Z | # class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
| 37.846154 | 64 | 0.71748 |
7a6651f10741e2f55d41c5d49f4a11f863eca070 | 8,311 | py | Python | venv/lib/python3.7/site-packages/twilio/rest/preview/trusted_comms/brands_information.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | 1,362 | 2015-01-04T10:25:18.000Z | 2022-03-24T10:07:08.000Z | venv/lib/python3.7/site-packages/twilio/rest/preview/trusted_comms/brands_information.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | 299 | 2015-01-30T09:52:39.000Z | 2022-03-31T23:03:02.000Z | venv/lib/python3.7/site-packages/twilio/rest/preview/trusted_comms/brands_information.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | 622 | 2015-01-03T04:43:09.000Z | 2022-03-29T14:11:00.000Z | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base... | 34.342975 | 96 | 0.679461 |
7a66f09c5519425a30cfc0792ff8af6ceb340d6d | 15,676 | py | Python | Projects/Space Invaders/main c clara.py | busterbeam/pygame | 5dbbfd8dff5785e5d1010909aec51e9ef8d1cf5c | [
"MIT"
] | 6 | 2018-05-26T13:06:34.000Z | 2021-11-08T11:44:28.000Z | Projects/Space Invaders/main c clara.py | busterbeam/pygame | 5dbbfd8dff5785e5d1010909aec51e9ef8d1cf5c | [
"MIT"
] | 1 | 2018-09-11T18:35:56.000Z | 2019-05-06T13:41:32.000Z | Projects/Space Invaders/main c clara.py | busterbeam/pygame | 5dbbfd8dff5785e5d1010909aec51e9ef8d1cf5c | [
"MIT"
] | 11 | 2018-06-01T01:53:11.000Z | 2021-08-11T01:00:17.000Z | import pygame
from pygame.locals import *
from os.path import realpath, dirname
from time import time
from random import randint
def white(surface):
for row in range(surface.get_height()):
for column in range(surface.get_width()):
if surface.get_at((column, row))[3] == 255:
... | 36.37123 | 158 | 0.559773 |
7a685ed0387ff3acf55274c958313caca3731d6f | 209 | py | Python | ADVECTOR/enums/forcings.py | john-science/ADVECTOR | 5c5ca7595c2c051f1a088b1f0e694936c3da3610 | [
"MIT"
] | 7 | 2021-09-07T02:32:00.000Z | 2022-01-15T11:35:02.000Z | ADVECTOR/enums/forcings.py | TheOceanCleanupAlgorithms/ADVECT | e27ce15da6a2fcbccbe363f8c2415b0122696d1f | [
"MIT"
] | 1 | 2021-12-24T15:16:26.000Z | 2021-12-24T15:16:26.000Z | ADVECTOR/enums/forcings.py | TheOceanCleanupAlgorithms/ADVECT | e27ce15da6a2fcbccbe363f8c2415b0122696d1f | [
"MIT"
] | 1 | 2021-12-12T15:13:52.000Z | 2021-12-12T15:13:52.000Z | from enum import Enum
| 20.9 | 69 | 0.674641 |
7a68824134279f8b6dbfeea1e35c104956a0af71 | 16,219 | py | Python | tests/test_routes.py | sternie-devops-squad/wishlists | 5383dbc9afa0d3a1bb18993553986828ce8c591b | [
"Apache-2.0"
] | 3 | 2022-02-16T23:05:07.000Z | 2022-02-25T19:16:57.000Z | tests/test_routes.py | sternie-devops-squad/wishlists | 5383dbc9afa0d3a1bb18993553986828ce8c591b | [
"Apache-2.0"
] | 41 | 2022-02-23T13:08:31.000Z | 2022-03-31T21:59:44.000Z | tests/test_routes.py | sternie-devops-squad/wishlists | 5383dbc9afa0d3a1bb18993553986828ce8c591b | [
"Apache-2.0"
] | null | null | null | """
<your resource name> API Service Test Suite
Test cases can be run with the following:
nosetests -v --with-spec --spec-color
coverage report -m
"""
import os
import logging
from unittest import TestCase
from unittest.mock import MagicMock, patch
from tests.factories import WishlistFactory, ItemFactory
from serv... | 36.94533 | 113 | 0.580924 |
7a699d75b7048967367caac0285a0e4744e00927 | 2,168 | py | Python | src/redrawing/components/debug.py | ReDrawing/redrawing | 20743f0c8d64d9d2e15cefa840423c9698c74653 | [
"MIT"
] | 1 | 2021-04-20T00:00:15.000Z | 2021-04-20T00:00:15.000Z | src/redrawing/components/debug.py | ReDrawing/redrawing | 20743f0c8d64d9d2e15cefa840423c9698c74653 | [
"MIT"
] | null | null | null | src/redrawing/components/debug.py | ReDrawing/redrawing | 20743f0c8d64d9d2e15cefa840423c9698c74653 | [
"MIT"
] | 1 | 2021-07-18T03:57:01.000Z | 2021-07-18T03:57:01.000Z | import time
from .stage import Stage
| 32.358209 | 127 | 0.579336 |
7a69a21aa05fe2df5e6fa114f41410a45c4bd7d5 | 6,659 | py | Python | bin/build.py | mgijax/mgv-data | 99a2f5a8f56d7ebb6a014431d8a20df721df58e2 | [
"MIT"
] | 1 | 2022-03-04T06:20:33.000Z | 2022-03-04T06:20:33.000Z | bin/build.py | JoelRichardson/mgv-data | 99a2f5a8f56d7ebb6a014431d8a20df721df58e2 | [
"MIT"
] | 1 | 2021-04-06T13:17:47.000Z | 2021-04-06T13:17:47.000Z | bin/build.py | JoelRichardson/mgv-data | 99a2f5a8f56d7ebb6a014431d8a20df721df58e2 | [
"MIT"
] | 1 | 2022-03-04T11:49:53.000Z | 2022-03-04T11:49:53.000Z | #
# build.py
#
# Builds a back end for MGV based on a config file.
#
import os
import sys
import time
import json
from argparse import ArgumentParser
import re
from urllib.request import urlopen
import gzip
from lib.Config import ConfigFileReader
from lib.Downloader import downloaderNameMap
from lib.Importer import i... | 37.410112 | 134 | 0.522301 |
7a69b967fd4fe272f88237f204dac1419991d4fb | 117 | py | Python | server/learning/login/urls.py | kantanand/insmartapps | 4ab54bb41101e43b5edaac9795509584f01c5c92 | [
"MIT"
] | 3 | 2016-05-01T18:39:08.000Z | 2019-02-19T11:55:40.000Z | server/learning/login/urls.py | kantanand/insmartapps | 4ab54bb41101e43b5edaac9795509584f01c5c92 | [
"MIT"
] | 1 | 2016-04-28T16:41:24.000Z | 2016-06-11T19:11:14.000Z | server/learning/login/urls.py | kantanand/insmartapps | 4ab54bb41101e43b5edaac9795509584f01c5c92 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from login import views
urlpatterns = [
url(r'^$', views.index, name='home'),
] | 19.5 | 41 | 0.683761 |
7a6c328d04079d34f9c72f504438d1ac60d7f5c9 | 1,225 | py | Python | streamparse/__init__.py | mdemaster/mdemaster_w205_exercise2 | 0030d78d674840f848250bff970824a1d49587fb | [
"Apache-2.0"
] | null | null | null | streamparse/__init__.py | mdemaster/mdemaster_w205_exercise2 | 0030d78d674840f848250bff970824a1d49587fb | [
"Apache-2.0"
] | 1 | 2020-06-25T07:11:18.000Z | 2020-06-25T07:11:18.000Z | streamparse/__init__.py | mdemaster/mdemaster_w205_exercise2 | 0030d78d674840f848250bff970824a1d49587fb | [
"Apache-2.0"
] | null | null | null | '''
This package makes it easier to work with Storm and Python.
:organization: Parsely
'''
from __future__ import absolute_import, print_function, unicode_literals
import streamparse.bolt
import streamparse.cmdln
import streamparse.component
import streamparse.contextmanagers
import streamparse.debug
import streampa... | 25 | 72 | 0.760816 |
7a6c43158e65f1ef63580d8b4dd6ab79de3bce35 | 10,245 | py | Python | plane_waves/polarization_animation.py | raptor/ECEn360_Winter2016 | 65076f19c561ee51c8757720694d1ef00f829bdb | [
"MIT"
] | null | null | null | plane_waves/polarization_animation.py | raptor/ECEn360_Winter2016 | 65076f19c561ee51c8757720694d1ef00f829bdb | [
"MIT"
] | 1 | 2019-03-03T00:54:52.000Z | 2019-03-04T18:06:38.000Z | plane_waves/polarization_animation.py | raptor/ECEn360_Winter2016 | 65076f19c561ee51c8757720694d1ef00f829bdb | [
"MIT"
] | 1 | 2019-03-02T02:50:24.000Z | 2019-03-02T02:50:24.000Z | #----------------------------------------------------------------------
# # 9/25/18 - Update to use Python 3.6, PyQt5 and pyqtgraph 0.10.0
# G. Nordin
#----------------------------------------------------------------------
from PyQt5 import QtGui, QtCore
import pyqtgraph as pg
import pyqtgraph.opengl as gl
import nump... | 35.085616 | 140 | 0.730112 |
7a6d0f5efa3463ae20d88607a8d5407e7e5f2f04 | 4,102 | py | Python | FEMpy/tests/unit/test_assemblers.py | floydie7/FEMpy | 50e11b88dc249ff7c599472b455b07b04df1afd7 | [
"MIT"
] | null | null | null | FEMpy/tests/unit/test_assemblers.py | floydie7/FEMpy | 50e11b88dc249ff7c599472b455b07b04df1afd7 | [
"MIT"
] | null | null | null | FEMpy/tests/unit/test_assemblers.py | floydie7/FEMpy | 50e11b88dc249ff7c599472b455b07b04df1afd7 | [
"MIT"
] | 1 | 2022-01-22T06:39:38.000Z | 2022-01-22T06:39:38.000Z | import numpy as np
from FEMpy import Mesh, FEBasis, Assemblers
mesh_1D_linear = Mesh.Interval1D(0, 1, 1/2, 'linear')
basis_1D_linear = FEBasis.IntervalBasis1D('linear')
mesh_1D_quadratic = Mesh.Interval1D(0, 1, 1/2, 'quadratic')
basis_1D_quadratic = FEBasis.IntervalBasis1D('quadratic')
mesh_2D_triangular_linear = M... | 53.973684 | 112 | 0.515358 |
7a6de493fc92b2d2c1df09e619cb6257aedb5b88 | 101 | py | Python | predict_emotions.py | fahsan/EmotiFind | aa3071d296cb61a91eea5e0139a9cbeb82b7d14b | [
"MIT"
] | null | null | null | predict_emotions.py | fahsan/EmotiFind | aa3071d296cb61a91eea5e0139a9cbeb82b7d14b | [
"MIT"
] | null | null | null | predict_emotions.py | fahsan/EmotiFind | aa3071d296cb61a91eea5e0139a9cbeb82b7d14b | [
"MIT"
] | 1 | 2018-05-12T22:54:49.000Z | 2018-05-12T22:54:49.000Z | #Takes as input a numpy array of 3 parameters per article and a output array of emotions per text.
| 33.666667 | 99 | 0.772277 |
7a6f7d87a2d1fb4721a02d6017c7510a78a70218 | 7,420 | py | Python | fonts/terminus-font-4.49.1/bin/bdf.py | xfnw/yaft | c57e8f3014aa5cf743ca0855e543dbafc2e0db22 | [
"MIT"
] | null | null | null | fonts/terminus-font-4.49.1/bin/bdf.py | xfnw/yaft | c57e8f3014aa5cf743ca0855e543dbafc2e0db22 | [
"MIT"
] | null | null | null | fonts/terminus-font-4.49.1/bin/bdf.py | xfnw/yaft | c57e8f3014aa5cf743ca0855e543dbafc2e0db22 | [
"MIT"
] | null | null | null | #
# Copyright (C) 2017-2020 Dimitar Toshkov Zhekov <dimitar.zhekov@gmail.com>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later v... | 23.935484 | 105 | 0.68814 |
7a6f999b096c719861108c73f2eea05851482105 | 9,488 | py | Python | gym_brt/envs/qube_base_env.py | zuzuba/quanser-openai-driver | c4bec08a8c7ac1c05dec26c863f899f44f15fd06 | [
"MIT"
] | null | null | null | gym_brt/envs/qube_base_env.py | zuzuba/quanser-openai-driver | c4bec08a8c7ac1c05dec26c863f899f44f15fd06 | [
"MIT"
] | null | null | null | gym_brt/envs/qube_base_env.py | zuzuba/quanser-openai-driver | c4bec08a8c7ac1c05dec26c863f899f44f15fd06 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import gym
import time
import math
import numpy as np
from gym import spaces
from gym.utils import seeding
from gym_brt.quanser import QubeServo2, QubeServo2Simulator
from gym_brt.control import QubeFlipUpCont... | 33.059233 | 106 | 0.602867 |
7a6fdd46e944281a1207e5491edb3ac4ac32ea1b | 397 | py | Python | mopidy_bamp/mopidy_bamp/base_service.py | isabella232/BossAlienMediaPlayer | c5ab5993a68c43d6b213bef2224020c9d4cc96cf | [
"MIT"
] | 14 | 2019-09-25T18:28:32.000Z | 2021-08-10T00:46:43.000Z | mopidy_bamp/mopidy_bamp/base_service.py | J87/BossAlienMediaPlayer | 5af42e2fa94bd7e0fc4486b3deed2fdd6e3dcd05 | [
"MIT"
] | 9 | 2020-01-08T11:10:25.000Z | 2022-03-02T05:42:50.000Z | mopidy_bamp/mopidy_bamp/base_service.py | J87/BossAlienMediaPlayer | 5af42e2fa94bd7e0fc4486b3deed2fdd6e3dcd05 | [
"MIT"
] | 6 | 2019-09-25T15:04:40.000Z | 2021-01-04T11:21:01.000Z |
import tornado.web
import threading
| 17.26087 | 44 | 0.609572 |
7a70d71d5291dbc0c13322848d901d168bba6bc7 | 3,178 | py | Python | main/helpers.py | anngle/t923 | 078d2c566c77afa2ca1be7663d3c23c9f0ecddac | [
"BSD-3-Clause"
] | 1 | 2021-11-28T05:46:45.000Z | 2021-11-28T05:46:45.000Z | main/helpers.py | anngle/t923 | 078d2c566c77afa2ca1be7663d3c23c9f0ecddac | [
"BSD-3-Clause"
] | null | null | null | main/helpers.py | anngle/t923 | 078d2c566c77afa2ca1be7663d3c23c9f0ecddac | [
"BSD-3-Clause"
] | null | null | null | #coding=utf-8
from werkzeug import import_string, cached_property
from functools import wraps
from flask import request,render_template,session,current_app,url_for
from datetime import timedelta,datetime
# from main.extensions import redis_store
from flask_sse import sse
# from urllib.parse import urljoin
# from urll... | 28.890909 | 73 | 0.648521 |
7a710889018c82681c9e827f743aab1961a6e26a | 1,482 | py | Python | LeetCode/medium/search_a_2d_matrix_ii.py | hnc01/online-judge | d306dc32c9d8600a987affbe4e4b80809f0b0982 | [
"MIT"
] | null | null | null | LeetCode/medium/search_a_2d_matrix_ii.py | hnc01/online-judge | d306dc32c9d8600a987affbe4e4b80809f0b0982 | [
"MIT"
] | null | null | null | LeetCode/medium/search_a_2d_matrix_ii.py | hnc01/online-judge | d306dc32c9d8600a987affbe4e4b80809f0b0982 | [
"MIT"
] | null | null | null | '''
https://leetcode.com/problems/search-a-2d-matrix-ii/
240. Search a 2D Matrix II
Write an efficient algorithm that searches for a target value in an m x n integer matrix. The matrix has the following properties:
- Integers in each row are sorted in ascending from left to right.
- Intege... | 32.933333 | 134 | 0.536437 |
7a718a243bcf5867511bde8c48494b0dbfa75d51 | 7,503 | py | Python | automow_ekf/src/automow_ekf/__init__.py | Auburn-Automow/au_automow_common | 920be6a740aa6d738e9954417b41490e353efd04 | [
"BSD-3-Clause"
] | 43 | 2016-03-05T17:06:29.000Z | 2022-03-10T08:50:46.000Z | automow_ekf/src/automow_ekf/__init__.py | qintxwd/au_automow_common | 920be6a740aa6d738e9954417b41490e353efd04 | [
"BSD-3-Clause"
] | 2 | 2017-07-10T12:43:49.000Z | 2019-03-13T13:57:31.000Z | automow_ekf/src/automow_ekf/__init__.py | qintxwd/au_automow_common | 920be6a740aa6d738e9954417b41490e353efd04 | [
"BSD-3-Clause"
] | 22 | 2016-03-23T06:10:52.000Z | 2022-03-10T08:50:49.000Z | import numpy as np
import threading
def wrapToPi(angle):
"""
Wrap a given angle in radians to the range -pi to pi.
@param angle : The angle to be wrapped
@param type angle : float
@return : Wrapped angle
@rtype : float
"""
return np.mod(angle + np.pi, 2.0 * np.pi) - np.pi
| 38.086294 | 103 | 0.514461 |
7a719e5fbbaf6f206dcab2bd1b09cd9219be9533 | 2,028 | py | Python | functions/oxford.py | codefire53/aegisbot | b4cb4f42e3cbdf8554eb234661cc6091e83f1be4 | [
"MIT"
] | null | null | null | functions/oxford.py | codefire53/aegisbot | b4cb4f42e3cbdf8554eb234661cc6091e83f1be4 | [
"MIT"
] | null | null | null | functions/oxford.py | codefire53/aegisbot | b4cb4f42e3cbdf8554eb234661cc6091e83f1be4 | [
"MIT"
] | null | null | null | '''Importing necessary modules'''
from urllib.parse import quote
import urllib
import requests
from bs4 import BeautifulSoup
'''Function to search word/phrase on oxford dictionary'''
| 45.066667 | 113 | 0.61785 |
7a72cc0496b6255bcf4c039018a93cc9e747a2d4 | 3,546 | py | Python | checkov/common/output/baseline.py | peaudecastor/checkov | a4804b61c1b1390b7abd44ab53285fcbc3e7e80b | [
"Apache-2.0"
] | null | null | null | checkov/common/output/baseline.py | peaudecastor/checkov | a4804b61c1b1390b7abd44ab53285fcbc3e7e80b | [
"Apache-2.0"
] | null | null | null | checkov/common/output/baseline.py | peaudecastor/checkov | a4804b61c1b1390b7abd44ab53285fcbc3e7e80b | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
import json
from collections import defaultdict
from typing import Any, TYPE_CHECKING
if TYPE_CHECKING:
from checkov.common.output.record import Record
from checkov.common.output.report import Report
from checkov.common.typing import _BaselineFinding, _BaselineFailedChec... | 40.295455 | 111 | 0.57868 |
7a74674267c1f4fe6e221bdda6d7d922cfce3228 | 981 | py | Python | Configuration/Generator/python/bJpsiX_filt_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Configuration/Generator/python/bJpsiX_filt_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Configuration/Generator/python/bJpsiX_filt_cfi.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
bfilter = cms.EDFilter("MCSingleParticleFilter",
MaxEta = cms.untracked.vdouble(20.0, 20.0),
MinEta = cms.untracked.vdouble(-20.0, -20.0),
MinPt = cms.untracked.vdouble(0.0, 0.0),
ParticleID = cms.untracked.vint32(5, -5)
)
jpsifilter = cms.EDFilter("PythiaFilte... | 33.827586 | 49 | 0.680938 |
7a7625718df7e6640a9e34803147593716f4fd9f | 5,618 | py | Python | tests/support/rabbitmq/__init__.py | juntossomosmais/django-stomp | 65e7cb86f8f6e2336a2739df8f33f985c9b4c792 | [
"MIT"
] | 32 | 2019-06-10T13:24:11.000Z | 2021-12-17T21:00:41.000Z | tests/support/rabbitmq/__init__.py | juntossomosmais/django-stomp | 65e7cb86f8f6e2336a2739df8f33f985c9b4c792 | [
"MIT"
] | 26 | 2019-12-17T12:51:00.000Z | 2022-02-16T16:13:14.000Z | tests/support/rabbitmq/__init__.py | juntossomosmais/django-stomp | 65e7cb86f8f6e2336a2739df8f33f985c9b4c792 | [
"MIT"
] | 1 | 2021-09-11T03:55:30.000Z | 2021-09-11T03:55:30.000Z | import json
import logging
import urllib.parse
from time import sleep
from typing import Generator
from typing import Optional
import requests
from requests.adapters import HTTPAdapter
from tests.support.dtos import ConsumerStatus
from tests.support.dtos import CurrentDestinationStatus
from tests.support.dtos import ... | 41.007299 | 117 | 0.672481 |
7a77731700f270ddcae5f715cc1cc8dec54c3bd0 | 964 | py | Python | Searching/Ternary Search/Python/TernarySearch.py | priyanshi2808/DSA | 1e907e869a55049c6b5d9469d8d52bfce2add4f0 | [
"MIT"
] | 8 | 2021-10-14T16:31:54.000Z | 2022-01-05T11:56:37.000Z | Searching/Ternary Search/Python/TernarySearch.py | priyanshi2808/DSA | 1e907e869a55049c6b5d9469d8d52bfce2add4f0 | [
"MIT"
] | 55 | 2021-10-15T14:53:05.000Z | 2021-12-21T07:29:00.000Z | Searching/Ternary Search/Python/TernarySearch.py | priyanshi2808/DSA | 1e907e869a55049c6b5d9469d8d52bfce2add4f0 | [
"MIT"
] | 12 | 2021-10-14T12:13:22.000Z | 2022-02-22T13:41:42.000Z | # Here, left = 0 and right = length of array - 1
# Sample Input :
# Ar = [12 , 90 , 67 , 19 , 18]
# Key = 19
# Output:
# Element found!Index: 3
| 22.952381 | 64 | 0.48029 |
7a7790db65580f59c5c2b4b7513f7c447480f699 | 1,114 | py | Python | feature_engineering/featuretools.py | bukosabino/ml-utils | 3f9379e0558a3db8f4b43b924da8fa30f6d42edb | [
"MIT"
] | 2 | 2019-03-03T15:17:51.000Z | 2021-01-31T15:35:21.000Z | feature_engineering/featuretools.py | bukosabino/ml-utils | 3f9379e0558a3db8f4b43b924da8fa30f6d42edb | [
"MIT"
] | null | null | null | feature_engineering/featuretools.py | bukosabino/ml-utils | 3f9379e0558a3db8f4b43b924da8fa30f6d42edb | [
"MIT"
] | 1 | 2018-10-20T16:42:54.000Z | 2018-10-20T16:42:54.000Z | import featuretools as ft
def merge_featuretools(df_parent, df_related, parent_column, related_column, date_column):
"""Automated feature engineering
More info:
https://www.featuretools.com
https://github.com/featuretools/featuretools
https://docs.featuretools.com
http://www.jmaxkanter.com/st... | 32.764706 | 93 | 0.66158 |
7a788cd072bdcfa375e6dc2987b8609a8045d6fa | 6,234 | py | Python | recommender/colaborative/prepare_data.py | DigasNikas/PyRecommender | fb056929bba45431a5fc98691332b9bf91e730bb | [
"MIT"
] | 2 | 2017-05-27T15:06:04.000Z | 2018-11-23T06:43:25.000Z | recommender/colaborative/prepare_data.py | DigasNikas/PyRecommender | fb056929bba45431a5fc98691332b9bf91e730bb | [
"MIT"
] | null | null | null | recommender/colaborative/prepare_data.py | DigasNikas/PyRecommender | fb056929bba45431a5fc98691332b9bf91e730bb | [
"MIT"
] | null | null | null | from pyspark import SQLContext
from pyspark.sql.functions import lit
from datetime import datetime
| 38.9625 | 115 | 0.623837 |
7a7af5fdb993c98e171a62bd93ae82a0d3f1b8bd | 291 | py | Python | tests/globals/documents/misc_documents.py | RelevanceAI/RelevanceAI | a0542f35153d9c842f3d2cd0955d6b07f6dfc07b | [
"Apache-2.0"
] | 21 | 2021-11-23T13:01:36.000Z | 2022-03-23T03:45:30.000Z | tests/globals/documents/misc_documents.py | RelevanceAI/RelevanceAI | a0542f35153d9c842f3d2cd0955d6b07f6dfc07b | [
"Apache-2.0"
] | 217 | 2021-11-23T00:11:01.000Z | 2022-03-30T08:11:49.000Z | tests/globals/documents/misc_documents.py | RelevanceAI/RelevanceAI | a0542f35153d9c842f3d2cd0955d6b07f6dfc07b | [
"Apache-2.0"
] | 4 | 2022-01-04T01:48:30.000Z | 2022-02-11T03:19:32.000Z | import pytest
from typing import List
from tests.globals.constants import NUMBER_OF_DOCUMENTS
from tests.globals.document import dataclass_document
| 22.384615 | 69 | 0.80756 |
7a7b176678afd25894ed7a7d41c1b8b41f6c77eb | 6,711 | py | Python | social-update.py | uditvashisht/SaralGyaanTwitterRedditBot | 7e6238afd57383eb6a95df4395e23c868c5e4b2c | [
"MIT"
] | null | null | null | social-update.py | uditvashisht/SaralGyaanTwitterRedditBot | 7e6238afd57383eb6a95df4395e23c868c5e4b2c | [
"MIT"
] | null | null | null | social-update.py | uditvashisht/SaralGyaanTwitterRedditBot | 7e6238afd57383eb6a95df4395e23c868c5e4b2c | [
"MIT"
] | null | null | null | import tweepy
import praw
import prawcore
import time
import requests
import logging
import os
import shutil
import facebook
import requests
# pip install python-decouple
from decouple import config
# Login Credentials
REDDIT_CLIENT_ID = config('REDDIT_CLIENT_ID')
REDDIT_CLIENT_SECRET = config('REDDIT_CLIENT_SECRET')... | 30.22973 | 139 | 0.627924 |
7a7d6087e717f659ba3bf75a8fbf15e172cbecdc | 11,214 | py | Python | models.py | AndrejsinD/Hopes-Wings-Database | 9646890ac7c52440327129b2370cf062b099ded9 | [
"MIT"
] | null | null | null | models.py | AndrejsinD/Hopes-Wings-Database | 9646890ac7c52440327129b2370cf062b099ded9 | [
"MIT"
] | null | null | null | models.py | AndrejsinD/Hopes-Wings-Database | 9646890ac7c52440327129b2370cf062b099ded9 | [
"MIT"
] | null | null | null | from peewee import *
database = MySQLDatabase('hopes_wings', **{'charset': 'utf8', 'use_unicode': True, 'host': 'localhost', 'user': 'root', 'password': 'david'})
# Practice query
def getDonorsByID(db, donorID):
sql_query = "SELECT * FROM donors WHERE DonorID = " + str(donorID)
return db.execute_sql(sql_quer... | 55.514851 | 370 | 0.753077 |
7a7eeca58b940b9dce392dd95136944747af3a0f | 2,553 | py | Python | youths/management/commands/import_youth_data.py | City-of-Helsinki/youth-membership | 36f5324fa7444753d49fb476e71b09cc6e842dc2 | [
"MIT"
] | null | null | null | youths/management/commands/import_youth_data.py | City-of-Helsinki/youth-membership | 36f5324fa7444753d49fb476e71b09cc6e842dc2 | [
"MIT"
] | 31 | 2020-07-02T11:26:39.000Z | 2022-03-12T00:50:49.000Z | youths/management/commands/import_youth_data.py | City-of-Helsinki/youth-membership | 36f5324fa7444753d49fb476e71b09cc6e842dc2 | [
"MIT"
] | null | null | null | import json
from django.contrib.auth import get_user_model
from django.core import serializers
from django.core.management.base import BaseCommand
from django.db import transaction
from django.db.models.signals import post_save
from helusers.models import ADGroup, ADGroupMapping
from sequences.models import Sequence
... | 37 | 120 | 0.647865 |
7a7f11e6c6a877151c17c25eab1dd510ce82e20f | 2,412 | py | Python | 1_screen_pipeline/03_peak_intersection/pcommon.py | weng-lab/SCREEN | e8e7203e2f9baa2de70e2f75bdad3ae24b568367 | [
"MIT"
] | 5 | 2020-07-30T02:35:20.000Z | 2020-12-24T01:26:47.000Z | 1_screen_pipeline/03_peak_intersection/pcommon.py | weng-lab/SCREEN | e8e7203e2f9baa2de70e2f75bdad3ae24b568367 | [
"MIT"
] | 6 | 2021-03-04T10:30:11.000Z | 2022-03-16T16:47:47.000Z | 1_screen_pipeline/03_peak_intersection/pcommon.py | weng-lab/SCREEN | e8e7203e2f9baa2de70e2f75bdad3ae24b568367 | [
"MIT"
] | 2 | 2020-12-08T10:05:02.000Z | 2022-03-10T09:41:19.000Z |
# SPDX-License-Identifier: MIT
# Copyright (c) 2016-2020 Michael Purcaro, Henry Pratt, Jill Moore, Zhiping Weng
from __future__ import print_function
import sys
import os
import gzip
import json
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)),
"../../../metadata... | 33.5 | 110 | 0.569652 |
7a8001c534cd737e89955f0347ad32c0a03dee61 | 2,610 | py | Python | finliveapp/migrations/0020_auto_20211110_1019.py | FinLiveRI/FinLiveApp | c5634c1da2a4081119890df7674c1f170f106e7f | [
"MIT"
] | null | null | null | finliveapp/migrations/0020_auto_20211110_1019.py | FinLiveRI/FinLiveApp | c5634c1da2a4081119890df7674c1f170f106e7f | [
"MIT"
] | null | null | null | finliveapp/migrations/0020_auto_20211110_1019.py | FinLiveRI/FinLiveApp | c5634c1da2a4081119890df7674c1f170f106e7f | [
"MIT"
] | null | null | null | # Generated by Django 3.2.4 on 2021-11-10 10:19
from django.db import migrations, models
import django.db.models.deletion
| 31.071429 | 120 | 0.557854 |
7a8034f5cd14516baa13647e9508787ee3e7837b | 18,882 | py | Python | nested/train_vgg.py | yingyichen-cyy/Nested-Co-teaching | 8b7e3ed02d8994d93dcb2011340fe28ba6012283 | [
"MIT"
] | 39 | 2021-04-29T08:36:59.000Z | 2022-02-26T03:53:48.000Z | nested/train_vgg.py | yingyichen-cyy/Nested-Co-teaching | 8b7e3ed02d8994d93dcb2011340fe28ba6012283 | [
"MIT"
] | 1 | 2021-05-19T07:53:53.000Z | 2021-09-24T09:00:45.000Z | nested/train_vgg.py | yingyichen-cyy/Nested-Co-teaching | 8b7e3ed02d8994d93dcb2011340fe28ba6012283 | [
"MIT"
] | 3 | 2021-05-14T06:53:19.000Z | 2021-08-04T13:44:24.000Z | import torch
import torch.nn as nn
import torch.optim as optim
from torch.optim.lr_scheduler import MultiStepLR
import json
import os
import argparse
import utils
from model import vgg
import itertools
import numpy as np
import random
import torchvision
import torchvision.transforms as transforms
from torch.utils... | 37.915663 | 283 | 0.517848 |
7a81537d6715e748ac6f076189e71e95d4899578 | 918 | py | Python | src/unpacking.py | marvey11/python-playground | 1a978a8b4e593f3497c48a921037b7bcf7af0762 | [
"MIT"
] | null | null | null | src/unpacking.py | marvey11/python-playground | 1a978a8b4e593f3497c48a921037b7bcf7af0762 | [
"MIT"
] | null | null | null | src/unpacking.py | marvey11/python-playground | 1a978a8b4e593f3497c48a921037b7bcf7af0762 | [
"MIT"
] | null | null | null | """ Fun with unpacking stuff. """
from typing import Any, Tuple
def print_integers(val01: int, val02: int) -> None:
""" Prints some message for the integers. """
print(f"--> print_integers() -- VAL 1 = {val01}, VAL 2 = {val02}")
def print_tuples(tup: tuple[Any, ...]) -> None:
""" Prints some message fo... | 27 | 70 | 0.61329 |
7a84e7aa21897fbe53bd431bdaec619accc01001 | 355 | py | Python | codecs.py | HackersTech/black-hat_python | 477246ebde4f944c15979f137cc73aa39fdc7669 | [
"MIT"
] | 3 | 2021-12-17T15:53:24.000Z | 2022-02-10T14:26:36.000Z | codecs.py | HackersTech/black-hat_python | 477246ebde4f944c15979f137cc73aa39fdc7669 | [
"MIT"
] | null | null | null | codecs.py | HackersTech/black-hat_python | 477246ebde4f944c15979f137cc73aa39fdc7669 | [
"MIT"
] | null | null | null | import codecs
print("""encodings :
# hex
# quopri
# uu
# uu_codec
# zip
# zlib
# bz2
# bz2_codec
base64""")
en=input('enter encoding -: ')
i=open(input("enter file to be encoded"),'r')
k=i.read()
main=eval(f"codecs.encode(b{k},'{en}')")
n=open(input('enter output file name -: '),'w')
n.write(f'a=codecs.decode(b"{m... | 18.684211 | 47 | 0.619718 |
7a85b5168659dd79cc872d19ff4716a8418facb0 | 2,352 | py | Python | loader.py | Faylixe/pibooth | 6ce63753c35ce7d38c6630e7eeb10947fdea1ffa | [
"MIT"
] | null | null | null | loader.py | Faylixe/pibooth | 6ce63753c35ce7d38c6630e7eeb10947fdea1ffa | [
"MIT"
] | null | null | null | loader.py | Faylixe/pibooth | 6ce63753c35ce7d38c6630e7eeb10947fdea1ffa | [
"MIT"
] | null | null | null | #!/usr/bin/python
from ui import Window, Panel, Label, Image
import pygame
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
GRAY = (100, 100, 100)
if __name__ == '__main__':
info = pygame.display.Info()
loader = Loader()
loader.welcome()
loader.window.start() | 34.086957 | 98 | 0.592687 |
7a86fd5c7b92c28b787452e765522fe7a377370d | 1,255 | py | Python | app/routers/users.py | Ashishb21/propertyConnect | 60bc23125e4b45cc5e0c3b2cff8d57afd57ecbb8 | [
"MIT"
] | null | null | null | app/routers/users.py | Ashishb21/propertyConnect | 60bc23125e4b45cc5e0c3b2cff8d57afd57ecbb8 | [
"MIT"
] | null | null | null | app/routers/users.py | Ashishb21/propertyConnect | 60bc23125e4b45cc5e0c3b2cff8d57afd57ecbb8 | [
"MIT"
] | null | null | null | from fastapi import APIRouter, Depends
from sqlalchemy.orm import Session
from core.database import get_db
from db.services.userservices import UserService
from schemas.users import RegisterUser
from core.token import get_currentUser
from db.models.usermodels import User
router = APIRouter()
| 31.375 | 79 | 0.737052 |
7a8b6a5f33d6240f73b55ff527bd30a0bb87df51 | 4,027 | py | Python | awards/models.py | Sundaybrian/prodev | ed51fbd7c70941de36f7bc59c1940acfafaecf72 | [
"MIT"
] | null | null | null | awards/models.py | Sundaybrian/prodev | ed51fbd7c70941de36f7bc59c1940acfafaecf72 | [
"MIT"
] | 7 | 2020-06-05T22:53:10.000Z | 2022-02-10T08:29:14.000Z | awards/models.py | Sundaybrian/prodev | ed51fbd7c70941de36f7bc59c1940acfafaecf72 | [
"MIT"
] | null | null | null | from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
from django.db.models import Q
from django.core.exceptions import ObjectDoesNotExist
from django.http import Http404
from users.models import Profile
from django.contrib.auth.models import User
from statistics imp... | 26.320261 | 139 | 0.656816 |
7a8cb7844af88c35eb1b63d6733fa0006e6aff06 | 1,291 | py | Python | src/xg_all/xg.py | tapojyotipaul/xgboost-benchmarks | 789b99acbf401617a45a8c82dbae1210378527d8 | [
"Apache-2.0"
] | null | null | null | src/xg_all/xg.py | tapojyotipaul/xgboost-benchmarks | 789b99acbf401617a45a8c82dbae1210378527d8 | [
"Apache-2.0"
] | null | null | null | src/xg_all/xg.py | tapojyotipaul/xgboost-benchmarks | 789b99acbf401617a45a8c82dbae1210378527d8 | [
"Apache-2.0"
] | 2 | 2021-04-07T12:32:42.000Z | 2021-04-21T16:28:42.000Z | from timeit import default_timer as timer
import xgboost as xgb
import common
import gc
NUM_LOOPS = 100
PARAMS = {
'objective': 'reg:squarederror',
'alpha': 0.9,
'max_bin': 256,
'scale_pos_weight': 2,
'learning_rate': 0.1,
'subsample': 1,
'reg_lambda': 1,
'min_child_weight': 0,
... | 26.346939 | 81 | 0.659954 |
7a8dbcfb9f48db68d70725b0f63d6593739a5371 | 255 | py | Python | gyak/03/duplum-torol.py | horverno/sze-academic-python | 3ac8f2c62b827822f529dc600eef91713e82d551 | [
"MIT"
] | 4 | 2019-06-24T17:01:03.000Z | 2021-11-09T21:48:32.000Z | gyak/03/duplum-torol.py | horverno/sze-academic-python | 3ac8f2c62b827822f529dc600eef91713e82d551 | [
"MIT"
] | null | null | null | gyak/03/duplum-torol.py | horverno/sze-academic-python | 3ac8f2c62b827822f529dc600eef91713e82d551 | [
"MIT"
] | 6 | 2018-07-24T10:08:14.000Z | 2021-09-11T20:40:47.000Z | # irjunk olyan python kodot, amely kitorli egy listabol a duplumokat
a = [10,20,30,20,10,50,60,40,80,50,40]
dup_items = set()
uniq_items = []
for x in a:
if x not in dup_items:
uniq_items.append(x)
dup_items.add(x)
print(dup_items)
| 19.615385 | 68 | 0.662745 |
7a8dcc97cfb480e0204ea275bf860897bec39fc3 | 34 | py | Python | bzoing/share.py | marado/bzoing | 7d3ac9c36f23d89b692de2e2d8871c108b7d335d | [
"MIT"
] | 7 | 2017-01-12T18:25:39.000Z | 2021-06-30T11:56:07.000Z | bzoing/share.py | marado/bzoing | 7d3ac9c36f23d89b692de2e2d8871c108b7d335d | [
"MIT"
] | 20 | 2017-03-13T19:47:30.000Z | 2021-01-19T04:25:35.000Z | bzoing/share.py | marado/bzoing | 7d3ac9c36f23d89b692de2e2d8871c108b7d335d | [
"MIT"
] | 4 | 2017-07-16T05:39:32.000Z | 2020-09-30T23:22:43.000Z | tasklist = None
my_monitor = None
| 11.333333 | 17 | 0.764706 |
7a8f9fda09004030cc2c8b33de4dfe7521550783 | 261 | py | Python | backend/config/settings/environments/__init__.py | offurface/logistic-company | 1e98b1191fd9ee63fbd9d6c2eef1354822e53d14 | [
"MIT"
] | null | null | null | backend/config/settings/environments/__init__.py | offurface/logistic-company | 1e98b1191fd9ee63fbd9d6c2eef1354822e53d14 | [
"MIT"
] | null | null | null | backend/config/settings/environments/__init__.py | offurface/logistic-company | 1e98b1191fd9ee63fbd9d6c2eef1354822e53d14 | [
"MIT"
] | null | null | null | from .common import *
from ..components import env
if DEBUG:
SECRET_KEY = env('SECRET_KEY', default='-qf)o7hs$jk@b8o)zidroo9wskuf^95m2$@k)5^@hl-=)349-7')
from .development import *
else:
SECRET_KEY = env('SECRET_KEY')
from .production import *
| 26.1 | 96 | 0.685824 |
7a91c1b9651492ee7c9426b0fcd2c1c972c0dcc4 | 7,034 | py | Python | rudderthralloc/forcealloc.py | kplindegaard/pycs2 | a21a9b9403b84601e889bf253b85b11659ea5896 | [
"BSD-2-Clause"
] | 2 | 2021-04-21T01:53:11.000Z | 2022-03-21T10:05:23.000Z | rudderthralloc/forcealloc.py | kplindegaard/pycs2 | a21a9b9403b84601e889bf253b85b11659ea5896 | [
"BSD-2-Clause"
] | null | null | null | rudderthralloc/forcealloc.py | kplindegaard/pycs2 | a21a9b9403b84601e889bf253b85b11659ea5896 | [
"BSD-2-Clause"
] | 1 | 2020-09-16T03:47:12.000Z | 2020-09-16T03:47:12.000Z | """ forcealloc.py - Map commanded thrust to generalized, cartesian forces """
# BSD 2-Clause License
#
# Copyright (c) 2001-2017, Karl-Petter Lindegaard
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | 33.495238 | 95 | 0.565254 |
7a9363b2cf078e6aa15dc4babf04d9305d0349df | 158 | py | Python | pygamebook/SourceCode_PyGame/User Defined Functions/trivialfunction.py | satrapade/sofia | f8903eb48a88eb9575823b4fe9f61435b882cdd4 | [
"MIT"
] | null | null | null | pygamebook/SourceCode_PyGame/User Defined Functions/trivialfunction.py | satrapade/sofia | f8903eb48a88eb9575823b4fe9f61435b882cdd4 | [
"MIT"
] | 9 | 2018-06-18T11:17:44.000Z | 2018-06-19T21:00:48.000Z | pygamebook/SourceCode_PyGame/User Defined Functions/trivialfunction.py | satrapade/sofia | f8903eb48a88eb9575823b4fe9f61435b882cdd4 | [
"MIT"
] | null | null | null | #!/usr/bin/python
print add(10, 5)
print add('sloan ', 'kelly')
print add(3.14, 1.61)
print add((1,2,3), (4,5,6)) | 15.8 | 28 | 0.613924 |
7a958e3eba071c4fbf127852dcb80e42dd73f774 | 3,982 | py | Python | docly/logic/logic_main.py | autosoft-dev/docly | 0bd6216b8a9735e9fa76bffd4ffea6cec6cc4a01 | [
"MIT"
] | 29 | 2020-12-31T08:27:32.000Z | 2022-02-15T08:48:51.000Z | docly/logic/logic_main.py | autosoft-dev/docly | 0bd6216b8a9735e9fa76bffd4ffea6cec6cc4a01 | [
"MIT"
] | 4 | 2020-12-30T18:18:54.000Z | 2021-08-03T14:42:35.000Z | docly/logic/logic_main.py | autosoft-dev/docly | 0bd6216b8a9735e9fa76bffd4ffea6cec6cc4a01 | [
"MIT"
] | 2 | 2022-01-04T17:58:22.000Z | 2022-02-05T13:04:14.000Z | import os
import sys
from io import open
import numpy as np
import torch
import torch.nn as nn
from .example import make_example, make_new_example
from .input_features import convert_examples_to_features
from torch.utils.data import DataLoader, Dataset, SequentialSampler, TensorDataset
from transformers import (WEIG... | 35.553571 | 112 | 0.659719 |
7a975bde69531b07d4ebbabad0e38aa1e1ed2b20 | 268 | py | Python | app.py | zhoujiahua/TaskTool | ba8e359be0d016f0e14a5ac5671ce926945bf21e | [
"MIT"
] | null | null | null | app.py | zhoujiahua/TaskTool | ba8e359be0d016f0e14a5ac5671ce926945bf21e | [
"MIT"
] | null | null | null | app.py | zhoujiahua/TaskTool | ba8e359be0d016f0e14a5ac5671ce926945bf21e | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: UTF-8 -*-
from flask import Flask
from common.BaseClass import Student
app = Flask(__name__)
if __name__ == '__main__':
app.run()
| 14.105263 | 36 | 0.645522 |
7a9a676c31323b69b36cedbc893b0b6545cf2acc | 3,228 | py | Python | dae/dae/annotation/tools/frequency_annotator.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | null | null | null | dae/dae/annotation/tools/frequency_annotator.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | 82 | 2019-07-22T11:44:23.000Z | 2022-01-13T15:27:33.000Z | dae/dae/annotation/tools/frequency_annotator.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import logging
from os.path import basename
from dae.variants.attributes import VariantType
from dae.annotation.tools.score_annotator import VariantScoreAnnotatorBase
logger = logging.getLogger(__name__)
| 38.428571 | 79 | 0.615242 |
7a9b8a645daeb7f2e4e7bf60b47320308bca2fef | 6,101 | py | Python | twitcher/inotify.py | liquidgecka/twitcher | a0a12106f7210b4ee46c01847cba47cb5e4032bb | [
"Apache-2.0"
] | 1 | 2015-03-30T07:56:12.000Z | 2015-03-30T07:56:12.000Z | twitcher/inotify.py | liquidgecka/twitcher | a0a12106f7210b4ee46c01847cba47cb5e4032bb | [
"Apache-2.0"
] | null | null | null | twitcher/inotify.py | liquidgecka/twitcher | a0a12106f7210b4ee46c01847cba47cb5e4032bb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python26
"""Watches a list of directories for file updates.
The classes in this module will watch a list of subdirectories for file
updates. A class is passed in at object initialization time and is used to
create objects as new files are discovered. If a file is updated then the
reload() function on that... | 33.521978 | 79 | 0.677758 |
7a9dbb50b13d01bd1c12413cedbd4dd221c63516 | 106 | py | Python | tests/__init__.py | pythoncatcoder/go.py | 2fe83bbeac4190770678e3cf9df0a908b61be08d | [
"MIT"
] | 34 | 2015-05-25T05:24:17.000Z | 2022-01-18T08:49:46.000Z | tests/__init__.py | pythoncatcoder/go.py | 2fe83bbeac4190770678e3cf9df0a908b61be08d | [
"MIT"
] | 1 | 2019-12-14T20:31:20.000Z | 2019-12-17T02:30:53.000Z | tests/__init__.py | pythoncatcoder/go.py | 2fe83bbeac4190770678e3cf9df0a908b61be08d | [
"MIT"
] | 18 | 2015-01-15T19:14:32.000Z | 2021-05-17T23:09:54.000Z | from .location_test import *
from .array_test import *
from .view_test import *
from .board_test import *
| 21.2 | 28 | 0.773585 |
7aa2ecacc1b4edd27824ab28d2f199ab480f960d | 141 | py | Python | thirvusoft/thirvusoft/doctype/ts_payroll/test_ts_payroll.py | SaraneshThirvu/Script_Report | 5af8f4d3dc32ead2b124f10c55040d49a21ebb5d | [
"MIT"
] | null | null | null | thirvusoft/thirvusoft/doctype/ts_payroll/test_ts_payroll.py | SaraneshThirvu/Script_Report | 5af8f4d3dc32ead2b124f10c55040d49a21ebb5d | [
"MIT"
] | null | null | null | thirvusoft/thirvusoft/doctype/ts_payroll/test_ts_payroll.py | SaraneshThirvu/Script_Report | 5af8f4d3dc32ead2b124f10c55040d49a21ebb5d | [
"MIT"
] | null | null | null | # Copyright (c) 2021, TS and Contributors
# See license.txt
# import frappe
import unittest
| 15.666667 | 41 | 0.77305 |
7aa3477bd6ed541a43bdde0d7bf39d526c22e133 | 646 | py | Python | 01/116.py | shuowangphd/lcpy | 18e11bf7ca77acacadeeef93bf6b7f1667eae2cd | [
"MIT"
] | null | null | null | 01/116.py | shuowangphd/lcpy | 18e11bf7ca77acacadeeef93bf6b7f1667eae2cd | [
"MIT"
] | null | null | null | 01/116.py | shuowangphd/lcpy | 18e11bf7ca77acacadeeef93bf6b7f1667eae2cd | [
"MIT"
] | null | null | null | """
# Definition for a Node.
class Node:
def __init__(self, val: int = 0, left: 'Node' = None, right: 'Node' = None, next: 'Node' = None):
self.val = val
self.left = left
self.right = right
self.next = next
""" | 29.363636 | 101 | 0.520124 |
7aa4fa934c1256120ad178cb78b93a531007672d | 821 | py | Python | data/signals/rel_coords.py | TYSSSY/Apb-gcn | b7c9324d3ef3baafa2fe85d57fc1f81f24e0b1e7 | [
"MIT"
] | null | null | null | data/signals/rel_coords.py | TYSSSY/Apb-gcn | b7c9324d3ef3baafa2fe85d57fc1f81f24e0b1e7 | [
"MIT"
] | 1 | 2020-10-30T02:01:39.000Z | 2020-10-30T02:01:39.000Z | data/signals/rel_coords.py | TYSSSY/Apb-gcn | b7c9324d3ef3baafa2fe85d57fc1f81f24e0b1e7 | [
"MIT"
] | null | null | null | import numpy as np
| 31.576923 | 88 | 0.5676 |
7aa5f484404f8770edc1499119077e82dbc3d9e3 | 4,774 | py | Python | src/preprocess_librosa.py | Un-bias/musicnn-training | c7aa67bd1641592fcf43467c37db01b553dd4e5c | [
"0BSD"
] | 41 | 2019-07-24T07:11:53.000Z | 2022-03-28T13:42:34.000Z | src/preprocess_librosa.py | Un-bias/musicnn-training | c7aa67bd1641592fcf43467c37db01b553dd4e5c | [
"0BSD"
] | 3 | 2020-05-04T13:17:58.000Z | 2020-11-14T14:37:06.000Z | src/preprocess_librosa.py | Un-bias/musicnn-training | c7aa67bd1641592fcf43467c37db01b553dd4e5c | [
"0BSD"
] | 13 | 2019-08-19T15:52:00.000Z | 2021-03-22T02:36:33.000Z | import os
import librosa
from joblib import Parallel, delayed
import json
import config_file
import argparse
import pickle
import numpy as np
from pathlib import Path
DEBUG = False
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('configurationID', help='ID of the configur... | 42.247788 | 139 | 0.651445 |
7aa642c92098c5cae5a9ed0435a274be4705e211 | 245 | py | Python | Lista09/ex013.py | Guilherme-Schwann/Listas-de-Exercicios-UFV-CCF-110 | f306c8dc6385ee8c9580e687afa16a49ace68f95 | [
"MIT"
] | 2 | 2021-09-05T22:29:33.000Z | 2021-09-09T00:13:16.000Z | Lista09/ex013.py | Guilherme-Schwann/Listas-de-Exercicios-UFV-CCF-110 | f306c8dc6385ee8c9580e687afa16a49ace68f95 | [
"MIT"
] | null | null | null | Lista09/ex013.py | Guilherme-Schwann/Listas-de-Exercicios-UFV-CCF-110 | f306c8dc6385ee8c9580e687afa16a49ace68f95 | [
"MIT"
] | null | null | null | N = int(input('Ordem da matriz: '))
A = [[int(input()) for i in range(N)] for j in range(N)]
At = [[0 for i in range(N)] for j in range(N)]
for i in range(N):
for j in range(N):
At[i][j] = A[j][i]
for i in range(N):
print(At[i])
| 27.222222 | 56 | 0.542857 |
7aa67f347816a860d8954caac66621040cc0046d | 532 | py | Python | 45/45.py | cleamoon/ProjectEuler | 8d51ad089e5fa21c709161fc658f8c4b533a3ac3 | [
"MIT"
] | null | null | null | 45/45.py | cleamoon/ProjectEuler | 8d51ad089e5fa21c709161fc658f8c4b533a3ac3 | [
"MIT"
] | null | null | null | 45/45.py | cleamoon/ProjectEuler | 8d51ad089e5fa21c709161fc658f8c4b533a3ac3 | [
"MIT"
] | null | null | null | ltn = []
lpn = []
for i in range(1, 1000000):
t = 143 + i
p = 165 + i
ltn.append(t * (2 * t - 1))
lpn.append(p * (3 * p - 1) // 2)
for p in lpn:
if (bst(p)):
print(p)
break
| 18.344828 | 36 | 0.381579 |
7aa6a0eddaf3a04a78ac717238e95549001e1d08 | 2,508 | py | Python | tests/python/test_workitems.py | mdp/rpaframework | d427a3a4b9ea360780e449ece2674e275060310e | [
"Apache-2.0"
] | null | null | null | tests/python/test_workitems.py | mdp/rpaframework | d427a3a4b9ea360780e449ece2674e275060310e | [
"Apache-2.0"
] | null | null | null | tests/python/test_workitems.py | mdp/rpaframework | d427a3a4b9ea360780e449ece2674e275060310e | [
"Apache-2.0"
] | null | null | null | import copy
import pytest
from RPA.Robocloud.Items import BaseAdapter, Items
VALID_DATABASE = {
("test-ws", "test-item"): {"username": "testguy", "address": "guy@company.com"},
("test-ws", "second-item"): {"username": "another", "address": "dude@company.com"},
}
def test_no_env(monkeypatch):
monkeypat... | 27.56044 | 87 | 0.702153 |
7aa74729651c5f6bb13c86b7a22664c4c8570ee6 | 7,418 | py | Python | seq2seq/models/conv_seq2seq.py | gyy8426/TF_concaption | 7b3face47c96c885b2715605122328b7b6bef609 | [
"Apache-2.0"
] | 342 | 2017-06-23T12:47:32.000Z | 2021-12-06T06:56:15.000Z | seq2seq/models/conv_seq2seq.py | gyy8426/TF_concaption | 7b3face47c96c885b2715605122328b7b6bef609 | [
"Apache-2.0"
] | 26 | 2017-07-25T01:39:39.000Z | 2020-06-08T09:59:17.000Z | seq2seq/models/conv_seq2seq.py | gyy8426/TF_concaption | 7b3face47c96c885b2715605122328b7b6bef609 | [
"Apache-2.0"
] | 123 | 2017-06-25T16:02:37.000Z | 2020-07-08T08:14:11.000Z | # Copyright 2017 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 writing,... | 40.758242 | 181 | 0.685495 |
7aa756bb5b3c685c48a483ea6ad71265f7bd863f | 6,090 | py | Python | tools/hacking.py | bopopescu/deb-openstack-nova | d80d110fa1a7d781a2ed23138b037bcc3db7a441 | [
"Apache-2.0"
] | 1 | 2015-07-15T08:51:16.000Z | 2015-07-15T08:51:16.000Z | tools/hacking.py | eneabio/nova | 535e8b9c3c5354187ff6cba1bacdc52b949eff8c | [
"Apache-2.0"
] | null | null | null | tools/hacking.py | eneabio/nova | 535e8b9c3c5354187ff6cba1bacdc52b949eff8c | [
"Apache-2.0"
] | 2 | 2019-06-12T00:52:15.000Z | 2020-07-24T10:35:29.000Z | #!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2012, Cloudscaling
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# ... | 31.071429 | 79 | 0.612972 |
7aac8956f007f10c83a2012e4e3af7ab31bb2c4c | 12,374 | py | Python | src/approach/finetuning.py | tunglamlqddb/DFKD | 924220a81d2a08bf07e50d86028e04899248d17b | [
"MIT"
] | null | null | null | src/approach/finetuning.py | tunglamlqddb/DFKD | 924220a81d2a08bf07e50d86028e04899248d17b | [
"MIT"
] | null | null | null | src/approach/finetuning.py | tunglamlqddb/DFKD | 924220a81d2a08bf07e50d86028e04899248d17b | [
"MIT"
] | null | null | null | import torch, warnings
import torch.nn.functional as F
import torch.nn as nn
import numpy as np
from argparse import ArgumentParser
from .incremental_learning import Inc_Learning_Appr
from datasets.exemplars_dataset import ExemplarsDataset
def pre_train_process(self, t, trn_loader):
"""Runs before train... | 47.409962 | 223 | 0.601422 |
7aaca2e7fcf2fade3456711cd8963f5e6c2b9c4d | 234 | py | Python | src/create_flask_app/api/app/some_blueprint/routes.py | isakal/create_flask_app | 6ff35f6d1d670b20a4fa7d3aa2f441125b7aecde | [
"MIT"
] | 17 | 2019-12-18T12:41:35.000Z | 2022-03-17T22:38:12.000Z | src/create_flask_app/api/app/some_blueprint/routes.py | isakal/create_flask_app | 6ff35f6d1d670b20a4fa7d3aa2f441125b7aecde | [
"MIT"
] | 2 | 2020-03-15T11:17:05.000Z | 2021-01-26T23:07:46.000Z | src/create_flask_app/api/app/some_blueprint/routes.py | isakal/create_flask_app | 6ff35f6d1d670b20a4fa7d3aa2f441125b7aecde | [
"MIT"
] | 6 | 2020-06-09T14:36:54.000Z | 2022-03-17T22:13:53.000Z | from flask import Blueprint, jsonify
api = Blueprint('api', __name__)
| 15.6 | 37 | 0.611111 |
7aacb536ae303f634a3016d2c8edb89930e0c942 | 11,609 | py | Python | SMA/lab_simfleet/simfleet/mystrategy.py | jiwidi/MIARFID | 979eda45fc18a4816ef65d33b1423a6d63176c04 | [
"MIT"
] | null | null | null | SMA/lab_simfleet/simfleet/mystrategy.py | jiwidi/MIARFID | 979eda45fc18a4816ef65d33b1423a6d63176c04 | [
"MIT"
] | null | null | null | SMA/lab_simfleet/simfleet/mystrategy.py | jiwidi/MIARFID | 979eda45fc18a4816ef65d33b1423a6d63176c04 | [
"MIT"
] | null | null | null | import json
import random
from loguru import logger
from simfleet.customer import CustomerStrategyBehaviour
from simfleet.fleetmanager import FleetManagerStrategyBehaviour
from simfleet.helpers import PathRequestException, distance_in_meters
from simfleet.protocol import (
REQUEST_PERFORMATIVE,
ACCEPT_PERFORM... | 41.909747 | 111 | 0.484193 |
7aae2bd347ba3adf533cbcf9523c93ef01c1feee | 540 | py | Python | git_plan/util/unix.py | synek/git-plan | 4cf5429348a71fb5ea8110272fb89d20bfa38c38 | [
"MIT"
] | 163 | 2021-03-06T12:01:06.000Z | 2022-03-01T22:52:36.000Z | git_plan/util/unix.py | synek/git-plan | 4cf5429348a71fb5ea8110272fb89d20bfa38c38 | [
"MIT"
] | 61 | 2021-03-06T07:00:39.000Z | 2021-04-13T10:25:58.000Z | git_plan/util/unix.py | synek/git-plan | 4cf5429348a71fb5ea8110272fb89d20bfa38c38 | [
"MIT"
] | 9 | 2021-03-07T17:52:57.000Z | 2021-10-18T21:35:23.000Z | """Unix utilities
Author Rory Byrne <rory@rory.bio>
"""
from shutil import which
import subprocess
from typing import List, Optional
def is_installed(name: str) -> bool:
"""Check whether `name` is on PATH and marked as executable."""
return which(name) is not None
def run_command(cmd: List[str], capture_ou... | 24.545455 | 78 | 0.701852 |
7aae61521064121971fd3e6425db3ee10c5c8792 | 655 | py | Python | Excel Export API/validateUser.py | N4N0CH1P/Proyecto-Android | d2e09fe1d8766ff4369154038fe08d28d2c472b5 | [
"Apache-2.0"
] | null | null | null | Excel Export API/validateUser.py | N4N0CH1P/Proyecto-Android | d2e09fe1d8766ff4369154038fe08d28d2c472b5 | [
"Apache-2.0"
] | 18 | 2019-04-23T16:00:34.000Z | 2019-05-20T12:35:16.000Z | Excel Export API/validateUser.py | N4N0CH1P/Proyecto-Android | d2e09fe1d8766ff4369154038fe08d28d2c472b5 | [
"Apache-2.0"
] | 2 | 2019-04-29T16:22:01.000Z | 2020-11-22T06:08:38.000Z | import mysql_config as mysql
#Funcion para validar usuario
| 38.529412 | 94 | 0.716031 |
7ab152d88bdfe1c7ddd598bc9ed02543b5951c4d | 1,582 | py | Python | Chapter07/cell_counting.py | giulic3/DeepLearningLifeSciences | 20b4b2eeff421d331722637899845e4c9a4a52a6 | [
"MIT"
] | 1 | 2020-04-06T04:17:27.000Z | 2020-04-06T04:17:27.000Z | Chapter07/cell_counting.py | joe-nano/DeepLearningLifeSciences | 258066f904159a7c1c81aba16e74ae4e6b4263b5 | [
"MIT"
] | null | null | null | Chapter07/cell_counting.py | joe-nano/DeepLearningLifeSciences | 258066f904159a7c1c81aba16e74ae4e6b4263b5 | [
"MIT"
] | 1 | 2020-02-16T23:43:16.000Z | 2020-02-16T23:43:16.000Z | import deepchem as dc
import deepchem.models.tensorgraph.layers as layers
import numpy as np
import os
import re
RETRAIN = False
# Load the datasets.
image_dir = 'BBBC005_v1_images'
files = []
labels = []
for f in os.listdir(image_dir):
if f.endswith('.TIF'):
files.append(os.path.join(image_dir, f))
labels.... | 32.285714 | 95 | 0.747155 |
7ab161405dab5a9d19625915f984dc3130fe9f36 | 2,428 | py | Python | fn_playbook_utils/fn_playbook_utils/components/funct_pb_get_playbook_data.py | nickpartner-goahead/resilient-community-apps | 097c0dbefddbd221b31149d82af9809420498134 | [
"MIT"
] | 65 | 2017-12-04T13:58:32.000Z | 2022-03-24T18:33:17.000Z | fn_playbook_utils/fn_playbook_utils/components/funct_pb_get_playbook_data.py | nickpartner-goahead/resilient-community-apps | 097c0dbefddbd221b31149d82af9809420498134 | [
"MIT"
] | 48 | 2018-03-02T19:17:14.000Z | 2022-03-09T22:00:38.000Z | fn_playbook_utils/fn_playbook_utils/components/funct_pb_get_playbook_data.py | nickpartner-goahead/resilient-community-apps | 097c0dbefddbd221b31149d82af9809420498134 | [
"MIT"
] | 95 | 2018-01-11T16:23:39.000Z | 2022-03-21T11:34:29.000Z | # -*- coding: utf-8 -*-
#(c) Copyright IBM Corp. 2010, 2021. All Rights Reserved.
#pragma pylint: disable=unused-argument, no-self-use, line-too-long
"""AppFunction implementation"""
from cachetools import cached, TTLCache
from resilient_circuits import AppFunctionComponent, app_function, FunctionResult
from fn_playbo... | 36.787879 | 99 | 0.66598 |
7ab3b78ef740ec202ef067979278dcabfb3ae5f2 | 1,274 | py | Python | ezdisteach/lib/imscc/imsccfilebuilder.py | call-learning/ez-disteach | 7636dfdbfb709769824266800ebba18be764ecc3 | [
"MIT"
] | null | null | null | ezdisteach/lib/imscc/imsccfilebuilder.py | call-learning/ez-disteach | 7636dfdbfb709769824266800ebba18be764ecc3 | [
"MIT"
] | null | null | null | ezdisteach/lib/imscc/imsccfilebuilder.py | call-learning/ez-disteach | 7636dfdbfb709769824266800ebba18be764ecc3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
IMSCC File Builder
Produce an lxml entity ready to convert to text
"""
import io
| 24.5 | 106 | 0.681319 |
7ab7e1f1b7a93fea789add2b69980d7060a7ac0c | 648 | py | Python | tests/integration/test_multipart.py | yyolk/uplink | c0733e3577cc7539be8ca39d3783c87ebe6410b7 | [
"MIT"
] | 918 | 2017-10-20T10:47:40.000Z | 2022-03-27T19:10:21.000Z | tests/integration/test_multipart.py | yyolk/uplink | c0733e3577cc7539be8ca39d3783c87ebe6410b7 | [
"MIT"
] | 248 | 2017-10-20T03:58:20.000Z | 2022-03-13T18:39:16.000Z | tests/integration/test_multipart.py | yyolk/uplink | c0733e3577cc7539be8ca39d3783c87ebe6410b7 | [
"MIT"
] | 66 | 2017-10-21T02:56:34.000Z | 2022-02-15T08:27:50.000Z | # Local imports
from uplink import Consumer, PartMap, post, multipart
# Constants
BASE_URL = "https://example.com/"
| 25.92 | 62 | 0.694444 |
7ab7f304cf92455bd030e34fb9b57d32e2f4394e | 1,864 | py | Python | Amazone/Android_Phone_Price.py | anivalogy/Web_Scraping | 9431ee434e9c19adcf45d185065625608755acc4 | [
"Apache-2.0"
] | 1 | 2020-11-10T11:30:07.000Z | 2020-11-10T11:30:07.000Z | Amazone/Android_Phone_Price.py | anivalogy/Web_Scraping | 9431ee434e9c19adcf45d185065625608755acc4 | [
"Apache-2.0"
] | null | null | null | Amazone/Android_Phone_Price.py | anivalogy/Web_Scraping | 9431ee434e9c19adcf45d185065625608755acc4 | [
"Apache-2.0"
] | 1 | 2020-12-24T12:25:40.000Z | 2020-12-24T12:25:40.000Z | import csv
from bs4 import BeautifulSoup
from selenium import webdriver
import csv
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver import Chrome
print(main('android phone'))
| 24.207792 | 111 | 0.624464 |
7ab8408954f6215140e2f66ce3a023038a830391 | 25,995 | py | Python | Assembly Files/edd project modules/extra/world/original - Copy/unknown.py | Pranesh6767/E_tax_with_MySQL | 104c7f57c569938439c35f42706edbd575181d34 | [
"MIT"
] | 1 | 2020-10-15T09:09:24.000Z | 2020-10-15T09:09:24.000Z | Assembly Files/edd project modules/extra/world/original - Copy/unknown.py | Pranesh6767/E_tax_with_MySQL | 104c7f57c569938439c35f42706edbd575181d34 | [
"MIT"
] | null | null | null | Assembly Files/edd project modules/extra/world/original - Copy/unknown.py | Pranesh6767/E_tax_with_MySQL | 104c7f57c569938439c35f42706edbd575181d34 | [
"MIT"
] | 2 | 2020-10-01T20:56:05.000Z | 2021-09-22T06:38:36.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# GUI module generated by PAGE version 4.21
# in conjunction with Tcl version 8.6
# Apr 22, 2019 01:28:38 AM +0530 platform: Windows NT
import sys
try:
import Tkinter as tk
except ImportError:
import tkinter as tk
try:
import ttk
... | 46.172291 | 98 | 0.64874 |
7ab8479693143f8c93f4e4b1bf7ece0d1eb036d2 | 658 | py | Python | construct-binary-search-tree-from-preorder-traversal/construct-binary-search-tree-from-preorder-traversal.py | Atri10/Leet-code---Atri_Patel | 49fc59b9147a44ab04a66128fbb2ef259b5f7b7c | [
"MIT"
] | 1 | 2021-10-10T20:21:18.000Z | 2021-10-10T20:21:18.000Z | construct-binary-search-tree-from-preorder-traversal/construct-binary-search-tree-from-preorder-traversal.py | Atri10/Leet-code---Atri_Patel | 49fc59b9147a44ab04a66128fbb2ef259b5f7b7c | [
"MIT"
] | null | null | null | construct-binary-search-tree-from-preorder-traversal/construct-binary-search-tree-from-preorder-traversal.py | Atri10/Leet-code---Atri_Patel | 49fc59b9147a44ab04a66128fbb2ef259b5f7b7c | [
"MIT"
] | null | null | null | # Definition for a binary tree node. | 31.333333 | 73 | 0.550152 |
7ab93f465042b5cca276e73a401edc8f8be4aec0 | 4,113 | py | Python | aimsprop/xyz.py | mtzgroup/aimsprop | 464d88ad7a817da73027fd2ab7b12476bf59f83d | [
"MIT"
] | 1 | 2022-03-28T13:11:56.000Z | 2022-03-28T13:11:56.000Z | aimsprop/xyz.py | mtzgroup/aimsprop | 464d88ad7a817da73027fd2ab7b12476bf59f83d | [
"MIT"
] | 11 | 2021-03-17T17:53:58.000Z | 2021-07-17T17:59:25.000Z | aimsprop/xyz.py | mtzgroup/aimsprop | 464d88ad7a817da73027fd2ab7b12476bf59f83d | [
"MIT"
] | 2 | 2021-04-05T08:36:35.000Z | 2021-05-20T22:12:12.000Z | import os
import re
import numpy as np
from . import atom_data, bundle
# TODO: Maybe should be in atom data
_N_table = {val: key for key, val in list(atom_data.atom_symbol_table.items())}
def parse_xyz(
filename: str,
label=1,
w=1.0,
I=1,
t0=0.0,
dt=20.0,
ts=None,
N_table=None,
) ->... | 30.021898 | 84 | 0.540968 |
7ab9500cd5c1495d990ceec333363832a2cb723e | 745 | py | Python | src/wafec/fi/hypothesis/models/test_parameter.py | wafec/wafec-fi-hypothesis | e74fea0eb5da39e8f26973fa577dc4515317150c | [
"MIT"
] | null | null | null | src/wafec/fi/hypothesis/models/test_parameter.py | wafec/wafec-fi-hypothesis | e74fea0eb5da39e8f26973fa577dc4515317150c | [
"MIT"
] | null | null | null | src/wafec/fi/hypothesis/models/test_parameter.py | wafec/wafec-fi-hypothesis | e74fea0eb5da39e8f26973fa577dc4515317150c | [
"MIT"
] | null | null | null | from sqlalchemy import *
from sqlalchemy.orm import relationship
from . import Base
| 35.47619 | 88 | 0.759732 |
7abd3d620eef1318489c51e350759a7e9fd53d7a | 1,481 | py | Python | hack/merge_cluster_roles.py | philips/cluster-monitoring-operator | e3d89785ebd70b369e8b9b4a1d8cfe93d3354731 | [
"Apache-2.0"
] | null | null | null | hack/merge_cluster_roles.py | philips/cluster-monitoring-operator | e3d89785ebd70b369e8b9b4a1d8cfe93d3354731 | [
"Apache-2.0"
] | 2 | 2018-08-13T11:46:13.000Z | 2018-08-13T12:47:12.000Z | hack/merge_cluster_roles.py | philips/cluster-monitoring-operator | e3d89785ebd70b369e8b9b4a1d8cfe93d3354731 | [
"Apache-2.0"
] | 2 | 2018-09-09T19:03:40.000Z | 2020-01-08T22:24:43.000Z | #!/usr/bin/python
""" merge_cluster_roles.py - merge OpenShift cluster roles into one """
# Copyright (c) 2018 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.ap... | 30.854167 | 74 | 0.667792 |
7abe0503f9560abe292475ee88102fdcd3ba34ab | 7,005 | py | Python | internationalflavor/timezone/data.py | MounirMesselmeni/django-internationalflavor | 30ea407fc9972243ea45f45c1ce09d5d17961730 | [
"BSD-3-Clause"
] | 22 | 2015-02-09T11:01:56.000Z | 2021-07-02T23:34:56.000Z | internationalflavor/timezone/data.py | MounirMesselmeni/django-internationalflavor | 30ea407fc9972243ea45f45c1ce09d5d17961730 | [
"BSD-3-Clause"
] | 19 | 2015-02-09T11:04:09.000Z | 2021-11-26T08:07:44.000Z | internationalflavor/timezone/data.py | MounirMesselmeni/django-internationalflavor | 30ea407fc9972243ea45f45c1ce09d5d17961730 | [
"BSD-3-Clause"
] | 18 | 2015-04-16T08:39:38.000Z | 2021-07-08T08:07:41.000Z | import datetime
from django.core.exceptions import ImproperlyConfigured
from django.utils.encoding import force_text
from django.utils.functional import lazy
from django.utils.translation import gettext_lazy as _, gettext
import itertools
from internationalflavor.timezone._cldr_data import TIMEZONE_NAMES, METAZONE_NAM... | 39.801136 | 118 | 0.698644 |
7abe131a7498f3f282bb4ace852b76791ac312e6 | 10,520 | py | Python | kinto/core/resource/schema.py | hafeez3000/kinto | 2b741cf3f34dbb532b595caa4dbb9de2a991938d | [
"Apache-2.0"
] | null | null | null | kinto/core/resource/schema.py | hafeez3000/kinto | 2b741cf3f34dbb532b595caa4dbb9de2a991938d | [
"Apache-2.0"
] | null | null | null | kinto/core/resource/schema.py | hafeez3000/kinto | 2b741cf3f34dbb532b595caa4dbb9de2a991938d | [
"Apache-2.0"
] | null | null | null | import six
import colander
from colander import SchemaNode, String
from kinto.core.utils import strip_whitespace, msec_time, decode_header, native_value
class PermissionsSchema(colander.SchemaNode):
"""A permission mapping defines ACEs.
It has permission names as keys and principals as values.
::
... | 33.18612 | 87 | 0.656084 |
7abefe6d36851192eaf9f176b148fc64e01f2ed3 | 156 | py | Python | nets/__init__.py | zhuofalin/Pytorch_Mask_R-CNN | c940fb0f238cf75dca9e90c3f4433adee42650af | [
"Apache-2.0"
] | 2 | 2022-01-11T16:18:26.000Z | 2022-01-23T05:56:42.000Z | utils/__init__.py | zhuofalin/Pytorch_Mask_R-CNN | c940fb0f238cf75dca9e90c3f4433adee42650af | [
"Apache-2.0"
] | null | null | null | utils/__init__.py | zhuofalin/Pytorch_Mask_R-CNN | c940fb0f238cf75dca9e90c3f4433adee42650af | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project mask_rcnn_pytorch
@File __init__.py.py
@Author zhuofalin
@Date 2021/11/24 21:18
'''
| 17.333333 | 28 | 0.615385 |
7ac2453ef253d20470030f8d8112f23a1f877440 | 1,366 | py | Python | sloth-scratch.py | xer0-1ne/sloth-scratch | 1d81ffe65ff7d72fcc766a6ba025366a3319a838 | [
"MIT"
] | null | null | null | sloth-scratch.py | xer0-1ne/sloth-scratch | 1d81ffe65ff7d72fcc766a6ba025366a3319a838 | [
"MIT"
] | null | null | null | sloth-scratch.py | xer0-1ne/sloth-scratch | 1d81ffe65ff7d72fcc766a6ba025366a3319a838 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import json
from assets.lib.bottle import route, run, static_file, response, request, redirect
#get default routes for files/paths
#route index as default page
#return json object
run(host='localhost', port=8080, debug=True, reloader=True)
| 25.296296 | 82 | 0.666911 |
8f816a322098d1a1e68d37250e949dfedc9e5d44 | 2,569 | py | Python | neighbour/views.py | Eccie-K/neighbour-hood | f874f9468160aa34dee294d685374e4c5e2eec4d | [
"MIT"
] | null | null | null | neighbour/views.py | Eccie-K/neighbour-hood | f874f9468160aa34dee294d685374e4c5e2eec4d | [
"MIT"
] | 4 | 2020-06-05T23:21:40.000Z | 2021-06-10T21:57:32.000Z | neighbour/views.py | Eccie-K/neighbour-hood | f874f9468160aa34dee294d685374e4c5e2eec4d | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from django.http import HttpResponse
from django.contrib.auth import login, authenticate
from django.contrib.auth.decorators import login_required
from .forms import SignupForm, HoodForm, UserProfileUpdateForm, UserUpdateForm
from .models import *
from django.core.urlresol... | 30.223529 | 79 | 0.657844 |
8f81ac36d9e586a2803a67107baad029f84be150 | 2,636 | py | Python | isitfit/dotMan.py | autofitcloud/isitf | 6ffc0c67c00140120f5d5ad8dfe11c8f0f7dacc1 | [
"Apache-2.0"
] | 82 | 2019-09-04T17:39:10.000Z | 2021-08-10T14:59:18.000Z | isitfit/dotMan.py | autofitcloud/isitf | 6ffc0c67c00140120f5d5ad8dfe11c8f0f7dacc1 | [
"Apache-2.0"
] | 11 | 2019-09-10T03:54:19.000Z | 2020-02-21T22:58:44.000Z | isitfit/dotMan.py | autofitcloud/isitf | 6ffc0c67c00140120f5d5ad8dfe11c8f0f7dacc1 | [
"Apache-2.0"
] | 9 | 2019-09-13T15:57:42.000Z | 2021-02-13T15:56:40.000Z | import os
import os
| 24.407407 | 74 | 0.646434 |
8f865163bfbe4b0bc8d900996f2290d3bae441c0 | 437 | py | Python | workflows/base/interaction_views.py | xflows/clowdflows | 697b36ebc976d1ba4ab726bda2fc4593422af080 | [
"MIT"
] | 38 | 2015-11-21T08:16:14.000Z | 2021-06-22T16:14:12.000Z | workflows/base/interaction_views.py | chimeng089/clowdflows | e19bf57906e893d8f0be93329168b76eae758384 | [
"MIT"
] | 21 | 2017-04-05T08:03:54.000Z | 2022-03-11T23:16:03.000Z | workflows/base/interaction_views.py | chimeng089/clowdflows | e19bf57906e893d8f0be93329168b76eae758384 | [
"MIT"
] | 26 | 2016-01-11T17:51:07.000Z | 2022-02-24T11:49:40.000Z | import json
from django.shortcuts import render
| 36.416667 | 102 | 0.695652 |
8f8686c5c30243fe1085ef5f1ba45de06bb5c4cd | 928 | py | Python | jira_devops/release_notes/settings.py | clutcher/jira_devops | 61360f3fa9bd9b402d752dde84b3cf486245879e | [
"MIT"
] | null | null | null | jira_devops/release_notes/settings.py | clutcher/jira_devops | 61360f3fa9bd9b402d752dde84b3cf486245879e | [
"MIT"
] | null | null | null | jira_devops/release_notes/settings.py | clutcher/jira_devops | 61360f3fa9bd9b402d752dde84b3cf486245879e | [
"MIT"
] | null | null | null | import os
from django.apps import AppConfig
| 29.935484 | 119 | 0.690733 |
8f87de0150456c3cf0ea3b4c1fd2d4de2903f22e | 1,888 | py | Python | app/auth.py | alexisthethe/quickrun-fastapi | d2c8c2502d5eedf0e396dd9b78df0820b26a24b0 | [
"MIT"
] | 1 | 2022-01-31T14:59:37.000Z | 2022-01-31T14:59:37.000Z | app/auth.py | alexisthethe/quickrun-fastapi | d2c8c2502d5eedf0e396dd9b78df0820b26a24b0 | [
"MIT"
] | null | null | null | app/auth.py | alexisthethe/quickrun-fastapi | d2c8c2502d5eedf0e396dd9b78df0820b26a24b0 | [
"MIT"
] | null | null | null | import logging
from datetime import datetime, timedelta
from typing import Optional
from fastapi import Depends
from fastapi.security import OAuth2PasswordBearer
from jose import JWTError, jwt
from passlib.context import CryptContext
from app import schemas
from app.config import settings
oauth2_scheme = OAuth2Passw... | 28.179104 | 79 | 0.695975 |
8f88225e95ec2579d2321422fdd57413d254306d | 3,581 | py | Python | azad/exp/alternatives/optuna_dqn2.py | CoAxLab/azad | d1498069dd8856e93ae077b34dd7c9f1c7ce80e6 | [
"MIT"
] | 6 | 2018-09-11T21:06:12.000Z | 2022-01-28T17:36:52.000Z | azad/exp/alternatives/optuna_dqn2.py | CoAxLab/azad | d1498069dd8856e93ae077b34dd7c9f1c7ce80e6 | [
"MIT"
] | null | null | null | azad/exp/alternatives/optuna_dqn2.py | CoAxLab/azad | d1498069dd8856e93ae077b34dd7c9f1c7ce80e6 | [
"MIT"
] | 2 | 2018-09-12T00:40:52.000Z | 2018-10-29T15:45:54.000Z | """Tune the dqn2 model of wythoff's using the opotune lib"""
import optuna
import fire
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.utils.data
from torchvision import datasets
from torchvision import transforms
from azad.exp.alternatives import wythoff_dq... | 29.113821 | 75 | 0.543144 |
8f8a00c79c4bc75d5fe1451c7619bf46e7178afd | 54,850 | py | Python | tests/sql/build_test.py | DataJunction/datajunction | d2293255bb7df0e5144c7e448a0ca2b590b6c20f | [
"MIT"
] | null | null | null | tests/sql/build_test.py | DataJunction/datajunction | d2293255bb7df0e5144c7e448a0ca2b590b6c20f | [
"MIT"
] | null | null | null | tests/sql/build_test.py | DataJunction/datajunction | d2293255bb7df0e5144c7e448a0ca2b590b6c20f | [
"MIT"
] | null | null | null | """
Tests for ``datajunction.sql.build``.
"""
# pylint: disable=invalid-name, too-many-lines, line-too-long
import datetime
import pytest
from pytest_mock import MockerFixture
from sqlalchemy.engine import create_engine
from sqlmodel import Session
from datajunction.models.column import Column
from datajunction.mode... | 31.023756 | 254 | 0.586472 |
8f8b794a3c57821e35ab3c5efd51b3bc2789f860 | 2,671 | py | Python | plugins/tff_backend/models/nodes.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/models/nodes.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/models/nodes.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 2 | 2018-01-10T10:43:12.000Z | 2018-03-18T10:42:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2018 GIG Technology NV
#
# 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... | 32.975309 | 98 | 0.706477 |
8f909cdae723994e554369978e6cc97f4a98602c | 172 | py | Python | BOJ/13000~13999/13800~13899/13877.py | shinkeonkim/today-ps | f3e5e38c5215f19579bb0422f303a9c18c626afa | [
"Apache-2.0"
] | 2 | 2020-01-29T06:54:41.000Z | 2021-11-07T13:23:27.000Z | BOJ/13000~13999/13800~13899/13877.py | shinkeonkim/Today_PS | bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44 | [
"Apache-2.0"
] | null | null | null | BOJ/13000~13999/13800~13899/13877.py | shinkeonkim/Today_PS | bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44 | [
"Apache-2.0"
] | null | null | null | for case in range(int(input())):
a,b = input().split()
k = False
try:
print(a,int(b,8),int(b),int(b,16))
except:
print(a,0,int(b),int(b,16)) | 24.571429 | 42 | 0.505814 |
8f90f912716a6632b2bcc2ac457c7c623545be22 | 869 | py | Python | gsplines/services/gsplinesjson.py | rafaelrojasmiliani/gsplines | 663b10f6d53b498a1e892d9eb32a345153de36d2 | [
"MIT"
] | 3 | 2021-08-28T01:42:40.000Z | 2021-12-02T22:39:45.000Z | gsplines/services/gsplinesjson.py | rafaelrojasmiliani/gsplines | 663b10f6d53b498a1e892d9eb32a345153de36d2 | [
"MIT"
] | null | null | null | gsplines/services/gsplinesjson.py | rafaelrojasmiliani/gsplines | 663b10f6d53b498a1e892d9eb32a345153de36d2 | [
"MIT"
] | null | null | null | from ..piecewisefunction.piecewisefunction import cPiecewiseFunction
import json
import numpy as np
import gsplines.basis
| 22.868421 | 68 | 0.665132 |
8f926ec70f17a27fd3a3870a6289f1a7f3c638c1 | 3,085 | py | Python | ovos_utils/waiting_for_mycroft/settings_gui_generator.py | forslund/ovos_utils | bfca2d9175b72b0d157385af07627aefcd280177 | [
"Apache-2.0"
] | 3 | 2021-11-10T11:46:05.000Z | 2022-03-06T01:59:51.000Z | ovos_utils/waiting_for_mycroft/settings_gui_generator.py | forslund/ovos_utils | bfca2d9175b72b0d157385af07627aefcd280177 | [
"Apache-2.0"
] | 5 | 2021-08-10T17:26:49.000Z | 2022-03-03T14:43:55.000Z | ovos_utils/waiting_for_mycroft/settings_gui_generator.py | forslund/ovos_utils | bfca2d9175b72b0d157385af07627aefcd280177 | [
"Apache-2.0"
] | 1 | 2021-11-19T09:31:07.000Z | 2021-11-19T09:31:07.000Z | # Copyright 2020 Mycroft AI 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 writin... | 33.901099 | 75 | 0.60778 |
8f931f9651c47e4b3678e1660beb74247dbc04c6 | 25,483 | py | Python | pysnmp/FD-SYSTEM-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/FD-SYSTEM-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/FD-SYSTEM-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 FD-SYSTEM-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/FD-SYSTEM-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:59:07 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 201... | 124.307317 | 3,032 | 0.727269 |
8f949563ac0e205ebc380e370afe4937e75dab84 | 2,690 | py | Python | blender/.blender/scripts/textplugin_templates.py | visnz/sketchfab_download | 976f667d5c2c2864b2bad65aceac0dab5ce51b74 | [
"Apache-2.0"
] | 41 | 2021-02-18T05:56:26.000Z | 2021-12-06T07:58:15.000Z | blender/.blender/scripts/textplugin_templates.py | visnz/sketchfab_download | 976f667d5c2c2864b2bad65aceac0dab5ce51b74 | [
"Apache-2.0"
] | 19 | 2021-02-18T05:59:03.000Z | 2022-01-13T01:00:52.000Z | blender/.blender/scripts/textplugin_templates.py | visnz/sketchfab_download | 976f667d5c2c2864b2bad65aceac0dab5ce51b74 | [
"Apache-2.0"
] | 18 | 2021-02-22T13:32:56.000Z | 2022-01-22T12:38:29.000Z | #!BPY
"""
Name: 'Template Completion | Tab'
Blender: 246
Group: 'TextPlugin'
Shortcut: 'Tab'
Tooltip: 'Completes templates based on the text preceding the cursor'
"""
# Only run if we have the required modules
try:
import bpy
from BPyTextPlugin import *
from Blender import Text
except ImportError:
OK = False
else:... | 21.693548 | 69 | 0.568773 |
8f94b300e2b34ff76f0d2873be32657ff67630be | 1,939 | py | Python | kive/file_access_utils.py | cfe-lab/Kive | e46b9eb40f085d579c12f47b6b5696d5ee93a9d3 | [
"BSD-3-Clause"
] | 2 | 2016-10-02T18:24:53.000Z | 2019-01-19T09:37:56.000Z | kive/file_access_utils.py | cfe-lab/Kive | e46b9eb40f085d579c12f47b6b5696d5ee93a9d3 | [
"BSD-3-Clause"
] | 1,190 | 2015-07-10T22:57:23.000Z | 2022-03-30T05:10:14.000Z | kive/file_access_utils.py | cfe-lab/Kive | e46b9eb40f085d579c12f47b6b5696d5ee93a9d3 | [
"BSD-3-Clause"
] | 2 | 2019-07-16T00:25:25.000Z | 2019-11-25T16:32:58.000Z | """
Basic file-checking functionality used by Kive.
"""
import hashlib
import mimetypes
import os
from contextlib import contextmanager
from django.http import FileResponse
def compute_md5(file_to_checksum, chunk_size=1024*64):
"""Computes MD5 checksum of specified file.
file_to_checksum should be an open... | 30.777778 | 78 | 0.700877 |