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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b1083a2affb9a63631077241caffe2b17bde2cca | 5,172 | py | Python | visualise.py | ksang/fiery | b41e0138e388d9b846f174c09d60539b5b226f2d | [
"MIT"
] | null | null | null | visualise.py | ksang/fiery | b41e0138e388d9b846f174c09d60539b5b226f2d | [
"MIT"
] | null | null | null | visualise.py | ksang/fiery | b41e0138e388d9b846f174c09d60539b5b226f2d | [
"MIT"
] | null | null | null | import os
from argparse import ArgumentParser
from glob import glob
import cv2
import numpy as np
import torch
import torchvision
import matplotlib as mpl
import matplotlib.pyplot as plt
from PIL import Image
from fiery.trainer import TrainingModule
from fiery.utils.network import NormalizeInverse
from fiery.utils.in... | 38.029412 | 118 | 0.672467 |
b10a7ba9df13f93730fafc42256936a0555a720d | 7,034 | py | Python | autoelective/util.py | apomeloYM/PKUAutoElective | 21b4ab000919f68080e7a942ddff4ca070cf41e7 | [
"MIT"
] | null | null | null | autoelective/util.py | apomeloYM/PKUAutoElective | 21b4ab000919f68080e7a942ddff4ca070cf41e7 | [
"MIT"
] | null | null | null | autoelective/util.py | apomeloYM/PKUAutoElective | 21b4ab000919f68080e7a942ddff4ca070cf41e7 | [
"MIT"
] | 2 | 2020-02-07T04:02:14.000Z | 2020-02-16T23:34:16.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# filename: util.py
import os
import csv
from copy import deepcopy
import hashlib
from functools import wraps
from collections import OrderedDict
from ._compat import json, JSONDecodeError
from .exceptions import NoInstanceError, ImmutableTypeError, ReadonlyPropertyError
... | 27.802372 | 111 | 0.633068 |
b10b445b6f929ecc345e5226229e53a873023020 | 1,827 | py | Python | reference_data/uk_biobank_v3/1_extract_ukb_variables.py | thehyve/genetics-backend | 81d09bf5c70c534a59940eddfcd9c8566d2b2ec1 | [
"Apache-2.0"
] | 6 | 2019-06-01T11:17:41.000Z | 2021-09-24T14:06:30.000Z | reference_data/uk_biobank_v3/1_extract_ukb_variables.py | opentargets/genetics-backend | 1ab0314f9fe4b267f8ffb5ed94187d55fbb3431c | [
"Apache-2.0"
] | 7 | 2018-11-28T10:06:21.000Z | 2020-01-26T18:55:39.000Z | reference_data/uk_biobank_v3/1_extract_ukb_variables.py | thehyve/genetics-backend | 81d09bf5c70c534a59940eddfcd9c8566d2b2ec1 | [
"Apache-2.0"
] | 4 | 2019-05-09T13:57:57.000Z | 2021-08-03T18:19:16.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Ed Mountjoy
#
"""
bsub -q small -J interactive -n 1 -R "select[mem>8000] rusage[mem=8000] span[hosts=1]" -M8000 -Is bash
"""
import gzip
import sys
if __name__ == '__main__':
main()
| 31.5 | 102 | 0.604269 |
b10d15ba52e0f2579184cc4a6747cccecf9ad61c | 6,088 | py | Python | main.py | Staubtornado/juliandc | 47e41f9e10088f94af44dcfab00073b788121777 | [
"MIT"
] | null | null | null | main.py | Staubtornado/juliandc | 47e41f9e10088f94af44dcfab00073b788121777 | [
"MIT"
] | null | null | null | main.py | Staubtornado/juliandc | 47e41f9e10088f94af44dcfab00073b788121777 | [
"MIT"
] | null | null | null | import asyncio
import discord
from discord.ext import commands, tasks
import os
import random
import dotenv
import difflib
import configparser
###
version = '4.0.0'
###
bot = commands.Bot(command_prefix = '!', owner_id = 272446903940153345, intents = discord.Intents.all())
bot.remove_command('help')
co... | 41.135135 | 360 | 0.587714 |
b10e5e4bf82f717f9759daccbbc32309f685a6ee | 565 | py | Python | lib/utils.py | MusaTamzid05/simple_similar_image_lib | 3882cc3d6c3d8d61f67c71fcbe5a3cbad4e10697 | [
"MIT"
] | null | null | null | lib/utils.py | MusaTamzid05/simple_similar_image_lib | 3882cc3d6c3d8d61f67c71fcbe5a3cbad4e10697 | [
"MIT"
] | null | null | null | lib/utils.py | MusaTamzid05/simple_similar_image_lib | 3882cc3d6c3d8d61f67c71fcbe5a3cbad4e10697 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
| 28.25 | 81 | 0.612389 |
b10e8fe5318c13af9359ac8f09fb570418b7c0b2 | 2,226 | py | Python | dataloaders/voc.py | psui3905/CCT | 637cbac130b39f02733339c79cdf1d531e339e9c | [
"MIT"
] | 308 | 2020-06-09T13:37:17.000Z | 2022-03-24T07:43:33.000Z | dataloaders/voc.py | lesvay/CCT | cf98ea7e6aefa7091e6c375a9025ba1e0f6e53ca | [
"MIT"
] | 55 | 2020-06-16T11:57:54.000Z | 2022-03-09T12:04:58.000Z | dataloaders/voc.py | lesvay/CCT | cf98ea7e6aefa7091e6c375a9025ba1e0f6e53ca | [
"MIT"
] | 51 | 2020-06-08T02:42:14.000Z | 2022-02-25T16:38:36.000Z | from base import BaseDataSet, BaseDataLoader
from utils import pallete
import numpy as np
import os
import scipy
import torch
from PIL import Image
import cv2
from torch.utils.data import Dataset
from torchvision import transforms
import json
| 36.491803 | 114 | 0.637017 |
b10ed1a87457d0709ae65d88b218cf1992004525 | 16,418 | py | Python | FWCore/Integration/test/ThinningTest1_cfg.py | gputtley/cmssw | c1ef8454804e4ebea8b65f59c4a952a6c94fde3b | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | FWCore/Integration/test/ThinningTest1_cfg.py | gputtley/cmssw | c1ef8454804e4ebea8b65f59c4a952a6c94fde3b | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | FWCore/Integration/test/ThinningTest1_cfg.py | gputtley/cmssw | c1ef8454804e4ebea8b65f59c4a952a6c94fde3b | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | # This process is the first step of a test that involves multiple
# processing steps. It tests the thinning collections and
# redirecting Refs, Ptrs, and RefToBases.
#
# Produce 15 thinned collections
#
# Collection A contains Things 0-8
# Collection B contains Things 0-3 and made from collection A
# Collection C... | 40.339066 | 79 | 0.652394 |
b10ef155b141d1ff49de7abd5e3a562536e9e728 | 771 | py | Python | tests/Bio/test_tandem.py | iwasakishuto/Keras-Imitation | 8ac0cd7c8912d49d13b19a0182ad534c0781fbfe | [
"MIT"
] | 4 | 2020-04-25T08:50:36.000Z | 2020-04-26T04:49:16.000Z | tests/Bio/test_tandem.py | iwasakishuto/Keras-Imitation | 8ac0cd7c8912d49d13b19a0182ad534c0781fbfe | [
"MIT"
] | null | null | null | tests/Bio/test_tandem.py | iwasakishuto/Keras-Imitation | 8ac0cd7c8912d49d13b19a0182ad534c0781fbfe | [
"MIT"
] | null | null | null | # coding: utf-8
from kerasy.Bio.tandem import find_tandem
from kerasy.utils import generateSeq
len_sequences = 1000
| 29.653846 | 91 | 0.660182 |
b10f2700bf5dd4688d783eebd9aacb68abc85ac5 | 679 | py | Python | NEW_PRAC/HackerRank/Python/SetDifferenceString.py | side-projects-42/INTERVIEW-PREP-COMPLETE | 627a3315cee4bbc38a0e81c256f27f928eac2d63 | [
"MIT"
] | 13 | 2021-03-11T00:25:22.000Z | 2022-03-19T00:19:23.000Z | NEW_PRAC/HackerRank/Python/SetDifferenceString.py | side-projects-42/INTERVIEW-PREP-COMPLETE | 627a3315cee4bbc38a0e81c256f27f928eac2d63 | [
"MIT"
] | 160 | 2021-04-26T19:04:15.000Z | 2022-03-26T20:18:37.000Z | NEW_PRAC/HackerRank/Python/SetDifferenceString.py | side-projects-42/INTERVIEW-PREP-COMPLETE | 627a3315cee4bbc38a0e81c256f27f928eac2d63 | [
"MIT"
] | 12 | 2021-04-26T19:43:01.000Z | 2022-01-31T08:36:29.000Z | # >>> s = set("Hacker")
# >>> print s.difference("Rank")
# set(['c', 'r', 'e', 'H'])
# >>> print s.difference(set(['R', 'a', 'n', 'k']))
# set(['c', 'r', 'e', 'H'])
# >>> print s.difference(['R', 'a', 'n', 'k'])
# set(['c', 'r', 'e', 'H'])
# >>> print s.difference(enumerate(['R', 'a', 'n', 'k']))
# set(['a', 'c', 'r... | 24.25 | 57 | 0.443299 |
b10ff91b57739eb21f6eb6d10c2777a5221bc00d | 4,898 | py | Python | src/dotacrunch/drawer.py | tpinetz/dotacrunch | 9f53404ac3556e14bdc3e159f36d34e39c747898 | [
"MIT"
] | 1 | 2019-09-20T04:03:13.000Z | 2019-09-20T04:03:13.000Z | src/dotacrunch/drawer.py | tpinetz/dotacrunch | 9f53404ac3556e14bdc3e159f36d34e39c747898 | [
"MIT"
] | null | null | null | src/dotacrunch/drawer.py | tpinetz/dotacrunch | 9f53404ac3556e14bdc3e159f36d34e39c747898 | [
"MIT"
] | null | null | null | from PIL import Image, ImageDraw
from numpy import array, random, vstack, ones, linalg
from const import TOWERS
from copy import deepcopy
from os import path
| 42.964912 | 136 | 0.600857 |
b112b2802063ecfa7ce3db6c16ab4326c7eda2fb | 1,746 | py | Python | nsm.py | svepe/neural-stack | c48e6b94f00e77cedd9d692bdc2a6715bb007db5 | [
"MIT"
] | null | null | null | nsm.py | svepe/neural-stack | c48e6b94f00e77cedd9d692bdc2a6715bb007db5 | [
"MIT"
] | 1 | 2017-07-26T07:18:42.000Z | 2017-07-26T07:18:42.000Z | nsm.py | svepe/neural-stack | c48e6b94f00e77cedd9d692bdc2a6715bb007db5 | [
"MIT"
] | null | null | null | import numpy as np
import chainer.functions as F
from chainer import Variable
batch_size = 3
stack_element_size = 2
V = Variable(np.zeros((batch_size, 1, stack_element_size)))
s = Variable(np.zeros((batch_size, 1)))
d = Variable(np.ones((batch_size, 1)) * 0.4)
u = Variable(np.ones((batch_size, 1)) * 0.)
v = Variabl... | 29.59322 | 80 | 0.613402 |
b11347dca32d00ada08a415a09ab2e6c4431c76c | 2,354 | py | Python | chaos_genius/celery_config.py | eltociear/chaos_genius | eb3bc27181c8af4144b95e685386814109173164 | [
"MIT"
] | 1 | 2022-02-25T16:11:34.000Z | 2022-02-25T16:11:34.000Z | chaos_genius/celery_config.py | eltociear/chaos_genius | eb3bc27181c8af4144b95e685386814109173164 | [
"MIT"
] | null | null | null | chaos_genius/celery_config.py | eltociear/chaos_genius | eb3bc27181c8af4144b95e685386814109173164 | [
"MIT"
] | null | null | null | from datetime import timedelta
from celery.schedules import crontab, schedule
CELERY_IMPORTS = ("chaos_genius.jobs")
CELERY_TASK_RESULT_EXPIRES = 30
CELERY_TIMEZONE = "UTC"
CELERY_ACCEPT_CONTENT = ["json", "msgpack", "yaml"]
CELERY_TASK_SERIALIZER = "json"
CELERY_RESULT_SERIALIZER = "json"
CELERYBEAT_SCHEDULE = {
... | 32.694444 | 77 | 0.619371 |
b114d5a538b75c9a4b75747db2d55272076b7fcc | 232 | py | Python | oldcontrib/media/image/servee_registry.py | servee/django-servee-oldcontrib | 836447ebbd53db0b53879a35468c02e57f65105f | [
"BSD-Source-Code"
] | null | null | null | oldcontrib/media/image/servee_registry.py | servee/django-servee-oldcontrib | 836447ebbd53db0b53879a35468c02e57f65105f | [
"BSD-Source-Code"
] | null | null | null | oldcontrib/media/image/servee_registry.py | servee/django-servee-oldcontrib | 836447ebbd53db0b53879a35468c02e57f65105f | [
"BSD-Source-Code"
] | null | null | null | from servee import frontendadmin
from servee.frontendadmin.insert import ModelInsert
from oldcontrib.media.image.models import Image
frontendadmin.site.register_insert(ImageInsert) | 29 | 51 | 0.844828 |
b114f3af35aa6791557a994b86492206a441c7e5 | 974 | py | Python | run.py | Lohitapallanti/Predicting-Titanic-Survive | 681e513ec0abfb66797c827139d4e6d99c6b22bf | [
"Apache-2.0"
] | null | null | null | run.py | Lohitapallanti/Predicting-Titanic-Survive | 681e513ec0abfb66797c827139d4e6d99c6b22bf | [
"Apache-2.0"
] | null | null | null | run.py | Lohitapallanti/Predicting-Titanic-Survive | 681e513ec0abfb66797c827139d4e6d99c6b22bf | [
"Apache-2.0"
] | null | null | null | from train import train
from processing import Processing
""" The Main run file, where the program execution and controller is based. """
object = Run()
object.final_function()
| 37.461538 | 131 | 0.661191 |
b1155590dddadba4928d8c63159a637854f7865e | 2,646 | py | Python | scripts/pretty-printers/gdb/install.py | tobireinhard/cbmc | fc165c119985adf8db9a13493f272a2def4e79fa | [
"BSD-4-Clause"
] | 412 | 2016-04-02T01:14:27.000Z | 2022-03-27T09:24:09.000Z | scripts/pretty-printers/gdb/install.py | tobireinhard/cbmc | fc165c119985adf8db9a13493f272a2def4e79fa | [
"BSD-4-Clause"
] | 4,671 | 2016-02-25T13:52:16.000Z | 2022-03-31T22:14:46.000Z | scripts/pretty-printers/gdb/install.py | tobireinhard/cbmc | fc165c119985adf8db9a13493f272a2def4e79fa | [
"BSD-4-Clause"
] | 266 | 2016-02-23T12:48:00.000Z | 2022-03-22T18:15:51.000Z | #!/usr/bin/env python3
import os
from shutil import copyfile
def create_gdbinit_file():
"""
Create and insert into a .gdbinit file the python code to set-up cbmc pretty-printers.
"""
print("Attempting to enable cbmc-specific pretty-printers.")
home_folder = os.path.expanduser("~")
if not ho... | 37.267606 | 129 | 0.588435 |
b1156db34bf35cdfc3d30e9b0d6bdddd6d15330a | 5,613 | py | Python | pyutils/solve.py | eltrompetero/maxent_fim | b5e8942a20aad67e4055c506248605df50ab082d | [
"MIT"
] | null | null | null | pyutils/solve.py | eltrompetero/maxent_fim | b5e8942a20aad67e4055c506248605df50ab082d | [
"MIT"
] | null | null | null | pyutils/solve.py | eltrompetero/maxent_fim | b5e8942a20aad67e4055c506248605df50ab082d | [
"MIT"
] | null | null | null | # ====================================================================================== #
# Module for solving maxent problem on C elegans data set.
#
# Author : Eddie Lee, edlee@santafe.edu
# ====================================================================================== #
from .utils import *
from scipy.opti... | 26.856459 | 94 | 0.492785 |
b1160a8726aaf21bb1cf8728387263736c4c3084 | 8,117 | py | Python | lingvo/tasks/car/ops/nms_3d_op_test.py | Singed-jj/lingvo | a2a4ac8bd835ffc2f95fc38ee3e9bc17c30fcc56 | [
"Apache-2.0"
] | null | null | null | lingvo/tasks/car/ops/nms_3d_op_test.py | Singed-jj/lingvo | a2a4ac8bd835ffc2f95fc38ee3e9bc17c30fcc56 | [
"Apache-2.0"
] | null | null | null | lingvo/tasks/car/ops/nms_3d_op_test.py | Singed-jj/lingvo | a2a4ac8bd835ffc2f95fc38ee3e9bc17c30fcc56 | [
"Apache-2.0"
] | null | null | null | # 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 ... | 39.402913 | 83 | 0.603795 |
b1175a77d1f41faf9425e6e42edc2d9127d3fe7c | 10,773 | py | Python | BDS_2nd_downsampling.py | oxon-612/BDSR | c468061ed9e139be96d9da91c1b5419b122eeb4f | [
"MIT"
] | 1 | 2021-03-03T13:13:33.000Z | 2021-03-03T13:13:33.000Z | BDS_2nd_downsampling.py | oxon-612/BDSR | c468061ed9e139be96d9da91c1b5419b122eeb4f | [
"MIT"
] | null | null | null | BDS_2nd_downsampling.py | oxon-612/BDSR | c468061ed9e139be96d9da91c1b5419b122eeb4f | [
"MIT"
] | null | null | null | #
import numpy as np
import random
# import sys
import os
from sklearn import preprocessing
# import matplotlib.pyplot as plt
# from mpl_toolkits.mplot3d import Axes3D
# import math
from scipy.stats import norm
# from sklearn.neighbors import KernelDensity
# import statistics
# from scipy.stats import ks_2s... | 43.615385 | 182 | 0.597698 |
b11770de6ba3e72b06e86a670a85a8fd098eb3aa | 3,630 | py | Python | model.py | e-yi/hin2vec_pytorch | 7c3b6c4160476568985622117cf2263e7b78760e | [
"MIT"
] | 18 | 2019-10-17T03:12:07.000Z | 2022-03-11T02:58:12.000Z | model.py | e-yi/hin2vec_pytorch | 7c3b6c4160476568985622117cf2263e7b78760e | [
"MIT"
] | 5 | 2019-12-12T03:15:21.000Z | 2021-04-02T07:54:38.000Z | model.py | e-yi/hin2vec_pytorch | 7c3b6c4160476568985622117cf2263e7b78760e | [
"MIT"
] | 4 | 2019-12-26T07:36:38.000Z | 2021-04-24T11:35:45.000Z | import torch
import numpy as np
import torch.nn as nn
from torch.utils.data import Dataset, DataLoader
if __name__ == '__main__':
## test binary_reg
print('sigmoid')
a = torch.tensor([-1.,0.,1.],requires_grad=True)
b = torch.sigmoid(a)
c = b.sum()
print(a)
print(b)
print(c)
c.bac... | 27.709924 | 110 | 0.571901 |
b117f2719a56a1e59d4109b5312d5d87fdc50a2d | 2,689 | py | Python | pygrep/classes/boyerMoore.py | sstadick/pygrep | 13c53ac427adda9974ee9e62c22391bf0682008c | [
"Apache-2.0"
] | null | null | null | pygrep/classes/boyerMoore.py | sstadick/pygrep | 13c53ac427adda9974ee9e62c22391bf0682008c | [
"Apache-2.0"
] | null | null | null | pygrep/classes/boyerMoore.py | sstadick/pygrep | 13c53ac427adda9974ee9e62c22391bf0682008c | [
"Apache-2.0"
] | null | null | null | import string
from helpers import *
if __name__ == '__main__':
pattern = 'thou'
text = 'cow th ou cat art hat thou mow the lawn'
bm = BoyerMoore(pattern)
# print([char for char in text])
# print([(i, char) for i, char in enumerate(text)])
print(bm.search(text)) | 36.337838 | 104 | 0.579026 |
b118f2f3e6c0e9617cb2cf673e9a7f3e68d6f9ce | 53 | py | Python | basicts/archs/DGCRN_arch/__init__.py | zezhishao/GuanCang_BasicTS | bbf82b9d08e82db78d4e9e9b11f43a676b54ad7c | [
"Apache-2.0"
] | 3 | 2022-02-22T12:50:08.000Z | 2022-03-13T03:38:46.000Z | basicts/archs/DGCRN_arch/__init__.py | zezhishao/GuanCang_BasicTS | bbf82b9d08e82db78d4e9e9b11f43a676b54ad7c | [
"Apache-2.0"
] | null | null | null | basicts/archs/DGCRN_arch/__init__.py | zezhishao/GuanCang_BasicTS | bbf82b9d08e82db78d4e9e9b11f43a676b54ad7c | [
"Apache-2.0"
] | null | null | null | from basicts.archs.DGCRN_arch.DGCRN_arch import DGCRN | 53 | 53 | 0.886792 |
b119bf6083a2cc2bfb9320284b71a47bcee04389 | 159 | py | Python | kido/settings/production.example.py | alanhamlett/kid-o | 18f88f7dc78c678e017fdc7e0dfb2711bcf2bf74 | [
"BSD-3-Clause"
] | 34 | 2015-08-22T06:57:26.000Z | 2021-11-08T10:47:23.000Z | kido/settings/production.example.py | alanhamlett/kid-o | 18f88f7dc78c678e017fdc7e0dfb2711bcf2bf74 | [
"BSD-3-Clause"
] | 15 | 2015-08-21T20:25:49.000Z | 2022-03-11T23:25:44.000Z | kido/settings/production.example.py | dominino/kid-o | 18f88f7dc78c678e017fdc7e0dfb2711bcf2bf74 | [
"BSD-3-Clause"
] | 5 | 2016-08-22T08:23:45.000Z | 2019-05-07T01:38:38.000Z | SECRET_KEY = None
DB_HOST = "localhost"
DB_NAME = "kido"
DB_USERNAME = "kido"
DB_PASSWORD = "kido"
COMPRESSOR_DEBUG = False
COMPRESSOR_OFFLINE_COMPRESS = True
| 19.875 | 34 | 0.773585 |
b11a302f53a38192c5dd68e4767ae96d3e146ef3 | 301 | py | Python | run.py | Prakash2403/ultron | 7d1067eb98ef52f6a88299534ea204e7ae45d7a7 | [
"MIT"
] | 13 | 2017-08-15T15:50:13.000Z | 2019-06-03T10:24:50.000Z | run.py | Prakash2403/ultron | 7d1067eb98ef52f6a88299534ea204e7ae45d7a7 | [
"MIT"
] | 3 | 2017-08-29T16:35:04.000Z | 2021-06-01T23:49:16.000Z | run.py | Prakash2403/ultron | 7d1067eb98ef52f6a88299534ea204e7ae45d7a7 | [
"MIT"
] | 4 | 2017-08-16T09:33:59.000Z | 2019-06-05T07:25:30.000Z | #! /usr/bin/python3
from default_settings import default_settings
from ultron_cli import UltronCLI
if __name__ == '__main__':
default_settings()
try:
UltronCLI().cmdloop()
except KeyboardInterrupt:
print("\nInterrupted by user.")
print("Goodbye")
exit(0)
| 23.153846 | 45 | 0.664452 |
b11a595d5c6b314526d2c13c66fd8ddfdd9ef9ec | 2,689 | py | Python | losses/dice_loss.py | CharlesAuthier/geo-deep-learning | e97ea1d362327cdcb2849cd2f810f1e914078243 | [
"MIT"
] | 121 | 2018-10-01T15:27:08.000Z | 2022-02-16T14:04:34.000Z | losses/dice_loss.py | CharlesAuthier/geo-deep-learning | e97ea1d362327cdcb2849cd2f810f1e914078243 | [
"MIT"
] | 196 | 2018-09-26T19:32:29.000Z | 2022-03-30T15:17:53.000Z | losses/dice_loss.py | CharlesAuthier/geo-deep-learning | e97ea1d362327cdcb2849cd2f810f1e914078243 | [
"MIT"
] | 36 | 2018-09-25T12:55:55.000Z | 2022-03-03T20:31:33.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
| 35.381579 | 119 | 0.579398 |
b11a616d1b56aaeabf4b500c344345675c245118 | 2,766 | py | Python | src/pytezos/jupyter.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 98 | 2019-02-07T16:33:38.000Z | 2022-03-31T15:53:41.000Z | src/pytezos/jupyter.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 152 | 2019-05-20T16:38:56.000Z | 2022-03-30T14:24:38.000Z | src/pytezos/jupyter.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 34 | 2019-07-25T12:03:51.000Z | 2021-11-11T22:23:38.000Z | import inspect
import re
from functools import update_wrapper
from typing import Optional
| 26.596154 | 85 | 0.544107 |
b11be2ae97985e6cfb1d4fb8b0941137d4427bee | 2,492 | py | Python | torch_template/training.py | dongqifong/inspiration | f3168217729063f79f18972a4abe9db821ad5b91 | [
"MIT"
] | null | null | null | torch_template/training.py | dongqifong/inspiration | f3168217729063f79f18972a4abe9db821ad5b91 | [
"MIT"
] | null | null | null | torch_template/training.py | dongqifong/inspiration | f3168217729063f79f18972a4abe9db821ad5b91 | [
"MIT"
] | null | null | null | import torch
| 32.789474 | 101 | 0.597111 |
b11c83cde4ab47f5fe3448e7a1b6b3e0baac54ab | 3,331 | py | Python | pytext/__init__.py | NunoEdgarGFlowHub/pytext | 2358b2d7c8c4e6800c73f4bd1c9731723e503ed6 | [
"BSD-3-Clause"
] | 1 | 2019-02-25T01:50:03.000Z | 2019-02-25T01:50:03.000Z | pytext/__init__.py | NunoEdgarGFlowHub/pytext | 2358b2d7c8c4e6800c73f4bd1c9731723e503ed6 | [
"BSD-3-Clause"
] | null | null | null | pytext/__init__.py | NunoEdgarGFlowHub/pytext | 2358b2d7c8c4e6800c73f4bd1c9731723e503ed6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import json
import uuid
from typing import Callable, Mapping, Optional
import numpy as np
from caffe2.python import workspace
from caffe2.python.predictor import predictor_exporter
from .builtin_task import register_builtin_... | 36.604396 | 88 | 0.727409 |
b11d7725740230346fbe8555198c64720b464851 | 1,374 | py | Python | modules/cudaobjdetect/misc/python/test/test_cudaobjdetect.py | ptelang/opencv_contrib | dd68e396c76f1db4d82e5aa7a6545580939f9b9d | [
"Apache-2.0"
] | 7,158 | 2016-07-04T22:19:27.000Z | 2022-03-31T07:54:32.000Z | modules/cudaobjdetect/misc/python/test/test_cudaobjdetect.py | ptelang/opencv_contrib | dd68e396c76f1db4d82e5aa7a6545580939f9b9d | [
"Apache-2.0"
] | 2,184 | 2016-07-05T12:04:14.000Z | 2022-03-30T19:10:12.000Z | modules/cudaobjdetect/misc/python/test/test_cudaobjdetect.py | ptelang/opencv_contrib | dd68e396c76f1db4d82e5aa7a6545580939f9b9d | [
"Apache-2.0"
] | 5,535 | 2016-07-06T12:01:10.000Z | 2022-03-31T03:13:24.000Z | #!/usr/bin/env python
import os
import cv2 as cv
import numpy as np
from tests_common import NewOpenCVTests, unittest
if __name__ == '__main__':
NewOpenCVTests.bootstrap() | 36.157895 | 92 | 0.659389 |
b11ddd81227b3782058ba9f99a70d0ae0079cb41 | 32,677 | py | Python | gizmo/mapper.py | emehrkay/gizmo | 01db2f51118f7d746061ace0b491237481949bad | [
"MIT"
] | 19 | 2015-10-06T12:55:09.000Z | 2021-01-09T09:53:38.000Z | gizmo/mapper.py | emehrkay/Gizmo | 01db2f51118f7d746061ace0b491237481949bad | [
"MIT"
] | 2 | 2016-01-21T02:55:55.000Z | 2020-08-16T23:05:07.000Z | gizmo/mapper.py | emehrkay/gizmo | 01db2f51118f7d746061ace0b491237481949bad | [
"MIT"
] | 3 | 2016-01-21T02:18:41.000Z | 2018-04-25T06:06:25.000Z | import logging
import inspect
import re
from collections import OrderedDict
from gremlinpy.gremlin import Gremlin, Param, AS
from .entity import (_Entity, Vertex, Edge, GenericVertex, GenericEdge,
ENTITY_MAP)
from .exception import (AstronomerQueryException, AstronomerMapperException)
from .traversal import Trav... | 29.896615 | 79 | 0.565903 |
b11de849f44d264e334f554dabd0e3fd62c6c1ae | 849 | py | Python | utils.py | Nicolas-Lefort/conv_neural_net_time_serie | 3075d3f97cdd45f91612f8300af2b4af7f232c42 | [
"MIT"
] | null | null | null | utils.py | Nicolas-Lefort/conv_neural_net_time_serie | 3075d3f97cdd45f91612f8300af2b4af7f232c42 | [
"MIT"
] | null | null | null | utils.py | Nicolas-Lefort/conv_neural_net_time_serie | 3075d3f97cdd45f91612f8300af2b4af7f232c42 | [
"MIT"
] | null | null | null | import pandas_ta as ta
| 31.444444 | 111 | 0.64311 |
b11f6265d46fdca364a4dd3bf4dcf5a12d2f410f | 2,871 | py | Python | praetorian_ssh_proxy/hanlers/menu_handler.py | Praetorian-Defence/praetorian-ssh-proxy | 068141bf0cee9fcf10434fab2dc5c16cfdd35f5a | [
"MIT"
] | null | null | null | praetorian_ssh_proxy/hanlers/menu_handler.py | Praetorian-Defence/praetorian-ssh-proxy | 068141bf0cee9fcf10434fab2dc5c16cfdd35f5a | [
"MIT"
] | null | null | null | praetorian_ssh_proxy/hanlers/menu_handler.py | Praetorian-Defence/praetorian-ssh-proxy | 068141bf0cee9fcf10434fab2dc5c16cfdd35f5a | [
"MIT"
] | null | null | null | import sys
| 45.571429 | 122 | 0.492163 |
b122b1664a2960a396de4fbb595bf3821559d96f | 563 | py | Python | orderedtable/urls.py | Shivam2k16/DjangoOrderedTable | da133a23a6659ce5467b8161edcf6db35f1c0b76 | [
"MIT"
] | 2 | 2018-04-15T17:03:59.000Z | 2019-03-23T04:45:00.000Z | orderedtable/urls.py | Shivam2k16/DjangoOrderedTable | da133a23a6659ce5467b8161edcf6db35f1c0b76 | [
"MIT"
] | null | null | null | orderedtable/urls.py | Shivam2k16/DjangoOrderedTable | da133a23a6659ce5467b8161edcf6db35f1c0b76 | [
"MIT"
] | 1 | 2018-04-15T16:54:07.000Z | 2018-04-15T16:54:07.000Z | from django.conf.urls import include, url
from django.contrib import admin
import orderedtable
from orderedtable import views
app_name="orderedtable"
urlpatterns = [
url(r'^$', views.home,name="home"),
url(r'^import-json/$', views.import_json,name="import_json"),
url(r'^project-list/$', views.project_lis... | 33.117647 | 80 | 0.698046 |
b123669e9c0103e63c00a8b4dcdbc0e0596f1442 | 2,242 | py | Python | call_google_translate.py | dadap/klingon-assistant-data | 5371f8ae6e3669f48a83087a4937af0dee8d23d1 | [
"Apache-2.0"
] | null | null | null | call_google_translate.py | dadap/klingon-assistant-data | 5371f8ae6e3669f48a83087a4937af0dee8d23d1 | [
"Apache-2.0"
] | 5 | 2018-07-11T09:17:19.000Z | 2018-10-14T10:33:51.000Z | call_google_translate.py | dadap/klingon-assistant-data | 5371f8ae6e3669f48a83087a4937af0dee8d23d1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Calls Google Translate to produce translations.
# To use, set "language" and "dest_language" below. (They are normally the same,
# unless Google uses a different language code than we do.) Then fill in
# the definition_[language] fields with "TRANSLATE" or
# "TRANSLATE: [replacement definition... | 44.84 | 460 | 0.666369 |
b123989fc301ccc896657660002120b9f5336e64 | 6,451 | py | Python | xenavalkyrie/xena_object.py | xenadevel/PyXenaValkyrie | 9bb1d0b058c45dc94a778fd674a679b53f03a34c | [
"Apache-2.0"
] | 4 | 2018-07-13T08:09:38.000Z | 2022-02-09T01:36:13.000Z | xenavalkyrie/xena_object.py | xenadevel/PyXenaValkyrie | 9bb1d0b058c45dc94a778fd674a679b53f03a34c | [
"Apache-2.0"
] | 1 | 2019-07-31T04:56:43.000Z | 2019-08-01T07:11:21.000Z | xenavalkyrie/xena_object.py | xenadevel/PyXenaValkyrie | 9bb1d0b058c45dc94a778fd674a679b53f03a34c | [
"Apache-2.0"
] | 3 | 2019-05-30T23:47:02.000Z | 2022-02-04T12:32:14.000Z | """
Base classes and utilities for all Xena Manager (Xena) objects.
:author: yoram@ignissoft.com
"""
import time
import re
import logging
from collections import OrderedDict
from trafficgenerator.tgn_utils import TgnError
from trafficgenerator.tgn_object import TgnObject, TgnObjectsDict
logger = logging.getLogger(_... | 32.746193 | 115 | 0.611843 |
b124d44c02271ffc2f5af0ccc84d1e1a14ca372b | 2,051 | py | Python | test/ryu/vsw-602_mp_port_desc.py | iMasaruOki/lagopus | 69c303b65acbc2d4661691c190c42946654de1b3 | [
"Apache-2.0"
] | 281 | 2015-01-06T13:36:14.000Z | 2022-03-14T03:29:46.000Z | test/ryu/vsw-602_mp_port_desc.py | iMasaruOki/lagopus | 69c303b65acbc2d4661691c190c42946654de1b3 | [
"Apache-2.0"
] | 115 | 2015-01-06T11:09:21.000Z | 2020-11-26T11:44:23.000Z | test/ryu/vsw-602_mp_port_desc.py | lagopus/lagopus | 69c303b65acbc2d4661691c190c42946654de1b3 | [
"Apache-2.0"
] | 108 | 2015-01-06T05:12:01.000Z | 2022-01-02T03:28:50.000Z | from ryu.base.app_manager import RyuApp
from ryu.controller.ofp_event import EventOFPSwitchFeatures
from ryu.controller.ofp_event import EventOFPPortDescStatsReply
from ryu.controller.handler import set_ev_cls
from ryu.controller.handler import CONFIG_DISPATCHER
from ryu.controller.handler import MAIN_DISPATCHER
from r... | 41.02 | 75 | 0.644564 |
b128e2f322061ebf320f3ab6964b531facfd7042 | 21,812 | py | Python | test/phytozome_test.py | samseaver/GenomeFileUtil | b17afb465569a34a12844283918ec654911f96cf | [
"MIT"
] | null | null | null | test/phytozome_test.py | samseaver/GenomeFileUtil | b17afb465569a34a12844283918ec654911f96cf | [
"MIT"
] | null | null | null | test/phytozome_test.py | samseaver/GenomeFileUtil | b17afb465569a34a12844283918ec654911f96cf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
import os # noqa: F401
import json # noqa: F401
import time
import shutil
import re
import sys
import datetime
import collections
#import simplejson
from os import environ
try:
from ConfigParser import ConfigParser # py2
except:
from configparser import ConfigParser ... | 46.606838 | 139 | 0.496011 |
b129413908fca02566b29b673b606e60be14141b | 7,824 | py | Python | icetray_version/trunk/resources/scripts/make_plots.py | hershalpandya/airshowerclassification_llhratio_test | a2a2ce5234c8f455fe56c332ab4fcc65008e9409 | [
"MIT"
] | null | null | null | icetray_version/trunk/resources/scripts/make_plots.py | hershalpandya/airshowerclassification_llhratio_test | a2a2ce5234c8f455fe56c332ab4fcc65008e9409 | [
"MIT"
] | null | null | null | icetray_version/trunk/resources/scripts/make_plots.py | hershalpandya/airshowerclassification_llhratio_test | a2a2ce5234c8f455fe56c332ab4fcc65008e9409 | [
"MIT"
] | null | null | null |
# coding: utf-8
# In[1]:
import numpy as np
get_ipython().magic(u'matplotlib inline')
from matplotlib import pyplot as plt
from matplotlib.colors import LogNorm
import sys
sys.path.append('../../python/')
from general_functions import load_5D_PDF_from_file
from mpl_toolkits.mplot3d import Axes3D
from matplotlib imp... | 23.709091 | 103 | 0.61797 |
b12945ba640ad4a03105665c4e82e2d609d22997 | 3,171 | py | Python | tests/test_vector.py | slode/triton | d440c510f4841348dfb9109f03858c75adf75564 | [
"MIT"
] | null | null | null | tests/test_vector.py | slode/triton | d440c510f4841348dfb9109f03858c75adf75564 | [
"MIT"
] | null | null | null | tests/test_vector.py | slode/triton | d440c510f4841348dfb9109f03858c75adf75564 | [
"MIT"
] | null | null | null | # Copyright (c) 2013 Stian Lode
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distrib... | 24.022727 | 79 | 0.602964 |
b129d2583e5ec5edf4eaa2db0112f68dbe43bc35 | 3,912 | py | Python | build.py | Lvue-YY/Lvue-YY | 630b1ea5d4db9b5d9373d4e9dbbfa9f8fc9baf2e | [
"Apache-2.0"
] | 1 | 2020-07-28T15:48:06.000Z | 2020-07-28T15:48:06.000Z | build.py | Lvue-YY/Lvue-YY | 630b1ea5d4db9b5d9373d4e9dbbfa9f8fc9baf2e | [
"Apache-2.0"
] | null | null | null | build.py | Lvue-YY/Lvue-YY | 630b1ea5d4db9b5d9373d4e9dbbfa9f8fc9baf2e | [
"Apache-2.0"
] | null | null | null | import httpx
import pathlib
import re
import datetime
from bs4 import BeautifulSoup
root = pathlib.Path(__file__).parent.resolve()
if __name__ == "__main__":
readme = root / "README.md"
readme_contents = readme.open().read()
events = get_events()
events_md = "\n".join(
["* {action} <a hr... | 37.615385 | 110 | 0.57362 |
b12c849d2ef4e720802c1f093c8c0678dd35a0b0 | 1,061 | py | Python | app/models/news_article_test.py | engineer237/News-application | 66d7e8d70c5c023292dea4f5b87bd11ab5fb102e | [
"MIT"
] | null | null | null | app/models/news_article_test.py | engineer237/News-application | 66d7e8d70c5c023292dea4f5b87bd11ab5fb102e | [
"MIT"
] | null | null | null | app/models/news_article_test.py | engineer237/News-application | 66d7e8d70c5c023292dea4f5b87bd11ab5fb102e | [
"MIT"
] | null | null | null | import unittest # module for testing
from models import news_article
if __name__ == "__main__":
unittest.main() | 48.227273 | 227 | 0.697455 |
b12dc2d34aac9627697ee3968231db8487e21dff | 2,216 | py | Python | samples/at.bestsolution.framework.grid.personsample.model/utils/datafaker.py | BestSolution-at/framework-grid | cdab70e916e20a1ce6bc81fa69339edbb34a2731 | [
"Apache-2.0"
] | 4 | 2015-01-19T11:35:38.000Z | 2021-05-20T04:31:26.000Z | samples/at.bestsolution.framework.grid.personsample.model/utils/datafaker.py | BestSolution-at/framework-grid | cdab70e916e20a1ce6bc81fa69339edbb34a2731 | [
"Apache-2.0"
] | 3 | 2015-01-22T10:42:51.000Z | 2015-02-04T13:06:56.000Z | samples/at.bestsolution.framework.grid.personsample.model/utils/datafaker.py | BestSolution-at/framework-grid | cdab70e916e20a1ce6bc81fa69339edbb34a2731 | [
"Apache-2.0"
] | 3 | 2015-01-15T09:45:13.000Z | 2016-03-08T11:29:58.000Z | #! /usr/bin/env python3
import sys
import random
import os
from faker import Factory as FFactory
OUTFILE = "samples.xmi"
NUM_SAMPLES = 10
NUM_COUNTRIES = 4
TEMPLATE = """<?xml version="1.0" encoding="ASCII"?>
<person:Root
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/... | 24.622222 | 116 | 0.553249 |
b12e9ab06bf81720fa6f6bbe4f8fd67e00e19bb0 | 977 | py | Python | tests/test_utility.py | ericbdaniels/pygeostat | 94d9cba9265945268f08302f86ce5ba1848fd601 | [
"MIT"
] | null | null | null | tests/test_utility.py | ericbdaniels/pygeostat | 94d9cba9265945268f08302f86ce5ba1848fd601 | [
"MIT"
] | null | null | null | tests/test_utility.py | ericbdaniels/pygeostat | 94d9cba9265945268f08302f86ce5ba1848fd601 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
__author__ = 'pygeostat development team'
__date__ = '2020-01-04'
__version__ = '1.0.0'
import os, sys
try:
import pygeostat as gs
except ImportError:
sys.path.append(os.path.abspath(os.path.join(os.... | 22.204545 | 86 | 0.684749 |
b12fefdc2ed55826f47db62ac7208620f95060a4 | 10,654 | py | Python | rockets/rocket.py | rsewell97/open-starship | ecb5f848b8ce2d7119defec0960b6ccdc176a9db | [
"Unlicense"
] | null | null | null | rockets/rocket.py | rsewell97/open-starship | ecb5f848b8ce2d7119defec0960b6ccdc176a9db | [
"Unlicense"
] | null | null | null | rockets/rocket.py | rsewell97/open-starship | ecb5f848b8ce2d7119defec0960b6ccdc176a9db | [
"Unlicense"
] | null | null | null | import time
import multiprocessing as mp
import numpy as np
from scipy.spatial.transform import Rotation
from world import Earth
| 33.71519 | 141 | 0.583255 |
b1311d08ef54f651d8ccb73e1a63e7ab49ee598f | 868 | py | Python | examples/complex/tcp_message.py | 0x7c48/mitmproxy | f9d8f3bae3f4e681d5f4d406b7e06b099e60ecba | [
"MIT"
] | 74 | 2016-03-20T17:39:26.000Z | 2020-05-12T13:53:23.000Z | examples/complex/tcp_message.py | 0x7c48/mitmproxy | f9d8f3bae3f4e681d5f4d406b7e06b099e60ecba | [
"MIT"
] | 7 | 2020-06-16T06:35:02.000Z | 2022-03-15T20:15:53.000Z | examples/complex/tcp_message.py | 0x7c48/mitmproxy | f9d8f3bae3f4e681d5f4d406b7e06b099e60ecba | [
"MIT"
] | 5 | 2016-12-14T14:56:57.000Z | 2020-03-08T20:58:31.000Z | """
tcp_message Inline Script Hook API Demonstration
------------------------------------------------
* modifies packets containing "foo" to "bar"
* prints various details for each packet.
example cmdline invocation:
mitmdump --rawtcp --tcp-host ".*" -s examples/complex/tcp_message.py
"""
from mitmproxy.utils import ... | 31 | 68 | 0.644009 |
b1318eb081bf81d3b2433e9aac0b4bedfc511b35 | 186 | py | Python | notes/notebook/apps.py | spam128/notes | 100008b7e0a2afa5677c15826588105027f52883 | [
"MIT"
] | null | null | null | notes/notebook/apps.py | spam128/notes | 100008b7e0a2afa5677c15826588105027f52883 | [
"MIT"
] | null | null | null | notes/notebook/apps.py | spam128/notes | 100008b7e0a2afa5677c15826588105027f52883 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
| 20.666667 | 54 | 0.763441 |
b1319080e17c411506273e715ba06f2cae72f330 | 409 | py | Python | tests/unit/test_app_init.py | isabella232/typeseam | 3e9d090ec84f2110ae69051364bb0905feb2f02c | [
"BSD-3-Clause"
] | 2 | 2016-02-02T01:14:33.000Z | 2016-04-22T03:45:50.000Z | tests/unit/test_app_init.py | codeforamerica/typeseam | 3e9d090ec84f2110ae69051364bb0905feb2f02c | [
"BSD-3-Clause"
] | 114 | 2015-12-21T23:57:01.000Z | 2016-08-18T01:47:31.000Z | tests/unit/test_app_init.py | isabella232/typeseam | 3e9d090ec84f2110ae69051364bb0905feb2f02c | [
"BSD-3-Clause"
] | 2 | 2016-01-21T09:22:02.000Z | 2021-04-16T09:49:56.000Z | from unittest import TestCase
from unittest.mock import Mock, patch
from typeseam.app import (
load_initial_data,
)
| 24.058824 | 46 | 0.662592 |
b1334d852e2065801f7e2f8ab3a80a2b0c5761be | 2,090 | py | Python | execution/execution.py | nafetsHN/environment | 46bf40e5b4bdf3259c5306497cc70c359ca197d2 | [
"MIT"
] | null | null | null | execution/execution.py | nafetsHN/environment | 46bf40e5b4bdf3259c5306497cc70c359ca197d2 | [
"MIT"
] | null | null | null | execution/execution.py | nafetsHN/environment | 46bf40e5b4bdf3259c5306497cc70c359ca197d2 | [
"MIT"
] | null | null | null | import sys
sys.path.append('../')
from abc import ABCMeta, abstractmethod
# https://www.python-course.eu/python3_abstract_classes.php
import logging
import oandapyV20
from oandapyV20 import API
import oandapyV20.endpoints.orders as orders
from oandapyV20.contrib.requests import MarketOrderRequest
... | 29.43662 | 79 | 0.635407 |
b133b22a086276eadb705450f1bd4e54352efb5b | 3,360 | py | Python | conda/update_versions.py | PicoJr/StereoPipeline | 146110a4d43ce6cb5e950297b8dca3f3b5e3f3b4 | [
"Apache-2.0"
] | 323 | 2015-01-10T12:34:24.000Z | 2022-03-24T03:52:22.000Z | conda/update_versions.py | PicoJr/StereoPipeline | 146110a4d43ce6cb5e950297b8dca3f3b5e3f3b4 | [
"Apache-2.0"
] | 252 | 2015-07-27T16:36:31.000Z | 2022-03-31T02:34:28.000Z | conda/update_versions.py | PicoJr/StereoPipeline | 146110a4d43ce6cb5e950297b8dca3f3b5e3f3b4 | [
"Apache-2.0"
] | 105 | 2015-02-28T02:37:27.000Z | 2022-03-14T09:17:30.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# __BEGIN_LICENSE__
# Copyright (c) 2009-2013, United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration. All
# rights reserved.
#
# The NGT platform is licensed under the Apache License, Version 2.0 (the
# "Lic... | 29.734513 | 88 | 0.622024 |
b133ecf4dd2609e5dbd8da4502d3368bb3abe2c9 | 172 | py | Python | test.py | uuidd/SimilarCharacter | 22e5f4b0b2798d903435aeb989ff2d0a4ad59d70 | [
"MIT"
] | 199 | 2019-09-09T08:44:19.000Z | 2022-03-24T12:42:04.000Z | test.py | uuidd/SimilarCharacter | 22e5f4b0b2798d903435aeb989ff2d0a4ad59d70 | [
"MIT"
] | 4 | 2020-08-06T08:03:28.000Z | 2022-01-06T15:14:36.000Z | test.py | uuidd/SimilarCharacter | 22e5f4b0b2798d903435aeb989ff2d0a4ad59d70 | [
"MIT"
] | 58 | 2019-10-10T06:56:43.000Z | 2022-03-21T02:58:01.000Z | import cv2
import ProcessWithCV2
img1 = cv2.imread("D:/py/chinese/7.png")
img2 = cv2.imread("D:/py/chinese/8.png")
a = ProcessWithCV2.dHash(img1, img2, 1)
print(a)
| 21.5 | 41 | 0.686047 |
b134a6803ce8be92cdcf0e2af682a4bd189585d7 | 3,782 | py | Python | scripts/common/alignments.py | SilasK/genome_sketch | 83366703669d749957e1935d6794b93023ed063d | [
"MIT"
] | 1 | 2021-03-26T11:41:55.000Z | 2021-03-26T11:41:55.000Z | scripts/common/alignments.py | SilasK/FastDrep | 83366703669d749957e1935d6794b93023ed063d | [
"MIT"
] | null | null | null | scripts/common/alignments.py | SilasK/FastDrep | 83366703669d749957e1935d6794b93023ed063d | [
"MIT"
] | null | null | null | import pandas as pd
import os
MINIMAP_HEADERS = [
"Contig2",
"Length2",
"Start2",
"End2",
"Strand",
"Contig1",
"Length1",
"Start1",
"End1",
"Nmatches",
"Allength",
"Quality",
]
MINIMAP_DATATYPES = [str, int, int, int, str, str, int, int, int, int, int, int]
assert len(... | 26.447552 | 87 | 0.536489 |
b13523d49b7c54fc6f8d9d277610505b22619edf | 961 | py | Python | python/sprint1_nonfinals/l.py | tu2gin/algorithms-templates | 14267819a11d36ee9125009b05049334bfdcec2a | [
"MIT"
] | null | null | null | python/sprint1_nonfinals/l.py | tu2gin/algorithms-templates | 14267819a11d36ee9125009b05049334bfdcec2a | [
"MIT"
] | null | null | null | python/sprint1_nonfinals/l.py | tu2gin/algorithms-templates | 14267819a11d36ee9125009b05049334bfdcec2a | [
"MIT"
] | null | null | null | # L.
# , .
# 2 s t, .
# t s 1
# . .
#
# s t, .
# 1000 . .
#
# .
from typing import Tuple
shorter, longer = read_input()
print(get_excessive_letter(shorter, longer))
| 29.121212 | 69 | 0.707596 |
b1353e1a12ba28028561c94ebd3cbfad77dbf672 | 194 | py | Python | bentoml/lightgbm.py | francoisserra/BentoML | 213e9e9b39e055286f2649c733907df88e6d2503 | [
"Apache-2.0"
] | 1 | 2021-06-12T17:04:07.000Z | 2021-06-12T17:04:07.000Z | bentoml/lightgbm.py | francoisserra/BentoML | 213e9e9b39e055286f2649c733907df88e6d2503 | [
"Apache-2.0"
] | 4 | 2021-05-16T08:06:25.000Z | 2021-11-13T08:46:36.000Z | bentoml/lightgbm.py | francoisserra/BentoML | 213e9e9b39e055286f2649c733907df88e6d2503 | [
"Apache-2.0"
] | null | null | null | from ._internal.frameworks.lightgbm import load
from ._internal.frameworks.lightgbm import save
from ._internal.frameworks.lightgbm import load_runner
__all__ = ["load", "load_runner", "save"]
| 32.333333 | 54 | 0.804124 |
b1355b614d3140ba034b33a7f3ee7859a1245971 | 723 | py | Python | flake8_strings/visitor.py | d1618033/flake8-strings | 2ad34a41eab65e2264da7aa91c54dbca701af1c5 | [
"MIT"
] | null | null | null | flake8_strings/visitor.py | d1618033/flake8-strings | 2ad34a41eab65e2264da7aa91c54dbca701af1c5 | [
"MIT"
] | 1 | 2021-02-19T13:50:29.000Z | 2021-02-19T13:50:29.000Z | flake8_strings/visitor.py | d1618033/flake8-strings | 2ad34a41eab65e2264da7aa91c54dbca701af1c5 | [
"MIT"
] | null | null | null | import ast
from typing import List
from flake8_plugin_utils import Visitor
from .errors import UnnecessaryBackslashEscapingError
| 27.807692 | 69 | 0.615491 |
b1355fb67bbb27f060266c03cc17b3aa9d3f3edd | 1,384 | py | Python | tests/test_asyncio_hn.py | MITBigDataGroup2/asyncio-hn | 7133530e8ffb56b7810bcd956241709fc2ae0f48 | [
"MIT"
] | 30 | 2017-02-12T21:58:10.000Z | 2021-11-04T00:11:49.000Z | tests/test_asyncio_hn.py | MITBigDataGroup2/asyncio-hn | 7133530e8ffb56b7810bcd956241709fc2ae0f48 | [
"MIT"
] | 4 | 2017-03-21T12:40:19.000Z | 2021-11-15T17:46:46.000Z | tests/test_asyncio_hn.py | MITBigDataGroup2/asyncio-hn | 7133530e8ffb56b7810bcd956241709fc2ae0f48 | [
"MIT"
] | 2 | 2017-12-18T09:11:45.000Z | 2022-02-09T16:45:49.000Z | #!/usr/bin/env python3.6
# -*- coding: utf-8 -*-
import pytest
from asyncio_hn import ClientHN
def validate_post(post, post_id, post_creator):
if post.get("id") == post_id:
assert post_creator == post.get("by")
| 28.244898 | 74 | 0.629335 |
b13626eb09eac5813e547227a9c0e21459be9cf0 | 5,649 | py | Python | src/data/make_dataset.py | Rajasvi/Adverse-Food-Events-Analysis | 8fb87cfaa4c55eaae56325e516623ad8661d7fb8 | [
"MIT"
] | 1 | 2021-12-16T02:40:31.000Z | 2021-12-16T02:40:31.000Z | src/data/make_dataset.py | AdityaR-Bits/adverse_food_events_analysis-1 | 8fb87cfaa4c55eaae56325e516623ad8661d7fb8 | [
"MIT"
] | 1 | 2021-12-04T00:58:50.000Z | 2021-12-04T00:58:50.000Z | src/data/make_dataset.py | AdityaR-Bits/adverse_food_events_analysis-1 | 8fb87cfaa4c55eaae56325e516623ad8661d7fb8 | [
"MIT"
] | 2 | 2021-12-04T02:11:26.000Z | 2021-12-04T06:32:19.000Z | # -*- coding: utf-8 -*-
import click
import logging
from pathlib import Path
import pandas as pd
import re
import string
from nltk.corpus import stopwords
def brand_preprocess(row, trim_len=2):
""" This function creates a brand name column by parsing out the product column of data. It trims the words based on tri... | 32.465517 | 172 | 0.657639 |
b1367245e5290f368fa75d027c1ba49c8fa30f4e | 5,061 | py | Python | src/compare_eval.py | gccrpm/cdmf | 5fca1393acbedbbd6ebc65bf2c9336645cc3e0fc | [
"BSD-2-Clause"
] | 1 | 2020-04-16T05:06:39.000Z | 2020-04-16T05:06:39.000Z | src/compare_eval.py | gccrpm/cdmf | 5fca1393acbedbbd6ebc65bf2c9336645cc3e0fc | [
"BSD-2-Clause"
] | null | null | null | src/compare_eval.py | gccrpm/cdmf | 5fca1393acbedbbd6ebc65bf2c9336645cc3e0fc | [
"BSD-2-Clause"
] | 1 | 2020-04-16T05:06:52.000Z | 2020-04-16T05:06:52.000Z | import os
import re
import hyperparams as hp
from data_load import DataLoad
from tqdm import tqdm
import numpy as np
import pandas as pd
import tensorflow as tf
if __name__ == '__main__':
data = DataLoad(data_path=hp.DATA_PATH,
fnames=hp.FNAMES,
forced_seq_len=hp.FORCED_SE... | 40.814516 | 87 | 0.538234 |
b13b701d2eb809667c24251d55ce1c0bf248bc34 | 1,465 | py | Python | substitute_finder/migrations/0003_product.py | tohugaby/pur_beurre_web | c3bdacee50907eea79821e7a8b3fe0f349719d88 | [
"MIT"
] | 1 | 2020-01-05T18:58:51.000Z | 2020-01-05T18:58:51.000Z | substitute_finder/migrations/0003_product.py | tohugaby/pur_beurre_web | c3bdacee50907eea79821e7a8b3fe0f349719d88 | [
"MIT"
] | 3 | 2020-06-05T18:35:47.000Z | 2021-06-10T20:32:44.000Z | substitute_finder/migrations/0003_product.py | tomlemeuch/pur_beurre_web | c3bdacee50907eea79821e7a8b3fe0f349719d88 | [
"MIT"
] | null | null | null | # Generated by Django 2.1 on 2018-08-14 09:42
from django.conf import settings
from django.db import migrations, models
| 44.393939 | 133 | 0.624573 |
b13db7a0887619658384413e84415d13be784dc2 | 6,613 | py | Python | parameters/standard.py | David-Loibl/gistemp | 4b96696243cbbb425c7b27fed35398e0fef9968d | [
"BSD-3-Clause"
] | 1 | 2020-02-04T13:16:05.000Z | 2020-02-04T13:16:05.000Z | parameters/standard.py | David-Loibl/gistemp4.0 | 4b96696243cbbb425c7b27fed35398e0fef9968d | [
"BSD-3-Clause"
] | null | null | null | parameters/standard.py | David-Loibl/gistemp4.0 | 4b96696243cbbb425c7b27fed35398e0fef9968d | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
#
# parameters/standard.py
#
# Nick Barnes, Ravenbrook Limited, 2010-02-15
# Avi Persin, Revision 2016-01-06
"""Parameters controlling the standard GISTEMP algorithm.
Various parameters controlling each phase of the algorithm are
collected and documented here. They appear here in approximately... | 42.121019 | 77 | 0.788145 |
b13ecc0cc389e823f57ccec244dcd3eab8ae5459 | 5,781 | py | Python | pypdevs/src/pypdevs/tracers/tracerCell.py | martinvy/sin-model-elevators | ebf6511d61326972b2e366c8975f76a944196a6f | [
"MIT"
] | 1 | 2018-09-19T14:42:28.000Z | 2018-09-19T14:42:28.000Z | pypdevs/src/pypdevs/tracers/tracerCell.py | martinvy/sin-model-elevators | ebf6511d61326972b2e366c8975f76a944196a6f | [
"MIT"
] | null | null | null | pypdevs/src/pypdevs/tracers/tracerCell.py | martinvy/sin-model-elevators | ebf6511d61326972b2e366c8975f76a944196a6f | [
"MIT"
] | 2 | 2020-05-29T10:12:37.000Z | 2021-05-19T21:32:35.000Z | # Copyright 2014 Modelling, Simulation and Design Lab (MSDL) at
# McGill University and the University of Antwerp (http://msdl.cs.mcgill.ca/)
#
# 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... | 35.466258 | 113 | 0.523785 |
b13f03597d9a5e677488aa6621f7a6411da41c2d | 3,223 | py | Python | Estrangement/tests/test_utils.py | kawadia/estrangement | 612542bf4af64f248766ad28c18028ff4b2307b5 | [
"BSD-3-Clause"
] | 7 | 2015-02-17T14:04:25.000Z | 2020-02-16T08:59:00.000Z | tnetwork/DCD/externals/estrangement_master/Estrangement/tests/test_utils.py | Yquetzal/tnetwork | 43fb2f19aeed57a8a9d9af032ee80f1c9f58516d | [
"BSD-2-Clause"
] | 1 | 2019-07-13T16:16:28.000Z | 2019-07-15T09:34:33.000Z | Estrangement/tests/test_utils.py | kawadia/estrangement | 612542bf4af64f248766ad28c18028ff4b2307b5 | [
"BSD-3-Clause"
] | 4 | 2015-02-20T15:29:59.000Z | 2021-03-28T04:12:08.000Z | import networkx as nx
import sys
import os
import nose
sys.path.append(os.getcwd() + "/..")
import utils
| 48.104478 | 127 | 0.630779 |
b13f674704e7fed7b35db9e06e6e7c93a0224c41 | 2,184 | py | Python | src/train.py | stephenllh/bcs-unet | be534a25e28cbe3501278d0ee6e2417b2cd737d3 | [
"MIT"
] | 5 | 2021-05-04T12:46:32.000Z | 2022-03-17T09:33:39.000Z | src/train.py | stephenllh/bcs-unet | be534a25e28cbe3501278d0ee6e2417b2cd737d3 | [
"MIT"
] | null | null | null | src/train.py | stephenllh/bcs-unet | be534a25e28cbe3501278d0ee6e2417b2cd737d3 | [
"MIT"
] | null | null | null | import os
import argparse
import pytorch_lightning as pl
from pytorch_lightning.callbacks import (
ModelCheckpoint,
EarlyStopping,
LearningRateMonitor,
)
from pytorch_lightning.loggers import TensorBoardLogger
from pytorch_lightning.utilities.seed import seed_everything
from data.emnist import EMNISTDataMod... | 29.12 | 104 | 0.688645 |
b1402f6a4aea579ed7251e589133544512e942f3 | 6,681 | py | Python | perturbation_classifiers/util/dataset.py | rjos/perturbation-classifiers | 5637b49c5c297e20b4ee6bcee25173d9d11d642f | [
"MIT"
] | null | null | null | perturbation_classifiers/util/dataset.py | rjos/perturbation-classifiers | 5637b49c5c297e20b4ee6bcee25173d9d11d642f | [
"MIT"
] | null | null | null | perturbation_classifiers/util/dataset.py | rjos/perturbation-classifiers | 5637b49c5c297e20b4ee6bcee25173d9d11d642f | [
"MIT"
] | null | null | null | # coding=utf-8
# Author: Rodolfo J. O. Soares <rodolfoj.soares@gmail.com>
import numpy as np
import re
def load_keel_file(path):
"""Load a keel dataset format.
Parameters
----------
path : str
The filepath of the keel dataset format.
Returns
-------
keel_dataset: KeelDataset
... | 33.074257 | 163 | 0.553959 |
b14084e431f80764a4ba711f2600b59b246111f5 | 830 | py | Python | ex44e.py | liggettla/python | 4bdad72bc2143679be6d1f8722b83cc359753ca9 | [
"MIT"
] | null | null | null | ex44e.py | liggettla/python | 4bdad72bc2143679be6d1f8722b83cc359753ca9 | [
"MIT"
] | null | null | null | ex44e.py | liggettla/python | 4bdad72bc2143679be6d1f8722b83cc359753ca9 | [
"MIT"
] | null | null | null | #Rather than rely on inplicit inheritance from other classes, classes can just
#call the functions from a class; termed composition
son = Child()
son.implicit()
son.override()
son.altered()
| 21.842105 | 78 | 0.639759 |
b14119e47e0e47d908eda6baf79a8ccfb87c16a5 | 2,333 | py | Python | tools/create_doc.py | nbigaouette/gitlab-api-rs | e84c871ad6f852072a373cd950ede546525913eb | [
"Apache-2.0",
"MIT"
] | 11 | 2017-01-22T18:12:57.000Z | 2021-02-15T21:14:34.000Z | tools/create_doc.py | nbigaouette/gitlab-api-rs | e84c871ad6f852072a373cd950ede546525913eb | [
"Apache-2.0",
"MIT"
] | 16 | 2016-12-05T22:09:27.000Z | 2021-12-25T14:56:43.000Z | tools/create_doc.py | nbigaouette/gitlab-api-rs | e84c871ad6f852072a373cd950ede546525913eb | [
"Apache-2.0",
"MIT"
] | 3 | 2017-01-25T19:30:52.000Z | 2018-01-24T09:08:07.000Z | #!/usr/bin/env python3
import os
import re
import sys
import urllib.request
# api_filename = "projects.md"
api_filename = "groups.md"
url = "https://gitlab.com/gitlab-org/gitlab-ce/raw/master/doc/api/" + api_filename
doc_dir = "doc_tmp"
if not os.path.exists(doc_dir):
os.makedirs(doc_dir)
filename, headers =... | 33.328571 | 106 | 0.624946 |
b14315cacfc7adb3442f4613fdef5630de51a32c | 997 | py | Python | samples/butia/sumo_crono/push_mouse_event.py | RodPy/Turtlebots.activity | f885d7d2e5d710c01294ae60da995dfb0eb36b21 | [
"MIT"
] | null | null | null | samples/butia/sumo_crono/push_mouse_event.py | RodPy/Turtlebots.activity | f885d7d2e5d710c01294ae60da995dfb0eb36b21 | [
"MIT"
] | null | null | null | samples/butia/sumo_crono/push_mouse_event.py | RodPy/Turtlebots.activity | f885d7d2e5d710c01294ae60da995dfb0eb36b21 | [
"MIT"
] | 1 | 2020-06-17T15:44:16.000Z | 2020-06-17T15:44:16.000Z | #Copyright (c) 2009-11, Walter Bender, Tony Forster
# This procedure is invoked when the user-definable block on the
# "extras" palette is selected.
# Usage: Import this code into a Python (user-definable) block; when
# this code is run, the current mouse status will be pushed to the
# FILO heap. If a mouse button ev... | 36.925926 | 70 | 0.675025 |
b144174f87f4c7e89faeb2a0f3dc32dfe6c660fe | 2,593 | py | Python | espn_api/hockey/constant.py | samthom1/espn-api | 6f3f5915a65f1f7e17778d3a5d3f1121e8c7d5fe | [
"MIT"
] | null | null | null | espn_api/hockey/constant.py | samthom1/espn-api | 6f3f5915a65f1f7e17778d3a5d3f1121e8c7d5fe | [
"MIT"
] | null | null | null | espn_api/hockey/constant.py | samthom1/espn-api | 6f3f5915a65f1f7e17778d3a5d3f1121e8c7d5fe | [
"MIT"
] | null | null | null | #Constants
POSITION_MAP = {
# Remaining: F, IR, Util
0 : '0' # IR?
, 1 : 'Center'
, 2 : 'Left Wing'
, 3 : 'Right Wing'
, 4 : 'Defense'
, 5 : 'Goalie'
, 6 : '6' # Forward ?
, 7 : '7' # Goalie, F (Goalie Bench?)
, 8 : '8' # Goalie, F
, 'Center': 1
, 'Left Wing'... | 20.744 | 42 | 0.415349 |
b1445f82594bc253e4a47533cb5834aed7b2e1e1 | 649 | py | Python | dataval/conftest.py | weishengtoh/machinelearning_assignment | 2099377faf0b1086cb3c496eecd3b0ae533a90f2 | [
"Apache-2.0"
] | null | null | null | dataval/conftest.py | weishengtoh/machinelearning_assignment | 2099377faf0b1086cb3c496eecd3b0ae533a90f2 | [
"Apache-2.0"
] | null | null | null | dataval/conftest.py | weishengtoh/machinelearning_assignment | 2099377faf0b1086cb3c496eecd3b0ae533a90f2 | [
"Apache-2.0"
] | null | null | null | import os
import pandas as pd
import pytest
import yaml
import wandb
run = wandb.init(project='RP_NVIDIA_Machine_Learning',
job_type='data_validation')
| 21.633333 | 77 | 0.694915 |
b1450ba4c392fda6a05914dd0e6efe6138ef8c05 | 8,049 | py | Python | src/abaqus/Odb/Odb.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | 7 | 2022-01-21T09:15:45.000Z | 2022-02-15T09:31:58.000Z | src/abaqus/Odb/Odb.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | src/abaqus/Odb/Odb.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | from abaqusConstants import *
from .OdbPart import OdbPart
from .OdbStep import OdbStep
from .SectionCategory import SectionCategory
from ..Amplitude.AmplitudeOdb import AmplitudeOdb
from ..BeamSectionProfile.BeamSectionProfileOdb import BeamSectionProfileOdb
from ..Filter.FilterOdb import FilterOdb
from ..Material.Mat... | 37.966981 | 112 | 0.610262 |
b1483e23d7d2752b7248ed2d54d8ac8e55492604 | 241 | py | Python | popcorn_gallery/tutorials/urls.py | Koenkk/popcorn_maker | 0978b9f98dacd4e8eb753404b24eb584f410aa11 | [
"BSD-3-Clause"
] | 15 | 2015-03-23T02:55:20.000Z | 2021-01-12T12:42:30.000Z | popcorn_gallery/tutorials/urls.py | Koenkk/popcorn_maker | 0978b9f98dacd4e8eb753404b24eb584f410aa11 | [
"BSD-3-Clause"
] | null | null | null | popcorn_gallery/tutorials/urls.py | Koenkk/popcorn_maker | 0978b9f98dacd4e8eb753404b24eb584f410aa11 | [
"BSD-3-Clause"
] | 16 | 2015-02-18T21:43:31.000Z | 2021-11-09T22:50:03.000Z | from django.conf.urls.defaults import patterns, url
urlpatterns = patterns(
'popcorn_gallery.tutorials.views',
url(r'^(?P<slug>[\w-]+)/$', 'object_detail', name='object_detail'),
url(r'^$', 'object_list', name='object_list'),
)
| 30.125 | 71 | 0.66805 |
b1485dd7aa764623468a3437193c8ab420612082 | 3,738 | py | Python | tests/characterisation/test_kelvin_models.py | pauliacomi/adsutils | 062653b38924d419d1235edf7909078ff98a163f | [
"MIT"
] | 35 | 2018-01-24T14:59:08.000Z | 2022-03-10T02:47:58.000Z | tests/characterisation/test_kelvin_models.py | pauliacomi/adsutils | 062653b38924d419d1235edf7909078ff98a163f | [
"MIT"
] | 29 | 2018-01-06T12:08:08.000Z | 2022-03-11T20:26:53.000Z | tests/characterisation/test_kelvin_models.py | pauliacomi/adsutils | 062653b38924d419d1235edf7909078ff98a163f | [
"MIT"
] | 20 | 2019-06-12T19:20:29.000Z | 2022-03-02T09:57:02.000Z | """
This test module has tests relating to kelvin model validations.
All functions in /calculations/models_kelvin.py are tested here.
The purposes are:
- testing the meniscus shape determination function
- testing the output of the kelvin equations
- testing that the "function getter" is performing as exp... | 35.264151 | 80 | 0.607277 |
b1491744c42a7da1be2a17f6cb231604a6c7385b | 2,231 | py | Python | packages/jet_bridge/jet_bridge/__main__.py | bokal2/jet-bridge | dddc4f55c2d5a28c02ce9515dffc750e3887450f | [
"MIT"
] | 1 | 2020-02-06T01:07:44.000Z | 2020-02-06T01:07:44.000Z | packages/jet_bridge/jet_bridge/__main__.py | bokal2/jet-bridge | dddc4f55c2d5a28c02ce9515dffc750e3887450f | [
"MIT"
] | null | null | null | packages/jet_bridge/jet_bridge/__main__.py | bokal2/jet-bridge | dddc4f55c2d5a28c02ce9515dffc750e3887450f | [
"MIT"
] | null | null | null | import os
from datetime import datetime
import sys
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
from jet_bridge_base import configuration
from jet_bridge.configuration import JetBridgeConfiguration
conf = JetBridgeConfiguration()
configuration.set_configuration(conf)
from jet_bridge_b... | 30.561644 | 103 | 0.714926 |
b14a3e4e999395aab5aac5de3e1df984c03e66f4 | 690 | py | Python | casepro/translation.py | praekelt/helpdesk | 69a7242679c30d2f7cb30a433809e738b9756a3c | [
"BSD-3-Clause"
] | 5 | 2015-07-21T15:58:31.000Z | 2019-09-14T22:34:00.000Z | casepro/translation.py | praekelt/helpdesk | 69a7242679c30d2f7cb30a433809e738b9756a3c | [
"BSD-3-Clause"
] | 197 | 2015-03-24T15:26:04.000Z | 2017-11-28T19:24:37.000Z | casepro/translation.py | praekelt/helpdesk | 69a7242679c30d2f7cb30a433809e738b9756a3c | [
"BSD-3-Clause"
] | 10 | 2015-03-24T12:26:36.000Z | 2017-02-21T13:08:57.000Z | from __future__ import unicode_literals
from django.utils.translation import ugettext as _
from django.utils.translation import get_language as _get_language
from modeltranslation.translator import translator, TranslationOptions
from modeltranslation import utils
from nsms.text.models import Text
translator.register... | 27.6 | 70 | 0.815942 |
b14a72da64d12a7c8066ba502beb5c9606168931 | 147 | py | Python | Booleans/4.2.4 If/4.2.5 Fix the problem.py | ferrerinicolas/python_samples | 107cead4fbee30b275a5e2be1257833129ce5e46 | [
"MIT"
] | null | null | null | Booleans/4.2.4 If/4.2.5 Fix the problem.py | ferrerinicolas/python_samples | 107cead4fbee30b275a5e2be1257833129ce5e46 | [
"MIT"
] | null | null | null | Booleans/4.2.4 If/4.2.5 Fix the problem.py | ferrerinicolas/python_samples | 107cead4fbee30b275a5e2be1257833129ce5e46 | [
"MIT"
] | null | null | null | can_juggle = True
# The code below has problems. See if
# you can fix them!
#if can_juggle print("I can juggle!")
#else
print("I can't juggle.")
| 16.333333 | 37 | 0.693878 |
b14c88c3a21671daaf4ca901cbbd386b9d8bf26a | 703 | py | Python | pytools/mpiwrap.py | nchristensen/pytools | 82da2e0aad6863763f1950318bcb933662020135 | [
"MIT"
] | 52 | 2015-06-23T10:30:24.000Z | 2021-07-28T20:50:31.000Z | pytools/mpiwrap.py | nchristensen/pytools | 82da2e0aad6863763f1950318bcb933662020135 | [
"MIT"
] | 72 | 2015-10-22T18:57:08.000Z | 2022-03-01T00:04:45.000Z | pytools/mpiwrap.py | nchristensen/pytools | 82da2e0aad6863763f1950318bcb933662020135 | [
"MIT"
] | 27 | 2015-09-14T07:24:04.000Z | 2021-12-17T14:31:33.000Z | """See pytools.prefork for this module's reason for being."""
import mpi4py.rc # pylint:disable=import-error
mpi4py.rc.initialize = False
from mpi4py.MPI import * # noqa pylint:disable=wildcard-import,wrong-import-position
import pytools.prefork # pylint:disable=wrong-import-position
pytools.prefork.enable_prefor... | 33.47619 | 85 | 0.762447 |
b14cfa3a8ca9bb29e189356b82457936f9e99aff | 6,096 | py | Python | vlcp/service/connection/tcpserver.py | geek-plus/vlcp | e7936e00929fcef00c04d4da39b67d9679d5f083 | [
"Apache-2.0"
] | 1 | 2016-09-10T12:09:29.000Z | 2016-09-10T12:09:29.000Z | vlcp/service/connection/tcpserver.py | wan-qy/vlcp | e7936e00929fcef00c04d4da39b67d9679d5f083 | [
"Apache-2.0"
] | null | null | null | vlcp/service/connection/tcpserver.py | wan-qy/vlcp | e7936e00929fcef00c04d4da39b67d9679d5f083 | [
"Apache-2.0"
] | null | null | null | '''
Created on 2015/10/19
:author: hubo
'''
from vlcp.server.module import Module, api
from vlcp.event import TcpServer
from vlcp.event.runnable import RoutineContainer
from vlcp.event.connection import Client
| 43.234043 | 146 | 0.564304 |
b14d75f54839eba4678025c29ab6853f284addcb | 1,571 | py | Python | make/requirements.py | Fizzadar/Kanmail | 3915b1056949b50410478d1519b9276d64ef4f5d | [
"OpenSSL"
] | 12 | 2019-02-10T21:18:53.000Z | 2020-02-17T07:40:48.000Z | make/requirements.py | Fizzadar/Kanmail | 3915b1056949b50410478d1519b9276d64ef4f5d | [
"OpenSSL"
] | 71 | 2017-11-17T07:13:02.000Z | 2020-04-03T15:25:43.000Z | make/requirements.py | Fizzadar/Kanmail | 3915b1056949b50410478d1519b9276d64ef4f5d | [
"OpenSSL"
] | 1 | 2020-02-15T03:16:13.000Z | 2020-02-15T03:16:13.000Z | from distutils.spawn import find_executable
from os import path
import click
from .settings import (
BASE_DEVELOPMENT_REQUIREMENTS_FILENAME,
BASE_REQUIREMENTS_FILENAME,
DEVELOPMENT_REQUIREMENTS_FILENAME,
REQUIREMENTS_FILENAME,
)
from .util import print_and_run
if __name__ == '__main__':
cli... | 21.819444 | 93 | 0.695099 |
b14f875123a59ce6fa0837c5ecb49e829cede9cf | 1,135 | py | Python | integration/python/src/helper/hosts.py | ArpitShukla007/planetmint | 4b1e215e0059e26c0cee6778c638306021b47bdd | [
"Apache-2.0"
] | 3 | 2022-01-19T13:39:52.000Z | 2022-01-28T05:57:08.000Z | integration/python/src/helper/hosts.py | ArpitShukla007/planetmint | 4b1e215e0059e26c0cee6778c638306021b47bdd | [
"Apache-2.0"
] | 67 | 2022-01-13T22:42:17.000Z | 2022-03-31T14:18:26.000Z | integration/python/src/helper/hosts.py | ArpitShukla007/planetmint | 4b1e215e0059e26c0cee6778c638306021b47bdd | [
"Apache-2.0"
] | 7 | 2022-01-13T16:20:54.000Z | 2022-02-07T11:42:05.000Z | # Copyright 2020 Interplanetary Database Association e.V.,
# Planetmint and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
from typing import List
from planetmint_driver import Planetmint
| 30.675676 | 102 | 0.667841 |
b151396bf4b33731a5544d5a99c0e63a228fafd2 | 24,737 | py | Python | baiduspider/core/__init__.py | samuelmao415/BaiduSpider | c896201ced6714878ad13867f83d740f303df68b | [
"MIT"
] | 1 | 2020-09-19T03:17:08.000Z | 2020-09-19T03:17:08.000Z | baiduspider/core/__init__.py | samuelmao415/BaiduSpider | c896201ced6714878ad13867f83d740f303df68b | [
"MIT"
] | null | null | null | baiduspider/core/__init__.py | samuelmao415/BaiduSpider | c896201ced6714878ad13867f83d740f303df68b | [
"MIT"
] | null | null | null | """BaiduSpider
:Author: Sam Zhang
:Licence: MIT
:GitHub: https://github.com/samzhangjy
:GitLab: https://gitlab.com/samzhangjy
TODO:
TODO:
"""
import json
import os
import re
from html import unescape
from pprint import pprint
from urllib.parse import quote, urlparse
import requests
from bs4 import BeautifulSoup
f... | 33.701635 | 767 | 0.402353 |
b15153401c65e82722c6b9906d4e09d6524f4e20 | 1,200 | py | Python | HY_Plotter/windReader/reader/cfosat.py | BigShuiTai/HY-CFOSAT-ASCAT-Wind-Data-Plotter | 5be90e5d35151d4c056c77344bf5075e144c3113 | [
"MIT"
] | 1 | 2021-08-22T06:30:58.000Z | 2021-08-22T06:30:58.000Z | HY_Plotter/windReader/reader/cfosat.py | Dapiya/HY-CFOSAT-L2B-Wind-Data-Plotter | 5be90e5d35151d4c056c77344bf5075e144c3113 | [
"MIT"
] | 1 | 2021-10-30T07:25:17.000Z | 2021-10-30T16:22:17.000Z | HY_Plotter/windReader/reader/cfosat.py | Dapiya/HY-CFOSAT-L2B-Wind-Data-Plotter | 5be90e5d35151d4c056c77344bf5075e144c3113 | [
"MIT"
] | 1 | 2021-08-21T12:51:39.000Z | 2021-08-21T12:51:39.000Z | import netCDF4
import numpy as np | 41.37931 | 115 | 0.549167 |
b15405b5c4a9b35dd5bdc84b62d31229a91e7265 | 17,228 | py | Python | example_snippets.py | kimberscott/ffmpeg-stimuli-generation | 54bce134a3236d9e7d2fefe4538378d76f2db798 | [
"MIT"
] | null | null | null | example_snippets.py | kimberscott/ffmpeg-stimuli-generation | 54bce134a3236d9e7d2fefe4538378d76f2db798 | [
"MIT"
] | null | null | null | example_snippets.py | kimberscott/ffmpeg-stimuli-generation | 54bce134a3236d9e7d2fefe4538378d76f2db798 | [
"MIT"
] | 1 | 2020-08-14T17:15:29.000Z | 2020-08-14T17:15:29.000Z | """
Examples of using the functions in videotools.py to generate videos.
This file will not run as-is - it is just intended to provide reference commands you might copy and edit.
"""
import os
from videotools import *
this_path = os.path.dirname(os.path.abspath(__file__))
input_path = os.path.join(this_path, "example... | 40.252336 | 187 | 0.390585 |
b1542cd589e62fb7173b027c1b40c713b7897ca2 | 615 | py | Python | sample_project/env/lib/python3.9/site-packages/qtpy/tests/test_qtprintsupport.py | Istiakmorsalin/ML-Data-Science | 681e68059b146343ef55b0671432dc946970730d | [
"MIT"
] | 4 | 2021-11-19T03:25:13.000Z | 2022-02-24T15:32:30.000Z | sample_project/env/lib/python3.9/site-packages/qtpy/tests/test_qtprintsupport.py | Istiakmorsalin/ML-Data-Science | 681e68059b146343ef55b0671432dc946970730d | [
"MIT"
] | null | null | null | sample_project/env/lib/python3.9/site-packages/qtpy/tests/test_qtprintsupport.py | Istiakmorsalin/ML-Data-Science | 681e68059b146343ef55b0671432dc946970730d | [
"MIT"
] | 3 | 2020-08-04T02:48:32.000Z | 2020-08-17T01:20:09.000Z | from __future__ import absolute_import
import pytest
from qtpy import QtPrintSupport
def test_qtprintsupport():
"""Test the qtpy.QtPrintSupport namespace"""
assert QtPrintSupport.QAbstractPrintDialog is not None
assert QtPrintSupport.QPageSetupDialog is not None
assert QtPrintSupport.QPrint... | 32.368421 | 59 | 0.782114 |
b155f55e9f976d163537ef6daaa4dfc7e72b3594 | 2,004 | py | Python | logbook/auth.py | nicola-zanardi/personal-logbook | d44989825ec82437ffd50572c23ef7c2ddf00e30 | [
"Unlicense"
] | null | null | null | logbook/auth.py | nicola-zanardi/personal-logbook | d44989825ec82437ffd50572c23ef7c2ddf00e30 | [
"Unlicense"
] | 7 | 2019-08-28T18:22:40.000Z | 2020-01-15T09:10:13.000Z | logbook/auth.py | nicola-zen/personal-logbook | d44989825ec82437ffd50572c23ef7c2ddf00e30 | [
"Unlicense"
] | null | null | null | from flask import Blueprint, flash, redirect, render_template, request, url_for
from werkzeug.security import check_password_hash, generate_password_hash
from flask_login import login_required, login_user, logout_user
from logbook.models import User, db
from peewee import fn
auth = Blueprint("auth", __name__)
... | 30.363636 | 94 | 0.686627 |
b156849efe28743e1f59dbcfbfb3f32c4319b8b3 | 2,718 | py | Python | gecko/classes/api_handler.py | paulschick/Coingecko-Crypto-Price-API | c712856bf423a6d1d429a35c8a8e01bb983ec7ff | [
"MIT"
] | 2 | 2022-01-18T18:09:31.000Z | 2022-02-28T01:01:45.000Z | gecko/classes/api_handler.py | paulschick/Coingecko-Crypto-Price-API | c712856bf423a6d1d429a35c8a8e01bb983ec7ff | [
"MIT"
] | null | null | null | gecko/classes/api_handler.py | paulschick/Coingecko-Crypto-Price-API | c712856bf423a6d1d429a35c8a8e01bb983ec7ff | [
"MIT"
] | null | null | null | import aiohttp
from aiohttp import ClientConnectionError, ClientResponseError
from .models import CoinsResponse, SimplePriceResponse
from .configs import Config
from typing import List, Dict, Union
| 41.181818 | 102 | 0.472774 |
b156a941a513ed31187d8dbd1191f683290ef317 | 1,497 | py | Python | Hello-Cifar-10/keras.py | PyTorchLightning/grid-tutorials | a45ec1bed374660b5a423d096945e462b3241efc | [
"Apache-2.0"
] | null | null | null | Hello-Cifar-10/keras.py | PyTorchLightning/grid-tutorials | a45ec1bed374660b5a423d096945e462b3241efc | [
"Apache-2.0"
] | null | null | null | Hello-Cifar-10/keras.py | PyTorchLightning/grid-tutorials | a45ec1bed374660b5a423d096945e462b3241efc | [
"Apache-2.0"
] | null | null | null | from argparse import ArgumentParser
from pathlib import Path
from tensorflow import keras
# Define this script's flags
parser = ArgumentParser()
parser.add_argument('--lr', type=float, default=1e-3)
parser.add_argument('--batch_size', type=int, default=32)
parser.add_argument('--max_epochs', type=int, default=5)
pars... | 28.788462 | 93 | 0.725451 |
b15750ce5aef5b54cce96688ad262cadc96dc7f8 | 4,432 | py | Python | src/taskmaster/client.py | alex/taskmaster | 04a03bf0853facf318ce98192db6389cdaaefe3c | [
"Apache-2.0"
] | 2 | 2015-11-08T12:45:38.000Z | 2017-06-03T09:16:16.000Z | src/taskmaster/client.py | alex/taskmaster | 04a03bf0853facf318ce98192db6389cdaaefe3c | [
"Apache-2.0"
] | null | null | null | src/taskmaster/client.py | alex/taskmaster | 04a03bf0853facf318ce98192db6389cdaaefe3c | [
"Apache-2.0"
] | null | null | null | """
taskmaster.consumer
~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
import cPickle as pickle
import gevent
from gevent_zeromq import zmq
from gevent.queue import Queue
from taskmaster.util import import_target
| 25.181818 | 92 | 0.54287 |
b1587cfb5054c54695ad8b82700668819e284945 | 3,165 | py | Python | src/loop.py | migueldingli1997/PySnake | b9b7e98651b207f7bf846cd951b4bb4ee3bba426 | [
"Apache-2.0"
] | 2 | 2020-03-06T09:09:00.000Z | 2022-01-12T14:29:51.000Z | src/loop.py | migueldingli1997/PySnake | b9b7e98651b207f7bf846cd951b4bb4ee3bba426 | [
"Apache-2.0"
] | 20 | 2020-02-09T16:42:53.000Z | 2020-03-07T18:47:35.000Z | src/loop.py | migueldingli1997/PySnake | b9b7e98651b207f7bf846cd951b4bb4ee3bba426 | [
"Apache-2.0"
] | null | null | null | import pygame as pg
from pygame.time import Clock
from src.drawer import Drawer
from src.game import Game
from src.utils.config import Config
from src.utils.score import ScoresList
from src.utils.sfx import SfxHolder
from src.utils.text import Text
from src.utils.util import Util, user_quit
| 35.166667 | 78 | 0.529226 |
b15a0f38860998844631ced61f5490b9a9898c55 | 7,135 | py | Python | tests/test_detectCompileCommand.py | langrind/ccjtools | 6f92d8cadf24d6e1f26e984df3c11b4d58061053 | [
"MIT"
] | null | null | null | tests/test_detectCompileCommand.py | langrind/ccjtools | 6f92d8cadf24d6e1f26e984df3c11b4d58061053 | [
"MIT"
] | null | null | null | tests/test_detectCompileCommand.py | langrind/ccjtools | 6f92d8cadf24d6e1f26e984df3c11b4d58061053 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from ccjtools import ccj_make
def test_detectExactSpecifiedCompilerCommandWord():
"""Using -c option, check that the exact word is recognized"""
inputFileName = 'dummy'
parsedArgs = ccj_make.mkccj_parse_args(['progname', inputFileName, '-c', 'mastadon'])
if not parsedArgs:
... | 62.043478 | 1,789 | 0.737211 |
b15a35bd4f1abd5ba27c131e3166d2cc71012e7c | 748 | py | Python | Medium/valid-ip-addresses.py | SaumyaRai2010/algoexpert-data-structures-algorithms | bcafd8d7798661bf86c2d6234221d764c68fc19f | [
"MIT"
] | 152 | 2021-07-15T02:56:17.000Z | 2022-03-31T08:59:52.000Z | Medium/valid-ip-addresses.py | deepakgarg08/algoexpert-data-structures-algorithms | 2264802bce971e842c616b1eaf9238639d73915f | [
"MIT"
] | 2 | 2021-07-18T22:01:28.000Z | 2022-02-17T03:55:04.000Z | Medium/valid-ip-addresses.py | deepakgarg08/algoexpert-data-structures-algorithms | 2264802bce971e842c616b1eaf9238639d73915f | [
"MIT"
] | 74 | 2021-07-16T11:55:30.000Z | 2022-03-31T14:48:06.000Z |
# VALID IP ADDRESSES
# O(1) time and space
| 24.933333 | 95 | 0.620321 |
b15acd6c26c6ac380b78b3c4621e284328ee4d9a | 1,999 | py | Python | resnet152/configs.py | LiuHao-THU/frame2d | c2b923aa45bf2e523e281d1bc36c7f3e70f9fb2b | [
"Apache-2.0"
] | 1 | 2020-05-15T03:28:53.000Z | 2020-05-15T03:28:53.000Z | resnet152/configs.py | LiuHao-THU/frame2d | c2b923aa45bf2e523e281d1bc36c7f3e70f9fb2b | [
"Apache-2.0"
] | null | null | null | resnet152/configs.py | LiuHao-THU/frame2d | c2b923aa45bf2e523e281d1bc36c7f3e70f9fb2b | [
"Apache-2.0"
] | null | null | null | """
this .py file contains all the parameters
"""
import os
configs = {}
main_dir = 'frame_vessel/resnet152'
#****************************************read data parameters**************************************
configs['max_angle'] = 20
configs['root_dir'] = 'data'
configs['save_dir'] = 'saved_data'
configs['im... | 39.98 | 101 | 0.561281 |
b15c81d9f33f129ae3eb078cb489fe17c6a3fe71 | 2,707 | py | Python | src/packagedcode/windows.py | Siddhant-K-code/scancode-toolkit | d1e725d3603a8f96c25f7e3f7595c68999b92a67 | [
"Apache-2.0",
"CC-BY-4.0"
] | 1,511 | 2015-07-01T15:29:03.000Z | 2022-03-30T13:40:05.000Z | src/packagedcode/windows.py | Siddhant-K-code/scancode-toolkit | d1e725d3603a8f96c25f7e3f7595c68999b92a67 | [
"Apache-2.0",
"CC-BY-4.0"
] | 2,695 | 2015-07-01T16:01:35.000Z | 2022-03-31T19:17:44.000Z | src/packagedcode/windows.py | Siddhant-K-code/scancode-toolkit | d1e725d3603a8f96c25f7e3f7595c68999b92a67 | [
"Apache-2.0",
"CC-BY-4.0"
] | 540 | 2015-07-01T15:08:19.000Z | 2022-03-31T12:13:11.000Z | #
# Copyright (c) nexB Inc. and others. All rights reserved.
# ScanCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/scancode-toolkit for support or download.
# See https://aboutcode.org for more in... | 27.622449 | 90 | 0.615441 |
b15cd11eeded0e97332a28f0cc409f651b2843ff | 988 | py | Python | day-21/main.py | jmolinski/advent-of-code-2018 | 96bad97d6523bc99d63c86bbff6b13602952a91d | [
"MIT"
] | 2 | 2018-12-16T20:48:52.000Z | 2021-03-28T15:07:51.000Z | day-21/main.py | jmolinski/advent-of-code-2018 | 96bad97d6523bc99d63c86bbff6b13602952a91d | [
"MIT"
] | null | null | null | day-21/main.py | jmolinski/advent-of-code-2018 | 96bad97d6523bc99d63c86bbff6b13602952a91d | [
"MIT"
] | 1 | 2018-12-02T13:36:24.000Z | 2018-12-02T13:36:24.000Z | # decompiled-by-hand & optimized
# definitely not gonna refactor this one
# 0.18s on pypy3
ip_reg = 4
reg = [0, 0, 0, 0, 0, 0]
i = 0
seen = set()
lst = []
while True:
i += 1
break_true = False
while True:
if break_true:
if i == 1:
print("1)", reg[1])
if reg[1... | 22.976744 | 62 | 0.403846 |
b15ea12d5029680389c91718e2950c1e519b15d4 | 1,247 | py | Python | website/canvas/funnels.py | bopopescu/drawquest-web | 8d8f9149b6efeb65202809a5f8916386f58a1b3b | [
"BSD-3-Clause"
] | 61 | 2015-11-10T17:13:46.000Z | 2021-08-06T17:58:30.000Z | website/canvas/funnels.py | bopopescu/drawquest-web | 8d8f9149b6efeb65202809a5f8916386f58a1b3b | [
"BSD-3-Clause"
] | 13 | 2015-11-11T07:49:41.000Z | 2021-06-09T03:45:31.000Z | website/canvas/funnels.py | bopopescu/drawquest-web | 8d8f9149b6efeb65202809a5f8916386f58a1b3b | [
"BSD-3-Clause"
] | 18 | 2015-11-11T04:50:04.000Z | 2021-08-20T00:57:11.000Z | from django.conf import settings
from canvas.metrics import Metrics
def _setup_funnels():
by_name = {}
for name, steps in Funnels.names:
funnel = Funnel(name, steps)
setattr(Funnels, name, funnel)
by_name[name] = funnel
Funnels.by_name = by_name
_setup_funnels()
| 25.979167 | 57 | 0.565357 |
b1612586b6458c702c53a9e35ab3d78b199a5137 | 3,948 | py | Python | hopfield.py | mstruijs/neural-demos | 2be157bbac4b42c008190745bb3ee75a278d7e34 | [
"MIT"
] | null | null | null | hopfield.py | mstruijs/neural-demos | 2be157bbac4b42c008190745bb3ee75a278d7e34 | [
"MIT"
] | null | null | null | hopfield.py | mstruijs/neural-demos | 2be157bbac4b42c008190745bb3ee75a278d7e34 | [
"MIT"
] | null | null | null | import numpy as np
from neupy import algorithms,plots
import matplotlib.pyplot as plt
from neupy.utils import format_data
from neupy.algorithms.memory.utils import bin2sign,step_function
import argparse
dhnet = algorithms.DiscreteHopfieldNetwork(mode='async', check_limit=False)
iteration = 0
output_data = None
n_featu... | 27.608392 | 87 | 0.719352 |
b161578913391598cf5bd530a5ec301a0546f6e8 | 686 | py | Python | client/fig_client.py | haihala/fig | 426e2ee218c8a55e6389ace497a7f365425daae1 | [
"MIT"
] | null | null | null | client/fig_client.py | haihala/fig | 426e2ee218c8a55e6389ace497a7f365425daae1 | [
"MIT"
] | null | null | null | client/fig_client.py | haihala/fig | 426e2ee218c8a55e6389ace497a7f365425daae1 | [
"MIT"
] | null | null | null | from init import conf_parse, socket_init
from sock_ops import pull_sync, push_sync
from fs_ops import construct_tree, differences
from debug import debug_print
import time
if __name__ == "__main__":
main() | 21.4375 | 46 | 0.740525 |
b161de6456d6f8b14c33e69247fe9c0fa8b2fa93 | 23,850 | py | Python | TicTacToe2.py | tlively/N-TicTacToe | db1143e2e94012451ba590952670452431814b7b | [
"MIT"
] | 6 | 2017-10-03T13:37:54.000Z | 2020-12-21T07:34:01.000Z | TicTacToe2.py | tlively/N-TicTacToe | db1143e2e94012451ba590952670452431814b7b | [
"MIT"
] | null | null | null | TicTacToe2.py | tlively/N-TicTacToe | db1143e2e94012451ba590952670452431814b7b | [
"MIT"
] | 4 | 2017-07-04T18:53:52.000Z | 2021-03-24T03:15:07.000Z | # N-Dimensional Tic-Tac-Toe by Thomas Lively
from __future__ import division
import curses, curses.ascii, sys
# logical representation of the n-dimensional board as a single list
# A view for the model. Other views might use Curses or a graphics library
# serves as a "Main" class and controls user interfa... | 38.405797 | 94 | 0.512704 |
b161fd74a00848098e638db57b29a16c1340bf14 | 854 | py | Python | platform-tools/systrace/catapult/devil/devil/utils/run_tests_helper.py | NBPS-Robotics/FTC-Code-Team-9987---2022 | 180538f3ebd234635fa88f96ae7cf7441df6a246 | [
"MIT"
] | 1,894 | 2015-04-17T18:29:53.000Z | 2022-03-28T22:41:06.000Z | platform-tools/systrace/catapult/devil/devil/utils/run_tests_helper.py | NBPS-Robotics/FTC-Code-Team-9987---2022 | 180538f3ebd234635fa88f96ae7cf7441df6a246 | [
"MIT"
] | 4,640 | 2015-07-08T16:19:08.000Z | 2019-12-02T15:01:27.000Z | platform-tools/systrace/catapult/devil/devil/utils/run_tests_helper.py | NBPS-Robotics/FTC-Code-Team-9987---2022 | 180538f3ebd234635fa88f96ae7cf7441df6a246 | [
"MIT"
] | 698 | 2015-06-02T19:18:35.000Z | 2022-03-29T16:57:15.000Z | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Helper functions common to native, java and host-driven test runners."""
import collections
import logging
from devil.utils import logging_common
Cu... | 31.62963 | 75 | 0.725995 |
b1623f67cebbb4df1eda133e8176caaaf6a0be46 | 4,819 | py | Python | src/classical_ml/pca.py | Jagriti-dixit/CS229_Project_Final | 16fdb55086411dee17153e88b2499c378cdfc096 | [
"MIT"
] | null | null | null | src/classical_ml/pca.py | Jagriti-dixit/CS229_Project_Final | 16fdb55086411dee17153e88b2499c378cdfc096 | [
"MIT"
] | null | null | null | src/classical_ml/pca.py | Jagriti-dixit/CS229_Project_Final | 16fdb55086411dee17153e88b2499c378cdfc096 | [
"MIT"
] | null | null | null | import sys
import time
from comet_ml import Experiment
import pydub
import numpy as np
from pydub import AudioSegment
import librosa
import librosa.display
import matplotlib.pyplot as plt
import sklearn
from sklearn import preprocessing
from sklearn.preprocessing import MinMaxScaler
from sklearn.preprocessing import St... | 31.496732 | 97 | 0.775265 |
b16413494678ee579844f16a2bea9f231ef05803 | 1,601 | py | Python | API/application.py | XuhuaHuang/LearnPython | eb39f11147716193971dd5a8894e675daa1b9d01 | [
"MIT"
] | null | null | null | API/application.py | XuhuaHuang/LearnPython | eb39f11147716193971dd5a8894e675daa1b9d01 | [
"MIT"
] | null | null | null | API/application.py | XuhuaHuang/LearnPython | eb39f11147716193971dd5a8894e675daa1b9d01 | [
"MIT"
] | null | null | null | from flask import Flask, jsonify, request
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///data.db'
db = SQLAlchemy(app)
| 28.589286 | 85 | 0.66396 |
b165edb3b3722f2964b765aab8fe578c7cc4aee1 | 2,199 | py | Python | examples/mass-generation.py | Orange-OpenSource/tinypyki | 10c57fb3a4413f4c601baaf58e53d92fd4a09f49 | [
"BSD-3-Clause"
] | 1 | 2018-05-29T22:50:33.000Z | 2018-05-29T22:50:33.000Z | examples/mass-generation.py | Orange-OpenSource/tinypyki | 10c57fb3a4413f4c601baaf58e53d92fd4a09f49 | [
"BSD-3-Clause"
] | null | null | null | examples/mass-generation.py | Orange-OpenSource/tinypyki | 10c57fb3a4413f4c601baaf58e53d92fd4a09f49 | [
"BSD-3-Clause"
] | 2 | 2016-11-01T11:45:28.000Z | 2021-06-22T10:18:46.000Z | #!/usr/bin/env python
"""A third example to get started with tinypyki.
Toying with mass certificate generation.
"""
import os
import tinypyki as tiny
print("Creating a pki instance named \"mass-pki\"")
pki = tiny.PKI("mass-pki")
print("Create the \"root-ca\"")
root_ca = tiny.Node(nid = "root-ca", pathlen = 1, s... | 32.820896 | 171 | 0.703502 |
b1667d176dd7399e7e7f6c6217ae79f8d38f3cee | 638 | py | Python | passive_capture/reporter/admin.py | Sillson/passive_capture_py | 167d08865400571c9eed60c0040cf67d27fa11b4 | [
"MIT"
] | null | null | null | passive_capture/reporter/admin.py | Sillson/passive_capture_py | 167d08865400571c9eed60c0040cf67d27fa11b4 | [
"MIT"
] | null | null | null | passive_capture/reporter/admin.py | Sillson/passive_capture_py | 167d08865400571c9eed60c0040cf67d27fa11b4 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.gis import admin as geo_model_admin
from leaflet.admin import LeafletGeoAdmin
from .models import Forecasts, Dam, Species
# Forecast Model
admin.site.register(Forecasts, ForecastsAdmin)
# Species Model
admin.site.register(Species, SpeciesAdmin)
# Dam Model - req... | 26.583333 | 55 | 0.782132 |