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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
649796fc6892373cd358b9ae0ff0471d9dffe9cf | 1,474 | py | Python | own/recursive_lomuto_quick_select_k_set_coderpad.py | MrCsabaToth/IK | 713f91c28af7b4a964ba854ede9fec73bf0c4682 | [
"Apache-2.0"
] | null | null | null | own/recursive_lomuto_quick_select_k_set_coderpad.py | MrCsabaToth/IK | 713f91c28af7b4a964ba854ede9fec73bf0c4682 | [
"Apache-2.0"
] | null | null | null | own/recursive_lomuto_quick_select_k_set_coderpad.py | MrCsabaToth/IK | 713f91c28af7b4a964ba854ede9fec73bf0c4682 | [
"Apache-2.0"
] | null | null | null | import random
import pytest
pytest.main()
| 23.03125 | 90 | 0.57327 |
6497a361fbfe4776b2db4e33d8ba9a4805544636 | 1,212 | py | Python | app.py | Programmer-RD-AI/Simple-Blog | 188343b9ed039690e2081026ec604c37d821ad57 | [
"Apache-2.0"
] | null | null | null | app.py | Programmer-RD-AI/Simple-Blog | 188343b9ed039690e2081026ec604c37d821ad57 | [
"Apache-2.0"
] | null | null | null | app.py | Programmer-RD-AI/Simple-Blog | 188343b9ed039690e2081026ec604c37d821ad57 | [
"Apache-2.0"
] | null | null | null | from flask import *
import pymongo
from pymongo import *
app = Flask(__name__)
app.debug = True
app.secret_key = 'test'
cluster = MongoClient("mongodb://Ranuga:ranuga2008@cluster0-shard-00-00.odlbl.mongodb.net:27017,cluster0-shard-00-01.odlbl.mongodb.net:27017,cluster0-shard-00-02.odlbl.mongodb.net:27017/myFirstDatabas... | 36.727273 | 289 | 0.670792 |
649a540a7b30e7793e5deda92e69dcaf44168a57 | 371 | py | Python | app/src/subtitle/models.py | robertzm/VideoWebDemo | 96e0e80b794c35ef77e92d1afce2e9bb498f0a2a | [
"Apache-2.0"
] | 2 | 2020-12-09T23:34:58.000Z | 2020-12-10T06:39:28.000Z | app/src/subtitle/models.py | robertzm/VideoWebDemo | 96e0e80b794c35ef77e92d1afce2e9bb498f0a2a | [
"Apache-2.0"
] | 2 | 2021-01-11T08:59:37.000Z | 2021-01-11T09:00:06.000Z | app/src/subtitle/models.py | robertzm/VideoWebDemo | 96e0e80b794c35ef77e92d1afce2e9bb498f0a2a | [
"Apache-2.0"
] | null | null | null | from app import db
| 28.538462 | 63 | 0.67655 |
649bebb548c8b13728e620cc10bd445dcea417f4 | 263 | py | Python | meme/admin.py | mkimartinez/Lyfey | 8a27ef7fea92146f043c68c7ef5ee3672014c3fc | [
"MIT"
] | null | null | null | meme/admin.py | mkimartinez/Lyfey | 8a27ef7fea92146f043c68c7ef5ee3672014c3fc | [
"MIT"
] | null | null | null | meme/admin.py | mkimartinez/Lyfey | 8a27ef7fea92146f043c68c7ef5ee3672014c3fc | [
"MIT"
] | null | null | null | from django.contrib import admin
from .import models
from meme.models import Comment
# Register your models here.
admin.site.register(models.Mem)
admin.site.register(Comment,CommentAdmin) | 26.3 | 41 | 0.802281 |
649d0ca596b6a034bd16e8ed6193bec8d572c9c4 | 2,033 | py | Python | ProgrammingAssignments/IrisClassification/Vowpal/convertToVowpal.py | ckcortright/CSCI4830MachineLearning | 5d1c6c7bfb05b54f7c000c940b1f6410054f10f0 | [
"MIT"
] | null | null | null | ProgrammingAssignments/IrisClassification/Vowpal/convertToVowpal.py | ckcortright/CSCI4830MachineLearning | 5d1c6c7bfb05b54f7c000c940b1f6410054f10f0 | [
"MIT"
] | null | null | null | ProgrammingAssignments/IrisClassification/Vowpal/convertToVowpal.py | ckcortright/CSCI4830MachineLearning | 5d1c6c7bfb05b54f7c000c940b1f6410054f10f0 | [
"MIT"
] | 2 | 2016-11-30T07:28:47.000Z | 2017-01-28T05:52:45.000Z | ################################################################################
# A simple script to convert the iris training data to the vowpal wabbit format.
#
# Author: Carl Cortright
# Date: 9/10/2016
#
# Copyright 2016 Carl Cortright
###############################################################################... | 27.849315 | 80 | 0.567634 |
649d8bfa1c8ee1ea90e6d40d1fff1eb930a5b1f6 | 767 | py | Python | trainstalker/sncfdata_rt/views.py | miludmann/trainstalker | 7ecb6f052f459b66d42d727c9b162f47b908b98f | [
"BSD-3-Clause"
] | null | null | null | trainstalker/sncfdata_rt/views.py | miludmann/trainstalker | 7ecb6f052f459b66d42d727c9b162f47b908b98f | [
"BSD-3-Clause"
] | null | null | null | trainstalker/sncfdata_rt/views.py | miludmann/trainstalker | 7ecb6f052f459b66d42d727c9b162f47b908b98f | [
"BSD-3-Clause"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
from sncfdata_rt.models import Station
# Create your views here.
| 30.68 | 67 | 0.749674 |
649fc4b512a5b9fc6782de731a26e50560bffbcf | 516 | py | Python | z.uncategorized/programmers87946.py | kimminki10/algorithms2 | 5d3b2d970dbc88169108632ce0d234bf74446316 | [
"MIT"
] | null | null | null | z.uncategorized/programmers87946.py | kimminki10/algorithms2 | 5d3b2d970dbc88169108632ce0d234bf74446316 | [
"MIT"
] | null | null | null | z.uncategorized/programmers87946.py | kimminki10/algorithms2 | 5d3b2d970dbc88169108632ce0d234bf74446316 | [
"MIT"
] | null | null | null | """
https://programmers.co.kr/learn/courses/30/lessons/87946
"""
result = 0
kk = 80
dundun = [[80,20],[50,40],[30,10]]
print(solution(kk, dundun)) | 19.111111 | 61 | 0.550388 |
64a02aaa94244083fe284a70aa2f56168c273094 | 10,914 | py | Python | nicos/clients/gui/utils.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2021-03-26T10:30:45.000Z | 2021-03-26T10:30:45.000Z | nicos/clients/gui/utils.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos/clients/gui/utils.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 3 | 2020-08-04T18:35:05.000Z | 2021-04-16T11:22:08.000Z | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 31.45245 | 87 | 0.616731 |
64a323ffac34c092ee3ab917bb34c846d0e4e329 | 5,391 | py | Python | python/functest/sv_perf_check_full.py | spiralgenetics/biograph | 33c78278ce673e885f38435384f9578bfbf9cdb8 | [
"BSD-2-Clause"
] | 16 | 2021-07-14T23:32:31.000Z | 2022-03-24T16:25:15.000Z | python/functest/sv_perf_check_full.py | spiralgenetics/biograph | 33c78278ce673e885f38435384f9578bfbf9cdb8 | [
"BSD-2-Clause"
] | 9 | 2021-07-20T20:39:47.000Z | 2021-09-16T20:57:59.000Z | python/functest/sv_perf_check_full.py | spiralgenetics/biograph | 33c78278ce673e885f38435384f9578bfbf9cdb8 | [
"BSD-2-Clause"
] | 9 | 2021-07-15T19:38:35.000Z | 2022-01-31T19:24:56.000Z | """
sv_performance_test.py: Medium tests to ensure variant discovery hasn't changed too much
"""
import os
import json
import unittest
import sys
import subprocess
from glob import glob
from python.functest.utils.setup import (
ftest_setup,
ftest_teardown,
ftest_module_setup
)
SEARCH_PATH = ["/scratch"]
... | 35.235294 | 201 | 0.592283 |
64a35f680e8ea36296637c6eb5830f1e36cb28a7 | 177 | py | Python | fireCatcher.py | n1cfury/ViolentPython | c758de753bd56fe8b5c5b6db6f0f1b134023bf6f | [
"MIT"
] | null | null | null | fireCatcher.py | n1cfury/ViolentPython | c758de753bd56fe8b5c5b6db6f0f1b134023bf6f | [
"MIT"
] | null | null | null | fireCatcher.py | n1cfury/ViolentPython | c758de753bd56fe8b5c5b6db6f0f1b134023bf6f | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main() | 11.0625 | 48 | 0.615819 |
64a5e4b1934441d33265c0c90517da3ddd60146a | 27,257 | py | Python | pythonScripts/blenderMeshExport.py | dsnettleton/whipstitch-game-engine | 1c91a2e90274f18723141ec57d0cb4930bd29b25 | [
"MIT"
] | null | null | null | pythonScripts/blenderMeshExport.py | dsnettleton/whipstitch-game-engine | 1c91a2e90274f18723141ec57d0cb4930bd29b25 | [
"MIT"
] | null | null | null | pythonScripts/blenderMeshExport.py | dsnettleton/whipstitch-game-engine | 1c91a2e90274f18723141ec57d0cb4930bd29b25 | [
"MIT"
] | null | null | null | # Blender Mesh Export for the Whipstitch Game Engine
# Copyright D. Scott Nettleton, 2013
# This software is released under the terms of the
# Lesser GNU Public License (LGPL).
import bpy,os
from math import sqrt
from mathutils import Matrix, Vector, Quaternion
from copy import deepcopy
workingDirectory = "./"... | 39.849415 | 125 | 0.602341 |
64a6891558cc648a2a978e43a61510b62a12beb7 | 2,214 | py | Python | cogs/Basic.py | yoggys/discord-bot-template | 25b2e8dd830c0900323927cd9bbc0ec6baa22fec | [
"MIT"
] | 2 | 2021-01-12T11:36:23.000Z | 2021-01-13T12:29:58.000Z | cogs/Basic.py | yoggys/discord-bot-template | 25b2e8dd830c0900323927cd9bbc0ec6baa22fec | [
"MIT"
] | 1 | 2021-12-07T12:47:36.000Z | 2021-12-16T14:07:00.000Z | cogs/Basic.py | yoggys/discord-bot-template | 25b2e8dd830c0900323927cd9bbc0ec6baa22fec | [
"MIT"
] | null | null | null | from functions.Logger import log_info, error_handle
from discord.ext import commands
import sys
| 36.9 | 114 | 0.631436 |
64a70ed160e992e374d323deae21b2f96b2a2c39 | 638 | py | Python | python/listnode/219.contains-duplicate-ii.py | Nobodylesszb/LeetCode | 0e902f6bff4834a93ce64cf9c57fd64297e63523 | [
"MIT"
] | null | null | null | python/listnode/219.contains-duplicate-ii.py | Nobodylesszb/LeetCode | 0e902f6bff4834a93ce64cf9c57fd64297e63523 | [
"MIT"
] | null | null | null | python/listnode/219.contains-duplicate-ii.py | Nobodylesszb/LeetCode | 0e902f6bff4834a93ce64cf9c57fd64297e63523 | [
"MIT"
] | null | null | null | # Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the absolute difference between i and j is at most k.
# Example 1:
# Input: nums = [1,2,3,1], k = 3
# Output: true
# Example 2:
# Input: nums = [1,0,1,1], k = 1
# Output... | 25.52 | 201 | 0.597179 |
64a73e1098cc1dff298ecb88f5712e1ebc04b918 | 23,120 | py | Python | network/utils.py | lukaspie/xpsdeeplearning | 0e5cf818cb0fe7bcfda707f58a1d2194301a9f24 | [
"MIT"
] | 1 | 2022-01-05T09:41:58.000Z | 2022-01-05T09:41:58.000Z | network/utils.py | lukaspie/xpsdeeplearning | 0e5cf818cb0fe7bcfda707f58a1d2194301a9f24 | [
"MIT"
] | null | null | null | network/utils.py | lukaspie/xpsdeeplearning | 0e5cf818cb0fe7bcfda707f58a1d2194301a9f24 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 9 14:10:44 2020.
@author: pielsticker
"""
import os
import pickle
import numpy as np
import json
from matplotlib import pyplot as plt
import matplotlib.colors as mcolors
import seaborn as sns
from docx import Document
from docx.enum.table import WD_TABLE_ALIGNMENT, WD_R... | 31.033557 | 80 | 0.530882 |
64a76d80d9db98ea61ff9254492492045784c0fa | 7,743 | py | Python | pyzbar/wrapper.py | spmallick/pyzbar | 372003b5fc129e15bcf35d464118ea43432a56b8 | [
"MIT"
] | null | null | null | pyzbar/wrapper.py | spmallick/pyzbar | 372003b5fc129e15bcf35d464118ea43432a56b8 | [
"MIT"
] | null | null | null | pyzbar/wrapper.py | spmallick/pyzbar | 372003b5fc129e15bcf35d464118ea43432a56b8 | [
"MIT"
] | 2 | 2018-11-21T14:17:48.000Z | 2020-02-26T22:21:59.000Z | """Low-level wrapper around zbar's interface
"""
import platform
import sys
from ctypes import (
cdll, c_ubyte, c_char_p, c_int, c_uint, c_ulong, c_void_p, Structure,
CFUNCTYPE, POINTER
)
from ctypes.util import find_library
from enum import IntEnum, unique
from pathlib import Path
# Types
c_ubyte_p = POINTE... | 28.784387 | 76 | 0.592923 |
64a8df9ffa0c33a95bf84e16379536e77b819f43 | 1,281 | py | Python | connector/write_rnd.py | lodrantl/pimenk | 7871c872d1d93c2e2bb17d48c891696887dbf3b4 | [
"Apache-2.0"
] | null | null | null | connector/write_rnd.py | lodrantl/pimenk | 7871c872d1d93c2e2bb17d48c891696887dbf3b4 | [
"Apache-2.0"
] | 2 | 2016-10-12T15:43:59.000Z | 2016-10-12T15:46:38.000Z | connector/write_rnd.py | lodrantl/pimenk | 7871c872d1d93c2e2bb17d48c891696887dbf3b4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import argparse
import time
import random
from configparser import ConfigParser
from influxdb import SeriesHelper, InfluxDBClient
parser = argparse.ArgumentParser()
parser.add_argument('config', help='path to the config file')
args = parser.parse_args()
config_parser = ConfigParser()
config_... | 23.722222 | 79 | 0.693208 |
64a8e9e329731638734656b698ff0ab9bec0827e | 2,084 | py | Python | kyu_5/number_of_trailing_zeros_of_n/test_zeros.py | pedrocodacyorg2/codewars | ba3ea81125b6082d867f0ae34c6c9be15e153966 | [
"Unlicense"
] | 1 | 2022-02-12T05:56:04.000Z | 2022-02-12T05:56:04.000Z | kyu_5/number_of_trailing_zeros_of_n/test_zeros.py | pedrocodacyorg2/codewars | ba3ea81125b6082d867f0ae34c6c9be15e153966 | [
"Unlicense"
] | 182 | 2020-04-30T00:51:36.000Z | 2021-09-07T04:15:05.000Z | kyu_5/number_of_trailing_zeros_of_n/test_zeros.py | pedrocodacyorg2/codewars | ba3ea81125b6082d867f0ae34c6c9be15e153966 | [
"Unlicense"
] | 4 | 2020-04-29T22:04:20.000Z | 2021-07-13T20:04:14.000Z | # Created by Egor Kostan.
# GitHub: https://github.com/ikostan
# LinkedIn: https://www.linkedin.com/in/egor-kostan/
# ALGORITHMS MATHEMATICS NUMBERS
import unittest
import allure
from kyu_5.number_of_trailing_zeros_of_n.zeros import zeros
from utils.log_func import print_log
| 32.061538 | 94 | 0.540787 |
64a9349d4758e8a5e3292009a5229618d221633a | 1,404 | py | Python | fairness/visualise_target_distribution_datasets_joosje.py | JSGoedhart/fairness-comparison | f6fcb7f39f15bb63aeab03ef24e41d0ffe353bb8 | [
"Apache-2.0"
] | null | null | null | fairness/visualise_target_distribution_datasets_joosje.py | JSGoedhart/fairness-comparison | f6fcb7f39f15bb63aeab03ef24e41d0ffe353bb8 | [
"Apache-2.0"
] | 1 | 2021-11-15T17:52:04.000Z | 2021-11-15T17:52:04.000Z | fairness/visualise_target_distribution_datasets_joosje.py | JSGoedhart/fairness-comparison | f6fcb7f39f15bb63aeab03ef24e41d0ffe353bb8 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pandas as pd
import os
import seaborn as sns
import matplotlib.pyplot as plt
from fairness.data.objects.list import DATASETS, get_dataset_names
sns.set_context(rc={"figure.figsize": (8, 4)})
sns.set(style = 'white', font_scale = 1.5)
colors = ['#2ECC71' , '#FFEB3B'] # Green, yellow
curren... | 33.428571 | 134 | 0.698718 |
64aa3d37b85cc243ccdf71e09e84298f1e19d500 | 25,744 | py | Python | venv/Lib/site-packages/dateparser/data/date_translation_data/pt.py | realwaynesun/cryptotradedata | 4bd4d3f80438507fbb2b611a9cf451ed1aa2bde1 | [
"MIT"
] | 2 | 2020-09-28T21:23:59.000Z | 2021-11-10T15:01:15.000Z | venv/Lib/site-packages/dateparser/data/date_translation_data/pt.py | realwaynesun/cryptotradedata | 4bd4d3f80438507fbb2b611a9cf451ed1aa2bde1 | [
"MIT"
] | 21 | 2021-02-04T01:37:44.000Z | 2022-03-12T01:00:55.000Z | venv/Lib/site-packages/dateparser/data/date_translation_data/pt.py | realwaynesun/cryptotradedata | 4bd4d3f80438507fbb2b611a9cf451ed1aa2bde1 | [
"MIT"
] | 1 | 2021-03-27T19:41:10.000Z | 2021-03-27T19:41:10.000Z | info = {
"name": "pt",
"date_order": "DMY",
"january": [
"janeiro",
"jan"
],
"february": [
"fevereiro",
"fev"
],
"march": [
"maro",
"mar"
],
"april": [
"abril",
"abr"
],
"may": [
"maio",
"mai"
... | 26.215886 | 48 | 0.235977 |
64aa3e1874f0f343663a3b5eb7d3f0e4ccdcb368 | 284 | py | Python | pyinstagram/agents/web_agent.py | OlegYurchik/pyInstagram | d71ce6918fa0a3d6ed641318efa6a55a41dec939 | [
"MIT"
] | 152 | 2019-03-26T23:33:28.000Z | 2022-01-04T15:33:25.000Z | pyinstagram/agents/web_agent.py | OlegYurchik/pyInstagram | d71ce6918fa0a3d6ed641318efa6a55a41dec939 | [
"MIT"
] | 58 | 2019-03-27T09:30:21.000Z | 2020-12-03T13:40:39.000Z | pyinstagram/agents/web_agent.py | OlegYurchik/pyInstagram | d71ce6918fa0a3d6ed641318efa6a55a41dec939 | [
"MIT"
] | 60 | 2019-04-05T14:34:45.000Z | 2021-01-20T02:44:24.000Z | from .async_web_agent import AsyncWebAgent
from .utils import sync
| 28.4 | 51 | 0.785211 |
64ac038d0826dd17f9a516ada94d2873b01d30ab | 511 | py | Python | examples/ex1.py | nathanfdunn/ipymd | cca5f98e34a024396e21ab7a3f322bbe2e3f37d1 | [
"BSD-3-Clause"
] | 521 | 2015-01-01T09:22:05.000Z | 2022-02-06T23:54:10.000Z | examples/ex1.py | nathanfdunn/ipymd | cca5f98e34a024396e21ab7a3f322bbe2e3f37d1 | [
"BSD-3-Clause"
] | 79 | 2015-01-04T21:17:29.000Z | 2018-08-28T16:39:21.000Z | examples/ex1.py | nathanfdunn/ipymd | cca5f98e34a024396e21ab7a3f322bbe2e3f37d1 | [
"BSD-3-Clause"
] | 56 | 2015-03-01T08:48:26.000Z | 2022-01-29T03:11:13.000Z | # List of ipymd cells expected for this example.
output = [
{'cell_type': 'markdown',
'source': '# Header'},
{'cell_type': 'markdown',
'source': 'A paragraph.'},
{'cell_type': 'markdown',
'source': 'Python code:'},
{'cell_type': 'code',
'input': 'print("Hello world!")',
'out... | 21.291667 | 66 | 0.547945 |
64ac4e0c696328a0793c73c2ffb9c229acc0aada | 2,508 | py | Python | examples/kddcup2021/WikiKG90M/feature/dump_feat/1_rrt_feat.py | zbmain/PGL | dbded6a1543248b0a33c05eb476ddc513401a774 | [
"Apache-2.0"
] | 1,389 | 2019-06-11T03:29:20.000Z | 2022-03-29T18:25:43.000Z | examples/kddcup2021/WikiKG90M/feature/dump_feat/1_rrt_feat.py | zbmain/PGL | dbded6a1543248b0a33c05eb476ddc513401a774 | [
"Apache-2.0"
] | 232 | 2019-06-21T06:52:10.000Z | 2022-03-29T08:20:31.000Z | examples/kddcup2021/WikiKG90M/feature/dump_feat/1_rrt_feat.py | zbmain/PGL | dbded6a1543248b0a33c05eb476ddc513401a774 | [
"Apache-2.0"
] | 229 | 2019-06-20T12:13:58.000Z | 2022-03-25T12:04:48.000Z | # -*- coding: utf-8 -*-
########################################################################
#
# Copyright (c) 2021 Baidu.com, Inc. All Rights Reserved
#
# Author: suweiyue(suweiyue@baidu.com)
# Date: 2021/06/03 23:12:20
#
########################################################################
"""
Comment.
"""... | 30.216867 | 78 | 0.637959 |
64ac9a9800fc56bffbd8416996ff63c66a3c1e04 | 1,463 | py | Python | PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/occlusion_query.py | frederica07/Dragon_Programming_Process | c0dff2e20c1be6db5adc6f9977efae8f7f888ef5 | [
"BSD-2-Clause"
] | null | null | null | PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/occlusion_query.py | frederica07/Dragon_Programming_Process | c0dff2e20c1be6db5adc6f9977efae8f7f888ef5 | [
"BSD-2-Clause"
] | null | null | null | PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/occlusion_query.py | frederica07/Dragon_Programming_Process | c0dff2e20c1be6db5adc6f9977efae8f7f888ef5 | [
"BSD-2-Clause"
] | null | null | null | '''Autogenerated by get_gl_extensions script, do not edit!'''
from OpenGL import platform as _p, constants as _cs, arrays
from OpenGL.GL import glget
import ctypes
EXTENSION_NAME = 'GL_ARB_occlusion_query'
_p.unpack_constants( """GL_QUERY_COUNTER_BITS_ARB 0x8864
GL_CURRENT_QUERY_ARB 0x8865
GL_QUERY_RESULT_ARB 0x8866
GL... | 33.25 | 76 | 0.796309 |
64b1a7488c274f4dd72529847c355261e656d578 | 2,754 | py | Python | myssh/threads_func.py | samblabla/myssh | ed105766e7d295652bce72352e0ac9ee3348dfd2 | [
"Apache-2.0"
] | 65 | 2018-02-09T07:28:57.000Z | 2021-11-02T22:53:35.000Z | myssh/threads_func.py | samblabla/myssh | ed105766e7d295652bce72352e0ac9ee3348dfd2 | [
"Apache-2.0"
] | 3 | 2019-05-02T09:47:54.000Z | 2020-08-11T15:06:28.000Z | myssh/threads_func.py | samblabla/myssh | ed105766e7d295652bce72352e0ac9ee3348dfd2 | [
"Apache-2.0"
] | 8 | 2018-10-19T03:49:02.000Z | 2021-03-25T08:09:32.000Z | #coding:utf-8
import data
import ssh
import sftp
import common
import time
import threading
#ssh
| 31.655172 | 124 | 0.526507 |
64b306b8769d1a5395b2ff462d244969453f0281 | 39 | py | Python | main/models/__init__.py | trandat9h/GotitFinalProject | c32b12ab7099ee7d389ba67816fde7d48b3014bc | [
"MIT"
] | 1 | 2022-03-29T09:58:16.000Z | 2022-03-29T09:58:16.000Z | main/models/__init__.py | trandat9h/GotitFinalProject | c32b12ab7099ee7d389ba67816fde7d48b3014bc | [
"MIT"
] | null | null | null | main/models/__init__.py | trandat9h/GotitFinalProject | c32b12ab7099ee7d389ba67816fde7d48b3014bc | [
"MIT"
] | null | null | null | __all__ = ["category", "item", "user"]
| 19.5 | 38 | 0.589744 |
64b3729d10855edc071cb1c3176a8d1e927629f4 | 588 | py | Python | tests/test_need_to_wrap.py | ffreemt/simple-proxy-pool | 15cb083904e515ad909cc5fa30cb030e200f5787 | [
"MIT"
] | 2 | 2020-01-01T12:55:01.000Z | 2020-02-25T03:59:12.000Z | tests/test_need_to_wrap.py | ffreemt/simple-proxy-pool | 15cb083904e515ad909cc5fa30cb030e200f5787 | [
"MIT"
] | null | null | null | tests/test_need_to_wrap.py | ffreemt/simple-proxy-pool | 15cb083904e515ad909cc5fa30cb030e200f5787 | [
"MIT"
] | 1 | 2020-08-06T02:29:00.000Z | 2020-08-06T02:29:00.000Z | '''
test need_to_wrap
>>> assert not need_to_wrap(['127.0.0.1:8889', '127.0.0.1'])
>>> assert need_to_wrap(['127.0.0.1:8889', 'source'])
'''
from simple_pp.need_to_wrap import need_to_wrap
def test_trivial():
''' trivial tests'''
assert not need_to_wrap(['127.0.0.1:8889', '127.0.0.1'])
# extra... | 24.5 | 64 | 0.636054 |
64b6cb679b43df545569ed71a1c4d61297d2aef9 | 6,304 | py | Python | CIM14/IEC61970/Generation/Production/__init__.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 58 | 2015-04-22T10:41:03.000Z | 2022-03-29T16:04:34.000Z | CIM14/IEC61970/Generation/Production/__init__.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 12 | 2015-08-26T03:57:23.000Z | 2020-12-11T20:14:42.000Z | CIM14/IEC61970/Generation/Production/__init__.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 35 | 2015-01-10T12:21:03.000Z | 2020-09-09T08:18:16.000Z | # Copyright (C) 2010-2011 Richard Lincoln
#
# 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, merge, publish... | 43.178082 | 256 | 0.805996 |
64b89274265285939232ef95666539dcfdd02614 | 319 | py | Python | client.py | cms42/i-display | fc1737ec522c7e1088d8891dd0838f11454e8f38 | [
"MIT"
] | null | null | null | client.py | cms42/i-display | fc1737ec522c7e1088d8891dd0838f11454e8f38 | [
"MIT"
] | null | null | null | client.py | cms42/i-display | fc1737ec522c7e1088d8891dd0838f11454e8f38 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import configparser
import cv2
import sys
if (len(sys.argv)<2) :
print("usage: ",sys.argv[0]," [config]")
exit()
if (sys.argv[1] == '--help')|(sys.argv[1] == '-h') :
print("usage: ",sys.argv[0]," [config]")
exit()
config = configparser.ConfigParser()
config.read(sys.argv[1])
| 19.9375 | 52 | 0.583072 |
64b9710adc87f43f75a6a4f22eff06a3622b0bf8 | 411 | py | Python | interface_blockchain/product/forms.py | kultimovn/interface_blockchain | 5e827d7241200c1aed1ca551649a1ef651297032 | [
"MIT"
] | null | null | null | interface_blockchain/product/forms.py | kultimovn/interface_blockchain | 5e827d7241200c1aed1ca551649a1ef651297032 | [
"MIT"
] | null | null | null | interface_blockchain/product/forms.py | kultimovn/interface_blockchain | 5e827d7241200c1aed1ca551649a1ef651297032 | [
"MIT"
] | null | null | null | from django import forms
from .models import Product, Good
| 27.4 | 96 | 0.620438 |
64b97f2e2ba70fea221b6d73b9b60cadc991d3e9 | 9,219 | py | Python | shark/shark/report/warehouse_wise_stock_ageing/warehouse_wise_stock_ageing.py | umaepoch/Shark | 2ebf715efba796f96c2d9807bbe930e354606492 | [
"MIT"
] | null | null | null | shark/shark/report/warehouse_wise_stock_ageing/warehouse_wise_stock_ageing.py | umaepoch/Shark | 2ebf715efba796f96c2d9807bbe930e354606492 | [
"MIT"
] | null | null | null | shark/shark/report/warehouse_wise_stock_ageing/warehouse_wise_stock_ageing.py | umaepoch/Shark | 2ebf715efba796f96c2d9807bbe930e354606492 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
from operator import itemgetter
import frappe
from frappe import _
from frappe.utils import cint, date_diff, flt
from six import iteritems
from erpne... | 29.082019 | 108 | 0.678599 |
64b9f79dfb03bb9df611fd80e6a0c850dbeafe2f | 248 | py | Python | savejpg.py | gewangcn/spiders | 991ccc571417c721aea5ed92fd81419522d07869 | [
"MIT"
] | null | null | null | savejpg.py | gewangcn/spiders | 991ccc571417c721aea5ed92fd81419522d07869 | [
"MIT"
] | null | null | null | savejpg.py | gewangcn/spiders | 991ccc571417c721aea5ed92fd81419522d07869 | [
"MIT"
] | null | null | null | import requests
resp = requests.get("https://edu-tob.bdimg.com/v1/pc/pc%E5%85%88%E9%A6%96%E9%A1%B5%E5%A4%B4%E5%9B%BE5120-640-1608686903810.png")
with open("a.png", "wb") as f:
f.write(resp.content)
# cookie
se = requests.session() | 35.428571 | 128 | 0.709677 |
64bb99f7ba68e5c75620ffdbf50cc594972bec36 | 2,652 | py | Python | src/nasty_analysis/document/maxqda_coded_nasty.py | lschmelzeisen/nasty-analysis | 50e2f2d5f6b8b9649a8c8adba1d94b59f01a8dca | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-05-23T19:18:42.000Z | 2020-05-26T12:33:44.000Z | src/nasty_analysis/document/maxqda_coded_nasty.py | lschmelzeisen/nasty-analysis | 50e2f2d5f6b8b9649a8c8adba1d94b59f01a8dca | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/nasty_analysis/document/maxqda_coded_nasty.py | lschmelzeisen/nasty-analysis | 50e2f2d5f6b8b9649a8c8adba1d94b59f01a8dca | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | #
# Copyright 2019-2020 Lukas Schmelzeisen
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 34 | 82 | 0.691931 |
64bbd761800292d0813bdc9b13e2cbfd9dcb6e21 | 80 | py | Python | tests/__init__.py | xakiy/falcon-ratelimit | 68bb239f0bbe5c09657dd06d230e9923039beb10 | [
"MIT"
] | 10 | 2018-06-24T08:33:46.000Z | 2022-01-02T14:23:20.000Z | tests/__init__.py | xakiy/falcon-ratelimit | 68bb239f0bbe5c09657dd06d230e9923039beb10 | [
"MIT"
] | 4 | 2018-04-24T12:00:49.000Z | 2021-08-05T14:49:31.000Z | tests/__init__.py | xakiy/falcon-ratelimit | 68bb239f0bbe5c09657dd06d230e9923039beb10 | [
"MIT"
] | 9 | 2018-04-09T10:40:47.000Z | 2020-07-02T13:27:23.000Z | # coding=UTF-8
from __future__ import print_function, absolute_import, division
| 26.666667 | 64 | 0.8375 |
64bd2dcfa1b16991bf3ec6fda735704c506a25ed | 358 | py | Python | mq/rabbitmq/py/helloworld/producer.py | wjiec/packages | 4ccaf8f717265a1f8a9af533f9a998b935efb32a | [
"MIT"
] | null | null | null | mq/rabbitmq/py/helloworld/producer.py | wjiec/packages | 4ccaf8f717265a1f8a9af533f9a998b935efb32a | [
"MIT"
] | 1 | 2016-09-15T07:06:15.000Z | 2016-09-15T07:06:15.000Z | mq/rabbitmq/py/helloworld/producer.py | wjiec/packages | 4ccaf8f717265a1f8a9af533f9a998b935efb32a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (C) 2019 jayson
#
from utils.connection import get_connection
from config import RABBITMQ_MASTER
if __name__ == '__main__':
with get_connection(RABBITMQ_MASTER, 'hello') as channel:
while True:
channel.basic_publish(exchange='', routing_key='hell... | 27.538462 | 101 | 0.695531 |
64bd439f7c8735ddf6edf662567de783df1b760f | 6,188 | py | Python | mpinterfaces/nanoparticle.py | yw-fang/MPInterfaces | ca2e43b590fdfbcf87a116c5c758e54cb7cb2d2e | [
"MIT"
] | null | null | null | mpinterfaces/nanoparticle.py | yw-fang/MPInterfaces | ca2e43b590fdfbcf87a116c5c758e54cb7cb2d2e | [
"MIT"
] | 12 | 2016-11-07T23:46:01.000Z | 2018-08-24T19:00:12.000Z | mpinterfaces/nanoparticle.py | joshgabriel/MPInterfaces | 2799ae161fa94c78842092fb24ef468607afa465 | [
"MIT"
] | null | null | null | # coding: utf-8
# Copyright (c) Henniggroup.
# Distributed under the terms of the MIT License.
from __future__ import division, print_function, unicode_literals, \
absolute_import
"""
Wulff construction to create the nanoparticle
"""
from six.moves import range
import itertools
from math import gcd
from functoo... | 36.833333 | 83 | 0.626212 |
64bd7c10430f6a161fe1d2e13a9a45bf6a6cda3c | 1,262 | py | Python | src/day07.py | birdman74/advent-of-code-2021 | 190cd4110ef3553258a26c8521bdf372c006a77c | [
"Apache-2.0"
] | null | null | null | src/day07.py | birdman74/advent-of-code-2021 | 190cd4110ef3553258a26c8521bdf372c006a77c | [
"Apache-2.0"
] | null | null | null | src/day07.py | birdman74/advent-of-code-2021 | 190cd4110ef3553258a26c8521bdf372c006a77c | [
"Apache-2.0"
] | null | null | null | import os
from collections import Counter
MODULE_DIR = os.path.dirname(os.path.realpath(__file__))
PROJECT_DIR = os.path.join(MODULE_DIR, "..")
INPUT_SOURCE_DIR = os.path.join(PROJECT_DIR, "input")
day_7_do("day07.txt")
day_7_do_2("day07.txt")
| 25.755102 | 120 | 0.659271 |
64bdb2fbf30aa7f6c7c89de13064542fa9d7162e | 1,460 | py | Python | bin/check_files_yml.py | synesthesiam/voice2json-profiles | 4618d121d8d64985deb43d14e2f01b1e12743a18 | [
"MIT"
] | 10 | 2020-01-01T09:08:50.000Z | 2022-01-09T00:18:33.000Z | bin/check_files_yml.py | synesthesiam/voice2json-profiles | 4618d121d8d64985deb43d14e2f01b1e12743a18 | [
"MIT"
] | null | null | null | bin/check_files_yml.py | synesthesiam/voice2json-profiles | 4618d121d8d64985deb43d14e2f01b1e12743a18 | [
"MIT"
] | 3 | 2020-07-25T03:20:21.000Z | 2022-01-23T03:56:16.000Z | #!/usr/bin/env python3
"""Verifies sizes and sha256 sums for files.yml files."""
import os
import subprocess
import sys
from pathlib import Path
import yaml
def main():
"""Main entry point"""
for files_yaml_path in sys.argv[1:]:
profile_root = Path(files_yaml_path).parent
with open(files_yaml... | 31.06383 | 100 | 0.584247 |
64beb60d078cf10c3f14199bcdc7a0d43c7a432a | 1,370 | py | Python | witness.py | barryZZJ/dp-finder | ddf8e3589110b4b35920b437d605b45dd56291da | [
"MIT"
] | null | null | null | witness.py | barryZZJ/dp-finder | ddf8e3589110b4b35920b437d605b45dd56291da | [
"MIT"
] | null | null | null | witness.py | barryZZJ/dp-finder | ddf8e3589110b4b35920b437d605b45dd56291da | [
"MIT"
] | null | null | null | from abc import ABC
from collections import OrderedDict
if __name__ == '__main__':
from dataLoader import DataLoader
from dataVisualizer import DataVisualizer
import pandas as pd
w=Witness(1,2,3,3,"dpfinder",pa=1,pb=2)
w2 = Witness(3,4,5,5,'statdp',epsm=3)
df = pd.DataFrame([w.get_full(), w2.g... | 24.909091 | 57 | 0.550365 |
64c0a446da789593ff960351a0ce0f86e665e35a | 6,873 | py | Python | TicTacToe/classes/TicTacToe.py | camilleAmaury/ReinforcementLearning | c5d9ec3f17ca02e84ea3786fa2048b35864fc724 | [
"CNRI-Python",
"Info-ZIP"
] | null | null | null | TicTacToe/classes/TicTacToe.py | camilleAmaury/ReinforcementLearning | c5d9ec3f17ca02e84ea3786fa2048b35864fc724 | [
"CNRI-Python",
"Info-ZIP"
] | null | null | null | TicTacToe/classes/TicTacToe.py | camilleAmaury/ReinforcementLearning | c5d9ec3f17ca02e84ea3786fa2048b35864fc724 | [
"CNRI-Python",
"Info-ZIP"
] | null | null | null | import numpy as np
from tqdm import tqdm
| 45.217105 | 112 | 0.559144 |
64c0d45dc9b180f6c1dd6f97a24cb3227649d735 | 9,780 | py | Python | poem/cv_mim/action_recognition/train_with_encoder_base.py | DionysisChristopoulos/google-research | 7f59ef421beef32ca16c2a7215be74f7eba01a0f | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | poem/cv_mim/action_recognition/train_with_encoder_base.py | DionysisChristopoulos/google-research | 7f59ef421beef32ca16c2a7215be74f7eba01a0f | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | poem/cv_mim/action_recognition/train_with_encoder_base.py | admariner/google-research | 7cee4b22b925581d912e8d993625c180da2a5a4f | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 37.760618 | 80 | 0.720143 |
64c210806c5cc219f6c4e3fa272f46558ce9bbfc | 1,216 | py | Python | misc/get_magnitude.py | cinjon/ml-capsules-inverted-attention-routing | 978b0f58eba1007bcef0b6cb045f3d2040f76a31 | [
"AML"
] | null | null | null | misc/get_magnitude.py | cinjon/ml-capsules-inverted-attention-routing | 978b0f58eba1007bcef0b6cb045f3d2040f76a31 | [
"AML"
] | null | null | null | misc/get_magnitude.py | cinjon/ml-capsules-inverted-attention-routing | 978b0f58eba1007bcef0b6cb045f3d2040f76a31 | [
"AML"
] | null | null | null | import os
import json
import argparse
import numpy as np
from glob import glob
from multiprocessing import Pool
parser = argparse.ArgumentParser()
parser.add_argument(
"--root",
default="/misc/kcgscratch1/ChoGroup/resnick/spaceofmotion/flows",
type=str)
parser.add_argument(
"--store_dir",
default="... | 29.658537 | 73 | 0.629934 |
64c2188244333a65c7be325fa85c1fffbc0b6a2e | 1,171 | py | Python | libs/core/setup.py | ggsdc/corn | 4c17c46a70f95b8882bcb6a55ef7daa1f69e0456 | [
"MIT"
] | 2 | 2020-07-09T20:58:47.000Z | 2020-07-20T20:40:46.000Z | libs/core/setup.py | baobabsoluciones/cornflow | bd7cae22107e5fe148704d5f41d4f58f9c410b40 | [
"Apache-2.0"
] | 2 | 2022-03-31T08:42:10.000Z | 2022-03-31T12:05:23.000Z | libs/core/setup.py | ggsdc/corn | 4c17c46a70f95b8882bcb6a55ef7daa1f69e0456 | [
"MIT"
] | null | null | null | import setuptools
with open("README.rst") as fh:
long_description = fh.read()
required = []
with open("requirements.txt", "r") as fh:
required.append(fh.read().splitlines())
setuptools.setup(
name="cornflow-core",
version="0.0.3a11",
author="baobab soluciones",
author_email="sistemas@baobabso... | 32.527778 | 97 | 0.680615 |
64c23f62d2310087d63f2f3ff158df2b5e9d0168 | 1,265 | py | Python | eoana/readers/xlsx.py | JohannesSMHI/eoana | 7950a3567cdd9726296021f3de031493c8dfeba6 | [
"MIT"
] | null | null | null | eoana/readers/xlsx.py | JohannesSMHI/eoana | 7950a3567cdd9726296021f3de031493c8dfeba6 | [
"MIT"
] | null | null | null | eoana/readers/xlsx.py | JohannesSMHI/eoana | 7950a3567cdd9726296021f3de031493c8dfeba6 | [
"MIT"
] | null | null | null | # Copyright (c) 2020 SMHI, Swedish Meteorological and Hydrological Institute
# License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit).
"""
Created on 2020-12-11 16:04
@author: johannes
"""
import pandas as pd
| 23.425926 | 79 | 0.544664 |
64c2c755c64c0a9f83d7975c84e2954e482ade05 | 575 | py | Python | appinit_backend/app/lib/websockets/server.py | lost-osiris/webplatform-backend | 8b1b7c94dbc5314450fbe75b8ca4625d39608d4a | [
"MIT"
] | 1 | 2020-09-11T01:20:07.000Z | 2020-09-11T01:20:07.000Z | appinit_backend/app/lib/websockets/server.py | lost-osiris/webplatform-backend | 8b1b7c94dbc5314450fbe75b8ca4625d39608d4a | [
"MIT"
] | null | null | null | appinit_backend/app/lib/websockets/server.py | lost-osiris/webplatform-backend | 8b1b7c94dbc5314450fbe75b8ca4625d39608d4a | [
"MIT"
] | null | null | null | from gevent import pywsgi
from geventwebsocket.handler import WebSocketHandler
from flask import Flask, render_template, session, request
app = Flask(__name__)
server = pywsgi.WSGIServer(('127.0.0.1', 3001), app,
handler_class=WebSocketHandler)
if __name__ == '__main__':
server.serve_forever()
# import os
# ... | 28.75 | 66 | 0.791304 |
64c313cfd9b762378f88f2ab75f1f1485ab4f677 | 17,890 | py | Python | quex/output/analyzer/lexeme_converter.py | smmckay/quex-mirror | 7d75ed560e9f3a591935e59243188676eecb112a | [
"MIT"
] | null | null | null | quex/output/analyzer/lexeme_converter.py | smmckay/quex-mirror | 7d75ed560e9f3a591935e59243188676eecb112a | [
"MIT"
] | null | null | null | quex/output/analyzer/lexeme_converter.py | smmckay/quex-mirror | 7d75ed560e9f3a591935e59243188676eecb112a | [
"MIT"
] | null | null | null | """PURPOSE: Converters: Lexemes towards encodings UTF8/UTF16/UTF32.
During exical analysis matches delivers lexemes in the encoding of the buffer.
The functions develops converters of those lexemes to standard encodings, so
that they can easily be reflected.
Let 'Character' be a character in the buffer's encoding, '... | 41.896956 | 110 | 0.578927 |
64c3753507f4f5601298a10f34ef315b523cd811 | 642 | py | Python | 02 - Functions, logic and conditionals/exercises/hours-to-seconds.py | PableraShow/python-exercises | e1648fd42f3009ec6fb1e2096852b6d399e91d5b | [
"MIT"
] | 8 | 2018-10-01T17:35:57.000Z | 2022-02-01T08:12:12.000Z | 02 - Functions, logic and conditionals/exercises/hours-to-seconds.py | PableraShow/python-exercises | e1648fd42f3009ec6fb1e2096852b6d399e91d5b | [
"MIT"
] | null | null | null | 02 - Functions, logic and conditionals/exercises/hours-to-seconds.py | PableraShow/python-exercises | e1648fd42f3009ec6fb1e2096852b6d399e91d5b | [
"MIT"
] | 6 | 2018-07-22T19:15:21.000Z | 2022-02-05T07:54:58.000Z | """
Write a function total_seconds that takes three parameters hours,
minutes and seconds
and returns the total number of seconds for hours hours,
minutes minutes and seconds seconds
"""
# Hours, minutes, and seconds to seconds conversion formula
# Tests
# Output
test(7, 21, 37)
test(10, 1, 7)
test(1, ... | 30.571429 | 68 | 0.682243 |
64c3d1fff1672856579374529a10c8f0ae92b828 | 1,089 | py | Python | media_nommer/utils/logger.py | duointeractive/media-nommer | ba8095748582934ab44f6972210381b074bd9d14 | [
"BSD-3-Clause"
] | 2 | 2015-11-05T18:52:05.000Z | 2021-02-16T20:26:23.000Z | media_nommer/utils/logger.py | duointeractive/media-nommer | ba8095748582934ab44f6972210381b074bd9d14 | [
"BSD-3-Clause"
] | null | null | null | media_nommer/utils/logger.py | duointeractive/media-nommer | ba8095748582934ab44f6972210381b074bd9d14 | [
"BSD-3-Clause"
] | 3 | 2015-06-04T11:27:39.000Z | 2017-12-06T22:10:07.000Z | """
Some logging configuration and shortcut methods.
"""
from twisted.python import log
def debug(message):
"""
Shortcut to logging a debug message through Twisted's logging module.
:param str message: The message to log.
"""
log.msg(message)
def info(message):
"""
Shortcut to logging... | 26.560976 | 76 | 0.672176 |
64c42589b65636e8d944299c620d7537a9631738 | 1,084 | py | Python | RecoTracker/TkNavigation/python/CosmicsNavigationSchoolESProducer_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | RecoTracker/TkNavigation/python/CosmicsNavigationSchoolESProducer_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | RecoTracker/TkNavigation/python/CosmicsNavigationSchoolESProducer_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | #do not comment that line
import FWCore.ParameterSet.Config as cms
#cosmicsNavigationSchoolESProducer = cms.ESProducer("NavigationSchoolESProducer",
# ComponentName = cms.string('CosmicNavigationSchool')
#)
cosmicsNavigationSchoolESProducer = cms.ESProducer("SkippingLayerCosmicNavigationSchoolESProducer",
... | 51.619048 | 104 | 0.412362 |
64c4bf7462033e3ab3a3144b3d87044b6d19e736 | 1,568 | py | Python | script/model/sklearn_like_model/SessionManager.py | demetoir/MLtools | 8c42fcd4cc71728333d9c116ade639fe57d50d37 | [
"MIT"
] | null | null | null | script/model/sklearn_like_model/SessionManager.py | demetoir/MLtools | 8c42fcd4cc71728333d9c116ade639fe57d50d37 | [
"MIT"
] | null | null | null | script/model/sklearn_like_model/SessionManager.py | demetoir/MLtools | 8c42fcd4cc71728333d9c116ade639fe57d50d37 | [
"MIT"
] | null | null | null | import tensorflow as tf
from script.util.MixIn import LoggerMixIn
from script.util.misc_util import error_trace
| 26.576271 | 85 | 0.589286 |
64c6ded8ce35837ed8c633aa32ede13e3f7ab314 | 9,500 | py | Python | code/reasoningtool/QueryBioLink.py | dkoslicki/NCATS | 5d8e38d5868d830d8f8c215b8c649e3979ca03fb | [
"MIT"
] | 2 | 2018-02-26T19:16:26.000Z | 2020-12-16T03:31:58.000Z | code/reasoningtool/QueryBioLink.py | dkoslicki/NCATS | 5d8e38d5868d830d8f8c215b8c649e3979ca03fb | [
"MIT"
] | 17 | 2017-12-09T01:13:20.000Z | 2018-03-06T02:17:32.000Z | code/reasoningtool/QueryBioLink.py | dkoslicki/NCATS | 5d8e38d5868d830d8f8c215b8c649e3979ca03fb | [
"MIT"
] | null | null | null | ''' This module defines the class QueryBioLink. QueryBioLink class is designed
to communicate with Monarch APIs and their corresponding data sources. The
available methods include:
* query phenotype for disease
* query disease for gene
* query gene for disease
* query phenotype for gene
* query gene... | 39.915966 | 124 | 0.666211 |
64c7153fbfe5b356314570fdcfd44d046cdbf473 | 2,056 | py | Python | mpf/plugins/twitch_bot.py | Scottacus64/mpf | fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a | [
"MIT"
] | 163 | 2015-01-25T02:19:50.000Z | 2022-03-26T12:00:28.000Z | mpf/plugins/twitch_bot.py | Scottacus64/mpf | fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a | [
"MIT"
] | 1,086 | 2015-03-23T19:53:17.000Z | 2022-03-24T20:46:11.000Z | mpf/plugins/twitch_bot.py | Scottacus64/mpf | fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a | [
"MIT"
] | 148 | 2015-01-28T02:31:39.000Z | 2022-03-22T13:54:01.000Z | """MPF plugin which adds events from monitoring a Twitch chat room."""
import threading
from mpf.core.logging import LogMixin
from .twitch.twitch_client import TwitchClient
MYPY = False
if MYPY: # pragma: no cover
from mpf.core.machine import MachineController # pylint: disable-msg=cyclic-import,unused-import
... | 34.847458 | 101 | 0.633755 |
64c72ead265362a6fd2cf5c37958f0fa44622e3f | 7,319 | py | Python | tb_auto_publsh/publish_product.py | sinalma/taobao_tools | 222800ccd808ef4bbbcbcffc6b3f4fde133d8685 | [
"MIT"
] | null | null | null | tb_auto_publsh/publish_product.py | sinalma/taobao_tools | 222800ccd808ef4bbbcbcffc6b3f4fde133d8685 | [
"MIT"
] | null | null | null | tb_auto_publsh/publish_product.py | sinalma/taobao_tools | 222800ccd808ef4bbbcbcffc6b3f4fde133d8685 | [
"MIT"
] | null | null | null | import os
from selenium import webdriver
driver = webdriver.Chrome("D:/Programming/python/chromedriver.exe")
driver.maximize_window()
from os import path
from selenium.webdriver.common.action_chains import ActionChains
from selenium.common.exceptions import UnexpectedAlertPresentException
import time,unittest, re
fro... | 35.357488 | 148 | 0.704741 |
64cab6ea6f760144dc93cfc4e17978d33d93817a | 778 | py | Python | djangoenv/lib/python3.8/site-packages/pypl/scale.py | zawad2221/courier_delivery | f96c41a60943946f9f7e0837d017215aa8cd02dd | [
"MIT"
] | 6 | 2020-02-21T15:50:34.000Z | 2021-11-09T19:45:50.000Z | djangoenv/lib/python3.8/site-packages/pypl/scale.py | zawad2221/courier_delivery | f96c41a60943946f9f7e0837d017215aa8cd02dd | [
"MIT"
] | null | null | null | djangoenv/lib/python3.8/site-packages/pypl/scale.py | zawad2221/courier_delivery | f96c41a60943946f9f7e0837d017215aa8cd02dd | [
"MIT"
] | null | null | null | from . import utils
| 27.785714 | 76 | 0.637532 |
64cc4da63c52447e3507f875e905f219bd67e494 | 271 | py | Python | config/__init__.py | hajareshyam/flask-seed | 5e1cddebd8496e39cc99c012e8a203ef9bd4b834 | [
"MIT"
] | 3 | 2018-02-11T23:20:18.000Z | 2019-12-15T10:29:22.000Z | config/__init__.py | hajareshyam/flask-seed | 5e1cddebd8496e39cc99c012e8a203ef9bd4b834 | [
"MIT"
] | null | null | null | config/__init__.py | hajareshyam/flask-seed | 5e1cddebd8496e39cc99c012e8a203ef9bd4b834 | [
"MIT"
] | 1 | 2019-11-01T06:42:47.000Z | 2019-11-01T06:42:47.000Z | __all__ = ['local', 'development', 'production', 'test', 'constants']
# from .base import BaseConfig
from .development import DevelopmentConfig
from .local import LocalConfig
from .production import ProductionConfig
from .test import TestConfig
from .constants import *
| 30.111111 | 69 | 0.785978 |
64cc5aac32b4fc2a5556f4d550730a0acdbd74d3 | 5,781 | py | Python | sailor/assetcentral/workorder.py | gecko17/project-sailor | 7a35eeec2a6a8ec9bc998e39e8ffad4703cec5d7 | [
"Apache-2.0"
] | 19 | 2021-03-02T12:27:48.000Z | 2022-03-31T15:24:41.000Z | sailor/assetcentral/workorder.py | gecko17/project-sailor | 7a35eeec2a6a8ec9bc998e39e8ffad4703cec5d7 | [
"Apache-2.0"
] | 75 | 2021-03-04T16:58:47.000Z | 2022-03-31T08:31:06.000Z | sailor/assetcentral/workorder.py | gecko17/project-sailor | 7a35eeec2a6a8ec9bc998e39e8ffad4703cec5d7 | [
"Apache-2.0"
] | 2 | 2021-11-08T12:45:05.000Z | 2022-02-27T18:42:13.000Z | """
Workorder module can be used to retrieve Workorder information from AssetCentral.
Classes are provided for individual Workorders as well as groups of Workorders (WorkorderSet).
"""
from sailor import _base
from ..utils.timestamps import _string_to_timestamp_parser
from .constants import VIEW_WORKORDERS
from .util... | 43.141791 | 116 | 0.733437 |
64cc7a5f5c43f80efef521c2171660053264a4c7 | 796 | py | Python | widgets2/pixmap.py | gnthibault/PyQt6-Tutorial-Examples | c54819f74154de923df0bdfaa302d62b4bad890b | [
"BSD-2-Clause"
] | 38 | 2021-05-18T07:47:54.000Z | 2022-03-31T13:10:41.000Z | widgets2/pixmap.py | gnthibault/PyQt6-Tutorial-Examples | c54819f74154de923df0bdfaa302d62b4bad890b | [
"BSD-2-Clause"
] | 3 | 2021-08-03T03:49:42.000Z | 2021-09-09T08:09:23.000Z | widgets2/pixmap.py | gnthibault/PyQt6-Tutorial-Examples | c54819f74154de923df0bdfaa302d62b4bad890b | [
"BSD-2-Clause"
] | 16 | 2021-06-12T11:25:58.000Z | 2022-03-05T07:43:10.000Z | #!/usr/bin/python
"""
ZetCode PyQt6 tutorial
In this example, we display an image
on the window.
Author: Jan Bodnar
Website: zetcode.com
"""
from PyQt6.QtWidgets import (QWidget, QHBoxLayout,
QLabel, QApplication)
from PyQt6.QtGui import QPixmap
import sys
if __name__ == '__main__':
main()
| 15.307692 | 50 | 0.614322 |
64ce6f6efb2fdb2724c45647b09d052115673dcc | 3,423 | py | Python | scripts/get_dataset100.py | AShedko/UIR8_im2gps | f4a7adb7e632b42a306ebdfbffb8a3843d43a594 | [
"MIT"
] | 1 | 2020-11-12T11:46:30.000Z | 2020-11-12T11:46:30.000Z | scripts/get_dataset100.py | AShedko/UIR8_im2gps | f4a7adb7e632b42a306ebdfbffb8a3843d43a594 | [
"MIT"
] | null | null | null | scripts/get_dataset100.py | AShedko/UIR8_im2gps | f4a7adb7e632b42a306ebdfbffb8a3843d43a594 | [
"MIT"
] | null | null | null |
import math
import os
import random
import sys
from multiprocessing.pool import ThreadPool
import urllib
import file_util
import pandas as pd
ds = pd.read_csv("../data/simplemaps-worldcities-basic.csv")
# Heuristically select from DB cities likely to be on google maps
cities = ds[ds["pop"]>20000][ds.... | 36.414894 | 103 | 0.646217 |
64cecd3b99a712aa861b433a62ca164039a43fef | 146 | py | Python | MLSD/__init__.py | HaoranXue/Machine_Learning_For_Structured_Data | 376fb2b78ba5dea4d6214931f6a60e3b4477c883 | [
"MIT"
] | 4 | 2017-09-03T23:09:02.000Z | 2017-09-15T13:01:38.000Z | MLSD/__init__.py | HaoranXue/SDM | 376fb2b78ba5dea4d6214931f6a60e3b4477c883 | [
"MIT"
] | null | null | null | MLSD/__init__.py | HaoranXue/SDM | 376fb2b78ba5dea4d6214931f6a60e3b4477c883 | [
"MIT"
] | null | null | null | '''
SDM is a package for using Series as features
'''
from .StructureData import *
from .StructureDataFrame import *
from .Transformers import *
| 18.25 | 45 | 0.753425 |
64cf331bf3aec4cd73fb15b8c3551c47a61671fb | 1,501 | py | Python | mistral/auth/keystone.py | soda-research/mistral | 550a3de9c2defc7ce26336cb705d9c8d87bbaddd | [
"Apache-2.0"
] | 205 | 2015-06-21T11:51:47.000Z | 2022-03-05T04:00:04.000Z | mistral/auth/keystone.py | soda-research/mistral | 550a3de9c2defc7ce26336cb705d9c8d87bbaddd | [
"Apache-2.0"
] | 21 | 2015-04-14T22:41:53.000Z | 2019-02-20T09:30:10.000Z | mistral/auth/keystone.py | soda-research/mistral | 550a3de9c2defc7ce26336cb705d9c8d87bbaddd | [
"Apache-2.0"
] | 110 | 2015-06-14T03:34:38.000Z | 2021-11-11T12:12:56.000Z | # Copyright 2016 - Brocade Communications Systems, 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 b... | 34.906977 | 78 | 0.691539 |
64d17a7f9f6e04f18e7fe0677f5b3c4e404da64e | 1,587 | py | Python | integrationtests/utils_tests.py | landcast/flaskseed | 15b73fef7345e8c05c4b6efe26c889f9818fabe3 | [
"Apache-2.0"
] | null | null | null | integrationtests/utils_tests.py | landcast/flaskseed | 15b73fef7345e8c05c4b6efe26c889f9818fabe3 | [
"Apache-2.0"
] | 1 | 2018-10-21T14:28:46.000Z | 2018-10-21T14:28:46.000Z | integrationtests/utils_tests.py | landcast/flaskseed | 15b73fef7345e8c05c4b6efe26c889f9818fabe3 | [
"Apache-2.0"
] | null | null | null | import json
import re
import subprocess
import sys
import unittest
sys.path.append('.')
from integrationtests import TestBase, json_header, server_location
if __name__ == "__main__":
unittest.main()
| 31.117647 | 76 | 0.558286 |
64d1b1489599d8bc0f2e6f5976da2e6c4b0ee762 | 3,465 | py | Python | pylinquery/enumerable.py | mw-ste/PyLinQuery | ef0e941503577f4adf867d6b499efe7b9e114c65 | [
"MIT"
] | null | null | null | pylinquery/enumerable.py | mw-ste/PyLinQuery | ef0e941503577f4adf867d6b499efe7b9e114c65 | [
"MIT"
] | null | null | null | pylinquery/enumerable.py | mw-ste/PyLinQuery | ef0e941503577f4adf867d6b499efe7b9e114c65 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 11 15:51:21 2019
@author: michi
"""
import inspect
from types import FunctionType
# In[] | 25.477941 | 93 | 0.598846 |
64d2c172df3283a327a114c985bcc7b09bf329f7 | 5,309 | py | Python | scripts/evalutate_excell_data_condition_study.py | llucid-97/AdaS | 298beca98d5b432460c9f268364c0fe7ce8323a6 | [
"MIT"
] | 1 | 2020-06-12T17:14:31.000Z | 2020-06-12T17:14:31.000Z | scripts/evalutate_excell_data_condition_study.py | llucid-97/AdaS | 298beca98d5b432460c9f268364c0fe7ce8323a6 | [
"MIT"
] | 1 | 2020-08-12T21:10:48.000Z | 2020-08-12T21:10:48.000Z | scripts/evalutate_excell_data_condition_study.py | llucid-97/AdaS | 298beca98d5b432460c9f268364c0fe7ce8323a6 | [
"MIT"
] | 3 | 2020-06-17T21:51:16.000Z | 2020-07-23T03:26:13.000Z | """
MIT License
Copyright (c) 2020 Mahdi S. Hosseini
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... | 41.476563 | 140 | 0.680542 |
64d2fdd94ccdefb499475d5010e12ef3310e43be | 13,438 | py | Python | debexpo/tests/test_gnupg.py | jadonk/debexpo | a022160492e40cd02bafc413a3cb009551fd6f8d | [
"MIT"
] | null | null | null | debexpo/tests/test_gnupg.py | jadonk/debexpo | a022160492e40cd02bafc413a3cb009551fd6f8d | [
"MIT"
] | null | null | null | debexpo/tests/test_gnupg.py | jadonk/debexpo | a022160492e40cd02bafc413a3cb009551fd6f8d | [
"MIT"
] | 2 | 2017-01-20T23:08:40.000Z | 2019-08-13T20:30:00.000Z | # -*- coding: utf-8 -*-
#
# utils.py Debexpo utility functions
#
# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/
#
# Copyright 2008 Serafeim Zanikolas <serzan@hellug.gr>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and assoc... | 45.398649 | 81 | 0.828992 |
64d38dd03c462339859dc58f5f3a4b1ad11731fd | 3,272 | py | Python | bombolone/core/utils/utils.py | LaudateCorpus1/bombolone | 2658bfe2ea3e659fe98e86c548e49ff0aa08f0c2 | [
"BSD-3-Clause"
] | 31 | 2015-01-04T08:38:55.000Z | 2021-09-05T08:53:03.000Z | bombolone/core/utils/utils.py | LaudateCorpus1/bombolone | 2658bfe2ea3e659fe98e86c548e49ff0aa08f0c2 | [
"BSD-3-Clause"
] | 6 | 2015-02-26T12:57:05.000Z | 2015-06-24T06:11:43.000Z | bombolone/core/utils/utils.py | LaudateCorpus1/bombolone | 2658bfe2ea3e659fe98e86c548e49ff0aa08f0c2 | [
"BSD-3-Clause"
] | 11 | 2015-01-09T21:54:05.000Z | 2021-11-30T04:54:19.000Z | # -*- coding: utf-8 -*-
"""
utils.py
~~~~~~~~~~~
Generic helper functions
:copyright: (c) 2014 by @zizzamia
:license: BSD (See LICENSE for details)
"""
import datetime
import json
import string
import re
import unicodedata
from collections import Iterable
from flask import request, render_template
from hashlib import... | 29.477477 | 105 | 0.67665 |
64d4eca2a01366e3a22a289ad383de96073f8bac | 1,286 | py | Python | var/spack/repos/builtin/packages/netcdf-fortran/package.py | mrzv/spack | a0fb2838ea60f020179f480a2db1438da9d2e2ab | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2018-11-27T03:39:44.000Z | 2021-09-06T15:50:35.000Z | var/spack/repos/builtin/packages/netcdf-fortran/package.py | matzke1/spack | 9af44814b12639744926c56cdf16ac9e95490011 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/netcdf-fortran/package.py | matzke1/spack | 9af44814b12639744926c56cdf16ac9e95490011 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | # Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
| 32.974359 | 93 | 0.688958 |
64d5db1f326dd6948ae5b6aa2e86f60f45afe760 | 2,293 | py | Python | tests/db/test_v5_to_v6.py | inmanta/inmanta-core | ae2153d57f124d00ad1b58e6d4bc6818364be4a8 | [
"Apache-2.0"
] | 6 | 2021-03-09T10:24:02.000Z | 2022-01-16T03:52:11.000Z | tests/db/test_v5_to_v6.py | inmanta/inmanta-core | ae2153d57f124d00ad1b58e6d4bc6818364be4a8 | [
"Apache-2.0"
] | 1,319 | 2020-12-18T08:52:29.000Z | 2022-03-31T18:17:32.000Z | tests/db/test_v5_to_v6.py | inmanta/inmanta-core | ae2153d57f124d00ad1b58e6d4bc6818364be4a8 | [
"Apache-2.0"
] | 4 | 2021-03-03T15:36:50.000Z | 2022-03-11T11:41:51.000Z | """
Copyright 2020 Inmanta
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 ... | 34.742424 | 105 | 0.73659 |
64d7181aa28285f0d3f1964a7724ac9342f291a9 | 306 | py | Python | home/views.py | morion4000/ophion | 016310ec0f702cb7f5d6b4e72e11817ef8bcdfae | [
"MIT"
] | null | null | null | home/views.py | morion4000/ophion | 016310ec0f702cb7f5d6b4e72e11817ef8bcdfae | [
"MIT"
] | 3 | 2020-02-12T03:26:52.000Z | 2021-06-10T22:29:27.000Z | home/views.py | morion4000/ophion | 016310ec0f702cb7f5d6b4e72e11817ef8bcdfae | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.views.generic.base import TemplateView
from lists.models import List
| 23.538462 | 86 | 0.728758 |
64d944653978f4300eb65aebe5ed000c73c7f7d4 | 6,840 | py | Python | is_data_handler.py | AlexanderFengler/nn_likelihoods | 2d0f63a63eb50f026b9492acba14708b23dfcaa4 | [
"MIT"
] | 2 | 2019-08-19T15:48:01.000Z | 2020-03-13T12:47:23.000Z | is_data_handler.py | AlexanderFengler/nn_likelihoods | 2d0f63a63eb50f026b9492acba14708b23dfcaa4 | [
"MIT"
] | null | null | null | is_data_handler.py | AlexanderFengler/nn_likelihoods | 2d0f63a63eb50f026b9492acba14708b23dfcaa4 | [
"MIT"
] | 6 | 2019-06-13T04:46:51.000Z | 2021-01-27T18:26:59.000Z | import os
import pickle
import numpy as np
import re
from string import ascii_letters
from datetime import datetime
import argparse
import gzip
if __name__ == "__main__":
# Currently available models = ['weibull', 'race_model_6', 'ornstein', 'full_ddm', 'ddm_seq2', 'ddm_par2', 'ddm_mic2']
CLI = argparse.Argum... | 44.705882 | 213 | 0.575585 |
64da409d0683b2127b58982d077ae000d035597d | 9,239 | py | Python | apps/api/tests/test_user.py | onyxhealth/safhir-vmi | 60ba90e9e8ba00347e0dc32e3061da5285df4ade | [
"Apache-2.0"
] | null | null | null | apps/api/tests/test_user.py | onyxhealth/safhir-vmi | 60ba90e9e8ba00347e0dc32e3061da5285df4ade | [
"Apache-2.0"
] | 9 | 2021-03-19T11:43:09.000Z | 2022-03-12T00:38:43.000Z | apps/api/tests/test_user.py | onyxhealth/safhir-vmi | 60ba90e9e8ba00347e0dc32e3061da5285df4ade | [
"Apache-2.0"
] | null | null | null | from datetime import date
from django.contrib.auth import get_user_model
from django.test import Client
from oauth2_provider.models import get_application_model, get_access_token_model
from apps.accounts.models import UserProfile
from .base import BaseTestCase
User = get_user_model()
Application = get_application_mode... | 39.652361 | 98 | 0.535556 |
64da7ea65369f204e730539cae624275e47b12c4 | 5,094 | py | Python | context/app/routes_auth.py | schwenk102/portal-ui | b40fd10e2d6568a9c419c06ba0759da295035cbd | [
"MIT"
] | null | null | null | context/app/routes_auth.py | schwenk102/portal-ui | b40fd10e2d6568a9c419c06ba0759da295035cbd | [
"MIT"
] | null | null | null | context/app/routes_auth.py | schwenk102/portal-ui | b40fd10e2d6568a9c419c06ba0759da295035cbd | [
"MIT"
] | null | null | null | from urllib.parse import urlencode
from flask import (
Blueprint, make_response, current_app, url_for,
request, redirect, render_template, session)
import requests
import globus_sdk
# This is mostly copy-and-paste from
# https://globus-sdk-python.readthedocs.io/en/stable/examples/three_legged_oauth/
bluepr... | 35.131034 | 97 | 0.667452 |
64daf0db3812e4c5d3198c3d2c5299bf8eb133ed | 5,208 | py | Python | data/preprocess/nc_interpolation.py | Skye777/transformer | 177834bcb55e59f8ea0fbe666734c148effbec8d | [
"Apache-2.0"
] | null | null | null | data/preprocess/nc_interpolation.py | Skye777/transformer | 177834bcb55e59f8ea0fbe666734c148effbec8d | [
"Apache-2.0"
] | null | null | null | data/preprocess/nc_interpolation.py | Skye777/transformer | 177834bcb55e59f8ea0fbe666734c148effbec8d | [
"Apache-2.0"
] | null | null | null | import os
import numpy as np
import matplotlib.pyplot as plt
import xarray
from hparams import Hparams
hparams = Hparams()
parser = hparams.parser
hp = parser.parse_args()
dic = [
[f'{hp.observe_dataset_dir}/meta-data/sst.mnmean.nc', f'{hp.observe_dataset_dir}/interp-data/sst.nc', 'sst', 'lat'],
[f'{hp.observ... | 36.166667 | 147 | 0.624424 |
64daf61f1b459c77ae842abee1c37e78d14fc111 | 8,283 | py | Python | neutron_taas/tests/unit/taas_client/osc/test_osc_tap_service.py | openstack/tap-as-a-service | c9d046843565b3af514169c26e5893dbe86a9b98 | [
"Apache-2.0"
] | 68 | 2015-10-18T02:57:10.000Z | 2022-02-22T11:33:25.000Z | neutron_taas/tests/unit/taas_client/osc/test_osc_tap_service.py | openstack/tap-as-a-service | c9d046843565b3af514169c26e5893dbe86a9b98 | [
"Apache-2.0"
] | null | null | null | neutron_taas/tests/unit/taas_client/osc/test_osc_tap_service.py | openstack/tap-as-a-service | c9d046843565b3af514169c26e5893dbe86a9b98 | [
"Apache-2.0"
] | 27 | 2015-11-11T02:00:35.000Z | 2020-03-07T03:36:33.000Z | # All Rights Reserved 2020
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 36.013043 | 79 | 0.645056 |
64dc127b8f61573f77c1944fb95158b8208f8c2e | 600 | py | Python | auth/Auth.py | fede-da/PageDownloader | 2344e2307ea374690ba05923056fff9e59c9ad12 | [
"MIT"
] | null | null | null | auth/Auth.py | fede-da/PageDownloader | 2344e2307ea374690ba05923056fff9e59c9ad12 | [
"MIT"
] | null | null | null | auth/Auth.py | fede-da/PageDownloader | 2344e2307ea374690ba05923056fff9e59c9ad12 | [
"MIT"
] | null | null | null | from auth.pwdLine import PwdLine
from auth.userLine import UserLine
from auth.enabler import Enabler
from tkinter import Tk
| 27.272727 | 59 | 0.598333 |
64dd3848949598fcdf3c2e10b7873c7391e20401 | 782 | py | Python | setup.py | soulless-viewer/w3cpull | acc5a564564a2cd256cc32f598f4551c70c17775 | [
"MIT"
] | 1 | 2020-11-19T21:09:00.000Z | 2020-11-19T21:09:00.000Z | setup.py | soulless-viewer/w3cpull | acc5a564564a2cd256cc32f598f4551c70c17775 | [
"MIT"
] | null | null | null | setup.py | soulless-viewer/w3cpull | acc5a564564a2cd256cc32f598f4551c70c17775 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
with open('README.md', encoding='utf-8') as f:
readme = f.read()
setup(
name="w3cpull",
version="1.1.1",
author="Mikalai Lisitsa",
author_email="Mikalai.Lisitsa@ibm.com",
url="https://github.com/soulless-viewer/w3cpull",
description="w3cpull is a... | 27.928571 | 86 | 0.640665 |
64dd62196969f76ce749b40ce7bdcc2fcddb001f | 2,341 | py | Python | noel/noel/main.py | jonparrott/noel | 48d54df340efbcff00ba0c2db587301199fbc572 | [
"Apache-2.0"
] | 66 | 2016-02-11T04:22:52.000Z | 2018-01-14T22:03:55.000Z | noel/noel/main.py | theacodes/noel | 48d54df340efbcff00ba0c2db587301199fbc572 | [
"Apache-2.0"
] | null | null | null | noel/noel/main.py | theacodes/noel | 48d54df340efbcff00ba0c2db587301199fbc572 | [
"Apache-2.0"
] | 8 | 2016-03-26T06:21:17.000Z | 2018-04-23T13:47:38.000Z | # Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 33.442857 | 80 | 0.70739 |
b379b19bf85788ca37275f4904081e4ad7396d67 | 567 | py | Python | bkmus_api/bkmus_copyr.py | mbakija/bkmuseum_xstitch_bot | 07de75a23d48fafae34ebda60a82ba9973386be1 | [
"MIT"
] | 1 | 2020-11-24T05:47:55.000Z | 2020-11-24T05:47:55.000Z | bkmus_api/bkmus_copyr.py | mbakija/bkmuseum_xstitch_bot | 07de75a23d48fafae34ebda60a82ba9973386be1 | [
"MIT"
] | null | null | null | bkmus_api/bkmus_copyr.py | mbakija/bkmuseum_xstitch_bot | 07de75a23d48fafae34ebda60a82ba9973386be1 | [
"MIT"
] | null | null | null | # print copyright restrictions: 0 = not restricted, 1 = in copyright
# that said, several pieces (particularly in Contemporary Art collection)
# do have copyright notices on them even if copyright restrictions == 0
# sorting by "rights_type": "name" might be more clarifying, but the number of
# But I'd argue this use ... | 37.8 | 79 | 0.75485 |
b379e885d5afb3236202408bc7d3c8933c443206 | 1,243 | py | Python | parseq/scripts_insert/util.py | lukovnikov/parseq | 65a4a2444d78779c3255e70a7897f77e73cdcdda | [
"MIT"
] | 1 | 2022-01-21T16:08:08.000Z | 2022-01-21T16:08:08.000Z | parseq/scripts_insert/util.py | lukovnikov/parseq | 65a4a2444d78779c3255e70a7897f77e73cdcdda | [
"MIT"
] | null | null | null | parseq/scripts_insert/util.py | lukovnikov/parseq | 65a4a2444d78779c3255e70a7897f77e73cdcdda | [
"MIT"
] | 1 | 2020-08-19T07:09:44.000Z | 2020-08-19T07:09:44.000Z | from nltk import Tree
from parseq.grammar import tree_to_lisp_tokens
def reorder_tree(x:Tree, orderless=None, typestr="arg:~type"):
"""
Reorders given tree 'x' such that if a parent label is in 'orderless', the order of the children is always as follows:
- arg:~type goes first
- other children are or... | 36.558824 | 122 | 0.617056 |
b37bde647afa0d22b730a31da03c3321ccc70480 | 3,887 | py | Python | r_desktop.py | mtiday/open_remote_desktop_with_python | 25dd0abed91cf45a7a1bd4961afec4cdcee1b039 | [
"MIT"
] | null | null | null | r_desktop.py | mtiday/open_remote_desktop_with_python | 25dd0abed91cf45a7a1bd4961afec4cdcee1b039 | [
"MIT"
] | null | null | null | r_desktop.py | mtiday/open_remote_desktop_with_python | 25dd0abed91cf45a7a1bd4961afec4cdcee1b039 | [
"MIT"
] | null | null | null | """This program will open a connection to a server you choose from a
list, or specify a name not on the list. Build a text file named
servers.txt and save it in the same directory this program is ran
from. Please make sure not to have any extra spaces before or at the
end of the name of the servers. One name per li... | 35.66055 | 79 | 0.655518 |
b37c92749148846755c132fe23eebba1cdbf7a9a | 10,069 | py | Python | external_apps/oauth/__init__.py | spreeker/democracygame | 525139955cb739c295051f317ab670049511bcf8 | [
"BSD-3-Clause"
] | 2 | 2016-05-09T04:57:34.000Z | 2017-03-03T14:22:24.000Z | external_apps/oauth/__init__.py | spreeker/democracygame | 525139955cb739c295051f317ab670049511bcf8 | [
"BSD-3-Clause"
] | null | null | null | external_apps/oauth/__init__.py | spreeker/democracygame | 525139955cb739c295051f317ab670049511bcf8 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
import collections
import random
import time
import urllib
import urlparse
from urlencoding import escape, parse_qs, compose_qs
OAUTH_VERSION = '1.0'
TIMESTAMP_THRESHOLD = 300
NONCE_LENGTH = 10
| 34.961806 | 149 | 0.614063 |
b37cd0f3a91feee812c43f65e8c47aeebe21eb18 | 5,244 | py | Python | Pneumonia_Detection.py | sachin7695/Pneumonia_Diagnosis_using_XRays | 5192f4d79efba1abc3684cb85e02b46a0b508ee2 | [
"MIT"
] | null | null | null | Pneumonia_Detection.py | sachin7695/Pneumonia_Diagnosis_using_XRays | 5192f4d79efba1abc3684cb85e02b46a0b508ee2 | [
"MIT"
] | null | null | null | Pneumonia_Detection.py | sachin7695/Pneumonia_Diagnosis_using_XRays | 5192f4d79efba1abc3684cb85e02b46a0b508ee2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Conv2D, MaxPooling2D, Dense,Flatten, Dropout,BatchNormalization, GlobalAveragePooling2D, ZeroPadding2D
from keras.preprocessing.image import ImageDataGenerator, load_img, img_to_array
fr... | 22.899563 | 138 | 0.687071 |
b37f2c8f6aee924b36740ecfe3b5cc25e0a3af9c | 448 | py | Python | masters/master.client.syzygy/master_source_cfg.py | bopopescu/build | 4e95fd33456e552bfaf7d94f7d04b19273d1c534 | [
"BSD-3-Clause"
] | null | null | null | masters/master.client.syzygy/master_source_cfg.py | bopopescu/build | 4e95fd33456e552bfaf7d94f7d04b19273d1c534 | [
"BSD-3-Clause"
] | null | null | null | masters/master.client.syzygy/master_source_cfg.py | bopopescu/build | 4e95fd33456e552bfaf7d94f7d04b19273d1c534 | [
"BSD-3-Clause"
] | 1 | 2020-07-23T11:05:06.000Z | 2020-07-23T11:05:06.000Z | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master.chromium_git_poller_bb8 import ChromiumGitPoller
| 32 | 72 | 0.75 |
b37f577716d3e926a546fc670e6e43faf9d12dff | 107 | py | Python | tests/test_saltuser.py | saltastro/saltuser | a5c97b15b5c2cbf732fb957c9dd91ac04ac23373 | [
"MIT"
] | null | null | null | tests/test_saltuser.py | saltastro/saltuser | a5c97b15b5c2cbf732fb957c9dd91ac04ac23373 | [
"MIT"
] | null | null | null | tests/test_saltuser.py | saltastro/saltuser | a5c97b15b5c2cbf732fb957c9dd91ac04ac23373 | [
"MIT"
] | null | null | null | """Tests for `salt_user` package."""
def test_content():
"""Bogus test."""
assert True is False
| 13.375 | 36 | 0.607477 |
b37fac2f309e1b66cb79bc593af91e35a577cf67 | 557 | py | Python | grocers_panel/migrations/0002_grocer_stripe_subscription.py | delitamakanda/GroceryApp | 8b0eeb40197b480598928dd7e95e63ca180c9bf1 | [
"MIT"
] | 1 | 2021-05-25T02:46:42.000Z | 2021-05-25T02:46:42.000Z | grocers_panel/migrations/0002_grocer_stripe_subscription.py | delitamakanda/GroceryApp | 8b0eeb40197b480598928dd7e95e63ca180c9bf1 | [
"MIT"
] | null | null | null | grocers_panel/migrations/0002_grocer_stripe_subscription.py | delitamakanda/GroceryApp | 8b0eeb40197b480598928dd7e95e63ca180c9bf1 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.3 on 2021-11-11 22:14
from django.db import migrations, models
import django.db.models.deletion
| 26.52381 | 130 | 0.657092 |
b381335b767782ee84683c89db68147a9099b797 | 861 | py | Python | udemy_pyspark/min-temperatures.py | XC-Li/Hadoop_Spark_Practice | e34b51874ebf81ae9ba7e4c3ccd864580920c525 | [
"MIT"
] | null | null | null | udemy_pyspark/min-temperatures.py | XC-Li/Hadoop_Spark_Practice | e34b51874ebf81ae9ba7e4c3ccd864580920c525 | [
"MIT"
] | null | null | null | udemy_pyspark/min-temperatures.py | XC-Li/Hadoop_Spark_Practice | e34b51874ebf81ae9ba7e4c3ccd864580920c525 | [
"MIT"
] | null | null | null | from pyspark import SparkConf, SparkContext
conf = SparkConf().setMaster("local").setAppName("MinTemperatures")
sc = SparkContext(conf = conf)
lines = sc.textFile("file:///D:/Github/Hadoop_Spark_Practice/udemy_pyspark/1800.csv")
parsedLines = lines.map(parseLine) # transfer from line to parsed pairs
minTemps = parse... | 39.136364 | 90 | 0.699187 |
b3823f6b2a34a5c4648470d65d4dd7a0605a4343 | 2,062 | py | Python | ircmqtt.py | dobrite/irctomqttbot | c1a9ba49818211f635c07469127a7f9de12cee8f | [
"MIT"
] | null | null | null | ircmqtt.py | dobrite/irctomqttbot | c1a9ba49818211f635c07469127a7f9de12cee8f | [
"MIT"
] | null | null | null | ircmqtt.py | dobrite/irctomqttbot | c1a9ba49818211f635c07469127a7f9de12cee8f | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
import irc.bot
import irc.strings
from irc.client import ip_numstr_to_quad, ip_quad_to_numstr
import paho.mqtt.client as mqtt
def main():
# IRC settings
irc_channel = '#mqttbot'
irc_nickname = 'mqttbot'
irc_server = 'irc.freenode.net'
irc_port = 6667
# MQTT settings... | 27.864865 | 103 | 0.628031 |
b382df3f6b2858f533490ca2d78d4ad6529491c4 | 6,122 | py | Python | src/polyswarmd/app.py | polyswarm/polyswarmd | b732d60f0f829cc355c1f938bbe6de69f9985098 | [
"MIT"
] | 14 | 2018-04-16T18:04:23.000Z | 2019-11-26T06:39:23.000Z | src/polyswarmd/app.py | polyswarm/polyswarmd | b732d60f0f829cc355c1f938bbe6de69f9985098 | [
"MIT"
] | 227 | 2018-04-03T01:10:34.000Z | 2021-03-25T21:49:58.000Z | src/polyswarmd/app.py | polyswarm/polyswarmd | b732d60f0f829cc355c1f938bbe6de69f9985098 | [
"MIT"
] | 2 | 2018-04-23T18:37:47.000Z | 2021-04-26T10:58:39.000Z | """
isort:skip_file
"""
from concurrent.futures import ThreadPoolExecutor
from requests_futures.sessions import FuturesSession
from polyswarmd.monkey import patch_all
patch_all()
import datetime
import functools
import logging
from flask import Flask, g, request
from flask_caching import Cache
from polyswarmd.c... | 30.61 | 99 | 0.703692 |
b3838e5127349f4a28ab146728a622c8c9ad0a50 | 9,702 | py | Python | script/AWS_EC2_info_to_FMC.py | tekgourou/AWS_EC2_CONTEXT_to_FMC | 777df7e5acd96cdab0b65eda1c8b9c54f4d477c2 | [
"Apache-2.0"
] | 3 | 2020-06-29T17:23:16.000Z | 2021-08-18T05:47:53.000Z | script/AWS_EC2_info_to_FMC.py | tekgourou/AWS_EC2_CONTEXT_to_FMC | 777df7e5acd96cdab0b65eda1c8b9c54f4d477c2 | [
"Apache-2.0"
] | null | null | null | script/AWS_EC2_info_to_FMC.py | tekgourou/AWS_EC2_CONTEXT_to_FMC | 777df7e5acd96cdab0b65eda1c8b9c54f4d477c2 | [
"Apache-2.0"
] | null | null | null | #!/bin/env python
'''
PURPOSE:
THIS SCRIPT IMPORTS ALL THE OPERATING SYSTEMS INFORMATION FROM AWS EC2 API,
PRINTS THE OUTPUT TO A CSV AND THEN IMPORTS THE CSV INTO FIREPOWER MANAGEMENT CENTER USING THE HOST INPUT API OF FMC.
DEPENDENCIES / REQUIREMENTS:
1- PYTHON 3.6
2- PERL 5
3- ACCOUNT ON AWS CLOUD AN API KEY G... | 48.029703 | 219 | 0.660276 |
b38440b2c835118d8645ae0629045e945a8e0b44 | 7,703 | py | Python | utilitiespackage/utilitiespackage/tests/yunobuiltin/test_yunobuiltin___init__.py | GDSLLC/utilities-package | 52a3315bb56eb7592be82293f97aeeb3be5988e6 | [
"MIT"
] | null | null | null | utilitiespackage/utilitiespackage/tests/yunobuiltin/test_yunobuiltin___init__.py | GDSLLC/utilities-package | 52a3315bb56eb7592be82293f97aeeb3be5988e6 | [
"MIT"
] | null | null | null | utilitiespackage/utilitiespackage/tests/yunobuiltin/test_yunobuiltin___init__.py | GDSLLC/utilities-package | 52a3315bb56eb7592be82293f97aeeb3be5988e6 | [
"MIT"
] | null | null | null | import operator
from functools import partial
from utilitiespackage.yunobuiltin import (
get,
gensym,
isa,
interleave,
is_even,
is_iterable,
new_list,
new_iter,
new_tuple,
juxt,
flatten,
is_str_or_bytes,
identity,
is_map,
is_seq,
append... | 23.628834 | 104 | 0.492276 |
b384f1cd8ef3bf5972a03b34c5abadd537fbffab | 2,394 | py | Python | app-packages/solr/package/scripts/solr_node.py | turningme/incubator-retired-slider | 1d4f519d763210f46e327338be72efa99e65cb5d | [
"Apache-2.0"
] | 60 | 2015-01-05T10:51:11.000Z | 2018-12-15T03:48:09.000Z | app-packages/solr/package/scripts/solr_node.py | turningme/incubator-retired-slider | 1d4f519d763210f46e327338be72efa99e65cb5d | [
"Apache-2.0"
] | null | null | null | app-packages/solr/package/scripts/solr_node.py | turningme/incubator-retired-slider | 1d4f519d763210f46e327338be72efa99e65cb5d | [
"Apache-2.0"
] | 87 | 2015-01-14T05:14:15.000Z | 2018-12-25T14:14:56.000Z | #!/usr/bin/env python
"""
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
"License");... | 26.898876 | 72 | 0.70259 |
b388a93bd00b03fd3f2be3f945fb5452ac8fba8a | 2,364 | py | Python | other/gen_inserts_from_hpge.py | dlooto/dauphine | ba0a0caaf513dbbfcfdd658ad5c687cbf279c021 | [
"Apache-2.0"
] | null | null | null | other/gen_inserts_from_hpge.py | dlooto/dauphine | ba0a0caaf513dbbfcfdd658ad5c687cbf279c021 | [
"Apache-2.0"
] | null | null | null | other/gen_inserts_from_hpge.py | dlooto/dauphine | ba0a0caaf513dbbfcfdd658ad5c687cbf279c021 | [
"Apache-2.0"
] | 1 | 2020-08-13T14:34:44.000Z | 2020-08-13T14:34:44.000Z | # 2017
# SPERPTSQL
import os
import time
w = open('a.sql', 'w')
allfile = scanfile('/Users/healer/Downloads/ff')
w.close() | 31.52 | 142 | 0.58714 |
b3898633efb7d04220516dced622d82112dbe427 | 1,200 | py | Python | photos/views.py | Gideon-Muriithi/photos_gallary | 06534c06582bfb5e38e0e0d9bde768512a493c2e | [
"MIT"
] | null | null | null | photos/views.py | Gideon-Muriithi/photos_gallary | 06534c06582bfb5e38e0e0d9bde768512a493c2e | [
"MIT"
] | 5 | 2020-02-12T03:13:56.000Z | 2021-09-08T01:20:31.000Z | photos/views.py | Gideon-Muriithi/photos_gallary | 06534c06582bfb5e38e0e0d9bde768512a493c2e | [
"MIT"
] | null | null | null | from django.shortcuts import render
from . models import Location, Image, categories
| 34.285714 | 74 | 0.68 |
b389c2bfce76608735c4250529737d25b0aaea66 | 142 | py | Python | testing.py | gabeladd/testrepo | 9d8c8cc2bc467434c2ecc1df7463eeff0b454293 | [
"MIT"
] | null | null | null | testing.py | gabeladd/testrepo | 9d8c8cc2bc467434c2ecc1df7463eeff0b454293 | [
"MIT"
] | null | null | null | testing.py | gabeladd/testrepo | 9d8c8cc2bc467434c2ecc1df7463eeff0b454293 | [
"MIT"
] | null | null | null | #something new
var="BOB was here!!!!"
#have to change something else
print("\n\nDave what are you doing????\n\n\n")
#New branch master added | 20.285714 | 46 | 0.697183 |
b38b561a2bf71d935045c435d5ddb3b856bc3af4 | 9,103 | py | Python | tests/processing_components/test_atmospheric_screen.py | SKA-ScienceDataProcessor/rascil | bd3b47f779e18e184781e2928ad1539d1fdc1c9b | [
"Apache-2.0"
] | 7 | 2019-12-14T13:42:33.000Z | 2022-01-28T03:31:45.000Z | tests/processing_components/test_atmospheric_screen.py | SKA-ScienceDataProcessor/rascil | bd3b47f779e18e184781e2928ad1539d1fdc1c9b | [
"Apache-2.0"
] | 6 | 2020-01-08T09:40:08.000Z | 2020-06-11T14:56:13.000Z | tests/processing_components/test_atmospheric_screen.py | SKA-ScienceDataProcessor/rascil | bd3b47f779e18e184781e2928ad1539d1fdc1c9b | [
"Apache-2.0"
] | 3 | 2020-01-14T11:14:16.000Z | 2020-09-15T05:21:06.000Z | """ Unit tests for mpc
"""
import logging
import os
import unittest
import astropy.units as u
import numpy
from astropy.coordinates import SkyCoord
from rascil.data_models.parameters import rascil_path, rascil_data_path
from rascil.data_models.polarisation import PolarisationFrame
from rascil.processing_components i... | 52.618497 | 120 | 0.631989 |
b38fdb90a8567c51ecce68bb72dba00c506fbc8a | 6,822 | bzl | Python | tools/build_rules/proto.bzl | bowlofstew/kythe | 23a3524de3924901ffaba4b8bcab8abe96de6f3a | [
"Apache-2.0"
] | 1 | 2021-04-24T08:18:15.000Z | 2021-04-24T08:18:15.000Z | tools/build_rules/proto.bzl | bowlofstew/kythe | 23a3524de3924901ffaba4b8bcab8abe96de6f3a | [
"Apache-2.0"
] | 3 | 2020-12-31T09:08:34.000Z | 2021-09-28T05:42:02.000Z | tools/build_rules/proto.bzl | moul/kythe | 2e198cc818981fc6cffa14d8263fda3a33da6429 | [
"Apache-2.0"
] | null | null | null | load("@//tools:build_rules/go.bzl", "go_library")
standard_proto_path = "third_party/proto/src/"
_genproto_attrs = {
"src": attr.label(
allow_files = FileType([".proto"]),
single_file = True,
),
"deps": attr.label_list(
allow_files = False,
providers = ["proto_src"],
),... | 31.730233 | 86 | 0.598358 |
b391c9147986afbcf63eec9ecaef07d00a11bbee | 1,128 | py | Python | examples/nsw-qld.py | ejwilson3/NchooseK | 1e985fb47808283fbb579609b2467be3f5a4a29e | [
"BSD-3-Clause"
] | null | null | null | examples/nsw-qld.py | ejwilson3/NchooseK | 1e985fb47808283fbb579609b2467be3f5a4a29e | [
"BSD-3-Clause"
] | 1 | 2021-07-19T20:41:06.000Z | 2021-07-19T20:41:06.000Z | examples/nsw-qld.py | ejwilson3/NchooseK | 1e985fb47808283fbb579609b2467be3f5a4a29e | [
"BSD-3-Clause"
] | 1 | 2021-07-14T17:21:17.000Z | 2021-07-14T17:21:17.000Z | #! /usr/bin/env python
###################################
# Test NchooseK on a two-region #
# map-coloring problem #
# #
# By Scott Pakin <pakin@lanl.gov> #
###################################
import nchoosek
# Define a type for "exactly one color".
env = nchoosek.Enviro... | 26.857143 | 61 | 0.560284 |
b3934e37cd454e67d99a3d0f67cc435385b6aa5b | 7,902 | py | Python | googledrive_cloner/tests/mock_service.py | martinmCGG/googledrivecloner | b7d9592ef0bed34b567dfdf5f306b057edd2a0f3 | [
"MIT"
] | 5 | 2022-02-01T01:07:17.000Z | 2022-03-29T19:23:52.000Z | googledrive_cloner/tests/mock_service.py | martinmCGG/googledrivecloner | b7d9592ef0bed34b567dfdf5f306b057edd2a0f3 | [
"MIT"
] | 1 | 2022-03-29T19:23:25.000Z | 2022-03-29T19:23:25.000Z | googledrive_cloner/tests/mock_service.py | martinmCGG/googledrivecloner | b7d9592ef0bed34b567dfdf5f306b057edd2a0f3 | [
"MIT"
] | 1 | 2022-03-29T14:07:36.000Z | 2022-03-29T14:07:36.000Z | import copy
from typing import Dict, List, Optional, Set, Union
from unittest.mock import Mock
from uuid import uuid4
def return_execute(func: callable):
"""
Transform function to return a Mock so that the function only runs when `execute`
is called
i.e.
@return_execute
def foo():
re... | 29.266667 | 87 | 0.559226 |
b393a832ea806e708dd3e9d64cfaf7e065346907 | 43,854 | py | Python | astrocats/catalog/entry.py | Astrocats-Cataclysmic-Variable-Catalog/Cataclysmic-Varible-Astrocats | 7835595a4df5bf463bf11412f65b4f8671ae8dfc | [
"MIT"
] | null | null | null | astrocats/catalog/entry.py | Astrocats-Cataclysmic-Variable-Catalog/Cataclysmic-Varible-Astrocats | 7835595a4df5bf463bf11412f65b4f8671ae8dfc | [
"MIT"
] | null | null | null | astrocats/catalog/entry.py | Astrocats-Cataclysmic-Variable-Catalog/Cataclysmic-Varible-Astrocats | 7835595a4df5bf463bf11412f65b4f8671ae8dfc | [
"MIT"
] | null | null | null | """Definitions related to the `Entry` class for catalog entries."""
import codecs
import gzip as gz
import hashlib
import json
import logging
import os
import sys
from collections import OrderedDict
from copy import deepcopy
from decimal import Decimal
from astrocats.catalog.catdict import CatDict, CatDictError
from a... | 38.067708 | 92 | 0.548319 |
b396182be1514ba5aa6155c9e8e65948041b32f6 | 309 | py | Python | udp/src/client.py | JunguangJiang/FTP-master | 62e6499cbfcfad2db9aef67f2f7bfd7b808bfa63 | [
"MIT"
] | 1 | 2020-04-19T14:08:13.000Z | 2020-04-19T14:08:13.000Z | udp/src/client.py | JunguangJiang/FTP | 62e6499cbfcfad2db9aef67f2f7bfd7b808bfa63 | [
"MIT"
] | null | null | null | udp/src/client.py | JunguangJiang/FTP | 62e6499cbfcfad2db9aef67f2f7bfd7b808bfa63 | [
"MIT"
] | null | null | null | import socket
size = 8192
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
for i in range(0,51):
msg = bytes(str(i), encoding="utf-8")
sock.sendto(msg, ('127.0.0.1', 9876))
print(str(sock.recv(size),encoding='utf-8'))
sock.close()
except:
print("cannot reach the server") | 22.071429 | 57 | 0.650485 |
b396228087c514f695b111b9c52c74d4e78ad950 | 186 | py | Python | config.py | muni2explore/flask-api-starter-kit | 96ebafa33537e00ddd1d7d6f72d97b4c53f03723 | [
"MIT"
] | 54 | 2020-08-10T10:00:03.000Z | 2022-03-18T10:07:01.000Z | config.py | muni2explore/flask-api-starter-kit | 96ebafa33537e00ddd1d7d6f72d97b4c53f03723 | [
"MIT"
] | 2 | 2022-02-07T14:31:34.000Z | 2022-02-07T14:32:44.000Z | config.py | muni2explore/flask-api-starter-kit | 96ebafa33537e00ddd1d7d6f72d97b4c53f03723 | [
"MIT"
] | 23 | 2020-07-15T08:58:06.000Z | 2022-03-25T03:03:53.000Z | """[General Configuration Params]
"""
from os import environ, path
from dotenv import load_dotenv
basedir = path.abspath(path.dirname(__file__))
load_dotenv(path.join(basedir, '.env'))
| 23.25 | 46 | 0.763441 |
b39793836966e613d8f5a0a9e61da63d48b5e600 | 3,096 | py | Python | util/get-google-calendars.py | Kartoffel/infodisplay | 01c87c1d06b4bae45397243d0a99c86015cee708 | [
"MIT"
] | 2 | 2021-12-29T14:24:19.000Z | 2022-01-04T21:24:56.000Z | util/get-google-calendars.py | Kartoffel/infodisplay | 01c87c1d06b4bae45397243d0a99c86015cee708 | [
"MIT"
] | 1 | 2022-01-03T19:40:47.000Z | 2022-01-05T17:45:39.000Z | util/get-google-calendars.py | Kartoffel/infodisplay | 01c87c1d06b4bae45397243d0a99c86015cee708 | [
"MIT"
] | null | null | null | '''
get-google-calendars.py
This script will obtain the `token.json` required for getting your google calendar appointments on the info display.
It will also give you the ID's of your calendars, which you can choose to include in your config.ini
Run this on your local desktop! Install the following pa... | 32.25 | 120 | 0.671189 |