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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d8bd8bd8d533ca30262aba2bf7317396c7dab909 | 443 | py | Python | blender/arm/logicnode/native/LN_read_storage.py | onelsonic/armory | 55cfead0844923d419d75bf4bd677ebed714b4b5 | [
"Zlib"
] | 2,583 | 2016-07-27T08:25:47.000Z | 2022-03-31T10:42:17.000Z | blender/arm/logicnode/native/LN_read_storage.py | onelsonic/armory | 55cfead0844923d419d75bf4bd677ebed714b4b5 | [
"Zlib"
] | 2,122 | 2016-07-31T14:20:04.000Z | 2022-03-31T20:44:14.000Z | blender/arm/logicnode/native/LN_read_storage.py | onelsonic/armory | 55cfead0844923d419d75bf4bd677ebed714b4b5 | [
"Zlib"
] | 451 | 2016-08-12T05:52:58.000Z | 2022-03-31T01:33:07.000Z | from arm.logicnode.arm_nodes import *
class ReadStorageNode(ArmLogicTreeNode):
"""Reads a stored content.
@seeNode Write Storage"""
bl_idname = 'LNReadStorageNode'
bl_label = 'Read Storage'
arm_section = 'file'
arm_version = 1
def arm_init(self, context):
self.add_input('ArmString... | 26.058824 | 52 | 0.677201 | 403 | 0.909707 | 0 | 0 | 0 | 0 | 0 | 0 | 169 | 0.38149 |
d8bfc1ac4a0ba5561449846faf72e97b38a7b701 | 320 | py | Python | apolo/apolo/apps/adopcion/models.py | XeresRed/TrabajoGrado | 3d7135732ea76410995ed3b5c3332eb83881677c | [
"MIT"
] | null | null | null | apolo/apolo/apps/adopcion/models.py | XeresRed/TrabajoGrado | 3d7135732ea76410995ed3b5c3332eb83881677c | [
"MIT"
] | null | null | null | apolo/apolo/apps/adopcion/models.py | XeresRed/TrabajoGrado | 3d7135732ea76410995ed3b5c3332eb83881677c | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.
class Persona(AbstractUser):
activos = models.CharField(blank=True, max_length=100)
numeroEmpl = models.IntegerField(blank=True, null=True)
tipo = models.CharField(blank=True, max_length=100)
| 26.666667 | 59 | 0.759375 | 203 | 0.634375 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.08125 |
d8c08d175a1cbd3180bab825774c67e642b794d4 | 1,731 | py | Python | generator/framework/util/cfg_generator.py | sinsay/ds_generator | 9365e22e8730418caf29b8ed6ada1f30f936a297 | [
"Apache-2.0"
] | null | null | null | generator/framework/util/cfg_generator.py | sinsay/ds_generator | 9365e22e8730418caf29b8ed6ada1f30f936a297 | [
"Apache-2.0"
] | null | null | null | generator/framework/util/cfg_generator.py | sinsay/ds_generator | 9365e22e8730418caf29b8ed6ada1f30f936a297 | [
"Apache-2.0"
] | null | null | null | class HasIdent(object):
"""
避免 CfgGenerator 交叉引用所使用的基类
"""
def __init__(self, ident: int = 0):
self.ident = ident
def increase_ident(self):
self.ident += 1
def decrease_ident(self):
self.ident -= 1
class CfgGeneratorIdent(object):
def __init__(self, gen: HasIdent)... | 22.192308 | 90 | 0.536684 | 1,900 | 0.996329 | 0 | 0 | 0 | 0 | 0 | 0 | 634 | 0.332459 |
d8c1279c1f035fd1c0ca93502531ba20b1cf610a | 2,323 | py | Python | app/product/tests/test_product_api.py | RamzeyXD/varanus-ecommerce-api | 4688fc393b73d70a4923d471006caee2ec624f68 | [
"MIT"
] | null | null | null | app/product/tests/test_product_api.py | RamzeyXD/varanus-ecommerce-api | 4688fc393b73d70a4923d471006caee2ec624f68 | [
"MIT"
] | 5 | 2021-03-19T04:52:44.000Z | 2021-09-22T19:12:07.000Z | app/product/tests/test_product_api.py | RamzeyXD/varanus-ecommerce-api | 4688fc393b73d70a4923d471006caee2ec624f68 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Product
from product.serializers import ProductSerializer
PRODUCTS_URL = reverse('product:product-list'... | 28.679012 | 71 | 0.671545 | 1,577 | 0.678864 | 0 | 0 | 0 | 0 | 0 | 0 | 534 | 0.229875 |
d8c141a49a479e74699dc9b65661ce60383e9e67 | 4,686 | py | Python | src/face_feature.py | ryota0051/facial_expressions | 763f1108fc56f5360fbd6603e0dc3e40c27a3d1b | [
"MIT"
] | null | null | null | src/face_feature.py | ryota0051/facial_expressions | 763f1108fc56f5360fbd6603e0dc3e40c27a3d1b | [
"MIT"
] | null | null | null | src/face_feature.py | ryota0051/facial_expressions | 763f1108fc56f5360fbd6603e0dc3e40c27a3d1b | [
"MIT"
] | null | null | null | import os
from typing import Dict, Tuple, List
import json
import time
import tensorflow as tf
import numpy as np
from type_def import BOUNDARY_BOX_TYPE, PERSONAL_INFO_TYPE
class FaceFeatureExtractor():
def __init__(self, base_model_path: str, nationality_model_path: str, label_path: str) -> None:
'''必要な... | 28.573171 | 116 | 0.522621 | 5,431 | 0.968438 | 0 | 0 | 0 | 0 | 0 | 0 | 3,351 | 0.597539 |
d8c15c388c58bbae49aac02c97bdee96b885e94e | 3,234 | py | Python | app/main/routes.py | Tsolmon1/company | 270d88e40e0c709247a7338cd41942b0ceb67c5e | [
"MIT"
] | null | null | null | app/main/routes.py | Tsolmon1/company | 270d88e40e0c709247a7338cd41942b0ceb67c5e | [
"MIT"
] | null | null | null | app/main/routes.py | Tsolmon1/company | 270d88e40e0c709247a7338cd41942b0ceb67c5e | [
"MIT"
] | null | null | null | from datetime import datetime
from flask import render_template, flash, redirect, url_for, request, g, \
jsonify, current_app
from flask_login import current_user, login_required
from flask_babel import _, get_locale
#from guess_language import guess_language
from app import db
from app.main.forms import CompanyFor... | 32.019802 | 141 | 0.682746 | 0 | 0 | 0 | 0 | 2,837 | 0.877242 | 0 | 0 | 830 | 0.256648 |
d8c4609c13c1b5b024cb78f178101d21b07a60ae | 31,034 | py | Python | opentisim/containers/container_defaults.py | TUDelft-CITG/OpenTISim | 443b20572eb2aae2f1909a8a01e95e31be53b675 | [
"MIT"
] | 7 | 2020-02-15T01:34:29.000Z | 2022-02-28T01:24:05.000Z | opentisim/containers/container_defaults.py | TUDelft-CITG/OpenTISim | 443b20572eb2aae2f1909a8a01e95e31be53b675 | [
"MIT"
] | 2 | 2020-02-14T18:44:31.000Z | 2020-04-06T15:39:17.000Z | opentisim/containers/container_defaults.py | TUDelft-CITG/OpenTISim | 443b20572eb2aae2f1909a8a01e95e31be53b675 | [
"MIT"
] | 2 | 2019-07-19T08:50:31.000Z | 2020-02-05T11:14:07.000Z | """
Main generic object classes:
- 1. Quay_wall
- 2. Berth
- 3. Cyclic_Unloader
- STS crane
- 4. Horizontal transport
- Tractor trailer
- 5. Commodity
- TEU
- 6. Containers
- Laden
- Reefer
- Empty
- OOG
- 7. Laden and reefer stack
- 8. Stack equipment
- 9. Empty stack
- 10. OOG stack
- 11. ... | 43.343575 | 142 | 0.444512 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15,289 | 0.492653 |
d8c6bd57ec5db427c92f2222ca7c809d32503546 | 571 | py | Python | src/arrays/combination-sum-2.py | vighnesh153/ds-algo | 79c401dad2d2e575ce1913184ca8665f2712a5b8 | [
"MIT"
] | null | null | null | src/arrays/combination-sum-2.py | vighnesh153/ds-algo | 79c401dad2d2e575ce1913184ca8665f2712a5b8 | [
"MIT"
] | null | null | null | src/arrays/combination-sum-2.py | vighnesh153/ds-algo | 79c401dad2d2e575ce1913184ca8665f2712a5b8 | [
"MIT"
] | 1 | 2020-08-09T06:37:21.000Z | 2020-08-09T06:37:21.000Z | def recursion(arr, target, index, solutions, current):
if target == 0:
solutions.add(tuple(current))
return
if target < 0 or index >= len(arr):
return
current.append(arr[index])
recursion(arr, target - arr[index], index + 1, solutions, current)
current.pop()
recursion(a... | 22.84 | 70 | 0.607706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d8c794bc8aa2a91941f9265c3fe17da6aef9d56a | 472 | py | Python | mmhuman3d/core/visualization/__init__.py | ttxskk/mmhuman3d | f6d39e24a2d5cc216448fc3bd82832ff45eee436 | [
"Apache-2.0"
] | 1 | 2021-12-03T04:17:52.000Z | 2021-12-03T04:17:52.000Z | mmhuman3d/core/visualization/__init__.py | ttxskk/mmhuman3d | f6d39e24a2d5cc216448fc3bd82832ff45eee436 | [
"Apache-2.0"
] | null | null | null | mmhuman3d/core/visualization/__init__.py | ttxskk/mmhuman3d | f6d39e24a2d5cc216448fc3bd82832ff45eee436 | [
"Apache-2.0"
] | null | null | null | from .visualize_keypoints2d import visualize_kp2d
from .visualize_keypoints3d import visualize_kp3d
from .visualize_smpl import (
render_smpl,
visualize_smpl_calibration,
visualize_smpl_hmr,
visualize_smpl_pose,
visualize_smpl_vibe,
visualize_T_pose,
)
__all__ = [
'visualize_kp2d', 'visuali... | 27.764706 | 62 | 0.777542 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 153 | 0.324153 |
d8c9e071e19e41968b2a38fb82cb08379e2983f3 | 12,413 | py | Python | pyoogle/preprocessing/crawl/crawler.py | DanDits/Pyoogle | f860dffb574f8629d3e894074450fdcb76547a03 | [
"Apache-2.0"
] | null | null | null | pyoogle/preprocessing/crawl/crawler.py | DanDits/Pyoogle | f860dffb574f8629d3e894074450fdcb76547a03 | [
"Apache-2.0"
] | null | null | null | pyoogle/preprocessing/crawl/crawler.py | DanDits/Pyoogle | f860dffb574f8629d3e894074450fdcb76547a03 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Feb 6 12:49:02 2016
@author: daniel
"""
import logging
import threading # For main processing thread
import urllib # For downloading websites
import urllib.error
import urllib.request
from concurrent.futures import ThreadPoolExecutor # each downloads a website
from http.... | 42.077966 | 112 | 0.634174 | 9,164 | 0.738258 | 0 | 0 | 1,795 | 0.144606 | 0 | 0 | 2,984 | 0.240393 |
d8caaf44d7f053ff6f28f609749087b123ec4b34 | 2,965 | py | Python | 13.part2.py | elp2/advent_of_code_2018 | 0d359422dd04b0849481796005e97d05c30e9eb4 | [
"Apache-2.0"
] | 1 | 2021-12-02T15:19:36.000Z | 2021-12-02T15:19:36.000Z | 13.part2.py | elp2/advent_of_code_2018 | 0d359422dd04b0849481796005e97d05c30e9eb4 | [
"Apache-2.0"
] | null | null | null | 13.part2.py | elp2/advent_of_code_2018 | 0d359422dd04b0849481796005e97d05c30e9eb4 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
def return_default():
return 0
REAL=open("13.txt").readlines()
SAMPLE=open("13.sample2").readlines()
def parse_lines(lines):
return list(map(list, lines))
CARTS = "^>v<"
DIRS = [(0, -1), (1, 0), (0, 1), (-1, 0)]
def cart_positions(start, facing, board):
poses = []
... | 27.201835 | 77 | 0.43204 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.074874 |
d8cb54d17428f4a861ab1eb4f8524561f2936c44 | 844 | py | Python | docs/_downloads/485d1a22616717976d2f85cbaf046db3/plot__jitterdodge_position.py | IKupriyanov-HORIS/lets-plot-docs | 30fd31cb03dc649a03518b0c9348639ebfe09d53 | [
"MIT"
] | null | null | null | docs/_downloads/485d1a22616717976d2f85cbaf046db3/plot__jitterdodge_position.py | IKupriyanov-HORIS/lets-plot-docs | 30fd31cb03dc649a03518b0c9348639ebfe09d53 | [
"MIT"
] | null | null | null | docs/_downloads/485d1a22616717976d2f85cbaf046db3/plot__jitterdodge_position.py | IKupriyanov-HORIS/lets-plot-docs | 30fd31cb03dc649a03518b0c9348639ebfe09d53 | [
"MIT"
] | null | null | null | """
Jitterdodge Position
====================
Position adjustments determine how to arrange geoms that would otherwise
occupy the same space.
Simultaneously dodge and jitter in one function:
``position_jitterdodge()``.
See
`position_jitterdodge() <https://jetbrains.github.io/lets-plot-docs/pages... | 27.225806 | 151 | 0.703791 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 629 | 0.745261 |
d8ceaa47207dcd451d3a6b75d0d1b483e1ba9218 | 2,537 | py | Python | mask_example/classification_vars.py | ami-a/MaskDetection | 9df329a24a987e63331c17db154319b3ebcaad74 | [
"MIT"
] | 1 | 2021-04-09T09:08:33.000Z | 2021-04-09T09:08:33.000Z | mask_example/classification_vars.py | ami-a/MaskDetection | 9df329a24a987e63331c17db154319b3ebcaad74 | [
"MIT"
] | null | null | null | mask_example/classification_vars.py | ami-a/MaskDetection | 9df329a24a987e63331c17db154319b3ebcaad74 | [
"MIT"
] | null | null | null | """loading the classification model variables for the detector object"""
import numpy as np
import cv2
from TrackEverything.tool_box import ClassificationVars
def get_class_vars(class_model_path):
"""loading the classification model variables for the detector object
We define here the model interpolation functi... | 41.590164 | 97 | 0.658652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,589 | 0.62633 |
d8d26259abf1d70bfe1abffb2493230cee42b319 | 668 | py | Python | detector/urls.py | SPIN-RD/data_analysis | b2ec9ca008781f3015ec3780a858de0dac4549b9 | [
"MIT"
] | null | null | null | detector/urls.py | SPIN-RD/data_analysis | b2ec9ca008781f3015ec3780a858de0dac4549b9 | [
"MIT"
] | null | null | null | detector/urls.py | SPIN-RD/data_analysis | b2ec9ca008781f3015ec3780a858de0dac4549b9 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import (
MeasurementCreateView,
MeasurementRetrieveView,
energy_spectrum_analysis,
half_life_analysis,
index,
)
urlpatterns = [
path("api/measurements/", MeasurementCreateView.as_view()),
path(
"api/measurements/<str:device_id>/<str:mode>", ... | 23.857143 | 88 | 0.646707 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 197 | 0.29491 |
d8d3a26759da05b4ac662c9a2c7f47a9af51214a | 166 | py | Python | site_repo/utils/requests.py | Aviah/one-click-django-server | ddce7181f025b7f8d0979d725f85f8124add6adf | [
"MIT"
] | 10 | 2016-03-22T22:14:40.000Z | 2021-07-23T22:00:02.000Z | site_repo/utils/requests.py | Aviah/one-click-django-server | ddce7181f025b7f8d0979d725f85f8124add6adf | [
"MIT"
] | null | null | null | site_repo/utils/requests.py | Aviah/one-click-django-server | ddce7181f025b7f8d0979d725f85f8124add6adf | [
"MIT"
] | 4 | 2016-04-05T05:41:15.000Z | 2017-01-08T10:03:25.000Z | # requests utils
def get_ip(request):
ip = request.META['REMOTE_ADDR']
ip = request.META.get('HTTP_X_FORWARDED_FOR',ip)
return ip
| 16.6 | 52 | 0.596386 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.307229 |
d8d3a3c4c4228610d78f5c857adca30a66a1762a | 142 | py | Python | backend/app/views/GetConstructsAsGenbankView/__init__.py | Edinburgh-Genome-Foundry/dab | 7eabf76adf3a0b9332c3651b5d0e5e6d98237d2b | [
"MIT"
] | 7 | 2019-04-11T20:36:07.000Z | 2020-03-24T07:12:13.000Z | backend/app/views/GetConstructsAsGenbankView/__init__.py | Edinburgh-Genome-Foundry/dab | 7eabf76adf3a0b9332c3651b5d0e5e6d98237d2b | [
"MIT"
] | null | null | null | backend/app/views/GetConstructsAsGenbankView/__init__.py | Edinburgh-Genome-Foundry/dab | 7eabf76adf3a0b9332c3651b5d0e5e6d98237d2b | [
"MIT"
] | null | null | null | from .GetConstructsAsGenbank import (GetConstructsAsGenbankView,
construct_data_to_assemblies_sequences)
| 47.333333 | 76 | 0.676056 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d8d3e8f353c9df0eca02ab9d7ac5d28b32d4bbb1 | 1,287 | py | Python | newsletter/models.py | doctsystems/newsletter | 7355ad7bca5f2d082abf9703a20fc91a0c325454 | [
"MIT"
] | null | null | null | newsletter/models.py | doctsystems/newsletter | 7355ad7bca5f2d082abf9703a20fc91a0c325454 | [
"MIT"
] | null | null | null | newsletter/models.py | doctsystems/newsletter | 7355ad7bca5f2d082abf9703a20fc91a0c325454 | [
"MIT"
] | null | null | null | from django.db import models
class Newsletter(models.Model):
name=models.CharField(max_length=100)
description=models.TextField()
created_at=models.DateTimeField(auto_now_add=True)
updated_at=models.DateTimeField(auto_now=True)
def __str__(self):
return self.name
class Subscriber(models.Model):
name = models... | 30.642857 | 72 | 0.79798 | 1,246 | 0.968143 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.051282 |
d8d46c16be9da8396527eb259a0965644da2d48d | 37 | py | Python | veintitres/__init__.py | joelalejandro/veintitres-python | 18fa7aa66688cce3f2c42ebc96ddb780bcd6d4bf | [
"MIT"
] | null | null | null | veintitres/__init__.py | joelalejandro/veintitres-python | 18fa7aa66688cce3f2c42ebc96ddb780bcd6d4bf | [
"MIT"
] | null | null | null | veintitres/__init__.py | joelalejandro/veintitres-python | 18fa7aa66688cce3f2c42ebc96ddb780bcd6d4bf | [
"MIT"
] | null | null | null | from .client import VeintitresClient
| 18.5 | 36 | 0.864865 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d8d586caec5e48f58983b527adfdcf89eb123054 | 6,604 | py | Python | bin/pylint_runner.py | PickBas/meta-social | f6fb0a50c30e240086a75917b705dfdc71dbebf9 | [
"MIT"
] | null | null | null | bin/pylint_runner.py | PickBas/meta-social | f6fb0a50c30e240086a75917b705dfdc71dbebf9 | [
"MIT"
] | 15 | 2020-06-07T07:58:05.000Z | 2022-01-19T16:53:47.000Z | bin/pylint_runner.py | PickBas/meta-social | f6fb0a50c30e240086a75917b705dfdc71dbebf9 | [
"MIT"
] | null | null | null | '''
The MIT License (MIT)
Copyright (c) 2015 Matthew Peveler
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, mer... | 36.087432 | 139 | 0.629164 | 5,001 | 0.757268 | 0 | 0 | 0 | 0 | 0 | 0 | 2,477 | 0.375076 |
d8d6b40e4e24a3388d3de220686239dd259ccfe1 | 2,141 | py | Python | util/intensity_scaling.py | LeHenschel/DeepFCD | 494c92dfd80b55aa2369095853bfea84b770acdc | [
"MIT"
] | 3 | 2020-03-24T11:16:50.000Z | 2022-01-21T14:50:41.000Z | util/intensity_scaling.py | LeHenschel/DeepFCD | 494c92dfd80b55aa2369095853bfea84b770acdc | [
"MIT"
] | null | null | null | util/intensity_scaling.py | LeHenschel/DeepFCD | 494c92dfd80b55aa2369095853bfea84b770acdc | [
"MIT"
] | 3 | 2022-01-07T10:53:45.000Z | 2022-03-02T15:31:29.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 7 17:24:20 2020
Rescaling exported synthetic PNGs to the intensity range of real PNGs.
MinMax-Scaling not recommended. Better use Histogram Matching
TODO: Integrate directly into apply_GAN notebook
@author: bdavid
"""
import os
import numpy as n... | 32.439394 | 98 | 0.744512 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 933 | 0.435778 |
d8d6b4d53e13b0fd18dcd2609163a130f5b31c93 | 1,311 | py | Python | mysite/polls/migrations/0007_auto_20150314_0332.py | aaronkrolik/rule46 | 20d3e384768caced5b76f37e8fdefc2e9fb129d6 | [
"Apache-2.0"
] | null | null | null | mysite/polls/migrations/0007_auto_20150314_0332.py | aaronkrolik/rule46 | 20d3e384768caced5b76f37e8fdefc2e9fb129d6 | [
"Apache-2.0"
] | null | null | null | mysite/polls/migrations/0007_auto_20150314_0332.py | aaronkrolik/rule46 | 20d3e384768caced5b76f37e8fdefc2e9fb129d6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('polls', '0006_auto_20150314_0320'),
]
operations = [
migrations.CreateModel(
name='Accolade',
fields... | 29.133333 | 114 | 0.536995 | 1,202 | 0.916857 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.130435 |
d8d72c5cdaafc3330e3c8acc96c27ff888c380fc | 2,549 | py | Python | ceraon/api/v1/meals/schema.py | Rdbaker/Mealbound | 37cec6b45a632ac26a5341a0c9556279b6229ea8 | [
"BSD-3-Clause"
] | 1 | 2018-11-03T17:48:50.000Z | 2018-11-03T17:48:50.000Z | ceraon/api/v1/meals/schema.py | Rdbaker/Mealbound | 37cec6b45a632ac26a5341a0c9556279b6229ea8 | [
"BSD-3-Clause"
] | 3 | 2021-03-09T09:47:04.000Z | 2022-02-12T13:04:41.000Z | ceraon/api/v1/meals/schema.py | Rdbaker/Mealbound | 37cec6b45a632ac26a5341a0c9556279b6229ea8 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Meal schema."""
from datetime import datetime as dt
from marshmallow import Schema, ValidationError, fields, validates
from ceraon.api.v1.locations.schema import LocationSchema
from ceraon.api.v1.users.schema import UserSchema
from ceraon.api.v1.tags.schema import TagSchema
from ceraon.cons... | 34.445946 | 69 | 0.640251 | 2,206 | 0.865437 | 0 | 0 | 1,036 | 0.406434 | 0 | 0 | 411 | 0.16124 |
d8d7c06e5b65b400c9d18a38d0705a519de0d5e6 | 506 | py | Python | Vbox_postgres_conn.py | RajasKhokle/Drug_Web | e59496fc4af69e34a5b0b4d3acb498a038ad831c | [
"BSD-3-Clause"
] | null | null | null | Vbox_postgres_conn.py | RajasKhokle/Drug_Web | e59496fc4af69e34a5b0b4d3acb498a038ad831c | [
"BSD-3-Clause"
] | null | null | null | Vbox_postgres_conn.py | RajasKhokle/Drug_Web | e59496fc4af69e34a5b0b4d3acb498a038ad831c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 29 08:14:44 2019
Purpose: Connect to the Postgresql Drug Database on local virtual machine on UBUNTU
@author: Rajas Khokle
"""
import pandas as pd
from sqlalchemy import create_engine
# Create Connection to the database
engine = create_engine('postgres://postgres:raj_d... | 28.111111 | 92 | 0.758893 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 354 | 0.699605 |
d8d80406f757e14704187e04f0b5d07b32575e58 | 1,071 | py | Python | core/objs/zona.py | aanacleto/erp- | 9c2d5388248cfe4b8cdb8454f6f47df4cb521f0e | [
"MIT"
] | null | null | null | core/objs/zona.py | aanacleto/erp- | 9c2d5388248cfe4b8cdb8454f6f47df4cb521f0e | [
"MIT"
] | null | null | null | core/objs/zona.py | aanacleto/erp- | 9c2d5388248cfe4b8cdb8454f6f47df4cb521f0e | [
"MIT"
] | 2 | 2017-12-04T14:59:22.000Z | 2018-12-06T18:50:29.000Z | # !/usr/bin/env python3
# -*- encoding: utf-8 -*-
"""
ERP+
"""
__author__ = 'António Anacleto'
__credits__ = []
__version__ = "1.0"
__maintainer__ = "António Anacleto"
__status__ = "Development"
__model_name__ = 'zona.Zona'
import auth, base_models
from orm import *
from form import *
class Zona(Model, View):
def ... | 29.75 | 164 | 0.605042 | 784 | 0.729302 | 0 | 0 | 0 | 0 | 0 | 0 | 317 | 0.294884 |
d8d85cecefde2c0134f937fbe84f1d254b9a273b | 4,383 | py | Python | biothings/hub/upgrade.py | sirloon/biothings.api | 8a981fa2151e368d0ca76aaf226eb565d794d4fb | [
"Apache-2.0"
] | null | null | null | biothings/hub/upgrade.py | sirloon/biothings.api | 8a981fa2151e368d0ca76aaf226eb565d794d4fb | [
"Apache-2.0"
] | null | null | null | biothings/hub/upgrade.py | sirloon/biothings.api | 8a981fa2151e368d0ca76aaf226eb565d794d4fb | [
"Apache-2.0"
] | null | null | null | import sys
from biothings.utils.hub_db import get_src_dump, get_data_plugin, get_hub_db_conn, backup, restore
from biothings import config
logging = config.logger
def migrate_0dot1_to_0dot2():
"""
mongodb src_dump/data_plugin changed:
1. "data_folder" and "release" under "download"
2. "data_fo... | 44.72449 | 145 | 0.531371 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,521 | 0.347023 |
d8d8d4bab6bca93fe7ec5b879bc940d20a949497 | 22,052 | py | Python | capirca/lib/gce.py | supertylerc/capirca | 31235e964c9893f3f3432d84604fbaa727384047 | [
"Apache-2.0"
] | null | null | null | capirca/lib/gce.py | supertylerc/capirca | 31235e964c9893f3f3432d84604fbaa727384047 | [
"Apache-2.0"
] | null | null | null | capirca/lib/gce.py | supertylerc/capirca | 31235e964c9893f3f3432d84604fbaa727384047 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# unless required by applicable law or a... | 38.02069 | 83 | 0.640169 | 19,002 | 0.861691 | 0 | 0 | 0 | 0 | 0 | 0 | 8,631 | 0.391393 |
d8dab0f4aacf85ce7a8eb87b58a351fa764a3691 | 134,339 | py | Python | myhabitatagent.py | karkuspeter/habitat-challenge | 4b61be2b24b43d03246c94435febc691b6172ab6 | [
"MIT"
] | null | null | null | myhabitatagent.py | karkuspeter/habitat-challenge | 4b61be2b24b43d03246c94435febc691b6172ab6 | [
"MIT"
] | null | null | null | myhabitatagent.py | karkuspeter/habitat-challenge | 4b61be2b24b43d03246c94435febc691b6172ab6 | [
"MIT"
] | null | null | null | import argparse
import habitat
import random
import numpy as np
import scipy
import os
import cv2
import time
from habitat.tasks.nav.shortest_path_follower import ShortestPathFollower
from habitat.utils.visualizations import maps
from gibsonagents.expert import Expert
from gibsonagents.pathplanners import Dstar_planner... | 54.78752 | 241 | 0.615592 | 123,972 | 0.92283 | 0 | 0 | 2,437 | 0.018141 | 0 | 0 | 32,898 | 0.244888 |
d8db1da409aa926ae0d4a1dd1326712356ef588d | 2,890 | py | Python | examples/nightlight/nightlight.py | pimoroni/breakout-garden | 15f6886a1d011363cc660df1a350fd23d6cf4b78 | [
"MIT"
] | 68 | 2018-08-20T21:45:01.000Z | 2022-03-17T20:45:47.000Z | examples/nightlight/nightlight.py | pimoroni/breakout-garden | 15f6886a1d011363cc660df1a350fd23d6cf4b78 | [
"MIT"
] | 24 | 2018-08-20T14:04:13.000Z | 2022-03-09T12:26:24.000Z | examples/nightlight/nightlight.py | pimoroni/breakout-garden | 15f6886a1d011363cc660df1a350fd23d6cf4b78 | [
"MIT"
] | 14 | 2018-08-25T13:33:49.000Z | 2021-12-09T09:02:35.000Z | #!/usr/bin/env python3
import time
from ltr559 import LTR559
from rgbmatrix5x5 import RGBMatrix5x5
print("""This Pimoroni Breakout Garden example requires an
LTR-559 Light and Proximity Breakout and a 5x5 RGB Matrix Breakout.
This example creates a little nightlight that can be toggled on or
off by tapping the proxi... | 27.788462 | 67 | 0.623529 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,049 | 0.362976 |
d8dd3e6986ec9de4d911cd084dbaeaf781af98b0 | 186 | py | Python | python_for_everybody/for_in_range.py | timothyyu/p4e-prac | f978b71ce147b6e9058372929f2666c2e67d0741 | [
"BSD-3-Clause"
] | null | null | null | python_for_everybody/for_in_range.py | timothyyu/p4e-prac | f978b71ce147b6e9058372929f2666c2e67d0741 | [
"BSD-3-Clause"
] | null | null | null | python_for_everybody/for_in_range.py | timothyyu/p4e-prac | f978b71ce147b6e9058372929f2666c2e67d0741 | [
"BSD-3-Clause"
] | 1 | 2020-04-18T16:09:04.000Z | 2020-04-18T16:09:04.000Z | x = 0
for y in range(5):
print(x,y)
x = x + y
# x = 0 + 0
# x = 0 + 1 ==> x = 1
# x = 1 + 2 ==> x = 3
# x = 3 + 3 ==> x = 6
# x = 6 + 4 ==> x = 10
print(x)
| 15.5 | 27 | 0.290323 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 97 | 0.521505 |
d8de1a0557c16a820290ec65f2861645cf8269e4 | 6,595 | py | Python | leaguedirector/sequence/sequenceTrackView.py | santutu/league-director | 631ab416e31a0391ab207f9b657638c8e350a48c | [
"Apache-2.0"
] | null | null | null | leaguedirector/sequence/sequenceTrackView.py | santutu/league-director | 631ab416e31a0391ab207f9b657638c8e350a48c | [
"Apache-2.0"
] | null | null | null | leaguedirector/sequence/sequenceTrackView.py | santutu/league-director | 631ab416e31a0391ab207f9b657638c8e350a48c | [
"Apache-2.0"
] | null | null | null | import copy
import statistics
from operator import attrgetter
from PySide2.QtCore import Signal, Qt, QEvent
from PySide2.QtGui import QPen, QMouseEvent
from PySide2.QtWidgets import QGraphicsView, QGraphicsScene, QAbstractScrollArea, QApplication, QGraphicsItem
from leaguedirector.libs.memoryCache import MemoryCache
... | 40.962733 | 112 | 0.660197 | 5,967 | 0.904776 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 0.012282 |
d8de56f1954539d2d33e25fa9d9007b69553e370 | 23,746 | py | Python | annealed_flow_transport/flows.py | LaudateCorpus1/annealed_flow_transport | 28f348bb41e3acec5bc925355063d476f2e2aea2 | [
"Apache-2.0"
] | 23 | 2021-08-13T14:00:10.000Z | 2022-02-15T12:44:20.000Z | annealed_flow_transport/flows.py | deepmind/annealed_flow_transport | 28f348bb41e3acec5bc925355063d476f2e2aea2 | [
"Apache-2.0"
] | 1 | 2021-10-05T16:19:25.000Z | 2021-10-05T16:19:25.000Z | annealed_flow_transport/flows.py | LaudateCorpus1/annealed_flow_transport | 28f348bb41e3acec5bc925355063d476f2e2aea2 | [
"Apache-2.0"
] | 4 | 2021-10-05T16:14:58.000Z | 2022-01-03T15:17:36.000Z | # Copyright 2020 DeepMind Technologies Limited.
#
# 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... | 38.361874 | 88 | 0.67902 | 18,694 | 0.787248 | 0 | 0 | 597 | 0.025141 | 0 | 0 | 6,376 | 0.268508 |
d8debc26659ca852de091f669c8c62e62434b95f | 3,208 | py | Python | EMD_ensembled_data_prepare_Test_server.py | NahianHasan/Cardiovascular_Disease_Classification_Employing_EMD | 57bf6425808bcff4f1c54e6be2e1df9c14b61313 | [
"MIT"
] | 6 | 2019-10-10T18:53:13.000Z | 2020-08-13T08:39:43.000Z | EMD_ensembled_data_prepare_Test_server.py | NahianHasan/Cardiovascular_Disease_Classification_Employing_EMD | 57bf6425808bcff4f1c54e6be2e1df9c14b61313 | [
"MIT"
] | null | null | null | EMD_ensembled_data_prepare_Test_server.py | NahianHasan/Cardiovascular_Disease_Classification_Employing_EMD | 57bf6425808bcff4f1c54e6be2e1df9c14b61313 | [
"MIT"
] | 1 | 2020-04-22T07:50:49.000Z | 2020-04-22T07:50:49.000Z | import pyhht
from pyhht.emd import EMD
from pyhht.visualization import plot_imfs
import numpy as np
import math
from pyhht.utils import extr
from pyhht.utils import get_envelops
import matplotlib.pyplot as plt
from pyhht.utils import inst_freq
import wfdb
import os
import sys
import glob
def EMD_data_pre... | 37.302326 | 155 | 0.7101 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 858 | 0.267456 |
d8df2a64ed17e68830f228cf62337f3dea5df521 | 7,373 | py | Python | 2.ReinforcementLearning/CartPole/CartPole-PPO/cartpole_ppo.py | link-kut/deeplink_public | 688c379bfeb63156e865d78d0428f97d7d203cc1 | [
"MIT"
] | null | null | null | 2.ReinforcementLearning/CartPole/CartPole-PPO/cartpole_ppo.py | link-kut/deeplink_public | 688c379bfeb63156e865d78d0428f97d7d203cc1 | [
"MIT"
] | 11 | 2020-01-28T22:33:49.000Z | 2022-03-11T23:41:08.000Z | 2.ReinforcementLearning/CartPole/CartPole-PPO/cartpole_ppo.py | link-kut/deeplink_public | 688c379bfeb63156e865d78d0428f97d7d203cc1 | [
"MIT"
] | 2 | 2019-06-01T04:14:52.000Z | 2020-05-31T08:13:23.000Z | # Initial framework taken from https://github.com/OctThe16th/PPO-Keras/blob/master/Main.py
import numpy as np
import gym
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Input, Dense
from tensorflow.keras import backend as K
from tensorflow.keras.optimizers import Adam
import tensorflow as... | 30.720833 | 104 | 0.563814 | 5,823 | 0.789773 | 0 | 0 | 0 | 0 | 0 | 0 | 675 | 0.09155 |
d8df48a2c6778c32363c444430a9dcd1859230a7 | 8,721 | py | Python | models/san_lowrank.py | LegionChang/CoTNet | b1bc456c0b13b282b807d1082a1598b71014b4fe | [
"Apache-2.0"
] | 360 | 2021-07-26T07:23:29.000Z | 2022-03-16T03:03:25.000Z | python_developer_tools/cv/bases/conv/CoTNet/CoTNet-master/models/san_lowrank.py | HonestyBrave/python_developer_tools | fc0dcf5c4ef088e2e535206dc82f09bbfd01f280 | [
"Apache-2.0"
] | 22 | 2021-07-29T15:05:00.000Z | 2022-03-17T04:28:14.000Z | python_developer_tools/cv/bases/conv/CoTNet/CoTNet-master/models/san_lowrank.py | HonestyBrave/python_developer_tools | fc0dcf5c4ef088e2e535206dc82f09bbfd01f280 | [
"Apache-2.0"
] | 47 | 2021-07-27T02:14:21.000Z | 2022-02-25T09:15:12.000Z | import math
import numpy as np
import torch
from torch import nn as nn
from config import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
from .helpers import build_model_with_cfg
from .layers import SelectiveKernelConv, ConvBnAct, create_attn
from .registry import register_model
from .resnet import ResNet
from .layers im... | 44.269036 | 155 | 0.624928 | 7,234 | 0.829492 | 0 | 0 | 418 | 0.04793 | 0 | 0 | 512 | 0.058709 |
d8e095732d43409e05f872611e0a25bf01b9a971 | 471 | py | Python | d1lod/d1lod/__init__.py | DataONEorg/slinky | 1f0f774b7b5556126d75524ac9fd328ad0fc1ba2 | [
"Apache-2.0"
] | 2 | 2019-03-07T21:14:27.000Z | 2021-03-30T00:24:13.000Z | d1lod/d1lod/__init__.py | DataONEorg/slinky | 1f0f774b7b5556126d75524ac9fd328ad0fc1ba2 | [
"Apache-2.0"
] | 64 | 2021-03-11T22:28:45.000Z | 2022-03-17T18:41:08.000Z | d1lod/d1lod/__init__.py | DataONEorg/slinky | 1f0f774b7b5556126d75524ac9fd328ad0fc1ba2 | [
"Apache-2.0"
] | 2 | 2018-09-05T16:38:42.000Z | 2021-03-12T18:07:20.000Z | from . import people
from . import dataone
from . import util
from . import validator
from . import metadata
from .graph import Graph
from .interface import Interface
# Set default logging handler to avoid "No handler found" warnings.
import logging
try: # Python 2.7+
from logging import NullHandler
except Import... | 24.789474 | 67 | 0.7431 | 84 | 0.178344 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.169851 |
d8e1107cf7ccb8c88d2d79f53d1ffccc5940049b | 1,262 | py | Python | qa/admin.py | thebenwaters/openclickio | c5e08d89b37c5f415810dca088803dba25af5e1a | [
"MIT"
] | null | null | null | qa/admin.py | thebenwaters/openclickio | c5e08d89b37c5f415810dca088803dba25af5e1a | [
"MIT"
] | 1 | 2017-10-21T19:29:18.000Z | 2017-10-21T19:29:18.000Z | qa/admin.py | thebenwaters/openclickio | c5e08d89b37c5f415810dca088803dba25af5e1a | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Answer, AnswerOption, AnswerInstance, Question,\
OpenEndedResponse, ClosedEndedQuestion
# Register your models here.
@admin.register(AnswerOption)
class AnswerOptionAdmin(admin.ModelAdmin):
list_display = ('id', 'text')
@admin.register(Answer)
class AnswerAdmin(a... | 29.348837 | 88 | 0.759113 | 757 | 0.599842 | 0 | 0 | 906 | 0.717908 | 0 | 0 | 192 | 0.152139 |
d8e180bf8b4b157c9e27b0c8c553c612b8e2d1ec | 6,212 | py | Python | Bot/Cogs/jisho.py | No767/Rin-Bot | b4c64e0ebccc9465100006ec2cb023eecb425570 | [
"Apache-2.0"
] | null | null | null | Bot/Cogs/jisho.py | No767/Rin-Bot | b4c64e0ebccc9465100006ec2cb023eecb425570 | [
"Apache-2.0"
] | null | null | null | Bot/Cogs/jisho.py | No767/Rin-Bot | b4c64e0ebccc9465100006ec2cb023eecb425570 | [
"Apache-2.0"
] | null | null | null | import re
import discord
import requests
import ujson
from discord.ext import commands
from dotenv import load_dotenv
from jamdict import Jamdict
load_dotenv()
jam = Jamdict()
# Use Array Loop Instead
def kanjiv2(search):
res = jam.lookup(search.replace("\n", " "))
for c in res.chars:
return str(c)... | 33.042553 | 195 | 0.56246 | 2,425 | 0.389621 | 0 | 0 | 2,330 | 0.374357 | 2,277 | 0.365842 | 1,522 | 0.244537 |
d8e1c9d0e3a88657f33d1a06132b17c2fdbfdca9 | 40 | py | Python | cs-224n/assn2/utils/__init__.py | PranjalGupta2199/nlp-dl | 7e2290c82602cb2ff863f2513c54dfb0412affd0 | [
"MIT"
] | null | null | null | cs-224n/assn2/utils/__init__.py | PranjalGupta2199/nlp-dl | 7e2290c82602cb2ff863f2513c54dfb0412affd0 | [
"MIT"
] | null | null | null | cs-224n/assn2/utils/__init__.py | PranjalGupta2199/nlp-dl | 7e2290c82602cb2ff863f2513c54dfb0412affd0 | [
"MIT"
] | null | null | null | from . import gradcheck, treebank, utils | 40 | 40 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d8e326a0842502832eb889a12acb3aa9cc0f3dbc | 679 | py | Python | simple_import/forms.py | smcoll/django-simple-import | fcdaaf61196fb7c596c3383159d49f11a8dd518e | [
"BSD-3-Clause"
] | null | null | null | simple_import/forms.py | smcoll/django-simple-import | fcdaaf61196fb7c596c3383159d49f11a8dd518e | [
"BSD-3-Clause"
] | null | null | null | simple_import/forms.py | smcoll/django-simple-import | fcdaaf61196fb7c596c3383159d49f11a8dd518e | [
"BSD-3-Clause"
] | null | null | null | from django import forms
from django.contrib.contenttypes.models import ContentType
from simple_import.models import ImportLog, ColumnMatch, RelationalMatch
class ImportForm(forms.ModelForm):
class Meta:
model = ImportLog
fields = ('name', 'import_file', 'import_type')
model = forms.ModelChoi... | 27.16 | 76 | 0.664212 | 505 | 0.743741 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.120766 |
d8e4dee2464dfe2fbd5f649c5d1fede75cf0bf21 | 3,198 | py | Python | src/main/python/utils/handle_null.py | meowpunch/bobsim-research | 4411ac6eaf5b760611f689b0a9e290546e2f5435 | [
"MIT"
] | 2 | 2020-03-01T17:42:44.000Z | 2020-03-09T06:13:34.000Z | src/main/python/utils/handle_null.py | meowpunch/bobsim-research | 4411ac6eaf5b760611f689b0a9e290546e2f5435 | [
"MIT"
] | 2 | 2020-04-01T16:48:06.000Z | 2020-04-04T11:04:10.000Z | src/main/python/utils/handle_null.py | meowpunch/bobsim-research | 4411ac6eaf5b760611f689b0a9e290546e2f5435 | [
"MIT"
] | null | null | null | import sys
from functools import reduce
import pandas as pd
from utils.logging import init_logger
from utils.s3_manager.manage import S3Manager
class NullHandler:
def __init__(self, strategy=None, df=None):
self.logger = init_logger()
self.input_df = df
self.strategy = strategy
... | 26.213115 | 107 | 0.583177 | 2,337 | 0.726905 | 0 | 0 | 943 | 0.293313 | 0 | 0 | 964 | 0.299844 |
d8e67ae78b6e8735abac8eb28c78858b399f444d | 1,207 | py | Python | scripts/executor_action.py | rezhajulio/azkaban | 974e2e45f4e2f1cd14a3e160f9326aa067b606c2 | [
"Apache-2.0"
] | 3 | 2019-12-19T00:04:36.000Z | 2020-05-07T02:54:56.000Z | scripts/executor_action.py | rezhajulio/azkaban | 974e2e45f4e2f1cd14a3e160f9326aa067b606c2 | [
"Apache-2.0"
] | null | null | null | scripts/executor_action.py | rezhajulio/azkaban | 974e2e45f4e2f1cd14a3e160f9326aa067b606c2 | [
"Apache-2.0"
] | 3 | 2018-03-15T04:54:50.000Z | 2019-07-15T06:33:58.000Z | #!/usr/bin/python3
import requests
import sys
import time
from wait_for_port_ready import wait_for_port_ready
import traceback
import json
action = sys.argv[1]
assert action in ('activate', 'deactivate', 'getStatus', 'shutdown')
url = 'http://localhost:12321/executor?action={action}'.format(action=action)
if actio... | 24.632653 | 77 | 0.591549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 242 | 0.200497 |
d8e730bb375940f9f3582e34ab7d4585a0799ed3 | 80 | py | Python | T26-04/program.py | tiagomendes7/SSof-Project1920 | 9b026763a492683ab982aa769f2a381ed02930aa | [
"MIT"
] | 2 | 2019-11-20T19:26:07.000Z | 2019-11-22T00:42:23.000Z | T26-04/program.py | tiagomendes7/SSof-Project1920 | 9b026763a492683ab982aa769f2a381ed02930aa | [
"MIT"
] | 2 | 2019-11-28T05:21:24.000Z | 2019-11-28T05:21:58.000Z | T26-04/program.py | tiagomendes7/SSof-Project1920 | 9b026763a492683ab982aa769f2a381ed02930aa | [
"MIT"
] | 25 | 2019-11-27T01:40:56.000Z | 2019-12-04T23:38:59.000Z | src = source()
src2 = src
src3 = src2
src5 = src2
src4 = src3
src4 = sink(src4)
| 11.428571 | 17 | 0.65 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d8e84bbf2e79e843bed9f808b75020d51a48d30f | 3,855 | py | Python | faker/providers/barcode/__init__.py | StabbarN/faker | 57882ff73255cb248d8f995b2abfce5cfee45ab3 | [
"MIT"
] | 4 | 2020-09-23T15:48:00.000Z | 2021-02-25T07:55:23.000Z | faker/providers/barcode/__init__.py | StabbarN/faker | 57882ff73255cb248d8f995b2abfce5cfee45ab3 | [
"MIT"
] | 7 | 2021-03-05T23:08:02.000Z | 2022-03-12T00:47:19.000Z | faker/providers/barcode/__init__.py | StabbarN/faker | 57882ff73255cb248d8f995b2abfce5cfee45ab3 | [
"MIT"
] | 1 | 2022-03-10T16:25:33.000Z | 2022-03-10T16:25:33.000Z | from .. import BaseProvider
localized = True
class Provider(BaseProvider):
# Source of GS1 country codes: https://gs1.org/standards/id-keys/company-prefix
local_prefixes = ()
def _ean(self, length=13, prefixes=()):
if length not in (8, 13):
raise AssertionError("length can only be 8 ... | 33.232759 | 102 | 0.597925 | 3,806 | 0.987289 | 0 | 0 | 0 | 0 | 0 | 0 | 2,539 | 0.658625 |
d8e8a2245da2f5f3c3aaee9fd554b9ee96a551e9 | 22,494 | py | Python | axonius_api_client/http.py | geransmith/axonius_api_client | 09fd564d62f0ddf7aa44db14a509eaafaf0c930f | [
"MIT"
] | null | null | null | axonius_api_client/http.py | geransmith/axonius_api_client | 09fd564d62f0ddf7aa44db14a509eaafaf0c930f | [
"MIT"
] | null | null | null | axonius_api_client/http.py | geransmith/axonius_api_client | 09fd564d62f0ddf7aa44db14a509eaafaf0c930f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""HTTP client."""
import logging
import warnings
from urllib.parse import urlparse, urlunparse
import requests
from .constants import (
LOG_LEVEL_HTTP,
MAX_BODY_LEN,
REQUEST_ATTR_MAP,
RESPONSE_ATTR_MAP,
TIMEOUT_CONNECT,
TIMEOUT_RESPONSE,
)
from .exceptions import HttpE... | 35.479495 | 88 | 0.563973 | 21,947 | 0.975682 | 0 | 0 | 2,714 | 0.120654 | 0 | 0 | 12,400 | 0.551258 |
d8edf7cbcf7cedddc71ad9cf461c4f588b745f8c | 427 | py | Python | tests/test.py | alex-panda/PDFCompiler | 3454ee01a6e5ebb2d2bccdcdc32678bf1def895d | [
"MIT"
] | null | null | null | tests/test.py | alex-panda/PDFCompiler | 3454ee01a6e5ebb2d2bccdcdc32678bf1def895d | [
"MIT"
] | null | null | null | tests/test.py | alex-panda/PDFCompiler | 3454ee01a6e5ebb2d2bccdcdc32678bf1def895d | [
"MIT"
] | null | null | null | from fpdf import FPDF
import os
pdf = FPDF()
pdf.add_page()
#pdf.add_font('CMUSerif-UprightItalic', fname=os.path.abspath('./src/Fonts/Computer Modern/cmunui.ttf'), uni=True)
#pdf.set_font('CMUSerif-UprightItalic', size=16)
pdf.add_font('BerlinSansFB-Bold', fname='C:\\Windows\\Fonts\\VINERITC.TTF', uni=True)
pdf.set_f... | 35.583333 | 114 | 0.735363 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 284 | 0.665105 |
d8ee816a339e470ff77545c7b6f55ec86374feb8 | 362 | py | Python | examinations/serializers.py | CASDON-MYSTERY/studentapp | 0fd942e963a10a02a6c9f358dd362cfd646eecc3 | [
"MIT"
] | null | null | null | examinations/serializers.py | CASDON-MYSTERY/studentapp | 0fd942e963a10a02a6c9f358dd362cfd646eecc3 | [
"MIT"
] | null | null | null | examinations/serializers.py | CASDON-MYSTERY/studentapp | 0fd942e963a10a02a6c9f358dd362cfd646eecc3 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from .models import Examination, Exam_day_and_venue
class Examination_Serializer(serializers.ModelSerializer):
class Meta:
model=Examination
fields= "__all__"
class Exam_day_and_venue_Serializer(serializers.ModelSerializer):
class Meta:
model=Ex... | 25.857143 | 65 | 0.762431 | 266 | 0.734807 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.049724 |
d8f1c63452f9e657da2dce69409e74cc04262524 | 2,008 | py | Python | server/settings.py | codingismycraft/pinta | bbeb721f5d365cf2643d01e1f3196e90e2658d05 | [
"MIT"
] | null | null | null | server/settings.py | codingismycraft/pinta | bbeb721f5d365cf2643d01e1f3196e90e2658d05 | [
"MIT"
] | null | null | null | server/settings.py | codingismycraft/pinta | bbeb721f5d365cf2643d01e1f3196e90e2658d05 | [
"MIT"
] | null | null | null | """Exposes the configuration settings."""
import os
import json
class _Settings:
"""Exposes the configuration settings."""
_project_root = None
_include_root = None
_dependencies_filename = None
_pinta_executable = None
_history_db = None
def __init__(self):
"""Initializer.
... | 25.417722 | 74 | 0.616036 | 1,915 | 0.953685 | 0 | 0 | 1,059 | 0.52739 | 0 | 0 | 916 | 0.456175 |
d8f2c334a4aedf8eab7e4c82a7180f26920b4989 | 2,533 | py | Python | pages/header_page.py | Morjus/kinoposk_ui_tests | 0e5c0660593731529db7df5912e10a81e80a55ea | [
"MIT"
] | null | null | null | pages/header_page.py | Morjus/kinoposk_ui_tests | 0e5c0660593731529db7df5912e10a81e80a55ea | [
"MIT"
] | null | null | null | pages/header_page.py | Morjus/kinoposk_ui_tests | 0e5c0660593731529db7df5912e10a81e80a55ea | [
"MIT"
] | null | null | null | import allure
import logging
from selenium.webdriver.common.by import By
from pages.base_page import BasePage
class HeaderPage(BasePage):
LOGIN_BUTTON = (By.XPATH, '//button[contains(text(), "Войти")]')
EMAIL_FIELD = (By.CSS_SELECTOR, '#passp-field-login')
PASSW_FIELD = (By.CSS_SELECTOR, '#passp-field-pas... | 43.672414 | 79 | 0.658113 | 2,686 | 0.959971 | 0 | 0 | 0 | 0 | 0 | 0 | 1,036 | 0.370264 |
d8f4b8a4abb68a6dab26dbeb1dd2c937dba8e5c5 | 1,911 | py | Python | modules/data/warehouse/tools/import_record.py | Shokoofeh/apollo | 71d6ea753b4595eb38cc54d6650c8de677b173df | [
"Apache-2.0"
] | 7 | 2017-07-07T07:56:13.000Z | 2019-03-06T06:27:00.000Z | modules/data/warehouse/tools/import_record.py | Shokoofeh/apollo | 71d6ea753b4595eb38cc54d6650c8de677b173df | [
"Apache-2.0"
] | null | null | null | modules/data/warehouse/tools/import_record.py | Shokoofeh/apollo | 71d6ea753b4595eb38cc54d6650c8de677b173df | [
"Apache-2.0"
] | 2 | 2017-07-07T07:56:15.000Z | 2018-08-10T17:13:34.000Z | #!/usr/bin/env python
# -*- coding: UTF-8-*-
###############################################################################
# Copyright 2018 The Apollo Authors. 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.
# ... | 30.822581 | 79 | 0.641549 | 606 | 0.317111 | 0 | 0 | 533 | 0.278912 | 0 | 0 | 1,109 | 0.580324 |
d8f50d17f9a52ee96a7037b851918cf13a2ca3ae | 96 | py | Python | enthought/mayavi/core/ui/mayavi_scene.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/mayavi/core/ui/mayavi_scene.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/mayavi/core/ui/mayavi_scene.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from __future__ import absolute_import
from mayavi.core.ui.mayavi_scene import *
| 24 | 41 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.145833 |
d8f564b8365eed4a07a4dd31237eb8da98838a5f | 3,064 | py | Python | docs/talks/xdc2016/compare_cairo.py | juhapekka/ezbench_work | ac0cb9ccbc205746d4790a9e33e598fbd5732741 | [
"BSD-3-Clause"
] | 3 | 2019-06-25T16:49:25.000Z | 2021-04-30T06:36:54.000Z | docs/talks/xdc2016/compare_cairo.py | juhapekka/ezbench_work | ac0cb9ccbc205746d4790a9e33e598fbd5732741 | [
"BSD-3-Clause"
] | 4 | 2019-12-10T00:50:49.000Z | 2022-03-10T06:18:42.000Z | docs/talks/xdc2016/compare_cairo.py | juhapekka/ezbench_work | ac0cb9ccbc205746d4790a9e33e598fbd5732741 | [
"BSD-3-Clause"
] | 1 | 2021-04-30T06:36:36.000Z | 2021-04-30T06:36:36.000Z | #!/usr/bin/env python3
"""
Copyright (c) 2015, Intel Corporation
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 notice,
this list of conditions an... | 41.972603 | 126 | 0.72748 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,936 | 0.631854 |
d8f89ca57ebf1d8154f7f2629edeea9594a44b41 | 9,541 | py | Python | generator/blocks/write_back/base/memory_block_base.py | biarmic/OpenCache | bb9e110e434deb83900de328cc76b63901ba582f | [
"BSD-3-Clause"
] | null | null | null | generator/blocks/write_back/base/memory_block_base.py | biarmic/OpenCache | bb9e110e434deb83900de328cc76b63901ba582f | [
"BSD-3-Clause"
] | null | null | null | generator/blocks/write_back/base/memory_block_base.py | biarmic/OpenCache | bb9e110e434deb83900de328cc76b63901ba582f | [
"BSD-3-Clause"
] | null | null | null | # See LICENSE for licensing information.
#
# Copyright (c) 2021 Regents of the University of California and The Board
# of Regents for the Oklahoma Agricultural and Mechanical College
# (acting for and on behalf of Oklahoma State University)
# All rights reserved.
#
from block_base import block_base
from amaranth impor... | 42.977477 | 110 | 0.570276 | 9,186 | 0.962792 | 0 | 0 | 0 | 0 | 0 | 0 | 4,377 | 0.458757 |
d8f8b4873e2a9d706b1b4b89de4220f8b9ddd61d | 731 | py | Python | concordia/migrations/0002_auto_20181004_1848.py | juliecentofanti172/juliecentofanti.github.io | 446ea8522b9f4a6709124ebb6e0f675acf7fe205 | [
"CC0-1.0"
] | 134 | 2018-05-23T14:00:29.000Z | 2022-03-10T15:47:53.000Z | concordia/migrations/0002_auto_20181004_1848.py | ptrourke/concordia | 56ff364dbf38cb8a763df489479821fe43b76d69 | [
"CC0-1.0"
] | 1,104 | 2018-05-22T20:18:22.000Z | 2022-03-31T17:28:40.000Z | concordia/migrations/0002_auto_20181004_1848.py | ptrourke/concordia | 56ff364dbf38cb8a763df489479821fe43b76d69 | [
"CC0-1.0"
] | 32 | 2018-05-22T20:22:38.000Z | 2021-12-21T14:11:44.000Z | # Generated by Django 2.0.9 on 2018-10-04 18:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("concordia", "0001_squashed_0040_remove_campaign_is_active")]
operations = [
migrations.AlterField(
model_name="pageinuse",
name="... | 27.074074 | 82 | 0.603283 | 638 | 0.872777 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.233926 |
d8fb835e064c6068c174aaab9d60c797f66b3c26 | 319 | py | Python | combinatorics/p11069.py | sajjadt/competitive-programming | fb0844afba95383441f0c4c0c3b1a38078d24ec9 | [
"MIT"
] | 10 | 2019-03-29T08:37:10.000Z | 2021-12-29T14:06:57.000Z | combinatorics/p11069.py | sajjadt/competitive-programming | fb0844afba95383441f0c4c0c3b1a38078d24ec9 | [
"MIT"
] | 1 | 2020-07-03T08:25:38.000Z | 2020-07-03T08:25:38.000Z | combinatorics/p11069.py | sajjadt/competitive-programming | fb0844afba95383441f0c4c0c3b1a38078d24ec9 | [
"MIT"
] | 4 | 2019-05-30T16:04:48.000Z | 2020-10-22T21:42:25.000Z |
# f(n) = number of valid sequencess with n items
# f(n) = {"attaching n to"} f(n-2) + {"attaching n-1 to "} f(n-3)
LIMIT = 76 + 1
f_table = [0, 1, 2, 2]
for i in range(LIMIT):
f_table.append(f_table[-2] + f_table[-3])
while True:
try:
n = int(input())
print(f_table[n])
except(EOFError):
break
| 19.9375 | 69 | 0.579937 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.366771 |
d8fbe81e9f1a510748c80f8dc8a1b42b637b2f92 | 207 | py | Python | kartverket_tide_api/exceptions/__init__.py | matsjp/kartverket_tide_api | b4be15e9c8f077ef6ec0747fe67f0a64383cfa30 | [
"MIT"
] | null | null | null | kartverket_tide_api/exceptions/__init__.py | matsjp/kartverket_tide_api | b4be15e9c8f077ef6ec0747fe67f0a64383cfa30 | [
"MIT"
] | null | null | null | kartverket_tide_api/exceptions/__init__.py | matsjp/kartverket_tide_api | b4be15e9c8f077ef6ec0747fe67f0a64383cfa30 | [
"MIT"
] | null | null | null | from .apierrorexception import NoTideDataErrorException, UnknownApiErrorException,\
ApiErrorException, InvalidStationTypeErrorException
from .cannotfindelementexception import CannotFindElementException
| 51.75 | 83 | 0.898551 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d8fee123a93215beee41ff7185b11c6c92c2b7c1 | 3,566 | py | Python | aita/api/course.py | ze-lin/AITA | 0f2fe4e630c37fcc566a54621880b78ec67eefa6 | [
"MIT"
] | null | null | null | aita/api/course.py | ze-lin/AITA | 0f2fe4e630c37fcc566a54621880b78ec67eefa6 | [
"MIT"
] | null | null | null | aita/api/course.py | ze-lin/AITA | 0f2fe4e630c37fcc566a54621880b78ec67eefa6 | [
"MIT"
] | 1 | 2020-12-29T19:45:28.000Z | 2020-12-29T19:45:28.000Z | import datetime, time, os
from flask import Blueprint, jsonify, request, g
from aita.auth import login_required
from aita.db import get_collection
from werkzeug.utils import secure_filename
bp = Blueprint('course', __name__, url_prefix='/course')
@bp.route('/getall', methods=['GET'])
def get_all_course():
COURS... | 26.029197 | 66 | 0.633763 | 0 | 0 | 0 | 0 | 3,314 | 0.923634 | 0 | 0 | 670 | 0.186734 |
d8ff3f9b9d076df28a9f625cded5efea0322cd15 | 16,309 | py | Python | apps/dash-baseball-statistics/layouts.py | JeroenvdSande/dash-sample-apps | 106fa24693cfdaf47c06466a0aed78e642344f91 | [
"MIT"
] | 2,332 | 2019-05-10T18:24:20.000Z | 2022-03-30T21:46:29.000Z | apps/dash-baseball-statistics/layouts.py | JeroenvdSande/dash-sample-apps | 106fa24693cfdaf47c06466a0aed78e642344f91 | [
"MIT"
] | 384 | 2019-05-09T19:19:56.000Z | 2022-03-12T00:58:24.000Z | apps/dash-baseball-statistics/layouts.py | JeroenvdSande/dash-sample-apps | 106fa24693cfdaf47c06466a0aed78e642344f91 | [
"MIT"
] | 3,127 | 2019-05-16T17:20:45.000Z | 2022-03-31T17:59:07.000Z | # Dash components, html, and dash tables
import dash_core_components as dcc
import dash_html_components as html
import dash_table
# Import Bootstrap components
import dash_bootstrap_components as dbc
# Import custom data.py
import data
# Import data from data.py file
teams_df = data.teams
# Hardcoded list that conta... | 35.843956 | 139 | 0.365565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,873 | 0.298792 |
2b028209a00a7c4331c52f1ca61c13b4b8eaf902 | 107 | py | Python | parquet_metadata/test_parquet_metadata.py | dzamo/parquet-metadata | 221bff0253bcaefc7c95e6e16ae376e3bba6ee9f | [
"Apache-2.0"
] | 11 | 2018-09-11T02:56:32.000Z | 2022-02-16T18:49:39.000Z | parquet_metadata/test_parquet_metadata.py | dzamo/parquet-metadata | 221bff0253bcaefc7c95e6e16ae376e3bba6ee9f | [
"Apache-2.0"
] | null | null | null | parquet_metadata/test_parquet_metadata.py | dzamo/parquet-metadata | 221bff0253bcaefc7c95e6e16ae376e3bba6ee9f | [
"Apache-2.0"
] | 4 | 2019-05-30T22:44:33.000Z | 2022-02-16T18:49:40.000Z | from . import parquet_metadata
def test_smoke_test():
parquet_metadata.dump('parquets/types.parquet')
| 21.4 | 51 | 0.785047 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.224299 |
2b05abd8c972d299aef12d9ffb9c918cfcc45604 | 5,956 | py | Python | src/pylightnix/repl.py | stagedml/pylightnix | b475057f03db1d0b975500d079745c4de9c42069 | [
"Apache-2.0"
] | 9 | 2020-01-25T12:03:12.000Z | 2021-10-12T08:22:33.000Z | src/pylightnix/repl.py | stagedml/pylightnix | b475057f03db1d0b975500d079745c4de9c42069 | [
"Apache-2.0"
] | 1 | 2020-02-16T10:47:34.000Z | 2020-02-20T17:11:45.000Z | src/pylightnix/repl.py | stagedml/pylightnix | b475057f03db1d0b975500d079745c4de9c42069 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020, Sergey Mironov
#
# 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... | 34.427746 | 81 | 0.712727 | 339 | 0.056917 | 0 | 0 | 0 | 0 | 0 | 0 | 1,894 | 0.317999 |
2b078da4ba018d0ed23b38cf26025965f628a808 | 3,658 | py | Python | main.py | AuroraBTH/minecraft-modpack-randomizer | 797fb6a438a3365da69fbcbc22d856668a90ed27 | [
"MIT"
] | null | null | null | main.py | AuroraBTH/minecraft-modpack-randomizer | 797fb6a438a3365da69fbcbc22d856668a90ed27 | [
"MIT"
] | null | null | null | main.py | AuroraBTH/minecraft-modpack-randomizer | 797fb6a438a3365da69fbcbc22d856668a90ed27 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
from requests import get
import json
def get_amount_of_pages(minecraft_version):
initial_site_response = get("https://www.curseforge.com/minecraft/mc-mods?filter-game-version=" + minecraft_version + "&filter-sort=5&")
soup = BeautifulSoup(initial_site_response.text, "html.... | 43.547619 | 146 | 0.642701 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 880 | 0.240569 |
2b09394715e3c0dcf590faefc51ab0a74f18287b | 540 | py | Python | product/views/brand_details.py | Rafeen/Inventory-Management-and-POS | c6b93fd83e76d8cdee1bdbe1042a29b23bfc36ac | [
"MIT"
] | null | null | null | product/views/brand_details.py | Rafeen/Inventory-Management-and-POS | c6b93fd83e76d8cdee1bdbe1042a29b23bfc36ac | [
"MIT"
] | 10 | 2019-07-03T21:28:41.000Z | 2022-01-13T01:13:35.000Z | product/views/brand_details.py | Rafeen/Inventory-Management-and-POS | c6b93fd83e76d8cdee1bdbe1042a29b23bfc36ac | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect, get_object_or_404
from product.models.brand_model import Brand
from django.contrib.auth.decorators import login_required
@login_required(login_url='/login/')
def brand_detail_view(request, id):
"""
This view renders User Detail page with a details of selecte... | 21.6 | 74 | 0.709259 | 0 | 0 | 0 | 0 | 363 | 0.672222 | 0 | 0 | 147 | 0.272222 |
2b0a6f1bbc8afafe4db77b3247308ff00dd67a64 | 1,264 | py | Python | 1-100q/40.py | rampup01/Leetcode | 8450a95a966ef83b24ffe6450f06ce8de92b3efb | [
"MIT"
] | 990 | 2018-06-05T11:49:22.000Z | 2022-03-31T08:59:17.000Z | 1-100q/40.py | rampup01/Leetcode | 8450a95a966ef83b24ffe6450f06ce8de92b3efb | [
"MIT"
] | 1 | 2021-11-01T01:29:38.000Z | 2021-11-01T01:29:38.000Z | 1-100q/40.py | rampup01/Leetcode | 8450a95a966ef83b24ffe6450f06ce8de92b3efb | [
"MIT"
] | 482 | 2018-06-12T22:16:53.000Z | 2022-03-29T00:23:29.000Z | '''
Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.
Each number in candidates may only be used once in the combination.
Note:
All numbers (including target) will be positive integers.
The so... | 26.893617 | 170 | 0.609968 | 748 | 0.591772 | 0 | 0 | 0 | 0 | 0 | 0 | 623 | 0.49288 |
2b0caaaf1b41e4b4941d55d16c265dd9df819b1f | 8,651 | py | Python | src/clustar_project/clustarray.py | jz5jx/Test_Repo | 8796f45021943984ed02232fd34ff02e17123d71 | [
"MIT"
] | 1 | 2021-04-24T21:52:53.000Z | 2021-04-24T21:52:53.000Z | src/clustar_project/clustarray.py | jz5jx/Test_Repo | 8796f45021943984ed02232fd34ff02e17123d71 | [
"MIT"
] | null | null | null | src/clustar_project/clustarray.py | jz5jx/Test_Repo | 8796f45021943984ed02232fd34ff02e17123d71 | [
"MIT"
] | null | null | null | import warnings
import numpy as np
import itertools
class ClustArray:
''' Class for working with data from FITS images
Initialized from a numpy array from an image
Methods for denoising images
'''
def __init__(self, np_array):
self.im_array = np_array
self.noise_est = None
... | 35.310204 | 136 | 0.573229 | 8,597 | 0.993758 | 0 | 0 | 0 | 0 | 0 | 0 | 4,208 | 0.486418 |
2b0d1ad6e91ffdcea74efa0272a18d860ad0c2ae | 7,151 | py | Python | rpa_logger/task.py | kangasta/rpa_logger | 63fb9d2472cc8039b6d794c5a09f4fbb77f5ac23 | [
"MIT"
] | null | null | null | rpa_logger/task.py | kangasta/rpa_logger | 63fb9d2472cc8039b6d794c5a09f4fbb77f5ac23 | [
"MIT"
] | null | null | null | rpa_logger/task.py | kangasta/rpa_logger | 63fb9d2472cc8039b6d794c5a09f4fbb77f5ac23 | [
"MIT"
] | null | null | null | '''Constants and helpers for describing RPA tasks and their status.
'''
from collections import Counter
from dataclasses import dataclass
from typing import Any, Dict, Hashable, List, Union
from uuid import uuid4
from .utils import timestamp
from .utils.output import OutputText
STARTED = 'STARTED'
SUCCESS = 'SUCCESS'... | 29.549587 | 78 | 0.586212 | 6,646 | 0.929381 | 0 | 0 | 6,679 | 0.933995 | 0 | 0 | 3,847 | 0.537967 |
2b0d8b35ff7e943b202f21481e50e5769f2ff2f4 | 13,760 | py | Python | src/graph_construction.py | chrisdxie/rice | c3e42822226af9ac28d95d434cd582386122b679 | [
"MIT"
] | 16 | 2021-07-01T16:18:26.000Z | 2022-02-21T05:19:39.000Z | src/graph_construction.py | chrisdxie/rice | c3e42822226af9ac28d95d434cd582386122b679 | [
"MIT"
] | 1 | 2022-02-22T22:46:37.000Z | 2022-02-22T22:46:37.000Z | src/graph_construction.py | chrisdxie/rice | c3e42822226af9ac28d95d434cd582386122b679 | [
"MIT"
] | 1 | 2021-11-08T19:52:40.000Z | 2021-11-08T19:52:40.000Z | import sys, os
import numpy as np
import cv2
import torch
import torch.nn.functional as F
from torch_geometric.data import Data, Batch
import torchvision.transforms as transforms
from . import constants
from .util import utilities as util_
def get_resnet50_fpn_model(pretrained=True, trainable_layer_names=[]):
"... | 38.328691 | 142 | 0.622892 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,120 | 0.372093 |
2b0eda6bd56eca2e8afd3f6bc6ca556e0abd44cd | 374 | py | Python | Learning+Misc/Quantum-Circuits/deutsch_oracle.py | Gregory-Eales/QA-Reimplementations | bef0b3e67397a73c468e539c426c6629d398433b | [
"MIT"
] | 1 | 2019-05-03T21:48:29.000Z | 2019-05-03T21:48:29.000Z | Learning+Misc/Quantum-Circuits/deutsch_oracle.py | Gregory-Eales/QA-Reimplementations | bef0b3e67397a73c468e539c426c6629d398433b | [
"MIT"
] | null | null | null | Learning+Misc/Quantum-Circuits/deutsch_oracle.py | Gregory-Eales/QA-Reimplementations | bef0b3e67397a73c468e539c426c6629d398433b | [
"MIT"
] | null | null | null | import cirq
import numpy as np
class DeutschOracle(object):
def __init__(self):
self.circuit = cirq.Circuit()
self.x_gate = cirq.X
self.hadmard_gate = cirq.H
self.measure_gate = cirq.MeasurementGate
def init_qubits(self, length=3):
q = [cirq.GridQubit(i, j) for i in r... | 23.375 | 80 | 0.639037 | 341 | 0.911765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2b0f54ec033255faf4b2fe939082f385da0b5246 | 263 | py | Python | example.py | pnsn/python_template | 1e09b87149407ee8e5f5ed78f57244470cb1415d | [
"MIT"
] | null | null | null | example.py | pnsn/python_template | 1e09b87149407ee8e5f5ed78f57244470cb1415d | [
"MIT"
] | null | null | null | example.py | pnsn/python_template | 1e09b87149407ee8e5f5ed78f57244470cb1415d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
'''
All projects should use python 3
virtualenv symlinks python, python3, python3.x to environments python
envoke with either python example.py
or ./example.py
'''
def main():
print("Hello PNSN")
if __name__ == "__main__":
main() | 18.785714 | 69 | 0.711027 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 207 | 0.787072 |
2b1231e92f21f35984d0911fe8b686f6f0ee27b3 | 4,272 | py | Python | python/tests/wind_settings_test.py | anth-dj/geog5003m_project | 51caa4255a04cc7043dde9ff94e654c41fc1620c | [
"MIT"
] | null | null | null | python/tests/wind_settings_test.py | anth-dj/geog5003m_project | 51caa4255a04cc7043dde9ff94e654c41fc1620c | [
"MIT"
] | null | null | null | python/tests/wind_settings_test.py | anth-dj/geog5003m_project | 51caa4255a04cc7043dde9ff94e654c41fc1620c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Wind Settings unit tests
@author: Anthony Jarrett
"""
import unittest
from python.src.simulation import particleframework
class WindSettingsTestCase(unittest.TestCase):
def test_init(self):
# Initialize parameters
north_percentage = 5
... | 27.037975 | 75 | 0.617041 | 4,093 | 0.958099 | 0 | 0 | 0 | 0 | 0 | 0 | 552 | 0.129213 |
2b12bcc09d43893147348ccc3696625e690b010c | 3,817 | py | Python | src/views/botones/informacion/boton_informacion.py | julianVelandia/UI_RETEDECON | 87b707f5c1553446fc92265db9da50f292e2f2d1 | [
"MIT"
] | 3 | 2022-02-27T02:15:52.000Z | 2022-02-28T15:16:40.000Z | src/views/botones/informacion/boton_informacion.py | julianVelandia/UI_RETEDECON | 87b707f5c1553446fc92265db9da50f292e2f2d1 | [
"MIT"
] | null | null | null | src/views/botones/informacion/boton_informacion.py | julianVelandia/UI_RETEDECON | 87b707f5c1553446fc92265db9da50f292e2f2d1 | [
"MIT"
] | null | null | null | from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
#locals
from .funciones_informacion import Funcion_informacion
from src.views.botones.inicio.funciones import *
class Boton_informacion(Funcion_informacion):
def boton_informacion_manual(self, widget):
self.informacion_manu... | 59.640625 | 113 | 0.632172 | 3,629 | 0.94851 | 0 | 0 | 0 | 0 | 0 | 0 | 896 | 0.234187 |
2b13c9bdd22e18cff242d5292bbf3eb9e6c0efa1 | 263 | py | Python | 1030 Brick Layout.py | ansabgillani/binarysearchcomproblems | 12fe8632f8cbb5058c91a55bae53afa813a3247e | [
"MIT"
] | null | null | null | 1030 Brick Layout.py | ansabgillani/binarysearchcomproblems | 12fe8632f8cbb5058c91a55bae53afa813a3247e | [
"MIT"
] | null | null | null | 1030 Brick Layout.py | ansabgillani/binarysearchcomproblems | 12fe8632f8cbb5058c91a55bae53afa813a3247e | [
"MIT"
] | null | null | null | class Solution:
def solve(self, bricks, width, height):
dp = [0]*(width+1)
dp[0] = 1
for i in range(len(dp)):
for brick in bricks:
dp[i] += dp[i-brick] if i-brick >= 0 else 0
return dp[-1]**height
| 23.909091 | 59 | 0.48289 | 262 | 0.996198 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2b14e1f101cb9c3f4df93b0023935c69cc41ca60 | 6,801 | py | Python | Malt/SourceTranspiler.py | panthavma/Malt | 918bce21a131e472db7a136a3cb851bda9237a7f | [
"MIT-0",
"MIT"
] | null | null | null | Malt/SourceTranspiler.py | panthavma/Malt | 918bce21a131e472db7a136a3cb851bda9237a7f | [
"MIT-0",
"MIT"
] | null | null | null | Malt/SourceTranspiler.py | panthavma/Malt | 918bce21a131e472db7a136a3cb851bda9237a7f | [
"MIT-0",
"MIT"
] | null | null | null | import textwrap
#TODO: Send transpiler along graph types
class SourceTranspiler():
@classmethod
def get_source_name(self, name):
name = name.replace('.','_').replace(' ', '_')
name = '_' + ''.join(char for char in name if char.isalnum() or char == '_')
while '__' in name:
... | 32.385714 | 121 | 0.624761 | 6,738 | 0.990737 | 0 | 0 | 6,391 | 0.939715 | 0 | 0 | 1,263 | 0.185708 |
2b157c7b02563c277a3b074729ba1a44f8eb0df3 | 113 | py | Python | endpoints/projects.py | FLUX-SE/TrackedHQ_python_wrapper | d35f868698d0ba0cb2fdb820317f7460b154a6d0 | [
"MIT"
] | null | null | null | endpoints/projects.py | FLUX-SE/TrackedHQ_python_wrapper | d35f868698d0ba0cb2fdb820317f7460b154a6d0 | [
"MIT"
] | null | null | null | endpoints/projects.py | FLUX-SE/TrackedHQ_python_wrapper | d35f868698d0ba0cb2fdb820317f7460b154a6d0 | [
"MIT"
] | null | null | null | from .base import Resource
class Projects(Resource):
def list(self):
return self._get("/projects")
| 16.142857 | 37 | 0.672566 | 83 | 0.734513 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.097345 |
2b15e166bdadb8379f269e4e1a5eb613b13e1d82 | 3,173 | py | Python | src/feature_creation.py | aswain571/m5_forecasting | 3b7fccd56a4c14c38bbcff6b11f82cd440132730 | [
"MIT"
] | null | null | null | src/feature_creation.py | aswain571/m5_forecasting | 3b7fccd56a4c14c38bbcff6b11f82cd440132730 | [
"MIT"
] | null | null | null | src/feature_creation.py | aswain571/m5_forecasting | 3b7fccd56a4c14c38bbcff6b11f82cd440132730 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import pickle
from preprocess import process_ds
from sklearn.preprocessing import LabelEncoder
def transform_cat_feats(df):
"""makes null columns into unknown and cat columns
are label encoded
Args:
df (pd.DataFrame): Dataframe with the sales data.
Returns:
... | 25.58871 | 78 | 0.632524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,458 | 0.459502 |
2b175fc4f0131469f592b2c384a3aa753931cdfb | 294 | py | Python | setup.py | bzdvdn/sipuni-api-wrapper | 44c799244388e65e9f455ed21dd16481be36f5f6 | [
"MIT"
] | 1 | 2019-12-05T14:28:31.000Z | 2019-12-05T14:28:31.000Z | setup.py | bzdvdn/sipuni-api-wrapper | 44c799244388e65e9f455ed21dd16481be36f5f6 | [
"MIT"
] | 3 | 2020-03-24T17:55:25.000Z | 2021-02-02T22:22:17.000Z | setup.py | bzdvdn/sipuni-api-wrapper | 44c799244388e65e9f455ed21dd16481be36f5f6 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='sipuni-api',
version='0.0.1.1',
packages=find_packages(),
install_requires=[
'requests'
],
author='bzdvdn',
author_email='bzdv.dn@gmail.com',
url='https://github.com/bzdvdn/sipuni-api-wrapper',
)
| 21 | 55 | 0.642857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 104 | 0.353741 |
2b178eeae032ec25548f56cb6c96df9b289d22b5 | 6,545 | py | Python | cosmosis/output/fits_output.py | annis/cosmosis | 55efc1bc2260ca39298c584ae809fa2a8e72a38e | [
"BSD-2-Clause"
] | 2 | 2021-06-18T14:11:59.000Z | 2022-02-23T19:19:36.000Z | cosmosis/output/fits_output.py | annis/cosmosis | 55efc1bc2260ca39298c584ae809fa2a8e72a38e | [
"BSD-2-Clause"
] | 2 | 2021-11-02T12:44:24.000Z | 2022-03-30T15:09:48.000Z | cosmosis/output/fits_output.py | annis/cosmosis | 55efc1bc2260ca39298c584ae809fa2a8e72a38e | [
"BSD-2-Clause"
] | 2 | 2022-03-25T21:26:27.000Z | 2022-03-29T06:37:46.000Z | from .output_base import OutputBase
from . import utils
import numpy as np
import os
from glob import glob
from collections import OrderedDict
try:
import fitsio
except ImportError:
fitsio = None
comment_indicator = "_cosmosis_comment_indicator_"
final_metadata_indicator = "FINALMETA"
unreserve_indicator = "UN... | 33.055556 | 201 | 0.603209 | 5,809 | 0.887548 | 0 | 0 | 3,099 | 0.473491 | 0 | 0 | 1,128 | 0.172345 |
2b17cbd8a9488937054f8a24306f05f58eb7a8b6 | 2,757 | py | Python | micromath/fibonacci/test_fibonacci.py | hedrox/micromath | 0f300da914c844e5ff0775f25119909f748de635 | [
"MIT"
] | null | null | null | micromath/fibonacci/test_fibonacci.py | hedrox/micromath | 0f300da914c844e5ff0775f25119909f748de635 | [
"MIT"
] | null | null | null | micromath/fibonacci/test_fibonacci.py | hedrox/micromath | 0f300da914c844e5ff0775f25119909f748de635 | [
"MIT"
] | null | null | null | import logging
import json
from server import app
app.testing = True
logging.disable(logging.ERROR)
class TestFibonacci:
def test_correct_fibonacci(self):
with app.test_client() as client:
body = {'number': 16}
result = client.post('/api/v1/fibonacci', json=body)
ass... | 33.621951 | 64 | 0.564019 | 2,652 | 0.961915 | 0 | 0 | 0 | 0 | 0 | 0 | 481 | 0.174465 |
2b1c1953cad2c24ae38087460d540f5ab88ef710 | 278 | py | Python | app.py | M3nin0/selectToTex | 423cfdafdd0bd391c30cbbf70386f74e93844c2f | [
"BSD-2-Clause"
] | 4 | 2018-06-06T15:35:51.000Z | 2020-01-19T15:47:23.000Z | app.py | M3nin0/selectToTex | 423cfdafdd0bd391c30cbbf70386f74e93844c2f | [
"BSD-2-Clause"
] | null | null | null | app.py | M3nin0/selectToTex | 423cfdafdd0bd391c30cbbf70386f74e93844c2f | [
"BSD-2-Clause"
] | null | null | null | from selecttotex.totex import Totex
# Criando instância do SelectToTex
tt = Totex()
# Comandos que serão utilizados
commands = ['SELECT * FROM aluno;', 'SELECT * FROM materia;', 'SELECT * FROM matricula;']
# Chama a função para a conversão
tt.to_tex(commands, 'tabelas.txt')
| 25.272727 | 89 | 0.733813 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 188 | 0.664311 |
2b1d50c991de2a9641935aabe9ff1cac8d06aaa8 | 506 | py | Python | demo/blog/migrations/0003_auto_20200424_2258.py | erdem/django-marshmallow | 3b9f3cefd70d98e9348f5a69fa61837ca28be7a6 | [
"MIT"
] | 3 | 2020-05-05T16:17:34.000Z | 2021-05-13T19:05:12.000Z | demo/blog/migrations/0003_auto_20200424_2258.py | erdem/django-marshmallow | 3b9f3cefd70d98e9348f5a69fa61837ca28be7a6 | [
"MIT"
] | 3 | 2021-09-08T02:12:25.000Z | 2022-03-12T00:36:59.000Z | demo/blog/migrations/0003_auto_20200424_2258.py | erdem/django-marshmallow | 3b9f3cefd70d98e9348f5a69fa61837ca28be7a6 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.11 on 2020-04-24 22:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0002_tag_related_tags'),
]
operations = [
migrations.RemoveField(
model_name='tag',
name='related_tags',
... | 22 | 67 | 0.571146 | 412 | 0.814229 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.247036 |
2b1da2d3ed1a52018f6ec06f4c582bd00a0d9184 | 6,682 | py | Python | python/vtool/maya_lib/ui.py | louisVottero/vtool | 4e2592df5841829e790251dc6923e45c8d013091 | [
"MIT"
] | 3 | 2022-02-22T01:00:59.000Z | 2022-03-07T16:19:27.000Z | python/vtool/maya_lib/ui.py | louisVottero/vtool | 4e2592df5841829e790251dc6923e45c8d013091 | [
"MIT"
] | 4 | 2022-03-04T05:25:44.000Z | 2022-03-11T04:51:35.000Z | python/vtool/maya_lib/ui.py | louisVottero/vtool | 4e2592df5841829e790251dc6923e45c8d013091 | [
"MIT"
] | 1 | 2022-03-31T23:07:09.000Z | 2022-03-31T23:07:09.000Z | # Copyright (C) 2022 Louis Vottero louis.vot@gmail.com All rights reserved.
from __future__ import absolute_import
import maya.cmds as cmds
import maya.utils
import maya.mel as mel
from maya.app.general.mayaMixin import MayaQWidgetBaseMixin, MayaQWidgetDockableMixin
from maya import OpenMayaUI as omui
... | 28.678112 | 140 | 0.611344 | 3,305 | 0.494612 | 0 | 0 | 0 | 0 | 0 | 0 | 611 | 0.09144 |
2b1e286ea315966366a86b5a9f5142b3ebdb896b | 4,748 | py | Python | xtbservice/models.py | cheminfo-py/xtbservice | d9227ea9e4647fe302cc3c1e9d57838fff938cd4 | [
"MIT"
] | 2 | 2022-01-28T02:59:28.000Z | 2022-01-31T15:47:30.000Z | xtbservice/models.py | cheminfo-py/xtbservice | d9227ea9e4647fe302cc3c1e9d57838fff938cd4 | [
"MIT"
] | 17 | 2021-09-13T12:26:57.000Z | 2022-01-31T22:35:49.000Z | xtbservice/models.py | cheminfo-py/xtbservice | d9227ea9e4647fe302cc3c1e9d57838fff938cd4 | [
"MIT"
] | 1 | 2022-01-26T08:17:50.000Z | 2022-01-26T08:17:50.000Z | # -*- coding: utf-8 -*-
from dataclasses import dataclass
from typing import Dict, List, Optional
import numpy as np
from ase import Atoms
from pydantic import BaseModel, Field, validator
ALLOWED_METHODS = ("GFNFF", "GFN2xTB", "GFN1xTB")
ALLOWED_FF = ("uff", "mmff94", "mmff94s")
@dataclass
class OptimizationResult:... | 40.931034 | 502 | 0.68829 | 4,440 | 0.93454 | 0 | 0 | 438 | 0.092191 | 0 | 0 | 2,391 | 0.503262 |
2b1f7bce8113efac8c0084ee01c17879a8efac3c | 4,590 | py | Python | heat/tests/test_common_param_utils.py | noironetworks/heat | 7cdadf1155f4d94cf8f967635b98e4012a7acfb7 | [
"Apache-2.0"
] | 265 | 2015-01-02T09:33:22.000Z | 2022-03-26T23:19:54.000Z | heat/tests/test_common_param_utils.py | noironetworks/heat | 7cdadf1155f4d94cf8f967635b98e4012a7acfb7 | [
"Apache-2.0"
] | 8 | 2015-09-01T15:43:19.000Z | 2021-12-14T05:18:23.000Z | heat/tests/test_common_param_utils.py | noironetworks/heat | 7cdadf1155f4d94cf8f967635b98e4012a7acfb7 | [
"Apache-2.0"
] | 295 | 2015-01-06T07:00:40.000Z | 2021-09-06T08:05:06.000Z | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 45.9 | 79 | 0.579956 | 3,940 | 0.858388 | 0 | 0 | 0 | 0 | 0 | 0 | 1,022 | 0.222658 |
2b202431420e6ee7ee27a4ade6e7bbf3a50a0b94 | 7,741 | py | Python | commander/thirdparty/covertutils/shells/multi/shell.py | how2how/ToyHome | 4457b1d28e21ed6fd4ab980a0f7fed345c570ae3 | [
"Apache-2.0"
] | 1 | 2020-07-26T01:08:30.000Z | 2020-07-26T01:08:30.000Z | commander/thirdparty/covertutils/shells/multi/shell.py | how2how/ToyHome | 4457b1d28e21ed6fd4ab980a0f7fed345c570ae3 | [
"Apache-2.0"
] | null | null | null | commander/thirdparty/covertutils/shells/multi/shell.py | how2how/ToyHome | 4457b1d28e21ed6fd4ab980a0f7fed345c570ae3 | [
"Apache-2.0"
] | null | null | null | import cmd
import sys
import argparse
import threading
from covertutils.handlers.multi import MultiHandler
#
# The idea is to pass a list of handlers to start with, and create a MultiHandler object from this list.
#
# The initial arguments for this should be a list of Shells. From shells, the handlers will be retrieve... | 34.101322 | 172 | 0.677949 | 7,270 | 0.939155 | 0 | 0 | 0 | 0 | 0 | 0 | 2,346 | 0.303062 |
2b219b5d2c6acf165fc3fb183df871cbdfc2a9e9 | 3,068 | py | Python | Aprior.py | zhangmingming-chb/Aprior | 69bea22f34d20bdc9984faf1fa021fac6e60ef38 | [
"MIT"
] | null | null | null | Aprior.py | zhangmingming-chb/Aprior | 69bea22f34d20bdc9984faf1fa021fac6e60ef38 | [
"MIT"
] | null | null | null | Aprior.py | zhangmingming-chb/Aprior | 69bea22f34d20bdc9984faf1fa021fac6e60ef38 | [
"MIT"
] | null | null | null | #-*-coding:utf-8-*-
from typing import List
from itertools import chain
class Aprior():
def __init__(self, support, confidence):
self.support = support
self.confidence = confidence
def set_transactions(self, transactions: List[List[str]]) -> None:
self.transactions = transactions
... | 29.5 | 81 | 0.496415 | 2,582 | 0.808897 | 0 | 0 | 0 | 0 | 0 | 0 | 576 | 0.180451 |
2b23c62c9bf29b77cf256e932af29e6d9da15c7b | 686 | py | Python | dlex/tf/models/base_v2.py | dvtrung/dl-torch | b49e57d10d32bb223e2d7643f2579ccc32c63a9a | [
"MIT"
] | null | null | null | dlex/tf/models/base_v2.py | dvtrung/dl-torch | b49e57d10d32bb223e2d7643f2579ccc32c63a9a | [
"MIT"
] | null | null | null | dlex/tf/models/base_v2.py | dvtrung/dl-torch | b49e57d10d32bb223e2d7643f2579ccc32c63a9a | [
"MIT"
] | null | null | null | import tensorflow as tf
from dlex import Params
from dlex.datasets.tf import Dataset
class BaseModel(tf.keras.Model):
def __init__(self, params: Params, dataset: Dataset):
super().__init__()
self.params = params
self.dataset = dataset
self._optimizer = None
self.... | 25.407407 | 58 | 0.603499 | 594 | 0.865889 | 0 | 0 | 156 | 0.227405 | 0 | 0 | 0 | 0 |
2b240ebab74f79c8c466f67dcad71acc3ab5e267 | 67 | py | Python | slack_bolt/context/respond/__init__.py | hirosassa/bolt-python | befc3a1463f3ac8dbb780d66decc304e2bdf3e7a | [
"MIT"
] | 504 | 2020-08-07T05:02:57.000Z | 2022-03-31T14:32:46.000Z | slack_bolt/context/respond/__init__.py | hirosassa/bolt-python | befc3a1463f3ac8dbb780d66decc304e2bdf3e7a | [
"MIT"
] | 560 | 2020-08-07T01:16:06.000Z | 2022-03-30T00:40:56.000Z | slack_bolt/context/respond/__init__.py | hirosassa/bolt-python | befc3a1463f3ac8dbb780d66decc304e2bdf3e7a | [
"MIT"
] | 150 | 2020-08-07T09:41:14.000Z | 2022-03-30T04:54:51.000Z | # Don't add async module imports here
from .respond import Respond
| 22.333333 | 37 | 0.791045 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.552239 |
2b2476addfb055d48f5d5ac598a8041fdc9fee29 | 1,259 | py | Python | pi/commands/token/reset.py | pan-net-security/pi-bundle | 1819caede77357331465216e0355eb2499d09cb4 | [
"MIT"
] | 2 | 2017-12-15T20:50:58.000Z | 2020-10-21T15:48:48.000Z | pi/commands/token/reset.py | pan-net-security/pi-bundle | 1819caede77357331465216e0355eb2499d09cb4 | [
"MIT"
] | 1 | 2017-10-26T09:28:30.000Z | 2017-10-26T10:33:41.000Z | pi/commands/token/reset.py | pan-net-security/pi-bundle | 1819caede77357331465216e0355eb2499d09cb4 | [
"MIT"
] | null | null | null | from pi.commands.token.base import TokenBase
import json
import re
class Reset(TokenBase):
def __init__(self):
super().__init__()
def run(self):
handler = self.parse_subcommand_
handler()
def reset(self):
results = []
# currently supporting just one argument
... | 26.787234 | 85 | 0.599682 | 1,190 | 0.945195 | 0 | 0 | 188 | 0.149325 | 0 | 0 | 338 | 0.268467 |
2b25709c41a264855b79fbdf3a37d395af6fdc3b | 4,500 | py | Python | canaries/canaries.py | wyatt-howe/canaries | 0bd0783e388dcee21fd3addd09a9299940627536 | [
"MIT"
] | null | null | null | canaries/canaries.py | wyatt-howe/canaries | 0bd0783e388dcee21fd3addd09a9299940627536 | [
"MIT"
] | null | null | null | canaries/canaries.py | wyatt-howe/canaries | 0bd0783e388dcee21fd3addd09a9299940627536 | [
"MIT"
] | null | null | null | """Library for loading dynamic library files.
Python library for choosing and loading dynamic library
files compatible with the operating environment.
"""
import doctest
import sys
import os.path
import platform
from ctypes import cdll, create_string_buffer
from multiprocessing import Pool
class canaries():
"""
... | 29.220779 | 79 | 0.543778 | 4,046 | 0.899111 | 0 | 0 | 1,681 | 0.373556 | 0 | 0 | 1,465 | 0.325556 |
2b25b21c76b9e5d09cd75db1cb54b32efea42278 | 906 | py | Python | examples/wsgi.py | eliziario/django-websocket-redis | e36449a622230dfc7af090471e0ae59b51526767 | [
"MIT"
] | 815 | 2015-01-04T03:02:03.000Z | 2022-03-18T21:48:48.000Z | examples/wsgi.py | eliziario/django-websocket-redis | e36449a622230dfc7af090471e0ae59b51526767 | [
"MIT"
] | 213 | 2015-01-06T14:15:32.000Z | 2022-01-28T17:35:45.000Z | examples/wsgi.py | eliziario/django-websocket-redis | e36449a622230dfc7af090471e0ae59b51526767 | [
"MIT"
] | 253 | 2015-01-02T16:38:15.000Z | 2022-03-30T20:43:58.000Z | # Django with Websocket for Redis under a single uWSGI server
# (for sites with low traffic)
#
# uwsgi --virtualenv /path/to/virtualenv --http :9090 --gevent 100 --http-websockets --module wsgi
#
# See: http://django-websocket-redis.readthedocs.io/en/latest/running.html#django-with-websockets-for-redis-as-a-stand-alo... | 36.24 | 137 | 0.788079 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 390 | 0.430464 |
2b25d82fa6f0f77480a8c0271786df4755236b12 | 136 | py | Python | src/py/twitter_credentials.py | franciscomoura/social-media-analysis | e277ad7b81952ec5d01c0801133e226f430daa6e | [
"Apache-2.0"
] | null | null | null | src/py/twitter_credentials.py | franciscomoura/social-media-analysis | e277ad7b81952ec5d01c0801133e226f430daa6e | [
"Apache-2.0"
] | null | null | null | src/py/twitter_credentials.py | franciscomoura/social-media-analysis | e277ad7b81952ec5d01c0801133e226f430daa6e | [
"Apache-2.0"
] | null | null | null | consumer_key = '<your key>'
consumer_secret = '<your secret>'
access_token = '<your token>'
access_token_secret = '<your token secret>'
| 27.2 | 43 | 0.727941 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.455882 |
2b275e20cb5d8a0781ea95c53cddfe783077cf6e | 1,820 | py | Python | pmaf/pipe/agents/miners/_metakit.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | 1 | 2021-07-02T06:24:17.000Z | 2021-07-02T06:24:17.000Z | pmaf/pipe/agents/miners/_metakit.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T12:02:46.000Z | 2021-06-28T12:02:46.000Z | pmaf/pipe/agents/miners/_metakit.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | null | null | null | from abc import ABC, abstractmethod
class MinerBackboneMetabase(ABC):
""" """
@abstractmethod
def verify_docker(self,docker):
"""
Parameters
----------
docker :
Returns
-------
"""
pass
@abstractmethod
def yield_acces... | 14.108527 | 62 | 0.392308 | 1,776 | 0.975824 | 0 | 0 | 1,677 | 0.921429 | 0 | 0 | 896 | 0.492308 |
2b27627202fcf16a1bd8bdf2adc4734f515109a8 | 45 | py | Python | 01_hello/hello02_comment.py | rebeckaflynn/tiny_python_projects | 692f24dd00769438e7aaa1c45223b701b20a1192 | [
"MIT"
] | null | null | null | 01_hello/hello02_comment.py | rebeckaflynn/tiny_python_projects | 692f24dd00769438e7aaa1c45223b701b20a1192 | [
"MIT"
] | null | null | null | 01_hello/hello02_comment.py | rebeckaflynn/tiny_python_projects | 692f24dd00769438e7aaa1c45223b701b20a1192 | [
"MIT"
] | null | null | null | # Purpose: Say hello
print('Hello, World!')
| 11.25 | 22 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0.777778 |
2b28b58e2579cbe5e2ab26c5528edcabd5571c91 | 1,074 | py | Python | docs/end-to-end/library/GeocontribOnCoordinatesLibrary.py | hcharp/geocontrib | 87ee241c737aae23eff358d2550bddba714f9c7b | [
"Apache-2.0"
] | 3 | 2020-12-02T09:44:41.000Z | 2021-04-17T13:05:30.000Z | docs/end-to-end/library/GeocontribOnCoordinatesLibrary.py | hcharp/geocontrib | 87ee241c737aae23eff358d2550bddba714f9c7b | [
"Apache-2.0"
] | 14 | 2020-01-27T09:49:33.000Z | 2021-06-14T08:04:10.000Z | docs/end-to-end/library/GeocontribOnCoordinatesLibrary.py | hcharp/geocontrib | 87ee241c737aae23eff358d2550bddba714f9c7b | [
"Apache-2.0"
] | 9 | 2020-01-16T12:37:39.000Z | 2021-04-22T09:57:59.000Z | # Copyright (c) 2017-2021 Neogeo-Technologies.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 42.96 | 113 | 0.76257 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 692 | 0.64432 |
2b2938cdd0a73902522794999f575e5ff3fb8b89 | 3,341 | py | Python | torch/quantization/fx/qconfig_utils.py | deltabravozulu/pytorch | c6eef589971e45bbedacc7f65533d1b8f80a6895 | [
"Intel"
] | 1 | 2021-06-17T13:02:45.000Z | 2021-06-17T13:02:45.000Z | torch/quantization/fx/qconfig_utils.py | deltabravozulu/pytorch | c6eef589971e45bbedacc7f65533d1b8f80a6895 | [
"Intel"
] | 1 | 2022-01-18T12:17:29.000Z | 2022-01-18T12:17:29.000Z | torch/quantization/fx/qconfig_utils.py | deltabravozulu/pytorch | c6eef589971e45bbedacc7f65533d1b8f80a6895 | [
"Intel"
] | 2 | 2021-07-02T10:18:21.000Z | 2021-08-18T10:10:28.000Z | import torch
from collections import OrderedDict
from typing import Union, Callable, Any, Dict
import re
from .utils import _parent_name
QConfigAny = Union[torch.quantization.QConfig,
torch.quantization.QConfigDynamic, None]
def get_flattened_qconfig_dict(qconfig_dict):
""" flatten the global,... | 33.41 | 81 | 0.701287 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,055 | 0.315774 |
2b2a9c9a4b580fa5f2d5bbe38b2d93f37f8e19c1 | 3,062 | py | Python | researchmap/wrapper.py | RTa-technology/researchmap.py | 6aa427e1564644b20ba2001dfecf63457ef40463 | [
"MIT"
] | null | null | null | researchmap/wrapper.py | RTa-technology/researchmap.py | 6aa427e1564644b20ba2001dfecf63457ef40463 | [
"MIT"
] | null | null | null | researchmap/wrapper.py | RTa-technology/researchmap.py | 6aa427e1564644b20ba2001dfecf63457ef40463 | [
"MIT"
] | null | null | null | from typing import List
import urllib.parse
from .adapter import Adapter
__all__ = ['Wrapper']
class Wrapper:
"""Wrapper class for the Adapter class.
This class is used to wrap the Adapter class and provide a more
convenient interface for the user.
"""
def __init__(self, adapter: Adapter)... | 26.17094 | 95 | 0.612998 | 2,953 | 0.964402 | 0 | 0 | 0 | 0 | 0 | 0 | 1,624 | 0.530372 |
2b2dc91a67e56678c390a41ec58ff7af3ed3237a | 2,888 | py | Python | demo/MagicMind/python/calibrator_custom_data.py | huismiling/YOLOX | d9d1c1e8c6362c71703d34e25765a2dfe8618e4a | [
"Apache-2.0"
] | null | null | null | demo/MagicMind/python/calibrator_custom_data.py | huismiling/YOLOX | d9d1c1e8c6362c71703d34e25765a2dfe8618e4a | [
"Apache-2.0"
] | null | null | null | demo/MagicMind/python/calibrator_custom_data.py | huismiling/YOLOX | d9d1c1e8c6362c71703d34e25765a2dfe8618e4a | [
"Apache-2.0"
] | null | null | null | from typing import List
import cv2
import numpy
import magicmind.python.runtime as mm
from magicmind.python.common.types import get_numpy_dtype_by_datatype
import os
import sys
def preprocess(img, input_size, swap=(2, 0, 1)):
if len(img.shape) == 3:
padded_img = numpy.ones((input_size[0], input_size[1], ... | 35.219512 | 132 | 0.655125 | 1,490 | 0.515928 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.025623 |
2b2eb592acc995c4132c3288aeaefe49afa5e490 | 66,478 | py | Python | probreg/main.py | albertvisser/probreg | 5f685616221e3261afe0d8ae8506cad9a719fa82 | [
"MIT"
] | null | null | null | probreg/main.py | albertvisser/probreg | 5f685616221e3261afe0d8ae8506cad9a719fa82 | [
"MIT"
] | null | null | null | probreg/main.py | albertvisser/probreg | 5f685616221e3261afe0d8ae8506cad9a719fa82 | [
"MIT"
] | null | null | null | #! usr/bin/env python
"""Actie (was: problemen) Registratie, GUI toolkit onafhankelijke code
"""
import os
# import sys
import pathlib
import functools
import probreg.gui as gui
import probreg.shared as shared # import DataError, et_projnames
import probreg.dml_django as dmls
import probreg.dml_xml as dmlx
LIN = True... | 45.346521 | 101 | 0.55295 | 65,806 | 0.989817 | 0 | 0 | 0 | 0 | 0 | 0 | 15,216 | 0.228871 |
2b2fdb3f5840708a53911e04a2280ed67c225b83 | 6,055 | py | Python | back-end/python-scripts/add_vm.py | matteomitico/vtc-senior-project | 778b59537edae54fbcb284a862bad587469b96af | [
"MIT"
] | null | null | null | back-end/python-scripts/add_vm.py | matteomitico/vtc-senior-project | 778b59537edae54fbcb284a862bad587469b96af | [
"MIT"
] | null | null | null | back-end/python-scripts/add_vm.py | matteomitico/vtc-senior-project | 778b59537edae54fbcb284a862bad587469b96af | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import json
import sys, os
import virtualbox
from os.path import expanduser
from pprint import pprint
from subprocess import call
#create virtual machine from the repository
# arg1 = vmType
# arg2 = vmName
# return 1|0 success or failure
# list of all VMs
gateway = '155.42.97.220'
#gateway = ... | 34.798851 | 193 | 0.605945 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,699 | 0.6109 |
2b30462f4e15d1e7277002cce72ced8525343755 | 982 | py | Python | dailyblink/media.py | ptrstn/dailyblink | 16fe482552b101d83412bfbb662b8754682ba7d2 | [
"MIT"
] | 25 | 2020-05-01T16:34:11.000Z | 2022-02-19T09:39:20.000Z | dailyblink/media.py | ptrstn/dailyblink | 16fe482552b101d83412bfbb662b8754682ba7d2 | [
"MIT"
] | 24 | 2020-12-07T21:07:11.000Z | 2022-03-15T18:18:00.000Z | dailyblink/media.py | ptrstn/dailyblink | 16fe482552b101d83412bfbb662b8754682ba7d2 | [
"MIT"
] | 6 | 2021-03-05T09:19:37.000Z | 2022-01-01T08:25:14.000Z | import pathlib
from mutagen.mp4 import MP4
def create_file(content, path, mode):
pathlib.Path(path).parent.mkdir(parents=True, exist_ok=True)
with open(path, mode) as file:
file.write(content)
def save_media(media, file_path):
create_file(content=media, path=file_path, mode="wb")
def save_te... | 20.458333 | 64 | 0.647658 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.050916 |
2b307d66d8ef01ec6b560b96a1fec0c928cc9a2d | 22,878 | py | Python | src/server/server.py | HanseMerkur/cassh | 947023ad7971a0922d56aaaee5afcdf9294334e3 | [
"Apache-2.0"
] | null | null | null | src/server/server.py | HanseMerkur/cassh | 947023ad7971a0922d56aaaee5afcdf9294334e3 | [
"Apache-2.0"
] | null | null | null | src/server/server.py | HanseMerkur/cassh | 947023ad7971a0922d56aaaee5afcdf9294334e3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Sign a user's SSH public key.
"""
from argparse import ArgumentParser
from json import dumps
from os import remove
from re import compile as re_compile, IGNORECASE
from tempfile import NamedTemporaryFile
from urllib.parse import unquote_plus
# Third party library imports
from configparser im... | 33.447368 | 110 | 0.563992 | 17,033 | 0.744514 | 0 | 0 | 0 | 0 | 0 | 0 | 7,241 | 0.316505 |
2b31dd8ff5a66ac8bf0442f51e45b1fcb61fee3b | 23,469 | py | Python | src/test/test_data.py | opploans/cbc-syslog | 72a203b1dbe6ddd97f02dc87f36631d758564022 | [
"MIT"
] | 14 | 2020-04-28T12:52:50.000Z | 2021-08-25T00:36:51.000Z | src/test/test_data.py | opploans/cbc-syslog | 72a203b1dbe6ddd97f02dc87f36631d758564022 | [
"MIT"
] | 21 | 2016-10-24T20:16:39.000Z | 2020-02-11T21:30:50.000Z | src/test/test_data.py | opploans/cbc-syslog | 72a203b1dbe6ddd97f02dc87f36631d758564022 | [
"MIT"
] | 15 | 2016-12-19T20:39:24.000Z | 2020-01-02T16:26:34.000Z | # -*- coding: utf-8 -*-
null = ""
true = "true"
false = "false"
raw_notifications = {
"notifications": [{
"threatInfo": {
"incidentId": "Z7NG6",
"score": 7,
"summary": "A known virus (Sality: Keylogger, Password or Data stealer, Backdoor) was detected running.",
... | 116.761194 | 6,890 | 0.711023 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19,038 | 0.811198 |