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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7fbc6027f656cd1c5bb097bcdf8644aa472c2b01 | 7,034 | py | Python | AKextensions.py | bmilosh/Common-Information-and-Matroid-Ports | 653908c2d1a4b9c1774573b1f95b870e7f99f875 | [
"BSD-3-Clause"
] | 1 | 2020-10-19T05:20:53.000Z | 2020-10-19T05:20:53.000Z | AKextensions.py | bmilosh/Common-Information-and-Matroid-Ports | 653908c2d1a4b9c1774573b1f95b870e7f99f875 | [
"BSD-3-Clause"
] | null | null | null | AKextensions.py | bmilosh/Common-Information-and-Matroid-Ports | 653908c2d1a4b9c1774573b1f95b870e7f99f875 | [
"BSD-3-Clause"
] | null | null | null | from gurobipy import *
from itertools import combinations
from time import localtime, strftime, time
import config
from fibonew2 import (
AK2exp, InitMatNew, MatroidCompatible, Resol2m, bi, bs, disjoint, rankfinder,
ib, sb)
from timing import endlog, log
def CheckOneAK(mbases,gset,rnk):
'''
We check ... | 43.419753 | 136 | 0.540517 |
7fbcbad92e0529fe666dd21bc3e6c50e0d0a628f | 7,160 | py | Python | Multiobjective Optimization/Compass.py | joymallyac/Fairway | 6aa11e4a182e7271059a473cd6857f91d1668e7f | [
"BSD-2-Clause"
] | 6 | 2020-07-15T06:33:05.000Z | 2022-03-22T14:02:09.000Z | Multiobjective Optimization/Compass.py | joymallyac/Fairway | 6aa11e4a182e7271059a473cd6857f91d1668e7f | [
"BSD-2-Clause"
] | 1 | 2020-07-15T06:34:43.000Z | 2020-07-15T06:34:43.000Z | Multiobjective Optimization/Compass.py | joymallyac/Fairway | 6aa11e4a182e7271059a473cd6857f91d1668e7f | [
"BSD-2-Clause"
] | 1 | 2020-07-15T06:39:31.000Z | 2020-07-15T06:39:31.000Z | import pandas as pd
import numpy as np
import random,time
import math,copy
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeRegressor
from sklearn.metrics import classification_report, confusion_matrix, accuracy_score
from skle... | 53.834586 | 727 | 0.714246 |
7fbccc8974c67902bc5ad1e661356673f890179b | 2,814 | py | Python | test_module.py | devsysenv/tests | 6aa7635b281f2e186daa6375abb8050e44c02d6a | [
"MIT"
] | null | null | null | test_module.py | devsysenv/tests | 6aa7635b281f2e186daa6375abb8050e44c02d6a | [
"MIT"
] | null | null | null | test_module.py | devsysenv/tests | 6aa7635b281f2e186daa6375abb8050e44c02d6a | [
"MIT"
] | 1 | 2022-03-09T12:23:26.000Z | 2022-03-09T12:23:26.000Z | #!/usr/bin/env python
import pytest
import os
import sys
import logging
logging.basicConfig()
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
from pathlib import Path
from dselib.thread import initTLS
initTLS()
from constants import CONST
from dselib.path import normalizePath
from dselib.dir impo... | 29.3125 | 93 | 0.702914 |
7fbcf17f7708af8db907793b903a38dee32b4986 | 4,823 | py | Python | pilemma/env/pilemma_env.py | cmackeen/pilemma | 614542081c963063d0255af7b24395fae37b5934 | [
"MIT"
] | null | null | null | pilemma/env/pilemma_env.py | cmackeen/pilemma | 614542081c963063d0255af7b24395fae37b5934 | [
"MIT"
] | 6 | 2020-04-17T20:05:04.000Z | 2022-03-12T00:24:39.000Z | pilemma/env/pilemma_env.py | cmackeen/pilemma | 614542081c963063d0255af7b24395fae37b5934 | [
"MIT"
] | null | null | null |
import gym
from gym import error, spaces, utils
from gym.utils import seeding
import numpy as np
import pandas as pd
import gym
from gym import error, spaces, utils
from gym.utils import seeding
from pilemma.env.dai_auct import Urn
import glob
import os
import random
init_dai=1000
init_eth=0
ACTION_SKIP = 0
ACTION_... | 28.538462 | 173 | 0.571014 |
7fbe88d42805d4e48e13a5db9e5dcc9dd3f4444c | 2,700 | py | Python | kaggle-santa-2015/submission.py | gabormakrai/kaggle-santa-2015 | fa383c7130b30e501a7533efd5d372ccde0e6f29 | [
"Apache-2.0"
] | null | null | null | kaggle-santa-2015/submission.py | gabormakrai/kaggle-santa-2015 | fa383c7130b30e501a7533efd5d372ccde0e6f29 | [
"Apache-2.0"
] | null | null | null | kaggle-santa-2015/submission.py | gabormakrai/kaggle-santa-2015 | fa383c7130b30e501a7533efd5d372ccde0e6f29 | [
"Apache-2.0"
] | null | null | null | from haversine import haversine
| 31.395349 | 154 | 0.534444 |
7fbfa1a77953c005769371575397429508029495 | 4,425 | py | Python | healthkit_to_sqlite/utils.py | cwkendall/healthkit-to-sqlite | f0bb31079370b7e25b17ddd057e68023763a0938 | [
"Apache-2.0"
] | null | null | null | healthkit_to_sqlite/utils.py | cwkendall/healthkit-to-sqlite | f0bb31079370b7e25b17ddd057e68023763a0938 | [
"Apache-2.0"
] | null | null | null | healthkit_to_sqlite/utils.py | cwkendall/healthkit-to-sqlite | f0bb31079370b7e25b17ddd057e68023763a0938 | [
"Apache-2.0"
] | null | null | null | from xml.etree import ElementTree as ET
import io
import os.path
import sys
import gpxpy
import builtins
| 34.570313 | 115 | 0.598644 |
7fc0a9a618c9ad1b7397ee8f2734d93ece534de6 | 9,628 | py | Python | tests/utils/test_kronecker.py | gtpash/rom-operator-inference-Python3 | a5e05a4442121f7c536060194fec0166976b04b1 | [
"MIT"
] | null | null | null | tests/utils/test_kronecker.py | gtpash/rom-operator-inference-Python3 | a5e05a4442121f7c536060194fec0166976b04b1 | [
"MIT"
] | null | null | null | tests/utils/test_kronecker.py | gtpash/rom-operator-inference-Python3 | a5e05a4442121f7c536060194fec0166976b04b1 | [
"MIT"
] | null | null | null | # utils/test_kronecker.py
"""Tests for rom_operator_inference.utils._kronecker."""
import pytest
import numpy as np
import rom_operator_inference as opinf
# Index generation for fast self-product kronecker evaluation =================
def test_kron2c_indices(n_tests=100):
"""Test utils._kronecker.kron2c_indices... | 34.141844 | 79 | 0.575301 |
f68072e40e9326d2208563fb1dc9bb70cc1a0ff4 | 3,420 | py | Python | gadann/updater.py | dpineo/gadann | ff5dce9a8fc6192ba1efd854672f593872116beb | [
"MIT"
] | null | null | null | gadann/updater.py | dpineo/gadann | ff5dce9a8fc6192ba1efd854672f593872116beb | [
"MIT"
] | null | null | null | gadann/updater.py | dpineo/gadann | ff5dce9a8fc6192ba1efd854672f593872116beb | [
"MIT"
] | null | null | null | #
# GADANN - GPU Accelerated Deep Artificial Neural Network
#
# Copyright (C) 2014 Daniel Pineo (daniel@pineo.net)
#
# 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 restricti... | 37.173913 | 142 | 0.65614 |
f682fe676c7e1a1a9637f751482cd8ab906a78f3 | 880 | py | Python | Aula37/View/testesquad.py | PabloSchumacher/TrabalhosPython | 828edd35eb40442629211bc9f1477f75fb025d74 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | Aula37/View/testesquad.py | PabloSchumacher/TrabalhosPython | 828edd35eb40442629211bc9f1477f75fb025d74 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | Aula37/View/testesquad.py | PabloSchumacher/TrabalhosPython | 828edd35eb40442629211bc9f1477f75fb025d74 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | import sys
sys.path.append( r"C:\Users\900157\Documents\Github\TrabalhosPython\Aula37" )
from Controller.squad_controller import SquadController
from Model.squad import Squad
squad = Squad()
squad.nome = 'JooJ'
squad.descricao = 'Intermedirio'
squad.npessoas = 20
squad.backend.nome = 'Lua' #Adicionar
squad.ba... | 38.26087 | 77 | 0.671591 |
f684bccdded45f6ae63003186c9bee87eac9d795 | 5,427 | py | Python | restapi/resources/login.py | fossabot/http-api | 57a646884e62fe024f6dd7edcc572c85f2955f16 | [
"MIT"
] | null | null | null | restapi/resources/login.py | fossabot/http-api | 57a646884e62fe024f6dd7edcc572c85f2955f16 | [
"MIT"
] | null | null | null | restapi/resources/login.py | fossabot/http-api | 57a646884e62fe024f6dd7edcc572c85f2955f16 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from datetime import datetime, timedelta
import pytz
from restapi.rest.definition import EndpointResource
from restapi.exceptions import RestApiException
from restapi.connectors.authentication import HandleSecurity
from restapi import decorators
from restapi.confs import WRAP_RESPONSE
from re... | 32.112426 | 87 | 0.575456 |
f684dba1f0e8b0d64fb281ab8830a5710f866b0a | 13,196 | py | Python | bot.py | egor5q/casino | 732c35e2f87074be86329ad4706098d23f52fc4b | [
"MIT"
] | null | null | null | bot.py | egor5q/casino | 732c35e2f87074be86329ad4706098d23f52fc4b | [
"MIT"
] | null | null | null | bot.py | egor5q/casino | 732c35e2f87074be86329ad4706098d23f52fc4b | [
"MIT"
] | 1 | 2019-05-18T16:19:20.000Z | 2019-05-18T16:19:20.000Z | # -*- coding: utf-8 -*-
import redis
import os
import telebot
import math
import random
import threading
from telebot import types
from emoji import emojize
from pymongo import MongoClient
token = os.environ['TELEGRAM_TOKEN']
bot = telebot.TeleBot(token)
admins=[441399484]
games={}
client1=os.environ['database']
clie... | 39.508982 | 221 | 0.510533 |
f6852dfc604081fcd05261f22cc95fbff38847fc | 2,317 | py | Python | qrogue/game/logic/collectibles/collectible.py | 7Magic7Mike7/Qrogue | 70bd5671a77981c1d4b633246321ba44f13c21ff | [
"MIT"
] | 4 | 2021-12-14T19:13:43.000Z | 2022-02-16T13:25:38.000Z | qrogue/game/logic/collectibles/collectible.py | 7Magic7Mike7/Qrogue | 70bd5671a77981c1d4b633246321ba44f13c21ff | [
"MIT"
] | null | null | null | qrogue/game/logic/collectibles/collectible.py | 7Magic7Mike7/Qrogue | 70bd5671a77981c1d4b633246321ba44f13c21ff | [
"MIT"
] | 1 | 2022-01-04T18:35:51.000Z | 2022-01-04T18:35:51.000Z | import math
from abc import ABC, abstractmethod
from enum import Enum
from typing import Iterator
def __str__(self):
return self.to_string()
| 22.715686 | 69 | 0.616314 |
f685eb18698eec9ccc94c0ce1603ea2b34b10c5c | 2,952 | py | Python | flux/resources/workflow.py | siq/flux | ca7563deb9ebef14840bbf0cb7bab4d9478b2470 | [
"Linux-OpenIB"
] | null | null | null | flux/resources/workflow.py | siq/flux | ca7563deb9ebef14840bbf0cb7bab4d9478b2470 | [
"Linux-OpenIB"
] | null | null | null | flux/resources/workflow.py | siq/flux | ca7563deb9ebef14840bbf0cb7bab4d9478b2470 | [
"Linux-OpenIB"
] | null | null | null | from mesh.standard import *
from scheme import *
__all__ = ('Workflow',)
Layout = Sequence(Structure({
'title': Text(),
'view': Token(),
'elements': Sequence(Structure({
'type': Token(nonempty=True),
'field': Token(nonempty=True),
'label': Text(),
'options': Field(),
})... | 31.073684 | 77 | 0.570122 |
f6862c3a762adb42778672f66157ed1731e5cdfe | 1,079 | py | Python | Most Asked DSA By Companies/Meta/3-973.py | neelaadityakumar/leetcode | e78e0b8dc0113bdc1721bf7d025a463bea04847f | [
"MIT"
] | null | null | null | Most Asked DSA By Companies/Meta/3-973.py | neelaadityakumar/leetcode | e78e0b8dc0113bdc1721bf7d025a463bea04847f | [
"MIT"
] | null | null | null | Most Asked DSA By Companies/Meta/3-973.py | neelaadityakumar/leetcode | e78e0b8dc0113bdc1721bf7d025a463bea04847f | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/k-closest-points-to-origin/
# 973. K Closest Points to Origin
# Medium
# Share
# Given an array of points where points[i] = [xi, yi] represents a point on the X-Y plane and an integer k, return the k closest points to the origin (0, 0).
# The distance between two points on the X-Y plane... | 34.806452 | 157 | 0.644115 |
f6866a52596fe4972475bf119793b740f2d4ea78 | 1,232 | py | Python | src/huaytools/pytorch/modules/loss/cosine_similarity.py | imhuay/studies-gitbook | 69a31c20c91d131d0fafce0622f4035b9b95e93a | [
"MIT"
] | 100 | 2021-10-13T01:22:27.000Z | 2022-03-31T09:52:49.000Z | src/huaytools/pytorch/modules/loss/cosine_similarity.py | imhuay/studies-gitbook | 69a31c20c91d131d0fafce0622f4035b9b95e93a | [
"MIT"
] | null | null | null | src/huaytools/pytorch/modules/loss/cosine_similarity.py | imhuay/studies-gitbook | 69a31c20c91d131d0fafce0622f4035b9b95e93a | [
"MIT"
] | 27 | 2021-11-01T01:05:09.000Z | 2022-03-31T03:32:01.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Time: 2021-10-13 8:30
Author: huayang
Subject:
"""
import os
import sys
import json
import doctest
from typing import *
from collections import defaultdict
from torch.nn import functional as F # noqa
from huaytools.pytorch.modules.loss.mean_squared_error import m... | 21.614035 | 95 | 0.624188 |
f688e307748f33124d94de4e0957467d5780593f | 866 | py | Python | Tree/98. 验证二叉搜索树.py | graveszhang/LeetCode-Practice | 72be5ce43048461e0b702b84eee1f2f86f356d11 | [
"MIT"
] | null | null | null | Tree/98. 验证二叉搜索树.py | graveszhang/LeetCode-Practice | 72be5ce43048461e0b702b84eee1f2f86f356d11 | [
"MIT"
] | null | null | null | Tree/98. 验证二叉搜索树.py | graveszhang/LeetCode-Practice | 72be5ce43048461e0b702b84eee1f2f86f356d11 | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
# if root.left and root.right:
# if v <= root.left.val or v >= root.right.val: return False
# elif ... | 30.928571 | 72 | 0.553118 |
f689b3c7d9297254645c801a0aa3f131ae851790 | 11,197 | py | Python | scNLP_spaCy_GeneExpression_word2vec.py | alexcwsmith/scNLP | 1691316f1dc13774fa05b0e6ea075941667fa6b0 | [
"MIT"
] | 1 | 2021-06-23T13:07:29.000Z | 2021-06-23T13:07:29.000Z | scNLP_spaCy_GeneExpression_word2vec.py | alexcwsmith/scNLP | 1691316f1dc13774fa05b0e6ea075941667fa6b0 | [
"MIT"
] | null | null | null | scNLP_spaCy_GeneExpression_word2vec.py | alexcwsmith/scNLP | 1691316f1dc13774fa05b0e6ea075941667fa6b0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 1 12:48:08 2020
@author: smith
"""
import spacy
from gensim.test.utils import common_texts, get_tmpfile
from gensim.models import Word2Vec
from gensim.models.phrases import Phrases, Phraser
import os
import multiprocessing
import csv
import re
impo... | 42.093985 | 183 | 0.662945 |
f689cb30eecdf29de4c6be77cd697849835314bd | 180 | py | Python | cvp/setup.py | hashnfv/hashnfv-dovetail | 73f332fc513f184513be483db6a108bd3c7b7d9b | [
"Apache-2.0"
] | 1 | 2017-11-03T01:06:51.000Z | 2017-11-03T01:06:51.000Z | cvp/setup.py | hashnfv/hashnfv-dovetail | 73f332fc513f184513be483db6a108bd3c7b7d9b | [
"Apache-2.0"
] | null | null | null | cvp/setup.py | hashnfv/hashnfv-dovetail | 73f332fc513f184513be483db6a108bd3c7b7d9b | [
"Apache-2.0"
] | 2 | 2017-09-05T13:38:20.000Z | 2017-10-12T21:56:11.000Z | import setuptools
__author__ = 'serena'
try:
import multiprocessing # noqa
except ImportError:
pass
setuptools.setup(
setup_requires=['pbr==2.0.0'],
pbr=True)
| 12.857143 | 34 | 0.683333 |
f68a9ad9cd1070d7dee249f1f3d7af1fd606f8ce | 3,406 | py | Python | data_utils/preprocess.py | AnastasiiaNovikova/sentiment-discovery | eaae55921038d674e2f16fbd0bfd2e63194a9545 | [
"BSD-3-Clause"
] | null | null | null | data_utils/preprocess.py | AnastasiiaNovikova/sentiment-discovery | eaae55921038d674e2f16fbd0bfd2e63194a9545 | [
"BSD-3-Clause"
] | null | null | null | data_utils/preprocess.py | AnastasiiaNovikova/sentiment-discovery | eaae55921038d674e2f16fbd0bfd2e63194a9545 | [
"BSD-3-Clause"
] | 1 | 2019-03-13T11:43:13.000Z | 2019-03-13T11:43:13.000Z | import os
import re
import html
import unidecode
import torch
HTML_CLEANER_REGEX = re.compile('<.*?>')
def clean_html(text):
"""remove html div tags"""
return re.sub(HTML_CLEANER_REGEX, ' ', text)
def binarize_labels(labels, hard=True):
"""If hard, binarizes labels to values of 0 & 1. If soft thresholds... | 31.537037 | 139 | 0.654433 |
f68c3bc365dd845146ca474b6dad80a6bde410a7 | 659 | py | Python | Python/_10_09/2.3.19.py | MBkkt/Homework | db92bdb9262f1737d637f01d5cf2d3680e379a7b | [
"MIT"
] | 1 | 2019-04-07T18:27:29.000Z | 2019-04-07T18:27:29.000Z | Python/_10_09/2.3.19.py | MBkkt/Homework | db92bdb9262f1737d637f01d5cf2d3680e379a7b | [
"MIT"
] | 1 | 2019-10-02T23:01:01.000Z | 2019-10-02T23:01:01.000Z | Python/_10_09/2.3.19.py | MBkkt/Homework | db92bdb9262f1737d637f01d5cf2d3680e379a7b | [
"MIT"
] | 2 | 2018-10-19T22:42:54.000Z | 2019-03-10T14:57:59.000Z | """ . combinations. ,
n 2"
. - ,
. , = 3, :
,
( ). """
from itertools import combinations
if __name__ == '__main__':
n = int(input())
print(sum_comb(n))
| 34.684211 | 123 | 0.70258 |
f68c40097ffb41e51b2152c6fd56a2d8749d4869 | 2,445 | py | Python | KerasTest_XOR.py | RaduGrig/DeepLearning | 96bc451ea2c77f184df9c015a57068ada4363727 | [
"Apache-2.0"
] | null | null | null | KerasTest_XOR.py | RaduGrig/DeepLearning | 96bc451ea2c77f184df9c015a57068ada4363727 | [
"Apache-2.0"
] | null | null | null | KerasTest_XOR.py | RaduGrig/DeepLearning | 96bc451ea2c77f184df9c015a57068ada4363727 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Jun 16 22:19:57 2017
@author: RaduGrig
@inspiration: NikCleju
"""
# import stuff
from keras.optimizers import Adam
from keras.models import Sequential
from keras.layers import Dense, Activation
import numpy as np
import matplotlib.pyplot as plot
#Params
DataPoints = 100
No... | 31.753247 | 97 | 0.686299 |
f68cede11c2ec066665c8fcba60338febd58bbff | 221 | py | Python | lib/opentok/__init__.py | Rudi9719/booksearch-web | c48300e04ebdf2f01a990c67d4ff63d282da8168 | [
"Apache-2.0"
] | null | null | null | lib/opentok/__init__.py | Rudi9719/booksearch-web | c48300e04ebdf2f01a990c67d4ff63d282da8168 | [
"Apache-2.0"
] | null | null | null | lib/opentok/__init__.py | Rudi9719/booksearch-web | c48300e04ebdf2f01a990c67d4ff63d282da8168 | [
"Apache-2.0"
] | null | null | null | from .opentok import OpenTok, Roles, MediaModes, ArchiveModes
from .session import Session
from .archives import Archive, ArchiveList, OutputModes
from .exceptions import OpenTokException
from .version import __version__
| 36.833333 | 61 | 0.841629 |
f68d61972a56264e1422d85b1127e77df23bf4c2 | 2,130 | py | Python | src/rubrik_config/rubrik_config_base.py | rubrikinc/rubrik-config-backup | 4c421f5090064372f6e89673a5d445de8248ddda | [
"MIT"
] | 2 | 2021-01-27T21:15:24.000Z | 2021-06-08T17:31:15.000Z | src/rubrik_config/rubrik_config_base.py | rubrikinc/rubrik-config-backup | 4c421f5090064372f6e89673a5d445de8248ddda | [
"MIT"
] | 1 | 2020-12-10T07:01:09.000Z | 2020-12-10T07:01:09.000Z | src/rubrik_config/rubrik_config_base.py | rubrikinc/rubrik-config-backup | 4c421f5090064372f6e89673a5d445de8248ddda | [
"MIT"
] | null | null | null | import abc
import json
import os
from rubrik_config import helpers
| 26.296296 | 89 | 0.567606 |
f68d9b8db5553fd496f890e0ba612aaca3bab81b | 26,309 | py | Python | Gather_Data.py | batumoglu/Home_Credit | bf3f918bafdc0e9be1c24809068fac1242fff881 | [
"Apache-2.0"
] | 1 | 2019-11-04T08:49:34.000Z | 2019-11-04T08:49:34.000Z | Gather_Data.py | batumoglu/Home_Credit | bf3f918bafdc0e9be1c24809068fac1242fff881 | [
"Apache-2.0"
] | null | null | null | Gather_Data.py | batumoglu/Home_Credit | bf3f918bafdc0e9be1c24809068fac1242fff881 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon May 28 19:51:12 2018
@author: ozkan
"""
import pandas as pd
import numpy as np
#from sklearn.preprocessing import MinMaxScaler, LabelEncoder
from scipy import stats
import gc
import GatherTables | 47.661232 | 130 | 0.656505 |
f68df4f6b83e61acb9a971c85b9efef84578fc72 | 216 | py | Python | ois/data_request.py | pandincus/ois-service | 7ed45ea5a758f5b529d823aeda60b73a89da66e2 | [
"MIT"
] | 3 | 2018-07-09T04:02:01.000Z | 2018-08-29T09:57:36.000Z | ois/data_request.py | pandincus/ois-service | 7ed45ea5a758f5b529d823aeda60b73a89da66e2 | [
"MIT"
] | null | null | null | ois/data_request.py | pandincus/ois-service | 7ed45ea5a758f5b529d823aeda60b73a89da66e2 | [
"MIT"
] | null | null | null | from .data_request_type import DataRequestType
| 21.6 | 47 | 0.699074 |
f68e6d7c7601724ef28e0085ff5c928432db3954 | 15,242 | py | Python | doc/source/conf.py | OpenTreeOfLife/nexson | d2c803b58300ed5024bc1be98e280cfa8fefeb2e | [
"BSD-2-Clause"
] | null | null | null | doc/source/conf.py | OpenTreeOfLife/nexson | d2c803b58300ed5024bc1be98e280cfa8fefeb2e | [
"BSD-2-Clause"
] | null | null | null | doc/source/conf.py | OpenTreeOfLife/nexson | d2c803b58300ed5024bc1be98e280cfa8fefeb2e | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Sphinx configuration for nexson.
Largely based on Jeet Sukumaran's conf.py in DendroPy.
"""
import sys
import os
import time
from sphinx.ext import autodoc
from nexson import __version__ as PROJECT_VERSION
# -- Sphinx Hackery ------------------------------------------------
# Following ... | 32.778495 | 106 | 0.708831 |
f68e8c40892b76a4713ca99cffde2e9dcbf87b67 | 2,105 | py | Python | prev_ob_models/exclude/GilraBhalla2015/synapses/mitral_granule_NMDA.py | fameshpatel/olfactorybulb | 8d7a644b4560309ef177c0590ff73ed4c2432604 | [
"MIT"
] | null | null | null | prev_ob_models/exclude/GilraBhalla2015/synapses/mitral_granule_NMDA.py | fameshpatel/olfactorybulb | 8d7a644b4560309ef177c0590ff73ed4c2432604 | [
"MIT"
] | null | null | null | prev_ob_models/exclude/GilraBhalla2015/synapses/mitral_granule_NMDA.py | fameshpatel/olfactorybulb | 8d7a644b4560309ef177c0590ff73ed4c2432604 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import math
# The PYTHONPATH should contain the location of moose.py and _moose.so
# files. Putting ".." with the assumption that moose.py and _moose.so
# has been generated in ${MOOSE_SOURCE_DIRECTORY}/pymoose/ (as default
# pymoose build does) and this file i... | 38.981481 | 106 | 0.679335 |
f6900c8bcfbed26d0c4e1219d03eea149f0418aa | 31,420 | py | Python | marltoolbox/experiments/rllib_api/amtft_various_env.py | longtermrisk/marltoolbox | cae1ba94ccb44700b66a32e0734a0f11c9c6c7fe | [
"MIT"
] | 17 | 2021-01-17T21:21:08.000Z | 2022-01-27T00:57:30.000Z | marltoolbox/experiments/rllib_api/amtft_various_env.py | longtermrisk/marltoolbox | cae1ba94ccb44700b66a32e0734a0f11c9c6c7fe | [
"MIT"
] | 5 | 2021-02-21T21:43:00.000Z | 2021-05-04T12:27:23.000Z | marltoolbox/experiments/rllib_api/amtft_various_env.py | longtermrisk/marltoolbox | cae1ba94ccb44700b66a32e0734a0f11c9c6c7fe | [
"MIT"
] | 3 | 2021-02-21T11:38:22.000Z | 2022-03-04T12:06:19.000Z | import copy
import logging
import os
import ray
from ray import tune
from ray.rllib.agents import dqn
from ray.rllib.agents.dqn.dqn_torch_policy import postprocess_nstep_and_prio
from ray.rllib.utils import merge_dicts
from ray.rllib.utils.schedules import PiecewiseSchedule
from ray.tune.integration.wandb import Wandb... | 38.646986 | 125 | 0.614258 |
f690fa8f1e57e3fdc1e97a3ebbefe8d097b05980 | 1,370 | py | Python | src/core/utils/win32/media_control.py | younger-1/yasb | d0ad23e65eb481f7c05dde1e040f55bec2aa6689 | [
"MIT"
] | 53 | 2021-11-02T21:04:25.000Z | 2022-03-30T12:45:55.000Z | src/core/utils/win32/media_control.py | younger-1/yasb | d0ad23e65eb481f7c05dde1e040f55bec2aa6689 | [
"MIT"
] | 12 | 2021-12-02T05:06:18.000Z | 2022-03-20T13:39:07.000Z | src/core/utils/win32/media_control.py | younger-1/yasb | d0ad23e65eb481f7c05dde1e040f55bec2aa6689 | [
"MIT"
] | 4 | 2022-01-18T06:17:56.000Z | 2022-03-30T13:18:55.000Z | from winrt.windows.media.control import GlobalSystemMediaTransportControlsSessionManager
from winrt.windows.storage.streams import DataReader, Buffer, InputStreamOptions
| 36.052632 | 88 | 0.766423 |
f69101537e1714c27d7b564d92d8f58ca2160bfc | 4,001 | py | Python | lawerWeb/settings.py | xia-deng/lawerWeb | 6d2fe3642b2b7fbdda568e3af240bbcf6fda6c48 | [
"Apache-2.0"
] | null | null | null | lawerWeb/settings.py | xia-deng/lawerWeb | 6d2fe3642b2b7fbdda568e3af240bbcf6fda6c48 | [
"Apache-2.0"
] | null | null | null | lawerWeb/settings.py | xia-deng/lawerWeb | 6d2fe3642b2b7fbdda568e3af240bbcf6fda6c48 | [
"Apache-2.0"
] | null | null | null | """
Django settings for lawerWeb project.
Generated by 'django-admin startproject' using Django 2.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
... | 27.784722 | 121 | 0.699075 |
f691044e8c6bcf3b4b49b0a2b8a4fe8c5bbb4023 | 91 | py | Python | kriging/__init__.py | solab-ntu/kriging | 1f9b4144dd5a18c63f212473216593d5f1722c14 | [
"MIT"
] | null | null | null | kriging/__init__.py | solab-ntu/kriging | 1f9b4144dd5a18c63f212473216593d5f1722c14 | [
"MIT"
] | null | null | null | kriging/__init__.py | solab-ntu/kriging | 1f9b4144dd5a18c63f212473216593d5f1722c14 | [
"MIT"
] | null | null | null | from .kparam import Kparam
from .variogram import Variogram
from .utilities import predict
| 22.75 | 32 | 0.835165 |
f69215f25e7debe516c3b3acd6ad6f0976bbd082 | 1,338 | py | Python | custom_components/hdhomerun/__init__.py | Berserkir-Wolf/ha-hdhomerun | 2d62d37c21b4ee712c86b7f5241b39e5d42d90e7 | [
"MIT"
] | 4 | 2021-04-22T13:41:25.000Z | 2022-03-04T17:10:50.000Z | custom_components/hdhomerun/__init__.py | Berserkir-Wolf/ha-hdhomerun | 2d62d37c21b4ee712c86b7f5241b39e5d42d90e7 | [
"MIT"
] | null | null | null | custom_components/hdhomerun/__init__.py | Berserkir-Wolf/ha-hdhomerun | 2d62d37c21b4ee712c86b7f5241b39e5d42d90e7 | [
"MIT"
] | null | null | null | """The HDHomeRun component."""
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant import config_entries
from homeassistant.const import CONF_PORT
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
from .const import DOMAIN, CONF_HOST
DEVICE_SCHEMA = vol.... | 23.473684 | 78 | 0.670404 |
f692bbf1983670a97677d806c68b916963e86d4a | 2,542 | py | Python | expRT/BTS_Material.py | EJ-Chang/OSD-Study | d7029879fa95406daf8f8e67a15bf859e7bcbce9 | [
"MIT"
] | null | null | null | expRT/BTS_Material.py | EJ-Chang/OSD-Study | d7029879fa95406daf8f8e67a15bf859e7bcbce9 | [
"MIT"
] | 15 | 2020-04-17T08:38:50.000Z | 2020-06-04T10:01:50.000Z | expRT/BTS_Material.py | EJ-Chang/OSD-Study | d7029879fa95406daf8f8e67a15bf859e7bcbce9 | [
"MIT"
] | null | null | null | # Material
buttonType = ['Arrow button', 'Radio button', 'Switch button', 'Option']
requestLUT = [
{
'name' : 'Radio',
'on' : 'OSD_ImgFolder/radio_on.png',
'off' : 'OSD_ImgFolder/radio_off.png',
'default' : 'off',
'hint_path' : 'OSD_ImgFolder/L4 off.png',
'hint': 0
},
{
'nam... | 21.361345 | 84 | 0.486231 |
f6973c3813278e555197312de18aff5e1c09e73a | 2,142 | py | Python | URMC_CTSI_openbadge_analysis/Demo.py | VerolaX/Capstone-URMC | 754bff5699383d1270a2301d39f60ca4359952c7 | [
"MIT"
] | 1 | 2020-07-10T16:02:36.000Z | 2020-07-10T16:02:36.000Z | URMC_CTSI_openbadge_analysis/Demo.py | txiao3/Capstone-URMC | 754bff5699383d1270a2301d39f60ca4359952c7 | [
"MIT"
] | 1 | 2021-11-15T17:49:48.000Z | 2021-11-15T17:49:48.000Z | URMC_CTSI_openbadge_analysis/Demo.py | VerolaX/Capstone-URMC | 754bff5699383d1270a2301d39f60ca4359952c7 | [
"MIT"
] | 2 | 2019-11-15T19:44:27.000Z | 2020-06-12T16:39:22.000Z | import Dynamic_Network_Graph_Exploration_py3 as dynamic
import Data_Cleaning as dc
#import heatmap_functions as heatmap
#import Member_Distribution as dist
'''
So far the main method only includes dynamic network graph functions
Heatmap_functions and Member_Distribution functions to be added
'''
if __n... | 36.305085 | 92 | 0.639122 |
f697ae39334810b9255aec06cc2f5e7c7c446c65 | 6,606 | py | Python | evap/rewards/tests.py | karyon/EvaP | 9026fe0af4e261be73423131cfc52a7e655c82e6 | [
"MIT"
] | null | null | null | evap/rewards/tests.py | karyon/EvaP | 9026fe0af4e261be73423131cfc52a7e655c82e6 | [
"MIT"
] | null | null | null | evap/rewards/tests.py | karyon/EvaP | 9026fe0af4e261be73423131cfc52a7e655c82e6 | [
"MIT"
] | null | null | null | from django.conf import settings
from django_webtest import WebTest
from evap.evaluation.models import Course
from evap.evaluation.models import UserProfile
from evap.rewards.models import SemesterActivation
from evap.rewards.models import RewardPointRedemptionEvent
from evap.rewards.tools import reward_points_of_user
... | 45.558621 | 117 | 0.690887 |
f69968193f8656cf1f5a6508a5e4bdf8cffb6a3d | 1,416 | py | Python | tests/test_seo_client.py | bedroesb/ddipy | fec0c6954c6455ac2487c93542564a41909f715f | [
"Apache-2.0"
] | 1 | 2020-08-24T18:55:02.000Z | 2020-08-24T18:55:02.000Z | tests/test_seo_client.py | bedroesb/ddipy | fec0c6954c6455ac2487c93542564a41909f715f | [
"Apache-2.0"
] | 8 | 2020-02-04T10:19:45.000Z | 2021-02-09T17:08:52.000Z | tests/test_seo_client.py | bedroesb/ddipy | fec0c6954c6455ac2487c93542564a41909f715f | [
"Apache-2.0"
] | 2 | 2020-02-04T19:24:07.000Z | 2020-05-06T15:57:44.000Z | from unittest import TestCase
from ddipy.constants import MISSING_PARAMETER
from ddipy.ddi_utils import BadRequest
from ddipy.seo_client import SeoClient
| 29.5 | 124 | 0.637006 |
f6996c46ab316655cd0bf4a158ff83417ba37b8e | 3,900 | py | Python | construction/markdown.py | rik/mesconseilscovid | ff4b365a677da6bb73284ca5bba73651cde570e9 | [
"MIT"
] | null | null | null | construction/markdown.py | rik/mesconseilscovid | ff4b365a677da6bb73284ca5bba73651cde570e9 | [
"MIT"
] | null | null | null | construction/markdown.py | rik/mesconseilscovid | ff4b365a677da6bb73284ca5bba73651cde570e9 | [
"MIT"
] | null | null | null | import re
from textwrap import indent
import mistune
from jinja2 import Template
from .directives.injection import InjectionDirective
from .directives.renvoi import RenvoiDirective
from .directives.section import SectionDirective
from .directives.question import QuestionDirective
from .directives.toc import Directive... | 27.857143 | 92 | 0.647436 |
f699d90b4f3cca23aac7e6c012ba4fdf6a39d432 | 5,404 | py | Python | HMS/Hospital/models.py | Arshad360/Hospital-Management-System-Cse327-Projectr | 707ab80d021f8a2d10e28b25dd8df5aea512787a | [
"MIT"
] | 2 | 2021-02-10T18:10:30.000Z | 2021-04-27T18:07:51.000Z | HMS/Hospital/models.py | Arshad360/Hospital-Management-System-Cse327-Projectr | 707ab80d021f8a2d10e28b25dd8df5aea512787a | [
"MIT"
] | 1 | 2020-09-23T19:00:54.000Z | 2020-09-23T19:04:22.000Z | HMS/Hospital/models.py | Arshad360/Hospital-Management-System-Cse327-Projectr | 707ab80d021f8a2d10e28b25dd8df5aea512787a | [
"MIT"
] | 1 | 2021-05-02T17:11:33.000Z | 2021-05-02T17:11:33.000Z | from django.db import models
from django.contrib.auth.models import User
# Create your models here
# All the departments
departments = [('Cardiologist', 'Cardiologist'),
('Dermatologists', 'Dermatologists'),
('Emergency Medicine Specialists', 'Emergency Medicine Specialists'),
... | 29.210811 | 98 | 0.675611 |
f69a73d2180c85c42d121979fa3a85f52e293b5b | 2,008 | py | Python | intents/connectors/_experimental/snips/entities_test.py | dario-chiappetta/dialogflow_agents | ecb03bdce491a3c9d6769816507f3027fd5a60d1 | [
"Apache-2.0"
] | 6 | 2021-06-24T12:22:21.000Z | 2021-07-21T21:06:19.000Z | intents/connectors/_experimental/snips/entities_test.py | dario-chiappetta/dialogflow_agents | ecb03bdce491a3c9d6769816507f3027fd5a60d1 | [
"Apache-2.0"
] | 27 | 2021-06-05T10:41:08.000Z | 2021-11-01T17:29:38.000Z | intents/connectors/_experimental/snips/entities_test.py | dariowho/intents | ecb03bdce491a3c9d6769816507f3027fd5a60d1 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
import pytest
from intents import Sys
from intents.connectors._experimental.snips import entities
from intents.connectors._experimental.snips import prediction_format as pf
| 31.375 | 82 | 0.569721 |
f69bf13f443e655c01aa380fb78f77a007b8bcce | 150 | py | Python | src/tests/unit/common/test_common_management_commands.py | hnzlmnn/pretalx | fcdf1a03c9428c1207ee4f4228694b2ed8e7495b | [
"Apache-2.0"
] | 1 | 2018-12-09T12:35:10.000Z | 2018-12-09T12:35:10.000Z | src/tests/unit/common/test_common_management_commands.py | hnzlmnn/pretalx | fcdf1a03c9428c1207ee4f4228694b2ed8e7495b | [
"Apache-2.0"
] | 1 | 2019-07-05T20:03:42.000Z | 2019-07-05T20:03:42.000Z | src/tests/unit/common/test_common_management_commands.py | hnzlmnn/pretalx | fcdf1a03c9428c1207ee4f4228694b2ed8e7495b | [
"Apache-2.0"
] | null | null | null | import pytest
from django.core.management import call_command
| 18.75 | 47 | 0.813333 |
f69d29d7625c1a49845d962bb860467f26d1ff33 | 2,907 | py | Python | src/ui_elements/dropdown.py | MichalKacprzak99/WFIIS-3D-Graphics-2021 | 3daf87300daa6ba505d81a81c78f90be64c8dda4 | [
"MIT"
] | null | null | null | src/ui_elements/dropdown.py | MichalKacprzak99/WFIIS-3D-Graphics-2021 | 3daf87300daa6ba505d81a81c78f90be64c8dda4 | [
"MIT"
] | null | null | null | src/ui_elements/dropdown.py | MichalKacprzak99/WFIIS-3D-Graphics-2021 | 3daf87300daa6ba505d81a81c78f90be64c8dda4 | [
"MIT"
] | null | null | null | from typing import List, Optional
import pygame
from OpenGL.GL import *
from src.utils.drawing_utils import draw_texture, surface_to_texture
| 36.3375 | 111 | 0.602683 |
f69dfd5273c85c83e5fd287ed67d12b45233de18 | 43 | py | Python | simulation/device/simulated/air_conditioner/__init__.py | LBNL-ETA/LPDM | 3384a784b97e49cd7a801b758717a7107a51119f | [
"BSD-3-Clause-LBNL"
] | 2 | 2019-01-05T02:33:38.000Z | 2020-04-22T16:57:50.000Z | simulation/device/simulated/air_conditioner/__init__.py | LBNL-ETA/LPDM | 3384a784b97e49cd7a801b758717a7107a51119f | [
"BSD-3-Clause-LBNL"
] | 3 | 2019-04-17T18:13:08.000Z | 2021-04-23T22:40:23.000Z | simulation/device/simulated/air_conditioner/__init__.py | LBNL-ETA/LPDM | 3384a784b97e49cd7a801b758717a7107a51119f | [
"BSD-3-Clause-LBNL"
] | 1 | 2019-01-31T08:37:44.000Z | 2019-01-31T08:37:44.000Z | from air_conditioner import AirConditioner
| 21.5 | 42 | 0.906977 |
f69e65dd3ff7506ec8da4973473cc712782b9ed8 | 2,333 | py | Python | Chapter_2/rock_paper_scissors_functions.py | MrRiahi/Practices-of-the-Python-Pro | e1af57d31944a0b181890271639ac064eb151678 | [
"MIT"
] | null | null | null | Chapter_2/rock_paper_scissors_functions.py | MrRiahi/Practices-of-the-Python-Pro | e1af57d31944a0b181890271639ac064eb151678 | [
"MIT"
] | null | null | null | Chapter_2/rock_paper_scissors_functions.py | MrRiahi/Practices-of-the-Python-Pro | e1af57d31944a0b181890271639ac064eb151678 | [
"MIT"
] | null | null | null | import random
OPTIONS = ['rock', 'paper', 'scissors']
def print_options():
"""
This function prints game's options
:return:
"""
print('(1) Rock\n(2) Paper\n(3) Scissors')
def get_human_choice():
"""
This function gets the choice of the human
:return:
"""
human_choice_numb... | 27.127907 | 90 | 0.676811 |
f6a17ab311cc2ce265a769f7064d5bdc6f1392e2 | 899 | py | Python | ndcontainers/utils/mixins.py | MattEding/Array-Containers | 12156599d2f8f9e5f8cf5d3f784e98e2651e8bc1 | [
"MIT"
] | null | null | null | ndcontainers/utils/mixins.py | MattEding/Array-Containers | 12156599d2f8f9e5f8cf5d3f784e98e2651e8bc1 | [
"MIT"
] | null | null | null | ndcontainers/utils/mixins.py | MattEding/Array-Containers | 12156599d2f8f9e5f8cf5d3f784e98e2651e8bc1 | [
"MIT"
] | null | null | null | import inspect
import itertools
__all__ = ['NDArrayReprMixin']
| 31 | 77 | 0.607341 |
f6a1e1d0b083371e879f30be890154f2c8a815bc | 3,417 | py | Python | demo/python/horizon.py | ebraminio/astronomy-fork | f395ac486893858d9badd7a26181b2e392ec9fd5 | [
"MIT"
] | 138 | 2019-05-31T01:46:16.000Z | 2022-03-30T12:31:49.000Z | demo/python/horizon.py | ebraminio/astronomy-fork | f395ac486893858d9badd7a26181b2e392ec9fd5 | [
"MIT"
] | 152 | 2019-04-09T23:28:39.000Z | 2022-03-31T18:27:52.000Z | demo/python/horizon.py | ebraminio/astronomy-fork | f395ac486893858d9badd7a26181b2e392ec9fd5 | [
"MIT"
] | 19 | 2019-06-21T07:38:40.000Z | 2022-02-28T09:50:00.000Z | #!/usr/bin/env python3
#
# horizon.py - by Don Cross - 2019-12-18
#
# Example Python program for Astronomy Engine:
# https://github.com/cosinekitty/astronomy
#
# This is a more advanced example. It shows how to use coordinate
# transforms and a binary search to find the two azimuths where the
# ecli... | 35.968421 | 126 | 0.651156 |
f6a574e48a07bd8f39a756c8f8ad677e91f5bd1e | 1,101 | py | Python | ProtocolHandlerAddonPython/tools/step1settings.py | p--q/ProtocolHandlerAddonPython | 5dbb6034b4b9b7cb39cb9d397c812550668dd27f | [
"BSD-3-Clause"
] | null | null | null | ProtocolHandlerAddonPython/tools/step1settings.py | p--q/ProtocolHandlerAddonPython | 5dbb6034b4b9b7cb39cb9d397c812550668dd27f | [
"BSD-3-Clause"
] | null | null | null | ProtocolHandlerAddonPython/tools/step1settings.py | p--q/ProtocolHandlerAddonPython | 5dbb6034b4b9b7cb39cb9d397c812550668dd27f | [
"BSD-3-Clause"
] | null | null | null | #!/opt/libreoffice5.2/program/python
# -*- coding: utf-8 -*-
# This name will be rdb file name, .components file name, oxt file name.
BASE_NAME = "ProtocolHandlerAddonPython" # rdb.componentsoxt
# a list of a dict of Python UNO Component Files: (file name,service implementation name, service name,handled protocol)
L... | 55.05 | 204 | 0.722979 |
f6a747c50017c4e0b7f038e1a5a105c807c87a64 | 8,508 | py | Python | backup/socketbackend.py | bit0fun/plugins | 1f6f701bf1e60882b8fa61cb735e7033c8c29e3c | [
"BSD-3-Clause"
] | 173 | 2019-01-17T12:40:47.000Z | 2022-03-27T12:14:00.000Z | backup/socketbackend.py | bit0fun/plugins | 1f6f701bf1e60882b8fa61cb735e7033c8c29e3c | [
"BSD-3-Clause"
] | 284 | 2019-03-01T17:54:14.000Z | 2022-03-29T13:27:51.000Z | backup/socketbackend.py | bit0fun/plugins | 1f6f701bf1e60882b8fa61cb735e7033c8c29e3c | [
"BSD-3-Clause"
] | 92 | 2019-02-26T03:45:40.000Z | 2022-03-28T03:23:50.000Z | from collections import namedtuple
import json, logging, socket, re, struct, time
from typing import Tuple, Iterator
from urllib.parse import urlparse, parse_qs
from backend import Backend, Change
from protocol import PacketType, recvall, PKT_CHANGE_TYPES, change_from_packet, packet_from_change, send_packet, recv_pack... | 38.672727 | 165 | 0.608134 |
f6a8dbd297e720489b31ab7872d3338536905501 | 7,564 | py | Python | src/aac_map.py | vlomonaco/crlmaze | b9607b92b098ffb4fd350941f6c34aecd0ed0fe9 | [
"CC-BY-4.0"
] | 20 | 2019-05-27T16:38:59.000Z | 2021-04-06T16:24:10.000Z | src/aac_map.py | ThyLor/crlmaze | b9607b92b098ffb4fd350941f6c34aecd0ed0fe9 | [
"CC-BY-4.0"
] | 2 | 2021-04-08T15:52:17.000Z | 2021-09-08T13:16:29.000Z | src/aac_map.py | ThyLor/crlmaze | b9607b92b098ffb4fd350941f6c34aecd0ed0fe9 | [
"CC-BY-4.0"
] | 4 | 2019-06-19T07:55:28.000Z | 2020-12-20T22:02:06.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################################################
# Copyright (c) 2019. Vincenzo Lomonaco, Karan Desai, Eugenio Culurciello, #
# Davide Maltoni. All rights reserved. #
# See the accompanying LICENSE... | 37.078431 | 98 | 0.574167 |
f6a95519c740e8ae96e87997c89a4bc0b5d76c61 | 1,029 | py | Python | questions/8.py | xiaochus/LeetCode | bf4d7a39fd6b0fb2682490f90999cb218a910e14 | [
"MIT"
] | 1 | 2018-06-18T04:40:23.000Z | 2018-06-18T04:40:23.000Z | questions/8.py | xiaochus/LeetCode | bf4d7a39fd6b0fb2682490f90999cb218a910e14 | [
"MIT"
] | null | null | null | questions/8.py | xiaochus/LeetCode | bf4d7a39fd6b0fb2682490f90999cb218a910e14 | [
"MIT"
] | 1 | 2020-02-03T12:58:26.000Z | 2020-02-03T12:58:26.000Z | """8. String to Integer (atoi)
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a
challenge, please do not see below and ask yourself what are the
possible input cases.
Notes: It is intended for this problem to be specified vaguely
(ie, no given input sp... | 27.078947 | 65 | 0.556851 |
f6a98ab922bb283e3d03fe3c75cc8eb473f34455 | 95 | py | Python | models/dbconfig.py | FusionX9000/Reddit-Saves-Manager | 6109f3b40a992f99ba95346b1e39a2df07e1bcb7 | [
"MIT"
] | null | null | null | models/dbconfig.py | FusionX9000/Reddit-Saves-Manager | 6109f3b40a992f99ba95346b1e39a2df07e1bcb7 | [
"MIT"
] | 1 | 2021-06-02T01:12:35.000Z | 2021-06-02T01:12:35.000Z | models/dbconfig.py | FusionX9000/Reddit-Saves-Manager | 6109f3b40a992f99ba95346b1e39a2df07e1bcb7 | [
"MIT"
] | null | null | null | database = "database"
user = "postgres"
password = "password"
host = "localhost"
port = "5432"
| 15.833333 | 21 | 0.684211 |
f6a9f53335a90945beeac0881642656ecefd349b | 318 | py | Python | Programs/HowToUse.py | aposum23/laborathory14 | 03e251e267b5783b12ea9b2f4ba2da41194f349e | [
"MIT"
] | null | null | null | Programs/HowToUse.py | aposum23/laborathory14 | 03e251e267b5783b12ea9b2f4ba2da41194f349e | [
"MIT"
] | null | null | null | Programs/HowToUse.py | aposum23/laborathory14 | 03e251e267b5783b12ea9b2f4ba2da41194f349e | [
"MIT"
] | null | null | null |
mul(3, 4)
#12
mul5(2)
#10
mul(5)(2)
#10
test_fun = fun1(4)
test_fun(7)
#19
| 9.9375 | 20 | 0.512579 |
f6ab9a9d8d75aed7d16ae4d945c1c5fe7a289970 | 152 | py | Python | py_tdlib/constructors/set_bot_updates_status.py | Mr-TelegramBot/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 24 | 2018-10-05T13:04:30.000Z | 2020-05-12T08:45:34.000Z | py_tdlib/constructors/set_bot_updates_status.py | MrMahdi313/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 3 | 2019-06-26T07:20:20.000Z | 2021-05-24T13:06:56.000Z | py_tdlib/constructors/set_bot_updates_status.py | MrMahdi313/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 5 | 2018-10-05T14:29:28.000Z | 2020-08-11T15:04:10.000Z | from ..factory import Method
| 21.714286 | 45 | 0.743421 |
f6ac1d6095f521421f885471df134a2eb8d6bf74 | 811 | py | Python | Chapter 9/code1.py | PacktPublishing/Mastering-IPython-4 | d752f7ba38e0c9399a83d57da406fe26152f272b | [
"MIT"
] | 22 | 2016-06-07T07:52:35.000Z | 2021-11-08T13:12:21.000Z | Chapter 9/code1.py | PacktPublishing/Mastering-IPython-4 | d752f7ba38e0c9399a83d57da406fe26152f272b | [
"MIT"
] | 2 | 2016-05-23T08:20:54.000Z | 2018-07-02T08:21:32.000Z | Chapter 9/code1.py | PacktPublishing/Mastering-IPython-4 | d752f7ba38e0c9399a83d57da406fe26152f272b | [
"MIT"
] | 27 | 2016-05-23T08:19:51.000Z | 2021-08-31T02:46:00.000Z | """
This is an abbreviated version of my random number generator test suite.
It uses the pytest framework. It does not do much in this form.
"""
import numpy as np
import scipy.stats
import random
def foo( ):
""" I just needed a function outside of a class as an example"""
pass
| 24.575758 | 79 | 0.614057 |
f6ad70965cd923a8fabd51c9477be6519ca96f2f | 281 | py | Python | tests/test.py | J35P312/vcf2cytosure | e2867afc1a697c09a1f2f400e1a5ac3365499234 | [
"MIT"
] | 1 | 2019-01-21T11:37:43.000Z | 2019-01-21T11:37:43.000Z | tests/test.py | J35P312/vcf2cytosure | e2867afc1a697c09a1f2f400e1a5ac3365499234 | [
"MIT"
] | 39 | 2017-04-06T09:30:09.000Z | 2022-02-06T10:32:09.000Z | tests/test.py | J35P312/vcf2cytosure | e2867afc1a697c09a1f2f400e1a5ac3365499234 | [
"MIT"
] | 3 | 2017-04-06T09:28:24.000Z | 2020-06-25T09:30:26.000Z | import pytest
from unittest.mock import patch
import vcf2cytosure
| 23.416667 | 60 | 0.683274 |
f6af847c4409dc5698048181b6fa67b8dcf6d55a | 1,808 | py | Python | playback/db.py | Nierot/Spotify | 11dfe064cbd281c86473ef025d41f7eef293e81b | [
"MIT"
] | null | null | null | playback/db.py | Nierot/Spotify | 11dfe064cbd281c86473ef025d41f7eef293e81b | [
"MIT"
] | null | null | null | playback/db.py | Nierot/Spotify | 11dfe064cbd281c86473ef025d41f7eef293e81b | [
"MIT"
] | null | null | null | from . import models
def add_liked_track(user, track, term):
"""
Term is an integer, 1 for short_term, 2 for medium_term, and 3 for long_term
"""
liked_track = models.Liked_track(term=term, track=track, user=user)
liked_track.save()
return liked_track
def add_liked_artist(user, artist, term):... | 27.393939 | 81 | 0.690819 |
f6b1170ad7a3338dfad41aa494313487f0ff14fc | 767 | py | Python | invenio_records_rest/loaders/__init__.py | NRodriguezcuellar/invenio-records-rest | c4a3717afcf9b08b6e42f3529addecc64bb2e47c | [
"MIT"
] | 5 | 2017-10-22T00:13:49.000Z | 2019-10-04T11:35:18.000Z | invenio_records_rest/loaders/__init__.py | NRodriguezcuellar/invenio-records-rest | c4a3717afcf9b08b6e42f3529addecc64bb2e47c | [
"MIT"
] | 221 | 2015-10-30T23:27:52.000Z | 2022-03-07T13:17:55.000Z | invenio_records_rest/loaders/__init__.py | NRodriguezcuellar/invenio-records-rest | c4a3717afcf9b08b6e42f3529addecc64bb2e47c | [
"MIT"
] | 60 | 2015-10-30T22:43:27.000Z | 2022-02-10T10:08:08.000Z | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Loaders for deserializing records in the REST API."""
from ..schemas import Recor... | 28.407407 | 72 | 0.762712 |
f6b1308798ea655f67ea118514f86ed5643a557d | 665 | py | Python | tests/test_csvtodb.py | rv816/csvtodb | 020ef50e44e458cddeec84f42d3d6e372aa678df | [
"0BSD"
] | null | null | null | tests/test_csvtodb.py | rv816/csvtodb | 020ef50e44e458cddeec84f42d3d6e372aa678df | [
"0BSD"
] | null | null | null | tests/test_csvtodb.py | rv816/csvtodb | 020ef50e44e458cddeec84f42d3d6e372aa678df | [
"0BSD"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_csvtodb
----------------------------------
Tests for `csvtodb` module.
"""
import unittest
from csvtodb.csvtodb import *
testfix = [['foo', 'bar', 'yellow'], ['thing1', 'thing2', 3], ['green', 'purple', 10]]
| 19 | 86 | 0.593985 |
f6b177997afccd32ce4402f37f222e11eaf794c4 | 915 | py | Python | config.py | mscienski/code-challenge-starter-python-flask | 17f5856bdde0e7ea73dc7dab20b4b366e01a61a2 | [
"MIT"
] | null | null | null | config.py | mscienski/code-challenge-starter-python-flask | 17f5856bdde0e7ea73dc7dab20b4b366e01a61a2 | [
"MIT"
] | null | null | null | config.py | mscienski/code-challenge-starter-python-flask | 17f5856bdde0e7ea73dc7dab20b4b366e01a61a2 | [
"MIT"
] | null | null | null | #pylint: disable=no-member
import os
import logging
from flask import Flask
from flask_cors import CORS
from sqlalchemy.orm import sessionmaker
from flask_sqlalchemy import SQLAlchemy
host: str = os.getenv('DB_HOST', 'localhost')
port: int = int(os.getenv('DB_PORT', '5432'))
user: str = os.getenv('DB_USER', 'postgres'... | 29.516129 | 63 | 0.780328 |
f6b27fc8dc15fd2e2b41b5a9f80c430678ed9908 | 389 | py | Python | shared-data/python/tests/labware/__init__.py | Opentrons/protocol_framework | ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f | [
"Apache-2.0"
] | 2 | 2015-11-10T17:49:51.000Z | 2016-01-15T04:43:37.000Z | shared-data/python/tests/labware/__init__.py | Opentrons/labware | e21d8db51eac5818477264a45ef12c0a2d15fb72 | [
"Apache-2.0"
] | null | null | null | shared-data/python/tests/labware/__init__.py | Opentrons/labware | e21d8db51eac5818477264a45ef12c0a2d15fb72 | [
"Apache-2.0"
] | null | null | null | from typing import List, Tuple
from pathlib import Path
| 27.785714 | 84 | 0.627249 |
f6b3633afcaa133a55552fd744518177020a4b93 | 2,699 | py | Python | scripts/migrate_unconfirmed_valid_users.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | scripts/migrate_unconfirmed_valid_users.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | 4 | 2016-05-13T14:24:16.000Z | 2017-03-30T15:28:31.000Z | scripts/migrate_unconfirmed_valid_users.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Script to migrate users with a valid date_last_login but no date_confirmed."""
import sys
import logging
from django.utils import timezone
from website.app import init_app
from website.models import User
from scripts import utils as script_utils
from tests.base import... | 28.712766 | 98 | 0.659504 |
f6b528db6aa41bb01a751fc5e92895bd172d0c13 | 681 | py | Python | src/main/python/proc/expression/let.py | cjblink1/lang | 245b8d002341dce4fa5905b1f274770e34867c7e | [
"MIT"
] | null | null | null | src/main/python/proc/expression/let.py | cjblink1/lang | 245b8d002341dce4fa5905b1f274770e34867c7e | [
"MIT"
] | null | null | null | src/main/python/proc/expression/let.py | cjblink1/lang | 245b8d002341dce4fa5905b1f274770e34867c7e | [
"MIT"
] | null | null | null |
from proc.expression.expression import Expression
from proc.environment import Environment | 40.058824 | 123 | 0.735683 |
f6b7fa5f60e2de9db3a6e09ccdc529c81f6a56da | 203 | py | Python | cah/__init__.py | pordino/aikaterna-cogs | 07108bc808b571395e511586492f719c6582e72e | [
"Apache-2.0"
] | 98 | 2017-09-12T01:52:17.000Z | 2022-03-17T16:43:01.000Z | cah/__init__.py | pordino/aikaterna-cogs | 07108bc808b571395e511586492f719c6582e72e | [
"Apache-2.0"
] | 147 | 2016-12-01T04:39:05.000Z | 2022-02-13T02:20:14.000Z | cah/__init__.py | pordino/aikaterna-cogs | 07108bc808b571395e511586492f719c6582e72e | [
"Apache-2.0"
] | 160 | 2016-12-01T20:19:44.000Z | 2022-03-30T10:32:41.000Z | from .cah import CardsAgainstHumanity
__red_end_user_data_statement__ = "This cog does not persistently store data or metadata about users."
| 25.375 | 102 | 0.802956 |
f6b888452d4e63186e8b7dc8abfa403e51a0d83f | 895 | py | Python | apps/civic_pulse/management/commands/create_scraper_user.py | JimHafner/GovLens | ea44084255d5409fa25ab11b24562f4d14d51bd1 | [
"MIT"
] | 17 | 2019-08-21T07:58:05.000Z | 2021-09-03T20:00:56.000Z | apps/civic_pulse/management/commands/create_scraper_user.py | JimHafner/GovLens | ea44084255d5409fa25ab11b24562f4d14d51bd1 | [
"MIT"
] | 51 | 2019-08-20T23:00:10.000Z | 2022-03-11T23:45:35.000Z | apps/civic_pulse/management/commands/create_scraper_user.py | JimHafner/GovLens | ea44084255d5409fa25ab11b24562f4d14d51bd1 | [
"MIT"
] | 44 | 2019-08-30T01:45:53.000Z | 2021-09-30T23:27:02.000Z | """Idempotent management command to create the scraper user with a DRF token
"""
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
SCRAPER_USERNAME = "scraper"
| 33.148148 | 83 | 0.707263 |
f6b8bf7ed46f49468f699cdf6f50b8125f1977b6 | 1,591 | py | Python | Simulation/reaching_gym/render.py | wq13552463699/UCD_UR5E | 513acb7e235ab940fd03c3038208678e285690f3 | [
"MIT"
] | 5 | 2021-11-02T10:48:54.000Z | 2022-01-10T12:32:51.000Z | Simulation/reaching_gym/render.py | wq13552463699/UR5E_robot_gym_env_Real_and_Sim | 513acb7e235ab940fd03c3038208678e285690f3 | [
"MIT"
] | null | null | null | Simulation/reaching_gym/render.py | wq13552463699/UR5E_robot_gym_env_Real_and_Sim | 513acb7e235ab940fd03c3038208678e285690f3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 7 23:19:58 2021
@author: qiang
"""
import tensorflow.keras.backend as K
import tensorflow as tf
import time
from rl_symbol_env_continous import symbol_env_continous
from DDPG_keras import ActorCritic
from env_base import UR5_env
obs_dim = (10,)
... | 24.476923 | 86 | 0.706474 |
f6b926004f1740bebae35f7fc98b1abf6a61ed14 | 2,111 | py | Python | battingOrbowling_comp.py | ThomasAitken/Cricket-Modelling-Project | a0b8265c562d988dab16a145dc2e73225e2a4774 | [
"MIT"
] | null | null | null | battingOrbowling_comp.py | ThomasAitken/Cricket-Modelling-Project | a0b8265c562d988dab16a145dc2e73225e2a4774 | [
"MIT"
] | null | null | null | battingOrbowling_comp.py | ThomasAitken/Cricket-Modelling-Project | a0b8265c562d988dab16a145dc2e73225e2a4774 | [
"MIT"
] | null | null | null | #how to get a measure of batting or bowling strength? why it's simple! take top-100 rankings list at given period...
#what is score held by #1 player? normalise against this score (i.e. this score now equivalent to 1)
#now add up top 8 normalised scores for each nation's top 8 players in top 100 (set x: 0 <= x <= 1) .... | 39.830189 | 226 | 0.672667 |
f6b9ca45aa3335bdf8507d0c324366c72d34aef6 | 460 | py | Python | Python-Programming/apply_functions_to_args.py | clickok/Code-Snippets | 403796256a2ec1bd37b2deb4ce5052671a39048f | [
"MIT"
] | null | null | null | Python-Programming/apply_functions_to_args.py | clickok/Code-Snippets | 403796256a2ec1bd37b2deb4ce5052671a39048f | [
"MIT"
] | null | null | null | Python-Programming/apply_functions_to_args.py | clickok/Code-Snippets | 403796256a2ec1bd37b2deb4ce5052671a39048f | [
"MIT"
] | null | null | null | #!/usr/bin/python3
""" Applies a list of functions to command line arguments.
For quick-and-dirty command line argument handling.
"""
import sys
# List of functions to apply
funcLst = [int, int, float, float, int, int, int]
if __name__ == "__main__":
main() | 17.692308 | 59 | 0.663043 |
f6ba4c3ad84b5b9411ffe7603ebe9e1cc9a52bf6 | 3,583 | py | Python | slot_filling/corpus_server_direct.py | IBM/kgi-slot-filling | 24f8005bc1d010746e046a8c2ec292a2222fff00 | [
"Apache-2.0"
] | 21 | 2021-05-27T23:14:19.000Z | 2022-02-10T06:36:55.000Z | slot_filling/corpus_server_direct.py | IBM/retrieve-write-slot-filling | 24f8005bc1d010746e046a8c2ec292a2222fff00 | [
"Apache-2.0"
] | 1 | 2021-11-26T04:00:19.000Z | 2021-11-26T04:00:19.000Z | slot_filling/corpus_server_direct.py | IBM/kgi-slot-filling | 24f8005bc1d010746e046a8c2ec292a2222fff00 | [
"Apache-2.0"
] | 3 | 2021-06-04T13:14:22.000Z | 2022-03-09T14:45:50.000Z | #!/usr/bin/env python
# encoding: utf-8
from flask import Flask, request, jsonify
import base64
import numpy as np
from util.args_help import fill_from_args
import os
import logging
from dpr.simple_mmap_dataset import Corpus
from dpr.faiss_index import ANNIndex
logger = logging.getLogger(__name__)
if __name__ == '... | 36.561224 | 132 | 0.612057 |
f6bb83e5aaef3e05a37054dc4da7d7e3f6405a72 | 2,019 | py | Python | b2btool/rename/rename_to_jde.py | recs12/b2btool | 37108c856f1be399b2b90c31ee90afa5b828481f | [
"Apache-2.0",
"MIT"
] | null | null | null | b2btool/rename/rename_to_jde.py | recs12/b2btool | 37108c856f1be399b2b90c31ee90afa5b828481f | [
"Apache-2.0",
"MIT"
] | null | null | null | b2btool/rename/rename_to_jde.py | recs12/b2btool | 37108c856f1be399b2b90c31ee90afa5b828481f | [
"Apache-2.0",
"MIT"
] | null | null | null | import os
import shutil
import pandas as pd
from pathlib import Path
from b2btool.blob.storage import *
try:
conversion = pd.read_excel(
r"J:\PTCR\Users\RECS\.b2btool\drawings_to_jde.xlsx",
dtype={"ID": str, "JDE": str},
)
except FileNotFoundError as ex:
print(ex.args)
def rename_to_... | 29.691176 | 89 | 0.630015 |
f6bbb4bc704bc44c6e1985c37232af967115f61d | 1,849 | py | Python | nlp/extract/util/nlp_process.py | anndawn/ccij-water-search | 0ec153f3f9eaa0e80184f4ddc9b3bd7f2e29c2ba | [
"Apache-2.0"
] | null | null | null | nlp/extract/util/nlp_process.py | anndawn/ccij-water-search | 0ec153f3f9eaa0e80184f4ddc9b3bd7f2e29c2ba | [
"Apache-2.0"
] | null | null | null | nlp/extract/util/nlp_process.py | anndawn/ccij-water-search | 0ec153f3f9eaa0e80184f4ddc9b3bd7f2e29c2ba | [
"Apache-2.0"
] | 1 | 2020-11-05T07:04:59.000Z | 2020-11-05T07:04:59.000Z | import spacy
import pandas as pd
import numpy as np
# Given tokens, find sentences containing a keyword from texts
# Given tokens and a keyword, get the dependency of this keyword in sentences
# Given a df of news articles with texts,
# Get tokens with nlp
# Get sentences with a certain keyword in the text
# Get ... | 38.520833 | 87 | 0.66901 |
f6bccbdedb65751e2dbdc99d5d3f99b99bf35188 | 2,608 | py | Python | recipes/onedpl/all/conanfile.py | dvirtz/conan-center-index | 2e7a6337804325616f8d97e3a5b6f66cc72699cb | [
"MIT"
] | 562 | 2019-09-04T12:23:43.000Z | 2022-03-29T16:41:43.000Z | recipes/onedpl/all/conanfile.py | dvirtz/conan-center-index | 2e7a6337804325616f8d97e3a5b6f66cc72699cb | [
"MIT"
] | 9,799 | 2019-09-04T12:02:11.000Z | 2022-03-31T23:55:45.000Z | recipes/onedpl/all/conanfile.py | dvirtz/conan-center-index | 2e7a6337804325616f8d97e3a5b6f66cc72699cb | [
"MIT"
] | 1,126 | 2019-09-04T11:57:46.000Z | 2022-03-31T16:43:38.000Z | import os
from conans import ConanFile, CMake, tools
required_conan_version = ">=1.28.0"
| 39.515152 | 109 | 0.643788 |
f6be3f33c5cbe03b07efac65c5537f50b908734b | 573 | py | Python | grouper/ctl/base.py | aneeq009/merou | 7a87b43aaf64244932fa460842132a2d9329e704 | [
"Apache-2.0"
] | 58 | 2017-05-26T06:46:24.000Z | 2022-03-25T20:55:51.000Z | grouper/ctl/base.py | aneeq009/merou | 7a87b43aaf64244932fa460842132a2d9329e704 | [
"Apache-2.0"
] | 74 | 2017-06-16T17:48:37.000Z | 2022-03-28T23:09:54.000Z | grouper/ctl/base.py | aneeq009/merou | 7a87b43aaf64244932fa460842132a2d9329e704 | [
"Apache-2.0"
] | 43 | 2017-05-20T22:11:51.000Z | 2022-03-25T00:24:56.000Z | from abc import ABCMeta, abstractmethod
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from argparse import ArgumentParser, Namespace
| 24.913043 | 72 | 0.666667 |
f6c144a6777f88e0431ff780adf19960dca5e7ab | 6,798 | py | Python | noysim/geo.py | bertdecoensel/noysim | 0f45958093e3db453db8be6edc54f4cb1e119be0 | [
"MIT"
] | 1 | 2016-06-12T08:27:58.000Z | 2016-06-12T08:27:58.000Z | noysim/geo.py | bertdecoensel/noysim | 0f45958093e3db453db8be6edc54f4cb1e119be0 | [
"MIT"
] | null | null | null | noysim/geo.py | bertdecoensel/noysim | 0f45958093e3db453db8be6edc54f4cb1e119be0 | [
"MIT"
] | 1 | 2019-01-16T13:16:56.000Z | 2019-01-16T13:16:56.000Z | # Noysim -- Noise simulation tools for Aimsun.
# Copyright (c) 2010-2011 by Bert De Coensel, Ghent University & Griffith University.
#
# Basic geometry functions and classes
import numpy
import pylab
EPSILON = 10e-12 # smallest difference for points/directions
#-----------------------------------------... | 32.84058 | 115 | 0.529126 |
f6c1d658392020e0d6f57aed9f80cf163700273d | 197 | py | Python | aa.py | ani37/Hello-world | db3998f9ce110b145c48eda401c607acc726cd2c | [
"MIT"
] | null | null | null | aa.py | ani37/Hello-world | db3998f9ce110b145c48eda401c607acc726cd2c | [
"MIT"
] | null | null | null | aa.py | ani37/Hello-world | db3998f9ce110b145c48eda401c607acc726cd2c | [
"MIT"
] | 1 | 2018-10-27T10:14:24.000Z | 2018-10-27T10:14:24.000Z | MAX = 100000
MOD = pwo(10, 9) + 7
dp = [1 for in xrange(MAX)]
for i in xrange(7, MAX):
dp[i] = (dp[i - 1] + dp[i - 7]) % MOD
n = input()
for i in xrange(n):
k = input()
print dp[k]
| 16.416667 | 39 | 0.502538 |
f6c25e843d1f45408a584bccb97be735f0255735 | 17,651 | py | Python | pyrometheus/codegen/python.py | pyrometheus/pyrometheus | 9cfb6fb404173c132d1a92439cce0e4ed10d1406 | [
"MIT"
] | 7 | 2021-12-29T18:17:49.000Z | 2022-01-10T09:53:09.000Z | pyrometheus/codegen/python.py | pyrometheus/pyrometheus | 9cfb6fb404173c132d1a92439cce0e4ed10d1406 | [
"MIT"
] | 3 | 2022-02-06T01:22:09.000Z | 2022-03-16T15:20:16.000Z | pyrometheus/codegen/python.py | pyrometheus/pyrometheus | 9cfb6fb404173c132d1a92439cce0e4ed10d1406 | [
"MIT"
] | null | null | null | """
Python code generation
----------------------
.. autofunction:: gen_thermochem_code
.. autofunction:: get_thermochem_class
"""
__copyright__ = """
Copyright (C) 2020 Esteban Cisneros
Copyright (C) 2020 Andreas Kloeckner
"""
__license__ = """
Permission is hereby granted, free of charge, to any person obtaining... | 35.372745 | 89 | 0.622798 |
f6c294247659dfe928a49c1fe3981150196bea4a | 1,107 | py | Python | foxwall_api/urls.py | umtdemr/foxwall | 7854806774486bed1895c114f14398cacc90449c | [
"MIT"
] | null | null | null | foxwall_api/urls.py | umtdemr/foxwall | 7854806774486bed1895c114f14398cacc90449c | [
"MIT"
] | null | null | null | foxwall_api/urls.py | umtdemr/foxwall | 7854806774486bed1895c114f14398cacc90449c | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from drf_spectacular.views import (
SpectacularAPIView,
SpectacularRedocView,
SpectacularSwaggerView
)
urlpatterns = [
path('admin/', admin.site.urls),
... | 26.357143 | 69 | 0.650407 |
f6c4ba56f91f92449ed57ea8aedac277928e66b9 | 3,025 | py | Python | python/dash_tools/staticdownloader.py | jainsat/media-tools | 1f457d3a84dc3e1c8a5461774ebd45bcbb2eefb4 | [
"BSD-3-Clause"
] | 1 | 2021-04-26T06:34:08.000Z | 2021-04-26T06:34:08.000Z | python/dash_tools/staticdownloader.py | jainsat/media-tools | 1f457d3a84dc3e1c8a5461774ebd45bcbb2eefb4 | [
"BSD-3-Clause"
] | null | null | null | python/dash_tools/staticdownloader.py | jainsat/media-tools | 1f457d3a84dc3e1c8a5461774ebd45bcbb2eefb4 | [
"BSD-3-Clause"
] | 1 | 2020-05-18T22:08:07.000Z | 2020-05-18T22:08:07.000Z | #!/usr/bin/env python
import os
from common import fetch_file
import staticmpdparser
import client
import json
import pdb
def download(options, mpd_url=None, mpd_str=None, base_url=None, base_dst=""):
"Download MPD if url specified and then start downloading segments."
if mpd_url:
# First download the ... | 43.84058 | 180 | 0.669421 |
f6c60cbb47c6eb49ed0c025ad7108cd872063833 | 303 | py | Python | Python/Delta/Delta.py | jankupczyk/Proste-Programy-PY | 96d932a5869e71861de89422caf1329f9edcd5f3 | [
"MIT"
] | 1 | 2021-06-28T15:53:51.000Z | 2021-06-28T15:53:51.000Z | Python/Delta/Delta.py | jankupczyk/Proste-Programy-PY | 96d932a5869e71861de89422caf1329f9edcd5f3 | [
"MIT"
] | null | null | null | Python/Delta/Delta.py | jankupczyk/Proste-Programy-PY | 96d932a5869e71861de89422caf1329f9edcd5f3 | [
"MIT"
] | null | null | null | # Oblicza delte
a = int(input("Podaj [a]:"))
b = int(input("Podaj [b]:"))
c = int(input("Podaj [c]:"))
d = b**2-4*a*c
if d > 0:
print("2 rozwizania")
elif d == 0:
print("1 rozwizanie")
else:
print("0 rozwiza")
for i in range():
if i != 0:
print(i, end=" ")
| 17.823529 | 29 | 0.49505 |
f6c771f2f38897991f6c87629ffcfa7268ef1620 | 142 | py | Python | mealie/db/mongo/user_models.py | stevenroh/mealie | ba111073d652a2f34aea8324d0bce4203de34127 | [
"MIT"
] | null | null | null | mealie/db/mongo/user_models.py | stevenroh/mealie | ba111073d652a2f34aea8324d0bce4203de34127 | [
"MIT"
] | 1 | 2021-01-25T18:49:10.000Z | 2021-01-25T18:49:10.000Z | mealie/db/mongo/user_models.py | stevenroh/mealie | ba111073d652a2f34aea8324d0bce4203de34127 | [
"MIT"
] | null | null | null |
# import mongoengine
# class User(mongoengine.Document):
# username: mongoengine.EmailField()
# password: mongoengine.ReferenceField | 23.666667 | 42 | 0.753521 |
f6c87781dc296b3f3f472139665bb2dcb047df30 | 2,005 | py | Python | common/xrd-ui-tests-python/tests/xroad_global_groups_tests/XroadMemberRemoveFromGlobalGroup.py | nordic-institute/X-Road-tests | e030661a0ad8ceab74dd8122b751e88025a3474a | [
"MIT"
] | 1 | 2019-02-09T00:16:54.000Z | 2019-02-09T00:16:54.000Z | common/xrd-ui-tests-python/tests/xroad_global_groups_tests/XroadMemberRemoveFromGlobalGroup.py | nordic-institute/X-Road-tests | e030661a0ad8ceab74dd8122b751e88025a3474a | [
"MIT"
] | 1 | 2018-06-06T08:33:32.000Z | 2018-06-06T08:33:32.000Z | common/xrd-ui-tests-python/tests/xroad_global_groups_tests/XroadMemberRemoveFromGlobalGroup.py | nordic-institute/X-Road-tests | e030661a0ad8ceab74dd8122b751e88025a3474a | [
"MIT"
] | 3 | 2018-07-09T08:51:00.000Z | 2020-07-23T18:40:24.000Z | import unittest
from helpers import auditchecker, xroad
from main.maincontroller import MainController
from tests.xroad_global_groups_tests import global_groups_tests
| 43.586957 | 128 | 0.597007 |
f6c989f83c09341fd2147143a2556f4bde064d93 | 6,582 | py | Python | python/GafferTest/ExtensionAlgoTest.py | ddesmond/gaffer | 4f25df88103b7893df75865ea919fb035f92bac0 | [
"BSD-3-Clause"
] | 561 | 2016-10-18T04:30:48.000Z | 2022-03-30T06:52:04.000Z | python/GafferTest/ExtensionAlgoTest.py | ddesmond/gaffer | 4f25df88103b7893df75865ea919fb035f92bac0 | [
"BSD-3-Clause"
] | 1,828 | 2016-10-14T19:01:46.000Z | 2022-03-30T16:07:19.000Z | python/GafferTest/ExtensionAlgoTest.py | ddesmond/gaffer | 4f25df88103b7893df75865ea919fb035f92bac0 | [
"BSD-3-Clause"
] | 120 | 2016-10-18T15:19:13.000Z | 2021-12-20T16:28:23.000Z | ##########################################################################
#
# Copyright (c) 2019, John Haddon. 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 so... | 41.1375 | 133 | 0.692343 |
f6c9dadb66ba06561d5aa2ae635083ad448267fc | 494 | py | Python | sentimental_analysis.py | akrakman/hackillinois | a4cfb107aefb95ff987ba159e3c7867a9d10ce9a | [
"MIT"
] | null | null | null | sentimental_analysis.py | akrakman/hackillinois | a4cfb107aefb95ff987ba159e3c7867a9d10ce9a | [
"MIT"
] | null | null | null | sentimental_analysis.py | akrakman/hackillinois | a4cfb107aefb95ff987ba159e3c7867a9d10ce9a | [
"MIT"
] | null | null | null | from numpy import average, number
from textblob import TextBlob
| 22.454545 | 58 | 0.605263 |
f6ca9a419c623fefe3a83ca6f9ace8a92f85a66b | 2,753 | py | Python | chibi_command/lxc/lxc.py | dem4ply/chibi_command | 49efc3070bdf40e5f27146379487345b1accd427 | [
"WTFPL"
] | null | null | null | chibi_command/lxc/lxc.py | dem4ply/chibi_command | 49efc3070bdf40e5f27146379487345b1accd427 | [
"WTFPL"
] | null | null | null | chibi_command/lxc/lxc.py | dem4ply/chibi_command | 49efc3070bdf40e5f27146379487345b1accd427 | [
"WTFPL"
] | null | null | null | from chibi.atlas import Chibi_atlas
from chibi_command import Command, Command_result
from chibi_hybrid.chibi_hybrid import Chibi_hybrid
__all__ = [ 'Create', 'Start', 'Stop', 'Attach', 'Info', 'Destroy' ]
class Start( LXC ):
command = 'lxc-start'
captive = False
class Info( LXC ):
command = 'lxc... | 22.941667 | 79 | 0.54486 |
f6cb67b13096c25131faa2e988c43e882cde21bd | 166,942 | py | Python | SeagateSenseCodes.py | ssmore98/siod | 5e1bd2691710ebaf49223d52894c2b08aa958112 | [
"Unlicense"
] | null | null | null | SeagateSenseCodes.py | ssmore98/siod | 5e1bd2691710ebaf49223d52894c2b08aa958112 | [
"Unlicense"
] | null | null | null | SeagateSenseCodes.py | ssmore98/siod | 5e1bd2691710ebaf49223d52894c2b08aa958112 | [
"Unlicense"
] | null | null | null | seagate_sense_codes = {0: {0: {0: {0: 'No error.', 'L1': 'No Sense', 'L2': 'No Sense'},
31: {0: 'No Specific FRU code.',
'L1': 'No Sense',
'L2': 'Logical unit transitioning to another power condition'}},
... | 82.481225 | 297 | 0.40913 |
f6ce2226b79bcac9a02e30d6519e6b995825bb27 | 263 | py | Python | kuwala/common/python_utils/src/time_utils.py | bmahmoudyan/kuwala | 7951ed49ac1c31c874a4446bb4661152c4d69c90 | [
"Apache-2.0"
] | 381 | 2021-04-08T13:04:57.000Z | 2022-03-29T09:49:46.000Z | kuwala/common/python_utils/src/time_utils.py | bmahmoudyan/kuwala | 7951ed49ac1c31c874a4446bb4661152c4d69c90 | [
"Apache-2.0"
] | 92 | 2021-04-20T12:28:40.000Z | 2022-03-30T17:55:36.000Z | kuwala/common/python_utils/src/time_utils.py | bmahmoudyan/kuwala | 7951ed49ac1c31c874a4446bb4661152c4d69c90 | [
"Apache-2.0"
] | 27 | 2021-04-26T17:52:32.000Z | 2022-03-21T19:36:34.000Z | import time
from time import sleep
| 18.785714 | 75 | 0.608365 |
f6cea815c5270561f528bdb9b5e87bb0ee900148 | 8,218 | py | Python | adapted/adapt_cli.py | GoodTown/IDeAS-ADAPT-Client-GUI | 3b124cc1f8a9f49d1e84a90e519f4927e43ac547 | [
"Apache-2.0"
] | null | null | null | adapted/adapt_cli.py | GoodTown/IDeAS-ADAPT-Client-GUI | 3b124cc1f8a9f49d1e84a90e519f4927e43ac547 | [
"Apache-2.0"
] | null | null | null | adapted/adapt_cli.py | GoodTown/IDeAS-ADAPT-Client-GUI | 3b124cc1f8a9f49d1e84a90e519f4927e43ac547 | [
"Apache-2.0"
] | null | null | null | """ Adapt Server
This module contains all the functionality necessary to
setup an Adapt Server node (not really).
Example
-------
python3 adapt_server.py -v ingest -s testfile.txt
"""
import filesystem
from filesystem import FSOperationError
import sys
import os
import argparse
import logging
from general import... | 27.577181 | 112 | 0.582015 |
f6cf6e5adafcafd146a24c56c7720f6b81509ba4 | 1,229 | py | Python | app/classes.py | lightness/EmploymentAgency | ab9e4d339621a00a3f20a9e0e5a645e445188df0 | [
"Unlicense"
] | 1 | 2019-06-13T14:38:54.000Z | 2019-06-13T14:38:54.000Z | app/classes.py | lightness/EmploymentAgency | ab9e4d339621a00a3f20a9e0e5a645e445188df0 | [
"Unlicense"
] | null | null | null | app/classes.py | lightness/EmploymentAgency | ab9e4d339621a00a3f20a9e0e5a645e445188df0 | [
"Unlicense"
] | null | null | null | from django.core.urlresolvers import reverse, reverse_lazy
ALERT_TYPES = ("alert-success", "alert-info", "alert-warning", "alert-danger",)
BUTTON_TYPES = ("btn-default", "btn-primary", "btn-success", "btn-warning", "btn-danger", "btn-info", "btn-link",)
DEFAULT_ALERT_TYPE = ALERT_TYPES[0]
DEFAULT_BUTTON_TYPE = BUTTON... | 35.114286 | 114 | 0.6607 |
f6cf8e1e4cf3c4ec76807ee6ba0e6caf90f8c85f | 316 | py | Python | classes/__init__.py | OmarThinks/MoRG | fecf78e15453b0efa9223cd5196fea8176cdfdf3 | [
"MIT"
] | null | null | null | classes/__init__.py | OmarThinks/MoRG | fecf78e15453b0efa9223cd5196fea8176cdfdf3 | [
"MIT"
] | null | null | null | classes/__init__.py | OmarThinks/MoRG | fecf78e15453b0efa9223cd5196fea8176cdfdf3 | [
"MIT"
] | null | null | null | """
try:
from .NotReceived import NotReceived
from .errors import *
from .classreader import *
from .checkpoint import Checkpoint
except Exception as e:
from NotReceived import NotReceived
from errors import *
from classreader import *
from checkpoint import Checkpoint
"""
"""
import sys
print(sys.path)""" | 19.75 | 37 | 0.759494 |
f6cfba446c1b7d27bb2983b109b1c4404b84a1da | 2,084 | py | Python | project_name/project_name/settings/dev.py | aexeagmbh/django-project-template | 123c4bd8b79320b460677d8df42895600ad99393 | [
"MIT"
] | null | null | null | project_name/project_name/settings/dev.py | aexeagmbh/django-project-template | 123c4bd8b79320b460677d8df42895600ad99393 | [
"MIT"
] | null | null | null | project_name/project_name/settings/dev.py | aexeagmbh/django-project-template | 123c4bd8b79320b460677d8df42895600ad99393 | [
"MIT"
] | null | null | null | # coding=utf-8
"""Development settings and globals."""
from .base import *
# ######### DEBUG CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = True
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
TEMPLATE_DEBUG = DEBUG
# ######### END DEBUG CONFIGURATION... | 26.717949 | 93 | 0.712092 |
f6d0cac352b221bf2f7870f056af97d65cf0f1e3 | 354 | py | Python | examples/unlock_antidotes.py | astitva22/Pixelate-22-Sample-Arena | 0bee7aea075d760e60456d38225bb3d6d1b68fed | [
"MIT"
] | 1 | 2022-03-01T20:39:25.000Z | 2022-03-01T20:39:25.000Z | examples/unlock_antidotes.py | astitva22/Pixelate-22-Sample-Arena | 0bee7aea075d760e60456d38225bb3d6d1b68fed | [
"MIT"
] | null | null | null | examples/unlock_antidotes.py | astitva22/Pixelate-22-Sample-Arena | 0bee7aea075d760e60456d38225bb3d6d1b68fed | [
"MIT"
] | 7 | 2022-03-01T20:37:14.000Z | 2022-03-09T06:27:38.000Z | import gym
import pixelate_arena
import time
import pybullet as p
import os
if __name__ == "__main__":
parent_path = os.path.dirname(os.getcwd())
os.chdir(parent_path)
env = gym.make("pixelate_arena-v0")
x=0
while True:
p.stepSimulation()
if x==10000:
env.unlock_antidote... | 20.823529 | 46 | 0.629944 |
f6d1ef89f7ebaa279f2502614a3dee1d2c83c0b6 | 646 | py | Python | web_service/src/__init__.py | leckijakub/hipotap | 28fb20a165d0c50379828285efe18169e3ecce0f | [
"MIT"
] | null | null | null | web_service/src/__init__.py | leckijakub/hipotap | 28fb20a165d0c50379828285efe18169e3ecce0f | [
"MIT"
] | 4 | 2022-03-21T20:45:22.000Z | 2022-03-30T18:15:40.000Z | web_service/src/__init__.py | leckijakub/hipotap | 28fb20a165d0c50379828285efe18169e3ecce0f | [
"MIT"
] | null | null | null | from flask import Flask
| 26.916667 | 62 | 0.756966 |
f6d2aef8cfd625f778e471dacf0dbcddb046931b | 3,005 | py | Python | BertLibrary/models/BertModel.py | PinkDraconian/Bert-as-a-Library | 04171b439b970e9c0f4384095f9275ae5520c177 | [
"MIT"
] | 13 | 2019-08-06T14:26:57.000Z | 2021-09-20T15:05:29.000Z | BertLibrary/models/BertModel.py | PinkDraconian/Bert-as-a-Library | 04171b439b970e9c0f4384095f9275ae5520c177 | [
"MIT"
] | 1 | 2020-03-10T17:04:40.000Z | 2021-01-12T13:53:41.000Z | BertLibrary/models/BertModel.py | PinkDraconian/Bert-as-a-Library | 04171b439b970e9c0f4384095f9275ae5520c177 | [
"MIT"
] | 2 | 2021-03-16T11:40:39.000Z | 2021-07-06T19:21:50.000Z | import os
import tensorflow as tf
from BertLibrary.bert_predictor import BertPredictor
from BertLibrary.bert_trainer import BertTrainer
from BertLibrary.bert_evaluator import BertEvaluator
from tensorflow.estimator import Estimator
from tensorflow.estimator import RunConfig
from BertLibrary.bert.run_classifier import... | 34.94186 | 79 | 0.674542 |
f6d33fa7bc783b74658c4fb6fc2bd1803a290e65 | 2,331 | py | Python | neuroscout/tasks/utils.py | effigies/BLiMP | 509192cd593e0a496a441b08ac0e2d48f9627d55 | [
"BSD-3-Clause"
] | null | null | null | neuroscout/tasks/utils.py | effigies/BLiMP | 509192cd593e0a496a441b08ac0e2d48f9627d55 | [
"BSD-3-Clause"
] | null | null | null | neuroscout/tasks/utils.py | effigies/BLiMP | 509192cd593e0a496a441b08ac0e2d48f9627d55 | [
"BSD-3-Clause"
] | null | null | null | """ utils """
import json
import tarfile
from ..utils.db import put_record, dump_pe
from ..models import Analysis, PredictorEvent
from ..schemas.analysis import AnalysisFullSchema, AnalysisResourcesSchema
def write_jsons(objects, base_dir):
""" Write JSON objects to file
Args:
objects (list of tuples... | 31.931507 | 78 | 0.661948 |
f6d7d9fa5e972fea2d582789bda3bf36878133b2 | 3,673 | py | Python | test/priors/test_half_cauchy_prior.py | noamsgl/gpytorch | c3e3109c756ace47d82ff8b1f52b2d77748ff09c | [
"MIT"
] | 188 | 2017-06-09T20:42:18.000Z | 2018-02-15T11:17:09.000Z | test/priors/test_half_cauchy_prior.py | noamsgl/gpytorch | c3e3109c756ace47d82ff8b1f52b2d77748ff09c | [
"MIT"
] | 49 | 2017-07-18T02:55:17.000Z | 2018-02-15T21:23:42.000Z | test/priors/test_half_cauchy_prior.py | noamsgl/gpytorch | c3e3109c756ace47d82ff8b1f52b2d77748ff09c | [
"MIT"
] | 24 | 2017-07-12T17:29:52.000Z | 2018-02-15T19:25:07.000Z | #!/usr/bin/env python3
import unittest
import torch
from torch.distributions import HalfCauchy
from gpytorch.priors import HalfCauchyPrior
from gpytorch.test.utils import least_used_cuda_device
if __name__ == "__main__":
unittest.main()
| 41.738636 | 84 | 0.665941 |
f6d888c56b6287070e718e5217a701c20c0ee095 | 2,303 | py | Python | Tools/decrypt_ulog.py | lgarciaos/Firmware | 26dba1407bd1fbc65c23870a22fed904afba6347 | [
"BSD-3-Clause"
] | 4,224 | 2015-01-02T11:51:02.000Z | 2020-10-27T23:42:28.000Z | Tools/decrypt_ulog.py | lgarciaos/Firmware | 26dba1407bd1fbc65c23870a22fed904afba6347 | [
"BSD-3-Clause"
] | 11,736 | 2015-01-01T11:59:16.000Z | 2020-10-28T17:13:38.000Z | Tools/decrypt_ulog.py | lgarciaos/Firmware | 26dba1407bd1fbc65c23870a22fed904afba6347 | [
"BSD-3-Clause"
] | 11,850 | 2015-01-02T14:54:47.000Z | 2020-10-28T16:42:47.000Z | #!/usr/bin/env python3
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_OAEP
from Crypto.Cipher import ChaCha20
from Crypto.Hash import SHA256
import binascii
import argparse
#from pathlib import Path
import sys
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="""CLI tool t... | 36.555556 | 111 | 0.639601 |
f6dbbab722f0cfd5200a6eb72ad30ddd4c962c78 | 1,179 | py | Python | modules/math-codes/modules/algebra/linear-equations/src/test_slope.py | drigols/Studies | 9c293156935b491ded24be6b511daac67fd43538 | [
"MIT"
] | 1 | 2020-09-06T22:17:19.000Z | 2020-09-06T22:17:19.000Z | modules/math-codes/modules/algebra/linear-equations/src/test_slope.py | drigols/Studies | 9c293156935b491ded24be6b511daac67fd43538 | [
"MIT"
] | null | null | null | modules/math-codes/modules/algebra/linear-equations/src/test_slope.py | drigols/Studies | 9c293156935b491ded24be6b511daac67fd43538 | [
"MIT"
] | null | null | null | from matplotlib import pyplot as plt
import pandas as pd
df = pd.DataFrame ({'x': range(-10, 10+1)})
df['y'] = (3*df['x'] - 4) / 2
plt.figure(figsize=(10, 10))
plt.plot(df.x, df.y, color="grey", marker = "o")
plt.xlabel('x')
plt.ylabel('y = 3*x -4 / 2')
plt.title("Relao Linear entre as variveis x e y = 3*x -4/2")
plt... | 39.3 | 110 | 0.65564 |
f6de464d223fc210c33e43316c1d71d4ff532268 | 190 | py | Python | website/message/admin.py | m3alamin/message-system | 44b50be1426236483ff14e2ea3ed76755ad81ea8 | [
"MIT"
] | 1 | 2018-07-23T10:51:20.000Z | 2018-07-23T10:51:20.000Z | website/message/admin.py | m3alamin/message-system | 44b50be1426236483ff14e2ea3ed76755ad81ea8 | [
"MIT"
] | null | null | null | website/message/admin.py | m3alamin/message-system | 44b50be1426236483ff14e2ea3ed76755ad81ea8 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Message, Reply, Reader
# Register your models here.
admin.site.register(Message)
admin.site.register(Reply)
admin.site.register(Reader)
| 23.75 | 42 | 0.805263 |
f6ded3c6b708c223c654cc059475981aefcf7444 | 2,570 | py | Python | Authors' code/Few_shot_learning/models/selector.py | onicolini/zero-shot_knowledge_transfer | 9dd6d08eadb8243881f0fb8e9ac2d5653dd25229 | [
"MIT"
] | null | null | null | Authors' code/Few_shot_learning/models/selector.py | onicolini/zero-shot_knowledge_transfer | 9dd6d08eadb8243881f0fb8e9ac2d5653dd25229 | [
"MIT"
] | null | null | null | Authors' code/Few_shot_learning/models/selector.py | onicolini/zero-shot_knowledge_transfer | 9dd6d08eadb8243881f0fb8e9ac2d5653dd25229 | [
"MIT"
] | 1 | 2019-10-27T15:44:17.000Z | 2019-10-27T15:44:17.000Z | from models.lenet import *
from models.wresnet import *
import os
if __name__ == '__main__':
import torch
from torchsummary import summary
import random
import time
random.seed(1234) # torch transforms use this seed
torch.manual_seed(1234)
torch.cuda.manual_seed(1234)
support_x_task... | 38.939394 | 98 | 0.633463 |
f6df43c8e47a8e2830e3c578575609c364fe0d3b | 4,818 | py | Python | navigator/auth/handlers.py | phenobarbital/navigator-api | 15a0336b570ec861bdcc9c225e6f1b5684900a9d | [
"Apache-2.0",
"BSD-3-Clause"
] | 10 | 2020-07-27T03:33:20.000Z | 2022-02-18T21:25:49.000Z | navigator/auth/handlers.py | phenobarbital/navigator-api | 15a0336b570ec861bdcc9c225e6f1b5684900a9d | [
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2020-09-07T15:20:54.000Z | 2021-05-28T00:56:45.000Z | navigator/auth/handlers.py | phenobarbital/navigator-api | 15a0336b570ec861bdcc9c225e6f1b5684900a9d | [
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2020-07-27T07:36:45.000Z | 2021-09-26T18:36:34.000Z | # -*- coding: utf-8 -*-
#!/usr/bin/env python3
import asyncio
import base64
import json
import os
import sys
from aiohttp import web
from navigator.conf import (
DEBUG,
SESSION_PREFIX,
SESSION_URL,
SESSION_KEY,
config
)
from navigator.handlers import nav_exception_handler
from navigator.exception... | 29.558282 | 84 | 0.527397 |
f6e068263f9613c699cad7addbef56e8d591ae52 | 868 | py | Python | images.py | krutika-bhalla/Web-Scraping | 01169cc2d031b6d0353a1ff87b6d19d26d370af8 | [
"Apache-2.0"
] | null | null | null | images.py | krutika-bhalla/Web-Scraping | 01169cc2d031b6d0353a1ff87b6d19d26d370af8 | [
"Apache-2.0"
] | null | null | null | images.py | krutika-bhalla/Web-Scraping | 01169cc2d031b6d0353a1ff87b6d19d26d370af8 | [
"Apache-2.0"
] | null | null | null | from bs4 import BeautifulSoup
from PIL import Image
from io import BytesIO
import requests
import os
start_search() | 25.529412 | 72 | 0.599078 |
f6e0f69bab1cd6496a44232820ff0d043380ef43 | 12,822 | py | Python | repeat_cook_funcs.py | byu-imaal/dns-cookies-pam21 | a0e79a3538f2c32aa3f23d89b96ad1afe046d0f3 | [
"BSD-2-Clause"
] | null | null | null | repeat_cook_funcs.py | byu-imaal/dns-cookies-pam21 | a0e79a3538f2c32aa3f23d89b96ad1afe046d0f3 | [
"BSD-2-Clause"
] | null | null | null | repeat_cook_funcs.py | byu-imaal/dns-cookies-pam21 | a0e79a3538f2c32aa3f23d89b96ad1afe046d0f3 | [
"BSD-2-Clause"
] | null | null | null | """
Collection of functions for analyzing repeat cookie data
Designed to run a single function via CLI
"""
import argparse
import inspect
import json
import math
import subprocess
import sys
from collections import Counter
from collections import defaultdict
from shared.colors import color
from tqdm import tqdm
... | 36.016854 | 115 | 0.522461 |