hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8c34dd2058c81b02d9bdb503007afab45b651249 | 2,785 | py | Python | word2vec.py | SilhouettesForYou/Word2vec | 57c22f29e319362f6a63eb9d5caaa7445ff7aa5a | [
"MIT"
] | 1 | 2017-01-17T07:41:11.000Z | 2017-01-17T07:41:11.000Z | word2vec.py | SilhouettesForYou/Word2vec | 57c22f29e319362f6a63eb9d5caaa7445ff7aa5a | [
"MIT"
] | null | null | null | word2vec.py | SilhouettesForYou/Word2vec | 57c22f29e319362f6a63eb9d5caaa7445ff7aa5a | [
"MIT"
] | 1 | 2020-12-24T04:14:50.000Z | 2020-12-24T04:14:50.000Z | from __future__ import print_function
import math
import tensorflow as tf
from sklearn.manifold import TSNE
from word2vec_input import *
from word2vec_plot import *
dataset_path = 'dataset/'
dataset = 'text8.zip'
vocabulary_size = 50000
batch_size = 128
embedding_size = 128
skip_window = 1
num_skips = 2
num_sampled =... | 27.85 | 135 | 0.735368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 416 | 0.149372 |
8c35b9a559288af50f129e1366cee6c00d138f00 | 621 | py | Python | citeyoursoftware/main.py | rodluger/citeyoursoftware | 8bccb33a268653a7267163ccdc67df72e191b388 | [
"MIT"
] | 3 | 2021-11-12T17:17:00.000Z | 2021-11-12T20:30:41.000Z | citeyoursoftware/main.py | rodluger/citeyoursoftware | 8bccb33a268653a7267163ccdc67df72e191b388 | [
"MIT"
] | null | null | null | citeyoursoftware/main.py | rodluger/citeyoursoftware | 8bccb33a268653a7267163ccdc67df72e191b388 | [
"MIT"
] | null | null | null | from .packages import get_packages
from .pypi import get_pypi_bib
def get_bibliography(
env_file="environment.yml", env_path=None, exclude=["python"]
):
# Get all user-listed packages w/ channels & exact versions
packages = get_packages(env_file=env_file, env_path=None)
# Try to find BibTeX entries ... | 27 | 65 | 0.652174 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 172 | 0.276973 |
8c361112a2676ad3ae3884f67f664ad4e61ad19c | 179 | py | Python | Exercises/folhaDePagamento.py | JeffersonOliveira/Exercises--OO2-with-Python3 | 4c9022a06ea933cd83f30b8b60c2e947e0a3250e | [
"MIT"
] | null | null | null | Exercises/folhaDePagamento.py | JeffersonOliveira/Exercises--OO2-with-Python3 | 4c9022a06ea933cd83f30b8b60c2e947e0a3250e | [
"MIT"
] | null | null | null | Exercises/folhaDePagamento.py | JeffersonOliveira/Exercises--OO2-with-Python3 | 4c9022a06ea933cd83f30b8b60c2e947e0a3250e | [
"MIT"
] | null | null | null | class FolhaDePagamento:
@staticmethod
def log():
return f'Isso é um log qualquer.'
#folha = FolhaDePagamento()
#print(folha.log())
print(FolhaDePagamento.log()) | 17.9 | 41 | 0.681564 | 100 | 0.555556 | 0 | 0 | 71 | 0.394444 | 0 | 0 | 73 | 0.405556 |
8c37000baf6496730973b65b17d03f9252cd094e | 3,305 | py | Python | pytorch-edu/torch_learning.py | kedaduck/Python-Projects | 1fe41789d216d6c791587696a5ba67990479d5c2 | [
"Apache-2.0"
] | null | null | null | pytorch-edu/torch_learning.py | kedaduck/Python-Projects | 1fe41789d216d6c791587696a5ba67990479d5c2 | [
"Apache-2.0"
] | null | null | null | pytorch-edu/torch_learning.py | kedaduck/Python-Projects | 1fe41789d216d6c791587696a5ba67990479d5c2 | [
"Apache-2.0"
] | null | null | null | import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
print("Python Version:", torch.__version__)
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv1 = nn.Conv2d(1,... | 32.087379 | 77 | 0.621785 | 539 | 0.163086 | 0 | 0 | 0 | 0 | 0 | 0 | 236 | 0.071407 |
8c372a7bab044ef6bbb830a527f234fab884969a | 4,680 | py | Python | utils.py | aimir-lab/hebbian-learning-cnn | ddaf3a66c1c374960dc680f671e64f3f20387590 | [
"MIT"
] | 18 | 2019-09-13T10:19:11.000Z | 2021-11-13T22:05:06.000Z | utils.py | GabrieleLagani/HebbianLearningThesis | 0f98f7a3e380e55c9fca6340f4fb0cc5f24917d8 | [
"MIT"
] | null | null | null | utils.py | GabrieleLagani/HebbianLearningThesis | 0f98f7a3e380e55c9fca6340f4fb0cc5f24917d8 | [
"MIT"
] | 5 | 2019-11-24T08:16:14.000Z | 2021-02-15T11:41:18.000Z | import os
import csv
import matplotlib.pyplot as plt
import torch
import params as P
# Compute the shape of the output of the convolutional layers of a network. This is useful to correctly set the size of
# successive FC layers
def get_conv_output_shape(net):
training = net.training
net.eval()
# In order to compu... | 38.04878 | 121 | 0.738248 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,592 | 0.340171 |
8c386151db19fdbccad2e5d5ef88164358f52445 | 181 | py | Python | Chapter 01/Chap01_Example1.92.py | Anancha/Programming-Techniques-using-Python | e80c329d2a27383909d358741a5cab03cb22fd8b | [
"MIT"
] | null | null | null | Chapter 01/Chap01_Example1.92.py | Anancha/Programming-Techniques-using-Python | e80c329d2a27383909d358741a5cab03cb22fd8b | [
"MIT"
] | null | null | null | Chapter 01/Chap01_Example1.92.py | Anancha/Programming-Techniques-using-Python | e80c329d2a27383909d358741a5cab03cb22fd8b | [
"MIT"
] | null | null | null | # reading 2 numbers from the keyboard and printing maximum value
r = int(input("Enter the first number: "))
s = int(input("Enter the second number: "))
x = r if r>s else s
print(x)
| 30.166667 | 64 | 0.701657 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.646409 |
8c39b0ac142ab65ce1b2aa686569be1655292566 | 63,854 | py | Python | training/model.py | jim-schwoebel/allie | d85db041b91c81dfb3fd1a4d719b5aaaf3b6697e | [
"Apache-2.0"
] | 87 | 2020-08-07T09:05:11.000Z | 2022-01-24T00:48:22.000Z | training/model.py | jim-schwoebel/allie | d85db041b91c81dfb3fd1a4d719b5aaaf3b6697e | [
"Apache-2.0"
] | 87 | 2020-08-07T19:12:10.000Z | 2022-02-08T14:46:34.000Z | training/model.py | jim-schwoebel/allie | d85db041b91c81dfb3fd1a4d719b5aaaf3b6697e | [
"Apache-2.0"
] | 25 | 2020-08-07T20:03:08.000Z | 2022-03-16T07:33:25.000Z | '''
AAA lllllll lllllll iiii
A:::A l:::::l l:::::l i::::i
A:::::A l:::::l l:::::l iiii
A:::::::A l:::::l l:::::l
... | 36.973943 | 206 | 0.674915 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25,223 | 0.39501 |
8c3b859ba3434a9c4221dd64e613da84a1bae1bc | 2,896 | py | Python | migrations/versions/a2c88ed3a94a_.py | crossgovernmentservices/csd_notes | 0d69d8cad86446327c6bcadc03f7192e7d7cfb71 | [
"MIT"
] | null | null | null | migrations/versions/a2c88ed3a94a_.py | crossgovernmentservices/csd_notes | 0d69d8cad86446327c6bcadc03f7192e7d7cfb71 | [
"MIT"
] | null | null | null | migrations/versions/a2c88ed3a94a_.py | crossgovernmentservices/csd_notes | 0d69d8cad86446327c6bcadc03f7192e7d7cfb71 | [
"MIT"
] | null | null | null | """empty message
Revision ID: a2c88ed3a94a
Revises: None
Create Date: 2016-04-27 16:54:34.185442
"""
# revision identifiers, used by Alembic.
revision = 'a2c88ed3a94a'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###... | 39.135135 | 97 | 0.66989 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 932 | 0.321823 |
8c3bdf4d9c2e832816c1db1b0691647abd8a828a | 2,201 | py | Python | opus/opus_server.py | chezecz/research-project | 1a9c236398dc6b68967af0847b0461b390e760bd | [
"MIT"
] | null | null | null | opus/opus_server.py | chezecz/research-project | 1a9c236398dc6b68967af0847b0461b390e760bd | [
"MIT"
] | null | null | null | opus/opus_server.py | chezecz/research-project | 1a9c236398dc6b68967af0847b0461b390e760bd | [
"MIT"
] | null | null | null | import asyncio
import zlib
import queue
import threading
import audioop
from google.cloud import speech
from opuslib import Decoder
from config.config import Config
from config.config import Server
from config.config import Opus
buffer = queue.Queue()
buffer_response = queue.Queue()
dec = Decoder(Opus.rate, Opus.ch... | 28.217949 | 103 | 0.671967 | 433 | 0.196729 | 130 | 0.059064 | 0 | 0 | 0 | 0 | 13 | 0.005906 |
8c3d3f0d60b1efa71f513e96282456978c895ca2 | 9,423 | py | Python | Artesian/_Query/VersionedQuery.py | ARKlab/Artesian.SDK-Python | 79b54ad00526f5a75c400422fd1c0c8532b67436 | [
"MIT"
] | 2 | 2022-02-21T17:03:04.000Z | 2022-02-24T17:14:02.000Z | Artesian/_Query/VersionedQuery.py | ARKlab/Artesian.SDK-Python | 79b54ad00526f5a75c400422fd1c0c8532b67436 | [
"MIT"
] | 2 | 2020-02-06T10:03:35.000Z | 2022-03-01T09:39:54.000Z | Artesian/_Query/VersionedQuery.py | ARKlab/Artesian.SDK-Python | 79b54ad00526f5a75c400422fd1c0c8532b67436 | [
"MIT"
] | 1 | 2019-08-01T06:20:58.000Z | 2019-08-01T06:20:58.000Z | from Artesian._Query.Query import _Query
from Artesian._Query.QueryParameters.VersionedQueryParameters import VersionedQueryParameters
from Artesian._Query.Config.ExtractionRangeConfig import ExtractionRangeConfig
from Artesian._Query.Config.VersionSelectionType import VersionSelectionType
from Artesian._Configuration.... | 48.823834 | 184 | 0.685875 | 8,964 | 0.951289 | 0 | 0 | 0 | 0 | 0 | 0 | 1,247 | 0.132336 |
8c3d87d2655207c96ef42a62d50d37072057f3ba | 2,061 | py | Python | start.py | JoshuaMcroberts/DeliveryDilemmaLite | daac96edc140c82695b7d4103b1ecddf2742d1e6 | [
"MIT"
] | null | null | null | start.py | JoshuaMcroberts/DeliveryDilemmaLite | daac96edc140c82695b7d4103b1ecddf2742d1e6 | [
"MIT"
] | null | null | null | start.py | JoshuaMcroberts/DeliveryDilemmaLite | daac96edc140c82695b7d4103b1ecddf2742d1e6 | [
"MIT"
] | null | null | null | from libraries import *
from text import *
from game import *
from reception import recep
# DISPLAY HELP TEXT
def help_text():
clear_screen()
print_tab("Help text will go here!")
# DISPLAY ABOUT TEXT
def cred_text():
clear_screen()
print_tab(pr_colour("l_green","-- CREDITS --"))
print_tab("Intro ... | 22.16129 | 81 | 0.554585 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 642 | 0.311499 |
8c3e02647638f0368a8afcd89e3da556e43acf60 | 449 | py | Python | apps/store/urls.py | Quanfita/QTechCode | 78a3cac617a63bd46272461e6b1e89411e2fb130 | [
"MIT"
] | null | null | null | apps/store/urls.py | Quanfita/QTechCode | 78a3cac617a63bd46272461e6b1e89411e2fb130 | [
"MIT"
] | 9 | 2022-01-16T04:23:33.000Z | 2022-03-31T20:39:58.000Z | apps/store/urls.py | Quanfita/QTechCode | 78a3cac617a63bd46272461e6b1e89411e2fb130 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.urls import path
# from .views import goview
from .views import IndexView, DetailView, PayView, CallbackView, DeliverView
urlpatterns = [
path('', IndexView.as_view(), name='index'), # 主页,自然排序
path('goods/<slug:slug>/', DetailView.as_view(), name='detail'),
path('pay/',... | 37.416667 | 76 | 0.665924 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 161 | 0.347732 |
8c3e725f70992e52faf86f3d51a34179d2a39e52 | 853 | py | Python | day3/test_crossed_wires_part2.py | capsulecorplab/adventofcode2019 | a1a27f37dde23662bdca6950680d159a42035c36 | [
"MIT"
] | null | null | null | day3/test_crossed_wires_part2.py | capsulecorplab/adventofcode2019 | a1a27f37dde23662bdca6950680d159a42035c36 | [
"MIT"
] | null | null | null | day3/test_crossed_wires_part2.py | capsulecorplab/adventofcode2019 | a1a27f37dde23662bdca6950680d159a42035c36 | [
"MIT"
] | null | null | null | from crossed_wires import FuelManagementSystem
import pytest
class Test1:
@pytest.fixture
def fms(self):
return FuelManagementSystem("R8,U5,L5,D3", "U7,R6,D4,L4")
def test_steps_combined_min(self, fms):
assert fms.steps_combined_min() == 30
class Test2:
@pytest.fixture
def fms(s... | 24.371429 | 83 | 0.640094 | 783 | 0.917937 | 0 | 0 | 457 | 0.535756 | 0 | 0 | 178 | 0.208675 |
8c3ed5966f5972419e367c22f46baad392ad9753 | 8,958 | py | Python | pomdp.py | gongjue/pocm | 1f8ae819aaa7fa5f25878a0662a23cb457c1180b | [
"MIT"
] | null | null | null | pomdp.py | gongjue/pocm | 1f8ae819aaa7fa5f25878a0662a23cb457c1180b | [
"MIT"
] | null | null | null | pomdp.py | gongjue/pocm | 1f8ae819aaa7fa5f25878a0662a23cb457c1180b | [
"MIT"
] | null | null | null | import numpy as np
import cvxpy as cvx
import util
def set_contains_array(S, a):
"""
:param S: list of np.ndarray
:param a: np.ndarray
:return: contains, 0 or 1
"""
contains = 0
for b in S:
if not (a - b).any(): # if a contained in S
contains = 1
return contains
... | 28.169811 | 102 | 0.493414 | 3,392 | 0.378656 | 0 | 0 | 195 | 0.021768 | 0 | 0 | 2,346 | 0.261889 |
8c3ff9e8f67f58e9956e1fd3e9e7faf6decba1b4 | 1,105 | py | Python | main.py | bernatfogarasi/lempel-ziv-compression | 5c739c1bcbc405e6977e991c51fb48d687780d54 | [
"MIT"
] | null | null | null | main.py | bernatfogarasi/lempel-ziv-compression | 5c739c1bcbc405e6977e991c51fb48d687780d54 | [
"MIT"
] | null | null | null | main.py | bernatfogarasi/lempel-ziv-compression | 5c739c1bcbc405e6977e991c51fb48d687780d54 | [
"MIT"
] | null | null | null | def main():
STRING = "aababbabbaaba"
compressed = compress(STRING)
print(compressed)
decompressed = decompress(compressed)
print(decompressed)
def compress(string):
encode = {} # string -> code
known = ""
count = 0
result = []
for letter in string:
if known + letter in... | 22.55102 | 66 | 0.513122 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.060633 |
8c40196b9c28971e7054c903a03e0bb918a945dd | 9,448 | py | Python | scripts/process_gh_mapping.py | ptrebert/reference-data | 7bca069b8995660252d4f601976f9f7abaaf063b | [
"MIT"
] | null | null | null | scripts/process_gh_mapping.py | ptrebert/reference-data | 7bca069b8995660252d4f601976f9f7abaaf063b | [
"MIT"
] | null | null | null | scripts/process_gh_mapping.py | ptrebert/reference-data | 7bca069b8995660252d4f601976f9f7abaaf063b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
import os as os
import sys as sys
import traceback as trb
import argparse as argp
import csv as csv
import functools as fnt
import collections as col
import multiprocessing as mp
import numpy as np
import pandas as pd
import intervaltree as ivt
def parse_command_line():
"""
... | 37.943775 | 120 | 0.572714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,149 | 0.227456 |
8c413a0d2f5f6ff5e14c6c6a30c555a0cca041dd | 3,720 | py | Python | tests/test_save_load.py | dev-rinchin/RePlay | 85f0a17af73868a8284e06a7688845f072edee15 | [
"Apache-2.0"
] | 63 | 2021-09-03T19:09:09.000Z | 2022-03-31T12:35:35.000Z | tests/test_save_load.py | dev-rinchin/RePlay | 85f0a17af73868a8284e06a7688845f072edee15 | [
"Apache-2.0"
] | 63 | 2021-09-03T19:06:31.000Z | 2022-03-30T10:06:03.000Z | tests/test_save_load.py | dev-rinchin/RePlay | 85f0a17af73868a8284e06a7688845f072edee15 | [
"Apache-2.0"
] | 2 | 2021-12-23T16:57:33.000Z | 2022-02-22T07:54:03.000Z | # pylint: disable-all
from os.path import dirname, join
import pytest
import pandas as pd
from implicit.als import AlternatingLeastSquares
from pyspark.sql import functions as sf
import replay
from replay.model_handler import save, load
from replay.models import *
from tests.utils import sparkDataFrameEqual, long_lo... | 27.555556 | 75 | 0.672312 | 0 | 0 | 0 | 0 | 1,027 | 0.276075 | 0 | 0 | 268 | 0.072043 |
8c41961e1c04c3e4784f76d511a5d3c4a5d1d393 | 599 | py | Python | scripts/total_damage.py | Masanori-Suzu1024/mypkg | 1117d744fefd27caab9ff78d589335525cd0611e | [
"BSD-3-Clause"
] | null | null | null | scripts/total_damage.py | Masanori-Suzu1024/mypkg | 1117d744fefd27caab9ff78d589335525cd0611e | [
"BSD-3-Clause"
] | null | null | null | scripts/total_damage.py | Masanori-Suzu1024/mypkg | 1117d744fefd27caab9ff78d589335525cd0611e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# BSD 3-Clause "New" or "Revised" License
# Copyright (c) 2021, Masanori-Suzu1024 RyuichiUeda
# All rights reserved.
# Genshin is a copyrighted work of miHoYo co., Ltd
import rospy
from std_msgs.msg import Int32
n = 0
def cb(message):
global n
n = message.data
if __name__== '__mai... | 21.392857 | 56 | 0.639399 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.370618 |
8c41abbedc0d7fa2c291694a56f40b82034bd4ff | 113 | py | Python | download-deveres/para-execicios-curso-em-video/exe046.py | Hugo-Oliveira-RDO11/meus-deveres | b5e41015e2cb95946262678e82197e5f47d56271 | [
"MIT"
] | null | null | null | download-deveres/para-execicios-curso-em-video/exe046.py | Hugo-Oliveira-RDO11/meus-deveres | b5e41015e2cb95946262678e82197e5f47d56271 | [
"MIT"
] | null | null | null | download-deveres/para-execicios-curso-em-video/exe046.py | Hugo-Oliveira-RDO11/meus-deveres | b5e41015e2cb95946262678e82197e5f47d56271 | [
"MIT"
] | null | null | null | from time import sleep
for c in range(10, -1, -1):
print(c)
sleep(1)
print('BOMMMMMMMMM\nE ANO NOVO!!!')
| 18.833333 | 35 | 0.628319 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.247788 |
8c42c6c20316fe5c20318f93d3a8f8fb011455d2 | 2,257 | py | Python | sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/credential.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/credential.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/credential.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 36.403226 | 89 | 0.597696 | 1,738 | 0.770049 | 0 | 0 | 0 | 0 | 0 | 0 | 1,612 | 0.714222 |
8c4438cccb5b2cadc74299fb1db0d3d594a9e00e | 4,107 | py | Python | prime/postrefine/mod_partiality.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | prime/postrefine/mod_partiality.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | prime/postrefine/mod_partiality.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import division
from cctbx.array_family import flex
from scitbx.matrix import sqr, col
from cctbx.crystal_orientation import crystal_orientation, basis_type
import math
import numpy as np
class partiality_handler(object):
"""
mod_partiality:
1. Calculate partiality for given
miller indices, cry... | 41.908163 | 119 | 0.665206 | 3,901 | 0.949842 | 0 | 0 | 0 | 0 | 0 | 0 | 554 | 0.134892 |
8c444c182cfcbcbf6fc1fbb3f34c210eb99835c2 | 476 | py | Python | python/large-class/1_extract-class.py | mario21ic/refactoring-guru | a28730ebbcf54363cb98e921820198b50fc3204f | [
"MIT"
] | 1 | 2020-03-31T00:57:39.000Z | 2020-03-31T00:57:39.000Z | python/large-class/1_extract-class.py | mario21ic/refactoring-guru | a28730ebbcf54363cb98e921820198b50fc3204f | [
"MIT"
] | null | null | null | python/large-class/1_extract-class.py | mario21ic/refactoring-guru | a28730ebbcf54363cb98e921820198b50fc3204f | [
"MIT"
] | null | null | null | # When one class does the work of two, awkwardness results.
class Person:
def __init__(self, name, office_area_code, office_number):
self.name = name
self.office_area_code = office_area_code
self.office_number = office_number
def telephone_number(self):
return "%d-%d" % (s... | 29.75 | 68 | 0.680672 | 299 | 0.628151 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.17437 |
8c460136129c9f2340cb374d68977dc7a50439ea | 1,205 | py | Python | utils.py | btq/Seph_scrape | 441cdb342b5a3e1ef75f5f0861b34c26ee02012e | [
"MIT"
] | 1 | 2019-04-22T04:05:37.000Z | 2019-04-22T04:05:37.000Z | utils.py | btq/Seph_scrape | 441cdb342b5a3e1ef75f5f0861b34c26ee02012e | [
"MIT"
] | null | null | null | utils.py | btq/Seph_scrape | 441cdb342b5a3e1ef75f5f0861b34c26ee02012e | [
"MIT"
] | null | null | null | '''
every module in the system must use the following import:
from utils import log
'''
import os
import sys
import re
import logging
from subprocess import Popen, PIPE
from configparser import ConfigParser
#log_format = '%(asctime)s %(levelname)-8s [%(filename)s,%(lineno)d] %(message)s'
#logging.basicConfig(level=l... | 17.214286 | 90 | 0.635685 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 988 | 0.819917 |
8c4814a2ff66ec07a5796cfd425daedb33196a98 | 1,855 | py | Python | pcompile/tests/test_items.py | cb01/pcompile | d04bffc481291ca9586db94ce2ca9be6d8534e24 | [
"BSD-3-Clause"
] | 1 | 2016-12-04T02:46:17.000Z | 2016-12-04T02:46:17.000Z | pcompile/tests/test_items.py | cb01/pcompile | d04bffc481291ca9586db94ce2ca9be6d8534e24 | [
"BSD-3-Clause"
] | null | null | null | pcompile/tests/test_items.py | cb01/pcompile | d04bffc481291ca9586db94ce2ca9be6d8534e24 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from pcompile.items import NameRegistry, Items, min_container_type
from pcompile.tests.test_context import TestContext
from pcompile import ureg
import json
from pcompile.solution import Solution
class TestNameRegistry(unittest.TestCase):
def test_in... | 22.901235 | 77 | 0.653908 | 1,076 | 0.580054 | 0 | 0 | 0 | 0 | 0 | 0 | 708 | 0.381671 |
8c49489abc57b62bc37cd45f69e770e72a7d07cf | 2,805 | py | Python | SC101/SC101_week2/zonegraphics.py | ariel98po/SC101-projects | abc6e1672ca2e1c594e274945ec851f4e3a587ef | [
"MIT"
] | null | null | null | SC101/SC101_week2/zonegraphics.py | ariel98po/SC101-projects | abc6e1672ca2e1c594e274945ec851f4e3a587ef | [
"MIT"
] | null | null | null | SC101/SC101_week2/zonegraphics.py | ariel98po/SC101-projects | abc6e1672ca2e1c594e274945ec851f4e3a587ef | [
"MIT"
] | null | null | null | from campy.graphics.gwindow import GWindow
from campy.graphics.gobjects import GOval, GRect
from campy.gui.events.mouse import onmouseclicked
import random
WINDOW_WIDTH = 600
WINDOW_HEIGHT = 400
ZONE_WIDTH = 100
ZONE_HEIGHT = 100
BALL_RADIUS = 15
MAX_SPEED = 6
MIN_Y_SPEED = 2
class ZoneGraphics:
def __init__(se... | 32.616279 | 92 | 0.642068 | 2,524 | 0.899822 | 0 | 0 | 0 | 0 | 0 | 0 | 174 | 0.062032 |
8c49da13dca709daa5a8e6c290b24925848f9676 | 1,790 | py | Python | database_replication/python/mock_ripper.py | ryland-e-atkins/complexa | fa5ce6227f45227cdd6b27b5d63edd000c760e84 | [
"MIT"
] | null | null | null | database_replication/python/mock_ripper.py | ryland-e-atkins/complexa | fa5ce6227f45227cdd6b27b5d63edd000c760e84 | [
"MIT"
] | null | null | null | database_replication/python/mock_ripper.py | ryland-e-atkins/complexa | fa5ce6227f45227cdd6b27b5d63edd000c760e84 | [
"MIT"
] | null | null | null | # This module is used to combine and remove duplicates from raw mockaroo data
from subprocess import call
from util import *
# def generateCleanFiles():
# """
# DEPRECATED
# """
# filePrefix = 'mockaroo/mock_data_raw/'
# fileNames = [
# filePrefix + 'brandName/brandName1.csv',
... | 30.862069 | 98 | 0.644693 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,109 | 0.619553 |
8c49e119bd276ab8615c3a7f51eff37f3b42ea1c | 100 | py | Python | eval/scripts/__init__.py | mbatchkarov/dc_evaluation | 83fad49d597952957420b23c0d39c264c581e750 | [
"BSD-3-Clause"
] | null | null | null | eval/scripts/__init__.py | mbatchkarov/dc_evaluation | 83fad49d597952957420b23c0d39c264c581e750 | [
"BSD-3-Clause"
] | null | null | null | eval/scripts/__init__.py | mbatchkarov/dc_evaluation | 83fad49d597952957420b23c0d39c264c581e750 | [
"BSD-3-Clause"
] | null | null | null | __author__ = 'mmb28'
import sys
sys.path.append('.')
sys.path.append('..')
sys.path.append('../..') | 16.666667 | 24 | 0.63 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.21 |
8c4a0be60d8dc4aa18a2eafcee63ae8c7af73a85 | 268 | py | Python | LeetcodeAlgorithms/598. Range Addition II/range-addition-ii.py | Fenghuapiao/PyLeetcode | d804a62643fe935eb61808196a2c093ea9583654 | [
"MIT"
] | 3 | 2019-08-20T06:54:38.000Z | 2022-01-07T12:56:46.000Z | LeetcodeAlgorithms/598. Range Addition II/range-addition-ii.py | Fenghuapiao/PyLeetcode | d804a62643fe935eb61808196a2c093ea9583654 | [
"MIT"
] | null | null | null | LeetcodeAlgorithms/598. Range Addition II/range-addition-ii.py | Fenghuapiao/PyLeetcode | d804a62643fe935eb61808196a2c093ea9583654 | [
"MIT"
] | 2 | 2018-06-07T02:56:39.000Z | 2018-08-01T15:27:55.000Z | class Solution(object):
def maxCount(self, m, n, ops):
"""
:type m: int
:type n: int
:type ops: List[List[int]]
:rtype: int
"""
return reduce(operator.mul, map(min, zip(*ops + [[m,n]])))
| 26.8 | 67 | 0.440299 | 254 | 0.947761 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.436567 |
8c4a5299dfc921ff77539a9f3fcaeb8f4f33ab3c | 2,186 | py | Python | test/test3.py | v-smwang/AI-NLP-Tutorial | 3dbfdc7e19a025e00febab97f4948da8a3710f34 | [
"Apache-2.0"
] | null | null | null | test/test3.py | v-smwang/AI-NLP-Tutorial | 3dbfdc7e19a025e00febab97f4948da8a3710f34 | [
"Apache-2.0"
] | null | null | null | test/test3.py | v-smwang/AI-NLP-Tutorial | 3dbfdc7e19a025e00febab97f4948da8a3710f34 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# @author : wanglei
# @date : 2021/2/19 1:47 PM
# @description :
import numpy as np
"""
感应器对象
"""
class Perceptron(object):
"""
该方法为感应器的初始化方法
eta:学习速率
n_iter:学习次数(迭代次数)
"""
def __init__(self, eta=0.01, n_iter=10):
self.eta = eta
self.n_iter = n_iter
... | 26.658537 | 117 | 0.580512 | 2,440 | 0.766332 | 0 | 0 | 0 | 0 | 0 | 0 | 2,115 | 0.664259 |
8c4a69db0d9fe3cc86c43f136e4fb4d819ce00e6 | 3,982 | py | Python | python/depthcharge/arch/arm.py | youssefms/depthcharge | 51744abd4c92c8f49a47900cb02a3652744a4083 | [
"BSD-3-Clause"
] | null | null | null | python/depthcharge/arch/arm.py | youssefms/depthcharge | 51744abd4c92c8f49a47900cb02a3652744a4083 | [
"BSD-3-Clause"
] | null | null | null | python/depthcharge/arch/arm.py | youssefms/depthcharge | 51744abd4c92c8f49a47900cb02a3652744a4083 | [
"BSD-3-Clause"
] | null | null | null | # SPDX-License-Identifier: BSD-3-Clause
# Depthcharge: <https://github.com/nccgroup/depthcharge>
"""
ARM 32-bit support
"""
import os
import re
from .arch import Architecture
class ARM(Architecture):
"""
ARMv7 (or earlier) target information - 32-bit little-endian
"""
_desc = 'ARM 32-bit, little-end... | 32.373984 | 99 | 0.467353 | 3,802 | 0.954797 | 0 | 0 | 2,647 | 0.664741 | 0 | 0 | 1,497 | 0.375942 |
8c4acb5101a7563401d0c3e1503f91e74c7f281d | 392 | py | Python | server/ffstore/ErrorInfo.py | AsherYang/ThreeLine | 351dc8bfd1c0a536ffbf36ce8b1af953cc71f93a | [
"Apache-2.0"
] | 1 | 2017-05-02T10:02:28.000Z | 2017-05-02T10:02:28.000Z | server/ffstore/ErrorInfo.py | AsherYang/ThreeLine | 351dc8bfd1c0a536ffbf36ce8b1af953cc71f93a | [
"Apache-2.0"
] | null | null | null | server/ffstore/ErrorInfo.py | AsherYang/ThreeLine | 351dc8bfd1c0a536ffbf36ce8b1af953cc71f93a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
class OpenError(StandardError):
def __init__(self, error_code, error, error_info):
self.error_code = error_code
self.error = error
self.error_info = error_info
StandardError.__init__(self, error)
def __str__(self):
return 'Erro... | 30.153846 | 92 | 0.645408 | 348 | 0.887755 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.173469 |
8c4acfc3788d8bcf11dd124ebca2c1f4e65a2595 | 1,355 | py | Python | gdpr_search.py | thebirdsbeak/gdpr_search | 32eb19454589158dfc1d04eae6f627cab7e7b7b8 | [
"Unlicense"
] | null | null | null | gdpr_search.py | thebirdsbeak/gdpr_search | 32eb19454589158dfc1d04eae6f627cab7e7b7b8 | [
"Unlicense"
] | null | null | null | gdpr_search.py | thebirdsbeak/gdpr_search | 32eb19454589158dfc1d04eae6f627cab7e7b7b8 | [
"Unlicense"
] | null | null | null | import requests
import json
def search_article(search_art, j):
''' Searches GDPR by Article number '''
for line in j:
if search_art == line['article']:
print("\n{}({})\n{}".format(line['article'], line['num'], line['text']))
def search_text(search_term, j):
''' Searches GDPR by e... | 29.456522 | 172 | 0.538745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 362 | 0.267159 |
8c4b12f8f94b053d751d83aa1276be7fe1d62081 | 1,024 | py | Python | 191225/Python/solution.py | ktaletsk/daily-problem | 62ea445d499b8c5211eba635373102627e1d2710 | [
"MIT"
] | 1 | 2020-01-20T20:31:44.000Z | 2020-01-20T20:31:44.000Z | 191225/Python/solution.py | ktaletsk/daily-problem | 62ea445d499b8c5211eba635373102627e1d2710 | [
"MIT"
] | null | null | null | 191225/Python/solution.py | ktaletsk/daily-problem | 62ea445d499b8c5211eba635373102627e1d2710 | [
"MIT"
] | null | null | null | from collections import defaultdict
import copy
def get_next(current, d, finish):
flag=False
if len(d[current])==1:
if d[current][0]==finish and len(d.keys())==1:
flag= True
else:
new_d = copy.deepcopy(d)
new_current = d[current][0]
new_d.pop(cur... | 26.25641 | 64 | 0.556641 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.061523 |
8c4ef8962b42025bd9bfb340fd7c52343c5849b0 | 15,018 | py | Python | QtQmlViewport/Viewport.py | maxlem/pioneer.common.gui | e04ae85c9ffa87666090fa33285fd03c0c768ef3 | [
"BSD-3-Clause"
] | null | null | null | QtQmlViewport/Viewport.py | maxlem/pioneer.common.gui | e04ae85c9ffa87666090fa33285fd03c0c768ef3 | [
"BSD-3-Clause"
] | null | null | null | QtQmlViewport/Viewport.py | maxlem/pioneer.common.gui | e04ae85c9ffa87666090fa33285fd03c0c768ef3 | [
"BSD-3-Clause"
] | null | null | null | from QtQmlViewport import InFboRenderer, utils, Product, CustomActors
from QtQmlViewport.Actors import Actors, Renderable
from QtQmlViewport.Camera import Camera
from QtQmlViewport.Geometry import Geometry, BVH
from PyQt5.QtQuick import QQuickFramebufferObject
from PyQt5.QtGui import QMatrix4x4, QVector3D, QColor, qRg... | 40.15508 | 213 | 0.612665 | 14,572 | 0.970302 | 0 | 0 | 338 | 0.022506 | 0 | 0 | 2,254 | 0.150087 |
8c4f66064e678f01aa0db0a69b31d14b2f75ea3f | 575 | py | Python | examples/example_utils.py | rmorshea/purly | 0d07d6d7636fd81d9c1c14e2df6a32fc28b325f7 | [
"MIT"
] | 2 | 2018-08-18T05:39:24.000Z | 2018-08-21T19:02:16.000Z | examples/example_utils.py | rmorshea/purly | 0d07d6d7636fd81d9c1c14e2df6a32fc28b325f7 | [
"MIT"
] | 2 | 2018-07-27T07:14:19.000Z | 2018-07-27T07:17:06.000Z | examples/example_utils.py | rmorshea/purly | 0d07d6d7636fd81d9c1c14e2df6a32fc28b325f7 | [
"MIT"
] | null | null | null | import os
def localhost(protocol, port=8000):
"""Returns the host URL.
When examples are running on mybinder.org this is not simply "localhost" or
"127.0.0.1". Instead we use ``nbserverproxy`` whose proxy is used instead.
"""
if 'JUPYTERHUB_OAUTH_CALLBACK_URL' in os.environ:
protocol += '... | 31.944444 | 79 | 0.62087 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 309 | 0.537391 |
8c4fb46daef9f00f54d178b3d13b1196f12048c9 | 473 | py | Python | pyroomacoustics/experimental/__init__.py | oleg-alexandrov/pyroomacoustics | 4681b3cec21e09c54be50b2ee835115bcbc1d298 | [
"MIT"
] | 1 | 2020-02-14T22:32:55.000Z | 2020-02-14T22:32:55.000Z | pyroomacoustics/experimental/__init__.py | Bar-BY/pyroomacoustics | 45b45febdf93340a55a719942f2daa9efbef9960 | [
"MIT"
] | null | null | null | pyroomacoustics/experimental/__init__.py | Bar-BY/pyroomacoustics | 45b45febdf93340a55a719942f2daa9efbef9960 | [
"MIT"
] | 1 | 2021-01-14T08:42:47.000Z | 2021-01-14T08:42:47.000Z | """
Experimental
============
A bunch of routines useful when doing measurements and experiments.
"""
__all__ = [
"measure_ir",
"physics",
"point_cloud",
"delay_calibration",
"deconvolution",
"localization",
"signals",
"rt60",
]
from .deconvolution import *
from .delay_calibration imp... | 17.518519 | 67 | 0.672304 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 199 | 0.420719 |
8c507b40e4711ff99a8dd46ed57dd876787b8095 | 1,441 | py | Python | tekstovni_vmesnik.py | tjazerzen/Vislice-vaje2021 | a22f3e0c61f69dfe878d98f0538b44fbd7b4d0e1 | [
"MIT"
] | null | null | null | tekstovni_vmesnik.py | tjazerzen/Vislice-vaje2021 | a22f3e0c61f69dfe878d98f0538b44fbd7b4d0e1 | [
"MIT"
] | 2 | 2021-04-19T15:52:45.000Z | 2021-04-19T16:20:11.000Z | tekstovni_vmesnik.py | tjazerzen/Vislice-vaje2021 | a22f3e0c61f69dfe878d98f0538b44fbd7b4d0e1 | [
"MIT"
] | null | null | null | import model
def izpis_igre(igra):
return (
f"Igraš igro vislic:\n" +
f"Narobe ugibane črke so: {igra.nepravilni_ugibi()}\n" +
f"Trenutno stanje besede: {igra.pravilni_del_gesla()}\n"
)
def izpis_poraza(igra):
return (
f"Izgubil si. Več sreče prihodnjič.\n" +
f"Naro... | 25.280702 | 69 | 0.582929 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 610 | 0.419821 |
8c50e921602b656a4f5e46e589c187aad8d34c49 | 2,050 | py | Python | seoaudit/__main__.py | Guber/seoaudit | e38bc453629643f0282cdf9324e4f1db81f57f7f | [
"Apache-2.0"
] | 7 | 2019-12-10T17:05:14.000Z | 2020-11-10T10:10:45.000Z | seoaudit/__main__.py | Guber/seoaudit | e38bc453629643f0282cdf9324e4f1db81f57f7f | [
"Apache-2.0"
] | 3 | 2020-10-23T09:19:19.000Z | 2021-12-13T20:28:03.000Z | seoaudit/__main__.py | Guber/seoaudit | e38bc453629643f0282cdf9324e4f1db81f57f7f | [
"Apache-2.0"
] | null | null | null | import argparse
from seoaudit.analyzer.site_parser import SiteParser, LXMLPageParser
from seoaudit.analyzer.seo_auditor import SEOAuditor
def main():
"""The main routine."""
parser = argparse.ArgumentParser(description='Run SEO checks on a set of urls')
parser.add_argument('-u', '--url', action='append'... | 35.964912 | 112 | 0.641951 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 575 | 0.280488 |
8c528606a3a84a2bbb3d2d39a85c6d83188013fe | 4,305 | py | Python | .circleci/scripts/chlogger.py | hackaugusto/scenario-player | 0701bb986f47e1ec4a4fb7a469157826da1993e2 | [
"MIT"
] | null | null | null | .circleci/scripts/chlogger.py | hackaugusto/scenario-player | 0701bb986f47e1ec4a4fb7a469157826da1993e2 | [
"MIT"
] | null | null | null | .circleci/scripts/chlogger.py | hackaugusto/scenario-player | 0701bb986f47e1ec4a4fb7a469157826da1993e2 | [
"MIT"
] | null | null | null | import pathlib
import re
import subprocess
from typing import List, Tuple
from constants import PROJECT_GIT_DIR, CURRENT_BRANCH, COMMIT_PATTERN, COMMIT_TYPE
def read_git_commit_history_since_tag(
tag
) -> Tuple[List[Tuple[str, str]], List[Tuple[str, str]], List[Tuple[str, str]]]:
"""Return a list of ... | 31.195652 | 103 | 0.617189 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,671 | 0.388153 |
8c549c95fea72c967f3e44d56696e639a9c44785 | 12,339 | py | Python | bayesian_deep_learning/libs/distribution_shift_generator.py | mandt-lab/variational-beam-search | 61f217ed6ac6fdda0123f2b3bda37fa42fb4b4c2 | [
"MIT"
] | 1 | 2022-03-16T09:50:10.000Z | 2022-03-16T09:50:10.000Z | bayesian_deep_learning/libs/distribution_shift_generator.py | mandt-lab/variational-beam-search | 61f217ed6ac6fdda0123f2b3bda37fa42fb4b4c2 | [
"MIT"
] | null | null | null | bayesian_deep_learning/libs/distribution_shift_generator.py | mandt-lab/variational-beam-search | 61f217ed6ac6fdda0123f2b3bda37fa42fb4b4c2 | [
"MIT"
] | null | null | null | import struct
import sys
import pickle
import abc
import gzip
from copy import deepcopy
import numpy as np
import cv2
from albumentations import ShiftScaleRotate, ElasticTransform, HorizontalFlip
from albumentations import VerticalFlip, Compose
# if we want to apply deterministic elastic transformations, use the follo... | 33.529891 | 80 | 0.591863 | 11,847 | 0.960126 | 0 | 0 | 768 | 0.062242 | 0 | 0 | 2,366 | 0.19175 |
8c54ad4c8119847e922beb1d17182b424e160a27 | 819 | py | Python | Pre-Interview Challenges/camelcase.py | Wryhder/solve-with-code | 0fd1ef4f1c46ad89d68a667b3aaa6b98c69da266 | [
"MIT"
] | null | null | null | Pre-Interview Challenges/camelcase.py | Wryhder/solve-with-code | 0fd1ef4f1c46ad89d68a667b3aaa6b98c69da266 | [
"MIT"
] | null | null | null | Pre-Interview Challenges/camelcase.py | Wryhder/solve-with-code | 0fd1ef4f1c46ad89d68a667b3aaa6b98c69da266 | [
"MIT"
] | null | null | null | # Andela
"""
Problem Statement:
Write a function called camelCase that takes a string containing a Python-like variable name,
e.g. is_prime and turns it into the corresponding Java-like camel-case variable name, i.e. isPrime.
"""
def camelCase(python_var_name):
"""
This function takes a string containing a... | 27.3 | 99 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 455 | 0.555556 |
8c54d1bb115f902bf84d6ec2fd66b3e1daa99799 | 3,248 | py | Python | neighborapp/models.py | Maureen-1998DEV/watch_Hood | 44b644dc8a5c4dfbea7a1e90ac7fe79c5dbf9abb | [
"MIT"
] | null | null | null | neighborapp/models.py | Maureen-1998DEV/watch_Hood | 44b644dc8a5c4dfbea7a1e90ac7fe79c5dbf9abb | [
"MIT"
] | null | null | null | neighborapp/models.py | Maureen-1998DEV/watch_Hood | 44b644dc8a5c4dfbea7a1e90ac7fe79c5dbf9abb | [
"MIT"
] | null | null | null |
from django.db import models
from django.contrib.auth.models import User
from cloudinary.models import CloudinaryField
# Create your models here.
class Neighborhood(models.Model):
name = models.CharField(max_length = 50)
location = models.ForeignKey('Location',on_delete = models.CASCADE,null = True)
admin ... | 30.933333 | 117 | 0.703818 | 3,088 | 0.950739 | 0 | 0 | 281 | 0.086515 | 0 | 0 | 104 | 0.03202 |
8c59187ba750abcf04c6147479de2bce3f2491de | 751 | py | Python | oidc_provider/migrations/0029_auto_20190606_1218.py | omunozn/django-oidc-provider | 6f4822b56637aaa7ece92324123c26a36061d73a | [
"MIT"
] | 2 | 2018-10-05T01:17:57.000Z | 2020-10-07T21:07:20.000Z | oidc_provider/migrations/0029_auto_20190606_1218.py | omunozn/django-oidc-provider | 6f4822b56637aaa7ece92324123c26a36061d73a | [
"MIT"
] | null | null | null | oidc_provider/migrations/0029_auto_20190606_1218.py | omunozn/django-oidc-provider | 6f4822b56637aaa7ece92324123c26a36061d73a | [
"MIT"
] | 4 | 2018-10-30T14:47:12.000Z | 2020-05-06T19:11:55.000Z | # Generated by Django 2.2.2 on 2019-06-06 12:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('oidc_provider', '0028_auto_20190502_1654'),
]
operations = [
migrations.AddField(
model_name='code',
name='ae',
... | 25.896552 | 73 | 0.573901 | 658 | 0.876165 | 0 | 0 | 0 | 0 | 0 | 0 | 137 | 0.182423 |
8c5aabce04e618fe212d87594fcc8b26717a506f | 806 | py | Python | infra/lib/functions/hitcounter/update/adapters.py | haandol/aws-observability-example | 562e43cca1bd7e1488144856167d4b3f10986424 | [
"MIT"
] | null | null | null | infra/lib/functions/hitcounter/update/adapters.py | haandol/aws-observability-example | 562e43cca1bd7e1488144856167d4b3f10986424 | [
"MIT"
] | null | null | null | infra/lib/functions/hitcounter/update/adapters.py | haandol/aws-observability-example | 562e43cca1bd7e1488144856167d4b3f10986424 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from typing import Protocol, Callable
from aws_lambda_powertools import Tracer
tracer = Tracer()
class UpdateTable(Protocol):
update_item: Callable
class UpdateAdapter(ABC):
@abstractmethod
def update(self, path: str) -> int:
"""return hitCount for the given ... | 25.1875 | 50 | 0.626551 | 664 | 0.823821 | 0 | 0 | 465 | 0.576923 | 0 | 0 | 100 | 0.124069 |
8c5ec30a972f5c57beabebc879476a07e04ac93c | 3,213 | py | Python | lib/textwin.py | tomjackbear/python-0.9.1 | 00adeddadaede51e92447523266c9d5616201c38 | [
"FSFAP"
] | 4 | 2020-07-21T09:47:52.000Z | 2022-01-05T21:43:36.000Z | lib/textwin.py | tomjackbear/python-0.9.1 | 00adeddadaede51e92447523266c9d5616201c38 | [
"FSFAP"
] | 1 | 2020-09-23T20:46:33.000Z | 2020-09-23T20:59:57.000Z | lib/textwin.py | tomjackbear/python-0.9.1 | 00adeddadaede51e92447523266c9d5616201c38 | [
"FSFAP"
] | 4 | 2020-07-13T00:45:24.000Z | 2021-09-04T14:50:46.000Z | # Module 'textwin'
# Text windows, a subclass of gwin
import stdwin
import stdwinsupport
import gwin
S = stdwinsupport # Shorthand
def fixsize(w):
docwidth, docheight = w.text.getrect()[1]
winheight = w.getwinsize()[1]
if winheight > docheight: docheight = winheight
... | 26.775 | 70 | 0.522876 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 389 | 0.121071 |
8c5f2904d8a7ccc123c734d3345c1136cc5dcbc1 | 6,792 | py | Python | src/main/py/nlp_insights/nlp/acd/acd_to_fhir/confidence.py | LinuxForHealth/nlp-insights | c4e76fa06c448ac1d1f90f0b132971f2e1758af8 | [
"Apache-2.0"
] | null | null | null | src/main/py/nlp_insights/nlp/acd/acd_to_fhir/confidence.py | LinuxForHealth/nlp-insights | c4e76fa06c448ac1d1f90f0b132971f2e1758af8 | [
"Apache-2.0"
] | null | null | null | src/main/py/nlp_insights/nlp/acd/acd_to_fhir/confidence.py | LinuxForHealth/nlp-insights | c4e76fa06c448ac1d1f90f0b132971f2e1758af8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 IBM All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 33.623762 | 96 | 0.732479 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,358 | 0.494405 |
8c5f2bede9cc06a4686640d4cb2fefeae8c02adc | 9,876 | py | Python | dassh/correlations/flowsplit_ctd.py | khurrumsaleem/dassh | 8823e4b5256975a375391787558e5b6aba816251 | [
"BSD-3-Clause"
] | 11 | 2021-08-12T17:08:37.000Z | 2021-12-09T22:35:48.000Z | dassh/correlations/flowsplit_ctd.py | khurrumsaleem/dassh | 8823e4b5256975a375391787558e5b6aba816251 | [
"BSD-3-Clause"
] | 3 | 2021-11-24T21:15:36.000Z | 2022-03-25T14:00:52.000Z | dassh/correlations/flowsplit_ctd.py | khurrumsaleem/dassh | 8823e4b5256975a375391787558e5b6aba816251 | [
"BSD-3-Clause"
] | 2 | 2021-08-23T08:00:55.000Z | 2021-09-16T02:26:59.000Z | ########################################################################
# Copyright 2021, UChicago Argonne, LLC
#
# Licensed under the BSD-3 License (the "License"); you may not use
# this file except in compliance with the License. You may obtain a
# copy of the License at
#
# https://opensource.org/licenses/BSD-... | 38.578125 | 78 | 0.562576 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,743 | 0.581511 |
8c6005532028b79259ef2ccbde6cb3de137f6931 | 13,037 | py | Python | nexthop_summary.py | dalekirkman1/SecureCRT-tools | fd2e60cb0ec561da5c900a6396993c114d925c5a | [
"Apache-2.0"
] | 2 | 2021-03-18T05:14:24.000Z | 2022-03-30T08:54:49.000Z | nexthop_summary.py | dalekirkman1/SecureCRT-tools | fd2e60cb0ec561da5c900a6396993c114d925c5a | [
"Apache-2.0"
] | null | null | null | nexthop_summary.py | dalekirkman1/SecureCRT-tools | fd2e60cb0ec561da5c900a6396993c114d925c5a | [
"Apache-2.0"
] | 1 | 2021-02-18T23:46:22.000Z | 2021-02-18T23:46:22.000Z | # $language = "python"
# $interface = "1.0"
# ################################################ SCRIPT INFO ###################################################
# Author: Jamie Caesar
# Email: jcaesar@presidio.com
#
# This script will grab the route table information from a Cisco IOS or NXOS device and export deta... | 43.312292 | 119 | 0.635192 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,555 | 0.502723 |
8c61ef6649f0e4d09559b96c6697fc05d18d8b67 | 2,495 | py | Python | find_str_in_dump_bin.py | jasonivey/scripts | 09f9702e5ce62abbb7699aae16b45b33711fe856 | [
"MIT"
] | null | null | null | find_str_in_dump_bin.py | jasonivey/scripts | 09f9702e5ce62abbb7699aae16b45b33711fe856 | [
"MIT"
] | null | null | null | find_str_in_dump_bin.py | jasonivey/scripts | 09f9702e5ce62abbb7699aae16b45b33711fe856 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
import re
import fnmatch
import subprocess
import tempfile
import Utils
def GetFiles(dir, filePattern):
paths = []
for root, dirs, files in os.walk(dir):
for file in files:
if fnmatch.fnmatch(os.path.join(root, file), filePattern):
... | 31.1875 | 118 | 0.565932 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.11022 |
8c62511969548c233faf8da9c034a17e2c71d334 | 2,427 | py | Python | bracex/__main__.py | moreati/bracex | c8fcfa695cbf8cea27ac561e72a232c784f18deb | [
"MIT"
] | null | null | null | bracex/__main__.py | moreati/bracex | c8fcfa695cbf8cea27ac561e72a232c784f18deb | [
"MIT"
] | null | null | null | bracex/__main__.py | moreati/bracex | c8fcfa695cbf8cea27ac561e72a232c784f18deb | [
"MIT"
] | null | null | null | """
Expands a bash-style brace expression, and outputs each expansion.
Licensed under MIT
Copyright (c) 2018 - 2020 Isaac Muse <isaacmuse@gmail.com>
Copyright (c) 2021 Alex Willmer <alex@moreati.org.uk>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
docume... | 36.223881 | 113 | 0.711166 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,642 | 0.676555 |
8c62d14fe132aaad38555461feeef1e612b314fa | 2,974 | py | Python | libs/ALICE/parsing_ALICE.py | EGI-Foundation/impact-report | ed521405ebfa43968e94e9a0b60379ad9bc2b931 | [
"MIT"
] | null | null | null | libs/ALICE/parsing_ALICE.py | EGI-Foundation/impact-report | ed521405ebfa43968e94e9a0b60379ad9bc2b931 | [
"MIT"
] | 1 | 2020-11-16T09:43:43.000Z | 2020-11-16T11:03:28.000Z | libs/ALICE/parsing_ALICE.py | EGI-Foundation/impact-report | ed521405ebfa43968e94e9a0b60379ad9bc2b931 | [
"MIT"
] | 1 | 2021-02-26T11:31:27.000Z | 2021-02-26T11:31:27.000Z | #!/usr/bin/env python3
import csv
import os
import requests
from bs4 import BeautifulSoup
from dateutil.parser import parse
def print_details(url, csv_filename, years):
"""
Parsing the scientific publications from the web site and
export the list in a CSV file
"""
item_year = item_journal = ite... | 33.41573 | 86 | 0.481843 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 839 | 0.282112 |
8c62f4bb9a7fb6c749e7188ab59f9b09cd57ecf8 | 7,699 | py | Python | ohlc.py | liam-e/wsb-tracker | c05858ff67180e1a3cbdb58a2f89ef52ff0c842f | [
"MIT"
] | 1 | 2021-01-22T02:02:30.000Z | 2021-01-22T02:02:30.000Z | ohlc.py | liam-e/wsb-tracker | c05858ff67180e1a3cbdb58a2f89ef52ff0c842f | [
"MIT"
] | null | null | null | ohlc.py | liam-e/wsb-tracker | c05858ff67180e1a3cbdb58a2f89ef52ff0c842f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import datetime as dt
import os
import sys
import matplotlib as mpl
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
import matplotlib.ticker as mticker
import numpy as np
from matplotlib import style
from mplfinance.original_flavor import candlestick_ohlc
import data_loader
im... | 38.113861 | 120 | 0.561631 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,188 | 0.284193 |
8c6343dfd08cece5714c34b2c3f3052459ca0025 | 2,262 | py | Python | grapaold/layerfiles/gcomgraphand2.py | psorus/grapa | 6af343bb35c466c971ded1876e7a9d00e77cef00 | [
"MIT"
] | null | null | null | grapaold/layerfiles/gcomgraphand2.py | psorus/grapa | 6af343bb35c466c971ded1876e7a9d00e77cef00 | [
"MIT"
] | null | null | null | grapaold/layerfiles/gcomgraphand2.py | psorus/grapa | 6af343bb35c466c971ded1876e7a9d00e77cef00 | [
"MIT"
] | null | null | null | import numpy as np
import math
from tensorflow.keras import backend as K
from tensorflow.keras.layers import Layer,Dense, Activation
import tensorflow.keras as keras# as k
import tensorflow as t
from tensorflow.keras.models import Sequential
from tensorflow.keras.optimizers import Adam,SGD
from tensorflow.linalg impor... | 22.39604 | 123 | 0.645447 | 1,520 | 0.671972 | 0 | 0 | 0 | 0 | 0 | 0 | 373 | 0.164898 |
8c6372eae92e511cee18a6a07a3af3cd69edaeb3 | 9,077 | py | Python | rl/meta_ppo_agent.py | clvrai/coordination | 2b1bc8a6817b477f49c0cf6bdacd9c2f2e56f692 | [
"MIT"
] | 33 | 2020-02-15T07:52:05.000Z | 2021-12-27T04:19:45.000Z | rl/meta_ppo_agent.py | clvrai/coordination | 2b1bc8a6817b477f49c0cf6bdacd9c2f2e56f692 | [
"MIT"
] | null | null | null | rl/meta_ppo_agent.py | clvrai/coordination | 2b1bc8a6817b477f49c0cf6bdacd9c2f2e56f692 | [
"MIT"
] | 6 | 2020-10-12T01:37:02.000Z | 2022-02-21T12:49:49.000Z | import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from rl.dataset import ReplayBuffer, RandomSampler
from rl.base_agent import BaseAgent
from rl.policies.mlp_actor_critic import MlpActor, MlpCritic
from util.logger import logger
from util.mpi import mpi_average
from util.pytorch import ... | 37.6639 | 123 | 0.61452 | 8,575 | 0.944695 | 0 | 0 | 0 | 0 | 0 | 0 | 1,251 | 0.137821 |
8c63a890e4c7c21d82ab4e450776446d2c1bea12 | 978 | py | Python | article/tests.py | AngleMAXIN/nomooc | 0c06b8af405b8254c242b34e85b7cba99c8f5737 | [
"MIT"
] | 1 | 2019-12-04T03:20:16.000Z | 2019-12-04T03:20:16.000Z | article/tests.py | AngleMAXIN/NoMooc | 0c06b8af405b8254c242b34e85b7cba99c8f5737 | [
"MIT"
] | null | null | null | article/tests.py | AngleMAXIN/NoMooc | 0c06b8af405b8254c242b34e85b7cba99c8f5737 | [
"MIT"
] | null | null | null |
# Create your tests here.
from article.db_manager.article_manager import create_article_db
from utils.api.tests import APIClient, APITestCase
from utils.constants import ArticleTypeChoice
from utils.shortcuts import rand_str
def mock_create_article(title=None, content=None, art_type=None, owner_id=None):
title =... | 34.928571 | 80 | 0.723926 | 433 | 0.44274 | 0 | 0 | 0 | 0 | 0 | 0 | 112 | 0.114519 |
8c63e675baf1b7e7f373786c7af3c27f18480a82 | 756 | py | Python | util/geometry.py | c-ali/boomgan | 0fd1d13149d8d5719d12aa36f09f46461ca29dbb | [
"MIT"
] | 3 | 2022-03-14T12:41:16.000Z | 2022-03-19T01:11:43.000Z | util/geometry.py | c-ali/boomgan | 0fd1d13149d8d5719d12aa36f09f46461ca29dbb | [
"MIT"
] | null | null | null | util/geometry.py | c-ali/boomgan | 0fd1d13149d8d5719d12aa36f09f46461ca29dbb | [
"MIT"
] | 1 | 2022-03-14T12:41:18.000Z | 2022-03-14T12:41:18.000Z | import numpy as np
def orthogonalize(normal, non_ortho):
h = normal * non_ortho
return non_ortho - normal * h
def make_orthonormal_vector(normal, dims=512):
# random unit vector
rand_dir = np.random.randn(dims)
# make orthonormal
result = orthogonalize(normal, rand_dir)
return result / n... | 29.076923 | 178 | 0.665344 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.116402 |
8c647caabdd38ccf3ebcf3bcf1fbd6e8fff030ed | 45,129 | py | Python | services/models.py | hanaahajj/Serviceinfo_hanaa | 829de07b39fbf17c102799edb9d48a88b11a7540 | [
"BSD-3-Clause"
] | null | null | null | services/models.py | hanaahajj/Serviceinfo_hanaa | 829de07b39fbf17c102799edb9d48a88b11a7540 | [
"BSD-3-Clause"
] | null | null | null | services/models.py | hanaahajj/Serviceinfo_hanaa | 829de07b39fbf17c102799edb9d48a88b11a7540 | [
"BSD-3-Clause"
] | null | null | null | from collections import defaultdict
from django.conf import settings
from django.contrib.gis.db import models
from django.contrib.gis.geos import Point
from django.contrib.sites.models import Site
from django.core.exceptions import ValidationError
from django.core.urlresolvers import reverse
from django.core.validators... | 36.335749 | 98 | 0.596379 | 44,143 | 0.978152 | 0 | 0 | 1,185 | 0.026258 | 0 | 0 | 12,039 | 0.266769 |
4fb19360602138faa0d22fba8d442fb8c1895535 | 1,792 | py | Python | accounts/models.py | barissaslan/eventhub | 37aa005b3f2eab9a2c6c48d30b2f7f4483fa6749 | [
"MIT"
] | 4 | 2017-11-13T19:51:25.000Z | 2020-12-08T17:19:31.000Z | accounts/models.py | barissaslan/eventhub | 37aa005b3f2eab9a2c6c48d30b2f7f4483fa6749 | [
"MIT"
] | null | null | null | accounts/models.py | barissaslan/eventhub | 37aa005b3f2eab9a2c6c48d30b2f7f4483fa6749 | [
"MIT"
] | 3 | 2018-05-19T08:37:42.000Z | 2020-12-08T17:19:34.000Z | from django.db import models
from django.contrib.auth.models import BaseUserManager, AbstractBaseUser
from event.models import Event
class UserManager(BaseUserManager):
def create_user(self, email, password=None):
if not email:
raise ValueError('Users must have an email address')
user... | 25.971014 | 72 | 0.648996 | 1,652 | 0.921875 | 0 | 0 | 62 | 0.034598 | 0 | 0 | 63 | 0.035156 |
4fb1eb801d7587deecd0cef69ce7045da334f1cc | 161 | py | Python | tracer/test.py | leopiney/tscf | d98fbfe06abbf1d29458ddd147b7f1d99118e4ed | [
"MIT"
] | null | null | null | tracer/test.py | leopiney/tscf | d98fbfe06abbf1d29458ddd147b7f1d99118e4ed | [
"MIT"
] | null | null | null | tracer/test.py | leopiney/tscf | d98fbfe06abbf1d29458ddd147b7f1d99118e4ed | [
"MIT"
] | null | null | null | import numpy as np
from scipy.optimize import linear_sum_assignment
np.random.seed(0)
c = np.random.rand(128, 128)
row_ind, col_ind = linear_sum_assignment(c)
| 20.125 | 48 | 0.78882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4fb2d5f6091ab479c98c350959da092722caf376 | 287 | py | Python | Exercicios/matriz.py | beatrizflorenccio/Projects-Python | fc584167a2816dc89f22baef0fa0f780af796c98 | [
"MIT"
] | 1 | 2021-10-10T08:18:45.000Z | 2021-10-10T08:18:45.000Z | Exercicios/matriz.py | beatrizflorenccio/Projects-Python | fc584167a2816dc89f22baef0fa0f780af796c98 | [
"MIT"
] | null | null | null | Exercicios/matriz.py | beatrizflorenccio/Projects-Python | fc584167a2816dc89f22baef0fa0f780af796c98 | [
"MIT"
] | null | null | null | #MaBe
matriz = [[0, 0, 0], [0, 0, 0,], [0, 0, 0]]
for l in range(0, 3):
for c in range(0,3):
matriz[l][c] = int(input(f'Digite o valor da posição {(c, l)}: '))
for obj in range(0, 3):
for i in range(0, 3):
print(f'[{matriz[obj][i]}]', end=' ')
print()
| 22.076923 | 74 | 0.477352 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.242215 |
4fb2debb7f9b472451fb47af6368ed89d51ef079 | 968 | py | Python | iminuit/__init__.py | danielbrener/iminuit | e6d1cbc3d4d51e3556dbf95b569b62d6d9c38ad1 | [
"MIT"
] | 1 | 2018-10-02T14:52:37.000Z | 2018-10-02T14:52:37.000Z | iminuit/__init__.py | danielbrener/iminuit | e6d1cbc3d4d51e3556dbf95b569b62d6d9c38ad1 | [
"MIT"
] | null | null | null | iminuit/__init__.py | danielbrener/iminuit | e6d1cbc3d4d51e3556dbf95b569b62d6d9c38ad1 | [
"MIT"
] | null | null | null | """MINUIT from Python - Fitting like a boss
Basic usage example::
from iminuit import Minuit
def f(x, y, z):
return (x - 2) ** 2 + (y - 3) ** 2 + (z - 4) ** 2
m = Minuit(f)
m.migrad()
print(m.values) # {'x': 2,'y': 3,'z': 4}
print(m.errors) # {'x': 1,'y': 1,'z': 1}
Further informati... | 20.595745 | 73 | 0.599174 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 695 | 0.717975 |
4fb3676c0934334a2485cd800af36848f5e51ef3 | 7,241 | py | Python | opendata_module/opmon_opendata/api/postgresql_manager.py | nordic-institute/X-Road-Metrics | 249d859466bf6065257cf8b3c27d0e9db4ab2378 | [
"MIT"
] | 2 | 2021-06-30T11:12:31.000Z | 2021-09-24T08:50:03.000Z | opendata_module/opmon_opendata/api/postgresql_manager.py | nordic-institute/X-Road-Metrics | 249d859466bf6065257cf8b3c27d0e9db4ab2378 | [
"MIT"
] | null | null | null | opendata_module/opmon_opendata/api/postgresql_manager.py | nordic-institute/X-Road-Metrics | 249d859466bf6065257cf8b3c27d0e9db4ab2378 | [
"MIT"
] | 2 | 2021-07-02T12:31:37.000Z | 2021-11-09T08:44:09.000Z | # The MIT License
# Copyright (c) 2021- Nordic Institute for Interoperability Solutions (NIIS)
# Copyright (c) 2017-2020 Estonian Information System Authority (RIA)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"... | 46.121019 | 117 | 0.615523 | 5,940 | 0.820329 | 0 | 0 | 0 | 0 | 0 | 0 | 2,460 | 0.339732 |
4fb3d07bcc344ebefd9f84df21d8880d53f7089f | 3,456 | py | Python | koapy/backtrader/KrxHistoricalDailyPriceDataFromSQLite.py | resoliwan/koapy | b0616f252bb3588695dfb37c7d9b8580a65649a3 | [
"MIT"
] | 1 | 2021-09-25T22:33:01.000Z | 2021-09-25T22:33:01.000Z | koapy/backtrader/KrxHistoricalDailyPriceDataFromSQLite.py | resoliwan/koapy | b0616f252bb3588695dfb37c7d9b8580a65649a3 | [
"MIT"
] | null | null | null | koapy/backtrader/KrxHistoricalDailyPriceDataFromSQLite.py | resoliwan/koapy | b0616f252bb3588695dfb37c7d9b8580a65649a3 | [
"MIT"
] | 1 | 2021-11-12T15:33:29.000Z | 2021-11-12T15:33:29.000Z | import pandas as pd
from backtrader import TimeFrame, date2num
from sqlalchemy import create_engine, inspect
from tqdm import tqdm
from koapy.backtrader.SQLiteData import SQLiteData
from koapy.utils.data.KrxHistoricalDailyPriceDataForBacktestLoader import (
KrxHistoricalDailyPriceDataForBacktestLoader,
)
class ... | 28.8 | 81 | 0.57147 | 3,141 | 0.908854 | 0 | 0 | 1,556 | 0.450231 | 0 | 0 | 292 | 0.084491 |
4fb59e361ec35f6e244383c444a57733db66dc29 | 13,207 | py | Python | cid/parser/pre_processing.py | zeljko-bal/CID | 52ecc445c441ec63386c9f092b226090588a3789 | [
"MIT"
] | 1 | 2017-09-15T06:14:54.000Z | 2017-09-15T06:14:54.000Z | cid/parser/pre_processing.py | zeljko-bal/CID | 52ecc445c441ec63386c9f092b226090588a3789 | [
"MIT"
] | null | null | null | cid/parser/pre_processing.py | zeljko-bal/CID | 52ecc445c441ec63386c9f092b226090588a3789 | [
"MIT"
] | null | null | null | from textx.exceptions import TextXSemanticError
from cid.parser.model import ParameterCliValue, BoolWithPositivePattern
from cid.common.utils import get_cli_pattern_count, is_iterable, element_type
# ------------------------------- HELPER FUNCTIONS -------------------------------
def contains_duplicate_names(lst):... | 43.160131 | 171 | 0.662755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,107 | 0.310971 |
4fb887e16c8e670c35cf19aaf804300bc4ca22e4 | 40,372 | py | Python | jsfuzz/fuzzer/grammarinator_deps/ECMAScriptUnparser.py | gustavopinto/entente | 19b65d8cafd77c198c9c441f4f5e01503360309b | [
"BSD-2-Clause"
] | 5 | 2018-03-20T21:53:38.000Z | 2018-12-28T21:08:47.000Z | jsfuzz/fuzzer/grammarinator_deps/ECMAScriptUnparser.py | gustavopinto/entente | 19b65d8cafd77c198c9c441f4f5e01503360309b | [
"BSD-2-Clause"
] | 14 | 2018-04-09T20:16:00.000Z | 2019-06-11T12:31:10.000Z | jsfuzz/fuzzer/grammarinator_deps/ECMAScriptUnparser.py | gustavopinto/entente | 19b65d8cafd77c198c9c441f4f5e01503360309b | [
"BSD-2-Clause"
] | 12 | 2018-04-06T00:52:24.000Z | 2018-07-10T19:44:16.000Z | # Generated by Grammarinator 17.7
from itertools import chain
from grammarinator.runtime import *
import ECMAScriptUnlexer
class ECMAScriptUnparser(Grammarinator):
def __init__(self, unlexer):
super(ECMAScriptUnparser, self).__init__()
self.unlexer = unlexer
self.set_options()
@dep... | 38.819231 | 318 | 0.570271 | 40,243 | 0.996805 | 0 | 0 | 37,921 | 0.93929 | 0 | 0 | 1,254 | 0.031061 |
4fb9815011b0fc67585f72302dacbae27bef0e9a | 1,550 | py | Python | ml-scripts/transform-to-numpy.py | thejoeejoee/SUI-MIT-VUT-2020-2021 | aee307aa772c5a0e97578da5ebedd3e2cd39ab91 | [
"MIT"
] | null | null | null | ml-scripts/transform-to-numpy.py | thejoeejoee/SUI-MIT-VUT-2020-2021 | aee307aa772c5a0e97578da5ebedd3e2cd39ab91 | [
"MIT"
] | null | null | null | ml-scripts/transform-to-numpy.py | thejoeejoee/SUI-MIT-VUT-2020-2021 | aee307aa772c5a0e97578da5ebedd3e2cd39ab91 | [
"MIT"
] | 1 | 2021-01-15T19:01:45.000Z | 2021-01-15T19:01:45.000Z | #!/usr/bin/env python3
# Project: VUT FIT SUI Project - Dice Wars
# Authors:
# - Josef Kolář <xkolar71@stud.fit.vutbr.cz>
# - Dominik Harmim <xharmi00@stud.fit.vutbr.cz>
# - Petr Kapoun <xkapou04@stud.fit.vutbr.cz>
# - Jindřich Šesták <xsesta05@stud.fit.vutbr.cz>
# Year: 2020
# Description: Transf... | 26.724138 | 102 | 0.649032 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 506 | 0.325402 |
4fba29d360396207764ed0558aa4154a354cbfed | 764 | py | Python | facegram/profiles/serializers/v1/serializers.py | mabdullahadeel/facegram | f0eaa42008e876ae892b50f9f621a25b17cc70d5 | [
"MIT"
] | 1 | 2021-09-26T13:37:22.000Z | 2021-09-26T13:37:22.000Z | facegram/profiles/serializers/v1/serializers.py | mabdullahadeel/facegram | f0eaa42008e876ae892b50f9f621a25b17cc70d5 | [
"MIT"
] | 1 | 2021-08-08T22:04:39.000Z | 2021-08-08T22:04:39.000Z | facegram/profiles/serializers/v1/serializers.py | mabdullahadeel/facegram | f0eaa42008e876ae892b50f9f621a25b17cc70d5 | [
"MIT"
] | null | null | null | from django.db.models import fields
from rest_framework import serializers
from facegram.profiles.models import Profile
from facegram.users.api.serializers import UserSerializer
class RetrieveUserProfileSerializerV1(serializers.ModelSerializer):
user = UserSerializer(read_only=True)
class Meta:
model ... | 38.2 | 96 | 0.719895 | 581 | 0.760471 | 0 | 0 | 0 | 0 | 0 | 0 | 187 | 0.244764 |
4fba4d67b134d7addd79973a9be2fba674cdf649 | 108 | py | Python | exampleMain.py | marcoprenassi/medical_informatics_examples | d58c6074e18063578b64e874f3a92eda31546cdb | [
"MIT"
] | null | null | null | exampleMain.py | marcoprenassi/medical_informatics_examples | d58c6074e18063578b64e874f3a92eda31546cdb | [
"MIT"
] | null | null | null | exampleMain.py | marcoprenassi/medical_informatics_examples | d58c6074e18063578b64e874f3a92eda31546cdb | [
"MIT"
] | null | null | null | import UMLS_Api_search_example as UAex
if __name__ == '__main__':
UAex.runExample("[INSERT API HERE]")
| 21.6 | 40 | 0.740741 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.268519 |
4fbab7405719ae7d782fceeb047eb0c83c99705f | 3,604 | py | Python | oms_cms/backend/api/v2/socialaccount/views.py | RomanYarovoi/oms_cms | 49c6789242d7a35e81f4f208c04b18fb79249be7 | [
"BSD-3-Clause"
] | 18 | 2019-07-11T18:34:10.000Z | 2021-11-20T06:34:39.000Z | oms_cms/backend/api/v2/socialaccount/views.py | RomanYarovoi/oms_cms | 49c6789242d7a35e81f4f208c04b18fb79249be7 | [
"BSD-3-Clause"
] | 13 | 2019-07-24T11:27:58.000Z | 2022-03-28T01:07:31.000Z | oms_cms/backend/api/v2/socialaccount/views.py | RomanYarovoi/oms_cms | 49c6789242d7a35e81f4f208c04b18fb79249be7 | [
"BSD-3-Clause"
] | 18 | 2019-07-08T18:07:21.000Z | 2021-11-03T10:33:07.000Z | from rest_framework import generics, permissions
from rest_framework import filters as filters_rf
from django_filters import rest_framework as filters
from allauth.socialaccount.models import SocialAccount, SocialApp, SocialToken
from .serializers import SocialAppSerializer, SocialAppExtendedSerializer, SocialAccountS... | 39.173913 | 101 | 0.748613 | 3,390 | 0.882813 | 0 | 0 | 0 | 0 | 0 | 0 | 730 | 0.190104 |
4fbbc39f5b64d4fcd299e8d9717c38c66a7f8e51 | 8,448 | py | Python | biosimulators_test_suite/test_case/cli.py | Ryannjordan/Biosimulators_test_suite | 5f79f157ee8927df277b1967e9409ccfc6baf45f | [
"CC0-1.0",
"MIT"
] | null | null | null | biosimulators_test_suite/test_case/cli.py | Ryannjordan/Biosimulators_test_suite | 5f79f157ee8927df277b1967e9409ccfc6baf45f | [
"CC0-1.0",
"MIT"
] | null | null | null | biosimulators_test_suite/test_case/cli.py | Ryannjordan/Biosimulators_test_suite | 5f79f157ee8927df277b1967e9409ccfc6baf45f | [
"CC0-1.0",
"MIT"
] | null | null | null | """ Methods for test cases involving checking command-line interfaces
:Author: Jonathan Karr <karr@mssm.edu>
:Date: 2020-12-21
:Copyright: 2020, Center for Reproducible Biomedical Modeling
:License: MIT
"""
from ..data_model import TestCase
from ..warnings import TestCaseWarning
from biosimulators_utils.simulator.env... | 49.403509 | 136 | 0.619318 | 7,899 | 0.935014 | 0 | 0 | 0 | 0 | 0 | 0 | 4,513 | 0.534209 |
4fbc0acd853210dff0cd68f025ebd7fef3871469 | 18,871 | py | Python | akimous/editor.py | akimous/akimous | 1828c09407bc32b233500647290d698ba5e5549f | [
"BSD-3-Clause"
] | 12 | 2019-11-14T14:20:33.000Z | 2022-03-27T15:24:45.000Z | akimous/editor.py | akimous/akimous | 1828c09407bc32b233500647290d698ba5e5549f | [
"BSD-3-Clause"
] | 7 | 2020-04-05T05:37:52.000Z | 2020-09-27T14:21:41.000Z | akimous/editor.py | akimous/akimous | 1828c09407bc32b233500647290d698ba5e5549f | [
"BSD-3-Clause"
] | 3 | 2020-03-23T17:31:39.000Z | 2022-03-27T15:24:53.000Z | import json
import shlex
import sys
from asyncio import (CancelledError, create_subprocess_shell, create_task,
subprocess)
from collections import namedtuple
from functools import partial
from importlib import resources
from pathlib import Path
import jedi
import pyflakes.api
import wordsegment
fr... | 33.4 | 100 | 0.615442 | 0 | 0 | 0 | 0 | 12,059 | 0.639023 | 16,060 | 0.851041 | 3,284 | 0.174024 |
4fbc247cd588c810e04f1404311be33ad7cdbb7b | 684 | py | Python | user_interface/run_tests/test3/files_for_dakota/mycode.py | ukaea/ALC_UQ | a2747c94036b04f1279abb5683c6a225a878aea3 | [
"Apache-2.0"
] | 2 | 2021-11-24T10:43:50.000Z | 2021-12-07T20:02:38.000Z | user_interface/run_tests/test3/files_for_dakota/mycode.py | ukaea/ALC_UQ | a2747c94036b04f1279abb5683c6a225a878aea3 | [
"Apache-2.0"
] | null | null | null | user_interface/run_tests/test3/files_for_dakota/mycode.py | ukaea/ALC_UQ | a2747c94036b04f1279abb5683c6a225a878aea3 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import xarray as xr
import exceptions
from dakota_file import DakotaFile
my_netcdf = DakotaFile()
filename = 'DAKOTA.nc'
my_netcdf.read(filename)
variable_dict1 = my_netcdf.get_variable_as_dict('test_scan1')
variable_dict2 = my_netcdf.get_variable_as_dict('test_scan2')
variable_dict3 = my_netcdf.g... | 22.8 | 61 | 0.755848 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 123 | 0.179825 |
4fbd3bb906bc12f75a2bab54c176db3603866e8d | 1,973 | py | Python | jvd/capa/data.py | ccDev-Labs/JARV1S-Disassembler | ee41eb493c15a66b4695b6f24039c38471b7eb47 | [
"Apache-2.0"
] | null | null | null | jvd/capa/data.py | ccDev-Labs/JARV1S-Disassembler | ee41eb493c15a66b4695b6f24039c38471b7eb47 | [
"Apache-2.0"
] | null | null | null | jvd/capa/data.py | ccDev-Labs/JARV1S-Disassembler | ee41eb493c15a66b4695b6f24039c38471b7eb47 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
from jvd.normalizer.syntax import get_definition
import sys
from jvd.utils import AttrDict
class DataUnit:
def __init__(self, json_obj, file_path):
super().__init__()
with open(file_path, "rb") as f:
self.fbytes = f.read()
self.obj = AttrDic... | 34.017241 | 70 | 0.516472 | 1,843 | 0.93411 | 0 | 0 | 0 | 0 | 0 | 0 | 139 | 0.070451 |
4fbe12f19888e0666719f9bebc6d8719b923b7bc | 38,570 | py | Python | anchore/anchore_policy.py | berez23/anchore | 594cce23f1d87d666397653054c22c2613247734 | [
"Apache-2.0"
] | 401 | 2016-06-16T15:29:48.000Z | 2022-03-24T10:05:16.000Z | anchore/anchore_policy.py | berez23/anchore | 594cce23f1d87d666397653054c22c2613247734 | [
"Apache-2.0"
] | 63 | 2016-06-16T21:10:27.000Z | 2020-07-01T06:57:27.000Z | anchore/anchore_policy.py | berez23/anchore | 594cce23f1d87d666397653054c22c2613247734 | [
"Apache-2.0"
] | 64 | 2016-06-16T13:05:57.000Z | 2021-07-16T10:03:45.000Z | import os
import json
import re
import sys
import logging
import hashlib
import uuid
import jsonschema
import tempfile
import controller
import anchore_utils
import anchore_auth
from anchore.util import contexts
_logger = logging.getLogger(__name__)
default_policy_version = '1_0'
default_whitelist_version = '1_0'
de... | 37.482993 | 223 | 0.554524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,386 | 0.191496 |
4fbe89f545d68a8d00c6f17228cacbd06163d537 | 16,407 | py | Python | config.py | tdaff/automation | 89d32af3aafe0e027c13d42cd0c43ecb12820b0c | [
"BSD-3-Clause"
] | 1 | 2021-12-13T13:33:44.000Z | 2021-12-13T13:33:44.000Z | config.py | tdaff/automation | 89d32af3aafe0e027c13d42cd0c43ecb12820b0c | [
"BSD-3-Clause"
] | null | null | null | config.py | tdaff/automation | 89d32af3aafe0e027c13d42cd0c43ecb12820b0c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
configuration for faps
Provides the Options class that will transparently handle the different option
sources through the .get() method. Pulls in defaults, site and job options plus
command line customisation. Instantiating Options will set up the logging for
the particular job.
"""
__all_... | 39.345324 | 79 | 0.581886 | 14,685 | 0.895045 | 0 | 0 | 0 | 0 | 0 | 0 | 5,862 | 0.357287 |
4fbebc964c40ea6dd1d24cd31662fdfe6e48593b | 5,652 | py | Python | winchester/config.py | SandyWalsh/stacktach-winchester | ac49955386b695868945a28b6597fe72b3b657e6 | [
"Apache-2.0"
] | null | null | null | winchester/config.py | SandyWalsh/stacktach-winchester | ac49955386b695868945a28b6597fe72b3b657e6 | [
"Apache-2.0"
] | null | null | null | winchester/config.py | SandyWalsh/stacktach-winchester | ac49955386b695868945a28b6597fe72b3b657e6 | [
"Apache-2.0"
] | null | null | null | import collections
import logging
import os
import yaml
logger = logging.getLogger(__name__)
class ConfigurationError(Exception):
pass
class ConfigItem(object):
def __init__(self, required=False, default=None, help='', multiple=False):
self.help = help
self.required = required
self.... | 32.860465 | 86 | 0.567587 | 5,544 | 0.980892 | 0 | 0 | 2,560 | 0.452937 | 0 | 0 | 517 | 0.091472 |
4fbf0c0afa244b2e383a987015bb42d2b03c6628 | 1,956 | py | Python | apps/users/views.py | chenyifaerfans/fafaer-apis | 896db11116fc78c597ebc1a90f547dc15004438d | [
"MIT"
] | null | null | null | apps/users/views.py | chenyifaerfans/fafaer-apis | 896db11116fc78c597ebc1a90f547dc15004438d | [
"MIT"
] | null | null | null | apps/users/views.py | chenyifaerfans/fafaer-apis | 896db11116fc78c597ebc1a90f547dc15004438d | [
"MIT"
] | 1 | 2019-03-17T12:46:20.000Z | 2019-03-17T12:46:20.000Z | from django.contrib.auth.backends import ModelBackend
from django.contrib.auth import get_user_model
from django.db.models import Q
from rest_framework import mixins
from rest_framework import viewsets
from rest_framework.permissions import IsAuthenticated
from rest_framework.authentication import SessionAuthentication... | 27.549296 | 80 | 0.716258 | 689 | 0.342786 | 0 | 0 | 0 | 0 | 0 | 0 | 329 | 0.163682 |
4fbff0bc9c697c0951f61a60296a6035d822cd65 | 941 | py | Python | backend.py | Fennec2000GH/KeywordFS | 0e1d7ab78d084e0c21cf4e7246ed169353cfca9b | [
"MIT"
] | null | null | null | backend.py | Fennec2000GH/KeywordFS | 0e1d7ab78d084e0c21cf4e7246ed169353cfca9b | [
"MIT"
] | null | null | null | backend.py | Fennec2000GH/KeywordFS | 0e1d7ab78d084e0c21cf4e7246ed169353cfca9b | [
"MIT"
] | null | null | null |
from genericpath import exists, isfile
import json, os
from pprint import pprint
from keyword_extraction import *
from topic_modeling import *
# from xml_parser import *
def file_to_json(path: str, storage_path: str = 'storage'):
"""
Converts file containing text to stored JSON object to track topic... | 30.354839 | 86 | 0.629118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 392 | 0.416578 |
4fc02fdb9ddc7d5747414ecaa26615c65041ad79 | 978 | py | Python | tar.py | pakit/recipes | e52f5f45648da27a9e096b0b3f5157666007b59c | [
"BSD-3-Clause"
] | 1 | 2015-11-20T18:43:42.000Z | 2015-11-20T18:43:42.000Z | tar.py | pakit/recipes | e52f5f45648da27a9e096b0b3f5157666007b59c | [
"BSD-3-Clause"
] | 2 | 2015-11-20T18:44:45.000Z | 2015-12-14T19:06:01.000Z | tar.py | pakit/recipes | e52f5f45648da27a9e096b0b3f5157666007b59c | [
"BSD-3-Clause"
] | null | null | null | """ Formula for building tar """
import os
from pakit import Archive, Git, Recipe
class Tar(Recipe):
"""
The GNU tar utility.
"""
def __init__(self):
super(Tar, self).__init__()
self.homepage = 'https://www.gnu.org/software/tar'
self.repos = {
'stable': Archive('ht... | 29.636364 | 76 | 0.5409 | 892 | 0.912065 | 0 | 0 | 0 | 0 | 0 | 0 | 393 | 0.40184 |
4fc1039c804ad07fec0a4b3a651fae130bfd51e3 | 6,277 | py | Python | httpclient.py | forgeno/CMPUT404-assignment-web-client | 630946020460d6c7acf850753ac27bbfe9afd273 | [
"Apache-2.0"
] | null | null | null | httpclient.py | forgeno/CMPUT404-assignment-web-client | 630946020460d6c7acf850753ac27bbfe9afd273 | [
"Apache-2.0"
] | null | null | null | httpclient.py | forgeno/CMPUT404-assignment-web-client | 630946020460d6c7acf850753ac27bbfe9afd273 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
# Copyright 2016 Abram Hindle, https://github.com/tywtyw2002, and https://github.com/treedust
#
# 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
#
# ... | 36.494186 | 341 | 0.602517 | 4,963 | 0.790664 | 0 | 0 | 0 | 0 | 0 | 0 | 1,991 | 0.31719 |
4fc2f03a744a03fe3211e5d85d1ad3585e62ba1b | 1,482 | py | Python | larcv/app/arxiv/arxiv/LArOpenCVHandle/mac/convert_test.py | mmajewsk/larcv2 | 9ee74e42b293d547d3a8510fa2139b2d4ccf6b89 | [
"MIT"
] | 14 | 2017-10-19T15:08:29.000Z | 2021-03-31T21:21:07.000Z | larcv/app/arxiv/arxiv/LArOpenCVHandle/mac/convert_test.py | mmajewsk/larcv2 | 9ee74e42b293d547d3a8510fa2139b2d4ccf6b89 | [
"MIT"
] | 32 | 2017-10-25T22:54:06.000Z | 2019-10-01T13:57:15.000Z | larcv/app/arxiv/arxiv/LArOpenCVHandle/mac/convert_test.py | mmajewsk/larcv2 | 9ee74e42b293d547d3a8510fa2139b2d4ccf6b89 | [
"MIT"
] | 16 | 2017-12-07T12:04:40.000Z | 2021-11-15T00:53:31.000Z | import ROOT,sys
from larlite import larlite as fmwk1
from larcv import larcv as fmwk2
from ROOT import handshake
io1=fmwk1.storage_manager(fmwk1.storage_manager.kBOTH)
io1.add_in_filename(sys.argv[1])
io1.set_out_filename('boke.root')
io1.open()
io2=fmwk2.IOManager(fmwk2.IOManager.kREAD)
io2.add_in_file(sys.argv[2])
... | 29.058824 | 64 | 0.668016 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.08637 |
4fc4b797c995974062c04d59da99516bb81cce25 | 2,713 | py | Python | code/vectorized/vectorized_neural_network.py | le0x99/low-level-deep-learning | 9c68cce8aae7f541a5556901659378ffd859977a | [
"MIT"
] | null | null | null | code/vectorized/vectorized_neural_network.py | le0x99/low-level-deep-learning | 9c68cce8aae7f541a5556901659378ffd859977a | [
"MIT"
] | null | null | null | code/vectorized/vectorized_neural_network.py | le0x99/low-level-deep-learning | 9c68cce8aae7f541a5556901659378ffd859977a | [
"MIT"
] | null | null | null | import numpy as np
def sigmoid(Z): return 1./(1.+np.exp(-Z))
def softmax(Z): return np.exp(Z)/np.exp(Z).sum()
def softmax_batched(Z): return np.exp(Z) / np.sum(np.exp(Z), axis=1, keepdims=True)
def initialize_parameters():
W1 = np.random.randn(300,784) * 0.01
b1 = np.zeros((300,1))
W2 = np.random.ran... | 25.35514 | 88 | 0.507925 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 179 | 0.065979 |
4fc6d2223dbb154a6a63ae158a494705ee4d06f0 | 8,310 | py | Python | test/shed_functional/functional/test_1000_install_basic_repository.py | innovate-invent/galaxy | 10aa953a40e171246bdd1804c74e8019da8e8200 | [
"CC-BY-3.0"
] | 4 | 2018-10-29T18:34:38.000Z | 2021-09-29T23:30:42.000Z | test/shed_functional/functional/test_1000_install_basic_repository.py | innovate-invent/galaxy | 10aa953a40e171246bdd1804c74e8019da8e8200 | [
"CC-BY-3.0"
] | 30 | 2016-10-20T15:35:12.000Z | 2018-10-02T15:59:54.000Z | test/shed_functional/functional/test_1000_install_basic_repository.py | innovate-invent/galaxy | 10aa953a40e171246bdd1804c74e8019da8e8200 | [
"CC-BY-3.0"
] | 7 | 2016-11-03T19:11:01.000Z | 2020-05-11T14:23:52.000Z | from shed_functional.base.twilltestcase import common, ShedTwillTestCase
class BasicToolShedFeatures(ShedTwillTestCase):
'''Test installing a basic repository.'''
def test_0000_initiate_users(self):
"""Create necessary user accounts."""
self.login(email=common.test_user_1_email, username=comm... | 67.016129 | 150 | 0.63562 | 8,234 | 0.990854 | 0 | 0 | 0 | 0 | 0 | 0 | 2,124 | 0.255596 |
4fc6de35795e4f13631af5dec2a31964ff60ed92 | 572 | py | Python | exceptional.py | kentoj/python-fundamentals | f7b93228c18d1553aad11580b7d2f42c999da376 | [
"MIT"
] | 6 | 2017-01-31T18:55:14.000Z | 2021-01-02T09:21:40.000Z | exceptional.py | kentoj/python-fundamentals | f7b93228c18d1553aad11580b7d2f42c999da376 | [
"MIT"
] | null | null | null | exceptional.py | kentoj/python-fundamentals | f7b93228c18d1553aad11580b7d2f42c999da376 | [
"MIT"
] | 1 | 2020-12-28T15:50:39.000Z | 2020-12-28T15:50:39.000Z | """A module to demonstrate exceptions."""
import sys
from math import log
def convert(item):
"""
Convert to an integer.
Args:
item: some object
Returns:
an integer representation of the object
Throws:
a ValueException
"""
try:
return int(item)
except... | 16.823529 | 47 | 0.575175 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 247 | 0.431818 |
4fc9baceeb6c53d83cab3241e6032040a6ea6f24 | 33,921 | py | Python | tests/examples/minlplib/syn05m04h.py | ouyang-w-19/decogo | 52546480e49776251d4d27856e18a46f40c824a1 | [
"MIT"
] | 2 | 2021-07-03T13:19:10.000Z | 2022-02-06T10:48:13.000Z | tests/examples/minlplib/syn05m04h.py | ouyang-w-19/decogo | 52546480e49776251d4d27856e18a46f40c824a1 | [
"MIT"
] | 1 | 2021-07-04T14:52:14.000Z | 2021-07-15T10:17:11.000Z | tests/examples/minlplib/syn05m04h.py | ouyang-w-19/decogo | 52546480e49776251d4d27856e18a46f40c824a1 | [
"MIT"
] | null | null | null | # MINLP written by GAMS Convert at 04/21/18 13:54:28
#
# Equation counts
# Total E G L N X C B
# 363 141 12 210 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... | 35.187759 | 117 | 0.635565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 699 | 0.020607 |
4fcbcca983a903be3e13de0bc766ff057f2460ae | 2,991 | py | Python | kitsune/gallery/models.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | null | null | null | kitsune/gallery/models.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | null | null | null | kitsune/gallery/models.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | null | null | null | from datetime import datetime
from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
from kitsune.sumo.models import ModelBase, LocaleField
from kitsune.sumo.urlresolvers import reverse
from kitsune.sumo.utils import auto_delete_files
class Media(ModelBase):
""... | 41.541667 | 79 | 0.704112 | 2,656 | 0.887997 | 0 | 0 | 1,905 | 0.636911 | 0 | 0 | 278 | 0.092946 |
4fccde0990616a0b7cd8bff73f531e7de8b4cd4b | 104 | py | Python | senseTk/__main__.py | Helicopt/senseToolkit | 1630ec3f03368980a13f448b3be554efe44ec7cb | [
"MIT"
] | 2 | 2018-07-30T03:54:58.000Z | 2018-12-17T16:09:06.000Z | senseTk/__main__.py | Helicopt/senseToolkit | 1630ec3f03368980a13f448b3be554efe44ec7cb | [
"MIT"
] | null | null | null | senseTk/__main__.py | Helicopt/senseToolkit | 1630ec3f03368980a13f448b3be554efe44ec7cb | [
"MIT"
] | null | null | null | import senseTk
if __name__ == '__main__':
print('senseToolkit version %s' % (senseTk.__version__))
| 20.8 | 60 | 0.711538 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0.336538 |
4fcfbd8024734cb1efbb3a2c975669d6daead2b5 | 666 | py | Python | RaspberryPi/Hardware/UltrasonicSensorSet.py | amaankhan02/SelfDrivingCar | 7831a9db13d2e8c9ca683e48588eabdf065f80fa | [
"MIT"
] | null | null | null | RaspberryPi/Hardware/UltrasonicSensorSet.py | amaankhan02/SelfDrivingCar | 7831a9db13d2e8c9ca683e48588eabdf065f80fa | [
"MIT"
] | null | null | null | RaspberryPi/Hardware/UltrasonicSensorSet.py | amaankhan02/SelfDrivingCar | 7831a9db13d2e8c9ca683e48588eabdf065f80fa | [
"MIT"
] | null | null | null | import RPi.GPIO as gpio
from enum import Enum
import time
from GpioMode import GpioMode
from UltrasonicSensor import UltrasonicSensor
class UltrasonicSensorSet:
def __init__(self, *args:UltrasonicSensor):
"""
:param args: UltrasonicSensor objects
"""
self.ussSet = args
def getD... | 25.615385 | 97 | 0.641141 | 531 | 0.797297 | 0 | 0 | 0 | 0 | 0 | 0 | 191 | 0.286787 |
4fd0f164b54137d3499bbb7d41a57e54fcaffbef | 827 | py | Python | m3u_to_channels.py | Axel-Erfurt/hypnotixLite | 11d2381999724a247b8b42b345da5ba6c9e21178 | [
"MIT"
] | 3 | 2021-03-26T03:53:30.000Z | 2021-07-20T23:50:14.000Z | m3u_to_channels.py | Axel-Erfurt/hypnotixLite | 11d2381999724a247b8b42b345da5ba6c9e21178 | [
"MIT"
] | 2 | 2021-01-22T11:14:38.000Z | 2021-04-15T18:40:44.000Z | m3u_to_channels.py | Axel-Erfurt/hypnotixLite | 11d2381999724a247b8b42b345da5ba6c9e21178 | [
"MIT"
] | 1 | 2021-02-15T06:53:45.000Z | 2021-02-15T06:53:45.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
if len(sys.argv) < 3:
print("usage: python3 m3u_to_channels.py infile.m3u outfile.txt")
sys.exit()
else:
text = open(sys.argv[1], "r").read()
chList = []
urlList = []
mlist = text.splitlines()
for line in mlist:
if line.startsw... | 28.517241 | 108 | 0.504232 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 229 | 0.276904 |
4fd0f444ff8c7ce8c0356f846fd27ec234c49cff | 823 | py | Python | Experiments/RunTrainBasicClassification.py | christymarc/raycasting-simulation | ed9b92143d3eb1c5a25900419ead517f93f8c315 | [
"MIT"
] | null | null | null | Experiments/RunTrainBasicClassification.py | christymarc/raycasting-simulation | ed9b92143d3eb1c5a25900419ead517f93f8c315 | [
"MIT"
] | null | null | null | Experiments/RunTrainBasicClassification.py | christymarc/raycasting-simulation | ed9b92143d3eb1c5a25900419ead517f93f8c315 | [
"MIT"
] | null | null | null | from subprocess import run
compared_models = [
"resnet18",
"xresnet18",
"xresnet18_deep",
"xresnet18_deeper",
"xse_resnet18",
"xresnext18",
"xse_resnext18",
"xse_resnext18_deep",
"xse_resnext18_deeper",
"resnet50",
"xresnet50",
"xresnet50_deep",
"xresnet50_deeper",
... | 19.139535 | 46 | 0.545565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 420 | 0.510328 |
4fd11410ca1410fdacfd8424d35b517273245311 | 6,822 | py | Python | ferry/config/cassandra/cassandraclientconfig.py | jhorey/ferry | bbaa047df08386e17130a939e20fde5e840d1ffa | [
"Apache-2.0"
] | 44 | 2015-06-04T09:27:37.000Z | 2020-10-20T06:23:38.000Z | ferry/config/cassandra/cassandraclientconfig.py | jhorey/ferry | bbaa047df08386e17130a939e20fde5e840d1ffa | [
"Apache-2.0"
] | 2 | 2016-02-26T11:53:36.000Z | 2020-11-13T12:38:03.000Z | ferry/config/cassandra/cassandraclientconfig.py | jhorey/ferry | bbaa047df08386e17130a939e20fde5e840d1ffa | [
"Apache-2.0"
] | 13 | 2015-06-25T03:46:00.000Z | 2020-03-25T11:20:31.000Z | # Copyright 2014 OpenCore LLC
#
# 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,... | 35.717277 | 96 | 0.622398 | 6,190 | 0.907359 | 0 | 0 | 0 | 0 | 0 | 0 | 2,320 | 0.340076 |
4fd1ce32a10f30a9038b645d55203323aae7bf99 | 2,297 | py | Python | fn_mcafee_esm/setup.py | nickpartner-goahead/resilient-community-apps | 097c0dbefddbd221b31149d82af9809420498134 | [
"MIT"
] | 65 | 2017-12-04T13:58:32.000Z | 2022-03-24T18:33:17.000Z | fn_mcafee_esm/setup.py | nickpartner-goahead/resilient-community-apps | 097c0dbefddbd221b31149d82af9809420498134 | [
"MIT"
] | 48 | 2018-03-02T19:17:14.000Z | 2022-03-09T22:00:38.000Z | fn_mcafee_esm/setup.py | nickpartner-goahead/resilient-community-apps | 097c0dbefddbd221b31149d82af9809420498134 | [
"MIT"
] | 95 | 2018-01-11T16:23:39.000Z | 2022-03-21T11:34:29.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) Copyright IBM Corp. 2010, 2018. All Rights Reserved.
from setuptools import setup, find_packages
setup(
name='fn_mcafee_esm',
version='1.0.2',
license='MIT',
author='IBM Resilient',
author_email='support@resilientsystems.com',
description="Re... | 54.690476 | 140 | 0.742273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,781 | 0.775359 |
4fd25d52784965f16619e3e176946ad59586a29f | 95 | py | Python | addons14/storage_image/models/__init__.py | odoochain/addons_oca | 55d456d798aebe16e49b4a6070765f206a8885ca | [
"MIT"
] | 1 | 2021-06-10T14:59:13.000Z | 2021-06-10T14:59:13.000Z | addons14/storage_image/models/__init__.py | odoochain/addons_oca | 55d456d798aebe16e49b4a6070765f206a8885ca | [
"MIT"
] | null | null | null | addons14/storage_image/models/__init__.py | odoochain/addons_oca | 55d456d798aebe16e49b4a6070765f206a8885ca | [
"MIT"
] | 1 | 2021-04-09T09:44:44.000Z | 2021-04-09T09:44:44.000Z | from . import storage_image
from . import storage_file
from . import storage_relation_abstract
| 23.75 | 39 | 0.842105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4fd37eada01051d2655006a5f367e3dce290c716 | 10,332 | py | Python | src/etl/etl.py | shy166/hinreddit | e19abfa584b8b0cf801dd6968ac7b42d4b68ee96 | [
"Apache-2.0"
] | null | null | null | src/etl/etl.py | shy166/hinreddit | e19abfa584b8b0cf801dd6968ac7b42d4b68ee96 | [
"Apache-2.0"
] | 3 | 2020-05-16T04:29:28.000Z | 2020-05-16T08:05:16.000Z | src/etl/etl.py | syeehyn/hinreddit | e19abfa584b8b0cf801dd6968ac7b42d4b68ee96 | [
"Apache-2.0"
] | null | null | null | # import praw as pr
import pandas as pd
from src import *
import json
import requests
import pandas as pd
import os
from os.path import join
from tqdm import tqdm
import time
from joblib import Parallel, delayed
from p_tqdm import p_umap
from glob import glob
from requests.packages.urllib3.exceptions import InsecureReq... | 42.518519 | 177 | 0.576268 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,124 | 0.302362 |
4fd5295b29e4b31c48489377d517627d7c834a90 | 581 | py | Python | tanslate.py | Blues-star/bilibili-BV-conv | e53015fb7272e70945fbb6c35a59edef8ba0cb3f | [
"MIT"
] | null | null | null | tanslate.py | Blues-star/bilibili-BV-conv | e53015fb7272e70945fbb6c35a59edef8ba0cb3f | [
"MIT"
] | null | null | null | tanslate.py | Blues-star/bilibili-BV-conv | e53015fb7272e70945fbb6c35a59edef8ba0cb3f | [
"MIT"
] | null | null | null | table = 'fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF'
tr = {}
for i in range(58):
tr[table[i]] = i
s = [11, 10, 3, 8, 4, 6]
xor = 177451812
add = 8728348608
def dec(x):
r = 0
for i in range(6):
r += tr[x[s[i]]] * 58**i
return (r - add) ^ xor
def enc(x):
x = (x ^ xor) + add... | 19.366667 | 68 | 0.576592 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 118 | 0.203098 |
4fd725c7e36bdf921e72caea11e281c8604d9e0c | 162 | py | Python | ddtrace/settings/exceptions.py | zhammer/dd-trace-py | 4c30f6e36bfa34a63cd9b6884677c977f76d2a01 | [
"Apache-2.0",
"BSD-3-Clause"
] | 5 | 2020-03-07T01:12:29.000Z | 2021-04-21T00:53:19.000Z | ddtrace/settings/exceptions.py | zhammer/dd-trace-py | 4c30f6e36bfa34a63cd9b6884677c977f76d2a01 | [
"Apache-2.0",
"BSD-3-Clause"
] | 4 | 2019-11-22T20:58:01.000Z | 2020-08-17T21:16:13.000Z | ddtrace/settings/exceptions.py | zhammer/dd-trace-py | 4c30f6e36bfa34a63cd9b6884677c977f76d2a01 | [
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2020-03-18T16:29:20.000Z | 2020-07-20T16:05:10.000Z | class ConfigException(Exception):
"""Configuration exception when an integration that is not available
is called in the `Config` object.
"""
pass
| 27 | 72 | 0.709877 | 161 | 0.993827 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.703704 |
4fd773510f35b86e510f60c92159c965a39255c9 | 22,001 | py | Python | nex/router.py | eddiejessup/nex | d61005aacb3b87f8cf1a1e2080ca760d757d5751 | [
"MIT"
] | null | null | null | nex/router.py | eddiejessup/nex | d61005aacb3b87f8cf1a1e2080ca760d757d5751 | [
"MIT"
] | null | null | null | nex/router.py | eddiejessup/nex | d61005aacb3b87f8cf1a1e2080ca760d757d5751 | [
"MIT"
] | null | null | null | from collections import deque
from enum import Enum
import logging
from .constants.codes import CatCode
from .constants.parameters import param_to_instr
from .constants.specials import special_to_instr
from .constants.instructions import (Instructions, if_instructions,
unexpanded_c... | 39.570144 | 83 | 0.66447 | 12,925 | 0.58742 | 359 | 0.016316 | 1,189 | 0.054038 | 0 | 0 | 3,806 | 0.172976 |
4fd795c999e925984e4dfb7c769e57a42211546b | 1,409 | py | Python | nd-coursework/courses/computationalChemistry/scripts/plotEnergies.py | crdrisko/nd-grad | f1765e4f24d7a4b1b3a76c64eb8d88bcca0eaa44 | [
"MIT"
] | 1 | 2020-09-26T12:38:55.000Z | 2020-09-26T12:38:55.000Z | nd-coursework/courses/computationalChemistry/scripts/plotEnergies.py | crdrisko/nd-research | f1765e4f24d7a4b1b3a76c64eb8d88bcca0eaa44 | [
"MIT"
] | null | null | null | nd-coursework/courses/computationalChemistry/scripts/plotEnergies.py | crdrisko/nd-research | f1765e4f24d7a4b1b3a76c64eb8d88bcca0eaa44 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Name: plotEnergies.py - Version 1.0.0
# Author: Cody R. Drisko (crdrisko)
# Date: 10/18/2019-08:02:13
# Description: Plotting the relevant data for HW 4
import numpy as np
import matplotlib.pyplot as plt
### Results of the Vibrational Analysis ###
data_va = np.loadtxt... | 24.719298 | 85 | 0.710433 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 568 | 0.403123 |
4fd88fa848745173132ac1e20520e01408473d33 | 22,130 | py | Python | src/plugin.py | BradB111/galaxy_blizzard_plugin | 4386ee2902cfaf4f7871613d419ad6f2ddad6e77 | [
"MIT"
] | 67 | 2020-01-05T23:23:35.000Z | 2022-03-22T01:03:22.000Z | src/plugin.py | BradB111/galaxy_blizzard_plugin | 4386ee2902cfaf4f7871613d419ad6f2ddad6e77 | [
"MIT"
] | 49 | 2019-12-20T15:08:06.000Z | 2021-11-18T22:29:48.000Z | src/plugin.py | BradB111/galaxy_blizzard_plugin | 4386ee2902cfaf4f7871613d419ad6f2ddad6e77 | [
"MIT"
] | 24 | 2019-12-20T16:52:38.000Z | 2022-03-08T02:22:56.000Z | import asyncio
import json
import os
import sys
import multiprocessing
import webbrowser
from collections import defaultdict
import requests
import requests.cookies
import logging as log
import subprocess
import time
import re
from typing import Union, Dict
from galaxy.api.consts import LocalGameState, Platform
from ... | 43.648915 | 136 | 0.632671 | 20,877 | 0.94338 | 0 | 0 | 0 | 0 | 17,508 | 0.791143 | 3,466 | 0.15662 |
4fd92af7e0206cf0333bb60a3ec9bad3624fcb60 | 845 | py | Python | kronos_executor/kronos_executor/execution_contexts/trivial.py | ecmwf/kronos | 4f8c896baa634fc937f866d2bd05b438106c1663 | [
"Apache-2.0"
] | 4 | 2020-09-15T15:16:17.000Z | 2021-08-17T14:02:28.000Z | kronos_executor/kronos_executor/execution_contexts/trivial.py | ecmwf/kronos | 4f8c896baa634fc937f866d2bd05b438106c1663 | [
"Apache-2.0"
] | 4 | 2020-09-12T07:22:35.000Z | 2020-10-13T17:08:35.000Z | kronos_executor/kronos_executor/execution_contexts/trivial.py | ecmwf/kronos | 4f8c896baa634fc937f866d2bd05b438106c1663 | [
"Apache-2.0"
] | null | null | null |
import pathlib
from kronos_executor.execution_context import ExecutionContext
run_script = pathlib.Path(__file__).parent / "trivial_run.sh"
class TrivialExecutionContext(ExecutionContext):
scheduler_directive_start = ""
scheduler_directive_params = {}
scheduler_use_params = []
scheduler_cancel_head... | 28.166667 | 67 | 0.695858 | 665 | 0.786982 | 0 | 0 | 0 | 0 | 0 | 0 | 144 | 0.170414 |