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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
95dba8c035cf85f4ef8f4bc3e7a7c14c268076f1 | 1,797 | py | Python | engine/src/valet/engine/search/filters/cpu_filter.py | onap/optf-fgps | 1494071d0329698297c5d78ee0799dbff0b57e43 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | engine/src/valet/engine/search/filters/cpu_filter.py | onap/optf-fgps | 1494071d0329698297c5d78ee0799dbff0b57e43 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | engine/src/valet/engine/search/filters/cpu_filter.py | onap/optf-fgps | 1494071d0329698297c5d78ee0799dbff0b57e43 | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2021-10-15T18:54:03.000Z | 2021-10-15T18:54:03.000Z | #
# -------------------------------------------------------------------------
# Copyright (c) 2019 AT&T Intellectual Property
#
# 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
#
# ... | 30.982759 | 76 | 0.606566 |
95e0d6973a04cf649a738acb651bea0fa6b7dfcd | 996 | py | Python | Inflearn_SungKim/3.MultiVariableLinearRegression/multi-variableLinearregression.py | shinhaha/tensorflow | 4647017a727985d64c5b0addee92f0ec516952c1 | [
"MIT"
] | null | null | null | Inflearn_SungKim/3.MultiVariableLinearRegression/multi-variableLinearregression.py | shinhaha/tensorflow | 4647017a727985d64c5b0addee92f0ec516952c1 | [
"MIT"
] | null | null | null | Inflearn_SungKim/3.MultiVariableLinearRegression/multi-variableLinearregression.py | shinhaha/tensorflow | 4647017a727985d64c5b0addee92f0ec516952c1 | [
"MIT"
] | null | null | null | import tensorflow as tf
x1_data=[73.,93.,89.,96.,73.]
x2_data=[80.,88.,91.,98.,66.]
x3_data=[75.,93.,90.,100.,70.]
y_data=[152.,185.,180.,196.,142.]
x1=tf.placeholder(tf.float32)
x2=tf.placeholder(tf.float32)
x3=tf.placeholder(tf.float32)
Y=tf.placeholder(tf.float32)
w1=tf.Variable(tf.random_normal([1]),name='weight... | 32.129032 | 85 | 0.712851 |
95e18e6281085104769aa15c1a8ef9828b449526 | 1,759 | py | Python | train_model.py | sanjjayrj/Chatbot-NLTK | 2000a3c640d6624984ca4ad2457557e937d4ae05 | [
"MIT"
] | 3 | 2020-11-17T12:14:37.000Z | 2021-08-14T05:46:38.000Z | train_model.py | sanjjayrj/Chatbot-NLTK | 2000a3c640d6624984ca4ad2457557e937d4ae05 | [
"MIT"
] | null | null | null | train_model.py | sanjjayrj/Chatbot-NLTK | 2000a3c640d6624984ca4ad2457557e937d4ae05 | [
"MIT"
] | null | null | null | import pandas as pd
import nltk
import re
from nltk.stem import wordnet
from nltk import pos_tag
from nltk import word_tokenize
from datetime import datetime
data = pd.read_csv('traindata.csv', encoding='utf-8')
train_counter = 0
if __name__ == '__main__':
print("Time now: " + str(datetime.now()))
print(data.... | 37.425532 | 119 | 0.557703 |
95e2b38a9c011b08bb379e05752137d534a0a8a9 | 1,848 | py | Python | tensor_twister/server.py | iamorphen/tensor_twister | d7936efa50cf0f7f3950ff4cbb0dd3fbac310ca9 | [
"MIT"
] | null | null | null | tensor_twister/server.py | iamorphen/tensor_twister | d7936efa50cf0f7f3950ff4cbb0dd3fbac310ca9 | [
"MIT"
] | null | null | null | tensor_twister/server.py | iamorphen/tensor_twister | d7936efa50cf0f7f3950ff4cbb0dd3fbac310ca9 | [
"MIT"
] | null | null | null | import io
import logging
import queue
from collections import namedtuple
import torch
import zmq
from tensor_twister.status_codes import StatusCode
UnpackedMessage = namedtuple("UnpackedMessage", ["tensor", "name", "ip"])
def serve(host: str, port: int):
"""
Listen for incoming tensor data from clients. P... | 33 | 120 | 0.635281 |
95e39518b618f5551cfe1c882c8f307a7a86e276 | 6,744 | py | Python | optunity/solvers/CMAES.py | xrounder/optunity | 019182ca83fe2002083cc1ac938510cb967fd2c9 | [
"BSD-3-Clause"
] | 401 | 2015-01-08T00:56:20.000Z | 2022-03-19T09:07:12.000Z | optunity/solvers/CMAES.py | xrounder/optunity | 019182ca83fe2002083cc1ac938510cb967fd2c9 | [
"BSD-3-Clause"
] | 67 | 2015-01-08T09:13:20.000Z | 2022-01-05T23:26:36.000Z | optunity/solvers/CMAES.py | xrounder/optunity | 019182ca83fe2002083cc1ac938510cb967fd2c9 | [
"BSD-3-Clause"
] | 94 | 2015-02-04T08:35:56.000Z | 2021-10-03T12:40:35.000Z | #! /usr/bin/env python
# Copyright (c) 2014 KU Leuven, ESAT-STADIUS
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notic... | 36.852459 | 144 | 0.631821 |
95e555ee7266bd7c5e0f103c5c42eba12b36c67d | 622 | py | Python | DailyCoding/11.py | jason71319jason/Interview-solved | 42ca93a68475952753d185c325cb55c79e2e55e1 | [
"MIT"
] | 46 | 2019-10-14T01:21:35.000Z | 2022-01-08T23:55:15.000Z | DailyCoding/11.py | jason71319jason/Interview-solved | 42ca93a68475952753d185c325cb55c79e2e55e1 | [
"MIT"
] | 53 | 2019-10-03T17:16:43.000Z | 2020-12-08T12:48:19.000Z | DailyCoding/11.py | jason71319jason/Interview-solved | 42ca93a68475952753d185c325cb55c79e2e55e1 | [
"MIT"
] | 96 | 2019-10-03T18:12:10.000Z | 2021-03-14T19:41:06.000Z | """
This problem was asked by Twitter.
Implement an autocomplete system. That is, given a query string s and a set of all possible query strings, return all strings in the set that have s as a prefix.
For example, given the query string de and the set of strings [dog, deer, deal], return [deer, deal].
Hint: Try prep... | 28.272727 | 161 | 0.705788 |
95e79ef92334e9854cdc295c02dc16e232f812ed | 4,974 | py | Python | pyblnet/blnet_parser.py | henfri/pyblnet | 0a3a59ea39ab569d4b59be5a918736dc238bcf13 | [
"MIT"
] | 3 | 2019-03-11T12:38:43.000Z | 2022-02-18T21:40:54.000Z | pyblnet/blnet_parser.py | henfri/pyblnet | 0a3a59ea39ab569d4b59be5a918736dc238bcf13 | [
"MIT"
] | 26 | 2018-10-15T10:57:21.000Z | 2021-03-23T18:35:06.000Z | pyblnet/blnet_parser.py | henfri/pyblnet | 0a3a59ea39ab569d4b59be5a918736dc238bcf13 | [
"MIT"
] | 7 | 2018-10-03T09:39:30.000Z | 2020-03-12T19:44:44.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 09.08.2018
This is basically a python port of of a script by berwinter
https://github.com/berwinter/uvr1611/blob/master/lib/backend/blnet-connection.inc.php
author: Niels
"""
import struct
from datetime import datetime
# Parser constant
# 1 bit
DIGITAL_ON ... | 29.784431 | 85 | 0.559912 |
95e8a73a4c141ad9d18c2ea514ffb13b8b700b03 | 3,568 | py | Python | app/routers/nodes.py | yamatteo/vue-fastapi-boilerplate | 5fa3de29a6e7ec4a8df9b3a4073f462307f62cb6 | [
"MIT"
] | 2 | 2020-03-11T02:58:44.000Z | 2020-03-27T16:00:25.000Z | app/routers/nodes.py | yamatteo/vue-fastapi-boilerplate | 5fa3de29a6e7ec4a8df9b3a4073f462307f62cb6 | [
"MIT"
] | 7 | 2021-03-10T07:59:29.000Z | 2022-02-26T23:46:17.000Z | app/routers/nodes.py | yamatteo/vue-fastapi-boilerplate | 5fa3de29a6e7ec4a8df9b3a4073f462307f62cb6 | [
"MIT"
] | 1 | 2020-03-11T02:58:48.000Z | 2020-03-11T02:58:48.000Z | from typing import Optional
from typing import List
from fastapi import APIRouter, Depends, Body
from models import User, Content, Node, Group, ExternalContent
from routers import get_current_user, admin_only
from schemas import NodeAdd, NodeEdit, NodeFind
#
router = APIRouter()
| 37.166667 | 121 | 0.690583 |
95eaee2ff327784e0d2a6285027d63a294194fa5 | 283 | py | Python | Programming_Maester/Phoneketmon.py | Mayner0220/Programmers | 42e4783a526506fb7d8208841a76201909ed5c5c | [
"Apache-2.0"
] | 1 | 2021-04-01T06:19:02.000Z | 2021-04-01T06:19:02.000Z | Programming_Maester/Phoneketmon.py | Mayner0220/Programmers | 42e4783a526506fb7d8208841a76201909ed5c5c | [
"Apache-2.0"
] | null | null | null | Programming_Maester/Phoneketmon.py | Mayner0220/Programmers | 42e4783a526506fb7d8208841a76201909ed5c5c | [
"Apache-2.0"
] | null | null | null | # https://programmers.co.kr/learn/courses/30/lessons/1845
print(solution([3,1,2,3]))
print(solution([3,3,3,2,2,4]))
print(solution([3,3,3,2,2,2])) | 25.727273 | 57 | 0.618375 |
95ec274e03ce16625cb08ace26548a81e6d7c252 | 3,903 | py | Python | ooobuild/lo/xml/crypto/sax/xsax_event_keeper.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/xml/crypto/sax/xsax_event_keeper.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/xml/crypto/sax/xsax_event_keeper.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http: // www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 37.171429 | 206 | 0.688189 |
95ed4a727fcf9707dcfd7fa3fc1e4e7848fbb44c | 992 | py | Python | neodroidagent/common/session_factory/vertical/procedures/training/sampling/rollout.py | gitter-badger/agent | 3f53eaa7ebdee3ab423c7b58785d584fe1a6ae11 | [
"Apache-2.0"
] | 8 | 2017-09-13T08:28:44.000Z | 2022-01-21T15:59:19.000Z | neodroidagent/common/session_factory/vertical/procedures/training/sampling/rollout.py | gitter-badger/agent | 3f53eaa7ebdee3ab423c7b58785d584fe1a6ae11 | [
"Apache-2.0"
] | 4 | 2019-03-22T13:49:16.000Z | 2019-03-25T13:49:39.000Z | neodroidagent/common/session_factory/vertical/procedures/training/sampling/rollout.py | gitter-badger/agent | 3f53eaa7ebdee3ab423c7b58785d584fe1a6ae11 | [
"Apache-2.0"
] | 3 | 2017-09-13T08:31:38.000Z | 2021-11-09T11:22:27.000Z | from itertools import count
from tqdm import tqdm
from neodroid.environments.droid_environment import VectorUnityEnvironment
| 26.810811 | 82 | 0.626008 |
95eef20a68a045c35b991c4b9eef565e70a03766 | 17,995 | py | Python | sysevr/slicer/mapping.py | Saleh-Ibtasham/VulScrape | 738d17e9dd7e5edc2341d106361651fd28f99c61 | [
"PostgreSQL",
"Unlicense",
"MIT"
] | 1 | 2021-04-12T12:59:33.000Z | 2021-04-12T12:59:33.000Z | sysevr/slicer/mapping.py | Jokers-grin/VulScrape | 738d17e9dd7e5edc2341d106361651fd28f99c61 | [
"PostgreSQL",
"Unlicense",
"MIT"
] | null | null | null | sysevr/slicer/mapping.py | Jokers-grin/VulScrape | 738d17e9dd7e5edc2341d106361651fd28f99c61 | [
"PostgreSQL",
"Unlicense",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import re
import copy
import os
import string
import xlrd
import pickle
from .get_tokens import *
keywords_0 = ('auto', 'typedf', 'const', 'extern', 'register', 'static', 'volatile', 'continue', 'break',
'default', 'return', 'goto', 'else', 'case')
keywords_1 = ('catch', 'sizeof... | 38.866091 | 160 | 0.373159 |
95ef3fa428d1d310cb953139858993824869ba27 | 1,929 | py | Python | Flatipie/widgets/cards.py | zenqiwp/Flatipie | 441b1f120d78ec072b86d1c95b381e85fbe7661d | [
"MIT"
] | 11 | 2020-11-12T08:07:56.000Z | 2021-04-27T01:42:30.000Z | Flatipie/widgets/cards.py | zenqiwp/Flatipie | 441b1f120d78ec072b86d1c95b381e85fbe7661d | [
"MIT"
] | null | null | null | Flatipie/widgets/cards.py | zenqiwp/Flatipie | 441b1f120d78ec072b86d1c95b381e85fbe7661d | [
"MIT"
] | 2 | 2020-11-12T07:08:27.000Z | 2020-11-12T08:07:58.000Z |
"""
Copyright (c) 2020 Flatipie
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge... | 37.096154 | 79 | 0.709176 |
95ef71f8c3f9102a164ab9d3fc0c343aa7cbaaa5 | 7,035 | py | Python | lib/datasets/vrd/to_pascal_format.py | sx14/open-relation.pytorch | 3fe52a0c6129a80abbc84df53903d13b7dea05d6 | [
"MIT"
] | 2 | 2019-04-21T01:45:01.000Z | 2020-03-11T07:09:18.000Z | lib/datasets/vrd/to_pascal_format.py | sx14/open-relation.pytorch | 3fe52a0c6129a80abbc84df53903d13b7dea05d6 | [
"MIT"
] | null | null | null | lib/datasets/vrd/to_pascal_format.py | sx14/open-relation.pytorch | 3fe52a0c6129a80abbc84df53903d13b7dea05d6 | [
"MIT"
] | null | null | null | import os
import shutil
import xml.dom.minidom
| 45.980392 | 87 | 0.729495 |
95f03d2ec095743360ac14d2a11b057617f86d87 | 4,880 | py | Python | stellar/cognition/planning.py | strfx/stellar | 41b190eed016d2d6ad8548490a0c9620a02d711e | [
"MIT"
] | null | null | null | stellar/cognition/planning.py | strfx/stellar | 41b190eed016d2d6ad8548490a0c9620a02d711e | [
"MIT"
] | null | null | null | stellar/cognition/planning.py | strfx/stellar | 41b190eed016d2d6ad8548490a0c9620a02d711e | [
"MIT"
] | null | null | null | """
Contains path planning logic.
"""
import math
import numpy as np
from heapq import heappush, heappop
def heuristics(a, b):
"""Heuristics function using the Euclidian Distance."""
weight = 1.0
x1, y1 = a
x2, y2 = b
distance = np.sqrt(np.square(x2-x1) + np.square(y2-y1))
# distance = math.... | 28.87574 | 92 | 0.527664 |
95f0995fad2f82fbbbdccca26aa5605a1c0767e1 | 84 | py | Python | libcity/model/traffic_od_prediction/__init__.py | LibCity/Bigscity-LibCity-Docs-zh_CN | 2be639c3fe7d75727ade18f473d6f625900f73f2 | [
"Apache-2.0"
] | 5 | 2021-09-28T12:32:50.000Z | 2022-02-03T09:04:35.000Z | libcity/model/traffic_od_prediction/__init__.py | aptx1231/Bigscity-TrafficDL-Docs-zh_CN | 2be639c3fe7d75727ade18f473d6f625900f73f2 | [
"Apache-2.0"
] | null | null | null | libcity/model/traffic_od_prediction/__init__.py | aptx1231/Bigscity-TrafficDL-Docs-zh_CN | 2be639c3fe7d75727ade18f473d6f625900f73f2 | [
"Apache-2.0"
] | 1 | 2021-12-16T05:10:35.000Z | 2021-12-16T05:10:35.000Z | from libcity.model.traffic_od_prediction.GEML import GEML
__all__ = [
"GEML"
]
| 14 | 57 | 0.738095 |
95f29beeb0a5add129f6eb5d02625efa724d1d4e | 699 | py | Python | core/migrations/0008_auto_20151203_1519.py | rafaelbantu/timtec | 86c51b7440a044704ed33c3e752a6cf6b15ceae3 | [
"BSD-3-Clause"
] | 21 | 2015-09-23T14:07:16.000Z | 2022-02-18T01:35:18.000Z | core/migrations/0008_auto_20151203_1519.py | rafaelbantu/timtec | 86c51b7440a044704ed33c3e752a6cf6b15ceae3 | [
"BSD-3-Clause"
] | 178 | 2016-05-10T16:16:19.000Z | 2021-12-15T20:21:21.000Z | core/migrations/0008_auto_20151203_1519.py | rafaelbantu/timtec | 86c51b7440a044704ed33c3e752a6cf6b15ceae3 | [
"BSD-3-Clause"
] | 18 | 2015-10-23T13:28:17.000Z | 2021-09-22T13:08:28.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
| 27.96 | 132 | 0.635193 |
95f38c9fc1b89ab08b48f547bb8603c9adde90bb | 628 | py | Python | hipshare/lib/util.py | erg0dic/hipshare | 993f0edee7e9156b7154d578ef6a4e50cfcdd632 | [
"BSD-2-Clause"
] | 1 | 2015-11-03T19:33:44.000Z | 2015-11-03T19:33:44.000Z | hipshare/lib/util.py | erg0dic/hipshare | 993f0edee7e9156b7154d578ef6a4e50cfcdd632 | [
"BSD-2-Clause"
] | 1 | 2015-11-03T19:35:19.000Z | 2015-11-03T19:35:19.000Z | hipshare/lib/util.py | erg0dic/hipshare | 993f0edee7e9156b7154d578ef6a4e50cfcdd632 | [
"BSD-2-Clause"
] | null | null | null | import json
import logging
import sys
log = logging.getLogger(__name__)
| 17.942857 | 60 | 0.598726 |
95f41e13e20cbb1290f9018c568b80de61a76953 | 95 | py | Python | vistrails/tests/resources/test_upgrades_layout/__init__.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 83 | 2015-01-05T14:50:50.000Z | 2021-09-17T19:45:26.000Z | vistrails/tests/resources/test_upgrades_layout/__init__.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 254 | 2015-01-02T20:39:19.000Z | 2018-11-28T17:16:44.000Z | vistrails/tests/resources/test_upgrades_layout/__init__.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 40 | 2015-04-17T16:46:36.000Z | 2021-09-28T22:43:24.000Z | identifier = 'org.vistrails.test.upgrades_layout'
name ='test_upgrades_layout'
version = '0.3'
| 23.75 | 49 | 0.778947 |
95f557240d66982761b806e370f3acd7dca5c78f | 480 | py | Python | python_tips_three.py | obetron/python_tips | 9b6299db4f9dbc51638bba310deaf0c1dec759fe | [
"MIT"
] | null | null | null | python_tips_three.py | obetron/python_tips | 9b6299db4f9dbc51638bba310deaf0c1dec759fe | [
"MIT"
] | null | null | null | python_tips_three.py | obetron/python_tips | 9b6299db4f9dbc51638bba310deaf0c1dec759fe | [
"MIT"
] | null | null | null |
#for all read file code at the end of the code file should closed.
f = open('test.txt', 'r')
file_contents = f.read()
f.close()
words = file_contents.split(' ')
word_count = len(words)
print(word_count)
"""
OUTPUT:
3
"""
#for all the time use a file closing it is became a big job.
with open('test.txt', 'r') as f:
... | 17.777778 | 66 | 0.675 |
95f79173711e478161ccc6939dc1c76c706f0ae5 | 1,192 | py | Python | albert/helper.py | vvvm23/albert | 548fa03832f7e64ab79f2dfa16aa5ac42469333d | [
"MIT"
] | 1 | 2021-06-10T10:54:59.000Z | 2021-06-10T10:54:59.000Z | albert/helper.py | vvvm23/albert | 548fa03832f7e64ab79f2dfa16aa5ac42469333d | [
"MIT"
] | null | null | null | albert/helper.py | vvvm23/albert | 548fa03832f7e64ab79f2dfa16aa5ac42469333d | [
"MIT"
] | null | null | null | import torch
from einops import rearrange
"""
@openai - VD-VAE
https://github.com/openai/vdvae/blob/main/vae_helpers.py
Nice helper module as calling super.__init__() gets annoying
"""
"""
@lucidrains - Phil Wang (nystrom-attention)
https://github.com/lucidrains/nystrom-attention/blob/main/nystro... | 27.090909 | 100 | 0.613255 |
95f8d504586e0cc5968ca2a0c621d00c07ae2c40 | 2,078 | py | Python | p2_mahjong/utils.py | yata0/Mahjong | 764cd607df715b879f3f8a54b6def55e0b7d4706 | [
"MIT"
] | null | null | null | p2_mahjong/utils.py | yata0/Mahjong | 764cd607df715b879f3f8a54b6def55e0b7d4706 | [
"MIT"
] | null | null | null | p2_mahjong/utils.py | yata0/Mahjong | 764cd607df715b879f3f8a54b6def55e0b7d4706 | [
"MIT"
] | null | null | null | # coding=utf-8
import sys
import numpy as np
from p2_mahjong.card import MahjongCard as Card
log_head = "utils.py"
CARD_USED_TYPE = ['characters', 'green', 'red', 'white', 'east', 'west', 'north', 'south',
'spring', 'summer', 'autumn', 'winter', 'mei', 'lan', 'zhu', 'ju']
card_encoding_dict = {}
card... | 29.685714 | 90 | 0.590472 |
95fa5390eed432169e5e44214698604b6c85fcde | 1,062 | py | Python | Chapter 01/int_sqrt.py | bpbpublications/Python-Quick-Interview-Guide | ab4ff3e670b116a4db6b9e1f0ccba8424640704d | [
"MIT"
] | 1 | 2021-05-14T19:53:41.000Z | 2021-05-14T19:53:41.000Z | Chapter 01/int_sqrt.py | bpbpublications/Python-Quick-Interview-Guide | ab4ff3e670b116a4db6b9e1f0ccba8424640704d | [
"MIT"
] | null | null | null | Chapter 01/int_sqrt.py | bpbpublications/Python-Quick-Interview-Guide | ab4ff3e670b116a4db6b9e1f0ccba8424640704d | [
"MIT"
] | null | null | null | '''
class Solution:
def mySqrt(self,x) :
# Base cases
if (x == 0 or x == 1) :
return x
# Do Binary Search for integer square root
start = 1
end = x
while (start <= end) :
mid = (start + end) // 2
# If x is a perfect square
... | 24.136364 | 62 | 0.415254 |
95ff75475d347ef322808cfa526e253df07b5f81 | 13,517 | py | Python | meg_runtime/ui/manager.py | MultimediaExtensibleGit/Runtime | ba2e469666163177034e44077b02378dfc6649c9 | [
"MIT"
] | null | null | null | meg_runtime/ui/manager.py | MultimediaExtensibleGit/Runtime | ba2e469666163177034e44077b02378dfc6649c9 | [
"MIT"
] | 5 | 2020-03-24T19:59:38.000Z | 2020-04-22T03:44:43.000Z | meg_runtime/ui/manager.py | MultimediaExtensibleGit/Runtime | ba2e469666163177034e44077b02378dfc6649c9 | [
"MIT"
] | 2 | 2020-03-13T18:35:46.000Z | 2020-04-11T20:19:20.000Z | """MEG UI Manager
"""
import pkg_resources
from PyQt5 import QtCore, QtWidgets, QtGui, uic
from meg_runtime.config import Config
from meg_runtime.logger import Logger
from meg_runtime.app import App
| 41.719136 | 134 | 0.600059 |
95ffe673bc040b87ba5fb46405be623006c98d02 | 1,459 | py | Python | tests/scripts/test_s_rs_raw_shapes.py | nismod/energy_demand | 247fcea074a846026710ed9b039b22f8b9835643 | [
"MIT"
] | 14 | 2018-02-23T10:03:45.000Z | 2022-03-03T13:59:30.000Z | tests/scripts/test_s_rs_raw_shapes.py | nismod/energy_demand | 247fcea074a846026710ed9b039b22f8b9835643 | [
"MIT"
] | 59 | 2017-02-22T15:03:30.000Z | 2020-12-16T12:26:17.000Z | tests/scripts/test_s_rs_raw_shapes.py | nismod/energy_demand | 247fcea074a846026710ed9b039b22f8b9835643 | [
"MIT"
] | 5 | 2017-08-22T11:31:42.000Z | 2020-06-24T18:30:12.000Z | """testing
"""
from energy_demand.scripts import s_rs_raw_shapes
import numpy as np
| 31.717391 | 70 | 0.437286 |
2501aa9e0452052b19ad9fe91a29c5a969b9d03e | 1,935 | py | Python | release/davis16/evaluate.py | MSiam/segment-any-moving | 82cb782867d866d2f4eb68230edb75f613e15a02 | [
"Apache-2.0"
] | 70 | 2019-09-16T17:55:55.000Z | 2022-03-07T00:26:53.000Z | release/davis16/evaluate.py | MSiam/segment-any-moving | 82cb782867d866d2f4eb68230edb75f613e15a02 | [
"Apache-2.0"
] | 9 | 2019-09-30T09:15:11.000Z | 2021-07-21T11:33:13.000Z | release/davis16/evaluate.py | MSiam/segment-any-moving | 82cb782867d866d2f4eb68230edb75f613e15a02 | [
"Apache-2.0"
] | 5 | 2019-09-25T05:14:37.000Z | 2021-07-08T20:13:47.000Z | import argparse
import logging
import yaml
from pathlib import Path
from script_utils.common import common_setup
from release.davis16.compute_flow import link_splits
from release.helpers.misc import msg, subprocess_call
if __name__ == "__main__":
main()
| 31.209677 | 74 | 0.632041 |
2503cb791f9ad674e778396da993788db1fa44bb | 4,712 | py | Python | qq/mention.py | foxwhite25/qq.py | 92e744205e57b4c8922aa5843095ae900b3c1d84 | [
"MIT"
] | 40 | 2021-12-07T02:18:14.000Z | 2022-03-28T13:14:16.000Z | qq/mention.py | foxwhite25/qq.py | 92e744205e57b4c8922aa5843095ae900b3c1d84 | [
"MIT"
] | 2 | 2021-12-12T17:34:29.000Z | 2021-12-17T04:43:03.000Z | qq/mention.py | foxwhite25/qq.py | 92e744205e57b4c8922aa5843095ae900b3c1d84 | [
"MIT"
] | 5 | 2021-12-10T11:17:41.000Z | 2022-03-05T13:53:50.000Z | # The MIT License (MIT)
# Copyright (c) 2021-present foxwhite25
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, ... | 35.164179 | 102 | 0.655136 |
2504849dd9ac056161c71352758bc395f3e09c7d | 6,395 | py | Python | cupcake/editor/autocomplete/itemkinds.py | billyeatcookies/cupcake | 2f2d1d5f8a1a454e50283547cf433cc82d1825d6 | [
"MIT"
] | 3 | 2022-03-29T12:55:24.000Z | 2022-03-30T17:06:11.000Z | cupcake/editor/autocomplete/itemkinds.py | billyeatcookies/Cupcake | 2f2d1d5f8a1a454e50283547cf433cc82d1825d6 | [
"MIT"
] | null | null | null | cupcake/editor/autocomplete/itemkinds.py | billyeatcookies/Cupcake | 2f2d1d5f8a1a454e50283547cf433cc82d1825d6 | [
"MIT"
] | null | null | null | import tkinter as tk
| 81.987179 | 120 | 0.854887 |
2505a01273ca3c6e0204f8f0d9964f3bd464761f | 1,125 | py | Python | register/migrations/0001_initial.py | duks500/Nilestone-Project | 6b45ac21f9d9e7a4839d6f616711cbe8daa6e051 | [
"bzip2-1.0.6"
] | null | null | null | register/migrations/0001_initial.py | duks500/Nilestone-Project | 6b45ac21f9d9e7a4839d6f616711cbe8daa6e051 | [
"bzip2-1.0.6"
] | null | null | null | register/migrations/0001_initial.py | duks500/Nilestone-Project | 6b45ac21f9d9e7a4839d6f616711cbe8daa6e051 | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 3.0 on 2020-03-29 14:09
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| 37.5 | 165 | 0.623111 |
250a44eb50bdd484b59b76e217165e7deeb8a326 | 9,686 | py | Python | utils/iwr6843_utils/parse_tlv.py | ApocalyVec/mGesf | 21e0bf37a9d11a3cdde86a8d54e2f6c6a2211ab5 | [
"MIT"
] | 18 | 2020-06-02T11:21:47.000Z | 2022-03-25T08:16:57.000Z | utils/iwr6843_utils/parse_tlv.py | ApocalyVec/mGesf | 21e0bf37a9d11a3cdde86a8d54e2f6c6a2211ab5 | [
"MIT"
] | 4 | 2020-06-20T13:53:44.000Z | 2021-09-11T22:58:21.000Z | utils/iwr6843_utils/parse_tlv.py | ApocalyVec/mGesf | 21e0bf37a9d11a3cdde86a8d54e2f6c6a2211ab5 | [
"MIT"
] | 6 | 2020-04-23T21:30:17.000Z | 2021-08-03T19:59:12.000Z | import struct
import sys
import math
import numpy as np
#
# TODO 1: (NOW FIXED) Find the first occurrence of magic and start from there
# TODO 2: Warn if we cannot parse a specific section and try to recover
# TODO 3: Remove error at end of file if we have only fragment of TLV
#
def parseRDheatmap(data, tlvLeng... | 39.056452 | 120 | 0.58218 |
250b9e3749e20788bc502eca2699fe190f414709 | 11,285 | py | Python | shape_generator/helpers.py | MarkusPic/SWMM_xsections_shape_generator | daf19c9508f3727e8cd12c450485f7f21f3e30ed | [
"MIT"
] | null | null | null | shape_generator/helpers.py | MarkusPic/SWMM_xsections_shape_generator | daf19c9508f3727e8cd12c450485f7f21f3e30ed | [
"MIT"
] | null | null | null | shape_generator/helpers.py | MarkusPic/SWMM_xsections_shape_generator | daf19c9508f3727e8cd12c450485f7f21f3e30ed | [
"MIT"
] | 1 | 2020-12-29T13:02:28.000Z | 2020-12-29T13:02:28.000Z | from io import StringIO
from os import path, listdir, remove
from math import radians, tan, cos, pi, atan, sin
from pandas import read_csv
import sympy as sy
import numpy as np
# these variables are used to solve symbolic mathematical equations
# x is the control variable over the height ... max(x) = H_cross_section
... | 25.823799 | 118 | 0.517767 |
250eb809dd09ad7a9b6aa51c271e231f078546da | 1,772 | py | Python | bunq/sdk/util/util.py | mwiekens/sdk_python | 9333636083bc63dca4353e8f497588f57617efec | [
"MIT"
] | null | null | null | bunq/sdk/util/util.py | mwiekens/sdk_python | 9333636083bc63dca4353e8f497588f57617efec | [
"MIT"
] | null | null | null | bunq/sdk/util/util.py | mwiekens/sdk_python | 9333636083bc63dca4353e8f497588f57617efec | [
"MIT"
] | null | null | null | from __future__ import annotations
import json
import socket
import requests
from bunq.sdk.context.api_context import ApiContext, ApiEnvironmentType
from bunq.sdk.exception.bunq_exception import BunqException
from bunq.sdk.http.api_client import ApiClient
from bunq.sdk.model.generated import endpoint
from bunq.sdk.m... | 34.076923 | 79 | 0.744921 |
2510cbb743f1f29e0bb13e1ae7ff3435645c3b4d | 184 | py | Python | libs/db_check.py | redpeacock78/bach_bot | 086efe4d6eef05fbdff6af34534e54e43fd9af88 | [
"MIT"
] | null | null | null | libs/db_check.py | redpeacock78/bach_bot | 086efe4d6eef05fbdff6af34534e54e43fd9af88 | [
"MIT"
] | null | null | null | libs/db_check.py | redpeacock78/bach_bot | 086efe4d6eef05fbdff6af34534e54e43fd9af88 | [
"MIT"
] | null | null | null | import mysql.connector as mydb
conn = mydb.connect(
host='mysql_container',
port='3306',
user='docker',
password='docker',
database='my_db'
)
conn.is_connected()
| 15.333333 | 30 | 0.657609 |
2511753f88ea48953fbf7d9fff0197ffc5356c2e | 752 | py | Python | students/models/exams.py | samitnuk/studentsdb | 659c82f7bdc0d6a14074da14252384b9443e286c | [
"MIT"
] | null | null | null | students/models/exams.py | samitnuk/studentsdb | 659c82f7bdc0d6a14074da14252384b9443e286c | [
"MIT"
] | null | null | null | students/models/exams.py | samitnuk/studentsdb | 659c82f7bdc0d6a14074da14252384b9443e286c | [
"MIT"
] | null | null | null | from django.db import models
| 22.117647 | 60 | 0.599734 |
25132e1264d30cca913fe293f3805c8d79177d9b | 2,201 | py | Python | club_crm/api/clubtour.py | VivekChamp/clubcrm | 82036360d867d3dc5406bc71445a98841b5bffbf | [
"MIT"
] | null | null | null | club_crm/api/clubtour.py | VivekChamp/clubcrm | 82036360d867d3dc5406bc71445a98841b5bffbf | [
"MIT"
] | null | null | null | club_crm/api/clubtour.py | VivekChamp/clubcrm | 82036360d867d3dc5406bc71445a98841b5bffbf | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import frappe
from frappe import _
from datetime import datetime, timedelta, date, time
from frappe.utils import getdate, get_time, flt, now_datetime
from frappe.utils import escape_html
from frappe import throw, msgprint, _
| 33.348485 | 116 | 0.606997 |
2513a6b22c946cb8b820c0695cdd317c638f6bf0 | 647 | py | Python | goalboost/model/__init__.py | JohnLockwood/Goalboost | 1556a15f766ab762243e5d198b00ee7239b20411 | [
"RSA-MD"
] | null | null | null | goalboost/model/__init__.py | JohnLockwood/Goalboost | 1556a15f766ab762243e5d198b00ee7239b20411 | [
"RSA-MD"
] | 10 | 2021-07-30T14:39:05.000Z | 2021-07-30T14:39:07.000Z | goalboost/model/__init__.py | JohnLockwood/Goalboost | 1556a15f766ab762243e5d198b00ee7239b20411 | [
"RSA-MD"
] | null | null | null | '''
goalboost.model package
The goalboost model package consists of MongoEngine models along with
Marshmallow schemas. MongoEngine is our database ORM to MongoDB,
and Marshmallow is a serialization library that helps us validate, consume,
and expose these Orm objects for clients that need it at the API layer.
For Mon... | 26.958333 | 75 | 0.789799 |
2513a8a764760e74306e494219df1291ea86952f | 3,290 | py | Python | examples/block_store/snapshots.py | IamFive/sdk-python | 223b04f90477f7de0f00b3e652d8672ba73271c8 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | examples/block_store/snapshots.py | IamFive/sdk-python | 223b04f90477f7de0f00b3e652d8672ba73271c8 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | examples/block_store/snapshots.py | IamFive/sdk-python | 223b04f90477f7de0f00b3e652d8672ba73271c8 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2018 Huawei Technologies Co.,Ltd.
#
# 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... | 29.115044 | 89 | 0.614286 |
2515ebed6d44cdb6e775f2b149da71a36b8ce3fa | 6,270 | py | Python | lambda_upload.py | elbursto/aws_lambda_upload | 62215a1efd7037cad2d099489c16fab905ccf2d3 | [
"Apache-2.0"
] | null | null | null | lambda_upload.py | elbursto/aws_lambda_upload | 62215a1efd7037cad2d099489c16fab905ccf2d3 | [
"Apache-2.0"
] | null | null | null | lambda_upload.py | elbursto/aws_lambda_upload | 62215a1efd7037cad2d099489c16fab905ccf2d3 | [
"Apache-2.0"
] | null | null | null |
import boto3
from zipfile import ZipFile
import argparse
import json
import os
import shutil
if __name__ == "__main__":
main()
| 33 | 79 | 0.601435 |
25166ab3132cfb837c187df9b62bcf91450b7109 | 6,260 | py | Python | official/vision/image_classification/callbacks.py | arayabrain/models | ceaa23c0ebecdb445d14f002cc66a39c50ac92e3 | [
"Apache-2.0"
] | null | null | null | official/vision/image_classification/callbacks.py | arayabrain/models | ceaa23c0ebecdb445d14f002cc66a39c50ac92e3 | [
"Apache-2.0"
] | 3 | 2020-08-12T06:16:40.000Z | 2020-08-17T05:44:26.000Z | official/vision/image_classification/callbacks.py | arayabrain/models | ceaa23c0ebecdb445d14f002cc66a39c50ac92e3 | [
"Apache-2.0"
] | 1 | 2020-08-04T01:56:03.000Z | 2020-08-04T01:56:03.000Z | # Lint as: python3
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 36.184971 | 103 | 0.684824 |
2516f01f8f44e4e51781ce4ffc642a90318eac4f | 129 | py | Python | Lib/site-packages/git/index/__init__.py | nemarugommula/ecommerce | 60185e79655fbaf0fcad9e877a886fe9eb3c4451 | [
"bzip2-1.0.6"
] | 10 | 2021-05-31T07:18:08.000Z | 2022-03-19T09:20:11.000Z | Lib/site-packages/git/index/__init__.py | nemarugommula/ecommerce | 60185e79655fbaf0fcad9e877a886fe9eb3c4451 | [
"bzip2-1.0.6"
] | 10 | 2017-05-10T08:10:23.000Z | 2020-03-23T10:23:37.000Z | Lib/site-packages/git/index/__init__.py | nemarugommula/ecommerce | 60185e79655fbaf0fcad9e877a886fe9eb3c4451 | [
"bzip2-1.0.6"
] | 38 | 2017-04-26T14:13:37.000Z | 2021-06-24T11:36:38.000Z | """Initialize the index package"""
# flake8: noqa
from __future__ import absolute_import
from .base import *
from .typ import *
| 18.428571 | 38 | 0.751938 |
2519a94caf6b2f931b487b3397703da9ddf2b842 | 885 | py | Python | EDyA_II/4_tree/python/4_default_parameter.py | jrg-sln/academy | 498c11dcfeab78dbbbb77045a13d7d6675c0d150 | [
"MIT"
] | null | null | null | EDyA_II/4_tree/python/4_default_parameter.py | jrg-sln/academy | 498c11dcfeab78dbbbb77045a13d7d6675c0d150 | [
"MIT"
] | null | null | null | EDyA_II/4_tree/python/4_default_parameter.py | jrg-sln/academy | 498c11dcfeab78dbbbb77045a13d7d6675c0d150 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
burgerPython = Saucer("Hamburguesa de Python", 0.13,
cadDescription="Barely an eigth of a byte")
print(burgerPython) | 34.038462 | 75 | 0.59661 |
2519e01a81d1d3e2c4f4e4fede4c19c82e764391 | 9,768 | py | Python | model/bdrar.py | Mhaiyang/iccv | 04a8ee52c2323d7ff5cdf03c0be1466e8180d2eb | [
"MIT"
] | 2 | 2019-01-10T03:44:03.000Z | 2019-05-24T08:50:14.000Z | model/bdrar.py | Mhaiyang/iccv | 04a8ee52c2323d7ff5cdf03c0be1466e8180d2eb | [
"MIT"
] | null | null | null | model/bdrar.py | Mhaiyang/iccv | 04a8ee52c2323d7ff5cdf03c0be1466e8180d2eb | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
from torch import nn
from resnext.resnext101_regular import ResNeXt101
| 51.141361 | 135 | 0.619676 |
251a755eafd6983caca29826a579cc38212144dd | 7,413 | py | Python | pgeng/font.py | Bouncehball/pgeng | 6f88991e16cfd744c8565b68b6348f313b4d75c0 | [
"MIT"
] | null | null | null | pgeng/font.py | Bouncehball/pgeng | 6f88991e16cfd744c8565b68b6348f313b4d75c0 | [
"MIT"
] | null | null | null | pgeng/font.py | Bouncehball/pgeng | 6f88991e16cfd744c8565b68b6348f313b4d75c0 | [
"MIT"
] | null | null | null | 'Classes and functions for creating fonts and text buttons'
#IMPORTS
import pygame
from pathlib import Path
from .core import clip_surface, load_image
from .colour import palette_swap
#IMPORTS
#VARIALBES
__all__ = ['create_font', 'TextButton']
path = Path(__file__).resolve().parent
#VARIABLES
#CREATE_FON... | 37.439394 | 356 | 0.673816 |
251ac80cf768d166a984daeae7c4d2c5d7422487 | 1,814 | py | Python | pyguetzli/pil_image.py | wanadev/pyguetzli | 765cc89137e2f5fca80e5f894f4ec95c38995d96 | [
"Apache-2.0"
] | 28 | 2017-05-03T17:48:21.000Z | 2022-02-14T13:40:24.000Z | pyguetzli/pil_image.py | wanadev/pyguetzli | 765cc89137e2f5fca80e5f894f4ec95c38995d96 | [
"Apache-2.0"
] | 6 | 2017-08-21T07:52:18.000Z | 2020-07-17T16:41:44.000Z | pyguetzli/pil_image.py | wanadev/pyguetzli | 765cc89137e2f5fca80e5f894f4ec95c38995d96 | [
"Apache-2.0"
] | 3 | 2018-03-13T23:33:10.000Z | 2021-09-09T02:33:07.000Z | """
This modules contain helper function to deal with PIL / Pillow Images.
.. note::
Please note that the ``[PIL]`` (pillow) extra dependency must be installed
to allow functions from this module to work.
"""
from . import guetzli
def _to_pil_rgb_image(image):
"""Returns an PIL Image converted to the R... | 26.676471 | 79 | 0.656009 |
251c85ca611047b1b27da7153669dd51f78397d6 | 1,034 | py | Python | 201.bitwise-and-of-numbers-range.py | windard/leeeeee | 0107a5f95746592ca4fe78d2b5875cf65b1910e7 | [
"MIT"
] | null | null | null | 201.bitwise-and-of-numbers-range.py | windard/leeeeee | 0107a5f95746592ca4fe78d2b5875cf65b1910e7 | [
"MIT"
] | null | null | null | 201.bitwise-and-of-numbers-range.py | windard/leeeeee | 0107a5f95746592ca4fe78d2b5875cf65b1910e7 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=201 lang=python
#
# [201] Bitwise AND of Numbers Range
#
# https://leetcode.com/problems/bitwise-and-of-numbers-range/description/
#
# algorithms
# Medium (35.44%)
# Total Accepted: 77.3K
# Total Submissions: 217.7K
# Testcase Example: '5\n7'
#
# Given a range [m, n] where 0 <= m <= n <= 214... | 19.509434 | 78 | 0.548356 |
251cba64cfe05ed7cdba8439be4d154984b803ea | 12,053 | py | Python | src/dip_main.py | BardiaMojra/dip | 201bd14c13052b81967e051444f4e5c08c72631a | [
"MIT"
] | null | null | null | src/dip_main.py | BardiaMojra/dip | 201bd14c13052b81967e051444f4e5c08c72631a | [
"MIT"
] | null | null | null | src/dip_main.py | BardiaMojra/dip | 201bd14c13052b81967e051444f4e5c08c72631a | [
"MIT"
] | null | null | null | ''' dip
@author Bardia Mojra - 1000766739
@brief ee-5323 - project -
@date 10/31/21
code based on below YouTube tutorial and Pymotw.com documentation for socket mod.
@link https://www.youtube.com/watch?v=3QiPPX-KeSc
@link https://pymotw.com/2/socket/tcp.html
python socket module documentation
@link ht... | 31.064433 | 118 | 0.652867 |
251d295ac1daf4f6c0aa7d07697c6e03ea7c9186 | 1,128 | py | Python | generator/apigen/CommandParser.py | grbd/GBD.Build.BlackJack | 3e8d027625b7528af3674a373fd9931e3feaaab4 | [
"Apache-2.0"
] | 1 | 2017-05-26T00:18:26.000Z | 2017-05-26T00:18:26.000Z | generator/apigen/CommandParser.py | grbd/GBD.Build.BlackJack | 3e8d027625b7528af3674a373fd9931e3feaaab4 | [
"Apache-2.0"
] | null | null | null | generator/apigen/CommandParser.py | grbd/GBD.Build.BlackJack | 3e8d027625b7528af3674a373fd9931e3feaaab4 | [
"Apache-2.0"
] | null | null | null | """
A Command parser to parse over each jinja template for a given cmake command
"""
import os
from apigen.Logger import Logger
from jinja2 import Environment, PackageLoader, FileSystemLoader
| 31.333333 | 76 | 0.675532 |
251d599be91a9d5e66da8bf669765945fc72709e | 299 | py | Python | 1_Sys_Module/sysIO.py | ericchou1/Top5PythonModulesForNetworkEngineers | c6aa92c3b7bf6668f049acc6d3ba295634b56027 | [
"Apache-2.0"
] | 5 | 2016-08-21T16:24:03.000Z | 2021-01-11T23:04:21.000Z | 1_Sys_Module/sysIO.py | ericchou1/Top5PythonModulesForNetworkEngineers | c6aa92c3b7bf6668f049acc6d3ba295634b56027 | [
"Apache-2.0"
] | null | null | null | 1_Sys_Module/sysIO.py | ericchou1/Top5PythonModulesForNetworkEngineers | c6aa92c3b7bf6668f049acc6d3ba295634b56027 | [
"Apache-2.0"
] | 5 | 2016-11-05T17:05:39.000Z | 2022-01-31T20:19:12.000Z | #!/usr/bin/env python
import sys
print("Please tell me your favorite color: ")
color = sys.stdin.readline()
animal = raw_input("Please tell me your favorite animal: ")
print(animal)
sys.stdout.write("Your favorite color is: " + color + " favorite animal is: " + animal + "\n")
print("*" * 10)
| 19.933333 | 94 | 0.67893 |
251e7d6fbbff67cb94790461d92eb77f3f88ed53 | 111 | py | Python | comet/handler/__init__.py | shinybrar/Comet | 4229092fca74c130a7d4ecd4dbd22ae85f7e6308 | [
"BSD-2-Clause"
] | 15 | 2015-11-29T18:53:58.000Z | 2022-03-09T15:47:30.000Z | comet/handler/__init__.py | shinybrar/Comet | 4229092fca74c130a7d4ecd4dbd22ae85f7e6308 | [
"BSD-2-Clause"
] | 29 | 2016-01-21T18:10:45.000Z | 2021-10-01T16:41:12.000Z | comet/handler/__init__.py | shinybrar/Comet | 4229092fca74c130a7d4ecd4dbd22ae85f7e6308 | [
"BSD-2-Clause"
] | 11 | 2016-01-22T14:05:51.000Z | 2022-03-09T17:49:56.000Z | # Comet VOEvent Broker.
# Event handlers.
from comet.handler.relay import *
from comet.handler.spawn import *
| 18.5 | 33 | 0.765766 |
251efaea3581632f73c0223d75becaac1ffc7162 | 954 | py | Python | measure_mate/tests/api/test_template.py | niche-tester/measure-mate | c3acba57747bcb89fe0c6b9509ec90f04a581506 | [
"MIT"
] | 15 | 2015-12-14T02:20:31.000Z | 2022-01-30T04:36:39.000Z | measure_mate/tests/api/test_template.py | rloomans/measure-mate | e89f9c8e1faa1920496f1c997f6d87ec0f9bd7c2 | [
"MIT"
] | 1,403 | 2017-02-16T01:00:04.000Z | 2022-03-15T21:12:13.000Z | measure_mate/tests/api/test_template.py | rloomans/measure-mate | e89f9c8e1faa1920496f1c997f6d87ec0f9bd7c2 | [
"MIT"
] | 10 | 2015-12-18T01:30:46.000Z | 2022-01-30T04:36:41.000Z | from rest_framework import status
from rest_framework.reverse import reverse
from rest_framework.test import APITestCase
from measure_mate.models import Template
from measure_mate.tests.factories import TemplateFactory
| 38.16 | 73 | 0.715933 |
251f5df96375dbae57ea9bdc6db0a3e28bc73439 | 658 | py | Python | ecommerce/shop_management/migrations/0003_shop_created_at_shop_last_updated.py | mhdirajabi/django-drf-e-commerce | 526044a728f9f073a21386ff7f67ac570f4755c6 | [
"MIT"
] | null | null | null | ecommerce/shop_management/migrations/0003_shop_created_at_shop_last_updated.py | mhdirajabi/django-drf-e-commerce | 526044a728f9f073a21386ff7f67ac570f4755c6 | [
"MIT"
] | null | null | null | ecommerce/shop_management/migrations/0003_shop_created_at_shop_last_updated.py | mhdirajabi/django-drf-e-commerce | 526044a728f9f073a21386ff7f67ac570f4755c6 | [
"MIT"
] | null | null | null | # Generated by Django 4.0 on 2021-12-29 11:36
from django.db import migrations, models
| 27.416667 | 97 | 0.62462 |
252023af22ef5365f5e3d2b2d4c333240848fc36 | 4,085 | py | Python | lib/model.py | lanseyege/rl_algorithms | 5bdc5211b84fa4e9f16e68e1407825fdcacacec0 | [
"MIT"
] | null | null | null | lib/model.py | lanseyege/rl_algorithms | 5bdc5211b84fa4e9f16e68e1407825fdcacacec0 | [
"MIT"
] | null | null | null | lib/model.py | lanseyege/rl_algorithms | 5bdc5211b84fa4e9f16e68e1407825fdcacacec0 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from lib.util import normal_log_density
| 31.183206 | 98 | 0.59388 |
252143e0b4bc8782465cc8f472bab67d3793cee0 | 1,129 | py | Python | python/test_2020_04_2.py | wensby/advent-of-code | 50cd7fa2d35674d868a79ac8c75be24a43267e2b | [
"MIT"
] | null | null | null | python/test_2020_04_2.py | wensby/advent-of-code | 50cd7fa2d35674d868a79ac8c75be24a43267e2b | [
"MIT"
] | null | null | null | python/test_2020_04_2.py | wensby/advent-of-code | 50cd7fa2d35674d868a79ac8c75be24a43267e2b | [
"MIT"
] | null | null | null | import importlib
import unittest
solution = importlib.import_module('2020_04_2')
| 29.710526 | 82 | 0.578388 |
252147a24fb71425db336b4bd835e50e021bad1a | 1,649 | py | Python | acme/agents/jax/ail/__init__.py | Tsaousis/acme | 14278693bcc5fef0839ac60792d452d3d80acfd7 | [
"Apache-2.0"
] | 2,650 | 2020-06-01T16:31:25.000Z | 2022-03-31T07:32:41.000Z | acme/agents/jax/ail/__init__.py | Tsaousis/acme | 14278693bcc5fef0839ac60792d452d3d80acfd7 | [
"Apache-2.0"
] | 199 | 2020-06-02T01:09:09.000Z | 2022-03-31T17:11:20.000Z | acme/agents/jax/ail/__init__.py | Tsaousis/acme | 14278693bcc5fef0839ac60792d452d3d80acfd7 | [
"Apache-2.0"
] | 344 | 2020-06-01T16:45:21.000Z | 2022-03-30T11:15:09.000Z | # Copyright 2018 DeepMind Technologies Limited. 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 ... | 45.805556 | 74 | 0.814433 |
2521a1ac6de3b8964ba83ce10e729714793f678d | 2,578 | py | Python | cineapp/push.py | ptitoliv/cineapp | 4b6a8c68144436c5497353135a013ea783cfd224 | [
"MIT"
] | 2 | 2016-12-02T02:29:01.000Z | 2019-03-03T15:48:50.000Z | cineapp/push.py | ptitoliv/cineapp | 4b6a8c68144436c5497353135a013ea783cfd224 | [
"MIT"
] | 128 | 2016-05-22T21:44:20.000Z | 2022-03-11T23:14:18.000Z | cineapp/push.py | ptitoliv/cineapp | 4b6a8c68144436c5497353135a013ea783cfd224 | [
"MIT"
] | 1 | 2017-08-20T14:14:52.000Z | 2017-08-20T14:14:52.000Z | from __future__ import print_function
from cineapp import app, db, lm
from flask_login import login_required
from flask import jsonify, session, g, url_for, request
from pywebpush import webpush, WebPushException
from cineapp.models import PushNotification
import json, traceback, sys, datetime, time
from cineapp.auth i... | 39.060606 | 202 | 0.747867 |
252492e17fae91abe1251ab7bb4d09c4949ed235 | 37,380 | py | Python | pacu/models/awsapi/iotanalytics.py | RyanJarv/Pacu2 | 27df4bcf296fc8f467d3dc671a47bf9519ce7a24 | [
"MIT"
] | 1 | 2022-03-09T14:51:54.000Z | 2022-03-09T14:51:54.000Z | pacu/models/awsapi/iotanalytics.py | RyanJarv/Pacu2 | 27df4bcf296fc8f467d3dc671a47bf9519ce7a24 | [
"MIT"
] | null | null | null | pacu/models/awsapi/iotanalytics.py | RyanJarv/Pacu2 | 27df4bcf296fc8f467d3dc671a47bf9519ce7a24 | [
"MIT"
] | null | null | null | # generated by datamodel-codegen:
# filename: openapi.yaml
# timestamp: 2021-12-31T02:50:50+00:00
from __future__ import annotations
from datetime import datetime
from enum import Enum
from typing import Annotated, Any, List, Optional
from pydantic import BaseModel, Extra, Field
... | 24.511475 | 640 | 0.736811 |
25249f6ffc68bd327fd5d0540e42e061ccc8880f | 4,577 | py | Python | Codes/trreemap.py | Pepeisadog/Project | 49d77b1590723f87111a0e3a64bd94fa4bb65986 | [
"Unlicense"
] | null | null | null | Codes/trreemap.py | Pepeisadog/Project | 49d77b1590723f87111a0e3a64bd94fa4bb65986 | [
"Unlicense"
] | 3 | 2015-01-12T09:33:30.000Z | 2015-01-29T22:56:47.000Z | Codes/trreemap.py | Pepeisadog/Project | 49d77b1590723f87111a0e3a64bd94fa4bb65986 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Jan 25 15:48:52 2015
@author: Sofia
"""
import csv
import json
import os
sourceEncoding = "iso-8859-1"
targetEncoding = "utf-8"
# encode files to utf8 (source: http://stackoverflow.com/questions/191359/how-to-convert-a-file-to-utf-8-in-python)
csvfile = open('..\Data\AMFI.... | 31.136054 | 125 | 0.622023 |
2526119172205dbcc83b912e56e47b1cfd9d139b | 3,751 | py | Python | test_haystack/whoosh_tests/test_whoosh_management_commands.py | cbows/django-haystack | 80c154b7b11fdcf99dd2ef0e82342ed13e26053a | [
"BSD-3-Clause"
] | 2,021 | 2015-02-06T07:45:08.000Z | 2022-03-30T12:26:39.000Z | test_haystack/whoosh_tests/test_whoosh_management_commands.py | cbows/django-haystack | 80c154b7b11fdcf99dd2ef0e82342ed13e26053a | [
"BSD-3-Clause"
] | 787 | 2015-02-03T20:06:04.000Z | 2022-03-30T09:00:38.000Z | test_haystack/whoosh_tests/test_whoosh_management_commands.py | cbows/django-haystack | 80c154b7b11fdcf99dd2ef0e82342ed13e26053a | [
"BSD-3-Clause"
] | 878 | 2015-02-04T15:29:50.000Z | 2022-03-28T16:51:44.000Z | import datetime
import os
import unittest
from io import StringIO
from tempfile import mkdtemp
from unittest.mock import patch
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.management import call_command as real_call_command
from django.core.management.base i... | 33.491071 | 84 | 0.691816 |
25282fa8805725b2acc31f9c959840083384e1e2 | 2,977 | py | Python | src/server.py | tyler-fishbone/http_server | 93a49090d356b31522acd5bc3a25a1c8a3b604e3 | [
"MIT"
] | null | null | null | src/server.py | tyler-fishbone/http_server | 93a49090d356b31522acd5bc3a25a1c8a3b604e3 | [
"MIT"
] | null | null | null | src/server.py | tyler-fishbone/http_server | 93a49090d356b31522acd5bc3a25a1c8a3b604e3 | [
"MIT"
] | null | null | null | from http.server import HTTPServer, BaseHTTPRequestHandler
from urllib.parse import urlparse, parse_qs
from cowpy import cow
import json
import sys
if __name__ == '__main__':
run_forever()
| 26.114035 | 76 | 0.543164 |
2529f17c13ced51c4629d6195cff0d46c5800cac | 7,033 | py | Python | Chapter06/6B_TrendFollowings/6B_3_RunCNN.py | uyenphuong18406/Hands-On-Artificial-Intelligence-for-Banking | 3a10a14194368478bb8b78d3d17e9c6a7b7253db | [
"MIT"
] | 115 | 2020-06-18T15:00:58.000Z | 2022-03-02T10:13:19.000Z | Chapter06/6B_TrendFollowings/6B_3_RunCNN.py | uyenphuong18406/Hands-On-Artificial-Intelligence-for-Banking | 3a10a14194368478bb8b78d3d17e9c6a7b7253db | [
"MIT"
] | 2 | 2020-11-06T11:02:31.000Z | 2021-01-22T12:44:35.000Z | Chapter06/6B_TrendFollowings/6B_3_RunCNN.py | uyenphuong18406/Hands-On-Artificial-Intelligence-for-Banking | 3a10a14194368478bb8b78d3d17e9c6a7b7253db | [
"MIT"
] | 60 | 2020-07-22T14:53:10.000Z | 2022-03-23T10:17:59.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 30 00:58:34 2018
@author: jeff
"""
'''*************************************
#1. Import libraries and key varable values
'''
import os
import quandl
import pandas as pd
import numpy as np
import keras
from PIL import Image
#folder path
folder_path =... | 32.560185 | 187 | 0.624485 |
252ac1c22921db6597accc034da434758be4405a | 2,589 | py | Python | lichee/dataset/field_parser/image_local_path.py | Tencent/Lichee | 7653becd6fbf8b0715f788af3c0507c012be08b4 | [
"Apache-2.0"
] | 91 | 2021-10-30T02:25:05.000Z | 2022-03-28T06:51:52.000Z | lichee/dataset/field_parser/image_local_path.py | zhaijunyu/Lichee | 7653becd6fbf8b0715f788af3c0507c012be08b4 | [
"Apache-2.0"
] | 1 | 2021-12-17T09:30:25.000Z | 2022-03-05T12:30:13.000Z | lichee/dataset/field_parser/image_local_path.py | zhaijunyu/Lichee | 7653becd6fbf8b0715f788af3c0507c012be08b4 | [
"Apache-2.0"
] | 17 | 2021-11-04T07:50:23.000Z | 2022-03-24T14:24:11.000Z | # -*- coding: utf-8 -*-
from lichee import plugin
from .field_parser_base import BaseFieldParser
import os
from PIL import Image
from torchvision import transforms
import torch
from lichee.utils import storage
| 30.821429 | 117 | 0.611047 |
252b421527774d5fb18e906562e999ce4cef4de4 | 2,054 | py | Python | models/inception.py | ildoonet/kaggle-human-protein-atlas-image-classification | 9faedaf6e480712492ccfb36c7bdf5e9f7db8b41 | [
"Apache-2.0"
] | 35 | 2019-01-11T00:55:19.000Z | 2021-07-14T11:44:10.000Z | models/inception.py | ildoonet/kaggle-human-protein-atlas-image-classification | 9faedaf6e480712492ccfb36c7bdf5e9f7db8b41 | [
"Apache-2.0"
] | null | null | null | models/inception.py | ildoonet/kaggle-human-protein-atlas-image-classification | 9faedaf6e480712492ccfb36c7bdf5e9f7db8b41 | [
"Apache-2.0"
] | 9 | 2019-01-11T01:42:14.000Z | 2020-03-02T05:47:18.000Z | import torch
from torch import nn
import torch.nn.functional as F
import torchvision
from torchvision.models.inception import BasicConv2d, InceptionAux
import pretrainedmodels
from common import num_class
| 36.035088 | 108 | 0.595424 |
252c453ec6e9dc3416a26d47c38bcfb973477454 | 74 | py | Python | python/sequences.py | saedyousef/Python-scratch | ba4bf88d1ad86beddc8c7c5e2f43c4e837e2861e | [
"MIT"
] | 5 | 2020-07-20T17:47:08.000Z | 2021-08-17T18:26:25.000Z | python/sequences.py | saedyousef/CS-50 | ba4bf88d1ad86beddc8c7c5e2f43c4e837e2861e | [
"MIT"
] | null | null | null | python/sequences.py | saedyousef/CS-50 | ba4bf88d1ad86beddc8c7c5e2f43c4e837e2861e | [
"MIT"
] | 1 | 2021-06-29T19:49:46.000Z | 2021-06-29T19:49:46.000Z | name = "Saeed"
cordinates = (10.0, 20.0)
names = ["Saeed", "Bob", "Mousa"] | 24.666667 | 33 | 0.581081 |
252d0e1541c6bce0edda34974ac8e4c3861ecde4 | 2,622 | py | Python | scripts/create_fluseverity_figs/Supp_zOR_totalAR.py | eclee25/flu-SDI-exploratory-age | 2f5a4d97b84d2116e179e85fe334edf4556aa946 | [
"MIT"
] | 3 | 2018-03-29T23:02:43.000Z | 2020-08-10T12:01:50.000Z | scripts/create_fluseverity_figs/Supp_zOR_totalAR.py | eclee25/flu-SDI-exploratory-age | 2f5a4d97b84d2116e179e85fe334edf4556aa946 | [
"MIT"
] | null | null | null | scripts/create_fluseverity_figs/Supp_zOR_totalAR.py | eclee25/flu-SDI-exploratory-age | 2f5a4d97b84d2116e179e85fe334edf4556aa946 | [
"MIT"
] | null | null | null | #!/usr/bin/python
##############################################
###Python template
###Author: Elizabeth Lee
###Date: 9/2/14
###Function: mean peak-based retro zOR metric vs. total attack rate
###Import data: SQL_export/OR_allweeks_outpatient.csv, SQL_export/OR_allweeks.csv
###Command Line: python Supp_zOR_totalAR.... | 32.775 | 171 | 0.71167 |
252f0a3cb8c24df7cf5db2bc1599071146727275 | 1,238 | py | Python | Problem001.py | DimitrisMantas/ProjectEuler | 69b647232729a2d2a38ea08d1214616a861046cf | [
"Apache-2.0"
] | null | null | null | Problem001.py | DimitrisMantas/ProjectEuler | 69b647232729a2d2a38ea08d1214616a861046cf | [
"Apache-2.0"
] | null | null | null | Problem001.py | DimitrisMantas/ProjectEuler | 69b647232729a2d2a38ea08d1214616a861046cf | [
"Apache-2.0"
] | null | null | null | """This is the solution to Problem 1 of Project Euler."""
"""Copyright 2021 Dimitris Mantas"""
import time
def compute_all_multiples(of_number, below_number):
"""Compute all natural numbers, which are multiples of a natural number below a predefined number."""
# Register the list of said multiple... | 30.195122 | 109 | 0.673667 |
252f723efb0474d342e7055aa1aa0011f4760543 | 3,731 | py | Python | fuentes/Colecciones.py | victorricardo/tutorial-python | 5a49407e98c371b39d53993a8d5f63ed9f266353 | [
"OLDAP-2.5"
] | null | null | null | fuentes/Colecciones.py | victorricardo/tutorial-python | 5a49407e98c371b39d53993a8d5f63ed9f266353 | [
"OLDAP-2.5"
] | null | null | null | fuentes/Colecciones.py | victorricardo/tutorial-python | 5a49407e98c371b39d53993a8d5f63ed9f266353 | [
"OLDAP-2.5"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Colecciones - Listas
# In[1]:
l = [22, True, "una lista", [1, 2]]
mi_var = l[0] # mi_var vale 22
mi_var1 = l[3] # mi_var1 vale [1, 2]
print (mi_var)
print (mi_var1)
# In[50]:
# Si queremos acceder a un elemento de una lista incluida dentro de otra lista tendremos que
#... | 31.091667 | 123 | 0.703029 |
2530a05e38dc4778931bafbbddc794641c581d85 | 28,045 | py | Python | tests/test_subnetlaplace.py | georgezefko/Laplace | c488f7bf739297bab5d771f65635352a07716ca0 | [
"MIT"
] | null | null | null | tests/test_subnetlaplace.py | georgezefko/Laplace | c488f7bf739297bab5d771f65635352a07716ca0 | [
"MIT"
] | null | null | null | tests/test_subnetlaplace.py | georgezefko/Laplace | c488f7bf739297bab5d771f65635352a07716ca0 | [
"MIT"
] | null | null | null | import pytest
from itertools import product
import torch
from torch import nn
from torch.nn.utils import parameters_to_vector
from torch.utils.data import DataLoader, TensorDataset
from torchvision.models import wide_resnet50_2
from laplace import Laplace, SubnetLaplace, FullSubnetLaplace, DiagSubnetLaplace
from lapl... | 46.976549 | 117 | 0.724764 |
253330ec00e3e989dc1286f84a83a5c56cf85fc5 | 332 | py | Python | rylog/__init__.py | Ryan-Holben/rylog | 0f81fc8031b5c008f87ce367ebeabd443ef341f8 | [
"MIT"
] | null | null | null | rylog/__init__.py | Ryan-Holben/rylog | 0f81fc8031b5c008f87ce367ebeabd443ef341f8 | [
"MIT"
] | null | null | null | rylog/__init__.py | Ryan-Holben/rylog | 0f81fc8031b5c008f87ce367ebeabd443ef341f8 | [
"MIT"
] | null | null | null | """
rylog
Logging happening in a 3-dimensional Cartesian product of:
1. The logging level: [debug, info, warn, error]
2. The logging category: e.g. software event, action, output
3. The detected function/method: e.g. my_class.class_method or foo
"""
from .misc import *
from .server import *
from .clie... | 25.538462 | 70 | 0.701807 |
2533ae4893b1c779f4471ef4511dd0dbc0e4068c | 3,701 | py | Python | 03_queue/queue_xrh.py | Xinrihui/Data-Structure-and-Algrithms | fa3a455f64878e42d033c1fd8d612f108c71fb72 | [
"Apache-2.0"
] | 1 | 2021-08-13T10:55:33.000Z | 2021-08-13T10:55:33.000Z | 03_queue/queue_xrh.py | Xinrihui/Data-Structure-and-Algrithms | fa3a455f64878e42d033c1fd8d612f108c71fb72 | [
"Apache-2.0"
] | null | null | null | 03_queue/queue_xrh.py | Xinrihui/Data-Structure-and-Algrithms | fa3a455f64878e42d033c1fd8d612f108c71fb72 | [
"Apache-2.0"
] | null | null | null |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import timeit
import numpy as np
import sys
import random as rand
if __name__ == '__main__':
# 1.
# queue=Queue_array(8)
# string_list=['a','b','c','d','e','f','g','h']
#
# for ele in string_list:
# queue.enqueue(ele)
#
# print(queue... | 19.276042 | 87 | 0.518779 |
253438c9cde5237ab336b6ebc0e8e1089525b6e7 | 1,703 | py | Python | domains/gym_craft/tests/plotting.py | AndrewPaulChester/sage-code | 9fe676bfbcbc6f642eca29b30a1027fba2a426a0 | [
"MIT"
] | null | null | null | domains/gym_craft/tests/plotting.py | AndrewPaulChester/sage-code | 9fe676bfbcbc6f642eca29b30a1027fba2a426a0 | [
"MIT"
] | null | null | null | domains/gym_craft/tests/plotting.py | AndrewPaulChester/sage-code | 9fe676bfbcbc6f642eca29b30a1027fba2a426a0 | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib import pyplot as plt
import math
MAX_SPEED = 2
ACCELERATION = 0.5
DRAG = 0.3
TURN_SPEED=5
IMAGE = np.array([
[0,0,0,1,0,0,0],
[0,0,1,1,1,0,0],
[0,1,1,1,1,1,0],
[1,1,1,1,1,1,1],
[0,1,1,1,1,1,0],
[0,0,1,1,1,0,0],
[0,0,0,1,0,0,0]])
if __name__ == "__main__":
main() | 22.706667 | 81 | 0.613623 |
2536ce2ad28b7718b5111d981d1c1217ff573d5d | 1,868 | py | Python | 11_ContainerWithMostWater/container_with_most_water.py | xiaowei1118/leetcode-python | 24d4ccbbf9643100dd2de91afd5d30dca9b7ffe1 | [
"MIT"
] | 2 | 2017-10-09T16:59:01.000Z | 2017-10-10T08:38:08.000Z | 11_ContainerWithMostWater/container_with_most_water.py | xiaowei1118/leetcode-python | 24d4ccbbf9643100dd2de91afd5d30dca9b7ffe1 | [
"MIT"
] | null | null | null | 11_ContainerWithMostWater/container_with_most_water.py | xiaowei1118/leetcode-python | 24d4ccbbf9643100dd2de91afd5d30dca9b7ffe1 | [
"MIT"
] | null | null | null | # coding: utf-8
# n a1a2...an(i,ai)
# n i(i,ai) (i, 0)
# x
#
# LeetCode
# https://leetcode-cn.com/problems/container-with-most-water
list = [1,8,6,2,5,4,8,3,7]
print Solution().maxArea(list)
| 20.527473 | 68 | 0.4197 |
253841f648fa7d855056a9bf18031761bbedfe7c | 561 | py | Python | app/system/migrations/0003_auto_20181206_1042.py | TennaGraph/TennaGraph | 002998d94300ee67168f1a8164c0e6bc86836e1f | [
"Apache-2.0"
] | 7 | 2018-11-13T17:39:15.000Z | 2019-03-27T04:55:24.000Z | app/system/migrations/0003_auto_20181206_1042.py | TennaGraph/TennaGraph | 002998d94300ee67168f1a8164c0e6bc86836e1f | [
"Apache-2.0"
] | 72 | 2018-11-09T14:20:25.000Z | 2020-06-05T19:28:19.000Z | app/system/migrations/0003_auto_20181206_1042.py | TennaGraph/TennaGraph | 002998d94300ee67168f1a8164c0e6bc86836e1f | [
"Apache-2.0"
] | 3 | 2018-11-19T19:10:39.000Z | 2019-08-23T20:52:23.000Z | # Generated by Django 2.1.3 on 2018-12-06 10:42
from django.db import migrations, models
import system.models.system_settings
| 28.05 | 134 | 0.691622 |
25388135b2590bec6c24b4f712d9da835c81c62b | 4,338 | py | Python | pysplit/clusgroup.py | haochiche/pysplit | df6f8ebe93dd81ff8925529b8dfaaea2f446f2e5 | [
"BSD-3-Clause"
] | 110 | 2015-07-12T15:13:18.000Z | 2022-03-28T00:58:59.000Z | pysplit/clusgroup.py | haochiche/pysplit | df6f8ebe93dd81ff8925529b8dfaaea2f446f2e5 | [
"BSD-3-Clause"
] | 70 | 2016-02-23T03:19:55.000Z | 2022-03-14T09:12:43.000Z | pysplit/clusgroup.py | haochiche/pysplit | df6f8ebe93dd81ff8925529b8dfaaea2f446f2e5 | [
"BSD-3-Clause"
] | 66 | 2015-07-10T20:43:30.000Z | 2022-02-18T01:00:33.000Z | from __future__ import division, print_function
from .trajgroup import TrajectoryGroup
from .hypath import HyPath
from .hygroup import HyGroup
def print_clusterprocedure():
"""Print clustering guide."""
print("""
In ``PySPLIT``
1. Create ``TrajectoryGroup`` with desired set of trajectorie... | 27.807692 | 79 | 0.574919 |
253a183c509b499df726c22fb7b3ee45b370c6ff | 2,424 | py | Python | bin/lkft_notify_developer.py | roxell/lkft-tools | bd1981b1f616114cb260878fe7319753107e581b | [
"MIT"
] | 3 | 2018-12-14T02:37:10.000Z | 2020-04-30T19:07:01.000Z | bin/lkft_notify_developer.py | roxell/lkft-tools | bd1981b1f616114cb260878fe7319753107e581b | [
"MIT"
] | 25 | 2018-07-27T13:38:17.000Z | 2021-10-05T13:01:36.000Z | bin/lkft_notify_developer.py | roxell/lkft-tools | bd1981b1f616114cb260878fe7319753107e581b | [
"MIT"
] | 12 | 2018-07-09T22:52:32.000Z | 2021-11-29T19:45:33.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import os
import re
import requests
import sys
sys.path.append(os.path.join(sys.path[0], "../", "lib"))
import lkft_squad_client # noqa: E402
def get_branch_from_make_kernelversion(make_kernelversion):
"""
IN: "4.4.118"
OUT: "4.4"
... | 28.186047 | 86 | 0.664604 |
253c3b4e7dd3233e756d0a0d7809bcec3e7f9d2a | 1,507 | py | Python | day_3.py | bastoche/adventofcode2017 | a93ecff1de78376b03d4c922c82dff96574f2466 | [
"MIT"
] | null | null | null | day_3.py | bastoche/adventofcode2017 | a93ecff1de78376b03d4c922c82dff96574f2466 | [
"MIT"
] | null | null | null | day_3.py | bastoche/adventofcode2017 | a93ecff1de78376b03d4c922c82dff96574f2466 | [
"MIT"
] | null | null | null | from math import ceil, sqrt
if __name__ == "__main__":
input = 325489
print(part_one(input))
print(part_two(input))
| 25.542373 | 119 | 0.639681 |
253ce464d772dd296d3b8fca083e60adbb02df3d | 423 | py | Python | CeV - Gustavo Guanabara/exerc022.py | us19861229c/Meu-aprendizado-Python | 575c0714ac5377ff3122f4cb57952969e07ba89b | [
"Unlicense"
] | 1 | 2021-12-11T19:53:41.000Z | 2021-12-11T19:53:41.000Z | CeV - Gustavo Guanabara/exerc022.py | us19861229c/Meu-aprendizado-Python | 575c0714ac5377ff3122f4cb57952969e07ba89b | [
"Unlicense"
] | null | null | null | CeV - Gustavo Guanabara/exerc022.py | us19861229c/Meu-aprendizado-Python | 575c0714ac5377ff3122f4cb57952969e07ba89b | [
"Unlicense"
] | null | null | null | #022: Crie um programa que leia o nome completo de uma pessoa e mostre:
# - O nome com todas as letras maisculas e minsculas.
# - Quantas letras ao tdo (sem considerar espaos).
# - Quantas letras tem o primeiro nome.
nome = input("Qual o seu nome? ")
print(">>",nome.upper())
print(">>",nome.lower())
jnome = nome.stri... | 28.2 | 71 | 0.664303 |
253e8b5989062bd43d076499f35aace1547716ff | 2,395 | py | Python | src/pysqldump/domain/manager.py | tongyeouki/sql-converter | 28039fe16b43f443925447d06d682f6aa8c3a909 | [
"MIT"
] | 1 | 2020-06-12T03:32:35.000Z | 2020-06-12T03:32:35.000Z | src/pysqldump/domain/manager.py | tongyeouki/sql-converter | 28039fe16b43f443925447d06d682f6aa8c3a909 | [
"MIT"
] | null | null | null | src/pysqldump/domain/manager.py | tongyeouki/sql-converter | 28039fe16b43f443925447d06d682f6aa8c3a909 | [
"MIT"
] | 1 | 2020-06-12T03:32:15.000Z | 2020-06-12T03:32:15.000Z | from typing import Optional
from pysqldump.domain.formatters import (
CSVFormatter,
DictFormatter,
JsonFormatter,
ConsoleFormatter,
)
from pysqldump.settings.base import get_config
config = get_config()
def __to_console(self, pprint: bool = False):
if pprint:
return ConsoleF... | 29.567901 | 84 | 0.617954 |
25405166ea1f14ffbb145a0fad72cb35236d7ab6 | 605 | py | Python | Mortgage Calculator.py | BokijonovM/Projects | 7c032f872aaa4bdf0fba100385019c6058c3c8fb | [
"BSD-2-Clause"
] | 1 | 2021-03-18T08:12:15.000Z | 2021-03-18T08:12:15.000Z | Mortgage Calculator.py | BokijonovM/Python_Projects | 7c032f872aaa4bdf0fba100385019c6058c3c8fb | [
"BSD-2-Clause"
] | null | null | null | Mortgage Calculator.py | BokijonovM/Python_Projects | 7c032f872aaa4bdf0fba100385019c6058c3c8fb | [
"BSD-2-Clause"
] | null | null | null | """**Mortgage Calculator** -
Calculate the monthly payments of a fixed term mortgage
over given Nth terms at a given interest rate. Also figure
out how long it will take the user to pay back the loan."""
months = int(input("Enter mortgage term (in months): "))
rate = float(input("Enter interest rate (in %): ... | 37.8125 | 127 | 0.661157 |
2540e4b774668ff785e806c6ddc07e0e515e0f5f | 172 | py | Python | math_lib.py | cu-swe4s-fall-2020/version-control-rezgarshakeri | 859f863a71dbab5714a1f24e54933a0b4398790b | [
"MIT"
] | null | null | null | math_lib.py | cu-swe4s-fall-2020/version-control-rezgarshakeri | 859f863a71dbab5714a1f24e54933a0b4398790b | [
"MIT"
] | null | null | null | math_lib.py | cu-swe4s-fall-2020/version-control-rezgarshakeri | 859f863a71dbab5714a1f24e54933a0b4398790b | [
"MIT"
] | null | null | null | import numpy as np | 15.636364 | 39 | 0.511628 |
25428819afdb8bcef5f733f483e2dfff517079e7 | 956 | py | Python | configs.py | rudyn2/visual-odometry | 1ee37ac6669e1429461f23ccc02d5ae9a349409c | [
"MIT"
] | null | null | null | configs.py | rudyn2/visual-odometry | 1ee37ac6669e1429461f23ccc02d5ae9a349409c | [
"MIT"
] | null | null | null | configs.py | rudyn2/visual-odometry | 1ee37ac6669e1429461f23ccc02d5ae9a349409c | [
"MIT"
] | null | null | null | import cv2
| 21.727273 | 47 | 0.65272 |
25446e5536422db53c3887d8fec73e5ede336aa7 | 5,460 | py | Python | test/test_tensor_reorganization.py | entn-at/BrnoLM | 9f8c62523382098809c1c0967f62a67d151eafe0 | [
"MIT"
] | 17 | 2020-02-04T16:42:40.000Z | 2021-11-11T14:37:32.000Z | test/test_tensor_reorganization.py | entn-at/BrnoLM | 9f8c62523382098809c1c0967f62a67d151eafe0 | [
"MIT"
] | null | null | null | test/test_tensor_reorganization.py | entn-at/BrnoLM | 9f8c62523382098809c1c0967f62a67d151eafe0 | [
"MIT"
] | 4 | 2020-02-04T12:59:04.000Z | 2021-05-30T14:10:54.000Z | from brnolm.runtime.tensor_reorganization import TensorReorganizer
import torch
from torch.autograd import Variable
from .common import TestCase
| 30.502793 | 86 | 0.540842 |
254476669d60a9c34049aba84879aa1422202a6a | 25 | py | Python | latex.py | akdir/BachelorThesis | 07b5fe8b92c0b0eb21c1031e6415ac268ba27e7c | [
"MIT"
] | null | null | null | latex.py | akdir/BachelorThesis | 07b5fe8b92c0b0eb21c1031e6415ac268ba27e7c | [
"MIT"
] | null | null | null | latex.py | akdir/BachelorThesis | 07b5fe8b92c0b0eb21c1031e6415ac268ba27e7c | [
"MIT"
] | null | null | null | jobname="BachelorThesis"
| 12.5 | 24 | 0.84 |
25456b38415fb42cb49ec1c612d93c5272eac7b9 | 331 | py | Python | quantdsl/infrastructure/event_sourced_repos/contract_specification_repo.py | johnbywater/quantdsl | 81c1c69f27e094a6ed0542b28cf1ac8fcce5494a | [
"BSD-3-Clause"
] | 269 | 2015-01-09T00:56:41.000Z | 2022-03-30T17:09:46.000Z | quantdsl/infrastructure/event_sourced_repos/contract_specification_repo.py | johnbywater/quantdsl | 81c1c69f27e094a6ed0542b28cf1ac8fcce5494a | [
"BSD-3-Clause"
] | 22 | 2017-04-01T13:44:56.000Z | 2018-09-10T11:48:56.000Z | quantdsl/infrastructure/event_sourced_repos/contract_specification_repo.py | johnbywater/quantdsl | 81c1c69f27e094a6ed0542b28cf1ac8fcce5494a | [
"BSD-3-Clause"
] | 59 | 2015-01-09T00:56:50.000Z | 2022-03-13T23:52:27.000Z | from eventsourcing.infrastructure.event_sourced_repo import EventSourcedRepository
from quantdsl.domain.model.contract_specification import ContractSpecification, ContractSpecificationRepository
| 33.1 | 111 | 0.89426 |
2545a6ce4bad291b2182fea9564fd36668358b01 | 660 | py | Python | scrapingData/scraping.py | karumo10/coursesel-helper | deb7e52a7bfe1fc41cd630d5a2cbe96fa089d986 | [
"MIT"
] | null | null | null | scrapingData/scraping.py | karumo10/coursesel-helper | deb7e52a7bfe1fc41cd630d5a2cbe96fa089d986 | [
"MIT"
] | null | null | null | scrapingData/scraping.py | karumo10/coursesel-helper | deb7e52a7bfe1fc41cd630d5a2cbe96fa089d986 | [
"MIT"
] | null | null | null | from requests_html import HTMLSession
import os
import sys
writeFileName = "courseLinks.out"
writeFileStream = open(writeFileName,'w',encoding='utf-8')
session = HTMLSession()
url = 'https://www.ji.sjtu.edu.cn/academics/courses/courses-by-number/'
r = session.get(url)
for i in range(2,100):
sel = '... | 24.444444 | 72 | 0.636364 |
254a5b1fda824a925564dbbe740873888025ca2b | 7,655 | py | Python | jukebot/cogs/gametime.py | Kommotion/Jukebot | 4e50342b914ff6b91fd78802900d1e24bee946db | [
"MIT"
] | 1 | 2021-07-26T02:44:00.000Z | 2021-07-26T02:44:00.000Z | jukebot/cogs/gametime.py | Kommotion/Jukebot | 4e50342b914ff6b91fd78802900d1e24bee946db | [
"MIT"
] | null | null | null | jukebot/cogs/gametime.py | Kommotion/Jukebot | 4e50342b914ff6b91fd78802900d1e24bee946db | [
"MIT"
] | null | null | null | import logging
import discord
from datetime import datetime
from discord.ext import tasks, commands
from discord.ext.commands import Cog
from cogs.utils.utils import json_io_dump, json_io_load
log = logging.getLogger(__name__)
STATUS = 'status'
TIME_STARTED = 'time_started'
NAME = 'name'
GAMES = 'games'
NONE = 'none'... | 40.502646 | 142 | 0.617897 |
254ca1af527eda83d904a3bb25f7ec725799bb3b | 2,578 | py | Python | transformy/conversion/_pyqtgraph.py | AllenInstitute/transformy | 17c769857d0cb05ad252ab684dec9eadb61a7c59 | [
"BSD-3-Clause"
] | 1 | 2021-06-22T18:06:06.000Z | 2021-06-22T18:06:06.000Z | transformy/conversion/_pyqtgraph.py | AllenInstitute/transformy | 17c769857d0cb05ad252ab684dec9eadb61a7c59 | [
"BSD-3-Clause"
] | null | null | null | transformy/conversion/_pyqtgraph.py | AllenInstitute/transformy | 17c769857d0cb05ad252ab684dec9eadb61a7c59 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from .converter import TransformConverter
from .. import linear
| 34.837838 | 114 | 0.564779 |
254d3022845aae3d1a9293a0181f060be7c09b6f | 28 | py | Python | pyqt/utils/__init__.py | TaoYang526/qt | 81ed776c67f2df0d07d8b7e964e6a25b9271b28b | [
"Apache-2.0"
] | null | null | null | pyqt/utils/__init__.py | TaoYang526/qt | 81ed776c67f2df0d07d8b7e964e6a25b9271b28b | [
"Apache-2.0"
] | null | null | null | pyqt/utils/__init__.py | TaoYang526/qt | 81ed776c67f2df0d07d8b7e964e6a25b9271b28b | [
"Apache-2.0"
] | null | null | null | from pyqt.utils import time
| 14 | 27 | 0.821429 |
254f90068c187cfc444d126472019f1e35637c92 | 1,373 | py | Python | jack/io/read_semeval2017Task10.py | elyase/jack | a4f43a4012a540d55d2e05d8a904e6f8cc3002f1 | [
"MIT"
] | 192 | 2017-10-19T18:04:56.000Z | 2019-09-21T23:29:03.000Z | jack/io/read_semeval2017Task10.py | elyase/jack | a4f43a4012a540d55d2e05d8a904e6f8cc3002f1 | [
"MIT"
] | 120 | 2017-10-16T09:46:07.000Z | 2019-06-20T18:34:24.000Z | jack/io/read_semeval2017Task10.py | elyase/jack | a4f43a4012a540d55d2e05d8a904e6f8cc3002f1 | [
"MIT"
] | 50 | 2017-10-19T09:57:45.000Z | 2019-07-24T13:46:26.000Z | import os
def readAnn(textfolder="../data/SemEval2017Task10/"):
'''
Read .ann files and look up corresponding spans in .txt files
Args:
textfolder:
'''
flist = os.listdir(textfolder)
for f in flist:
if not f.endswith(".ann"):
continue
f_anno = open(os... | 32.690476 | 143 | 0.554261 |
25507a35dbe62df6d608b962eb29203e902472af | 5,018 | py | Python | src/means/io/sbml.py | nicktimko/means | fe164916a1d84ab2a4fa039871d38ccdf638b1db | [
"MIT"
] | 10 | 2016-05-25T08:28:39.000Z | 2020-06-04T03:19:50.000Z | src/means/io/sbml.py | nicktimko/means | fe164916a1d84ab2a4fa039871d38ccdf638b1db | [
"MIT"
] | 5 | 2015-12-08T14:01:15.000Z | 2020-01-10T22:42:18.000Z | src/means/io/sbml.py | nicktimko/means | fe164916a1d84ab2a4fa039871d38ccdf638b1db | [
"MIT"
] | 6 | 2015-12-10T17:24:11.000Z | 2021-03-22T16:12:17.000Z | from collections import namedtuple
import os
import sympy
import numpy as np
from means.core.model import Model
_Reaction = namedtuple('_REACTION', ['id', 'reactants', 'products', 'propensity', 'parameters'])
def read_sbml(filename):
"""
Read the model from a SBML file.
:param filename: SBML filename to... | 40.144 | 115 | 0.682742 |
2551cc7f888a7265ce1f8beeca110b9348759577 | 1,123 | py | Python | clrenv/tests/test_path.py | color/clrenv | e11b67fcce129a4c828b6d7b421d9f2eac58785b | [
"MIT"
] | 2 | 2019-12-04T05:38:17.000Z | 2022-02-17T06:24:23.000Z | clrenv/tests/test_path.py | color/clrenv | e11b67fcce129a4c828b6d7b421d9f2eac58785b | [
"MIT"
] | 9 | 2019-11-11T20:01:11.000Z | 2021-09-30T00:41:52.000Z | clrenv/tests/test_path.py | color/clrenv | e11b67fcce129a4c828b6d7b421d9f2eac58785b | [
"MIT"
] | 4 | 2017-08-24T00:00:34.000Z | 2021-06-25T16:41:20.000Z | import pytest
import clrenv
| 27.390244 | 81 | 0.715049 |
25536ba36fdcd55ea907e174eeadb755910513a2 | 2,583 | py | Python | utils/convert_codah.py | Longday0923/CODAH_Baseline | e9e331452a12c85e35969833cbfc824d6c0256c1 | [
"MIT"
] | null | null | null | utils/convert_codah.py | Longday0923/CODAH_Baseline | e9e331452a12c85e35969833cbfc824d6c0256c1 | [
"MIT"
] | null | null | null | utils/convert_codah.py | Longday0923/CODAH_Baseline | e9e331452a12c85e35969833cbfc824d6c0256c1 | [
"MIT"
] | null | null | null | import random
import pandas as pd
import numpy as np
import json
from tqdm import *
# Convert the QA file json to output dictionary containing premise and hypothesis
# Create the output json dictionary from the input json, premise and hypothesis statement
if __name__ == "__main__":
convert_to_codah_statemen... | 37.434783 | 99 | 0.684863 |
25541a58e6ade5999bf8649b87e0a951c63912f5 | 3,237 | py | Python | new_imgt_scraping/new_imgt/new_imgt/spiders/new_imgt_spider.py | yaosichao0915/DeepImmuno | a2a7832f6cded9296735475c2e8fa5c9b62b3f8d | [
"MIT"
] | 20 | 2020-12-28T03:34:34.000Z | 2022-03-14T01:36:52.000Z | new_imgt_scraping/new_imgt/new_imgt/spiders/new_imgt_spider.py | zhangjiahuan17/DeepImmuno | 5ab182429bc3276fd43be2ec8d86b72e773992ef | [
"MIT"
] | 3 | 2021-04-23T19:21:11.000Z | 2021-08-22T00:39:01.000Z | new_imgt_scraping/new_imgt/new_imgt/spiders/new_imgt_spider.py | zhangjiahuan17/DeepImmuno | 5ab182429bc3276fd43be2ec8d86b72e773992ef | [
"MIT"
] | 11 | 2021-04-23T16:46:29.000Z | 2022-03-18T15:53:55.000Z | '''
pip install Scrapy
pip install selenium
In a folder:
scrapy startproject imgt
when running:
scrapy crawl new_imgt -o out.json
when using scrapy shell:
scrapy shell 'url'
in Ipython, you can use response.xpath or response.css to try out
object:
1. selectorlist if css('a') and there are ... | 33.030612 | 139 | 0.666976 |
25582433fc1391299fee92277e679b595fa40a57 | 1,667 | py | Python | ooobuild/lo/script/provider/script_framework_error_type.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/script/provider/script_framework_error_type.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/script/provider/script_framework_error_type.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http: // www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 30.87037 | 165 | 0.721656 |
25582a95ad549fbb53f7bc9394341328228fcce8 | 38,786 | py | Python | Base/opcode_tab.py | robertmuth/Cwerg | fdf30b06c93b4620c0a45b448b6d92acb81c35f0 | [
"Apache-2.0"
] | 171 | 2020-01-30T16:58:07.000Z | 2022-03-27T22:12:17.000Z | Base/opcode_tab.py | robertmuth/Cwerg | fdf30b06c93b4620c0a45b448b6d92acb81c35f0 | [
"Apache-2.0"
] | 14 | 2021-05-15T02:12:09.000Z | 2022-03-16T04:16:18.000Z | Base/opcode_tab.py | robertmuth/Cwerg | fdf30b06c93b4620c0a45b448b6d92acb81c35f0 | [
"Apache-2.0"
] | 5 | 2021-03-01T20:52:13.000Z | 2022-03-07T06:35:03.000Z | #!/usr/bin/python3
# (c) Robert Muth - see LICENSE for more info
from typing import List, Dict
import enum
from Util import cgen
# maximum number of operands in an instruction
MAX_OPERANDS = 5
# maximum number of function parameters (or results)
MAX_PARAMETERS = 64
#################################################... | 36.113594 | 108 | 0.571443 |
255944c391999d6773e34c522056f9b52e9a85c5 | 784 | py | Python | hexa/plugins/connector_airflow/migrations/0013_dag_run_states.py | qgerome/openhexa-app | 8c9377b2ad972121d8e9575f5d52420212b52ed4 | [
"MIT"
] | 4 | 2021-07-19T12:53:21.000Z | 2022-01-26T17:45:02.000Z | hexa/plugins/connector_airflow/migrations/0013_dag_run_states.py | qgerome/openhexa-app | 8c9377b2ad972121d8e9575f5d52420212b52ed4 | [
"MIT"
] | 20 | 2021-05-17T12:27:06.000Z | 2022-03-30T11:35:26.000Z | hexa/plugins/connector_airflow/migrations/0013_dag_run_states.py | qgerome/openhexa-app | 8c9377b2ad972121d8e9575f5d52420212b52ed4 | [
"MIT"
] | 2 | 2021-09-07T04:19:59.000Z | 2022-02-08T15:33:29.000Z | # Generated by Django 3.2.7 on 2021-10-27 09:40
from django.db import migrations, models
| 25.290323 | 65 | 0.477041 |
2559a4a18ffbdf9ee00369efeb0eacf72905221a | 3,447 | py | Python | LAMARCK_ML/data_util/TypeShape_pb2.py | JonasDHomburg/LAMARCK | 0e372c908ff59effc6fd68e6477d04c4d89e6c26 | [
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2019-09-20T08:03:47.000Z | 2021-05-10T11:02:09.000Z | LAMARCK_ML/data_util/TypeShape_pb2.py | JonasDHomburg/LAMARCK_ML | 0e372c908ff59effc6fd68e6477d04c4d89e6c26 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | LAMARCK_ML/data_util/TypeShape_pb2.py | JonasDHomburg/LAMARCK_ML | 0e372c908ff59effc6fd68e6477d04c4d89e6c26 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: LAMARCK_ML/data_util/TypeShape.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf impo... | 38.730337 | 354 | 0.78387 |
255a4a642a2b2e33a26ec84bb18d2413e8e4b098 | 31,149 | py | Python | main/staff.py | YukiGao7718/Airline-Reservation-System | ecc75316ccbc6aa2db4d0378b938c0275fddb6d3 | [
"MIT"
] | null | null | null | main/staff.py | YukiGao7718/Airline-Reservation-System | ecc75316ccbc6aa2db4d0378b938c0275fddb6d3 | [
"MIT"
] | null | null | null | main/staff.py | YukiGao7718/Airline-Reservation-System | ecc75316ccbc6aa2db4d0378b938c0275fddb6d3 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, session, redirect, url_for
import pymysql.cursors
import datetime
from pyecharts import options as opts
from pyecharts.charts import Pie,Bar
from appdef import *
#Get the airline the staff member works for
#Make sure that the user is actually staff before performing... | 40.400778 | 129 | 0.596969 |
255a812a0890850fc537c0377c504771edd7d281 | 261 | py | Python | app/main.py | athul/jimbru | bc22449dbfbea19d9605e6271a154dbc7037bafb | [
"MIT"
] | 42 | 2020-11-12T11:34:29.000Z | 2022-01-17T11:40:29.000Z | app/main.py | athul/jimbru | bc22449dbfbea19d9605e6271a154dbc7037bafb | [
"MIT"
] | 1 | 2021-06-09T11:41:49.000Z | 2021-06-09T11:41:49.000Z | app/main.py | athul/jimbru | bc22449dbfbea19d9605e6271a154dbc7037bafb | [
"MIT"
] | 2 | 2021-03-17T18:16:15.000Z | 2021-06-08T17:29:38.000Z | from fastapi import FastAPI
try:
from routes import analytics,templates,auth
except:
from .routes import analytics,templates,auth
app = FastAPI()
app.include_router(analytics.router)
app.include_router(templates.router)
app.include_router(auth.authr) | 21.75 | 48 | 0.800766 |
255c0c175a4464c1c647d5f7bc88a0e78a8ca610 | 873 | py | Python | tests/test_query_releases.py | hysds/hysds-framework | 701fdf39f1fdb71bcb5c2f6fb6a81da2778fccc0 | [
"Apache-2.0"
] | 1 | 2020-02-09T14:15:11.000Z | 2020-02-09T14:15:11.000Z | tests/test_query_releases.py | hysds/hysds-framework | 701fdf39f1fdb71bcb5c2f6fb6a81da2778fccc0 | [
"Apache-2.0"
] | 12 | 2018-04-16T09:09:40.000Z | 2020-04-15T07:09:15.000Z | tests/test_query_releases.py | hysds/hysds-framework | 701fdf39f1fdb71bcb5c2f6fb6a81da2778fccc0 | [
"Apache-2.0"
] | 7 | 2018-04-07T01:43:48.000Z | 2020-07-23T08:12:37.000Z | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import str
from future import standard_library
standard_library.install_aliases()
import query_releases
import unittest
if __name__ == "__main__":
u... | 27.28125 | 86 | 0.719359 |
255d364d93e590ec6297742e59e58cf8fe8ad6e3 | 1,211 | py | Python | products/Introduction_to_Computational_Science_Modules/02_System_Dynamics/iPythonSysDyn/simplePendulum.py | wmmurrah/computationalScience | a4d7df6b50f2ead22878ff68bfe39c5adb88bbbb | [
"W3C"
] | null | null | null | products/Introduction_to_Computational_Science_Modules/02_System_Dynamics/iPythonSysDyn/simplePendulum.py | wmmurrah/computationalScience | a4d7df6b50f2ead22878ff68bfe39c5adb88bbbb | [
"W3C"
] | null | null | null | products/Introduction_to_Computational_Science_Modules/02_System_Dynamics/iPythonSysDyn/simplePendulum.py | wmmurrah/computationalScience | a4d7df6b50f2ead22878ff68bfe39c5adb88bbbb | [
"W3C"
] | null | null | null | # simplePendulum.py
# Model of a simple pendulum
import math
def simplePendulum(length = 1, angle = math.pi/4, angular_velocity = 0, DT = 0.0001, simLength = 12):
numIterations = int(simLength/DT) + 1
g = 9.81
angle_change = angular_velocity
angular_acceleration = -g... | 1,211 | 1,211 | 0.560694 |