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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e231b3e0f6c6a8c2301795d5b2f82321cd2ce52c | 1,969 | py | Python | poco/commands/start.py | gaborkolarovics/poco | 31237ce9138c134e7780cd3ed7459cd5f4e07834 | [
"MIT"
] | 52 | 2017-10-13T06:11:41.000Z | 2021-12-08T08:08:48.000Z | poco/commands/start.py | gaborkolarovics/poco | 31237ce9138c134e7780cd3ed7459cd5f4e07834 | [
"MIT"
] | 28 | 2017-08-02T13:55:53.000Z | 2017-09-07T14:31:55.000Z | poco/commands/start.py | gaborkolarovics/poco | 31237ce9138c134e7780cd3ed7459cd5f4e07834 | [
"MIT"
] | 8 | 2018-02-16T10:51:27.000Z | 2022-02-04T11:17:44.000Z | import os
from .abstract_command import AbstractCommand
from ..services.state_utils import StateUtils
from ..services.state import StateHolder
from ..services.command_handler import CommandHandler
from ..services.console_logger import ColorPrint
| 42.804348 | 118 | 0.655663 |
e233625c28cad064126485489cb5b21f0fc984ce | 8,098 | py | Python | netguardmitm/netguardmitm.py | RTN-Team/netguard-mitm | 76f8d03da2f377c8c102410befca7140c7e5d156 | [
"MIT"
] | null | null | null | netguardmitm/netguardmitm.py | RTN-Team/netguard-mitm | 76f8d03da2f377c8c102410befca7140c7e5d156 | [
"MIT"
] | null | null | null | netguardmitm/netguardmitm.py | RTN-Team/netguard-mitm | 76f8d03da2f377c8c102410befca7140c7e5d156 | [
"MIT"
] | null | null | null | from netfilterqueue import NetfilterQueue
import socket
from os import system
import scapy.all as scapy
import scapy_http.http
from urllib.parse import urlparse, parse_qs
REQUEST_LOGIN = 0
REQUEST_PROTECT = 1
| 40.089109 | 127 | 0.63917 |
e23422dd40279f3c778ce0b0151d008ed9279e87 | 1,660 | py | Python | wdra_extender/settings.py | Southampton-RSG/wdra-extender | cfbcc8633ef13002a8f0266c782380c9c6f4ae55 | [
"BSD-3-Clause"
] | null | null | null | wdra_extender/settings.py | Southampton-RSG/wdra-extender | cfbcc8633ef13002a8f0266c782380c9c6f4ae55 | [
"BSD-3-Clause"
] | 28 | 2020-07-10T14:05:18.000Z | 2022-02-01T15:31:16.000Z | wdra_extender/settings.py | Southampton-RSG/wdra-extender | cfbcc8633ef13002a8f0266c782380c9c6f4ae55 | [
"BSD-3-Clause"
] | null | null | null | """Config options for WDRAX.
Gets settings from environment variables or .env/settings.ini file.
"""
import pathlib
from decouple import AutoConfig
BASE_DIR = pathlib.Path(__name__).absolute().parent
config = AutoConfig(search_path=str(BASE_DIR)) # pylint: disable=invalid-name
LOG_LEVEL = config('LOG_LEVEL', defa... | 31.320755 | 81 | 0.734337 |
e2349ddee45820710716c607505fad37b5e41eba | 3,066 | py | Python | tests/contrib/zerorpc/zeropc_tests.py | trancee/apm-agent-python | 04f014661f18b871b8b1970978b639b92f627e5f | [
"BSD-3-Clause"
] | 1 | 2019-04-01T10:23:45.000Z | 2019-04-01T10:23:45.000Z | tests/contrib/zerorpc/zeropc_tests.py | alirezarezvani/apm-agent-python | 5a287a4968dcaf1d5ea84f15f9793df24cf39a3d | [
"BSD-3-Clause"
] | null | null | null | tests/contrib/zerorpc/zeropc_tests.py | alirezarezvani/apm-agent-python | 5a287a4968dcaf1d5ea84f15f9793df24cf39a3d | [
"BSD-3-Clause"
] | 2 | 2020-02-04T22:03:00.000Z | 2021-03-23T13:17:14.000Z | # BSD 3-Clause License
#
# Copyright (c) 2019, Elasticsearch BV
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, t... | 39.818182 | 96 | 0.737443 |
e23593b3827e34e746568409163528438deb1378 | 9,595 | py | Python | pyFAI/gui/calibration/RingCalibration.py | vallsv/pyFAI | 64143652c2b219978ec370bf2fa215af01f937c2 | [
"MIT"
] | null | null | null | pyFAI/gui/calibration/RingCalibration.py | vallsv/pyFAI | 64143652c2b219978ec370bf2fa215af01f937c2 | [
"MIT"
] | 1 | 2016-09-12T11:58:05.000Z | 2016-09-12T11:58:05.000Z | pyFAI/gui/calibration/RingCalibration.py | vallsv/pyFAI | 64143652c2b219978ec370bf2fa215af01f937c2 | [
"MIT"
] | null | null | null | # coding: utf-8
# /*##########################################################################
#
# Copyright (c) 2016 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
#... | 36.903846 | 84 | 0.605419 |
e237d3872eb66e61cab21518227533afd94c87e8 | 252 | py | Python | desafio/desafio051.py | henriquekirchheck/Curso-em-video-Python | 1a29f68515313af85c8683f626ba35f8fcdd10e7 | [
"MIT"
] | null | null | null | desafio/desafio051.py | henriquekirchheck/Curso-em-video-Python | 1a29f68515313af85c8683f626ba35f8fcdd10e7 | [
"MIT"
] | null | null | null | desafio/desafio051.py | henriquekirchheck/Curso-em-video-Python | 1a29f68515313af85c8683f626ba35f8fcdd10e7 | [
"MIT"
] | null | null | null | print('=====================')
print(' 10 Termos de um PA')
print('=====================')
p = int(input('Primeiro Termo: '))
r = int(input('Razo: '))
for loop in range(p, ((r * 10) + p), r):
print('{} ->' .format(loop), end=' ')
print('Acabou') | 25.2 | 41 | 0.452381 |
e23831c5c1e4e4aaba38057ace81941b540c3a57 | 1,159 | py | Python | push.py | mikofski/dulwichPorcelain | 2e4aa751ed70f9c4167de5e8aa5297b5cc6f583f | [
"BSD-2-Clause"
] | 4 | 2015-07-13T17:47:51.000Z | 2017-09-10T02:57:07.000Z | push.py | mikofski/dulwichPorcelain | 2e4aa751ed70f9c4167de5e8aa5297b5cc6f583f | [
"BSD-2-Clause"
] | null | null | null | push.py | mikofski/dulwichPorcelain | 2e4aa751ed70f9c4167de5e8aa5297b5cc6f583f | [
"BSD-2-Clause"
] | null | null | null | from dulwich.repo import Repo
from dulwich.client import get_transport_and_path
import sys
def push(remote_url, repo_path='.'):
"""
Push to a remote repository
:param remote_url: <str> url of remote repository
:param repo_path: <str> path of local repository
:return refs: <dict> dictionary of ref-... | 38.633333 | 71 | 0.612597 |
e239b2ed1a202d8696559f1fb4f8dfa7181c561f | 711 | py | Python | test/test_regularization.py | rentainhe/glasses | 34300a76985c7fc643094fa8d617114926a0ee75 | [
"MIT"
] | 271 | 2020-10-20T12:30:23.000Z | 2022-03-17T03:02:38.000Z | test/test_regularization.py | rentainhe/glasses | 34300a76985c7fc643094fa8d617114926a0ee75 | [
"MIT"
] | 212 | 2020-07-25T13:02:23.000Z | 2022-02-20T10:33:32.000Z | test/test_regularization.py | rentainhe/glasses | 34300a76985c7fc643094fa8d617114926a0ee75 | [
"MIT"
] | 23 | 2021-01-03T13:53:36.000Z | 2022-03-17T05:40:34.000Z | import torch
from glasses.nn.regularization import DropBlock, StochasticDepth
| 20.911765 | 64 | 0.630098 |
e23a891f09a542df416f2a9cde89a79b43479dfe | 27,200 | py | Python | dD_plots_lon_runbin.py | HannahSus/MercuryPolarCratersDepthDiameter | e96fc6cadfa5ebd0558ebea737c517d51fcb0d8a | [
"CC0-1.0"
] | null | null | null | dD_plots_lon_runbin.py | HannahSus/MercuryPolarCratersDepthDiameter | e96fc6cadfa5ebd0558ebea737c517d51fcb0d8a | [
"CC0-1.0"
] | null | null | null | dD_plots_lon_runbin.py | HannahSus/MercuryPolarCratersDepthDiameter | e96fc6cadfa5ebd0558ebea737c517d51fcb0d8a | [
"CC0-1.0"
] | null | null | null | #! /Users/susorhc1/anaconda/bin/python
##
##
##
# Program: dD_plots_lon_runbin
# Author: Hannah C.M. Susorney
# Date Created: 2020-03-03
#
# Purpose: To compare depth/diameter measurements in overlapping longitude bins
# Used in study
#
# Required Inputs: .csv of data
#
# Updates: 2021-08-31 - Clean and document cod... | 50.746269 | 212 | 0.742096 |
e23afe1671f81cd4be3382e30d76243c69f070a9 | 24,158 | py | Python | docassemble/michildsupport/misc.py | jpylephilalegal/docassemble-michildsupport | 9bae912240d58d3d04e05abc879f9f66cbbd48a8 | [
"MIT"
] | null | null | null | docassemble/michildsupport/misc.py | jpylephilalegal/docassemble-michildsupport | 9bae912240d58d3d04e05abc879f9f66cbbd48a8 | [
"MIT"
] | null | null | null | docassemble/michildsupport/misc.py | jpylephilalegal/docassemble-michildsupport | 9bae912240d58d3d04e05abc879f9f66cbbd48a8 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup as Soup
import re
import json
import sys
import shutil
import tempfile
import os
import subprocess
from pathlib import Path
from docassemble.base.util import log, path_and_mimetype, validation_error, DADict, DAList, Individual, value, force_ask, space_to_underscore
__all__ = ['run_automa... | 47.648915 | 228 | 0.528893 |
e23c6bed89aa6c1b377701c04838eafacf7af7c2 | 2,571 | py | Python | graphenetools/gt_c_one_third_commensurate_command_plot.py | nscottnichols/graphenetools-py | ff2b2ac302d1f81ddc8887036d1915a93cc2adda | [
"MIT"
] | null | null | null | graphenetools/gt_c_one_third_commensurate_command_plot.py | nscottnichols/graphenetools-py | ff2b2ac302d1f81ddc8887036d1915a93cc2adda | [
"MIT"
] | null | null | null | graphenetools/gt_c_one_third_commensurate_command_plot.py | nscottnichols/graphenetools-py | ff2b2ac302d1f81ddc8887036d1915a93cc2adda | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
import sys
import argparse
from graphenetools import gt
def main(argv=None):
"""
:desc: Print command line arguments for uniaxially strained graphene and use with QMC software located at https://code.delmaestro.org
"""
if argv is None:
argv = sys.argv
parser = crea... | 48.509434 | 236 | 0.686892 |
e23c850adf3d4c53ba65eb60ae258efc52f8112a | 341 | py | Python | profiles/admin.py | cotebarrientos/4th-milestone-project-your-argentine-shop | 8b098f4a0fea73174b064eacd2b1c53dc1a61bc1 | [
"OLDAP-2.2.1"
] | null | null | null | profiles/admin.py | cotebarrientos/4th-milestone-project-your-argentine-shop | 8b098f4a0fea73174b064eacd2b1c53dc1a61bc1 | [
"OLDAP-2.2.1"
] | 2 | 2021-04-27T16:04:31.000Z | 2021-05-04T22:02:26.000Z | profiles/admin.py | cotebarrientos/4th-milestone-project-your-argentine-shop | 8b098f4a0fea73174b064eacd2b1c53dc1a61bc1 | [
"OLDAP-2.2.1"
] | 1 | 2021-06-22T19:50:03.000Z | 2021-06-22T19:50:03.000Z | from django.contrib import admin
from .models import UserProfile
admin.site.register(UserProfile, ProfileAdmin)
| 22.733333 | 63 | 0.680352 |
e23e5edeb769867120d432db8d1a63dd68cde4ce | 15,509 | py | Python | django_flex_user/models/user.py | ebenh/django-flex-user | efffb21e4ce33d2ea8665756334e2a391f4b5a72 | [
"MIT"
] | 1 | 2021-09-13T20:26:02.000Z | 2021-09-13T20:26:02.000Z | django_flex_user/models/user.py | ebenh/django-flex-user | efffb21e4ce33d2ea8665756334e2a391f4b5a72 | [
"MIT"
] | null | null | null | django_flex_user/models/user.py | ebenh/django-flex-user | efffb21e4ce33d2ea8665756334e2a391f4b5a72 | [
"MIT"
] | null | null | null | from django.db import models
from django.db.models.signals import pre_save, post_save
from django.dispatch import receiver
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
from django.contrib.auth.models import PermissionsMixin
from django.utils import timezone
from django.utils.translation i... | 43.687324 | 120 | 0.649945 |
e240f8d4c7d37f70aa462fa6abf5e545e2313227 | 40 | py | Python | wiki_search/dataset/__init__.py | WikiMegrez/wikisearch | 89dcd07962bacf0dc3cce55bf529b8af44e8150e | [
"Apache-2.0"
] | null | null | null | wiki_search/dataset/__init__.py | WikiMegrez/wikisearch | 89dcd07962bacf0dc3cce55bf529b8af44e8150e | [
"Apache-2.0"
] | null | null | null | wiki_search/dataset/__init__.py | WikiMegrez/wikisearch | 89dcd07962bacf0dc3cce55bf529b8af44e8150e | [
"Apache-2.0"
] | null | null | null | from .dataset import Dataset, Document
| 13.333333 | 38 | 0.8 |
e242645796e590100e62540f3f46eef329d4fb8e | 29,332 | py | Python | MedTAG_Dockerized/MedTAG_sket_dock_App/utils_upload_files.py | MedTAG/medtag-core | f2dae7b38230179d71babede7e4910631d91053f | [
"MIT"
] | 6 | 2021-12-20T12:15:17.000Z | 2022-02-02T15:28:42.000Z | MedTAG_Dockerized/MedTAG_sket_dock_App/utils_upload_files.py | MedTAG/medtag-core | f2dae7b38230179d71babede7e4910631d91053f | [
"MIT"
] | 1 | 2022-03-07T14:57:44.000Z | 2022-03-11T18:11:55.000Z | MedTAG_Dockerized/MedTAG_sket_dock_App/utils_upload_files.py | MedTAG/medtag-core | f2dae7b38230179d71babede7e4910631d91053f | [
"MIT"
] | 2 | 2021-05-29T09:44:38.000Z | 2021-12-28T03:53:40.000Z | import psycopg2
import re
import json
from MedTAG_sket_dock_App.models import *
import os
import pandas as pd
import numpy
from psycopg2.extensions import register_adapter, AsIs
register_adapter(numpy.float64, addapt_numpy_float64)
register_adapter(numpy.int64, addapt_numpy_int64)
from django.db.models import Count
fro... | 68.055684 | 245 | 0.420496 |
e243469fdf4c02806f27f1c408cf2cf6e88ea291 | 1,159 | py | Python | main.py | yang-233/mmsa | eed7b943746041b735d8a7af8d60b6457f0284f6 | [
"MIT"
] | 1 | 2021-04-20T07:03:50.000Z | 2021-04-20T07:03:50.000Z | main.py | yang-233/mmsa | eed7b943746041b735d8a7af8d60b6457f0284f6 | [
"MIT"
] | null | null | null | main.py | yang-233/mmsa | eed7b943746041b735d8a7af8d60b6457f0284f6 | [
"MIT"
] | null | null | null | import sys
sys.path.append("/home/ly/workspace/mmsa")
seed = 1938
import numpy as np
import torch
from torch import nn
from torch import optim
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
torch.cuda.manual_seed_all(seed)
from models.bigru_rcnn_gate import *
from utils.train import *
from t... | 25.755556 | 102 | 0.707506 |
e243f2fb56034af4479821d1bde3670f31edfe71 | 2,113 | py | Python | back-end/www/model/timeception/core/const.py | yenchiah/deep-smoke-machine | 5f779f723a3c891145db43663c8825f9ab55dc74 | [
"BSD-3-Clause"
] | 88 | 2019-05-29T07:38:45.000Z | 2022-03-17T01:50:50.000Z | back-end/www/model/timeception/core/const.py | yenchiah/deep-smoke-machine | 5f779f723a3c891145db43663c8825f9ab55dc74 | [
"BSD-3-Clause"
] | 6 | 2019-05-30T08:47:07.000Z | 2021-09-01T07:45:54.000Z | back-end/www/model/timeception/core/const.py | yenchiah/deep-smoke-machine | 5f779f723a3c891145db43663c8825f9ab55dc74 | [
"BSD-3-Clause"
] | 22 | 2019-06-17T01:15:35.000Z | 2021-11-17T10:29:00.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
########################################################################
# GNU General Public License v3.0
# GNU GPLv3
# Copyright (c) 2019, Noureldien Hussein
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General ... | 39.867925 | 128 | 0.682915 |
e245ba7d684d92f61958b015b54789b09a890e6e | 262 | py | Python | Exercicios/ex012.py | KaioPlandel/Estudos-Python-3 | 21c3dfb73b9ef0420eac093434050e4aff8fd61e | [
"MIT"
] | null | null | null | Exercicios/ex012.py | KaioPlandel/Estudos-Python-3 | 21c3dfb73b9ef0420eac093434050e4aff8fd61e | [
"MIT"
] | null | null | null | Exercicios/ex012.py | KaioPlandel/Estudos-Python-3 | 21c3dfb73b9ef0420eac093434050e4aff8fd61e | [
"MIT"
] | null | null | null | #mostre quando a pessoa vai pagar com o desconto de 5%
preco = float(input('Digite o Preo do Produto R$: '))
desconto = preco * 0.05
print(f'O preo do Produto de R${preco:.2f} com o Desconto de R${desconto:.2f} \nO Total vai ficar R$:{preco - desconto:.2f}') | 65.5 | 128 | 0.698473 |
e246ae17b63ba59e1c28d476250fb493117de794 | 20,534 | py | Python | shahryar_webscrapping_nlp2_WebCrawling.py | ShahryarZaidi/Web-Crawler-and-NLP- | 2dfaecfc20c4ab4a711a633c088113671ffc3a89 | [
"Apache-2.0"
] | null | null | null | shahryar_webscrapping_nlp2_WebCrawling.py | ShahryarZaidi/Web-Crawler-and-NLP- | 2dfaecfc20c4ab4a711a633c088113671ffc3a89 | [
"Apache-2.0"
] | null | null | null | shahryar_webscrapping_nlp2_WebCrawling.py | ShahryarZaidi/Web-Crawler-and-NLP- | 2dfaecfc20c4ab4a711a633c088113671ffc3a89 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[65]:
from sklearn.feature_extraction.text import CountVectorizer,TfidfVectorizer
from sklearn.naive_bayes import BernoulliNB, MultinomialNB
from sklearn import metrics
from sklearn.metrics import roc_auc_score, accuracy_score
import requests
from bs4 import BeautifulSoup
im... | 22.739756 | 177 | 0.665774 |
e2482cad6890fd01ea34b60d91d3b693d1873e07 | 5,808 | py | Python | src/model_generation/modeling.py | klingj3/subreddit_suggestor | 632a8bb59939978c19bbe5a6974ea3697a8dfedb | [
"MIT"
] | 8 | 2020-04-26T02:14:53.000Z | 2020-05-03T05:51:08.000Z | src/model_generation/modeling.py | klingj3/subreddit_suggestor | 632a8bb59939978c19bbe5a6974ea3697a8dfedb | [
"MIT"
] | 2 | 2021-08-25T16:04:27.000Z | 2022-02-10T01:45:46.000Z | src/model_generation/modeling.py | klingj3/subreddit_suggestor | 632a8bb59939978c19bbe5a6974ea3697a8dfedb | [
"MIT"
] | null | null | null | import json
import numpy as np
import os
import tensorflow as tf
from keras.models import Sequential
from keras.layers import Dense, Dropout, Embedding, Flatten, Activation, BatchNormalization
from sklearn.model_selection import train_test_split
if __name__ == '__main__':
import os
os.chdir('..')
modele... | 43.343284 | 110 | 0.635158 |
e24c0ec2c106545bbb10756e5231705f8b4872ad | 203 | py | Python | Curso_em_video/Mundo_1/exercicios/ex012.py | TCGamer123/python | 82ad1f84b52d6cc7253fb4c5522ae8389824930a | [
"MIT"
] | 1 | 2022-03-08T13:29:59.000Z | 2022-03-08T13:29:59.000Z | Curso_em_video/Mundo_1/exercicios/ex012.py | TCGamer123/python | 82ad1f84b52d6cc7253fb4c5522ae8389824930a | [
"MIT"
] | null | null | null | Curso_em_video/Mundo_1/exercicios/ex012.py | TCGamer123/python | 82ad1f84b52d6cc7253fb4c5522ae8389824930a | [
"MIT"
] | null | null | null | preo = float(input('Digite o preo do produto: R$'))
d = preo * 0.05
vD = preo - d
print('Valor original R${:.2f}, desconto de 5% igual R${:.2f}, seu novo preo R${:.2f}'.format(preo, d, vD)) | 33.833333 | 115 | 0.62069 |
e24d2099347f041d5db988601fd20a61d4cec847 | 3,282 | py | Python | service/licensing.py | profesormig/quimica3a | a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4 | [
"BSD-3-Clause"
] | null | null | null | service/licensing.py | profesormig/quimica3a | a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4 | [
"BSD-3-Clause"
] | null | null | null | service/licensing.py | profesormig/quimica3a | a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4 | [
"BSD-3-Clause"
] | null | null | null | """
Logic related to License, PatternMatch, etc. for atmosphere.
"""
from django.core.validators import URLValidator
from django.core.exceptions import ValidationError
from core.models.license import License, LicenseType
from core.models.match import PatternMatch, MatchType
from core.models.identity import Identit... | 28.53913 | 85 | 0.681597 |
e24dbdf6d703b006001d5a126067e866e809fe94 | 73 | py | Python | articles/imp/genfigs/tuning.py | parrt/stratx | c190ecc32ac7b8dd3f5532a5d5b0de34a3693a22 | [
"MIT"
] | 54 | 2019-07-17T04:59:39.000Z | 2022-03-18T15:25:00.000Z | articles/imp/genfigs/tuning.py | parrt/stratx | c190ecc32ac7b8dd3f5532a5d5b0de34a3693a22 | [
"MIT"
] | 5 | 2019-07-27T16:18:37.000Z | 2020-12-02T20:16:49.000Z | articles/imp/genfigs/tuning.py | parrt/stratx | c190ecc32ac7b8dd3f5532a5d5b0de34a3693a22 | [
"MIT"
] | 13 | 2019-08-08T22:17:50.000Z | 2022-02-11T10:19:23.000Z | import support
support.tune_all(pairs_to_tune=support.pairs, verbose=1)
| 18.25 | 56 | 0.835616 |
e24dc2e412714a0bc17cc1fafa7639e2e6028663 | 11,524 | py | Python | reliefparser/models/pointer_net.py | XuezheMax/ReLiefParser | 4ffb2495002809de70809689b84d80d2a59cd2ac | [
"MIT"
] | 6 | 2016-11-02T20:28:01.000Z | 2018-06-25T03:37:25.000Z | reliefparser/models/pointer_net.py | XuezheMax/ReLiefParser | 4ffb2495002809de70809689b84d80d2a59cd2ac | [
"MIT"
] | null | null | null | reliefparser/models/pointer_net.py | XuezheMax/ReLiefParser | 4ffb2495002809de70809689b84d80d2a59cd2ac | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
from encoder import Encoder
from decoder import Decoder, TreeDecoder
import bisect
from time import time
#### test script
if __name__ == '__main__':
# hyper-parameters
vsize = 1000
esize = 256
hsize = 256
asize = 256
isize = 333
buckets = [10]#,... | 41.453237 | 132 | 0.596234 |
e24ed43a11e8467a1fca0b6860db937ea540c6a5 | 7,695 | py | Python | perceiver_io/flow_perceiver.py | JOBR0/PerceiverIO_Pytorch | 64947cfd998571c89d48e95e482ce50c43cbe2d9 | [
"Apache-2.0"
] | 2 | 2022-02-15T08:11:07.000Z | 2022-02-25T19:48:07.000Z | perceiver_io/flow_perceiver.py | JOBR0/PerceiverIO_Pytorch | 64947cfd998571c89d48e95e482ce50c43cbe2d9 | [
"Apache-2.0"
] | null | null | null | perceiver_io/flow_perceiver.py | JOBR0/PerceiverIO_Pytorch | 64947cfd998571c89d48e95e482ce50c43cbe2d9 | [
"Apache-2.0"
] | null | null | null | import itertools
from typing import Sequence
import torch.nn as nn
import torch
from perceiver_io.io_processors.preprocessors import ImagePreprocessor
from perceiver_io.io_processors.processor_utils import patches_for_flow
from perceiver_io.output_queries import FlowQuery
from perceiver_io.perceiver import PerceiverI... | 38.475 | 114 | 0.617024 |
e25019f223c74f6ce84bf87834f9d201b41fe7b3 | 489 | bzl | Python | third_party/commons_fileupload.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | third_party/commons_fileupload.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | third_party/commons_fileupload.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | load(":import_external.bzl", import_external = "import_external")
| 37.615385 | 93 | 0.713701 |
e250f528fd76634c6baafa2a9c6f0344b23f0a5b | 8,654 | py | Python | old/old/model_tests.py | avigad/boole | 2a436c2967dbc968f6a5877c220b9757c3bc17c3 | [
"Apache-2.0"
] | 16 | 2015-01-01T18:21:35.000Z | 2021-11-20T00:39:25.000Z | old/old/model_tests.py | avigad/boole | 2a436c2967dbc968f6a5877c220b9757c3bc17c3 | [
"Apache-2.0"
] | null | null | null | old/old/model_tests.py | avigad/boole | 2a436c2967dbc968f6a5877c220b9757c3bc17c3 | [
"Apache-2.0"
] | 1 | 2021-05-14T11:12:31.000Z | 2021-05-14T11:12:31.000Z | ##################################################
#
# Tests for model.py
#
#
#
#
#
#
#
#
#
#
#
##################################################
from boole.core.model import *
from boole.core.language import clear_default_language
from nose.tools import *
| 38.633929 | 92 | 0.555119 |
e2519328f39cccd9a36d2bf001e0ce801bf7f290 | 3,739 | py | Python | sniffer.py | meecash/rf4ce-tools | 0f3d11bc14c3fb099c45a54edab2d525672432d5 | [
"MIT"
] | null | null | null | sniffer.py | meecash/rf4ce-tools | 0f3d11bc14c3fb099c45a54edab2d525672432d5 | [
"MIT"
] | null | null | null | sniffer.py | meecash/rf4ce-tools | 0f3d11bc14c3fb099c45a54edab2d525672432d5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Sniffs RF4CE packets. Supports encryption.
"""
from __future__ import (absolute_import,
print_function, unicode_literals)
from builtins import *
import argparse
from datetime import datetime
import binascii
from rf4ce import Dot15d4FCS, Dot15... | 26.899281 | 85 | 0.693768 |
e257f22d28c17b249ec2d577cdbb9be878a8be8b | 213 | py | Python | plugins/plot/__init__.py | DeStream-dev/electrum-destream | 18bcaadaea65ff2fb0333787111d8e0ddf81a3d8 | [
"MIT"
] | 26 | 2017-06-09T04:13:13.000Z | 2021-11-15T11:35:30.000Z | plugins/plot/__init__.py | DeStream-dev/electrum-destream | 18bcaadaea65ff2fb0333787111d8e0ddf81a3d8 | [
"MIT"
] | 29 | 2017-05-07T05:08:06.000Z | 2021-02-19T13:15:03.000Z | plugins/plot/__init__.py | DeStream-dev/electrum-destream | 18bcaadaea65ff2fb0333787111d8e0ddf81a3d8 | [
"MIT"
] | 21 | 2017-05-31T14:24:20.000Z | 2021-01-30T17:35:43.000Z | # from electrum_stratis.i18n import _
# fullname = 'Plot History'
# description = _("Ability to plot transaction history in graphical mode.")
# requires = [('matplotlib', 'matplotlib')]
# available_for = ['qt']
| 30.428571 | 75 | 0.70892 |
e2590978c70875453f6ec382067fe3808d7c2f53 | 2,600 | py | Python | setup.py | mrsantos321/customhead | bb70867afc34abe7a2ef76bb0f92c08d7ff38214 | [
"MIT"
] | 3 | 2019-10-08T06:02:23.000Z | 2020-01-22T09:14:35.000Z | setup.py | mrsantos321/cushead | bb70867afc34abe7a2ef76bb0f92c08d7ff38214 | [
"MIT"
] | 297 | 2019-08-22T19:45:23.000Z | 2022-03-26T02:30:25.000Z | setup.py | mrsantos321/cushead | bb70867afc34abe7a2ef76bb0f92c08d7ff38214 | [
"MIT"
] | 5 | 2019-09-25T02:35:04.000Z | 2021-03-31T04:23:47.000Z | #!/usr/bin/env python3
"""
Host the setup function.
"""
import pathlib
import setuptools
from cushead import info
def setup() -> None:
"""
Execute the setup.
"""
assets_path = pathlib.Path(info.PACKAGE_NAME) / "console" / "assets" / "images"
templates_path = pathlib.Path(info.PACKAGE_NAME) / "ge... | 37.681159 | 136 | 0.602692 |
e259758863b658de0af08d2a0152919880996008 | 414 | py | Python | firmware/camera.py | iasapomeavoc1/bike-computer | f1a2a0752bc0e4e745e104ab7f7bf27741d00ebe | [
"MIT"
] | null | null | null | firmware/camera.py | iasapomeavoc1/bike-computer | f1a2a0752bc0e4e745e104ab7f7bf27741d00ebe | [
"MIT"
] | 3 | 2021-06-08T22:38:16.000Z | 2022-01-13T03:28:03.000Z | firmware/camera.py | iasapomeavoc1/bike-computer | f1a2a0752bc0e4e745e104ab7f7bf27741d00ebe | [
"MIT"
] | null | null | null | #!~/bike-computer/.venv/bin python
import picamera
import datetime
path = '/home/pi/bike-computer/data/'
with picamera.PiCamera(resolution=(1640,1232),framerate=30) as camera:
try:
while True:
#start_time = datetime.datetime.now().timestamp()
for filename in camera.record_sequence(path+'%d.h264' % i for... | 24.352941 | 86 | 0.707729 |
e25abae44cf8de38d1a836f6f244ba6f1798442d | 2,687 | py | Python | tests/test_chars_duplicates.py | xv44586/pdfplumber | a20d4d1eea522753717ea09f30527efa519b6a91 | [
"MIT"
] | null | null | null | tests/test_chars_duplicates.py | xv44586/pdfplumber | a20d4d1eea522753717ea09f30527efa519b6a91 | [
"MIT"
] | null | null | null | tests/test_chars_duplicates.py | xv44586/pdfplumber | a20d4d1eea522753717ea09f30527efa519b6a91 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import unittest
import pytest
import sys, os
import logging
import pdfplumber
from pdfplumber import table
from pdfplumber.utils import Decimal
logging.disable(logging.ERROR)
HERE = os.path.abspath(os.path.dirname(__file__))
| 38.385714 | 107 | 0.696316 |
e25cea03950fb0b1dd153a0a8cd9fe1c0925b105 | 546 | py | Python | project_1_1/src/model.py | jonassoebro/Deep-Learning-in-Computer-Vision | 3167ee9a4c433bf4491194e334b5c14de972c7cf | [
"MIT"
] | null | null | null | project_1_1/src/model.py | jonassoebro/Deep-Learning-in-Computer-Vision | 3167ee9a4c433bf4491194e334b5c14de972c7cf | [
"MIT"
] | null | null | null | project_1_1/src/model.py | jonassoebro/Deep-Learning-in-Computer-Vision | 3167ee9a4c433bf4491194e334b5c14de972c7cf | [
"MIT"
] | 1 | 2021-06-08T09:28:01.000Z | 2021-06-08T09:28:01.000Z | import torchvision.models as models
from torch.nn import Module, Sequential, Linear
| 32.117647 | 95 | 0.648352 |
e25d5a2f9fb54ae920deb8742f67c3b04abb5bc0 | 17,625 | py | Python | load_data.py | UrbanInstitute/nccs-public | fcf45aa51f39645049ab8bee244f5971bc7beed9 | [
"MIT"
] | 7 | 2019-01-22T19:22:01.000Z | 2022-03-02T22:18:58.000Z | load_data.py | UrbanInstitute/nccs-public | fcf45aa51f39645049ab8bee244f5971bc7beed9 | [
"MIT"
] | 1 | 2021-07-20T04:17:50.000Z | 2022-03-02T22:23:43.000Z | load_data.py | UrbanInstitute/nccs-public | fcf45aa51f39645049ab8bee244f5971bc7beed9 | [
"MIT"
] | null | null | null | import os, sys
import re
import zipfile
import requests
import warnings
import logging
import pandas as pd
import numpy as np
from stat import S_IREAD, S_IRGRP, S_IROTH
import getpass
import pymysql
# Code by Jeff Levy (jlevy@urban.org), 2016-2017
| 43.41133 | 146 | 0.583603 |
e25d9a100686e9143d42ae75160f3586fc25f217 | 2,737 | py | Python | functions/finalize-lambda/finalize.py | aws-samples/aws-elemental-mediaconvert-visual-narrations | 5820b259b69ea6d65da533306fa6ba04e38804b7 | [
"MIT-0"
] | 4 | 2021-12-18T17:20:04.000Z | 2021-12-29T05:07:20.000Z | functions/finalize-lambda/finalize.py | giusedroid/aws-elemental-mediaconvert-visual-narrations | 5820b259b69ea6d65da533306fa6ba04e38804b7 | [
"MIT-0"
] | 1 | 2022-02-15T02:51:38.000Z | 2022-02-15T02:51:38.000Z | functions/finalize-lambda/finalize.py | giusedroid/aws-elemental-mediaconvert-visual-narrations | 5820b259b69ea6d65da533306fa6ba04e38804b7 | [
"MIT-0"
] | 1 | 2021-12-20T16:17:58.000Z | 2021-12-20T16:17:58.000Z | import boto3
import os
import json
from botocore.exceptions import ClientError
try:
POLLY_METADATA_STORE = os.environ['POLLY_METADATA_STORE']
except KeyError as e:
print(f"Missing env variable: {e}")
exit(1)
dynamo = boto3.resource("dynamodb")
polly_metadata_store = dynamo.Table(POLLY_METADATA_STORE)
| 28.510417 | 110 | 0.648886 |
e25e27a47f5510c4ab4d334a3f28637aba126e3c | 888 | py | Python | src/Phidget22/Encoding.py | MikaSoftware/mikathing | 60621b01e2fcbeefe2181a58fb0f6104115d1ae6 | [
"BSD-3-Clause"
] | 1 | 2021-11-23T09:02:46.000Z | 2021-11-23T09:02:46.000Z | Phidget22/Encoding.py | keysie/phidget-python-interface | ebf392fe6d8d25bd5c178edbf095cf29e0daa4af | [
"MIT"
] | null | null | null | Phidget22/Encoding.py | keysie/phidget-python-interface | ebf392fe6d8d25bd5c178edbf095cf29e0daa4af | [
"MIT"
] | 1 | 2020-02-26T12:43:12.000Z | 2020-02-26T12:43:12.000Z | import sys
import ctypes
| 27.75 | 47 | 0.748874 |
e25eae1d244a1b206707499e17ed96145b02e14d | 13,525 | py | Python | PedSimulation/gui/panel.py | HDL951236874/PedSimulation | 153882289477c93306c38f9e3a41f9cfeb53f261 | [
"Apache-2.0"
] | 1 | 2018-08-15T17:42:58.000Z | 2018-08-15T17:42:58.000Z | PedSimulation/gui/panel.py | HDL951236874/PedSimulation | 153882289477c93306c38f9e3a41f9cfeb53f261 | [
"Apache-2.0"
] | null | null | null | PedSimulation/gui/panel.py | HDL951236874/PedSimulation | 153882289477c93306c38f9e3a41f9cfeb53f261 | [
"Apache-2.0"
] | null | null | null | from PedSimulation.scene import *
from PedSimulation.gui.ui.mainwindow_main import Ui_MainWindow_Main
from PedSimulation.gui.ui.mainwindow_setting import Ui_MainWindow_Setting, Dragebutton
from PedSimulation.gui.drawer.drawer_register import SceneDrawerRegister
from PyQt5 import QtCore
from PyQt5.QtWidgets import QDesk... | 38.976945 | 142 | 0.624473 |
e2609871df4431162077f02f9f954e5270a79a11 | 1,608 | py | Python | emLam/corpus/component.py | DavidNemeskey/emLam | 89359e7eee5b7b9c596dec8ab6654591d4039e3e | [
"MIT"
] | 2 | 2018-03-31T10:00:11.000Z | 2018-09-15T19:38:19.000Z | emLam/corpus/component.py | DavidNemeskey/emLam | 89359e7eee5b7b9c596dec8ab6654591d4039e3e | [
"MIT"
] | 16 | 2017-02-28T13:58:28.000Z | 2018-03-14T11:42:01.000Z | emLam/corpus/component.py | dlt-rilmta/emLam | 2b7274dcda4080445698e10b34a3db2e2eed5112 | [
"MIT"
] | 1 | 2017-01-30T15:06:37.000Z | 2017-01-30T15:06:37.000Z | #!/usr/bin/env python3
"""An instantiable component. See the docstring for the class."""
from __future__ import absolute_import, division, print_function
from future.utils import with_metaclass
import logging
import inspect
| 35.733333 | 97 | 0.69403 |
e261e4b60cdb7a70713d7103ceda512e5e2a1812 | 2,288 | py | Python | kws/bin/export_onnx.py | ishine/wenet-kws | 7d142b952850416c4244d235a42b04fa4fc56952 | [
"Apache-2.0"
] | 81 | 2021-05-22T17:21:05.000Z | 2021-11-28T06:56:01.000Z | kws/bin/export_onnx.py | ishine/wenet-kws | 7d142b952850416c4244d235a42b04fa4fc56952 | [
"Apache-2.0"
] | 16 | 2021-11-30T08:56:15.000Z | 2022-03-23T03:17:28.000Z | kws/bin/export_onnx.py | ishine/wenet-kws | 7d142b952850416c4244d235a42b04fa4fc56952 | [
"Apache-2.0"
] | 31 | 2021-12-06T04:52:32.000Z | 2022-03-22T08:28:13.000Z | # Copyright (c) 2021 Binbin Zhang(binbzha@qq.com)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 34.666667 | 74 | 0.628934 |
e2658afba23005465bd6d4798e3cbe737e1308a6 | 5,711 | py | Python | omtk/core/className.py | renaudll/omtk | a7740d53a5587529773594bfd7c37e553787028f | [
"MIT"
] | 20 | 2015-09-30T16:07:02.000Z | 2022-03-12T06:57:59.000Z | omtk/core/className.py | nilouco/omtk | a7740d53a5587529773594bfd7c37e553787028f | [
"MIT"
] | 23 | 2015-12-22T15:41:02.000Z | 2018-04-13T02:52:41.000Z | omtk/core/className.py | nilouco/omtk | a7740d53a5587529773594bfd7c37e553787028f | [
"MIT"
] | 13 | 2015-07-10T16:06:26.000Z | 2021-08-21T20:09:41.000Z | from maya import cmds
import copy
# TODO: Find a way to have different naming for different production.
# Maybe handle it in the rig directly?
| 26.686916 | 86 | 0.57468 |
e2662d51f3f0f8d10ecce13084f3868fbba37200 | 2,185 | py | Python | qcp/algorithms/abstract_algorithm.py | RiddhiYadav/https-github.com-Tiernan8r-quantum_computing_project | 904896171895faf3613e9b8d64165a35c36f519e | [
"Apache-2.0"
] | null | null | null | qcp/algorithms/abstract_algorithm.py | RiddhiYadav/https-github.com-Tiernan8r-quantum_computing_project | 904896171895faf3613e9b8d64165a35c36f519e | [
"Apache-2.0"
] | null | null | null | qcp/algorithms/abstract_algorithm.py | RiddhiYadav/https-github.com-Tiernan8r-quantum_computing_project | 904896171895faf3613e9b8d64165a35c36f519e | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Tiernan8r
#
# 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, so... | 28.75 | 74 | 0.639359 |
e2676954f761940a1207f34851f49d36c66d622a | 2,090 | py | Python | code/tests/core/test_train_utils.py | ashesh-0/MultiZoomGaze | 24494a1346d09e21e4b6d999a742b5d31bbbeff0 | [
"MIT"
] | 1 | 2022-01-24T04:53:00.000Z | 2022-01-24T04:53:00.000Z | code/tests/core/test_train_utils.py | ashesh-0/MultiZoomGaze | 24494a1346d09e21e4b6d999a742b5d31bbbeff0 | [
"MIT"
] | null | null | null | code/tests/core/test_train_utils.py | ashesh-0/MultiZoomGaze | 24494a1346d09e21e4b6d999a742b5d31bbbeff0 | [
"MIT"
] | null | null | null | import math
import numpy as np
import torch
from mock import patch
from core.train_utils import compute_angular_error, compute_angular_error_xyz_arr, spherical2cartesial
| 24.022989 | 102 | 0.488038 |
e26904d170e4e8c6e1dcb9ac5ffac8b016dc97a4 | 732 | py | Python | scripts/serializers.py | sul-cidr/scriptchart-backend | 38bb4139d77d683d85f31839a1a06096fe2fabbc | [
"MIT"
] | 1 | 2019-06-05T23:05:32.000Z | 2019-06-05T23:05:32.000Z | scripts/serializers.py | sul-cidr/scriptchart-backend | 38bb4139d77d683d85f31839a1a06096fe2fabbc | [
"MIT"
] | 42 | 2019-01-24T23:51:42.000Z | 2021-09-08T01:04:45.000Z | scripts/serializers.py | sul-cidr/scriptchart-backend | 38bb4139d77d683d85f31839a1a06096fe2fabbc | [
"MIT"
] | 1 | 2019-08-05T12:47:57.000Z | 2019-08-05T12:47:57.000Z | from rest_framework import serializers
from scripts.models import Manuscript
from scripts.models import Page
from scripts.models import Coordinates
| 28.153846 | 75 | 0.669399 |
e26b0de3f1cabd89fc29afca7fa65f5643740f6e | 750 | py | Python | test/generators/utils.py | yanqd0/LeetCode | 8c669b954f4e4ae5e31a14727bf4ceedc58ea363 | [
"MIT"
] | null | null | null | test/generators/utils.py | yanqd0/LeetCode | 8c669b954f4e4ae5e31a14727bf4ceedc58ea363 | [
"MIT"
] | 3 | 2019-08-29T02:33:12.000Z | 2019-08-29T02:34:23.000Z | test/generators/utils.py | yanqd0/LeetCode | 8c669b954f4e4ae5e31a14727bf4ceedc58ea363 | [
"MIT"
] | null | null | null | import csv
import re
from os import makedirs
from os.path import abspath, basename, dirname, isdir, join
| 31.25 | 77 | 0.669333 |
e26bcea95043f4e93feb6b1f624c1b506a9ab48a | 8,196 | py | Python | fig/backends/aws/__init__.py | LaudateCorpus1/falcon-integration-gateway | 5575c014d8315e0a7480f985d6e3e238ea7e1f61 | [
"Unlicense"
] | 10 | 2021-04-02T02:45:07.000Z | 2021-12-17T19:03:10.000Z | fig/backends/aws/__init__.py | LaudateCorpus1/falcon-integration-gateway | 5575c014d8315e0a7480f985d6e3e238ea7e1f61 | [
"Unlicense"
] | 50 | 2021-03-19T14:30:43.000Z | 2022-03-22T21:07:29.000Z | fig/backends/aws/__init__.py | LaudateCorpus1/falcon-integration-gateway | 5575c014d8315e0a7480f985d6e3e238ea7e1f61 | [
"Unlicense"
] | 11 | 2021-03-19T11:36:21.000Z | 2022-03-22T23:33:13.000Z | from datetime import datetime
import traceback
import boto3
from botocore.exceptions import ClientError
from ...config import config
from ...log import log
__all__ = ['Runtime']
| 44.064516 | 130 | 0.578575 |
e26c1de61513b9dd04386c2769fcd9c9212d69dd | 19,754 | py | Python | src/plugin.py | saitho/galaxy_blizzard_plugin | 9716c44e9db261d85baddc019d3f9e5eb1f28cf7 | [
"MIT"
] | null | null | null | src/plugin.py | saitho/galaxy_blizzard_plugin | 9716c44e9db261d85baddc019d3f9e5eb1f28cf7 | [
"MIT"
] | null | null | null | src/plugin.py | saitho/galaxy_blizzard_plugin | 9716c44e9db261d85baddc019d3f9e5eb1f28cf7 | [
"MIT"
] | null | null | null | import asyncio
import json
import os
import sys
import multiprocessing
import webbrowser
import requests
import requests.cookies
import logging as log
import subprocess
import time
from galaxy.api.consts import LocalGameState, Platform
from galaxy.api.plugin import Plugin, create_and_run_plugin
from galaxy.api.types ... | 42.665227 | 136 | 0.621849 |
e26f9851f519998d86c2d83b72b1bb841fd008d3 | 649 | py | Python | buyer/tests/test_serializers.py | uktrade/directory-api | 45a9024a7ecc2842895201cbb51420ba9e57a168 | [
"MIT"
] | 2 | 2017-06-02T09:09:08.000Z | 2021-01-18T10:26:53.000Z | buyer/tests/test_serializers.py | konradko/directory-api | e9cd05b1deaf575e94352c46ddbd1857d8119fda | [
"MIT"
] | 629 | 2016-10-10T09:35:52.000Z | 2022-03-25T15:04:04.000Z | buyer/tests/test_serializers.py | konradko/directory-api | e9cd05b1deaf575e94352c46ddbd1857d8119fda | [
"MIT"
] | 5 | 2017-06-22T10:02:22.000Z | 2022-03-14T17:55:21.000Z | import pytest
from buyer import serializers
| 25.96 | 56 | 0.651772 |
e27110053843a24a09a5e561022d265c1c30eb63 | 637 | py | Python | moai/utils/arguments/__init__.py | tzole1155/moai | d1afb3aaf8ddcd7a1c98b84d6365afb846ae3180 | [
"Apache-2.0"
] | null | null | null | moai/utils/arguments/__init__.py | tzole1155/moai | d1afb3aaf8ddcd7a1c98b84d6365afb846ae3180 | [
"Apache-2.0"
] | null | null | null | moai/utils/arguments/__init__.py | tzole1155/moai | d1afb3aaf8ddcd7a1c98b84d6365afb846ae3180 | [
"Apache-2.0"
] | null | null | null | from moai.utils.arguments.common import (
assert_numeric,
assert_non_negative,
assert_negative,
)
from moai.utils.arguments.choices import (
assert_choices,
ensure_choices,
)
from moai.utils.arguments.list import (
ensure_numeric_list,
ensure_string_list,
assert_sequence_size,
)
from moa... | 20.548387 | 42 | 0.706436 |
e272629bf1764e47dd0429ebae5dabad29cdb7f2 | 1,258 | py | Python | tools/harness/tests/aos_tests.py | Frankie8472/advanced-operating-systems | bff03e668c76886781e5fdb24dfab5880f79941d | [
"MIT"
] | 5 | 2020-06-12T11:47:21.000Z | 2022-02-27T14:39:05.000Z | tools/harness/tests/aos_tests.py | Frankie8472/advanced-operating-systems | bff03e668c76886781e5fdb24dfab5880f79941d | [
"MIT"
] | 3 | 2020-06-04T20:11:26.000Z | 2020-07-26T23:16:33.000Z | tools/harness/tests/aos_tests.py | Frankie8472/advanced-operating-systems | bff03e668c76886781e5fdb24dfab5880f79941d | [
"MIT"
] | 3 | 2020-06-12T18:06:29.000Z | 2022-03-13T17:19:02.000Z | ##########################################################################
# Copyright (c) 2009, ETH Zurich.
# All rights reserved.
#
# This file is distributed under the terms in the attached LICENSE file.
# If you do not find this file, copies can be found by writing to:
# ETH Zurich D-INFK, Universitaetstrasse 6, CH... | 34.944444 | 80 | 0.59062 |
e2727885961948aa3428682ba096be8e0ec9a20d | 2,243 | py | Python | examples/one_d_test.py | jamesvuc/autograd-mcmc | 0650fb32b6bc0205b2feb09ff7957eca8b696a5b | [
"MIT"
] | null | null | null | examples/one_d_test.py | jamesvuc/autograd-mcmc | 0650fb32b6bc0205b2feb09ff7957eca8b696a5b | [
"MIT"
] | null | null | null | examples/one_d_test.py | jamesvuc/autograd-mcmc | 0650fb32b6bc0205b2feb09ff7957eca8b696a5b | [
"MIT"
] | null | null | null | #1d_tests.py
import autograd.numpy as np
import autograd.scipy.stats.norm as norm
from copy import copy
import datetime as dt
from matplotlib import pyplot as plt
import seaborn as sns
import sys; sys.path.append('..')
from mcmc import langevin, MALA, RK_langevin, RWMH, HMC
if __name__ == '__main__':
main() | 27.024096 | 80 | 0.665181 |
e27404f1e9416d7b05bddb353f28ac49feb953fb | 195 | py | Python | main.py | NawrasseDahman/Qr-Code-Generator | 0f1bb8b0979f887c980cec3a241457176515b1b9 | [
"MIT"
] | 1 | 2021-12-31T07:12:09.000Z | 2021-12-31T07:12:09.000Z | main.py | NawrasseDahman/Qr-Code-Generator | 0f1bb8b0979f887c980cec3a241457176515b1b9 | [
"MIT"
] | null | null | null | main.py | NawrasseDahman/Qr-Code-Generator | 0f1bb8b0979f887c980cec3a241457176515b1b9 | [
"MIT"
] | null | null | null | import qrcode
# data example
data = "www.google.com"
# file name
file_name = "qrcode.png"
# generate qr code
img = qrcode.make(data=data)
# save generated qr code as img
img.save(file_name)
| 13 | 31 | 0.717949 |
e2740d3f04d16f6560cb0b5dc5a3ad68e5d09f12 | 7,845 | py | Python | onecodex/models/helpers.py | onecodex/onecodex | c02da5dcaa43497eb5f8bf62bdc9fb6780f06597 | [
"MIT"
] | 19 | 2016-06-09T03:55:15.000Z | 2021-05-13T11:45:45.000Z | onecodex/models/helpers.py | onecodex/onecodex | c02da5dcaa43497eb5f8bf62bdc9fb6780f06597 | [
"MIT"
] | 336 | 2016-02-01T19:10:15.000Z | 2022-03-30T16:14:36.000Z | onecodex/models/helpers.py | onecodex/onecodex | c02da5dcaa43497eb5f8bf62bdc9fb6780f06597 | [
"MIT"
] | 9 | 2017-07-28T21:03:14.000Z | 2021-02-27T16:30:10.000Z | import click
import inspect
import os
import requests
from onecodex.exceptions import OneCodexException, UnboundObject
| 36.830986 | 99 | 0.589038 |
e275623fdee4109dc56435c825bd183c1bd1b9da | 932 | py | Python | aoc-2021/day-11/day_11.py | bsamseth/advent-of-code-2018 | bdd3969e61fac3f1543c20983260aa9fda912e99 | [
"MIT"
] | 1 | 2021-01-03T17:09:13.000Z | 2021-01-03T17:09:13.000Z | aoc-2021/day-11/day_11.py | bsamseth/advent-of-code-2018 | bdd3969e61fac3f1543c20983260aa9fda912e99 | [
"MIT"
] | 3 | 2021-06-01T23:09:26.000Z | 2022-03-12T01:08:40.000Z | aoc-2021/day-11/day_11.py | bsamseth/advent-of-code | 65d40548057a86b6fda37aec8e7d5d473d627124 | [
"MIT"
] | null | null | null | from itertools import count, product
import numpy as np
grid = np.genfromtxt("input.txt", delimiter=1, dtype=int)
flash_count = 0
for step in count(1):
flash_mask = grid != grid
grid += 1
for i, j in np.ndindex(*grid.shape):
if not flash_mask[i, j] and grid[i, j] > 9:
propagate_flas... | 27.411765 | 71 | 0.553648 |
e27585ce7f82ce155f8b78f9a6d5c4a5e52b8168 | 122 | py | Python | notebooks/_solutions/05-spatial-operations-overlays11.py | jorisvandenbossche/DS-python-geospatial | 893a12edc5c203a75815f6dcb5f1e18c577c8cd5 | [
"BSD-3-Clause"
] | 58 | 2020-10-09T10:10:59.000Z | 2022-03-07T14:58:07.000Z | notebooks/_solutions/05-spatial-operations-overlays11.py | amitkb3/DS-python-geospatial | 5f156ebff67e06d59b2a7ef446d1fed746ce0650 | [
"BSD-3-Clause"
] | 24 | 2020-09-30T19:57:14.000Z | 2021-10-05T07:21:09.000Z | notebooks/_solutions/05-spatial-operations-overlays11.py | amitkb3/DS-python-geospatial | 5f156ebff67e06d59b2a7ef446d1fed746ce0650 | [
"BSD-3-Clause"
] | 19 | 2020-10-05T09:32:18.000Z | 2022-03-20T00:09:14.000Z | # Calculate the intersection of the land use polygons with Muette
land_use_muette = land_use.geometry.intersection(muette) | 61 | 65 | 0.844262 |
e275d33de5c822230fb24286db48967204245526 | 7,754 | py | Python | lib/cbutils/misc.py | civicboom/civicboom | 239cb9c2f1e8afa42ea2736c171e6043b04a7ff0 | [
"MIT"
] | null | null | null | lib/cbutils/misc.py | civicboom/civicboom | 239cb9c2f1e8afa42ea2736c171e6043b04a7ff0 | [
"MIT"
] | null | null | null | lib/cbutils/misc.py | civicboom/civicboom | 239cb9c2f1e8afa42ea2736c171e6043b04a7ff0 | [
"MIT"
] | null | null | null | """
Low level miscilanious calls
"""
import UserDict
import types
import random
import datetime
import pprint
import re
import unicodedata
import logging
log = logging.getLogger(__name__)
now_override = None
def now():
"""
A passthough to get now()
We can override this so that automated tests can fake ... | 29.260377 | 156 | 0.593887 |
e2770fdbc3011a18fb2c25303fdd40f81c8ec0d1 | 6,421 | py | Python | c_comp/nodes.py | Commodoreprime/Command-Block-Assembly | b54c2afee3ea7bdfddfe619b9b207ce30d160e45 | [
"MIT"
] | 223 | 2017-05-10T18:27:44.000Z | 2022-03-06T22:44:18.000Z | c_comp/nodes.py | Commodoreprime/Command-Block-Assembly | b54c2afee3ea7bdfddfe619b9b207ce30d160e45 | [
"MIT"
] | 25 | 2017-12-07T15:37:37.000Z | 2021-02-05T14:28:59.000Z | c_comp/nodes.py | Commodoreprime/Command-Block-Assembly | b54c2afee3ea7bdfddfe619b9b207ce30d160e45 | [
"MIT"
] | 30 | 2017-12-07T15:16:36.000Z | 2022-03-16T03:29:59.000Z |
EmptyStatement.INSTANCE = EmptyStatement()
VarArgs.INSTANCE = VarArgs()
ContinueStmt.INSTANCE = ContinueStmt()
BreakStmt.INSTANCE = BreakStmt()
Token.EOF = Token('<eof>')
Token.OPEN_PAREN = Token('(')
Token.CLOSE_PAREN = Token(')')
Token.OPEN_BRACE = Token('{')
Token.CLOSE_BRACE = Token('}')
Token.OPEN_SQUARE = Toke... | 31.47549 | 86 | 0.634636 |
e277978869ba969473b22353a021df73d2ed4b99 | 1,381 | py | Python | backend/ReceiptProcessor/data_generator.py | shrey-bansal/ABINBEV | 09d0eaca6e7edf1820aa79b88a56d1ed39b6300f | [
"Apache-2.0"
] | 1 | 2020-08-17T01:26:27.000Z | 2020-08-17T01:26:27.000Z | backend/ReceiptProcessor/data_generator.py | shrey-bansal/ABINBEV | 09d0eaca6e7edf1820aa79b88a56d1ed39b6300f | [
"Apache-2.0"
] | 1 | 2020-10-20T01:40:24.000Z | 2020-11-05T17:38:53.000Z | backend/ReceiptProcessor/data_generator.py | shrey-bansal/ABINBEV | 09d0eaca6e7edf1820aa79b88a56d1ed39b6300f | [
"Apache-2.0"
] | 2 | 2021-12-14T16:57:58.000Z | 2021-12-23T11:51:10.000Z | import os
import cv2
from ReceiptGenerator.draw_receipt import create_crnn_sample
NUM_OF_TRAINING_IMAGES = 3000
NUM_OF_TEST_IMAGES = 1000
TEXT_TYPES = ['word', 'word_column', 'word_bracket', 'int', 'float', 'price_left', 'price_right', 'percentage']
# TEXT_TYPES = ['word']
with open('./ReceiptProcessor/training_ima... | 47.62069 | 111 | 0.672701 |
e278e8c7930da117f96d8cb6f36e05b643813f57 | 1,487 | py | Python | src/web/settings.py | iwwxiong/fastapi-box | 3be11a6c0451467c9cac09b9a9c59ad509bb834e | [
"MIT"
] | 8 | 2021-02-24T11:28:57.000Z | 2022-02-11T08:58:39.000Z | src/web/settings.py | iwwxiong/fastapi-box | 3be11a6c0451467c9cac09b9a9c59ad509bb834e | [
"MIT"
] | null | null | null | src/web/settings.py | iwwxiong/fastapi-box | 3be11a6c0451467c9cac09b9a9c59ad509bb834e | [
"MIT"
] | null | null | null | import os
from pydantic import BaseSettings
settings = Settings()
env = os.getenv("FASTAPI_ENV")
print(f"FASTAPI_ENV = {env}")
if env == "development":
from settings_dev import settings as dev_settings
for k, v in dev_settings:
if hasattr(settings, k):
setattr(settings, k, v)
elif en... | 29.74 | 111 | 0.696032 |
e279297fcb080b95532ae07e3e2f6c0eedfa2d13 | 4,867 | py | Python | layint_api/models/alert_events.py | LayeredInsight/layint_api_python | a5c9a5b24098bd823c5102b7ab9e4745432f19b4 | [
"Apache-2.0"
] | null | null | null | layint_api/models/alert_events.py | LayeredInsight/layint_api_python | a5c9a5b24098bd823c5102b7ab9e4745432f19b4 | [
"Apache-2.0"
] | null | null | null | layint_api/models/alert_events.py | LayeredInsight/layint_api_python | a5c9a5b24098bd823c5102b7ab9e4745432f19b4 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Layered Insight Assessment, Compliance, Witness & Control
LI Assessment & Compliance performs static vulnerability analysis, license and package compliance. LI Witness provides deep insight and analytics into containerized applications. Control provides dynamic runtime security and analyti... | 26.741758 | 383 | 0.56729 |
e27a33ff138d20a46d8f453fc5dd0073093d82d3 | 540 | py | Python | htsworkflow/settings/felcat.py | detrout/htsworkflow | 99d3300e2533d79428ad49aaf10b9429b175da2d | [
"BSD-3-Clause"
] | null | null | null | htsworkflow/settings/felcat.py | detrout/htsworkflow | 99d3300e2533d79428ad49aaf10b9429b175da2d | [
"BSD-3-Clause"
] | 1 | 2018-02-26T18:30:05.000Z | 2018-02-26T18:30:05.000Z | htsworkflow/settings/felcat.py | detrout/htsworkflow | 99d3300e2533d79428ad49aaf10b9429b175da2d | [
"BSD-3-Clause"
] | null | null | null | # configure debugging
import os
from .local import *
DEBUG=True
TEMPLATE_DEBUG = True
INTERNAL_IPS = ('127.0.0.1',)
MIDDLEWARE_CLASSES.extend([
#'debug_toolbar.middleware.DebugToolbarMiddleware',
])
DATABASES = {
'fctracker': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '/var/htsworkflo... | 19.285714 | 60 | 0.624074 |
e27d1ce66a0fb5eca31113991113207c943becc1 | 4,343 | py | Python | PROJ/LEVY/Barrier_Options/Script_DoubleBarrierOptions.py | mattslezak-shell/PROJ_Option_Pricing_Matlab | 6105bd00ba3471802180c122fdf81e90833a91c4 | [
"MIT"
] | null | null | null | PROJ/LEVY/Barrier_Options/Script_DoubleBarrierOptions.py | mattslezak-shell/PROJ_Option_Pricing_Matlab | 6105bd00ba3471802180c122fdf81e90833a91c4 | [
"MIT"
] | null | null | null | PROJ/LEVY/Barrier_Options/Script_DoubleBarrierOptions.py | mattslezak-shell/PROJ_Option_Pricing_Matlab | 6105bd00ba3471802180c122fdf81e90833a91c4 | [
"MIT"
] | 1 | 2022-01-07T15:31:45.000Z | 2022-01-07T15:31:45.000Z | # Generated with SMOP 0.41-beta
try:
from smop.libsmop import *
except ImportError:
raise ImportError('File compiled with `smop3`, please install `smop3` to run it.') from None
# Script_DoubleBarrierOptions.m
##################################################################
### DOUBLE BARRIER OPT... | 32.901515 | 97 | 0.53143 |
e27f7aa8f3b09c4a3cfeb2e39b74ae35d8c6e4d4 | 870 | py | Python | instances/migrations/0001_initial.py | glzjin/webvirtcloud | ecaf11e02aeb57654257ed502d3da6fd8405f21b | [
"Apache-2.0"
] | 1 | 2020-11-06T00:50:06.000Z | 2020-11-06T00:50:06.000Z | instances/migrations/0001_initial.py | qmutz/webvirtcloud | 159e06221af435700047a8e5ababe758a12d7579 | [
"Apache-2.0"
] | null | null | null | instances/migrations/0001_initial.py | qmutz/webvirtcloud | 159e06221af435700047a8e5ababe758a12d7579 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.10 on 2020-01-28 07:01
from django.db import migrations, models
import django.db.models.deletion
| 31.071429 | 115 | 0.595402 |
e28018dbe4a52211a237799c1957a41d91902266 | 1,145 | py | Python | GEOS_Util/coupled_diagnostics/g5lib/plots.py | GEOS-ESM/GMAO_Shared | 022af23abbc7883891006b57379be96d9a50df23 | [
"NASA-1.3",
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-02-01T17:36:53.000Z | 2020-02-01T17:36:53.000Z | GEOS_Util/coupled_diagnostics/g5lib/plots.py | GEOS-ESM/GMAO_Shared | 022af23abbc7883891006b57379be96d9a50df23 | [
"NASA-1.3",
"ECL-2.0",
"Apache-2.0"
] | 105 | 2019-07-08T19:27:23.000Z | 2022-03-22T02:12:16.000Z | GEOS_Util/coupled_diagnostics/g5lib/plots.py | GEOS-ESM/GMAO_Shared | 022af23abbc7883891006b57379be96d9a50df23 | [
"NASA-1.3",
"ECL-2.0",
"Apache-2.0"
] | 10 | 2019-07-05T18:00:44.000Z | 2022-03-11T16:26:29.000Z | '''
Different utils used by plotters.
'''
import mpl_toolkits.basemap as bm
import matplotlib.pyplot as pl
from matplotlib import colors, cm
import scipy as sp
# Make spectral plot
# Contour plot
def contour(x,y,z,func=pl.contourf,black=None,**opts):
'''
Adds a "black" functionality to default contour fu... | 27.926829 | 69 | 0.609607 |
e28084f908dc1fcc33c7dd3386b97c41eee47a44 | 23,708 | py | Python | lib/TrainingUtils.py | bo9zbo9z/MachineLearning | eae74837e1c98c44b9a6b2c1c16c019dd1fba069 | [
"MIT"
] | null | null | null | lib/TrainingUtils.py | bo9zbo9z/MachineLearning | eae74837e1c98c44b9a6b2c1c16c019dd1fba069 | [
"MIT"
] | null | null | null | lib/TrainingUtils.py | bo9zbo9z/MachineLearning | eae74837e1c98c44b9a6b2c1c16c019dd1fba069 | [
"MIT"
] | 1 | 2020-06-25T01:48:18.000Z | 2020-06-25T01:48:18.000Z | """
These are various mehtods that can be used in the training process. Some
return values, some display images. Best used in Jupyter Notebooks.
"""
from __future__ import division, print_function, absolute_import
# Use one of these based on the version of skimage loaded
from skimage.util import montage
# from skima... | 37.101721 | 152 | 0.572718 |
e28108106479e557e24126e1a37268ee719ce945 | 1,125 | py | Python | setup.py | shamilbi/lyrebird | 57aa822b456ecbf2a39d40c5c810dd781e3a823e | [
"MIT"
] | null | null | null | setup.py | shamilbi/lyrebird | 57aa822b456ecbf2a39d40c5c810dd781e3a823e | [
"MIT"
] | null | null | null | setup.py | shamilbi/lyrebird | 57aa822b456ecbf2a39d40c5c810dd781e3a823e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Lyrebird Voice Changer
Simple and powerful voice changer for Linux, written in GTK 3
(c) Charlotte 2020
"""
import sys
import re
from setuptools import setup
version_regex = r'__version__ = ["\']([^"\']*)["\']'
with open('app/__init__.py', 'r') as f:
text = f.read()
match = re.search... | 26.162791 | 82 | 0.635556 |
e283e6e707ad35c8a4b77ae151e15d9f613278be | 1,617 | py | Python | silkpy/symbolic/curve/transform.py | jiaxin1996/silkpy | 7720d47b33b731d9e11e67d99c8574514b8f177b | [
"MIT"
] | null | null | null | silkpy/symbolic/curve/transform.py | jiaxin1996/silkpy | 7720d47b33b731d9e11e67d99c8574514b8f177b | [
"MIT"
] | null | null | null | silkpy/symbolic/curve/transform.py | jiaxin1996/silkpy | 7720d47b33b731d9e11e67d99c8574514b8f177b | [
"MIT"
] | null | null | null | from .curve import ParametricCurve as _ParametricCurve
from sympy import Symbol as _Symbol | 49 | 171 | 0.694496 |
e2850c2cd171c65701a7c0ab8f349d8b562b539c | 556 | py | Python | venv/Lib/site-packages/pyroute2/netlink/rtnl/riprsocket.py | kalymgr/Project-T-Cryptocurrencies | 5dbb679a76bcf07b913036e7b44ba4247c39482d | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyroute2/netlink/rtnl/riprsocket.py | kalymgr/Project-T-Cryptocurrencies | 5dbb679a76bcf07b913036e7b44ba4247c39482d | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyroute2/netlink/rtnl/riprsocket.py | kalymgr/Project-T-Cryptocurrencies | 5dbb679a76bcf07b913036e7b44ba4247c39482d | [
"MIT"
] | null | null | null | from pyroute2.netlink import rtnl
from pyroute2.netlink import NETLINK_ROUTE
from pyroute2.netlink.nlsocket import NetlinkSocket
from pyroute2.netlink.rtnl.marshal import MarshalRtnl
| 29.263158 | 77 | 0.767986 |
e285889f2e3b2ffcbbc82294049dd0be72f9d5f1 | 1,013 | py | Python | zhixuewang/teacher/urls.py | lihaoze123/zhixuewang-python | 7a54bb1ae96f74d3bb3a0845f3b084bb5942f758 | [
"MIT"
] | 22 | 2019-01-21T03:49:44.000Z | 2020-02-13T08:43:01.000Z | zhixuewang/teacher/urls.py | lihaoze123/zhixuewang-python | 7a54bb1ae96f74d3bb3a0845f3b084bb5942f758 | [
"MIT"
] | 10 | 2019-01-21T03:50:23.000Z | 2020-01-03T13:06:49.000Z | zhixuewang/teacher/urls.py | lihaoze123/zhixuewang-python | 7a54bb1ae96f74d3bb3a0845f3b084bb5942f758 | [
"MIT"
] | 3 | 2019-02-17T06:12:35.000Z | 2019-10-29T13:24:06.000Z | from zhixuewang.urls import BASE_URL
| 44.043478 | 101 | 0.78381 |
e2858d86f914bf75d274567c879ac15e007d7753 | 229 | py | Python | 2 semester/PP/9/Code/1.3.py | kurpenok/Labs | 069c92b7964a1445d093313b38ebdc56318d2a73 | [
"MIT"
] | null | null | null | 2 semester/PP/9/Code/1.3.py | kurpenok/Labs | 069c92b7964a1445d093313b38ebdc56318d2a73 | [
"MIT"
] | null | null | null | 2 semester/PP/9/Code/1.3.py | kurpenok/Labs | 069c92b7964a1445d093313b38ebdc56318d2a73 | [
"MIT"
] | null | null | null | sort = lambda array: [sublist for sublist in sorted(array, key=lambda x: x[1])]
if __name__ == "__main__":
print(sort([
("English", 88),
("Social", 82),
("Science", 90),
("Math", 97)
]))
| 20.818182 | 79 | 0.50655 |
e2867f314d7004069b6df31d48702399fd7727ef | 451 | py | Python | users/models.py | jannetasa/haravajarjestelma | 419f23656306d94ae4d9a8d3477a6325cc80b601 | [
"MIT"
] | null | null | null | users/models.py | jannetasa/haravajarjestelma | 419f23656306d94ae4d9a8d3477a6325cc80b601 | [
"MIT"
] | 79 | 2018-11-26T09:43:41.000Z | 2022-02-10T08:19:11.000Z | users/models.py | jannetasa/haravajarjestelma | 419f23656306d94ae4d9a8d3477a6325cc80b601 | [
"MIT"
] | 3 | 2018-11-27T08:08:22.000Z | 2022-03-25T08:30:34.000Z | from django.db import models
from django.utils.translation import ugettext_lazy as _
from helusers.models import AbstractUser
| 26.529412 | 80 | 0.738359 |
e287c088eb04f012860164c20f94da353ad49546 | 3,904 | py | Python | src/main/python/tranquilitybase/gcpdac/main/core/terraform/terraform_utils.py | tranquilitybase-io/tb-gcp-dac | 1d65afced1ab7427262dcdf98ee544370201439a | [
"Apache-2.0"
] | 2 | 2020-04-23T16:50:26.000Z | 2021-05-09T11:30:42.000Z | src/main/python/tranquilitybase/gcpdac/main/core/terraform/terraform_utils.py | tranquilitybase-io/tb-gcp-dac | 1d65afced1ab7427262dcdf98ee544370201439a | [
"Apache-2.0"
] | 156 | 2020-04-08T14:08:47.000Z | 2021-07-01T14:48:15.000Z | src/main/python/tranquilitybase/gcpdac/main/core/terraform/terraform_utils.py | tranquilitybase-io/tb-gcp-dac | 1d65afced1ab7427262dcdf98ee544370201439a | [
"Apache-2.0"
] | 2 | 2020-06-24T11:19:58.000Z | 2020-06-24T13:27:22.000Z | import time
import traceback
from python_terraform import Terraform
from src.main.python.tranquilitybase.gcpdac.configuration.helpers.eaglehelper import EagleConfigHelper
from src.main.python.tranquilitybase.gcpdac.configuration.helpers.envhelper import EnvHelper
from src.main.python.tranquilitybase.gcpdac.main.core.t... | 41.094737 | 106 | 0.71542 |
e288295cb9e018ae0fba4c6ba89f7da0720d2b7a | 2,692 | py | Python | jsonfile.py | jason0x43/jcalfred | 66e5b3d1ffc7529aeda925695b8fb32fd7fa383c | [
"MIT"
] | 6 | 2015-05-08T19:52:04.000Z | 2020-10-21T14:56:32.000Z | jsonfile.py | jason0x43/jcalfred | 66e5b3d1ffc7529aeda925695b8fb32fd7fa383c | [
"MIT"
] | 1 | 2016-05-25T19:10:07.000Z | 2016-05-25T19:10:07.000Z | jsonfile.py | jason0x43/jcalfred | 66e5b3d1ffc7529aeda925695b8fb32fd7fa383c | [
"MIT"
] | null | null | null | import logging
import json
import os.path
LOG = logging.getLogger(__name__)
| 27.752577 | 78 | 0.540862 |
e2890f61a50cee88e2d36d96b2e7ecb300c712a7 | 982 | py | Python | twitch.py | blueben/twitchalyze | daa5e4ea40a7959ee5b2fdf82f86a70db1800511 | [
"Apache-2.0"
] | 1 | 2017-07-14T07:14:36.000Z | 2017-07-14T07:14:36.000Z | twitch.py | blueben/twitchalyze | daa5e4ea40a7959ee5b2fdf82f86a70db1800511 | [
"Apache-2.0"
] | 1 | 2017-07-07T18:40:40.000Z | 2017-07-07T18:40:40.000Z | twitch.py | blueben/twitchalyze | daa5e4ea40a7959ee5b2fdf82f86a70db1800511 | [
"Apache-2.0"
] | null | null | null | """
Twitch API Module.
This module implements only those parts of the Twitch API needed for the
twitchalyze app to function. It is not a general purpose SDK.
This module is written against Version 5 of the Twitch API.
"""
import json
import requests
# Read in user configuration
with open('.twitchalyze') as data_fil... | 20.458333 | 72 | 0.660896 |
e28a67a7643e93d68a4bd7360926046da59daf02 | 12,956 | py | Python | code/formatting.py | MaryumSayeed/TheSwan | 3e186e15acb41faec7dd508d8a8cd250659eba9c | [
"MIT"
] | null | null | null | code/formatting.py | MaryumSayeed/TheSwan | 3e186e15acb41faec7dd508d8a8cd250659eba9c | [
"MIT"
] | null | null | null | code/formatting.py | MaryumSayeed/TheSwan | 3e186e15acb41faec7dd508d8a8cd250659eba9c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
import pandas as pd
import glob,os,csv,re,math
import shutil, time
from astropy.io import ascii
import matplotlib.pyplot as plt
# Load all data files:
psdir ='/Users/maryumsayeed/Desktop/HuberNess/mlearning/powerspectrum/'
hrdir ='/Users/maryu... | 42.201954 | 203 | 0.732865 |
e28ae1ecff19d7a967621ff35f6bf1e80a303f2f | 646 | py | Python | problems/g2_academic/LangfordBin.py | cprudhom/pycsp3 | 980927188f4262c9ea48a6534795712f09d731d6 | [
"MIT"
] | 28 | 2019-12-14T09:25:52.000Z | 2022-03-24T08:15:13.000Z | problems/g2_academic/LangfordBin.py | cprudhom/pycsp3 | 980927188f4262c9ea48a6534795712f09d731d6 | [
"MIT"
] | 7 | 2020-04-15T11:02:07.000Z | 2022-01-20T12:48:54.000Z | problems/g2_academic/LangfordBin.py | cprudhom/pycsp3 | 980927188f4262c9ea48a6534795712f09d731d6 | [
"MIT"
] | 3 | 2020-04-15T08:23:45.000Z | 2021-12-07T14:02:28.000Z | """
See Ian P. Gent, Christopher Jefferson, Ian Miguel: Watched Literals for Constraint Propagation in Minion. CP 2006: 182-197
Examples of Execution:
python3 LangfordBin.py
python3 LangfordBin.py -data=10
"""
from pycsp3 import *
n = data or 8
# v[i] is the ith value of the Langford's sequence
v = VarArray(siz... | 24.846154 | 123 | 0.611455 |
e28e4be1e1115462a9f71610a6de2f1ea15e9d02 | 3,912 | py | Python | momentumnet-main/momentumnet/exact_rep_pytorch.py | ZhuFanCheng/Thesis | eba9a7567a5c254acb2e78fdac0cda7dddabb327 | [
"MIT"
] | null | null | null | momentumnet-main/momentumnet/exact_rep_pytorch.py | ZhuFanCheng/Thesis | eba9a7567a5c254acb2e78fdac0cda7dddabb327 | [
"MIT"
] | null | null | null | momentumnet-main/momentumnet/exact_rep_pytorch.py | ZhuFanCheng/Thesis | eba9a7567a5c254acb2e78fdac0cda7dddabb327 | [
"MIT"
] | null | null | null | # Authors: Michael Sander, Pierre Ablin
# License: MIT
"""
Original code from
Maclaurin, Dougal, David Duvenaud, and Ryan Adams.
"Gradient-based hyperparameter optimization through reversible learning."
International conference on machine learning. PMLR, 2015.
"""
import numpy as np
import torch
RADIX_SCALE = 2 ** 5... | 26.612245 | 78 | 0.562117 |
e28edceaeb28b473911c6cbe149b7885fa3fc75c | 531 | py | Python | lp_mongodb/loaders/loader.py | TechLaProvence/lp_mongodb | 723e7a9599442405e915fa26c361e337c80784a9 | [
"MIT"
] | null | null | null | lp_mongodb/loaders/loader.py | TechLaProvence/lp_mongodb | 723e7a9599442405e915fa26c361e337c80784a9 | [
"MIT"
] | null | null | null | lp_mongodb/loaders/loader.py | TechLaProvence/lp_mongodb | 723e7a9599442405e915fa26c361e337c80784a9 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/TechLaProvence/lp_mongodb
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 figarocms dhardy@figarocms.fr
from tornado.concurrent import return_future
from lp_mongodb.storag... | 26.55 | 53 | 0.781544 |
e29079653a4fe276a51c79065567b452a9f627d4 | 857 | py | Python | efficientEigensolvers/Adaptive_PageRank_Algo.py | ICERM-Efficient-Eigensolvers-2020/Implimentation | c5856afaeaa234946fb5151226e4f3f5a60a1018 | [
"MIT"
] | null | null | null | efficientEigensolvers/Adaptive_PageRank_Algo.py | ICERM-Efficient-Eigensolvers-2020/Implimentation | c5856afaeaa234946fb5151226e4f3f5a60a1018 | [
"MIT"
] | null | null | null | efficientEigensolvers/Adaptive_PageRank_Algo.py | ICERM-Efficient-Eigensolvers-2020/Implimentation | c5856afaeaa234946fb5151226e4f3f5a60a1018 | [
"MIT"
] | 3 | 2020-07-02T15:33:58.000Z | 2020-07-03T16:32:40.000Z | import numpy as np
from tabulate import tabulate
import matplotlib.pyplot as plt
import Page_Rank_Utils as pru
| 17.489796 | 57 | 0.555426 |
e291856a8670ce43899869355a2184217b3d5cc1 | 272 | py | Python | demo_random_pixels.py | insolor/micropython-troyka-led-matrix | d72905e1b89fcaa1e334434c713e5a6468634ef4 | [
"MIT"
] | 1 | 2021-12-10T08:01:12.000Z | 2021-12-10T08:01:12.000Z | demo_random_pixels.py | insolor/micropython-troyka-led-matrix | d72905e1b89fcaa1e334434c713e5a6468634ef4 | [
"MIT"
] | null | null | null | demo_random_pixels.py | insolor/micropython-troyka-led-matrix | d72905e1b89fcaa1e334434c713e5a6468634ef4 | [
"MIT"
] | null | null | null | from troyka_led_matrix import TroykaLedMatrix
from urandom import getrandbits
import time
matrix = TroykaLedMatrix()
while True:
matrix.draw_pixel(getrandbits(3), getrandbits(3))
matrix.clear_pixel(getrandbits(3), getrandbits(3))
time.sleep_ms(50)
| 24.727273 | 55 | 0.753676 |
e291c18803387c40527b5444ebd69389689cae06 | 1,560 | py | Python | enip_backend/export/bulk.py | vote/enip-backend | 0261765db6c793ea276521d049ace8fe145cd98f | [
"MIT"
] | 2 | 2020-10-29T20:10:18.000Z | 2020-10-30T04:46:05.000Z | enip_backend/export/bulk.py | vote/enip-backend | 0261765db6c793ea276521d049ace8fe145cd98f | [
"MIT"
] | 3 | 2020-10-17T02:51:06.000Z | 2020-11-04T16:08:28.000Z | enip_backend/export/bulk.py | vote/enip-backend | 0261765db6c793ea276521d049ace8fe145cd98f | [
"MIT"
] | null | null | null | import json
import logging
from datetime import datetime, timezone
from ..enip_common.pg import get_ro_cursor
from .run import export_all_states, export_national
# Bulk-exports a range of ingests for testing purposes. Prints out a JSON
# blob describing the exports.
START_TIME = datetime(2020, 10, 15, 16, 0, 0, tzinf... | 30.588235 | 131 | 0.578846 |
e291cea8a93d8a6104d653557c8f3d00a9497fd4 | 11,032 | py | Python | src/genie/libs/parser/junos/show_chassis.py | noziwatele/genieparser | 4d7a62a870b30dfc8e2a41bf1ad81218bca6f5e9 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/junos/show_chassis.py | noziwatele/genieparser | 4d7a62a870b30dfc8e2a41bf1ad81218bca6f5e9 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/junos/show_chassis.py | noziwatele/genieparser | 4d7a62a870b30dfc8e2a41bf1ad81218bca6f5e9 | [
"Apache-2.0"
] | null | null | null |
''' show_chassis.py
Parser for the following show commands:
* show chassis fpc detail
* show chassis environment routing-engine
* show chassis firmware
* show chassis firmware no-forwarding
'''
# python
import re
from genie.metaparser import MetaParser
from genie.metaparser.util.schemaengine import (... | 30.307692 | 91 | 0.472263 |
e291fcd825f96b9724727a3f8d3acd4cb312efa4 | 2,009 | py | Python | mp_sort/virtenv/lib/python3.6/site-packages/transcrypt/demos/pysteroids_demo/org/theodox/__init__.py | ang-jason/fip_powerx_mini_projects-foxtrot | 37e3671969b516369e2d1c7cab5890b75c489f56 | [
"MIT"
] | 2,200 | 2016-10-12T16:47:13.000Z | 2022-03-30T16:40:35.000Z | mp_sort/virtenv/lib/python3.6/site-packages/transcrypt/demos/pysteroids_demo/org/theodox/__init__.py | ang-jason/fip_powerx_mini_projects-foxtrot | 37e3671969b516369e2d1c7cab5890b75c489f56 | [
"MIT"
] | 672 | 2016-10-12T16:36:48.000Z | 2022-03-25T00:57:04.000Z | mp_sort/virtenv/lib/python3.6/site-packages/transcrypt/demos/pysteroids_demo/org/theodox/__init__.py | ang-jason/fip_powerx_mini_projects-foxtrot | 37e3671969b516369e2d1c7cab5890b75c489f56 | [
"MIT"
] | 230 | 2016-10-20T14:31:40.000Z | 2022-03-16T15:57:15.000Z |
import math
import itertools
| 22.829545 | 66 | 0.548034 |
e29236ebdd1c173cccb70069b6ef58e0d5f8c5b3 | 1,230 | py | Python | gae/settings.py | fredsa/instant-tty | 31778228f08b26109b23d2d5bd2f72393228ef7b | [
"Apache-2.0"
] | 1 | 2015-09-15T23:01:34.000Z | 2015-09-15T23:01:34.000Z | gae/settings.py | fredsa/instant-tty | 31778228f08b26109b23d2d5bd2f72393228ef7b | [
"Apache-2.0"
] | null | null | null | gae/settings.py | fredsa/instant-tty | 31778228f08b26109b23d2d5bd2f72393228ef7b | [
"Apache-2.0"
] | null | null | null | """Module containing global playground constants and functions."""
import os
from google.appengine.api import app_identity
from google.appengine.api import backends
DEBUG = True
COMPUTE_IDLE_INSTANCES_TARGET = 0
COMPUTE_INSTANCE_TTL_MINUTES = 10
COMPUTE_PROJECT_ID = app_identity.get_application_id()
COMPUTE_ZON... | 21.578947 | 80 | 0.753659 |
e292ecca162d2532e3d87a925cd18ac31886440b | 4,984 | py | Python | experiments/ucf101.py | srph25/videoonenet | a935ef62c53d43bf52e0089b3b2078ece9f3b014 | [
"MIT"
] | null | null | null | experiments/ucf101.py | srph25/videoonenet | a935ef62c53d43bf52e0089b3b2078ece9f3b014 | [
"MIT"
] | null | null | null | experiments/ucf101.py | srph25/videoonenet | a935ef62c53d43bf52e0089b3b2078ece9f3b014 | [
"MIT"
] | null | null | null | import numpy as np
import os
os.environ['TF_FORCE_GPU_ALLOW_GROWTH']='true'
import datetime
from sacred import Experiment
from sacred.observers import FileStorageObserver
from datasets.ucf101 import UCF101Dataset
from algorithms.kerasvideoonenet import KerasVideoOneNet
from algorithms.kerasvideoonenet_admm import Keras... | 36.647059 | 210 | 0.541734 |
e2943c239d9c2e7a22ad3b9b20bec4da90c41c08 | 594 | py | Python | master/fresh-samples-master/fresh-samples-master/python_samples/create_contact.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/fresh-samples-master/fresh-samples-master/python_samples/create_contact.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/fresh-samples-master/fresh-samples-master/python_samples/create_contact.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | ## This script requires "requests": http://docs.python-requests.org/
## To install: pip install requests
import requests
import json
FRESHDESK_ENDPOINT = "http://YOUR_DOMAIN.freshdesk.com" # check if you have configured https, modify accordingly
FRESHDESK_KEY = "YOUR_API_TOKEN"
user_info = {"user":{"name":"Example U... | 31.263158 | 112 | 0.734007 |
e294c03490a934e79c6f93eaa739cbcd7738d18b | 1,102 | py | Python | ordenes/migrations/0003_auto_20200307_0359.py | Omar-Gonzalez/echangarro-demo | a7a970d9793c5e467ca117e9f515a9da423fac14 | [
"MIT"
] | null | null | null | ordenes/migrations/0003_auto_20200307_0359.py | Omar-Gonzalez/echangarro-demo | a7a970d9793c5e467ca117e9f515a9da423fac14 | [
"MIT"
] | 9 | 2021-03-19T11:25:28.000Z | 2022-03-12T00:35:18.000Z | ordenes/migrations/0003_auto_20200307_0359.py | Omar-Gonzalez/echangarro-demo | a7a970d9793c5e467ca117e9f515a9da423fac14 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.2 on 2020-03-07 03:59
from django.db import migrations, models
| 38 | 275 | 0.606171 |
e294deddbae6ebac7150aad7bc72409c4cbb3ce7 | 8,311 | py | Python | fantasyfootball/tiersweekly.py | Robert-F-Mulligan/fantasy-football | 2e13142abd371dfaebebd0babb110a5324702e55 | [
"MIT"
] | 1 | 2020-12-18T00:10:13.000Z | 2020-12-18T00:10:13.000Z | fantasyfootball/tiersweekly.py | Robert-F-Mulligan/fantasy-football | 2e13142abd371dfaebebd0babb110a5324702e55 | [
"MIT"
] | 7 | 2021-01-17T21:28:08.000Z | 2022-01-29T20:07:43.000Z | fantasyfootball/tiersweekly.py | Robert-F-Mulligan/fantasy-football | 2e13142abd371dfaebebd0babb110a5324702e55 | [
"MIT"
] | null | null | null | #tiersweekly.py
from fantasyfootball import tiers
from fantasyfootball import fantasypros as fp
from fantasyfootball import config
from fantasyfootball import ffcalculator
from fantasyfootball.config import FIGURE_DIR
from sklearn.cluster import KMeans
from sklearn.mixture import GaussianMixture
from matplotlib import... | 35.823276 | 255 | 0.611599 |
e2971d2e298fe27edbcd67a69085c01471fc7263 | 2,629 | py | Python | makememe/generator/prompts/types/ineffective_solution.py | OthersideAI/makememe_ai | d5cbf598e09375862930b5d8548b37c8b2371bad | [
"MIT"
] | null | null | null | makememe/generator/prompts/types/ineffective_solution.py | OthersideAI/makememe_ai | d5cbf598e09375862930b5d8548b37c8b2371bad | [
"MIT"
] | null | null | null | makememe/generator/prompts/types/ineffective_solution.py | OthersideAI/makememe_ai | d5cbf598e09375862930b5d8548b37c8b2371bad | [
"MIT"
] | null | null | null | from makememe.generator.prompts.prompt import Prompt
import datetime
from PIL import Image
from makememe.generator.design.image_manager import Image_Manager
| 47.8 | 183 | 0.691137 |
e298277ea2466de2883498bb7a044f52d8a88109 | 665 | py | Python | dodo_commands/extra/dodo_standard_commands/decorators/pause.py | mnieber/dodo-commands | 82330006af2c6739b030ce932ba1ff9078b241ee | [
"MIT"
] | 8 | 2016-12-01T16:45:45.000Z | 2020-05-05T20:56:57.000Z | dodo_commands/extra/dodo_standard_commands/decorators/pause.py | mnieber/dodo-commands | 82330006af2c6739b030ce932ba1ff9078b241ee | [
"MIT"
] | 75 | 2017-01-29T19:25:45.000Z | 2020-01-28T09:40:47.000Z | dodo_commands/extra/dodo_standard_commands/decorators/pause.py | mnieber/dodo-commands | 82330006af2c6739b030ce932ba1ff9078b241ee | [
"MIT"
] | 2 | 2017-06-01T09:55:20.000Z | 2017-06-08T14:45:08.000Z | """Pauses the execution."""
import time
from dodo_commands.framework.decorator_utils import uses_decorator
| 33.25 | 83 | 0.709774 |
e299cca2abbc2b500fc05b59b682135e9c4e7a88 | 4,060 | py | Python | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/lib/schemas/user.py | thecoderstudio/cookiecutter-pyramid-api | b3122c0d98be7179bcf726c6527096c0327d7bb7 | [
"MIT"
] | null | null | null | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/lib/schemas/user.py | thecoderstudio/cookiecutter-pyramid-api | b3122c0d98be7179bcf726c6527096c0327d7bb7 | [
"MIT"
] | 1 | 2021-12-17T15:10:21.000Z | 2021-12-17T15:10:21.000Z | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/lib/schemas/user.py | thecoderstudio/cookiecutter-pyramid-api | b3122c0d98be7179bcf726c6527096c0327d7bb7 | [
"MIT"
] | 1 | 2021-03-01T14:27:10.000Z | 2021-03-01T14:27:10.000Z | from marshmallow import (fields, post_load, Schema, validate, validates,
validates_schema, ValidationError)
from {{cookiecutter.project_slug}}.lib.hash import compare_plaintext_to_hash, hash_plaintext
from {{cookiecutter.project_slug}}.models.user import User, get_user_by_email_address
MIN_PA... | 32.222222 | 92 | 0.624384 |
e29a8632b4bdbd80579ffbed9fa3602b87d880cb | 1,304 | py | Python | src/anaplan_api/Model.py | jeswils-ap/anaplan_transactional_api | 54ef377df8f885906c911b302d21b8927602cc6c | [
"BSD-2-Clause"
] | null | null | null | src/anaplan_api/Model.py | jeswils-ap/anaplan_transactional_api | 54ef377df8f885906c911b302d21b8927602cc6c | [
"BSD-2-Clause"
] | null | null | null | src/anaplan_api/Model.py | jeswils-ap/anaplan_transactional_api | 54ef377df8f885906c911b302d21b8927602cc6c | [
"BSD-2-Clause"
] | null | null | null | import logging
from typing import List
from .AnaplanRequest import AnaplanRequest
from .User import User
from .ModelDetails import ModelDetails
logger = logging.getLogger(__name__)
| 27.166667 | 71 | 0.736196 |
e29aea0adeb87fbcda39b28f2cebe8dcefd85597 | 883 | py | Python | tests/unit/lms/extensions/feature_flags/views/_predicates_test.py | mattdricker/lms | 40b8a04f95e69258c6c0d7ada543f4b527918ecf | [
"BSD-2-Clause"
] | 38 | 2017-12-30T23:49:53.000Z | 2022-02-15T21:07:49.000Z | tests/unit/lms/extensions/feature_flags/views/_predicates_test.py | mattdricker/lms | 40b8a04f95e69258c6c0d7ada543f4b527918ecf | [
"BSD-2-Clause"
] | 1,733 | 2017-11-09T18:46:05.000Z | 2022-03-31T11:05:50.000Z | tests/unit/lms/extensions/feature_flags/views/_predicates_test.py | mattdricker/lms | 40b8a04f95e69258c6c0d7ada543f4b527918ecf | [
"BSD-2-Clause"
] | 10 | 2018-07-11T17:12:46.000Z | 2022-01-07T20:00:23.000Z | from unittest import mock
from lms.extensions.feature_flags.views._predicates import FeatureFlagViewPredicate
| 33.961538 | 87 | 0.714609 |
e29bd2810c7f8c926395ee26eadb354bd458bdc4 | 468 | py | Python | 2015/python/01.py | gcp825/advent_of_code | b4ea17572847e1a9044487041b3e12a0da58c94b | [
"MIT"
] | 1 | 2021-12-29T09:32:08.000Z | 2021-12-29T09:32:08.000Z | 2015/python/01.py | gcp825/advent_of_code | b4ea17572847e1a9044487041b3e12a0da58c94b | [
"MIT"
] | null | null | null | 2015/python/01.py | gcp825/advent_of_code | b4ea17572847e1a9044487041b3e12a0da58c94b | [
"MIT"
] | null | null | null |
print(main('1.txt'))
| 22.285714 | 112 | 0.532051 |
e29c27f26d7b20a1fcc5692f39ceeba53ab303aa | 4,810 | py | Python | Unit3_StructuredTypes/ps3_hangman.py | myzzdeedee/MITx_6001x | 0843ac666e1d58e52bd09c8ce9144fe9d6eb78c8 | [
"MIT"
] | null | null | null | Unit3_StructuredTypes/ps3_hangman.py | myzzdeedee/MITx_6001x | 0843ac666e1d58e52bd09c8ce9144fe9d6eb78c8 | [
"MIT"
] | null | null | null | Unit3_StructuredTypes/ps3_hangman.py | myzzdeedee/MITx_6001x | 0843ac666e1d58e52bd09c8ce9144fe9d6eb78c8 | [
"MIT"
] | null | null | null | # Hangman game
#
# -----------------------------------
# Helper code
# You don't need to understand this helper code,
# but you will have to know how to use the functions
# (so be sure to read the docstrings!)
import random
import string
WORDLIST_FILENAME = "/Users/deedeebanh/Documents/MITx_6.00.1.x/ProblemSet3/word... | 33.636364 | 108 | 0.65447 |
e29cf657d8c556834680fb3f3c80b7dad515e1b9 | 39,909 | py | Python | tesa/database_creation/annotation_task.py | clementjumel/master_thesis | 5a39657a212f794690e7c426f60e10ba70d50da9 | [
"Apache-2.0"
] | 2 | 2020-07-08T19:33:52.000Z | 2020-07-18T16:52:59.000Z | tesa/database_creation/annotation_task.py | clementjumel/master_thesis | 5a39657a212f794690e7c426f60e10ba70d50da9 | [
"Apache-2.0"
] | null | null | null | tesa/database_creation/annotation_task.py | clementjumel/master_thesis | 5a39657a212f794690e7c426f60e10ba70d50da9 | [
"Apache-2.0"
] | null | null | null | from database_creation.nyt_article import Article
from database_creation.utils import Tuple, Wikipedia, Query, Annotation
from numpy import split as np_split
from numpy.random import seed, choice
from time import time
from glob import glob
from collections import defaultdict
from pickle import dump, load, PicklingErro... | 38.008571 | 120 | 0.564033 |
e29e8433c1fea0696a62aa72a90be6729781a080 | 3,623 | py | Python | main.py | jeffkub/forecast-display | 74cccd459ee195115f4ae79a9e65ede1eed08145 | [
"MIT"
] | 2 | 2018-09-24T01:39:55.000Z | 2019-02-14T10:01:45.000Z | main.py | jeffkub/forecast-display | 74cccd459ee195115f4ae79a9e65ede1eed08145 | [
"MIT"
] | null | null | null | main.py | jeffkub/forecast-display | 74cccd459ee195115f4ae79a9e65ede1eed08145 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import argparse
from datetime import datetime
import json
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5 import uic
import os
import sys
from weather import Weather
BASE_PATH = os.path.dirname(os.path.abspath(__file__))
DISP_SIZE = (640, 384)
WHITE = 0xffffffff
BLACK = 0xff000... | 33.546296 | 118 | 0.656362 |
e29f7d09efd784db1167faf711962043e5a84615 | 677 | py | Python | commit_grtrans.py | HerculesJack/grtrans | bc005307d81dac1bdb9520e776e7627126dd690a | [
"MIT"
] | 25 | 2016-02-11T01:52:14.000Z | 2021-06-16T02:15:42.000Z | commit_grtrans.py | RAnantua/grtrans | a0353a8516335412b27fe4866eabafcfc0fe498f | [
"MIT"
] | 6 | 2016-11-10T15:25:20.000Z | 2018-01-18T15:15:57.000Z | commit_grtrans.py | RAnantua/grtrans | a0353a8516335412b27fe4866eabafcfc0fe498f | [
"MIT"
] | 6 | 2016-02-11T14:13:01.000Z | 2022-03-10T01:56:02.000Z | import os
from run_grtrans_test_problems import run_test_problems
from unit_tests import run_unit_tests
passed, max_passed, failed = run_test_problems(save=0)
nfailed, ufailed = run_unit_tests()
if passed < max_passed or nfailed > 0: print 'ERROR -- grtrans tests failed!'
else:
# os.chdir('..')
# os.system('cvs... | 35.631579 | 103 | 0.716396 |
e29fa79eca53178795185c5b18107d7e3a5c1a43 | 349 | py | Python | luftdaten/exceptions.py | lrubaszewski/python-luftdaten | 69c29f4ee0ac6e8e8749eee44102d1b513cf5cd5 | [
"MIT"
] | 5 | 2018-02-08T12:39:19.000Z | 2019-08-16T11:23:23.000Z | luftdaten/exceptions.py | lrubaszewski/python-luftdaten | 69c29f4ee0ac6e8e8749eee44102d1b513cf5cd5 | [
"MIT"
] | 6 | 2017-12-26T16:58:20.000Z | 2020-03-31T06:54:18.000Z | luftdaten/exceptions.py | lrubaszewski/python-luftdaten | 69c29f4ee0ac6e8e8749eee44102d1b513cf5cd5 | [
"MIT"
] | 9 | 2017-12-26T15:29:13.000Z | 2020-03-30T18:12:08.000Z | """Exceptions for the Luftdaten Wrapper."""
| 17.45 | 52 | 0.716332 |
e29fe3df8dc5516581790a80c10fc304c7ec7af2 | 215 | py | Python | training/191210/123.py | SOOIN-KIM/lab-python | 4b85dc11c76e2d4f89be0d01864f9f61f3c6e2cc | [
"MIT"
] | null | null | null | training/191210/123.py | SOOIN-KIM/lab-python | 4b85dc11c76e2d4f89be0d01864f9f61f3c6e2cc | [
"MIT"
] | null | null | null | training/191210/123.py | SOOIN-KIM/lab-python | 4b85dc11c76e2d4f89be0d01864f9f61f3c6e2cc | [
"MIT"
] | null | null | null | from sklearn.metrics import r2_score
y_true = [3, -0.5, 2, 7]
y_pred = [2.5, 0.0, 2, 8]
r2=r2_score(y_true, y_pred)
print(r2)
y_true = [5,6,7,8]
y_pred = [-100,524,-1,3]
r2=r2_score(y_true, y_pred)
print(r2)
r2_ | 15.357143 | 36 | 0.651163 |
e2a06902ee9718981ff25abb371fb5e304cb3890 | 178 | py | Python | tests/sedes/test_bitvector_instantiation.py | booleanfunction/py-ssz | 9d2e34c2257d7b69da824f8a8361dbc71b03b257 | [
"MIT"
] | 22 | 2018-12-01T21:16:06.000Z | 2021-11-04T14:12:31.000Z | tests/sedes/test_bitvector_instantiation.py | booleanfunction/py-ssz | 9d2e34c2257d7b69da824f8a8361dbc71b03b257 | [
"MIT"
] | 75 | 2018-11-27T10:09:19.000Z | 2021-12-09T03:52:27.000Z | tests/sedes/test_bitvector_instantiation.py | booleanfunction/py-ssz | 9d2e34c2257d7b69da824f8a8361dbc71b03b257 | [
"MIT"
] | 19 | 2018-12-01T11:36:01.000Z | 2022-03-28T18:53:59.000Z | import pytest
from ssz.sedes import Bitvector
| 17.8 | 41 | 0.730337 |