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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
db9d8c67bcfd3a7c9d253f50f4a6bf8badfcdb9c | 592 | py | Python | betterbib/__init__.py | tbabej/betterbib | 80a3c9040232d9988f9a1e4c40724b40b9b9ed85 | [
"MIT"
] | null | null | null | betterbib/__init__.py | tbabej/betterbib | 80a3c9040232d9988f9a1e4c40724b40b9b9ed85 | [
"MIT"
] | null | null | null | betterbib/__init__.py | tbabej/betterbib | 80a3c9040232d9988f9a1e4c40724b40b9b9ed85 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
from __future__ import print_function
from betterbib.__about__ import (
__version__,
__author__,
__author_email__,
__website__,
)
from betterbib.tools import (
create_dict,
decode,
pybtex_to_dict,
pybtex_to_bibtex_string,
write,
update,
Journal... | 18.5 | 59 | 0.701014 |
db9da718184383db0fb17735d540dd6d59f6b655 | 5,830 | py | Python | base/views.py | omololevy/my_portfolio | 29f8892c3a6e40a9c05c85110301987005d2c5c1 | [
"MIT"
] | 2 | 2021-12-25T23:11:03.000Z | 2021-12-26T07:09:35.000Z | base/views.py | omololevy/portfolio | 29f8892c3a6e40a9c05c85110301987005d2c5c1 | [
"MIT"
] | 6 | 2022-01-15T15:38:36.000Z | 2022-02-22T17:17:59.000Z | base/views.py | omololevy/my_portfolio | 29f8892c3a6e40a9c05c85110301987005d2c5c1 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.core.mail import EmailMessage
from django.conf import settings
from django.template.loader imp... | 25.911111 | 91 | 0.732247 |
db9dc14c3ce1122987ebe56a59b8a07194d400d2 | 30,282 | py | Python | radioLib/pastebin/pastebin.py | hephaestus9/Radio | c1560c25def211ab6354fb0aa5cc935e2851c8f0 | [
"MIT"
] | 1 | 2021-05-17T08:31:07.000Z | 2021-05-17T08:31:07.000Z | lib/pastebin/pastebin.py | hephaestus9/Ironworks | 37be48e37f63530dd7bf82618948ef82522699a0 | [
"MIT"
] | null | null | null | lib/pastebin/pastebin.py | hephaestus9/Ironworks | 37be48e37f63530dd7bf82618948ef82522699a0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#############################################################################
# Pastebin.py - Python 3.2 Pastebin API.
# Copyright (C) 2012 Ian Havelock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as ... | 38.186633 | 125 | 0.533848 |
dba0ab7feb9b0f1f06f733ef048e8a1aa5355e67 | 2,544 | py | Python | app/requests.py | seron-ux/News-app | d22b256b26fb9fa2bb77658952139b9ddebb8f8c | [
"MIT"
] | 1 | 2021-04-16T12:03:37.000Z | 2021-04-16T12:03:37.000Z | app/requests.py | seron-ux/News-app | d22b256b26fb9fa2bb77658952139b9ddebb8f8c | [
"MIT"
] | null | null | null | app/requests.py | seron-ux/News-app | d22b256b26fb9fa2bb77658952139b9ddebb8f8c | [
"MIT"
] | null | null | null | import urllib.request,json
from .models import News
import requests
News = News
# Getting api key
api_key = None
# Getting the news base url
base_url = None
base_url2 = None
def get_news(category):
'''
Function that gets the json responce to our url request
'''
get_news_url = base_url.format(categor... | 26.5 | 109 | 0.688286 |
dba12a8374326bf93ca2bf2928409a83d003c3d7 | 861 | py | Python | leetcode/151_reverse _words_in_a_string.py | caoxudong/code_practice | cb960cf69d67ae57b35f0691d35e15c11989e6d2 | [
"MIT"
] | 1 | 2020-06-19T11:23:46.000Z | 2020-06-19T11:23:46.000Z | leetcode/151_reverse _words_in_a_string.py | caoxudong/code_practice | cb960cf69d67ae57b35f0691d35e15c11989e6d2 | [
"MIT"
] | null | null | null | leetcode/151_reverse _words_in_a_string.py | caoxudong/code_practice | cb960cf69d67ae57b35f0691d35e15c11989e6d2 | [
"MIT"
] | null | null | null | """
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
For C programmers: Try to solve it in-place in O(1) space.
Clarification:
* What constitutes a word?
A sequence of non-space characters constitutes a word.
* Could the inp... | 28.7 | 86 | 0.680604 |
dba13534887cbe280b6557621729a3e4996855c7 | 1,250 | py | Python | toontown/uberdog/DistributedInGameNewsMgr.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/uberdog/DistributedInGameNewsMgr.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/uberdog/DistributedInGameNewsMgr.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | import socket, datetime, os
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
from direct.distributed.DistributedObject import DistributedObject
from toontown.toonbase import ToontownGlobals
from toontown.uberdog import InGameNewsResponses
| 32.051282 | 92 | 0.728 |
dba13fb4439b8ad0fa549819c5076a87665d49e6 | 3,540 | py | Python | Day10/loops.py | azeemchaudhrry/30DaysofPython | 8aa80c81967d87e4bc70254a41517d0303ca0599 | [
"MIT"
] | null | null | null | Day10/loops.py | azeemchaudhrry/30DaysofPython | 8aa80c81967d87e4bc70254a41517d0303ca0599 | [
"MIT"
] | null | null | null | Day10/loops.py | azeemchaudhrry/30DaysofPython | 8aa80c81967d87e4bc70254a41517d0303ca0599 | [
"MIT"
] | null | null | null | # Day 10 Loops
from countries import *
# While Loop
# count = 0
# while count < 5:
# if count == 3:
# break
# print(count)
# count = count + 1
# numbers = [0,2,3,4,5,6,7,8,9,10]
# for number in numbers:
# print(number)
# language = 'Python'
# for letter in language:
# print(letter)
# tp... | 22.547771 | 150 | 0.530508 |
dba3388df291e70cf8ca9ead3a8d7661985dbeac | 10,412 | py | Python | tessera-server/tessera/views_api.py | Dimas625/tessera | 8e554f217220228fb8a0662fb5075cb839e9f1b1 | [
"Apache-2.0"
] | 379 | 2015-01-02T19:12:10.000Z | 2016-12-05T05:41:47.000Z | tessera-server/tessera/views_api.py | Dimas625/tessera | 8e554f217220228fb8a0662fb5075cb839e9f1b1 | [
"Apache-2.0"
] | 129 | 2015-01-07T04:21:05.000Z | 2016-07-24T18:37:43.000Z | tessera-server/tessera/views_api.py | Dimas625/tessera | 8e554f217220228fb8a0662fb5075cb839e9f1b1 | [
"Apache-2.0"
] | 44 | 2015-01-05T13:48:40.000Z | 2016-11-23T07:11:41.000Z | # -*- mode:python -*-
import flask
import json
import logging
from datetime import datetime
import inflection
from functools import wraps
from flask import request, url_for
from werkzeug.exceptions import HTTPException
from .client.api.model import *
from . import database
from . import helpers
from .application imp... | 34.25 | 104 | 0.634364 |
dba3bf31e30dbc6e19d1f005b15ec72aaafc1178 | 4,175 | py | Python | modules/aws_service.py | Darkcybe/attack_range | b135251cc40e527e78e6e826759e421fb3834577 | [
"Apache-2.0"
] | 1 | 2020-08-26T18:14:17.000Z | 2020-08-26T18:14:17.000Z | modules/aws_service.py | Darkcybe/attack_range | b135251cc40e527e78e6e826759e421fb3834577 | [
"Apache-2.0"
] | null | null | null | modules/aws_service.py | Darkcybe/attack_range | b135251cc40e527e78e6e826759e421fb3834577 | [
"Apache-2.0"
] | null | null | null | import sys
import re
import boto3
from botocore.exceptions import ClientError
import uuid
import time
import yaml
import os
# def upload_file_s3_bucket(file_name, results, test_file, isArchive):
# region = config['region']
# s3_client = boto3.client('s3', region_name=region)
# if isArchive:
# ... | 36.946903 | 159 | 0.640958 |
dba4148e040528b537c6483d7f1281dc550a6268 | 5,685 | py | Python | pystacknet/metrics.py | KevinMichaelSchindler/pystacknet | bb723511787be6a0828d2ec5ef141fa76b80ef84 | [
"MIT"
] | null | null | null | pystacknet/metrics.py | KevinMichaelSchindler/pystacknet | bb723511787be6a0828d2ec5ef141fa76b80ef84 | [
"MIT"
] | null | null | null | pystacknet/metrics.py | KevinMichaelSchindler/pystacknet | bb723511787be6a0828d2ec5ef141fa76b80ef84 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Aug 31 18:33:58 2018
@author: Marios Michailidis
metrics and method to check metrics used within StackNet
"""
from sklearn.metrics import mean_squared_error, mean_absolute_error, r2_score , mean_squared_log_error #regression metrics
from sklearn.metrics import roc_auc_sco... | 36.210191 | 140 | 0.628672 |
dba7508f72db5159de10c2533d780968df627768 | 5,629 | py | Python | check_logstash_pipeline.py | stdevel/nagios-plugins | 5ea0e186fa6fdd0e70681c7fed02c6d46d50bbb5 | [
"IBM-pibs",
"Apache-1.1"
] | null | null | null | check_logstash_pipeline.py | stdevel/nagios-plugins | 5ea0e186fa6fdd0e70681c7fed02c6d46d50bbb5 | [
"IBM-pibs",
"Apache-1.1"
] | null | null | null | check_logstash_pipeline.py | stdevel/nagios-plugins | 5ea0e186fa6fdd0e70681c7fed02c6d46d50bbb5 | [
"IBM-pibs",
"Apache-1.1"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
# vim:ts=4:sts=4:sw=4:et
#
# Author: Hari Sekhon
# Date: 2017-11-24 21:10:35 +0100 (Fri, 24 Nov 2017)
#
# https://github.com/harisekhon/nagios-plugins
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on Linke... | 39.921986 | 119 | 0.637413 |
dba89946ffbf4b4e0ca04987e645e105d52edb8a | 2,412 | py | Python | dags/mailsdag.py | rvacaru/airflow-training-skeleton | 45fc6a8938d055b98c62c85b7c8085cb7d6f23ba | [
"Apache-2.0"
] | null | null | null | dags/mailsdag.py | rvacaru/airflow-training-skeleton | 45fc6a8938d055b98c62c85b7c8085cb7d6f23ba | [
"Apache-2.0"
] | null | null | null | dags/mailsdag.py | rvacaru/airflow-training-skeleton | 45fc6a8938d055b98c62c85b7c8085cb7d6f23ba | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 25.125 | 66 | 0.717247 |
dba99e90b4b43e354898ce74c9ce989b11885ee9 | 1,359 | py | Python | appengine-compat/exported_appengine_sdk/google/storage/speckle/proto/jdbc_type.py | speedplane/python-compat-runtime | 743ade7e1350c790c4aaa48dd2c0893d06d80cee | [
"Apache-2.0"
] | 26 | 2015-01-20T08:02:38.000Z | 2020-06-10T04:57:41.000Z | appengine-compat/exported_appengine_sdk/google/storage/speckle/proto/jdbc_type.py | speedplane/python-compat-runtime | 743ade7e1350c790c4aaa48dd2c0893d06d80cee | [
"Apache-2.0"
] | 53 | 2016-04-06T21:10:43.000Z | 2018-03-19T23:14:33.000Z | appengine-compat/exported_appengine_sdk/google/storage/speckle/proto/jdbc_type.py | speedplane/python-compat-runtime | 743ade7e1350c790c4aaa48dd2c0893d06d80cee | [
"Apache-2.0"
] | 23 | 2016-04-19T05:45:26.000Z | 2021-12-31T23:22:36.000Z | #!/usr/bin/env python
#
# Copyright 2007 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 o... | 20.283582 | 74 | 0.725533 |
dbaa5fe4d5410450515867da0876df0842647fcf | 2,406 | py | Python | GestiRED/views.py | osabogal10/GestiREDBackend | 99aa3b01bd67910cc0f96751c88d0f4e83763392 | [
"MIT"
] | null | null | null | GestiRED/views.py | osabogal10/GestiREDBackend | 99aa3b01bd67910cc0f96751c88d0f4e83763392 | [
"MIT"
] | null | null | null | GestiRED/views.py | osabogal10/GestiREDBackend | 99aa3b01bd67910cc0f96751c88d0f4e83763392 | [
"MIT"
] | 1 | 2018-11-19T00:08:05.000Z | 2018-11-19T00:08:05.000Z | from django.http import HttpResponse
from django.core.mail import send_mail
import json
from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from GestiRED.models import User
from GestiRED.models import QualityControl, Phase, Resource, ResourceType,PhaseType
from django.core import se... | 36.454545 | 130 | 0.656692 |
dbaa65a763de8c1cfbc863205e539ed71151b214 | 2,181 | py | Python | ext_modules/_maix_nn/example/yolo2_camera.py | sipeed/python3-maix | 9ced31b8f1c1e4ef93b6a57bbfced27ae9e3361e | [
"MIT"
] | 93 | 2021-01-12T01:56:06.000Z | 2022-03-30T12:52:01.000Z | ext_modules/_maix_nn/example/yolo2_camera.py | JasperG1998/MaixPy3 | b36800b8d6aebf55018894c215c23a73d2fe406d | [
"MIT"
] | 29 | 2021-02-04T10:37:26.000Z | 2022-03-20T15:10:55.000Z | ext_modules/_maix_nn/example/yolo2_camera.py | JasperG1998/MaixPy3 | b36800b8d6aebf55018894c215c23a73d2fe406d | [
"MIT"
] | 25 | 2021-01-25T18:10:09.000Z | 2022-03-31T13:55:36.000Z |
from maix import nn
from PIL import Image, ImageDraw, ImageFont
from maix import display, camera
import time
from maix.nn import decoder
camera.config(size=(224, 224))
model = {
"param": "/root/models/yolo2_face_awnn.param",
"bin": "/root/models/yolo2_face_awnn.bin"
}
options = {
"model_type": "aw... | 27.2625 | 111 | 0.596057 |
dbaa6f31a1ce95280bfdff82b4090e6bc54d2002 | 10,143 | py | Python | tests/test_metadata_options.py | Fatal1ty/mashumaro | f32acf98f7cc7cdf638b921fe3fde96bef4fbefb | [
"Apache-2.0"
] | 394 | 2018-11-09T11:55:11.000Z | 2022-03-27T07:39:48.000Z | tests/test_metadata_options.py | Fatal1ty/mashumaro | f32acf98f7cc7cdf638b921fe3fde96bef4fbefb | [
"Apache-2.0"
] | 70 | 2018-12-10T19:43:01.000Z | 2022-03-17T07:37:45.000Z | tests/test_metadata_options.py | Fatal1ty/mashumaro | f32acf98f7cc7cdf638b921fe3fde96bef4fbefb | [
"Apache-2.0"
] | 29 | 2018-12-10T19:44:19.000Z | 2022-03-11T00:12:26.000Z | from dataclasses import dataclass, field
from datetime import date, datetime, time, timezone
from pathlib import Path
from typing import Any, Dict, Optional, Union
import ciso8601
import pytest
from mashumaro import DataClassDictMixin
from mashumaro.exceptions import UnserializableField
from mashumaro.types import Se... | 30.1875 | 79 | 0.648822 |
dbaa809e32092c26124943dd02d9f08d50cbc16b | 3,152 | py | Python | Intent model/Intent_model.py | yashrajt/college_FAQ-chatbot | b3a2a1b4958068b652d019c13f31f6329b093c0a | [
"MIT"
] | 4 | 2020-10-02T20:27:03.000Z | 2021-09-28T16:11:04.000Z | Intent model/Intent_model.py | yashrajt/college_FAQ-chatbot | b3a2a1b4958068b652d019c13f31f6329b093c0a | [
"MIT"
] | 1 | 2020-11-25T10:23:14.000Z | 2020-11-25T10:23:14.000Z | Intent model/Intent_model.py | yashrajt/college_FAQ-chatbot | b3a2a1b4958068b652d019c13f31f6329b093c0a | [
"MIT"
] | 2 | 2020-10-12T18:16:16.000Z | 2021-09-28T16:11:15.000Z | import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
from sklearn.metrics import accuracy_score, confusion_matrix
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.pipeline import Pipeline
from skle... | 41.473684 | 1,001 | 0.599302 |
dbaae886d43e46ac193d1e7f28a6367192d2a640 | 7,552 | py | Python | vendor/github.com/tensorflow/tensorflow/tensorflow/python/ops/list_ops.py | owennewo/kfserving | 89f73c87525b8e06ea799f69f2979c4ad272fcb3 | [
"Apache-2.0"
] | 2 | 2018-12-12T23:33:05.000Z | 2019-02-26T07:20:22.000Z | vendor/github.com/tensorflow/tensorflow/tensorflow/python/ops/list_ops.py | owennewo/kfserving | 89f73c87525b8e06ea799f69f2979c4ad272fcb3 | [
"Apache-2.0"
] | 13 | 2020-11-13T18:53:29.000Z | 2022-03-12T00:33:00.000Z | vendor/github.com/tensorflow/tensorflow/tensorflow/python/ops/list_ops.py | owennewo/kfserving | 89f73c87525b8e06ea799f69f2979c4ad272fcb3 | [
"Apache-2.0"
] | 2 | 2020-10-06T09:24:31.000Z | 2020-12-20T15:10:56.000Z | # Copyright 2018 The TensorFlow 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.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.801843 | 80 | 0.742585 |
dbad2da50018b20b9e8cf4be1668cfeef2d4c6cb | 729 | py | Python | tests/test_dump.py | flaeppe/astunparse | 754ec7d113fa273625ccc7b6c5d65aa7700ab8a9 | [
"PSF-2.0"
] | 189 | 2016-03-15T06:48:48.000Z | 2022-03-12T09:34:10.000Z | tests/test_dump.py | flaeppe/astunparse | 754ec7d113fa273625ccc7b6c5d65aa7700ab8a9 | [
"PSF-2.0"
] | 50 | 2015-09-14T16:22:00.000Z | 2022-02-24T05:36:57.000Z | tests/test_dump.py | flaeppe/astunparse | 754ec7d113fa273625ccc7b6c5d65aa7700ab8a9 | [
"PSF-2.0"
] | 52 | 2015-04-29T10:52:33.000Z | 2022-03-03T19:59:54.000Z | import ast
import re
import sys
if sys.version_info < (2, 7):
import unittest2 as unittest
else:
import unittest
import astunparse
from tests.common import AstunparseCommonTestCase
| 29.16 | 71 | 0.663923 |
dbad96b0fa05c373ff9f7995b182a8597ec11299 | 1,387 | py | Python | src/django/giraffe/blat/management/commands/reset_app.py | addgene/giraffe | c7d3b1f000ceea83e6c98cce06cd2a0f9e4f4c2c | [
"MIT"
] | 4 | 2016-10-13T15:46:06.000Z | 2018-08-22T21:43:28.000Z | src/django/giraffe/blat/management/commands/reset_app.py | addgene/giraffe | c7d3b1f000ceea83e6c98cce06cd2a0f9e4f4c2c | [
"MIT"
] | null | null | null | src/django/giraffe/blat/management/commands/reset_app.py | addgene/giraffe | c7d3b1f000ceea83e6c98cce06cd2a0f9e4f4c2c | [
"MIT"
] | 1 | 2015-07-26T21:42:31.000Z | 2015-07-26T21:42:31.000Z | from django.core.management.base import AppCommand, CommandError
from django.core.management.sql import sql_reset
from django.core.management.color import no_style
from django.db import connections
| 47.827586 | 370 | 0.626532 |
dbad9f49539fab32473ae89e8b92b989783f9cfd | 89 | py | Python | webBlog/apps.py | JordanBRoberts/python-theBand | 1e475a45a42b210c722ab43c0b966d7b58d97a9d | [
"MIT"
] | null | null | null | webBlog/apps.py | JordanBRoberts/python-theBand | 1e475a45a42b210c722ab43c0b966d7b58d97a9d | [
"MIT"
] | null | null | null | webBlog/apps.py | JordanBRoberts/python-theBand | 1e475a45a42b210c722ab43c0b966d7b58d97a9d | [
"MIT"
] | null | null | null | from django.apps import AppConfig
| 14.833333 | 33 | 0.752809 |
dbaf82c57c0e8e70a6ba6faeba1bc88a6aa96173 | 996 | py | Python | requires.py | lydaaa/fzutils | 5f775d046876e3ce35d0b1174b5a3db96e9d627e | [
"MIT"
] | 1 | 2018-08-04T13:55:03.000Z | 2018-08-04T13:55:03.000Z | requires.py | lydaaa/fzutils | 5f775d046876e3ce35d0b1174b5a3db96e9d627e | [
"MIT"
] | null | null | null | requires.py | lydaaa/fzutils | 5f775d046876e3ce35d0b1174b5a3db96e9d627e | [
"MIT"
] | null | null | null | # coding:utf-8
'''
@author = super_fazai
@File : requires.py
@Time : 2016/8/3 12:59
@connect : superonesfazai@gmail.com
'''
install_requires = [
'ipython',
'wheel',
'utils',
'db',
'greenlet==0.4.13',
'web.py==0.40.dev1',
'pytz',
'requests',
'selenium==3.8.0', # 3.8.1phant... | 16.6 | 53 | 0.491968 |
dbafb8e5a5c72fd3abd02eb1cca23ac263bc48ce | 2,433 | py | Python | m15_dos/dos.py | venkatarjun/Python3 | 606adf8588a74a53d592e62e07e81a5a1530b993 | [
"MIT"
] | 80 | 2020-11-14T19:19:27.000Z | 2022-03-10T17:43:17.000Z | m15_dos/dos.py | nerbertb/python-52-weeks | 55add5d75d1aabed4c59d445e1d1b773ede047b0 | [
"MIT"
] | 10 | 2020-11-24T06:19:45.000Z | 2022-02-27T23:53:28.000Z | m15_dos/dos.py | nerbertb/python-52-weeks | 55add5d75d1aabed4c59d445e1d1b773ede047b0 | [
"MIT"
] | 58 | 2020-11-13T18:35:22.000Z | 2022-03-28T06:40:08.000Z | import subprocess
import requests
import argparse
from concurrent.futures import ThreadPoolExecutor
from time import sleep
from datetime import datetime
ICMP_ATTACK = "ICMP"
HTTP_ATTACK = "HTTP"
valid_attacks = {HTTP_ATTACK, ICMP_ATTACK}
parser = argparse.ArgumentParser(description="DoS HTTP")
parser.add_argument('-P... | 27.337079 | 102 | 0.630908 |
dbb02044e102ff75841402e288f20f24bd0e7921 | 3,444 | py | Python | maestro/backends/django/contrib/signals.py | estudio89/maestro-python | 331079cb3f0c10de2e19210cbade793544510f33 | [
"BSD-3-Clause"
] | null | null | null | maestro/backends/django/contrib/signals.py | estudio89/maestro-python | 331079cb3f0c10de2e19210cbade793544510f33 | [
"BSD-3-Clause"
] | null | null | null | maestro/backends/django/contrib/signals.py | estudio89/maestro-python | 331079cb3f0c10de2e19210cbade793544510f33 | [
"BSD-3-Clause"
] | null | null | null | from django.apps import apps
from django.db import models
from django.db.models.signals import post_save, pre_delete
from typing import Type, Optional, List, cast, TYPE_CHECKING
from maestro.backends.django.settings import maestro_settings
from maestro.backends.django.contrib.factory import create_django_data_store
fro... | 30.210526 | 86 | 0.702962 |
dbb47fb9bbbb993b07541531acf7c95109ac62eb | 142 | py | Python | top/urls.py | pbexe/nextbike-top | eca086406cf6b96d6e086dd0fa9ecae5b6364f4d | [
"MIT"
] | null | null | null | top/urls.py | pbexe/nextbike-top | eca086406cf6b96d6e086dd0fa9ecae5b6364f4d | [
"MIT"
] | null | null | null | top/urls.py | pbexe/nextbike-top | eca086406cf6b96d6e086dd0fa9ecae5b6364f4d | [
"MIT"
] | null | null | null | from django.urls import include, path
from .views import home, bike
urlpatterns = [
path("", home),
path("bike/<int:number>", bike)
] | 20.285714 | 37 | 0.661972 |
dbb4a7b40915f984e1d6c4fb86487617ba753bc3 | 2,421 | py | Python | Scripts/ReduceFragments.py | mike72353/FragFeatureNet | ef61ae52e3d6dcc6d2d56df2a6bd5fe1a298c930 | [
"BSD-3-Clause"
] | 1 | 2021-10-13T11:49:37.000Z | 2021-10-13T11:49:37.000Z | Scripts/ReduceFragments.py | mike72353/FragFeatureNet | ef61ae52e3d6dcc6d2d56df2a6bd5fe1a298c930 | [
"BSD-3-Clause"
] | null | null | null | Scripts/ReduceFragments.py | mike72353/FragFeatureNet | ef61ae52e3d6dcc6d2d56df2a6bd5fe1a298c930 | [
"BSD-3-Clause"
] | 1 | 2021-09-09T04:42:20.000Z | 2021-09-09T04:42:20.000Z | """
Remove Fragments not in Knowledgebase
"""
__author__ = "Michael Suarez"
__email__ = "masv@connect.ust.hk"
__copyright__ = "Copyright 2019, Hong Kong University of Science and Technology"
__license__ = "3-clause BSD"
from argparse import ArgumentParser
import numpy as np
import pickle
parser = ArgumentParser(desc... | 38.428571 | 142 | 0.687732 |
dbb4ba3a72efae417ef662fbf9ea83724f57fdc1 | 11,352 | py | Python | client/core/tests/billing_tests.py | vbohinc/CommunityCellularManager | ab330fcb1bc70ee3a8e9bcdac2846ab6c327f87c | [
"BSD-3-Clause"
] | null | null | null | client/core/tests/billing_tests.py | vbohinc/CommunityCellularManager | ab330fcb1bc70ee3a8e9bcdac2846ab6c327f87c | [
"BSD-3-Clause"
] | 3 | 2021-03-20T00:02:37.000Z | 2022-02-11T03:46:59.000Z | client/core/tests/billing_tests.py | vbohinc/CommunityCellularManager | ab330fcb1bc70ee3a8e9bcdac2846ab6c327f87c | [
"BSD-3-Clause"
] | null | null | null | """Tests for core.billing.
Run this test from the project root
$ nosetests core.tests.billing_tests
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of ... | 38.481356 | 79 | 0.587738 |
dbb81ecf1571a74c986e0ef5e76802273692f79e | 1,106 | py | Python | data_interrogator/admin/views.py | s-i-l-k-e/django-data-interrogator | 0284168b81aaa31a8df84f3ea52166eded8a4362 | [
"MIT"
] | null | null | null | data_interrogator/admin/views.py | s-i-l-k-e/django-data-interrogator | 0284168b81aaa31a8df84f3ea52166eded8a4362 | [
"MIT"
] | null | null | null | data_interrogator/admin/views.py | s-i-l-k-e/django-data-interrogator | 0284168b81aaa31a8df84f3ea52166eded8a4362 | [
"MIT"
] | null | null | null | from django.contrib.auth.decorators import user_passes_test
from django.utils.decorators import method_decorator
from data_interrogator.admin.forms import AdminInvestigationForm, AdminPivotTableForm
from data_interrogator.interrogators import Allowable
from data_interrogator.views import InterrogationView, Interrogati... | 35.677419 | 103 | 0.824593 |
dbb832b244c092d5e626be322221a0dd99c61a02 | 327 | py | Python | configs/pspnet/pspnet_r18-d8_512x512_80k_loveda.py | heytanay/mmsegmentation | 7ddd2fe2ecff9c95999bd00ec05cc37eafb558f8 | [
"Apache-2.0"
] | 11 | 2022-02-04T01:09:45.000Z | 2022-03-08T05:49:16.000Z | configs/pspnet/pspnet_r18-d8_512x512_80k_loveda.py | heytanay/mmsegmentation | 7ddd2fe2ecff9c95999bd00ec05cc37eafb558f8 | [
"Apache-2.0"
] | 2 | 2022-02-25T03:07:23.000Z | 2022-03-08T12:54:05.000Z | configs/pspnet/pspnet_r18-d8_512x512_80k_loveda.py | heytanay/mmsegmentation | 7ddd2fe2ecff9c95999bd00ec05cc37eafb558f8 | [
"Apache-2.0"
] | 2 | 2021-04-23T05:32:00.000Z | 2021-11-11T02:45:08.000Z | _base_ = './pspnet_r50-d8_512x512_80k_loveda.py'
model = dict(
backbone=dict(
depth=18,
init_cfg=dict(
type='Pretrained', checkpoint='open-mmlab://resnet18_v1c')),
decode_head=dict(
in_channels=512,
channels=128,
),
auxiliary_head=dict(in_channels=256, channel... | 27.25 | 72 | 0.629969 |
dbb9c02aefc14ce19f8f0ea13f80afd504f6a7db | 191 | py | Python | bba/objects.py | TheGenocides/BBA | 1617756ed9224027d7225ea68364f6568c56ed23 | [
"MIT"
] | 3 | 2021-11-07T16:44:13.000Z | 2021-12-13T13:48:07.000Z | bba/objects.py | TheGenocides/BBA | 1617756ed9224027d7225ea68364f6568c56ed23 | [
"MIT"
] | null | null | null | bba/objects.py | TheGenocides/BBA | 1617756ed9224027d7225ea68364f6568c56ed23 | [
"MIT"
] | null | null | null | from typing import Dict, Any | 27.285714 | 45 | 0.602094 |
dbba66cc16504421bbf294d9cd7ab892cc735e8e | 4,880 | py | Python | apps/greencheck/forms.py | BR0kEN-/admin-portal | 0c38dc0d790031f45bf07660bce690e972fe2858 | [
"Apache-2.0"
] | null | null | null | apps/greencheck/forms.py | BR0kEN-/admin-portal | 0c38dc0d790031f45bf07660bce690e972fe2858 | [
"Apache-2.0"
] | null | null | null | apps/greencheck/forms.py | BR0kEN-/admin-portal | 0c38dc0d790031f45bf07660bce690e972fe2858 | [
"Apache-2.0"
] | null | null | null | from django import forms
from django.forms import ModelForm
from django.contrib.auth import get_user_model
from django.core.exceptions import ValidationError
from .choices import ActionChoice
from .choices import StatusApproval
from .models import GreencheckIp
from .models import GreencheckIpApprove
from .models impor... | 30.886076 | 85 | 0.608811 |
dbbba499caecc6c455f90595eccf7b64b710a2e3 | 263 | py | Python | apps/utils/format/url_format.py | think-wang/osroom | 67bb5bbd7a63fbaeb0d919738859444b54500152 | [
"BSD-2-Clause"
] | 1 | 2020-04-03T08:01:07.000Z | 2020-04-03T08:01:07.000Z | apps/utils/format/url_format.py | dhgdhg/osroom | 4d693eaab96503cadd391bf924bffedcd931a07c | [
"BSD-2-Clause"
] | null | null | null | apps/utils/format/url_format.py | dhgdhg/osroom | 4d693eaab96503cadd391bf924bffedcd931a07c | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*-coding:utf-8-*-
from tld import get_tld
__author__ = "Allen Woo"
def get_domain(url):
'''
url
:param url:
:return:
'''
res = get_tld(url, as_object=True)
return "{}.{}".format(res.subdomain, res.tld) | 18.785714 | 49 | 0.604563 |
dbbc25c0d987a2badd4b10e9df8a681d25f102e8 | 23,904 | py | Python | ipamanager/entities.py | Tjev/freeipa-manager | 0d40e64d81a86d4312b4e22cd57dcaecf25d0801 | [
"BSD-3-Clause"
] | null | null | null | ipamanager/entities.py | Tjev/freeipa-manager | 0d40e64d81a86d4312b4e22cd57dcaecf25d0801 | [
"BSD-3-Clause"
] | null | null | null | ipamanager/entities.py | Tjev/freeipa-manager | 0d40e64d81a86d4312b4e22cd57dcaecf25d0801 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2017-2019, GoodData Corporation. All rights reserved.
"""
FreeIPA Manager - entity module
Object representations of the entities configured in FreeIPA.
"""
import os
import re
import voluptuous
import yaml
from abc impo... | 39.058824 | 79 | 0.616508 |
dbbca7079e41d333542d3d27bb46afa6aecbe834 | 1,580 | py | Python | test/test_catalog_manager.py | weknowtraining/athena-glue-service-logs | b7cf77408486f2bfa941b8609617ed47aa3e2d02 | [
"Apache-2.0"
] | 133 | 2018-09-17T12:43:14.000Z | 2022-03-15T20:03:12.000Z | test/test_catalog_manager.py | weknowtraining/athena-glue-service-logs | b7cf77408486f2bfa941b8609617ed47aa3e2d02 | [
"Apache-2.0"
] | 22 | 2018-11-19T21:51:04.000Z | 2022-03-08T12:13:19.000Z | test/test_catalog_manager.py | weknowtraining/athena-glue-service-logs | b7cf77408486f2bfa941b8609617ed47aa3e2d02 | [
"Apache-2.0"
] | 46 | 2018-10-04T04:27:26.000Z | 2022-03-01T03:28:38.000Z | # pylint: skip-file
from athena_glue_service_logs.catalog_manager import BaseCatalogManager
| 50.967742 | 119 | 0.79557 |
dbbd1a19c06924421a7c2e88261ac232f18c11f4 | 83 | py | Python | unsorted/pythonsnippets_0013.py | fiddlerwoaroof/sandbox | 652acaf710a8b60f005769bde317e7bbf548cc2b | [
"BSD-3-Clause"
] | null | null | null | unsorted/pythonsnippets_0013.py | fiddlerwoaroof/sandbox | 652acaf710a8b60f005769bde317e7bbf548cc2b | [
"BSD-3-Clause"
] | null | null | null | unsorted/pythonsnippets_0013.py | fiddlerwoaroof/sandbox | 652acaf710a8b60f005769bde317e7bbf548cc2b | [
"BSD-3-Clause"
] | null | null | null | from twisted.internet import reactor
reactor.listenTCP(8789, factory)
reactor.run() | 27.666667 | 36 | 0.831325 |
dbbe56b29123b2a0ee8c4986b892e3949b69a274 | 2,362 | py | Python | __main__.py | SHUcream00/MLBPitchVisual | a3092cef7cbd4e73f8d0010dd62811df6cc36cac | [
"MIT"
] | null | null | null | __main__.py | SHUcream00/MLBPitchVisual | a3092cef7cbd4e73f8d0010dd62811df6cc36cac | [
"MIT"
] | null | null | null | __main__.py | SHUcream00/MLBPitchVisual | a3092cef7cbd4e73f8d0010dd62811df6cc36cac | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#Setting up Name and CSV location
player_name = "Put player name"
file_src = "Put target csv"
raw = pd.read_csv(file_src)
df = pd.DataFrame(raw)
#For filtering cases
replace_dict = {"description": {"hit_into_play_no_out": "contact",... | 37.492063 | 192 | 0.615157 |
dbbee95cb22f9ddebb8ee025c418f2636a32f8bb | 790 | py | Python | shape_similarity.py | Toonwire/infancy_eye_tracking | 7b96a9d832f60f83fd5098ada2117ab1d0f56fed | [
"MIT"
] | null | null | null | shape_similarity.py | Toonwire/infancy_eye_tracking | 7b96a9d832f60f83fd5098ada2117ab1d0f56fed | [
"MIT"
] | null | null | null | shape_similarity.py | Toonwire/infancy_eye_tracking | 7b96a9d832f60f83fd5098ada2117ab1d0f56fed | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat May 25 13:17:49 2019
@author: Toonw
"""
import numpy as np
# Similarity measure of article
## https://pdfs.semanticscholar.org/60b5/aca20ba34d424f4236359bd5e6aa30487682.pdf | 23.939394 | 130 | 0.613924 |
dbc01ab01c84c8a6897199dca9635aa645e6cdeb | 262 | py | Python | apps/chats/apps.py | aldwyn/effigia | eb456656949bf68934530bbec9c15ebc6d0236b8 | [
"MIT"
] | 1 | 2018-11-15T05:17:30.000Z | 2018-11-15T05:17:30.000Z | apps/chats/apps.py | aldwyn/effigia | eb456656949bf68934530bbec9c15ebc6d0236b8 | [
"MIT"
] | 5 | 2021-06-09T17:20:01.000Z | 2022-03-11T23:18:06.000Z | apps/chats/apps.py | aldwyn/effigia | eb456656949bf68934530bbec9c15ebc6d0236b8 | [
"MIT"
] | 1 | 2018-10-05T19:03:27.000Z | 2018-10-05T19:03:27.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
| 20.153846 | 45 | 0.694656 |
dbc0541470856937f6eef50be9d0887839277ab1 | 3,472 | py | Python | utils/ghost.py | JayJJChen/LoveXueXiQiangGuo | 648a38cd73d1eb7ed7267721f1a23c90afb0daee | [
"MIT"
] | 3 | 2019-04-16T07:52:20.000Z | 2021-08-16T03:07:14.000Z | utils/ghost.py | JayJJChen/LoveXueXiQiangGuo | 648a38cd73d1eb7ed7267721f1a23c90afb0daee | [
"MIT"
] | 1 | 2019-04-17T02:23:32.000Z | 2020-12-24T11:04:52.000Z | utils/ghost.py | JayJJChen/LoveXueXiQiangGuo | 648a38cd73d1eb7ed7267721f1a23c90afb0daee | [
"MIT"
] | 2 | 2019-04-17T04:00:55.000Z | 2019-09-18T00:57:35.000Z | import os
import time
from utils.eye import Eye
from utils.finger import Finger
| 30.191304 | 97 | 0.563652 |
dbc13915cb653c37c09279f81347a4bfea838dd2 | 3,686 | py | Python | src_taxonomy/bubble_tree_map.py | sanja7s/SR_Twitter | 2eb499c9aa25ba6e9860cd77eac6832890d2c126 | [
"MIT"
] | null | null | null | src_taxonomy/bubble_tree_map.py | sanja7s/SR_Twitter | 2eb499c9aa25ba6e9860cd77eac6832890d2c126 | [
"MIT"
] | null | null | null | src_taxonomy/bubble_tree_map.py | sanja7s/SR_Twitter | 2eb499c9aa25ba6e9860cd77eac6832890d2c126 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import random
from ete2 import Tree, TreeStyle, NodeStyle, faces, AttrFace, CircleFace, TextFace
def test_data():
D = {'taxonomy': [{"score": "0.718868", "label": "/art and entertainment/movies and tv/movies"},\
{"confident": "no", "score": "0.304296", "label": "/pets... | 24.091503 | 98 | 0.655724 |
dbc290ad28df369cc2a5189c66e670824982c619 | 28,719 | py | Python | compass/core/_scrapers/member.py | MrNoScript/compass-interface-core | 8c945ef36f7bee396bd5a744404eaa88d280a845 | [
"MIT"
] | null | null | null | compass/core/_scrapers/member.py | MrNoScript/compass-interface-core | 8c945ef36f7bee396bd5a744404eaa88d280a845 | [
"MIT"
] | null | null | null | compass/core/_scrapers/member.py | MrNoScript/compass-interface-core | 8c945ef36f7bee396bd5a744404eaa88d280a845 | [
"MIT"
] | null | null | null | from __future__ import annotations
import re
import time
from typing import get_args, Literal, TYPE_CHECKING, Union
from lxml import html
from compass.core.interface_base import InterfaceBase
from compass.core.logger import logger
from compass.core.schemas import member as schema
from compass.core.settings import Se... | 41.262931 | 132 | 0.568126 |
dbc489c4f1e6739cd6d3b2e54cc4268da59045a7 | 336 | py | Python | quran_text/urls.py | Quran-Tafseer/tafseer_api | 49eede15a6e50812a4bab1e0e1e38069fcb0da4d | [
"MIT"
] | 16 | 2019-03-02T13:08:59.000Z | 2022-02-26T17:26:09.000Z | quran_text/urls.py | EmadMokhtar/tafseer_api | abb2d53eb917f58db1e09f7d92180b0eb8001a40 | [
"MIT"
] | 45 | 2017-10-25T06:17:50.000Z | 2018-12-08T17:01:41.000Z | quran_text/urls.py | Quran-Tafseer/tafseer_api | 49eede15a6e50812a4bab1e0e1e38069fcb0da4d | [
"MIT"
] | 6 | 2019-02-09T03:57:09.000Z | 2021-12-29T02:54:29.000Z | from django.urls import path
from . import views
urlpatterns = [
path('',
view=views.SuraListView.as_view(), name='sura-list'),
path('<int:sura_num>/<int:number>/',
view=views.AyahTextView.as_view(), name='ayah-detail'),
path('<int:sura_num>/<int:number>',
view=views.AyahTextVie... | 25.846154 | 64 | 0.630952 |
dbc52992fc79a5adada939783cc09ffe329b0264 | 1,623 | py | Python | konnection/settings/local.py | IanSeng/CMPUT404_PROJECT | 80acd2c57de4b091e0e66ad9f5f2df17801bf09e | [
"W3C-20150513"
] | null | null | null | konnection/settings/local.py | IanSeng/CMPUT404_PROJECT | 80acd2c57de4b091e0e66ad9f5f2df17801bf09e | [
"W3C-20150513"
] | null | null | null | konnection/settings/local.py | IanSeng/CMPUT404_PROJECT | 80acd2c57de4b091e0e66ad9f5f2df17801bf09e | [
"W3C-20150513"
] | null | null | null | from konnection.settings.base import *
from pathlib import Path
import os
import dotenv
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent.parent
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
SECRET_KEY = 'temporaryKey'... | 31.211538 | 122 | 0.653112 |
dbc6237f7856e6445933721e9b53e17ec980bef0 | 8,205 | py | Python | main.py | PotentialParadox/PyReparm | 70062e351eebacb9c6cb3dc0262e97256c52be3d | [
"Apache-2.0"
] | null | null | null | main.py | PotentialParadox/PyReparm | 70062e351eebacb9c6cb3dc0262e97256c52be3d | [
"Apache-2.0"
] | null | null | null | main.py | PotentialParadox/PyReparm | 70062e351eebacb9c6cb3dc0262e97256c52be3d | [
"Apache-2.0"
] | null | null | null | import random
from evaluation import Evaluator
from generator import generator
from mutate import mutateset
from deap import base
from deap import creator
from deap import tools
from parameter_group import ParameterGroup
import gaussian_output
from analysis import Analysis
from gaussian_input import GaussianInput
from ... | 36.145374 | 92 | 0.584156 |
dbc6414ac2f786d426d11b5f7b21e310e975369d | 23,614 | py | Python | pyx12/test/test_x12context.py | arenius/pyx12 | 537493deaa0b8e18a3fa72eb1b3eeae9ef043b11 | [
"BSD-3-Clause"
] | 1 | 2019-11-06T21:22:28.000Z | 2019-11-06T21:22:28.000Z | pyx12/test/test_x12context.py | arenius/pyx12 | 537493deaa0b8e18a3fa72eb1b3eeae9ef043b11 | [
"BSD-3-Clause"
] | null | null | null | pyx12/test/test_x12context.py | arenius/pyx12 | 537493deaa0b8e18a3fa72eb1b3eeae9ef043b11 | [
"BSD-3-Clause"
] | 1 | 2021-04-12T14:32:41.000Z | 2021-04-12T14:32:41.000Z | import unittest
#import tempfile
try:
from StringIO import StringIO
except:
from io import StringIO
import pyx12.error_handler
from pyx12.errors import EngineError # , X12PathError
import pyx12.x12context
import pyx12.params
from pyx12.test.x12testdata import datafiles
| 38.210356 | 125 | 0.598247 |
dbc6b99c48a68e88a0554cb932a77dac52c1e5c0 | 1,460 | py | Python | repo/script.module.liveresolver/lib/liveresolver/resolvers/finecast.py | Hades01/Addons | 710da97ac850197498a3cd64be1811c593610add | [
"Apache-2.0"
] | 3 | 2020-03-03T13:21:44.000Z | 2021-07-21T09:53:31.000Z | repo/script.module.liveresolver/lib/liveresolver/resolvers/finecast.py | Hades01/Addons | 710da97ac850197498a3cd64be1811c593610add | [
"Apache-2.0"
] | null | null | null | repo/script.module.liveresolver/lib/liveresolver/resolvers/finecast.py | Hades01/Addons | 710da97ac850197498a3cd64be1811c593610add | [
"Apache-2.0"
] | 2 | 2020-04-01T22:11:12.000Z | 2020-05-07T23:54:52.000Z | # -*- coding: utf-8 -*-
import re,urlparse,cookielib,os,urllib
from liveresolver.modules import client,recaptcha_v2,control,constants, decryptionUtils
from liveresolver.modules.log_utils import log
cookieFile = os.path.join(control.dataPath, 'finecastcookie.lwp')
#except:
# return
| 30.416667 | 87 | 0.619178 |
dbc72ca28fa155b841727c07f4d5032dac9e8938 | 5,161 | py | Python | src/robotide/publish/__init__.py | crylearner/RIDE3X | 767f45b0c908f18ecc7473208def8dc7489f43b0 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-08-20T14:46:02.000Z | 2017-08-20T14:46:02.000Z | src/robotide/publish/__init__.py | crylearner/RIDE3X | 767f45b0c908f18ecc7473208def8dc7489f43b0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robotide/publish/__init__.py | crylearner/RIDE3X | 767f45b0c908f18ecc7473208def8dc7489f43b0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 appl... | 38.514925 | 83 | 0.742298 |
dbc7c8fe7bece88307002636b27bacde286985d2 | 3,520 | py | Python | app.py | pizzapanther/google-actions-python-example | 40d13fc1821e1e11f15cc7413571cb5bd6327024 | [
"MIT"
] | 9 | 2017-11-17T07:09:08.000Z | 2020-07-03T13:32:16.000Z | app.py | pizzapanther/google-actions-python-example | 40d13fc1821e1e11f15cc7413571cb5bd6327024 | [
"MIT"
] | 2 | 2019-08-10T05:49:47.000Z | 2021-04-30T20:51:40.000Z | app.py | pizzapanther/google-actions-python-example | 40d13fc1821e1e11f15cc7413571cb5bd6327024 | [
"MIT"
] | 5 | 2018-05-04T08:05:55.000Z | 2021-08-25T05:49:18.000Z | #!/usr/bin/env python
import os
import json
import tornado.ioloop
import tornado.log
import tornado.web
from google.oauth2 import id_token
from google.auth.transport import requests as google_requests
import jwt
import requests
API_KEY = os.environ.get('OPEN_WEATHER_MAP_KEY', None)
PROJECT_ID = os.environ.get('PRO... | 25.693431 | 98 | 0.563352 |
dbc804db6b0f3dbd711ac33b62c655260b3871e9 | 352 | py | Python | ProsperFlask/{{cookiecutter.project_name}}/tests/conftest.py | EVEprosper/ProsperCookiecutters | 569ca0c311a5ead2b49f0cdde4cb2ad14dcd3a2c | [
"MIT"
] | null | null | null | ProsperFlask/{{cookiecutter.project_name}}/tests/conftest.py | EVEprosper/ProsperCookiecutters | 569ca0c311a5ead2b49f0cdde4cb2ad14dcd3a2c | [
"MIT"
] | null | null | null | ProsperFlask/{{cookiecutter.project_name}}/tests/conftest.py | EVEprosper/ProsperCookiecutters | 569ca0c311a5ead2b49f0cdde4cb2ad14dcd3a2c | [
"MIT"
] | null | null | null | # AUTOGENERATED BY: ProsperCookiecutters/ProsperFlask
# TEMPLATE VERSION: {{cookiecutter.template_version}}
# AUTHOR: {{cookiecutter.author_name}}
"""PyTest fixtures and modifiers"""
import pytest
from {{cookiecutter.library_name}}.endpoints import APP
| 23.466667 | 55 | 0.755682 |
dbc8735d5b72a93d69f4f92640c632b9a9b76112 | 3,341 | py | Python | zoloto/coords.py | RealOrangeOne/yuri | 6ed55bdf97c6add22cd6c71c39ca30e2229337cb | [
"BSD-3-Clause"
] | 7 | 2019-08-09T10:05:14.000Z | 2021-11-14T17:37:50.000Z | zoloto/coords.py | RealOrangeOne/yuri | 6ed55bdf97c6add22cd6c71c39ca30e2229337cb | [
"BSD-3-Clause"
] | 226 | 2019-06-20T09:48:23.000Z | 2022-02-20T00:43:52.000Z | zoloto/coords.py | RealOrangeOne/yuri | 6ed55bdf97c6add22cd6c71c39ca30e2229337cb | [
"BSD-3-Clause"
] | 9 | 2019-07-19T10:55:47.000Z | 2020-07-23T19:16:47.000Z | from typing import Iterator, NamedTuple, Tuple
from cached_property import cached_property
from cv2 import Rodrigues
from pyquaternion import Quaternion
ThreeTuple = Tuple[float, float, float]
RotationMatrix = Tuple[ThreeTuple, ThreeTuple, ThreeTuple]
def __repr__(self) -> str:
return "Orientation(r... | 25.7 | 83 | 0.609398 |
dbc99a75d68d09d60f840eae7b285af4fedbeeae | 2,988 | py | Python | azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-07-23T08:59:24.000Z | 2018-07-23T08:59:24.000Z | azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-11-29T14:46:42.000Z | 2018-11-29T14:46:42.000Z | azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 44.597015 | 81 | 0.662316 |
dbca2b427044c8866cf81d44e473638aa489abca | 274 | py | Python | ia870/iagradm.py | rdenadai/ia870p3 | c4823efc4b8e5f187a64f8a4e9962e328bf86967 | [
"BSD-2-Clause"
] | 5 | 2018-10-15T12:02:03.000Z | 2022-02-11T12:47:12.000Z | ia870/iagradm.py | rdenadai/ia870p3 | c4823efc4b8e5f187a64f8a4e9962e328bf86967 | [
"BSD-2-Clause"
] | 1 | 2018-10-15T12:04:36.000Z | 2019-01-25T12:04:35.000Z | ia870/iagradm.py | rdenadai/ia870p3 | c4823efc4b8e5f187a64f8a4e9962e328bf86967 | [
"BSD-2-Clause"
] | 4 | 2019-01-25T11:13:48.000Z | 2020-12-20T01:42:33.000Z | # -*- encoding: utf-8 -*-
# Module iagradm
| 21.076923 | 50 | 0.642336 |
dbca8d6120f0830afa062de217262e49809ebe82 | 388 | py | Python | backend/api/tests/test_models/test_utils/test_ranking_suffixes.py | ChristchurchCityWeightlifting/lifter-api | a82b79c75106e7f4f8ea4b4e3e12d727213445e3 | [
"MIT"
] | null | null | null | backend/api/tests/test_models/test_utils/test_ranking_suffixes.py | ChristchurchCityWeightlifting/lifter-api | a82b79c75106e7f4f8ea4b4e3e12d727213445e3 | [
"MIT"
] | 5 | 2022-03-07T08:30:47.000Z | 2022-03-22T09:15:52.000Z | backend/api/tests/test_models/test_utils/test_ranking_suffixes.py | ChristchurchCityWeightlifting/lifter-api | a82b79c75106e7f4f8ea4b4e3e12d727213445e3 | [
"MIT"
] | null | null | null | import pytest
from api.models.utils import rankings
def test_rankings(test_data):
"""Tests if ranking works
e.g. 1 returns 1st
11 returns 11th
101 return 101st
"""
assert rankings(test_data[0]) == "1st"
assert rankings(test_data[1]) == "11th"
assert rankings(test_data[2]) =... | 19.4 | 44 | 0.641753 |
dbcc6f4ccb0dabce5252e1dd4108228b2c863f99 | 721 | py | Python | web/web-lemonthinker/src/app/app.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | 2 | 2021-08-09T17:08:12.000Z | 2021-08-09T17:08:17.000Z | web/web-lemonthinker/src/app/app.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | null | null | null | web/web-lemonthinker/src/app/app.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | 1 | 2021-10-09T16:51:56.000Z | 2021-10-09T16:51:56.000Z | from flask import Flask, request, redirect, url_for
import os
import random
import string
import time # lemonthink
clean = time.time()
app = Flask(__name__)
chars = list(string.ascii_letters + string.digits) | 28.84 | 79 | 0.653259 |
dbccbf08a5c6a38fe09196877c8bb3f8a56251c4 | 816 | py | Python | aprendizado/codewars/descending_order.py | renatodev95/Python | 2adee4a01de41f8bbb68fce563100c135a5ab549 | [
"MIT"
] | null | null | null | aprendizado/codewars/descending_order.py | renatodev95/Python | 2adee4a01de41f8bbb68fce563100c135a5ab549 | [
"MIT"
] | null | null | null | aprendizado/codewars/descending_order.py | renatodev95/Python | 2adee4a01de41f8bbb68fce563100c135a5ab549 | [
"MIT"
] | null | null | null | # Your task is to make a function that can take any non-negative integer as an argument and return it with its digits in descending order. Essentially, rearrange the digits to create the highest possible number.
# Funo que recebe um nmero inteiro (no negativo) como argumento e o retorna com os dgitos em ordem descende... | 38.857143 | 211 | 0.734069 |
dbce1d6ebf5fac46543c3b47688a5f1e1c7cc668 | 8,981 | py | Python | dmarc_storage.py | Schramp/dmarc-monitoring | 619a162f71a788e81d92ca281ec0bdcf13c2e8e8 | [
"MIT"
] | 1 | 2020-05-25T05:09:18.000Z | 2020-05-25T05:09:18.000Z | dmarc_storage.py | Schramp/dmarc-monitoring | 619a162f71a788e81d92ca281ec0bdcf13c2e8e8 | [
"MIT"
] | 30 | 2019-08-12T05:10:50.000Z | 2021-07-21T04:25:02.000Z | dmarc_storage.py | Schramp/dmarc-monitoring | 619a162f71a788e81d92ca281ec0bdcf13c2e8e8 | [
"MIT"
] | 1 | 2022-03-12T19:24:24.000Z | 2022-03-12T19:24:24.000Z | import sqlite3
import os
import datetime
__all__ = ['DMARCStorage', 'totimestamp']
| 49.894444 | 118 | 0.565639 |
dbd0c614614154cd50e0792871e7aa778a2a1459 | 557 | py | Python | setup.py | mcdruid/sumologic-python-sdk | cb1d649d0166976fb104866e9174a41bd558b817 | [
"Apache-2.0"
] | 4 | 2019-05-09T01:31:15.000Z | 2019-12-08T03:35:32.000Z | setup.py | blaise-sumo/sumologic-python-sdk | 97c38fc2d493b94741fd17711923ec7e39264610 | [
"Apache-2.0"
] | null | null | null | setup.py | blaise-sumo/sumologic-python-sdk | 97c38fc2d493b94741fd17711923ec7e39264610 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
setup(
name="sumologic-sdk",
version="0.1.9",
packages=find_packages(),
install_requires=['requests>=2.2.1'],
# PyPI metadata
author="Yoway Buorn, Melchi Salins",
author_email="it@sumologic.com, melchisalins@icloud.com",
description="Sumo Logi... | 32.764706 | 121 | 0.716338 |
dbd1044b9a9e2ac21f72f6855560f0e23688f3f9 | 8,025 | py | Python | docs/conf.py | urm8/django-translations | e8f66710af9433044937b75c061e1988add398a5 | [
"BSD-3-Clause"
] | 100 | 2018-11-20T19:30:49.000Z | 2022-03-10T07:46:27.000Z | docs/conf.py | urm8/django-translations | e8f66710af9433044937b75c061e1988add398a5 | [
"BSD-3-Clause"
] | 30 | 2018-11-27T19:53:53.000Z | 2022-02-04T14:56:52.000Z | docs/conf.py | urm8/django-translations | e8f66710af9433044937b75c061e1988add398a5 | [
"BSD-3-Clause"
] | 25 | 2019-05-30T13:41:47.000Z | 2022-03-25T04:28:17.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 27.389078 | 79 | 0.642492 |
dbd150b0b609e70f340c545eccce6da7fadb2eeb | 86 | py | Python | skorecard/metrics/__init__.py | orchardbirds/skorecard-1 | 0f5375a6c159bb35f4b62c5be75a742bf50885e2 | [
"MIT"
] | null | null | null | skorecard/metrics/__init__.py | orchardbirds/skorecard-1 | 0f5375a6c159bb35f4b62c5be75a742bf50885e2 | [
"MIT"
] | null | null | null | skorecard/metrics/__init__.py | orchardbirds/skorecard-1 | 0f5375a6c159bb35f4b62c5be75a742bf50885e2 | [
"MIT"
] | null | null | null | """Import required Metric."""
from .metrics import IV_scorer
__all__ = ["IV_scorer"]
| 17.2 | 30 | 0.72093 |
dbd2339bf7055960ea772c1eecf31ab430a3ae71 | 5,297 | py | Python | src/waldur_core/core/tests/helpers.py | geant-multicloud/MCMS-mastermind | 81333180f5e56a0bc88d7dad448505448e01f24e | [
"MIT"
] | 26 | 2017-10-18T13:49:58.000Z | 2021-09-19T04:44:09.000Z | src/waldur_core/core/tests/helpers.py | geant-multicloud/MCMS-mastermind | 81333180f5e56a0bc88d7dad448505448e01f24e | [
"MIT"
] | 14 | 2018-12-10T14:14:51.000Z | 2021-06-07T10:33:39.000Z | src/waldur_core/core/tests/helpers.py | geant-multicloud/MCMS-mastermind | 81333180f5e56a0bc88d7dad448505448e01f24e | [
"MIT"
] | 32 | 2017-09-24T03:10:45.000Z | 2021-10-16T16:41:09.000Z | import copy
from django.conf import settings
from django.test.utils import override_settings
from rest_framework import status, test
def override_waldur_core_settings(**kwargs):
waldur_settings = copy.deepcopy(settings.WALDUR_CORE)
waldur_settings.update(kwargs)
return override_settings(WALDUR_CORE=wal... | 37.302817 | 106 | 0.605815 |
dbd3d31bd1a8e525699ace640bf7abf893c326e1 | 1,121 | py | Python | data/benchmark.py | Gummary/denet | 00d814d75eea54d5b259fce128ae7b625a900140 | [
"MIT"
] | 343 | 2020-04-02T06:22:18.000Z | 2022-03-25T12:51:55.000Z | data/benchmark.py | sanglee325/cutblur | 1589718b27973bec41289bbd5ad5a71ebe2e9925 | [
"MIT"
] | 26 | 2020-04-30T03:23:15.000Z | 2022-02-20T07:31:42.000Z | data/benchmark.py | sanglee325/cutblur | 1589718b27973bec41289bbd5ad5a71ebe2e9925 | [
"MIT"
] | 66 | 2020-04-02T06:55:37.000Z | 2022-03-10T15:44:19.000Z | """
CutBlur
Copyright 2020-present NAVER corp.
MIT license
"""
import os
import glob
import data
| 22.877551 | 78 | 0.611954 |
dbd4271941c1c0d5952f6d9d574008a25b255d3d | 917 | py | Python | pytglib/api/types/update_chat_is_pinned.py | iTeam-co/pytglib | e5e75e0a85f89b77762209b32a61b0a883c0ae61 | [
"MIT"
] | 6 | 2019-10-30T08:57:27.000Z | 2021-02-08T14:17:43.000Z | pytglib/api/types/update_chat_is_pinned.py | iTeam-co/python-telegram | e5e75e0a85f89b77762209b32a61b0a883c0ae61 | [
"MIT"
] | 1 | 2021-08-19T05:44:10.000Z | 2021-08-19T07:14:56.000Z | pytglib/api/types/update_chat_is_pinned.py | iTeam-co/python-telegram | e5e75e0a85f89b77762209b32a61b0a883c0ae61 | [
"MIT"
] | 5 | 2019-12-04T05:30:39.000Z | 2021-05-21T18:23:32.000Z |
from ..utils import Object
| 22.365854 | 60 | 0.563795 |
dbd4c90cb945544747b8308cf5ade961b6ff86c8 | 30,162 | py | Python | tests/test_api.py | jairhenrique/todoist-python | 755b9bd8a4fdf4e96b2381613ac0c4bed99731e5 | [
"MIT"
] | null | null | null | tests/test_api.py | jairhenrique/todoist-python | 755b9bd8a4fdf4e96b2381613ac0c4bed99731e5 | [
"MIT"
] | null | null | null | tests/test_api.py | jairhenrique/todoist-python | 755b9bd8a4fdf4e96b2381613ac0c4bed99731e5 | [
"MIT"
] | null | null | null | import io
import time
import todoist
| 29.1139 | 82 | 0.636264 |
dbd513568e3fe748df68592f5efb0230845ec0a5 | 990 | py | Python | setup.py | dylancrockett/iot.io | 472767186a5500e05b02d821f32e1208f3652418 | [
"MIT"
] | null | null | null | setup.py | dylancrockett/iot.io | 472767186a5500e05b02d821f32e1208f3652418 | [
"MIT"
] | null | null | null | setup.py | dylancrockett/iot.io | 472767186a5500e05b02d821f32e1208f3652418 | [
"MIT"
] | null | null | null | from setuptools import setup
import iotio
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="iot.io",
version=iotio.__version__,
packages=["iotio"],
author="Dylan Crockett",
author_email="dylanrcrockett@gmail.com",
license="MIT",
description="A management API ... | 28.285714 | 98 | 0.639394 |
dbd57373c1091216c9a267bad2a40451008902b2 | 1,820 | py | Python | trellominer/api/trello.py | xnoder/trellominer | 629d8f916486aa94a5bfa3a9497c36316c2864ed | [
"MIT"
] | null | null | null | trellominer/api/trello.py | xnoder/trellominer | 629d8f916486aa94a5bfa3a9497c36316c2864ed | [
"MIT"
] | null | null | null | trellominer/api/trello.py | xnoder/trellominer | 629d8f916486aa94a5bfa3a9497c36316c2864ed | [
"MIT"
] | null | null | null | import os
import requests
from trellominer.config import yaml
| 40.444444 | 165 | 0.644505 |
dbd5cd5e6175ef560ba478a76fe061ded7bfc8d7 | 2,337 | py | Python | alexnet_guided_bp_vanilla.py | wezteoh/face_perception_thru_backprop | 449f78ce330876ff25fbcdf892023fd2ba86005c | [
"MIT"
] | null | null | null | alexnet_guided_bp_vanilla.py | wezteoh/face_perception_thru_backprop | 449f78ce330876ff25fbcdf892023fd2ba86005c | [
"MIT"
] | null | null | null | alexnet_guided_bp_vanilla.py | wezteoh/face_perception_thru_backprop | 449f78ce330876ff25fbcdf892023fd2ba86005c | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
import os
from scipy.io import savemat
from scipy.io import loadmat
from scipy.misc import imread
from scipy.misc import imsave
from alexnet_face_classifier import *
import matplotlib.pyplot as plt
plt.switch_backend('agg')
###
def guided_backprop(graph, image, o... | 37.095238 | 110 | 0.693624 |
dbd6ae222f06041fd60daf0b6a6b62ee66225c4f | 18,729 | py | Python | tests/test_sqlalchemy_registry.py | AferriDaniel/coaster | 3ffbc9d33c981284593445299aaee0c3cc0cdb0b | [
"BSD-2-Clause"
] | 48 | 2015-01-15T08:57:24.000Z | 2022-01-26T04:04:34.000Z | tests/test_sqlalchemy_registry.py | AferriDaniel/coaster | 3ffbc9d33c981284593445299aaee0c3cc0cdb0b | [
"BSD-2-Clause"
] | 169 | 2015-01-16T13:17:38.000Z | 2021-05-31T13:23:23.000Z | tests/test_sqlalchemy_registry.py | AferriDaniel/coaster | 3ffbc9d33c981284593445299aaee0c3cc0cdb0b | [
"BSD-2-Clause"
] | 17 | 2015-02-15T07:39:04.000Z | 2021-10-05T11:20:22.000Z | """Registry and RegistryMixin tests."""
from types import SimpleNamespace
import pytest
from coaster.db import db
from coaster.sqlalchemy import BaseMixin
from coaster.sqlalchemy.registry import Registry
# --- Fixtures -------------------------------------------------------------------------
# --- Tests ... | 33.148673 | 88 | 0.724171 |
dbd6cc6412096e169b145a7b948ae52708971c75 | 1,311 | py | Python | home/migrations/0010_auto_20180206_1625.py | RomanMahar/personalsite | ad0c7880e0ccfe81ea53b8bad8e0d4fcf0c5830b | [
"MIT"
] | null | null | null | home/migrations/0010_auto_20180206_1625.py | RomanMahar/personalsite | ad0c7880e0ccfe81ea53b8bad8e0d4fcf0c5830b | [
"MIT"
] | 10 | 2020-06-05T17:26:09.000Z | 2022-01-13T00:39:44.000Z | home/migrations/0010_auto_20180206_1625.py | RomanMahar/personalsite | ad0c7880e0ccfe81ea53b8bad8e0d4fcf0c5830b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-02-06 16:25
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
| 36.416667 | 158 | 0.62624 |
dbd8f78b064be6d992dd13fbfa97e40d68c26218 | 900 | py | Python | nesta/packages/misc_utils/tests/test_guess_sql_type.py | anniyanvr/nesta | 4b3ae79922cebde0ad33e08ac4c40b9a10e8e7c3 | [
"MIT"
] | 13 | 2019-06-18T16:53:53.000Z | 2021-03-04T10:58:52.000Z | nesta/packages/misc_utils/tests/test_guess_sql_type.py | nestauk/old_nesta_daps | 4b3ae79922cebde0ad33e08ac4c40b9a10e8e7c3 | [
"MIT"
] | 208 | 2018-08-10T13:15:40.000Z | 2021-07-21T10:16:07.000Z | nesta/packages/misc_utils/tests/test_guess_sql_type.py | nestauk/old_nesta_daps | 4b3ae79922cebde0ad33e08ac4c40b9a10e8e7c3 | [
"MIT"
] | 8 | 2018-09-20T15:19:23.000Z | 2020-12-15T17:41:34.000Z | import pytest
from nesta.packages.misc_utils.guess_sql_type import guess_sql_type
def test_guess_sql_type_int(int_data):
assert guess_sql_type(int_data) == 'INTEGER'
def test_guess_sql_type_float(float_data):
assert guess_sql_type(float_data) == 'FLOAT'
def test_guess_sql_type_bool(bool_data):
assert gu... | 25.714286 | 73 | 0.725556 |
dbd936c5bdf9f66abffeaa3d4ec25c893af108da | 4,239 | py | Python | api/controller/activity.py | DXCChina/pms | c779a69f25fb08101593c6ff0451debc0abce6e4 | [
"MIT"
] | 27 | 2017-11-06T06:58:30.000Z | 2021-04-23T02:47:23.000Z | api/controller/activity.py | DXCChina/pms | c779a69f25fb08101593c6ff0451debc0abce6e4 | [
"MIT"
] | 3 | 2017-12-08T02:55:42.000Z | 2019-06-04T15:23:03.000Z | api/controller/activity.py | DXCChina/pms | c779a69f25fb08101593c6ff0451debc0abce6e4 | [
"MIT"
] | 16 | 2017-10-12T03:06:39.000Z | 2020-12-24T09:00:49.000Z | # -*- coding: utf-8 -*-
''''''
from flask import request
from model.db import database, Activity, ActivityMember, Demand, ActivityBase, ProjectMember, User
from model.role import identity
from flask_jwt_extended import (fresh_jwt_required)
def demand_activity_add(activity_id, data):
''''''
for demand_id in ... | 35.033058 | 98 | 0.599198 |
dbd96b797fa91e96b8a7f838f8fb68571c587fa0 | 326 | py | Python | math/9. Palindrome number.py | Rage-ops/Leetcode-Solutions | 48d4ecbb92a0bb7a7bb74a1445b593a67357ac02 | [
"MIT"
] | 1 | 2020-11-23T13:52:11.000Z | 2020-11-23T13:52:11.000Z | math/9. Palindrome number.py | harsha-sam/Leetcode-Solutions | 48d4ecbb92a0bb7a7bb74a1445b593a67357ac02 | [
"MIT"
] | null | null | null | math/9. Palindrome number.py | harsha-sam/Leetcode-Solutions | 48d4ecbb92a0bb7a7bb74a1445b593a67357ac02 | [
"MIT"
] | null | null | null | # Easy
# https://leetcode.com/problems/palindrome-number/
# Time Complexity: O(log(x) to base 10)
# Space Complexity: O(1) | 27.166667 | 50 | 0.542945 |
dbdc207882fb6307d686a3c2b77b753e65cc1495 | 114 | py | Python | panoramisk/__init__.py | Eyepea/panoramisk | c10725e358f5b802faa9df1d22de6710927735a0 | [
"MIT"
] | null | null | null | panoramisk/__init__.py | Eyepea/panoramisk | c10725e358f5b802faa9df1d22de6710927735a0 | [
"MIT"
] | null | null | null | panoramisk/__init__.py | Eyepea/panoramisk | c10725e358f5b802faa9df1d22de6710927735a0 | [
"MIT"
] | null | null | null | from .manager import Manager # NOQA
from .call_manager import CallManager # NOQA
from . import fast_agi # NOQA
| 28.5 | 45 | 0.763158 |
dbdc8acd947df0cf5d903b9fd18f947cd84ecb24 | 4,762 | py | Python | prtg/client.py | kevinschoon/prtg-py | 714e0750606e55b2cd4c7dff8770d94057fa932b | [
"MIT"
] | null | null | null | prtg/client.py | kevinschoon/prtg-py | 714e0750606e55b2cd4c7dff8770d94057fa932b | [
"MIT"
] | null | null | null | prtg/client.py | kevinschoon/prtg-py | 714e0750606e55b2cd4c7dff8770d94057fa932b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Python library for Paessler's PRTG (http://www.paessler.com/)
"""
import logging
import xml.etree.ElementTree as Et
from urllib import request
from prtg.cache import Cache
from prtg.models import Sensor, Device, Status, PrtgObject
from prtg.exceptions import BadTarget, UnknownResponse
"... | 32.616438 | 145 | 0.558169 |
dbdce6502afcfa5e2708f1c6de7ac5e46b73c5d7 | 3,303 | py | Python | template/misc.py | da-h/tf-boilerplate | ab8409c935d3fcbed07bbefd1cb0049d45283222 | [
"MIT"
] | null | null | null | template/misc.py | da-h/tf-boilerplate | ab8409c935d3fcbed07bbefd1cb0049d45283222 | [
"MIT"
] | null | null | null | template/misc.py | da-h/tf-boilerplate | ab8409c935d3fcbed07bbefd1cb0049d45283222 | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.python.training.session_run_hook import SessionRunArgs
# Define data loaders #####################################
# See https://gist.github.com/peterroelants/9956ec93a07ca4e9ba5bc415b014bcca
# redefine summarysaverhook (for more accurate saving)
def ExperimentTemplate() ->... | 32.70297 | 126 | 0.666969 |
dbdd97337631bf234182cdf6ceb595a8b38fcc53 | 359 | py | Python | pyunitwizard/_private_tools/parsers.py | uibcdf/pyunitwizard | 54cdce7369e1f2a3771a1f05a4a6ba1d7610a5e7 | [
"MIT"
] | null | null | null | pyunitwizard/_private_tools/parsers.py | uibcdf/pyunitwizard | 54cdce7369e1f2a3771a1f05a4a6ba1d7610a5e7 | [
"MIT"
] | null | null | null | pyunitwizard/_private_tools/parsers.py | uibcdf/pyunitwizard | 54cdce7369e1f2a3771a1f05a4a6ba1d7610a5e7 | [
"MIT"
] | null | null | null | parsers = ['openmm.unit', 'pint', 'unyt']
def digest_parser(parser: str) -> str:
""" Check if parser is correct."""
if parser is not None:
if parser.lower() in parsers:
return parser.lower()
else:
raise ValueError
else:
from pyunitwizard.kernel import default... | 25.642857 | 54 | 0.601671 |
dbddb2e414eaaea37bf5ee700d9d3c21f697c101 | 6,606 | py | Python | metric_wsd/utils/data_utils.py | bartonlin/MWSD | 70ad446ee7f00a11988acb290270e32d8e6af925 | [
"MIT"
] | 4 | 2021-04-27T16:28:51.000Z | 2021-08-30T11:10:28.000Z | metric_wsd/utils/data_utils.py | bartonlin/MWSD | 70ad446ee7f00a11988acb290270e32d8e6af925 | [
"MIT"
] | null | null | null | metric_wsd/utils/data_utils.py | bartonlin/MWSD | 70ad446ee7f00a11988acb290270e32d8e6af925 | [
"MIT"
] | 2 | 2021-08-25T14:29:45.000Z | 2022-02-12T02:09:45.000Z | '''
Copyright (c) Facebook, Inc. and its affiliates.
All rights reserved.
This source code is licensed under the license found in the
LICENSE file in the root directory of this source tree.
Code taken from: https://github.com/facebookresearch/wsd-biencoders/blob/master/wsd_models/util.py
'''
import os
import re
impo... | 29.891403 | 98 | 0.673479 |
dbddc1c2c35c862c97e10c987a1255308c864f59 | 2,825 | py | Python | examples/dehydrogenation/3-property-mappings/mappings_from_ontology/run_w_onto.py | TorgeirUstad/dlite | 1d7b4ccec0e76799a25992534cd295a80d83878a | [
"MIT"
] | null | null | null | examples/dehydrogenation/3-property-mappings/mappings_from_ontology/run_w_onto.py | TorgeirUstad/dlite | 1d7b4ccec0e76799a25992534cd295a80d83878a | [
"MIT"
] | null | null | null | examples/dehydrogenation/3-property-mappings/mappings_from_ontology/run_w_onto.py | TorgeirUstad/dlite | 1d7b4ccec0e76799a25992534cd295a80d83878a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from typing import Dict, AnyStr
from pathlib import Path
from ontopy import get_ontology
import dlite
from dlite.mappings import make_instance
# Setup dlite paths
thisdir = Path(__file__).parent.absolute()
rootdir = thisdir.parent.parent
workflow1dir = rootdir / '1-simple-workflow'
entitiesdir... | 31.388889 | 75 | 0.735929 |
91551c7d6fac7874ebf8acc4dfa5dfb4b2e853a5 | 6,479 | py | Python | forms.py | lendoo73/my_idea_boxes | c0d0e7bbd0b64ae35146f3792cd477d1ec8461b5 | [
"MIT"
] | null | null | null | forms.py | lendoo73/my_idea_boxes | c0d0e7bbd0b64ae35146f3792cd477d1ec8461b5 | [
"MIT"
] | null | null | null | forms.py | lendoo73/my_idea_boxes | c0d0e7bbd0b64ae35146f3792cd477d1ec8461b5 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileAllowed, FileRequired
from wtforms import StringField, PasswordField, BooleanField, TextAreaField, SubmitField, RadioField, HiddenField
from wtforms.fields.html5 import DateField, IntegerField
from wtforms.validators import ValidationError, DataR... | 40.49375 | 113 | 0.679426 |
9155a081d524a7aa2a093b5db6afb167995bd2d7 | 3,381 | py | Python | 5.analysis/scikit-multilearn-master/skmultilearn/adapt/brknn.py | fullmooncj/textmining_edu | b1402fd96fbde945f48c52d71ba4dfe51fd96602 | [
"Apache-2.0"
] | null | null | null | 5.analysis/scikit-multilearn-master/skmultilearn/adapt/brknn.py | fullmooncj/textmining_edu | b1402fd96fbde945f48c52d71ba4dfe51fd96602 | [
"Apache-2.0"
] | null | null | null | 5.analysis/scikit-multilearn-master/skmultilearn/adapt/brknn.py | fullmooncj/textmining_edu | b1402fd96fbde945f48c52d71ba4dfe51fd96602 | [
"Apache-2.0"
] | null | null | null | from builtins import range
from ..base import MLClassifierBase
from ..utils import get_matrix_in_format
from sklearn.neighbors import NearestNeighbors
import scipy.sparse as sparse
import numpy as np | 37.566667 | 135 | 0.675244 |
9155e8339948407989efd32f44f9c2682f1c678e | 931 | py | Python | groclient/constants.py | eric-gro/api-client | 0ca73422c25b5065907d068a44b72bdc43fea79f | [
"MIT"
] | 18 | 2019-01-10T21:06:17.000Z | 2022-03-15T06:22:18.000Z | groclient/constants.py | eric-gro/api-client | 0ca73422c25b5065907d068a44b72bdc43fea79f | [
"MIT"
] | 138 | 2019-01-16T15:35:35.000Z | 2022-03-23T13:05:03.000Z | groclient/constants.py | eric-gro/api-client | 0ca73422c25b5065907d068a44b72bdc43fea79f | [
"MIT"
] | 24 | 2019-02-22T19:24:54.000Z | 2022-03-15T10:17:37.000Z | """Constants about the Gro ontology that can be imported and re-used anywhere."""
REGION_LEVELS = {
'world': 1,
'continent': 2,
'country': 3,
'province': 4, # Equivalent to state in the United States
'district': 5, # Equivalent to county in the United States
'city': 6,
'market': 7,
'o... | 22.707317 | 88 | 0.628357 |
9156c4aa90ea0469b8acd15340e3ebcae1eab123 | 1,535 | py | Python | asv_bench/benchmarks/tslibs/period.py | CitizenB/pandas | ee1efb6d923a2c3e5a912efe20a336179614993d | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 6 | 2020-09-10T15:03:25.000Z | 2021-04-01T22:48:33.000Z | asv_bench/benchmarks/tslibs/period.py | ivan-vasilev/pandas | 4071dde86e33434e1bee8304fa62074949f813cc | [
"BSD-3-Clause"
] | 7 | 2015-08-30T23:51:00.000Z | 2018-12-29T19:52:35.000Z | asv_bench/benchmarks/tslibs/period.py | ivan-vasilev/pandas | 4071dde86e33434e1bee8304fa62074949f813cc | [
"BSD-3-Clause"
] | 5 | 2017-10-04T22:24:49.000Z | 2021-08-06T13:50:13.000Z | """
Period benchmarks that rely only on tslibs. See benchmarks.period for
Period benchmarks that rely on other parts fo pandas.
"""
from pandas import Period
from pandas.tseries.frequencies import to_offset
| 21.619718 | 70 | 0.536808 |
91575f345c10efb311ca9de7963da8d6ac0667fd | 1,894 | py | Python | Bugscan_exploits-master/exp_list/exp-1788.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 11 | 2020-05-30T13:53:49.000Z | 2021-03-17T03:20:59.000Z | Bugscan_exploits-master/exp_list/exp-1788.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-13T03:25:18.000Z | 2020-07-21T06:24:16.000Z | Bugscan_exploits-master/exp_list/exp-1788.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-30T13:53:51.000Z | 2020-12-01T21:44:26.000Z | #/usr/bin/python
#-*- coding: utf-8 -*-
#Refer http://www.wooyun.org/bugs/wooyun-2015-0137140
#__Author__ =
#_PlugName_ = whezeip Plugin
#_FileName_ = whezeip.py
if __name__ == '__main__':
from dummy import *
audit(assign('whezeip', 'http://218.104.147.71:7001/')[1]) | 37.137255 | 97 | 0.659451 |
9158ba2878b65e7507783af35fb834ff85d1e33a | 535 | py | Python | 3-working-with-lists/zip_tuples.py | thecodingsim/learn-python | bf8e98f40e73ebf7dcf5641312c2c0296d886952 | [
"MIT"
] | null | null | null | 3-working-with-lists/zip_tuples.py | thecodingsim/learn-python | bf8e98f40e73ebf7dcf5641312c2c0296d886952 | [
"MIT"
] | null | null | null | 3-working-with-lists/zip_tuples.py | thecodingsim/learn-python | bf8e98f40e73ebf7dcf5641312c2c0296d886952 | [
"MIT"
] | null | null | null | # Use zip() to create a new variable called names_and_dogs_names that combines owners and dogs_names lists into a zip object.
# Then, create a new variable named list_of_names_and_dogs_names by calling the list() function on names_and_dogs_names.
# Print list_of_names_and_dogs_names.
owners = ["Jenny", "Alexus", "Sa... | 48.636364 | 125 | 0.792523 |
915a53aa4a7088b23b53c3227ab2635547e8ba50 | 1,593 | py | Python | setup.py | abhiomkar/couchdbkit | 035062b504b57c1cc6e576be47fb05423fb1ddb3 | [
"MIT"
] | 1 | 2021-06-03T21:34:38.000Z | 2021-06-03T21:34:38.000Z | setup.py | abhiomkar/couchdbkit | 035062b504b57c1cc6e576be47fb05423fb1ddb3 | [
"MIT"
] | null | null | null | setup.py | abhiomkar/couchdbkit | 035062b504b57c1cc6e576be47fb05423fb1ddb3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -
#
# This file is part of couchdbkit released under the MIT license.
# See the NOTICE for more information.
import os
import sys
if not hasattr(sys, 'version_info') or sys.version_info < (2, 5, 0, 'final'):
raise SystemExit("couchdbkit requires Python 2.5 or later.")
from setuptools import ... | 27 | 77 | 0.626491 |
915bb507e25fc7cb08c5d136b971e88a2d706d9b | 1,934 | py | Python | tests/integration/test_infrastructure_persistence.py | othercodes/sample-todo-list-hexagonal-achitecture | a958c6906d8e777e837c8348c754b637b89a7031 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_infrastructure_persistence.py | othercodes/sample-todo-list-hexagonal-achitecture | a958c6906d8e777e837c8348c754b637b89a7031 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_infrastructure_persistence.py | othercodes/sample-todo-list-hexagonal-achitecture | a958c6906d8e777e837c8348c754b637b89a7031 | [
"Apache-2.0"
] | null | null | null | from typing import Optional
from complexheart.domain.criteria import Criteria
from sqlalchemy import create_engine
from sqlalchemy.engine import Engine
from sqlalchemy.orm import sessionmaker
from to_do_list.tasks.domain.models import Task
from to_do_list.tasks.infrastructure.persistence.relational import RelationalT... | 27.628571 | 104 | 0.73061 |
915c531ce1a9edc3c8480b0c6bf84bed9c0ec81f | 2,934 | py | Python | wagtail_jinja2/extensions.py | minervaproject/wagtail-jinja2-extensions | 708f2f873273312ead80d67c3eff0555f152d072 | [
"MIT"
] | 6 | 2015-09-25T15:33:17.000Z | 2021-11-17T23:25:52.000Z | wagtail_jinja2/extensions.py | minervaproject/wagtail-jinja2-extensions | 708f2f873273312ead80d67c3eff0555f152d072 | [
"MIT"
] | 1 | 2015-09-29T15:53:40.000Z | 2015-09-29T15:53:40.000Z | wagtail_jinja2/extensions.py | minervaproject/wagtail-jinja2-extensions | 708f2f873273312ead80d67c3eff0555f152d072 | [
"MIT"
] | null | null | null | from jinja2.ext import Extension
from jinja2 import nodes
from jinja2 import Markup
from wagtail.wagtailadmin.templatetags.wagtailuserbar import wagtailuserbar as original_wagtailuserbar
from wagtail.wagtailimages.models import Filter, SourceImageIOError
| 40.75 | 113 | 0.65576 |
915d6d3e43279c39fd9d72fc48c527f4f811ec46 | 180 | py | Python | rta/provision/__init__.py | XiaoguTech/rta-sandbox | 2783a3ba8920bf64273761ce7392e51c9c8fb1f7 | [
"MIT"
] | null | null | null | rta/provision/__init__.py | XiaoguTech/rta-sandbox | 2783a3ba8920bf64273761ce7392e51c9c8fb1f7 | [
"MIT"
] | null | null | null | rta/provision/__init__.py | XiaoguTech/rta-sandbox | 2783a3ba8920bf64273761ce7392e51c9c8fb1f7 | [
"MIT"
] | null | null | null | from rta.provision.utils import *
from rta.provision.passwd import *
from rta.provision.influxdb import *
from rta.provision.grafana import *
from rta.provision.kapacitor import *
| 30 | 37 | 0.805556 |
915d76b7f2fcca50d25cf033042e2f1d7c43e461 | 14,694 | py | Python | nn_dataflow/tests/unit_test/test_network.py | Pingziwalk/nn_dataflow | 5ae8eeba4e243df6e9a69127073513a852a62d17 | [
"BSD-3-Clause"
] | 170 | 2017-02-28T01:33:11.000Z | 2022-03-12T09:56:47.000Z | nn_dataflow/tests/unit_test/test_network.py | Pingziwalk/nn_dataflow | 5ae8eeba4e243df6e9a69127073513a852a62d17 | [
"BSD-3-Clause"
] | 24 | 2017-09-18T20:14:51.000Z | 2022-01-23T06:43:28.000Z | nn_dataflow/tests/unit_test/test_network.py | Pingziwalk/nn_dataflow | 5ae8eeba4e243df6e9a69127073513a852a62d17 | [
"BSD-3-Clause"
] | 71 | 2017-02-07T17:36:17.000Z | 2022-03-26T00:45:00.000Z | """ $lic$
Copyright (C) 2016-2020 by Tsinghua University and The Board of Trustees of
Stanford University
This program is free software: you can redistribute it and/or modify it under
the terms of the Modified BSD-3 License as published by the Open Source
Initiative.
This program is distributed in the hope that it wi... | 38.365535 | 79 | 0.598884 |
915df7659ad33f08dc46ec91edcb67d2d6a2b9af | 365 | py | Python | apps/division/urls.py | Jingil-Integrated-Management/JIM_backend | f0e7860d57eddaee034531a52ab91d6715d12c18 | [
"Apache-2.0"
] | null | null | null | apps/division/urls.py | Jingil-Integrated-Management/JIM_backend | f0e7860d57eddaee034531a52ab91d6715d12c18 | [
"Apache-2.0"
] | null | null | null | apps/division/urls.py | Jingil-Integrated-Management/JIM_backend | f0e7860d57eddaee034531a52ab91d6715d12c18 | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from .views import DivisionListCreateAPIView, DivisionRetrieveUpdateDestroyAPIView, MainDivisionListAPIView
urlpatterns = [
path('division/', DivisionListCreateAPIView.as_view()),
path('division/<division_pk>', DivisionRetrieveUpdateDestroyAPIView.as_view()),
path('division/m... | 33.181818 | 107 | 0.794521 |
915ff60df252f62c3f259d30deba52d17fbf124c | 9,077 | py | Python | sympy/solvers/tests/test_pde.py | nashalex/sympy | aec3e6512be46f0558f5dbcf2b4d723496c91649 | [
"BSD-3-Clause"
] | 8,323 | 2015-01-02T15:51:43.000Z | 2022-03-31T13:13:19.000Z | sympy/solvers/tests/test_pde.py | nashalex/sympy | aec3e6512be46f0558f5dbcf2b4d723496c91649 | [
"BSD-3-Clause"
] | 15,102 | 2015-01-01T01:33:17.000Z | 2022-03-31T22:53:13.000Z | sympy/solvers/tests/test_pde.py | nashalex/sympy | aec3e6512be46f0558f5dbcf2b4d723496c91649 | [
"BSD-3-Clause"
] | 4,490 | 2015-01-01T17:48:07.000Z | 2022-03-31T17:24:05.000Z | from sympy import (Derivative as D, Eq, exp, sin,
Function, Symbol, symbols, cos, log)
from sympy.core import S
from sympy.solvers.pde import (pde_separate, pde_separate_add, pde_separate_mul,
pdsolve, classify_pde, checkpdesol)
from sympy.testing.pytest import raises
a, b, c, x, y = symbols('a b c x y')
... | 38.299578 | 84 | 0.537512 |
91613dad90fa3ec0c081f265b28f59e30cdfc17e | 6,376 | py | Python | GCN/GCN.py | EasternJournalist/learn-deep-learning | cc424713ffc57b8a796ebd81354a1b887f9c5092 | [
"MIT"
] | 6 | 2021-08-18T03:29:12.000Z | 2022-03-22T13:15:35.000Z | GCN/GCN.py | EasternJournalist/learn-deep-learning | cc424713ffc57b8a796ebd81354a1b887f9c5092 | [
"MIT"
] | null | null | null | GCN/GCN.py | EasternJournalist/learn-deep-learning | cc424713ffc57b8a796ebd81354a1b887f9c5092 | [
"MIT"
] | 2 | 2022-01-06T12:25:02.000Z | 2022-03-22T13:15:36.000Z | import torch
import torch.nn.functional as F
import pandas as pd
import numpy as np
from torch_geometric.data import Data
from torch_geometric.nn import GCNConv, PairNorm
from torch_geometric.utils.undirected import to_undirected
import random
import matplotlib.pyplot as plt
data_name = 'citeseer' # 'cora' or 'ci... | 44.587413 | 134 | 0.674875 |
9163007875867d67440a283e2e9737b0b98baef2 | 3,724 | py | Python | esg_leipzig_homepage_2015/views.py | ESG-Leipzig/Homepage-2015 | 6b77451881031dcb640d2e61ce862617d634f9ac | [
"MIT"
] | null | null | null | esg_leipzig_homepage_2015/views.py | ESG-Leipzig/Homepage-2015 | 6b77451881031dcb640d2e61ce862617d634f9ac | [
"MIT"
] | 4 | 2015-03-31T22:37:09.000Z | 2015-10-22T21:37:17.000Z | esg_leipzig_homepage_2015/views.py | ESG-Leipzig/Homepage-2015 | 6b77451881031dcb640d2e61ce862617d634f9ac | [
"MIT"
] | 3 | 2015-02-03T10:23:24.000Z | 2018-04-11T12:29:23.000Z | import datetime
import json
from django.conf import settings
from django.http import Http404
from django.utils import timezone
from django.views import generic
from .models import Event, FlatPage, News
| 31.559322 | 78 | 0.603652 |
91632bfaf2e874f47f67ae904c5dae1d1c06cb7a | 3,509 | py | Python | train.py | ronniechong/tensorflow-trainer | 79e58d224ce1e5ae687abee2bfd81deb49bd41dd | [
"MIT"
] | null | null | null | train.py | ronniechong/tensorflow-trainer | 79e58d224ce1e5ae687abee2bfd81deb49bd41dd | [
"MIT"
] | 6 | 2021-06-08T21:56:34.000Z | 2022-03-12T00:39:34.000Z | train.py | ronniechong/tensorflow-trainer | 79e58d224ce1e5ae687abee2bfd81deb49bd41dd | [
"MIT"
] | null | null | null | from dotenv import load_dotenv
load_dotenv()
from flask import Flask, flash, request, redirect, url_for
from flask_ngrok import run_with_ngrok
from flask_cors import CORS
from werkzeug.utils import secure_filename
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.applications import vgg16
fro... | 29 | 121 | 0.654032 |
91633c0b686a90b166f71428baf166c3cd9fcb51 | 4,555 | py | Python | src/models/train_model.py | sandorfoldi/chess_positions_recognition | b051f5ba066876d54c435d96cf7e339dfc369b3b | [
"FTL"
] | null | null | null | src/models/train_model.py | sandorfoldi/chess_positions_recognition | b051f5ba066876d54c435d96cf7e339dfc369b3b | [
"FTL"
] | null | null | null | src/models/train_model.py | sandorfoldi/chess_positions_recognition | b051f5ba066876d54c435d96cf7e339dfc369b3b | [
"FTL"
] | 1 | 2022-01-08T20:26:08.000Z | 2022-01-08T20:26:08.000Z | import random
import matplotlib.pyplot as plt
import wandb
import hydra
import torch
import torch.utils.data as data_utils
from model import ChessPiecePredictor
from torch import nn, optim
from google.cloud import storage
from torch.utils.data import DataLoader
from torchvision import transforms
from torchvision.datas... | 29.967105 | 100 | 0.636004 |
9163be87e7924e53bd340c783bc5110d591ba91f | 1,386 | py | Python | fairseq/scoring/__init__.py | fairseq-FT/fairseq | 18725499144c1bba7c151b796ba774e59d36eaa9 | [
"MIT"
] | 33 | 2021-01-06T18:03:55.000Z | 2022-03-28T12:07:44.000Z | fairseq/scoring/__init__.py | fairseq-FT/fairseq | 18725499144c1bba7c151b796ba774e59d36eaa9 | [
"MIT"
] | 8 | 2021-06-11T03:11:37.000Z | 2022-03-08T19:15:42.000Z | fairseq/scoring/__init__.py | fairseq-FT/fairseq | 18725499144c1bba7c151b796ba774e59d36eaa9 | [
"MIT"
] | 14 | 2021-05-17T06:55:01.000Z | 2022-03-28T12:07:42.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import importlib
import os
from abc import ABC, abstractmethod
from fairseq import registry
from omegaconf import DictConfig
_build_score... | 24.315789 | 87 | 0.665945 |
9164b76283b749a665c678ccd635362448fe685d | 10,817 | py | Python | dfn/tests/test_FractureNetworkThermal.py | richardhaslam/discrete-fracture-network | 2a235fdd3aedfb80dbd9f441d07c5713a6d6c74f | [
"MIT"
] | 1 | 2021-06-01T17:38:15.000Z | 2021-06-01T17:38:15.000Z | dfn/tests/test_FractureNetworkThermal.py | richardhaslam/discrete-fracture-network | 2a235fdd3aedfb80dbd9f441d07c5713a6d6c74f | [
"MIT"
] | null | null | null | dfn/tests/test_FractureNetworkThermal.py | richardhaslam/discrete-fracture-network | 2a235fdd3aedfb80dbd9f441d07c5713a6d6c74f | [
"MIT"
] | null | null | null | import copy
import unittest
import networkx as nx
import numpy as np
from scipy.special import erf
from dfn import Fluid, FractureNetworkThermal
if __name__ == '__main__':
unittest.main()
| 38.222615 | 79 | 0.547194 |
91674cee92c414668d806e044c2d5ffc326ce9fc | 10,775 | py | Python | dataapi/AWS/getawsdata.py | gusamarante/Quantequim | 3968d9965e8e2c3b5850f1852b56c485859a9c89 | [
"MIT"
] | 296 | 2018-10-19T21:00:53.000Z | 2022-03-29T21:50:55.000Z | dataapi/AWS/getawsdata.py | gusamarante/Quantequim | 3968d9965e8e2c3b5850f1852b56c485859a9c89 | [
"MIT"
] | 11 | 2019-06-18T11:43:35.000Z | 2021-11-14T21:39:20.000Z | dataapi/AWS/getawsdata.py | gusamarante/FinanceLab | 3968d9965e8e2c3b5850f1852b56c485859a9c89 | [
"MIT"
] | 102 | 2018-10-18T14:14:34.000Z | 2022-03-06T00:34:53.000Z | """
Author: Gustavo Amarante
"""
import numpy as np
import pandas as pd
from datetime import datetime
| 35.212418 | 117 | 0.604826 |
9167fe0a7f3eeef9305940bbccf9dcc614aaf736 | 569 | py | Python | assets/utils/config.py | mklew/quickstart-data-lake-qubole | bb9b4a559815fc293b0fa06aa7e536fe14ced6dd | [
"Apache-2.0"
] | null | null | null | assets/utils/config.py | mklew/quickstart-data-lake-qubole | bb9b4a559815fc293b0fa06aa7e536fe14ced6dd | [
"Apache-2.0"
] | null | null | null | assets/utils/config.py | mklew/quickstart-data-lake-qubole | bb9b4a559815fc293b0fa06aa7e536fe14ced6dd | [
"Apache-2.0"
] | null | null | null | from configparser import ConfigParser
CONFIG_INT_KEYS = {
'hadoop_max_nodes_count',
'hadoop_ebs_volumes_count',
'hadoop_ebs_volume_size',
'spark_max_nodes_count',
'spark_ebs_volumes_count',
'spark_ebs_volume_size'
}
| 27.095238 | 101 | 0.72232 |
91685cf5f5c65ae2f279254e25c1a73ac7408132 | 609 | py | Python | app/blueprints/admin_api/__init__.py | lvyaoo/api-demo | f45c05c154385510572b5200b74dcbbfdb7e234c | [
"MIT"
] | null | null | null | app/blueprints/admin_api/__init__.py | lvyaoo/api-demo | f45c05c154385510572b5200b74dcbbfdb7e234c | [
"MIT"
] | null | null | null | app/blueprints/admin_api/__init__.py | lvyaoo/api-demo | f45c05c154385510572b5200b74dcbbfdb7e234c | [
"MIT"
] | null | null | null | from flask import Blueprint
from .hooks import admin_auth
from ...api_utils import *
bp_admin_api = Blueprint('bp_admin_api', __name__)
bp_admin_api.register_error_handler(APIError, handle_api_error)
bp_admin_api.register_error_handler(500, handle_500_error)
bp_admin_api.register_error_handler(400, handle_400_error)... | 33.833333 | 63 | 0.868637 |
916aaa2f9132fad05b66933ca386d50c7aed073b | 6,083 | py | Python | project/starter_code/student_utils.py | nihaagarwalla/nd320-c1-emr-data-starter | 6ce6bb65e89b38f1c2119a739b892ad2504adf7d | [
"MIT"
] | null | null | null | project/starter_code/student_utils.py | nihaagarwalla/nd320-c1-emr-data-starter | 6ce6bb65e89b38f1c2119a739b892ad2504adf7d | [
"MIT"
] | null | null | null | project/starter_code/student_utils.py | nihaagarwalla/nd320-c1-emr-data-starter | 6ce6bb65e89b38f1c2119a739b892ad2504adf7d | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import os
import tensorflow as tf
import functools
####### STUDENTS FILL THIS OUT ######
#Question 3
def reduce_dimension_ndc(df, ndc_df):
'''
df: pandas dataframe, input dataset
ndc_df: pandas dataframe, drug code dataset used for mapping in generic names
return:... | 40.553333 | 158 | 0.706395 |