blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
283
content_id
stringlengths
40
40
detected_licenses
listlengths
0
91
license_type
stringclasses
2 values
repo_name
stringlengths
3
135
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
68
visit_date
timestamp[ns]date
2015-07-25 20:53:29
2023-09-06 10:46:05
revision_date
timestamp[ns]date
1970-01-01 00:00:00
2037-05-03 13:00:00
committer_date
timestamp[ns]date
1970-01-01 00:00:00
2036-02-09 17:40:36
github_id
int64
1.61k
691M
⌀
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
24 values
gha_event_created_at
timestamp[ns]date
2012-06-03 10:21:33
2023-09-14 21:59:50
⌀
gha_created_at
timestamp[ns]date
2008-03-27 23:40:48
2023-09-13 22:40:33
⌀
gha_language
stringclasses
250 values
src_encoding
stringclasses
27 values
language
stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
6
10M
extension
stringclasses
289 values
filename
stringlengths
1
218
content
stringlengths
6
10M
9d9f309fdaec76e01eb90543f1f5080dbde7cba5
a8b16f1c88c184e1154405a3d0561e4a9e1d83c7
/HW 1/Identification/dist_module.py
8982c9dfa2466d6d4244508f01ba66a825450e56
[]
no_license
dan-trappolini/ADVANCE-MACHINE-LEARNING
32b8c6798318cffc6728a16c0555e0f742956f43
6cd90f131618d74c22cc5955e196bb3888d424f1
refs/heads/main
2023-01-13T02:56:41.763188
2020-11-19T22:27:22
2020-11-19T22:27:22
308,064,457
0
2
null
null
null
null
UTF-8
Python
false
false
2,413
py
dist_module.py
import numpy as np import math # Compute the intersection distance between histograms x and y # Return 1 - hist_intersection, so smaller values correspond to more similar histograms # Check that the distance range in [0,1] def dist_intersect(x,y): # First part of the formula is sum(minimum(x_i, y_i)) for eac...
982e648c257c995e993973b5c85dff2ab9a9dc54
9384e00e1d701c477160ea96f859429b918c84dc
/leetcode/142_环形链表2.py
18b0ed0e3ee8a43dce8e0cd5d2a12724939150c1
[]
no_license
tenqaz/crazy_arithmetic
dfc79b95f35af0f9e449f53e7c7bfac3cb6c080a
c0dd577481b46129d950354d567d332a4d091137
refs/heads/master
2023-07-20T17:25:57.014785
2023-07-16T17:07:55
2023-07-16T17:07:55
225,174,173
0
0
null
null
null
null
UTF-8
Python
false
false
1,082
py
142_环形链表2.py
# -*- coding: utf-8 -*- """ @author: Jim @project: crazy_arithmetic @time: 2019/12/5 10:23 @desc: 获取探测环相交节点 """ from __future__ import annotations class ListNode(object): """ 链表节点 """ def __init__(self, x): self.val = x self.next = None class Solution(object): def de...
935351bd51cf3d78d8e4a6d23e4a88ab585f1252
972638bb14075e6050a0d49e47581ba796b53a7d
/dolfyn/rotate/awac.py
efb5fa98b5358c079966168c6453d933aa647ae2
[ "Apache-2.0" ]
permissive
MRE-Code-Hub/dolfyn
080b39ac0f59c052c54d7bb634af86822ec756cd
d807d0188f9e5f11845bc3f9efc7d154f729850a
refs/heads/master
2023-05-05T05:22:26.915404
2021-04-29T18:41:06
2021-04-29T18:41:06
253,632,814
0
0
NOASSERTION
2021-11-10T08:50:51
2020-04-06T22:46:18
Python
UTF-8
Python
false
false
75
py
awac.py
from .vector import inst2earth, earth2principal from .rdi import beam2inst
89948d90de977251562ad9a3c8aecb1a3ef2b7d2
c293cd595a8ea624975915045d82cf5e666a582a
/dipole_surface_roughness/find_surf_atoms.py
4e8df621e6962ca42397d05a0b96c490eb738e47
[]
no_license
scmartin/python_utilities
0a40efcc2699889ac7347e281c77bd9e3f8a00f3
3001af7c74dcf63cf92f645df0cb43b9d809f1d8
refs/heads/master
2022-09-19T12:17:49.717371
2022-09-18T18:55:44
2022-09-18T18:55:44
226,124,983
0
0
null
2021-04-28T21:14:18
2019-12-05T14:49:40
Python
UTF-8
Python
false
false
3,071
py
find_surf_atoms.py
import numpy as np import freud import lammps_reader as lammps import argparse from scipy.spatial import Delaunay, distance import matplotlib.pyplot as plt parser = argparse.ArgumentParser(description="Analyze a LAMMPS snapshot to find surface atoms.") parser.add_argument('-f','--file',type=str, required=True) parser....
c3c28b0f4ac013c3b5e3811dd9322941941e65af
1cd8a33f4b8209e857b59ff1175f769fc89fb7d2
/blog/models.py
0c6089f4690a5274c66a3f47aafe26e6fe1a0a85
[]
no_license
MahfuzKhandaker/personal_website
a9543037fae1e2777ad611c53af986e7b5d7949b
daba056ce52cd3126e0e33176f5c06abc99e443c
refs/heads/master
2022-12-21T06:32:03.631728
2020-06-13T17:03:35
2020-06-13T17:03:35
250,972,087
0
0
null
null
null
null
UTF-8
Python
false
false
3,955
py
models.py
from django.db import models from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.conf import settings from django.urls import reverse from django.db.models.signals import pre_save from blog.utils import get_read_time from django....
3a8f0352a59ea73951d976f02fb0fa57660f4900
eb87c8b1ce8591d207643d3924b7939228f1a4fe
/conformance_suite/test_typed_swap_nested_2.py
d5c61d25ccd9d547e1507f0659f7772a59d3f92e
[]
no_license
brownplt/insta-model
06543b43dde89913c219d476ced0f51a439add7b
85e2c794ec4b1befa19ecb85f2c8d2509ec8cf42
refs/heads/main
2023-08-30T19:06:58.083150
2023-05-03T18:53:58
2023-05-10T22:29:18
387,500,638
5
0
null
2022-04-23T23:06:52
2021-07-19T14:53:09
Racket
UTF-8
Python
false
false
511
py
test_typed_swap_nested_2.py
# test_typed_swap_nested_2.py # This should pass. def test(a): x: int y: str z: str ((x, y), z) = (1, a), 'foo' # def test_typed_swap_nested_2(self): # codestr = """ # def test(a): # x: int # y: str # z: str # ((x, y), z) = (1, a), 'foo' # ...
d536b311912d78ab30677b2303485c259cdef1c1
86e0f12d789a23768fb21a5c6f5540ac351fadcb
/unused/misc/benchmark/gpuVScpu.py
4b9076ad769d897897bf70caa04751e458df7943
[]
no_license
byq-luo/bosch
3b83d9cf00c6f87e81d2a20ddd404cf4ea3b712d
c5e63e40e050ce2fa1eb23c3a8beff7a69b36c89
refs/heads/master
2022-04-26T03:31:02.197892
2020-04-23T01:37:21
2020-04-23T01:37:21
null
0
0
null
null
null
null
UTF-8
Python
false
false
734
py
gpuVScpu.py
from tqdm import tqdm import time from Video import Video #### How much faster is gpu processing vs cpu processing? #### # Times to process an 11 second clip from the dataset # Detectron | YOLO # GPU 01:45 | 00:22 # CPU 1:00:00 | 12:00 # # in terms of fps reported by tqmd # Detectron | YOLO # GPU ...
157fae56472c03322527f8d2e3b62ce53dec8cc3
005b9d67aa14a374d03897f83282d2dcbb37f828
/pycon/simple/exceptions.py
ee9cd9e9120cbe919211dc1dfa53e20844396e2f
[]
no_license
devangmehta123/pycon-uk-2019
6e1e7da419ba3b8ec2518889ceea607cddb419ec
526dbbfeee321fbcaca63f501cbc78a992ee3af6
refs/heads/master
2020-07-02T19:21:30.345746
2019-09-14T09:11:13
2019-09-14T09:11:13
201,636,416
0
0
null
null
null
null
UTF-8
Python
false
false
1,690
py
exceptions.py
from rest_framework import exceptions class APIGeneralException(exceptions.APIException): pass class APIValidationException(exceptions.APIException): serializer = None valid = False class APIException(exceptions.APIException): """ General exception for our API """ error_code = None ...
5e6700f0024a72eb59b51b043b3c924ce93f76fd
e78427d46943e746cb56f9675112319ecf58d0f0
/heap.py
8f64a41b3c048d36943c170e085ebc96393ab500
[]
no_license
Jiongxiao/Algorithm_Practice
fbc40657defc5130f6eb8803dfb5ff20a4d216f4
36b1a0992116863707741ebdb7af987119518587
refs/heads/master
2021-05-04T10:14:50.497482
2016-08-15T13:20:09
2016-08-15T13:20:09
49,481,558
0
0
null
null
null
null
UTF-8
Python
false
false
1,550
py
heap.py
class PriorityQueue: """Heap-based priority queue implementation.""" def __init__(self): """initially empty priority queue.""" self.queue=[None] def append(self,key): if key is None: raise ValueError('Cannot insert None in the queue') i=self.size() ...
fee6ac729ed478abf9cd1a96f620242504b9b8ff
bcf3898719f526a8de92974ff8081f5354236217
/folder_size.py
1e8b3438e427f56250e6f21a3c31cfe5a667e4ef
[]
no_license
Cosine42/Folder-Size-Calculator
fb1ae4067cb50b0fa81988dbc20d40262bec9b34
bbff212bfb956f9fe463d0c821fe5b24627799be
refs/heads/master
2022-07-14T22:46:06.792476
2020-05-17T08:16:38
2020-05-17T08:16:38
264,613,476
0
0
null
null
null
null
UTF-8
Python
false
false
284
py
folder_size.py
import os # folder whose size is to be calculated print("Enter folder path") path = os.path.abspath(input()) total=0 for folder, subfolders, files in os.walk(path): for file in files: total += os.stat(os.path.join( folder,file )).st_size print(str(total)+' bytes')
0fce31e26d028b14a77fae8cd5336f63fd2d2766
7da5cb2f473e2c289e12770cc55186791e419554
/student/models.py
2ca117764b8b2c2b5dcf4699197d4698df166f97
[]
no_license
edithjepletingketer/djangoStudent
8b7f33967f8f2c76636bd5d2105781fccf520d6a
fe060f7e0506aa53d2719556fd48316fc8a94e0c
refs/heads/master
2020-05-28T00:48:31.245349
2019-05-27T12:17:13
2019-05-27T12:17:13
188,835,705
0
0
null
null
null
null
UTF-8
Python
false
false
537
py
models.py
from django.db import models # Create your models here. class Students(models.Model): first_name=models.CharField(max_length=50) last_name=models.CharField(max_length=50) date_of_birth=models.DateField() registeration_number=models.CharField(max_length=50) place_of_residence=models.CharField(max_length=50...
a9e0516b39009267e6d8d6458dc13fb65a687284
74b416e92a3da8bc7308ab2cc4b20e7b8a006e58
/src/spotify/model/song.py
81345d60a83dd1728522599d545ab720cf6e86ad
[ "MIT" ]
permissive
awersching/spotify-backup
2dabdf6ceea599983cae2817b1c89e61b9268024
ddf24092f66e1040971baa08062836e21f9546b3
refs/heads/master
2021-06-05T19:42:51.453532
2019-10-22T07:53:25
2019-10-22T07:53:25
149,810,564
1
0
MIT
2021-06-01T23:08:49
2018-09-21T19:48:19
Python
UTF-8
Python
false
false
417
py
song.py
class Song: def __init__(self, json): # playlist tracks not queryable over API if not json: raise LookupError self.name = json['name'] self.artists = list(map(lambda artist: artist['name'], json['artists'])) self.album = json['album']['name'] def __str__(se...
f559ccac40d5ba621a39ce32da851abd711b223c
3d95af817d4cb3390dac41efd9e1173732394f34
/zdo2021/main.py
4a15b359ff7103a32d42ef15000756deba6e93ca
[ "MIT" ]
permissive
JiriVales/zdo2021-vales
04693fdcdb8585adac1be8ad7043f41d90c65ef7
8cf22097d926b42814b4d366dfe49f1de70093a7
refs/heads/main
2023-05-28T14:57:31.962029
2021-06-09T12:48:27
2021-06-09T12:48:27
371,068,098
1
0
null
null
null
null
UTF-8
Python
false
false
4,489
py
main.py
import numpy as np import skimage from skimage import data from skimage.morphology import label from skimage.color import rgb2gray from skimage import data from skimage.filters import gaussian from skimage.segmentation import active_contour import skimage.segmentation import scipy import numpy as np import scipy from s...
b583faf45be5cb7da6202e13def5f68a2f0f4ef3
ffbb69f3b623886df0c38455d4ae4759beeea107
/test.py
a4365dc5940d940a4da709bf55e648360cc552b3
[]
no_license
adam-weiler/GA-OOP-Class-Methods-and-Class-Variables-Book-Lending
2b874f50f773359b2d71b1b848a238cffbba0a13
d346f15c5e58adcac08ce4887e5e15dc4e0a253b
refs/heads/master
2020-06-21T13:21:19.718854
2019-07-21T21:20:57
2019-07-21T21:20:57
197,464,348
0
0
null
null
null
null
UTF-8
Python
false
false
1,924
py
test.py
from Book import * print('Adding new books to the library:') sister_outsider = Book.create('Sister Outsider', 'Audre Lorde', '9781515905431', 'Nonfiction') aint_i = Book.create('Ain\'t I a Woman?', 'Bell Hooks', '9780896081307', 'Nonfiction') if_they_come = Book.create('If They Come in the Morning', 'Angela Y. Davis',...
27bbc44e5b76aee7cae721f7ff5506d9a0d33a39
bdec4b918f22353d35c5ba8c70d1c4d0c2fd9923
/models/basic_model.py
7c3de700c00da647e0aa440548db441c214e27f0
[]
no_license
ctorresmx/tensorflow-mnist-v2
82ca5672d9a45b1c07c2a8ae2a6477e122180710
c18f2be777ff6d9e07a2e6d6a92bd3de3b40f9eb
refs/heads/master
2021-05-06T18:39:31.355131
2017-12-10T20:35:27
2017-12-10T20:35:27
112,035,373
0
0
null
null
null
null
UTF-8
Python
false
false
346
py
basic_model.py
import tensorflow as tf class BasicModel: def infer(self, input, train): raise NotImplementedError() def cost(self, logits, labels): raise NotImplementedError() def optimize(self, cost, learning_rate): raise NotImplementedError() def evaluate(self, logits, labels): ra...
df3a16f3b85d0d363fade7724463c8a7577e7a47
8f50c262f89d3dc4f15f2f67eb76e686b8f808f5
/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py
b60f1b83b9fea7c282242895b9822829884758ff
[ "Apache-2.0" ]
permissive
strigazi/athena
2d099e6aab4a94ab8b636ae681736da4e13ac5c9
354f92551294f7be678aebcd7b9d67d2c4448176
refs/heads/master
2022-12-09T02:05:30.632208
2020-09-03T14:03:18
2020-09-03T14:03:18
292,587,480
0
1
null
null
null
null
UTF-8
Python
false
false
1,510
py
testChainDictMaker.py
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration """Make chain dicts for testing jet hypo config modules""" from __future__ import print_function from TriggerMenuMT.HLTMenuConfig.Menu.Physics_pp_run3_v1 import ( SingleJetGroup, MultiJetGroup) from TriggerMenuMT.HLTMenuConfig....
b22e10d9823f8557c6fd14af1face1ea5e67bea6
31f1a589c4e7ae63c2a555f08c24422b7a8cb1a5
/my_site/Demo/wdtest.py
eb76d508e4f3bf2e31ba87e3b3fd7b8909cda551
[]
no_license
CaramelYo/SentimentAnalysis
455f0c1a6199e2cd4954135bc8d12908a3188e14
93f15d5ac61e6d80fc882b4695b607d6d9528a82
refs/heads/master
2021-01-04T02:42:16.182510
2017-01-17T04:29:05
2017-01-17T04:29:05
76,097,368
1
0
null
null
null
null
UTF-8
Python
false
false
108
py
wdtest.py
import wdcloud as wd wd.word_cloud(q = 'Trump', number = 1000, since = '2017-01-13', until = '2017-01-14')
1861e1ed166f7f6d31c4b3a6169e46413636c1b5
9433ec7afbb22998f3e74be5f8f8ddbc2d98d6e8
/client.py
8cea1779bebd068f94f69f1b88fd69528ae41e79
[]
no_license
escs34/ml_client_cluster
2a7de1313b84db4f2de8dd2ee3698b957e8e0c1b
42cc330ff2ca8140682d3b3b17d6780a23c923dc
refs/heads/main
2023-03-18T05:40:59.752301
2021-03-17T04:53:51
2021-03-17T04:53:51
340,218,620
0
0
null
null
null
null
UTF-8
Python
false
false
1,555
py
client.py
#server : ec2-cluster from socket import * import numpy as np import json import time import ast port = 9999 #global serverSock serverSock = socket(AF_INET, SOCK_STREAM) #for port already used error serverSock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) serverSock.bind(('0.0.0.0', port)) #(host, port) serverSock....
2493a1b94935aa2e64fd33e5f61daab458c551fc
5f309cf8d0dda65cbe76f79f78cedddd548e1130
/lambda_functions/v1/tests/other/test_helpers.py
e11e3b0c997348a119b859679d575e3b20e059ef
[]
no_license
uk-gov-mirror/ministryofjustice.opg-data-lpa-codes
70b5d9d6149f5d143a666bd732ad232909685689
4c833b0dd1f4c68834d3d416e9d59f334ca7296f
refs/heads/master
2023-04-09T07:43:55.800778
2021-03-10T11:41:14
2021-03-10T11:41:14
356,784,391
0
0
null
null
null
null
UTF-8
Python
false
false
1,262
py
test_helpers.py
from lambda_functions.v1.functions.lpa_codes.app.api.helpers import ( date_formatter, calculate_expiry_date, custom_logger, ) import datetime def test_date_formatter(): test_date = datetime.datetime( year=2020, month=5, day=26, hour=10, minute=0, second=...
e67accfbed82f2df3465eedc611df732b34dd26c
8b4f8f67b3836ec7ca71342d37cc210e117ce725
/ray_tune.py
ade0158f223ac970f0dad5d19a492f84886413cb
[]
no_license
xiaohanhan1019/CAN
b82328c2860e651e123fb5595d1b90fbcdc01855
cec46c04a14c65c292c9f4a2d7b4d2650a3c77b0
refs/heads/master
2023-06-06T02:22:02.501676
2021-06-28T06:25:10
2021-06-28T06:25:10
380,927,801
2
0
null
null
null
null
UTF-8
Python
false
false
1,401
py
ray_tune.py
from ray import tune from ray.tune.schedulers import ASHAScheduler from ray.tune import CLIReporter import ray import torch from utils.path import ROOT_DIR from utils.tune_configs import get_tune_config from trainer import trainer import os def get_metric_columns(metrics): metric_columns = [] for k in metr...
5216e91889e6e00f8aed1b3ad0f1af35544e3a24
c2af1cecf1150ccbe4faddb39bb1906aab5c5859
/eyes.py
2a8e752b5cc921bbdeb71561d0bae5a2acaf322a
[]
no_license
MAINAK007-YO/HEALTHY-PROGRAMMER
5f2ae99724d79820f92412853620a17fdc7c0093
c5677332d92a6eb318ef2c6dc6620604e88a1dae
refs/heads/main
2023-04-01T22:53:36.973274
2021-04-09T16:03:28
2021-04-09T16:03:28
356,326,154
0
0
null
null
null
null
UTF-8
Python
false
false
346
py
eyes.py
from gtts import gTTS from playsound import playsound def play_audio(play_audio): playsound(play_audio) def convert_to_audio(text): my_audio=gTTS(text) my_audio.save('hello.mp3') play_audio('hello.mp3') convert_to_audio("hey mainak now this is the time to take a eye exercise break, hurry up ma...
5066053729c4bebe9b88c0bc9c2e47934749c789
e71833fb4bbf157e05e761233fcbf31673b8e465
/datxchain/tutorials/datx-bios-tutorial/delete_account.py
ce6f577a5297ae03ea19228b108eaea9d4f86492
[ "MIT" ]
permissive
DATx-Protocol/DATx
0cf7f34ea8f2e7879d4aa83151b0c3a6d8612975
b2bc2b45d584036669900bd1728ec10701113d66
refs/heads/master
2021-06-04T19:09:13.279652
2019-01-05T08:31:47
2019-01-05T08:31:47
129,366,622
11
5
null
2018-11-09T13:53:12
2018-04-13T07:37:09
C++
UTF-8
Python
false
false
208
py
delete_account.py
import json with open('accounts.json','r') as f: a = json.load(f) del a['users'][10:] # 4 del a['producers'][5:] # 5 with open('new_accounts.json','w') as f: json.dump(a,f)
b99224a9d00639fe96f1f1f47723c30a9e33321d
2dbd0f8cfb74656b10886d4feb266d957c35a8ed
/Gun_5/ornek_sayiyi_yaziya_cevir_2.py
a0d7c82df481cc9685580e61916397e10196fe4d
[]
no_license
kadirturan0/PythonKampi
ae38843e3d128796398717c841f86d0f1dd4ea6a
b44105d6d95c5a0b6117311022db49db7893d99b
refs/heads/master
2020-03-23T15:04:29.233145
2018-08-03T16:05:41
2018-08-03T16:05:41
141,720,646
0
0
null
null
null
null
UTF-8
Python
false
false
482
py
ornek_sayiyi_yaziya_cevir_2.py
birler = ["sıfır","bir","iki","üç","dört","beş","altı","yedi","sekiz","dokuz"] onlar = ["on","yirmi","otuz","kırk","elli","altmış","yetmiş","seksen","doksan"] sayi = "123" sayi = sayi[::-1] okunus = [] okunus.append(birler[int(sayi[0])]) if len(sayi) >= 2: okunus.append(onlar[int(sayi[1])]) if len(sayi) >= 3: ...
8b74e109425422e503265dade800c8c8ee0963e4
9aaed9124be9e544ca0b7d5626caddd54652c126
/pymunk_scripts/segment.py
eceaeac14f4c257d3709fa41ce2e1147016e8c01
[]
no_license
victhepythonista/pygame_n_pymunk
eb9fcd787d7e7af3f3d4ee33ea8a602b023bf2b0
c33fdb8c798fd69985019a92fa73e069b6427d03
refs/heads/main
2023-04-30T20:56:02.644518
2021-04-27T20:53:40
2021-04-27T20:53:40
349,515,247
1
0
null
null
null
null
UTF-8
Python
false
false
82
py
segment.py
import pymunk class MovingSegment: def __init__(self):
e5becd4e42b58a66fced0bd99ad8e596f454de89
f31ce25d68f1d63a0443d0d5cb3d91ef189477e5
/main.py
8c656dbfa24978afb9d9d9ec28c963ef50f5f682
[]
no_license
pierresegonne/funky-attractors
1a767d1e1d31ace2f30d11d0d8b36ecca264b633
ff41e09df46aeead4cfb61cd75734df577cb2eca
refs/heads/main
2023-08-26T23:46:20.889528
2021-11-06T23:20:20
2021-11-06T23:20:20
345,453,827
2
1
null
null
null
null
UTF-8
Python
false
false
2,521
py
main.py
import argparse from warnings import warn import numpy as np import pandas as pd from attractors import Attractors, trajectory_steps from plot import plot_2d_attractor, plot_3d_attractor def main(attractor, args: argparse.Namespace) -> None: assert args.attractor in [a.value.name for a in Attractors] # Gene...
2fdac88430608c70095e13230c50f2a2c244ec5e
db12b990924703cd74748d8585cd9c11fafa6746
/h2o-py/tests/testdir_misc/pyunit_factoring.py
b2a1bb044109803d131262857f2cf8b4594d3fa9
[ "Apache-2.0" ]
permissive
h2oai/h2o-3
919019a8f297eec676011a9cfd2cc2d97891ce14
d817ab90c8c47f6787604a0b9639b66234158228
refs/heads/master
2023-08-17T18:50:17.732191
2023-08-17T16:44:42
2023-08-17T16:44:42
17,371,412
6,872
2,345
Apache-2.0
2023-09-14T18:05:40
2014-03-03T16:08:07
Jupyter Notebook
UTF-8
Python
false
false
2,221
py
pyunit_factoring.py
from builtins import zip import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils from h2o import H2OFrame from h2o.exceptions import H2OTypeError, H2OValueError def compare_frames(expected, actual): assert actual.shape == expected.shape assert actual.columns == expected.columns, "Colum...
c5b012f687c3bb2180142b44c52b74e69d12750e
74f53222dcbbd183b870ee00bfc565d5305a686d
/Project_Euler_006/Project_Euler_6.py
955797cdf4743d8a22f354924cbc71c0efb757ef
[]
no_license
Obj-V/Project-Euler
6c1afafab3c9d5dd772eb3298095750ddd68d139
eaed73ec4c82ec672ee134c763d910f6796aaad8
refs/heads/master
2021-06-02T09:34:36.985515
2016-08-21T04:17:04
2016-08-21T04:17:04
44,230,384
0
0
null
null
null
null
UTF-8
Python
false
false
773
py
Project_Euler_6.py
#Project_Euler_6.py #Virata Yindeeyoungyeon """ The sum of the squares of the first ten natural numbers is, 12 + 22 + ... + 102 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + 10)2 = 552 = 3025 Hence the difference between the sum of the squares of the first ten natural numbers and th...
0265b0fcc8f296b2260e5bd80afa4e70f742bacd
6e7419db51c9240e26e84c3d7d58f8565ac52f82
/GenBankToLib/genbank.py
95369e81d3d5e9f33d4873423fae812b32e72512
[ "MIT" ]
permissive
linsalrob/genbank_to
95f8f0fb12e8860594a25f8c305a09f89fe4a269
fb951ef922e907bc0b9485d3f3cdd8786e23db3d
refs/heads/main
2023-08-04T02:08:27.740852
2023-07-22T10:48:55
2023-07-22T10:48:55
481,464,683
6
1
null
null
null
null
UTF-8
Python
false
false
13,196
py
genbank.py
""" Read a genbank file and do things with it! """ from typing import Any import sys import re import binascii import gzip from Bio import SeqIO from BCBio import GFF # bcbio-gff package import pandas as pd from io import StringIO import logging __author__ = 'Rob Edwards' __copyright__ = 'Copyright 2...
d379b00f162720f1e691e5247c6b48e8f89f6e39
67a9e9c86a233d101efa9f2b786f2ebad881e92a
/interpolate.py
3f2efa9d6febc2d4f864718d0421698f3bb3c38a
[]
no_license
phamanhtai0410/Interpolating_Python
1aaeb2c35b220aaabc5a1c44d47fd56dbf2c46b7
a01d58616c5f0586c74960c8c2bc7c91b452fd86
refs/heads/master
2022-11-23T17:22:11.658564
2020-07-28T17:04:08
2020-07-28T17:04:08
282,849,293
0
0
null
null
null
null
UTF-8
Python
false
false
8,904
py
interpolate.py
import numpy as np import math import time # import tkinter as tk class coordinates_3D: def __init__(self, x, y, z): self.x = x self.y = y self.z = z # def __del__(self): # del self.x, self.y, self.z class coordinates_2D: def __init__(self, x, y): self.x = x self.y = y # def __del__...
ced0cc0509d44c56540526114607b424b5807b50
6ce29dae54a967f080a1858110ad52bd2003aeb3
/brainImaging/mri/fmri/qc/mriqc/compile_mriqc_outputs.py
ce3570581bcf0e63cd589e6fe61842be28bf2462
[]
no_license
daelsaid/scsnlScripts
d9299cd175ca874c17935a3bfcd90cd3264c05e4
026634e00f3643740e9153fb93797785301b4ccb
refs/heads/master
2020-05-02T22:52:21.780069
2019-04-29T23:29:37
2019-04-29T23:29:37
178,264,889
0
0
null
2019-03-28T18:55:44
2019-03-28T18:55:44
null
UTF-8
Python
false
false
3,196
py
compile_mriqc_outputs.py
''' This script takes as input the path to a folder full of html reports outputed from mriqc. It pulls all the quantitative data from those reports and compiles them into a csv "compiled_mriqc_data.csv" which it places in the same fodler as the report. To Run: source activate python compile_mriqc_outputs.py /full/path...
f5ba2e60460d78f47a58ac2e954d919805cd7782
2c296f525308ee2f7e1205b6b7eb392c53bbc14d
/pyamg/relaxation/utils.py
2352cc7329099e9572c047c74b82c77b39831369
[ "MIT" ]
permissive
pyamg/pyamg
939f2b73153518f482401c1b2363e1abed880b4d
4f604ef7d7765dc8c20f643650bf60bcc3c7207c
refs/heads/main
2023-09-01T07:10:42.995125
2023-07-18T13:35:08
2023-07-18T13:47:34
10,866,320
466
125
MIT
2023-07-18T13:47:35
2013-06-22T14:24:24
Python
UTF-8
Python
false
false
2,669
py
utils.py
"""Relaxation-centric utilities.""" import numpy as np from scipy.sparse.linalg import LinearOperator from ..multilevel import MultilevelSolver from .. import relaxation def relaxation_as_linear_operator(method, A, b): """Create a linear operator that applies a relaxation method to a right-hand-side. Parame...
73e35df76f19b20fc24fc1dc3a7e16f234a015bf
640e8cc5ee98bbd7d383ddeb8a523afcfe64d731
/extract.py
c54075a7306f2267ec21fa0a538443276f19abb5
[ "MIT" ]
permissive
learningequality/sushi-chef-better-world-ed
9fa59096ba48d66399ea90c576350a23f74314cb
dd2757324b5dd965910409fb85f7ab87a947a975
refs/heads/master
2022-04-09T22:17:16.916014
2020-03-25T13:53:38
2020-03-25T13:53:38
105,912,729
1
3
MIT
2019-02-22T21:50:36
2017-10-05T16:19:16
Python
UTF-8
Python
false
false
3,167
py
extract.py
#!/usr/bin/env python import csv import pickle import os.path from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request # Creds CLIENT_SECRET_FILE = 'credentials/client_secret.json' # server application -- this will request ...
8ca00e22a89a3b9086a567b847fded82208eb783
8c1e65850d715bd49de8799f38e9730b942d5752
/pyiso/ercot.py
446e898cba8844efefcab67f87e3ebfbfcc436a8
[ "Apache-2.0" ]
permissive
egeriicw/pyiso
9198c71538ee131184ff9847a3b6b618f46be5f9
ca88573f966e21cabdb01302ba2f1370b3cb2660
refs/heads/master
2021-01-16T21:13:04.758729
2014-07-04T21:39:00
2014-07-04T21:39:00
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,952
py
ercot.py
from datetime import timedelta import copy from bs4 import BeautifulSoup from pyiso.base import BaseClient class ERCOTClient(BaseClient): NAME = 'ERCOT' base_report_url = 'http://mis.ercot.com' report_type_ids = { 'wind_5min': '13071', 'wind_hrly': '13028', 'gen_hrly':...
153644e7792a6915f98a7d53266e69337e324934
e6ea2c3dda3e5f8f2e4a279a7c8d27c41b71bad2
/unseal/vault/__main__.py
2b5ba77a5a3e6518d840077c2b016ae1e7f57054
[]
no_license
bbrfkr/docker-vault
0b6ee053880813ae36d677d50254cec6004c13b1
d8d83f77be6ebd64bf6104451d8ab112332aabae
refs/heads/master
2022-04-17T06:12:39.063814
2020-04-19T08:23:42
2020-04-19T08:23:42
256,948,801
1
1
null
null
null
null
UTF-8
Python
false
false
77
py
__main__.py
from vault.init import init from vault.unseal import unseal init() unseal()
71d736dda3766cea7b53a503a8023a9b7f79bb90
4461f05a695ee9de6144022541ad824be93655fb
/IID/reflectance_filtering/networks/networks.py
9f7f841084add953b49033a1d8bcd8aec2659959
[]
no_license
youngminpark2559/ml_cv_p
baeff7b8f6bab1ef4d32477fbc4c469c9e34e165
98ecf02eb34021483ea81a18d560d6c2f537fbe9
refs/heads/master
2020-03-30T15:48:14.425430
2019-06-18T11:54:46
2019-06-18T11:54:46
151,379,682
0
0
null
null
null
null
UTF-8
Python
false
false
2,497
py
networks.py
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.optim import lr_scheduler from torch.autograd import Variable from torch.utils.data import Dataset, DataLoader import torchvision import torchvision.transforms as transforms from torchvision import datasets, models...
dea4709c21bea2631c741cb3d1dcf9734e504ec5
3ecbcb05ff20a2d0df6ddd6772e5fc39e3a49c15
/pi-commute-dashboard/transport/__init__.py
becd34091e1254eca0eceb72022c2fe4639ac1c9
[]
no_license
cjheppell/pi-commute-dashboard
f886d370de7b9b5b9c23e26606ebc707d432ccd8
9e4fd192dcef13b202090a745e62e2fde2bf3909
refs/heads/master
2020-05-21T21:46:23.677292
2019-05-12T17:35:26
2019-05-12T17:35:26
186,160,896
0
0
null
null
null
null
UTF-8
Python
false
false
132
py
__init__.py
from .road_traffic import RoadTraffic from .trains import Trains from .transport_api import TrainStatus from .types import Transport
195b49a314b1e58014277629cffee30deb6c5603
03ff89c04cd325d3f7b4266c59e39011f5b466ba
/head_ogs_vs_gw-model/confined/conf_head_ogs_vs_gw-model.py
abf705d73fb1083480a7c312091f02f4fdb280cf
[]
no_license
timohouben/python_scripts
dabd35a7778fc459beddd5286141d405af32be1c
15c622645725560c6450cd31ff194aa95394bfc9
refs/heads/master
2021-02-03T21:14:29.916525
2020-02-27T15:02:04
2020-02-27T15:02:04
243,537,745
1
0
null
null
null
null
UTF-8
Python
false
false
8,282
py
conf_head_ogs_vs_gw-model.py
#!/usr/bin/env pythonw # -*- coding: utf-8 -*- ######################################## # the following must be considered: # - initial conditions in OGS must be switched off (saturation will be = 1 in whole domain) # - script not yet functioning for transient analysis # - import matplotlib.pyplot as plt from mpl_to...
9951b737276e7589d5b3cb01889b631d159f3c2e
959d3ff7725dfc8d6eb71d55e161917576ea2552
/databaseAPI.py
2dd87f1e073eba1f0e6e729522bd8b2c02ab36c9
[]
no_license
cucou0313/gangyue
09a15ace880b23f6b47f651cf56c07a44befa4ee
1c2b10a1cd54a82d4bf8a638a29a9abea5d6b7f7
refs/heads/master
2021-05-18T13:05:48.374901
2020-04-29T07:38:15
2020-04-29T07:38:15
251,254,720
1
0
null
null
null
null
UTF-8
Python
false
false
13,236
py
databaseAPI.py
import pymysql import time sqlconn = { 'host': 'localhost', 'user': 'root', 'password': '123456', 'database': 'gangyue' } pymysql_db = pymysql.connect(host=sqlconn['host'], user=sqlconn['user'], password=sqlconn['password'], ...
0ffa47c7be704e10e712147e7d66cd2348ccc1ec
ae31de7dd99cfab17f282a3b9509a6ae5f88b84a
/10_并发编程/02_多线程/PYTHON线程池及其原理和使用(超级详细)/01_为什么使用线程池.py
41074000a40ba8b2523df8e6ef752214e10bbfa4
[]
no_license
806334175/pystudy
fe7b1279d558c74c2db744fc14b14674c0f3c26d
0d0c9d6ed7f22088c91a99feaa3b2386da8798e0
refs/heads/master
2020-09-30T12:13:05.725820
2020-04-17T06:07:14
2020-04-17T06:07:14
227,285,389
0
0
null
null
null
null
UTF-8
Python
false
false
1,068
py
01_为什么使用线程池.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/1/9 上午11:43 # @Author : Ryu # @Site : # @File : 01_为什么使用线程池.py # @Software: PyCharm # 系统启动一个新线程的成本是比较高的,因为它涉及与操作系统的交互。在这种情形下, # 使用线程池可以很好地提升性能,尤其是当程序中需要创建大量生存期很短暂的线程时,更应该考虑使用线程池。 # # 线程池在系统启动时即创建大量空闲的线程,程序只要将一个函数提交给线程池, # 线程池就会启动一个空闲的线程来执行它。当该函数执行...
b94fb7667d99a3282b9563b3200618ab0130c752
07886b44740b73ef72c27fe716df9e72bcec73b9
/component/effect_component.py
c8cbd7375910c6b7d51af3be144e275b5cc971b9
[]
no_license
PedalPi/Raspberry-P1
965e054b7b748899c1c3787bdfe3684c22af975c
026b19e6ab537822cfe69ad9cde93dd19aca000a
refs/heads/master
2021-01-13T10:05:58.803057
2018-10-26T20:51:51
2018-10-26T20:51:51
72,132,456
0
0
null
2017-05-25T20:56:44
2016-10-27T17:36:35
Python
UTF-8
Python
false
false
1,031
py
effect_component.py
# -*- coding: utf-8 -*- from gpiozero import Button, LED class EffectComponent(object): def __init__(self, pin_button, pin_led, pull_up=False): self.button = Button(pin_button, pull_up=pull_up) self.led = LED(pin_led) self._effect = None @property def action(self): return...
4b8827150d5c3e5bffd2f45eec238dfae43e9756
0415935e5d624b88ed45ebbbd406a5d0f658379b
/3D classification/MBB/Data Generation/DataGen.py
dfeb23c65e0e5887df9a732ddda22a1bfb53e1cb
[]
no_license
me17b016/Part-Classification-using-ML
2abf95f2638480c09fabe7d033ecc1da0127f866
5e652997f7766b57038794157482a9e07e92b2e7
refs/heads/main
2023-04-21T04:25:33.548210
2021-05-20T15:31:15
2021-05-20T15:31:15
368,851,810
0
0
null
null
null
null
UTF-8
Python
false
false
1,092
py
DataGen.py
import os import vtk import csv folders = ['BOLTS AND SCREW', 'NUTS'] directory = "/content/drive/My Drive/DATASET_FOR_3D/" data = [("label", "R1", "R2", "R3", "D")] # "length", "breadth", "height", for foldername in folders: tem_directory = directory + foldername for filename in os.listdir(tem_directory): ...
8139b2b3b01b7da71419c3975a14a127d8d8a773
d24a6e0be809ae3af8bc8daa6dacfc1789d38a84
/ABC/ABC306/D.py
69b32dd2974097a4a119809be7afa6ca64e02498
[]
no_license
k-harada/AtCoder
5d8004ce41c5fc6ad6ef90480ef847eaddeea179
02b0a6c92a05c6858b87cb22623ce877c1039f8f
refs/heads/master
2023-08-21T18:55:53.644331
2023-08-05T14:21:25
2023-08-05T14:21:25
184,904,794
9
0
null
2023-05-22T16:29:18
2019-05-04T14:24:18
Python
UTF-8
Python
false
false
716
py
D.py
def solve(n, xy_list): dp = [[0] * 2 for _ in range(n + 1)] for i in range(n): x, y = xy_list[i] if x == 0: dp[i + 1][0] = max(dp[i][0] + max(0, y), dp[i][1] + y) dp[i + 1][1] = dp[i][1] else: dp[i + 1][0] = dp[i][0] dp[i + 1][1] = max(dp[i...
377b8b5ab1ed7063005050c1f145539d4690403e
abf1abf94bd3661b494ff8e5c96433ba62eb90f9
/GetDeleteGroupMembers.py
187a45023f396b9f2db9ccf68dd9737161a9f51c
[ "MIT" ]
permissive
thales007/Jive-Community-Management
8634f6064ffc1dbfea090ab29397d8ca13709c0a
ae80baef13f42d45fa5bcf7a74b3f4c30b0a0e91
refs/heads/master
2021-01-22T23:58:29.252824
2014-10-24T19:02:53
2014-10-24T19:02:53
24,770,881
5
1
null
2014-10-17T14:43:20
2014-10-03T19:26:11
Python
UTF-8
Python
false
false
2,857
py
GetDeleteGroupMembers.py
####################################### # Title: Get and Delete group members # Description: Gets a list of member IDs and deletes them from the group. # Update community base URL, username, and password. # Author: Timothy Hales # Date: 10/7/2014 # Version: 1.0 # Python Version: 2.7 # Jive Rest API: v3 # GitHub R...
e62f02e90ca7b076f638c31028a77d6b1568aca5
5c1c1e23c5dbae2a54d2aaab79ade95b0cb80a8a
/src/theory/language_reference/lexical_analysis/line_structure.py
ce56f7b2fe7e46446a31651b198eca3fd3f8221a
[]
no_license
anhnh23/PythonLearning
186486475fc8fc0b67938e69d73e89d38990bdbe
b6e3d43e8ab47c2a68028a1fc30878e1a6cc9baf
refs/heads/master
2020-06-13T20:54:33.359053
2017-07-20T08:32:26
2017-07-20T08:32:26
75,555,321
0
0
null
null
null
null
UTF-8
Python
false
false
47
py
line_structure.py
''' Created on Dec 5, 2016 @author: ToOro '''
d1ab0b73989fb8a5a1b320247dbeacd3da560271
8dc6c12b862205c2f15f89e93bb722cd6ae5fa4d
/registros/programa testes/parse.py
5f5692fe39cfff5c776d9e91cc93eb7c7d030b35
[]
no_license
fabio-stdio/BBM-Vufind_others
2b6293c9405a3df2a2806c4e4c95f78a9ec1cf33
f353fbdaf60293874a19d11a250ddd702da0ca1e
refs/heads/master
2020-04-05T01:20:22.436007
2018-11-29T15:33:05
2018-11-29T15:33:05
156,432,428
0
0
null
null
null
null
UTF-8
Python
false
false
5,161
py
parse.py
'''Este arquivo é parte do programa marc2dc marc2dc é um software livre; você pode redistribuí-lo e/ou modificá-lo dentro dos termos da Licença Pública Geral GNU como publicada pela Fundação do Software Livre (FSF); na versão 3 da Licença, ou (a seu critério) qualquer versão posterior. Este programa é distribuído na...
8fd99931f8c7ded41e6a69bd055c9ab941c95be2
aa52a0f6f6ad93c97718c216b668106687d23fd5
/pir2_control/scripts/head_command_real_world.py
f322ad2f7b3d61c3fc1ffe141fe18445ef3b41a2
[]
no_license
ais-lab/pir2_core
49d05e46978d5b22a0810a3ef8e03951db2044e4
ba3fd8d4a7715bd2059c1037a3b94ab39a016b2f
refs/heads/master
2020-06-27T19:52:50.478313
2020-02-09T02:49:33
2020-02-09T02:49:33
200,034,619
0
0
null
null
null
null
UTF-8
Python
false
false
4,563
py
head_command_real_world.py
#!/usr/bin/env python import rospy import numpy as np import math from sensor_msgs.msg import JointState from std_msgs.msg import String, Bool, Float64 from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint from pir2_msgs.srv import HeadCommand from pir2_msgs.srv import HeadCommandResponse MAX_PAN_PO...
a1bd96f055e4e2638e9bee07723705a69fa39682
eb51081f92d38b77ba5026eca42183731dbf7208
/HW1/object.py
0e891635c27520ef6ed1df8781b2a9b8bb908276
[]
no_license
harrgrigory/ACA-Machine-Learning
f1b45157eaa9cb283e1ed46ff7e2a71f4ddfa4c3
a2bd066ba870d689a60664ef339189c20219ec29
refs/heads/master
2022-12-12T21:26:22.956745
2020-08-24T17:55:29
2020-08-24T17:55:29
271,998,450
0
0
null
null
null
null
UTF-8
Python
false
false
521
py
object.py
class Item: def __init__(self, property_1=None, property_2=None, property_3=None, property_4=None, property_5=None): self.property_1 = property_1 self.property_2 = property_2 self.property_3 = property_3 self.property_4 = property_4 self.property...
c12bd196f501d5c5503704d1f278a154584f614d
7e561a427a26d34c776c38af8ce98e6a0089c827
/speed/api/serializers.py
8aac8dfcb8c2e1868ee5e172ac7735b8796108c7
[]
no_license
furkalokbu/reportpage
2772993858f16f287f069e2d2eefe0e42d2e569d
1f50612dede962f52ecb06e0fafbf1a73733afeb
refs/heads/master
2023-07-22T00:22:04.942273
2021-09-03T06:35:49
2021-09-03T06:35:49
401,259,028
0
0
null
null
null
null
UTF-8
Python
false
false
815
py
serializers.py
from django.db.models import fields from rest_framework import serializers from speed.models import UserData from rest_framework.response import Response from speed.models import SpeedUserData, ReportDate class UserDateSerializer(serializers.ModelSerializer): average_speed = serializers.SerializerMethodField() ...
c8b6647dacdcc00b9121308d1a3fd10359500e00
685cb6ad7ea3bd6d9f088f2175e4ffd6d972fabf
/core/admin.py
e1778ee48bb15c0ac0e164438187f1fb742773fa
[]
no_license
nurmatovvw/poster
071ec38e6fc897615365b4197606be3c9f423fd1
e4f2af95073e01e302da288f3a970867e01e7aec
refs/heads/main
2023-08-21T07:53:03.613689
2021-10-22T11:00:46
2021-10-22T11:00:46
null
0
0
null
null
null
null
UTF-8
Python
false
false
118
py
admin.py
from django.contrib import admin from .models import Poster # Register your models here. admin.site.register(Poster)
4b7992077b0450df38f1cf1293761ba2b8a23c53
033f5ecf914d8805554a9ebda0845927ff53181c
/Problem102.py
c228c0a7b0fc3f9fb5e20a8f4142489f7e35dc5d
[]
no_license
AtieDag/Project-Euler
dea5c9fb841cc6e17caee28049806afc71055dcd
fd2856425af31aba2effbf1f05a63b386c67174e
refs/heads/master
2021-07-16T12:12:06.301233
2021-05-14T15:00:27
2021-05-14T15:00:27
60,209,610
0
0
null
null
null
null
UTF-8
Python
false
false
3,357
py
Problem102.py
import math import numpy as np from numpy import genfromtxt class Point(object): def __init__(self, x=0, y=0): self.x = x self.y = y def distance(self, p2): range_x = self.x - p2.x range_y = self.y - p2.y return math.sqrt(range_x * range_x + range_y * range_y) class ...
4f3a6c3afbbb30fbf5be9782df24cc32a0fc9476
2a69a57db833e1d824eb0b13820449ee1d207110
/scikit/logistic_regression.py
f1d8091581f952ddc6362f6d8aadfe2cdc815117
[]
no_license
antonmi/python_ml
4120dd80f6291e3ab56306a7a95f679d0b643bf6
534a0e787414f5045ce582d79a4e2bcfe791b8f0
refs/heads/master
2020-03-27T06:07:53.399087
2018-08-25T09:02:30
2018-08-25T09:02:30
146,081,117
0
0
null
null
null
null
UTF-8
Python
false
false
1,227
py
logistic_regression.py
from sklearn import datasets import numpy as np iris = datasets.load_iris() X = iris.data[:, [2, 3]] y = iris.target from sklearn.model_selection import train_test_split X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=1, stratify=y) from sklearn.preprocessing import StandardScal...
2f5be025648e5acb02761197d5e31a915132caea
29ec896c44f8c44d458c3878c3810b1e35304974
/notebooks/notebook_solutions/cluster_weights.py
1e209b183fcfe9bb97534a3ac7226b8988e45330
[ "MIT" ]
permissive
tapanmishra/text-mining-class
74b947160536d12bf8d2c26d1722344c3e110688
01014a2d033564bab9fdcd33bb414e520e289714
refs/heads/master
2021-01-13T19:13:05.003272
2019-06-21T15:29:51
2019-06-21T15:29:51
null
0
0
null
null
null
null
UTF-8
Python
false
false
269
py
cluster_weights.py
import pandas as pd feature_names = tfidf_vectorizer.get_feature_names() for i, center in enumerate(kmeans.cluster_centers_): print(f"Cluster #{i}:") df = pd.DataFrame({"word": feature_names, "weight": center}) print(df.nlargest(10, "weight")) print()
59f560e2abb7d54da1be1df175c57af4febe97e7
1c5d970306c2dc820f628d8cb14311eb8afedbf4
/2020/09_encoding_error/solution.py
1ba03707c9722afbfd36effe5a47b09298a53057
[]
no_license
Levis92/advent-of-code
35d2ba648aae78cefb19d1adf7727753b7363ce5
d3a1b8d8793882e2ae5db332be9b49eb6a0ca19b
refs/heads/master
2022-12-28T07:58:25.545439
2022-12-06T23:12:56
2022-12-06T23:12:56
159,952,978
0
0
null
null
null
null
UTF-8
Python
false
false
784
py
solution.py
from itertools import combinations from typing import List, Tuple # Format data with open("data.txt") as f: numbers = [int(n) for n in f.readlines()] """ --- Part One --- """ for i, n in enumerate(numbers[25:], start=25): sums = [m + k for m, k in combinations(numbers[i - 25 : i], 2)] if n not in sums:...
4a01547ad57b548b6d4009b0b93c412ed72ae157
d70e71fcfd3ed3c40ba803d6c6342dbe4845b67e
/game_agent.py
0cb02da3d929621eb2881a0c181da08456359eea
[]
no_license
zachhilbert/AIND-Isolation
0b1b3e38d2f1d6b398fa96c0bb7dc9fc324d4d9b
2680e185d7e61c96344bb666b7435ac138ad7f46
refs/heads/master
2021-01-22T21:53:21.711820
2017-06-15T22:26:57
2017-06-15T22:26:57
92,741,591
0
0
null
2017-05-29T13:15:46
2017-05-29T13:15:46
null
UTF-8
Python
false
false
18,225
py
game_agent.py
"""Finish all TODO items in this file to complete the isolation project, then test your agent's strength against a set of known agents using tournament.py and include the results in your report. """ import random class SearchTimeout(Exception): """Subclass base exception for code clarity. """ pass def is_m...
e6f7506295718680e4c75e61fa9ff4a463063ba9
58a9aefc7ef2c13eee4b2c779ae64b66584d6598
/rotate.py
3482a2b24b1dd25aa10e541c65c91327d982d48c
[]
no_license
RishabhPatil/GalaxyMorphologyPrediction
1590cbe856d24eea7df65db68b4c54fddfc4990b
312f5890cc18460f04e019dc072c88d072f9b009
refs/heads/master
2020-03-11T18:48:28.807256
2018-12-26T20:47:08
2018-12-26T20:47:08
130,188,754
0
0
null
null
null
null
UTF-8
Python
false
false
972
py
rotate.py
from PIL import Image import os import matplotlib.pyplot as plt from multiprocessing import Pool import numpy as np INPUT_FOLDER = "l_resized_images/" OUTPUT_FOLDER = "l_rotated_images/" files = os.listdir(INPUT_FOLDER) def rotator(start): files_out = os.listdir(OUTPUT_FOLDER) count = 0 total_count = len...
904cbb3f71acaf3c5ddb919e588f30a18dc5dc3e
c9ff278b7cef06140dcaa950b94be7c00726040d
/docx.py
23f3a25239349bda49aa21219838a7c3a2752920
[]
no_license
baylism/docx_tools
ac65d41b57ef751a20bc745927901206118bf51b
6453bb9f3ef102ea2f72111bf8b5f47d2a4497a1
refs/heads/master
2021-03-16T10:27:16.894762
2018-01-30T21:29:58
2018-01-30T21:29:58
109,160,225
0
0
null
null
null
null
UTF-8
Python
false
false
4,323
py
docx.py
import zipfile from parsers import parse, parse_notes # Define XML document schema tags TEXT_NAMESPACE = '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}' PARA = TEXT_NAMESPACE + 'p' FOOTNOTE = TEXT_NAMESPACE + 'footnote' ENDNOTE = TEXT_NAMESPACE + 'endnote' TABLE = TEXT_NAMESPACE + 'tbl' cla...
0b6bfa193fd1982766e729bf61d1191f94687f52
1a3ada591f1180b48d273d2c5d00ff4f7a8668ba
/Greenhouse_3_MakeTimeSeriesFigure.py
365cd988b949b09428c557c7027df9eebf38175e
[]
no_license
cjetter/hello-world
b860ed2217c6f85d7e3a5266accbfab0abffccb5
1e4795d6f73bbbefbe836cb6ee71a13df15f1aaf
refs/heads/master
2021-01-18T20:19:01.409026
2017-10-19T15:27:10
2017-10-19T15:27:10
86,954,133
0
0
null
2017-04-02T20:40:48
2017-04-02T01:21:32
null
UTF-8
Python
false
false
3,272
py
Greenhouse_3_MakeTimeSeriesFigure.py
# Script to generate figures and widgets for plotting of temperature, humidity, pH, etc. #import libraries from bokeh.plotting import figure from bokeh.models import NumeralTickFormatter, Range1d, DatetimeTickFormatter from bokeh.models import ResetTool, PanTool, WheelZoomTool, BoxAnnotation from math import radians ...
253fa493c17a7bcd95b3179cb26f3f5ef5241558
7db26a8ebb1aedea72fdc840cb7c0f49de961344
/line_plot.py
0aab3392f3a2fabd0a1fee7fda76be978f3a6316
[ "MIT" ]
permissive
Yatharth9607/lid_driven_cavity_python
52a87ddfbc601506254444078fa08852c10ad659
dd7cee80607eceebc314894ff4428155facea941
refs/heads/master
2022-12-22T00:49:59.553360
2020-09-26T03:55:41
2020-09-26T03:55:41
273,360,971
0
0
null
null
null
null
UTF-8
Python
false
false
844
py
line_plot.py
# line plot with matplotlib import numpy as np import matplotlib.pyplot as plt def plot_convergence(u_res, v_res, p_res): """receives total residual values""" # step 1: create data to plot p = np.count_nonzero(u_res) q = np.count_nonzero(v_res) r = np.count_nonzero(p_res) iterations = max(p, q,...
bacfdb91157ac96c9f0ba37b9bf0911b9cd2bdfc
874b03a2f96bd6ebdfa21b61d6c4a703ea4d3032
/py_sedyield.py
04ef039692d20438eaaed7e682728bfd00d2e990
[]
no_license
chunyaoyang/dissertation
b026c53eee38ca4c071d454fdd279a4a9a8fdca7
21768336b6913629235a8cd0e40f1205b511509f
refs/heads/master
2020-04-23T18:11:05.174417
2019-02-18T21:48:26
2019-02-18T21:48:26
171,357,326
0
0
null
null
null
null
UTF-8
Python
false
false
6,023
py
py_sedyield.py
# -*- coding: utf-8 -*- """ Created on Fri Jan 18 14:50:57 2019 @author: cyyang """ import statsmodels.api as sm import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy.special import gamma from scipy.optimize import fsolve import scipy.stats as sp def trainLinear(x,T): """Linear regre...
a63318f89ed68f1b796a862733702c783969787e
f0e43d42c43eec374134ca829baba8a645e8cc7c
/agent.py
5dae1c75f29013861359e53f2f9d2d0683c83951
[]
no_license
strollcata/games-ai-spike-7
ed6ff8b9064e35a708b4fc79a70c454ae357af4d
b8f895c01d426b03cb68094b77f40bc97d468553
refs/heads/master
2020-03-11T01:02:16.302391
2018-04-17T04:51:48
2018-04-17T04:51:48
129,679,513
0
0
null
null
null
null
UTF-8
Python
false
false
20,001
py
agent.py
'''An agent with Seek, Flee, Arrive, Pursuit behaviours Created for COS30002 AI for Games by Clinton Woodward cwoodward@swin.edu.au ''' from vector2d import Vector2D from vector2d import Point2D from graphics import egi, KEY from math import sin, cos, radians from random import random, randrange, uniform from path i...
1b5bffa7651dde12be87561825f66aadeb55a0bd
2a46e03777a3a25b226e082ae8e30561ca9ead6a
/backend/apps/book/models.py
6f8a3a2b6eec24c256bd4a36e86cc51c465f4c10
[]
no_license
Alex-Just/uo
cff2981663909deef5584bc8f2badd040b544e58
8a384bc40a5580105eea337d40ceab4ba0514846
refs/heads/master
2021-01-01T06:02:39.155286
2018-01-20T13:00:10
2018-01-20T13:00:50
97,339,865
0
0
null
2018-07-21T13:01:02
2017-07-15T20:13:05
JavaScript
UTF-8
Python
false
false
1,251
py
models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ from apps.common.behaviors import Publishable from apps.common.fields import CustomForeignKey class Topic(Publishable): pos = models.PositiveSmallIntegerField(_('Position'), unique=True) title = models.CharField(_('Title of...
50b02dc63429f870bd85b4f136722027e2f3e317
f60617e714fc01a5960fb69163c4df3200704426
/mini_gplus/resources/comments.py
1604f41c8c8ad55c6098c261c41cb678916311a9
[ "MIT" ]
permissive
baronrustamov/pill-city
97d1063f60766623ddfe95c8486bdd3de0ccdb1e
196635e7d0019def1d5ee3b38f82e270085201a0
refs/heads/master
2023-08-18T21:11:11.978403
2021-10-13T17:55:50
2021-10-13T17:55:50
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,072
py
comments.py
from flask_restful import reqparse, Resource, fields, marshal_with from flask_jwt_extended import jwt_required, get_jwt_identity from mini_gplus.daos.user import find_user from mini_gplus.daos.post import dangerously_get_post from mini_gplus.daos.comment import create_comment, dangerously_get_comment, delete_comment fr...
48550faaaaff1dab09ac82053f21d67cd500fde6
b63062e7720fd33e5da70e1709b31bb818030efa
/Controllers/StudentAuthorizationController.py
94cc7c69fdc27b95fcf39eb222b88a055d65d850
[ "MIT" ]
permissive
GreatHorizon/library
c5b88ce20682f55c902ba8f54068eaa4c9a1b986
a1370b94c2aa51825732bacecb161fe54f43124d
refs/heads/main
2023-02-12T13:00:47.221893
2021-01-12T11:00:58
2021-01-12T11:00:58
304,581,443
1
0
null
null
null
null
UTF-8
Python
false
false
805
py
StudentAuthorizationController.py
from Models.StartPageModel import StartPageModel from Models.StudentPageModel import StudentPageModel class StudentAuthorizationController: def __init__(self, master, model, view): self._master = master self._model = model self._view = view def BackToStartPage(self): from Views...
b185072195f99ca5182a320a3625556718dbd4bc
1186962282437311286711570713b2881c445d2a
/Aliens/flask_app.py
2b934af436e2064e0174f9b29225157bfe15e4d5
[]
no_license
venis4/GWC-Hack-Solstice-Flask-Workshop-
bc0e27faca2c72270ec16cf0bd309a2db517b55e
f6ee66c039d25733a904bc4124b47bc946582db6
refs/heads/main
2023-02-25T06:16:51.297344
2021-01-16T01:28:25
2021-01-16T01:28:25
null
0
0
null
null
null
null
UTF-8
Python
false
false
478
py
flask_app.py
from flask import Flask, render_template, request from jinja2 import escape, Markup app=Flask(__name__) @app.route('/') def upload(): return render_template("beamup.html") @app.route('/success', methods = ['POST']) def success(): if request.method == 'POST': file = request.files['file'] ...
cc1e48367d432548d0a54cfbe96d9e47b10dc53c
6056a1191228cae3f31b9a92772ff3c23cab06d8
/In/image/imager.py
dc4c0ebe3c63358ee908907a4d332655adcdf9ca
[ "Apache-2.0" ]
permissive
vinoth3v/In
2e98f941f4367cf3e0dcbbc56dc30a359bc3f564
d5b3651ff909c55a48566f7b8b33d38103ff09b1
refs/heads/master
2021-01-22T14:38:58.870835
2016-01-15T07:53:58
2016-01-15T07:53:58
41,109,563
3
1
null
null
null
null
UTF-8
Python
false
false
4,588
py
imager.py
import os import PIL from PIL import Image, ImageOps class InvalidImageStyleException(Exception): '''InvalidImageStyleException''' class Imager: '''IN imager''' def __init__(self): self.config_style_filters = IN.APP.config.image_style_filters self.filters = { 'resize' : self.resize, 'resize_cro...
3cf615534b80ea84d11bf311ee4b56863df32712
0060b5bfb1aee0b7ecd530042d4422f1703c54b9
/JaapIDEFiles/FSwap_OnePath_Pattern.py
da78a5e9df2a4a5f03947f83722672ab17c98f8d
[]
no_license
paulberinde/fruitvliegen
7745188f805fc0b15558866e27d582f8dcd406ea
e203cf8f9b75468ff745614037065caf853f0157
refs/heads/master
2021-01-01T04:05:33.086669
2016-05-24T22:47:49
2016-05-24T22:47:49
56,596,661
0
1
null
2016-04-19T13:41:13
2016-04-19T12:56:23
Python
UTF-8
Python
false
false
4,821
py
FSwap_OnePath_Pattern.py
""""""""""""""""""""""""""" Gene Swapping Algorithm """"""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Team Melanogaster Jaap Nieuwenhuizen, Paul Berinde-Tampanariu, Merel van de Hurk """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" # import import random impo...
0e35784888ee4e1d2679cbc37e6f27ba3bd4b630
b7afa87e9b382199219d6e533419654a8ff670bb
/mamonsu/plugins/__init__.py
bf49b68e2d1a111a532b83aff22b7859af4c086c
[ "BSD-3-Clause" ]
permissive
postgrespro/mamonsu
a7f63421ecadb5e11a54f0307022525ef89079da
dd372df24c4bc356a7aafd89135187c21146681d
refs/heads/master
2023-09-01T01:06:38.146729
2023-06-13T08:42:11
2023-06-13T08:42:11
50,690,011
207
48
BSD-3-Clause
2022-12-20T11:43:58
2016-01-29T20:42:24
Python
UTF-8
Python
false
false
110
py
__init__.py
__import__("mamonsu.plugins.common") __import__("mamonsu.plugins.pgsql") __import__("mamonsu.plugins.system")
6c71b24336c3922737522c70e68d38d940be7350
034663a4ca7d48eb0342ae00475d806f754ef83e
/oops_Mini_project.py
6f09ec644eee47029a3bf55c73a1ad16ad15a4ab
[]
no_license
shweta0236/Library-Managment-System
4c12c89eb1f6101cab7638579a846b0368462270
86d5b9a2cdc195968fe8c4bb553213508a202de2
refs/heads/master
2023-01-04T18:15:29.490255
2020-11-01T15:17:52
2020-11-01T15:17:52
221,454,370
0
0
null
null
null
null
UTF-8
Python
false
false
3,836
py
oops_Mini_project.py
# Create a library class # display book # lend book - (who owns the book if not present) # add book # return book # HarryLibrary = Library(listofbooks, library_name) # dictionary (books-nameofperson) # create a main function and run an infinite while loop asking # users for their input class Librar...
ac0ff1fc6e0652504450a6b1247413054be932bb
69657f612c5522eaaa6f85587703d41c7783e956
/trainModelBackground.py
b5e7823ef05e6b658cb235919814857dd93b15de
[]
no_license
ryanbaldini/MineSweeperNeuralNet
f5be9777960e1bc6eff25e3b5ae8f9397bf3d5b6
7c9b32ee23ca2f618ae3117cca94a386e0b65388
refs/heads/master
2023-04-06T13:12:45.492346
2020-04-13T15:13:31
2020-04-13T15:13:31
100,531,321
13
7
null
2023-03-25T00:17:00
2017-08-16T20:48:14
Python
UTF-8
Python
false
false
1,599
py
trainModelBackground.py
from MineSweeperLearner import MineSweeperLearner import imp import sys, getopt from keras.models import load_model #called like this: #python trainModelBackground.py -o [option] -m [model] -b [batches] -g [gamesPerBatch] def main(argv): option = '' modelChoice = '' nBatches = 1000 nSamples = 1000 ...
c03ada63eec052382e902865d8790b10f5da037f
93c08cd7dc8dd1879406aff7597c2c7874e9a738
/python/PATconfig/vertex_cff.py
29c8f8dcdef03d932c94255970995c3c5691dfc3
[]
no_license
delaere/zbb_louvain
22b39e85695070c626fe1360d71bcc05b6703069
d84f90d9a068b623e2b5eabb3e0dcf0cda9e5498
refs/heads/master
2021-01-25T08:54:34.292865
2015-05-09T11:45:55
2015-05-09T11:45:55
10,745,430
1
4
null
null
null
null
UTF-8
Python
false
false
2,108
py
vertex_cff.py
import FWCore.ParameterSet.Config as cms from CommonTools.ParticleFlow.goodOfflinePrimaryVertices_cfi import goodOfflinePrimaryVertices def setupGoodVertex (process): process.goodPV = goodOfflinePrimaryVertices.clone(filter=cms.bool(True)) def changeVertexCollection (process,seqName='patDefaultSequence'): ...
56476c9289480173fe31d8a3deb5a2998bc04e98
5028aa063f6069ae46eef327bef6c438d1106e92
/classes/roles.py
4729bd720f723fa3f3f0d11e2a276cc17ef68567
[]
no_license
BdogUSU/ToZion
19cdc3f00ff616246397c1bddfb4395a187d3475
fab169ead6360eb9474faa84a4a3fbd0a1bddc95
refs/heads/master
2021-01-21T09:02:30.301011
2014-08-31T02:57:33
2014-08-31T03:02:13
null
0
0
null
null
null
null
UTF-8
Python
false
false
5,695
py
roles.py
class Role(object): def __init__(self, **kwargs): #TODO: these values need to be initialized by some historical stats super(Role, self).__init__() self._stamina = kwargs.pop('stamina', 0) self._leadership = kwargs.pop('leadership', 0) self._power = kwargs.pop('power', 0) ...
cdf0e49b73e3060b41872e89e9f0ced2ecae0d40
3813d7640dee47095dd6eb12d53818006ec09154
/tdds/collections.py
903409025e583226a2aaae340dff3c8578c68528
[]
no_license
saintamh/tdds
23b329bd8f0ed22c606bfbe974ded73ae8c6f761
c03004a380aff705c8951d1ea6cf46813d12d8e1
refs/heads/master
2023-08-22T20:00:39.320808
2021-10-19T10:44:14
2021-10-19T10:44:14
211,058,908
0
0
null
null
null
null
UTF-8
Python
false
false
6,734
py
collections.py
#!/usr/bin/env python # -*- coding: utf-8 -*- #---------------------------------------------------------------------------------------------------------------------------------- # includes # 2+3 compat from __future__ import absolute_import, division, print_function, unicode_literals # tdds from .basics import Field...
475aa2a9973d940936313ac22e041ef2a55a2c46
ca55dcaa64ea9db4068e13091321cfebecc0ff41
/codeUp/codeUpBasic/1564.py
ccb44826d26bad9b0f9fd18e0a1f724f4332653d
[]
no_license
gomtinQQ/algorithm-python
8fb8343594b945099ae2a4dfa794ecb47e54ab0b
751562922b66e335f621d366bb73dacdc7125140
refs/heads/master
2022-12-07T23:05:44.535593
2020-08-21T12:29:58
2020-08-21T12:29:58
null
0
0
null
null
null
null
UTF-8
Python
false
false
537
py
1564.py
''' 1564 : [기초-함수작성] 함수로 최대공약수 리턴하기 int 형 자연수 두 개를 입력받아 최대공약수(GCD, Greatest Common Divisor)를 출력하시오. 단, 함수형 문제이므로 함수gcd()만 작성하여 제출하시오. ''' def gcd(x, y): num = 0 if(x > y): max = x min = y else: max = y min = x for i in range(1, min+1): if(x%i==0 and y%i==0): ...
cefc33f65bddaddbddc0121a8744b13cb8178096
c5729ddd11a522a8e2ef45653d4017ff8fc429cf
/examples/fit_cartpole_ppo_multi.py
6f8d3d443ee009d6af97c283a5df0a3a6eb72ab8
[]
no_license
afcarl/trickster
6a3b4a7f693fc8fbfb2005896f3a2db38a0b471f
398585de7a92dd5578e45ed00803b31ddaede529
refs/heads/master
2020-08-28T07:43:32.641110
2019-09-15T20:00:40
2019-09-15T20:00:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
864
py
fit_cartpole_ppo_multi.py
from trickster.agent import PPO from trickster.rollout import MultiRolling, Trajectory, RolloutConfig from trickster.model import mlp from trickster.utility import gymic envs = [gymic.rwd_scaled_env() for _ in range(8)] input_shape = envs[0].observation_space.shape num_actions = envs[0].action_space.n actor, critic =...
11bfaa2cf2c04bd4d2623f96f51f19cf00aa8a66
8fdcd12cfb91b2245da8b3c65fb937b1d72dd4c5
/tissuelab/omero/gateway_ome500_ice351/omero_api_IAdmin_ice.py
47d408f481068ac44acc5e5501811c5ab0f7cbda
[]
no_license
VirtualPlants/tissuelab
569a334deab0b73acc8b43f313efc3f4c4e552fd
8c064a34b91127806848f4992d1e4767574863cf
refs/heads/master
2021-01-11T01:32:19.830778
2017-05-04T09:42:53
2017-05-04T09:42:53
70,694,783
2
1
null
2017-01-05T14:21:50
2016-10-12T11:49:10
Python
UTF-8
Python
false
false
53,186
py
omero_api_IAdmin_ice.py
# ********************************************************************** # # Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ***********************************************************...
fb9a66f42b3d7c2afae7480af9c017b0fca4fd2b
50407a80247d88989426b6f9d2584a042f519cc1
/scripts/image_crop_and_visualize.py
b3433c3b8f3a6847ba9607dba242ba773cae3b39
[]
no_license
yiwang454/BoxCars_copy
57b52d5edae98d53a17bf00b64b486e605704374
7948e2561cb9ca37b462880a934635484acfa84e
refs/heads/master
2020-06-26T01:37:24.217023
2019-08-06T15:48:04
2019-08-06T15:48:04
199,484,808
0
0
null
null
null
null
UTF-8
Python
false
false
3,666
py
image_crop_and_visualize.py
import csv import cv2 import os import json from math import tan, pi dir = 'cropped_img' try: os.mkdir(dir) except: pass class_dict = { '4': 'taxi', '6': 'minibus', '2': 'motorbike', '10': 'emergency car', '11': 'emergency van', '8': 'rigid', '5': 'van', '9': 'truck', '12': 'fire engine', '3': 'c...
bd9d3f111bd5a0b39f4dd1d6d80316f5e63bfdff
82e210419648d7c644b57105af8d98f904a5cd8e
/poetry/apps/migrations/0002_auto_20180812_0005.py
f80973461403f5d8d1f2d3acfef24830d414397c
[]
no_license
Gaterny/Tang-Poetry-Song-Ci
09169735a6e32faa62a57bb9442517c77e917b11
0491385456d470e5055e35c7a35957fbb5c41ecc
refs/heads/master
2020-03-26T03:58:39.252774
2018-10-09T14:12:01
2018-10-09T14:12:01
144,480,155
0
0
null
null
null
null
UTF-8
Python
false
false
621
py
0002_auto_20180812_0005.py
# Generated by Django 2.0.4 on 2018-08-11 16:05 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('apps', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='poems', options={}, ), migratio...
380815d3b036cb9a43b9ce56a696da79e3b0ed33
dc814b71879331678f1c7f164d55624f07b1b212
/strands_qsr_random_classifier/src/random_classification_client.py
77e0c386f48ec7e4f3d532271af879720b61d335
[]
no_license
strands-project/strands_qsr
4fc70af13f507099511b26b359c03aee66acaf01
2c3882baaa267e10ec935c15a4bd01325d5f9664
refs/heads/master
2021-08-28T17:48:51.528813
2014-03-06T08:53:54
2014-03-06T08:53:54
13,800,703
0
0
null
null
null
null
UTF-8
Python
false
false
1,407
py
random_classification_client.py
#!/usr/bin/env python import roslib; roslib.load_manifest('strands_qsr_random_classifier') import sys import rospy from strands_qsr_msgs.msg import * from strands_qsr_msgs.srv import * from geometry_msgs.msg import * def random_classification_client(request): service_name = 'group_classification' rospy.wait_...
35512764c389550728370e7264e3ff75766d5e31
21ba72b3d6c72355f84aa7e254b076841ff6f141
/ojos_ca/domain/value_object/sys.py
015c5aaee3406c98c523330f134a27c3f7fba764
[ "MIT" ]
permissive
ojos/python-ca
eef268fcd564b799cf31122e3977ccfcbe6b892d
dba9e9c61fd997c8c2ed60a6bd6f076c5f216265
refs/heads/master
2021-07-25T13:50:10.906269
2020-09-21T15:16:52
2020-09-21T15:16:52
219,331,540
0
0
null
null
null
null
UTF-8
Python
false
false
1,837
py
sys.py
from typing import Any, Optional import sys from ojos_ca.domain.value_object.core import Length from ojos_ca.domain.value_object.num import Range class SeqId(Length): MIN = 1 MAX = 64 MIN_EQUAL = True MAX_EQUAL = True class SeqCount(Range): CLASS_INFO = int MIN = 0 MAX...
9945d9ed4ba77a0a6ec27477b2f3517fe2c98711
589ed6d1aaeffd29626241db028e5d201fa7ce3d
/Excel2List/Excel2List.py
6a4cdd478db3aa997f6179e4415b99a42357e412
[]
no_license
shanghaobo/Tools
1464fa3df05538adebb64b762bf4109b8471e353
8d5407c1f9534614772047cd0f4e84b844e2a150
refs/heads/master
2020-12-08T08:50:45.497779
2020-01-17T05:39:52
2020-01-17T05:39:55
232,939,741
0
0
null
null
null
null
UTF-8
Python
false
false
629
py
Excel2List.py
import xlrd class Excel2List: """读Excel转为二维数组""" def __init__(self,path,tab_index): """ :param path: excel路径 :param tab_index: 标签下标 0开始 """ self.data=xlrd.open_workbook(path) self.sheet=self.data.sheet_by_index(tab_index) self.rows=self.sheet.nrows ...
e337c336ec5b2654b2220993a9a1b016eca7e0d1
0e75bda5ab68d8d69b63d8e0a3f0af2ebcf5e5b8
/temp_code/movefile.py
1e202bae8d306653ea42a5ecfaab939b213f2e88
[ "Apache-2.0" ]
permissive
tsing90/matting_data
ff5bef2cd30f6756b5042f2d3e772d3e6c9ea8d4
93131d19689e5ed5b069807229947ba953a2d2e1
refs/heads/master
2020-04-22T22:59:26.233060
2019-12-28T22:23:58
2019-12-28T22:23:58
170,725,712
0
0
null
null
null
null
UTF-8
Python
false
false
250
py
movefile.py
import os import shutil allimg = os.listdir('new') src = '/home/kevin/git/Deep Image Matting/Deep-Image-Matting/Combined_Dataset/Training_set/Other/alpha/' for name in allimg: shutil.move(src + name, '/home/kevin/git/matting_data/DIM/alpha/')
ade8281c23810f705902b862d767fb024bae0e6f
cd5746f8cc7aee1f20606a65b4fae0d5e8ee78dc
/Python Books/Machine-Learning-Python/9781118961742_all code files/02/rVMSummaryStats.py
f4ad301b62fa8a1f57bdddb99446bb94c4eee839
[]
no_license
theGreenJedi/Path
df24fca355590efef0c6cb5c52e7216c6b5d2464
b5ed2805dbb046480929e49e550bfd8af5bb4d6f
refs/heads/master
2023-07-27T14:23:37.694546
2021-07-16T01:38:55
2021-07-16T01:38:55
87,686,563
8
2
null
2023-07-11T22:49:03
2017-04-09T05:57:30
Jupyter Notebook
UTF-8
Python
false
false
1,952
py
rVMSummaryStats.py
__author__ = 'mike_bowles' import urllib2 import sys import numpy as np #read data from uci data repository target_url = ("https://archive.ics.uci.edu/ml/machine-learning-" "databases/undocumented/connectionist-bench/sonar/sonar.all-data") data = urllib2.urlopen(target_url) #arrange data into list for lab...
8a3c97c3d9ba844181fc22230a44039150a0d999
b309c1a36ee069acd19e2d20c32c1554be346f42
/examples/basic_monosynth.py
85bebe138924d872c3919b28b32335dc8deeff52
[]
no_license
interstar/Gates-Of-Dawn
31c2c19a8ae73cedc3c8a9e9277355658c0740c9
654ff5419c11da973cf2d09ca966db2e4d310080
refs/heads/master
2021-01-23T03:54:21.125440
2015-02-26T23:26:23
2015-02-26T23:26:23
9,902,592
1
0
null
null
null
null
UTF-8
Python
false
false
630
py
basic_monosynth.py
from god import * def twin_osc(freq,id=1,diff=None) : if diff is None : diff = slider("$0_twin_pitch_diff_%s"%id,0,20) diff = add_(freq,diff) return add_( add_(phasor_(freq),-0.5), add_(phasor_(diff),-0.5) ) def basic_synth(src,id=1) : return vol( s...
c271ec2b2089f2d154aa553216b49c46ad5c7b9d
158c2655754e4b05b7b7fce1aef7acc0b26db10c
/plant_gallery/migrations/0001_initial.py
ebc081f2f3bfd36938176e38d08c76b17398ebc0
[]
no_license
plantonmars/plant-life
984fc35d1d7f95d036b77cd5baf7e72483494e0d
99b53470f90f4c2e565f1832f8a6c63c23fdc481
refs/heads/master
2021-09-23T18:55:54.567727
2020-03-11T19:14:44
2020-03-11T19:14:44
246,660,158
0
0
null
2021-09-22T18:43:26
2020-03-11T19:18:45
Python
UTF-8
Python
false
false
1,545
py
0001_initial.py
# Generated by Django 3.0.3 on 2020-02-22 17:14 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Lighting', fields=[ ...
22397964fccef5f1f0060338b0bdd7e7ee37d2ed
010279e2ba272d09e9d2c4e903722e5faba2cf7a
/contrib/python/Pillow/py3/PIL/IcoImagePlugin.py
a188f8fdcea46e5cb9423a3c4572d88d93890fc6
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-other-permissive", "HPND" ]
permissive
catboost/catboost
854c1a1f439a96f1ae6b48e16644be20aa04dba2
f5042e35b945aded77b23470ead62d7eacefde92
refs/heads/master
2023-09-01T12:14:14.174108
2023-09-01T10:01:01
2023-09-01T10:22:12
97,556,265
8,012
1,425
Apache-2.0
2023-09-11T03:32:32
2017-07-18T05:29:04
Python
UTF-8
Python
false
false
11,622
py
IcoImagePlugin.py
# # The Python Imaging Library. # $Id$ # # Windows Icon support for PIL # # History: # 96-05-27 fl Created # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1996. # # See the README file for information on usage and redistribution. # # This plugin is a refactored version of Win32IconImageP...
54265dbaac725bf7518110f41dcfc8ec8678d401
d11eddfe4a0993a5dded911956573b0577d73ffc
/code/pdbatom.py
3e79acdeb93313cfbbdc60d525f41ae73648b9f8
[]
no_license
doxeylab/evoclust3d
a5d1defd6f3ae4e1b6b02a389f6d5831afb88465
2ce0fa1d86cada095d218f4fc7e19432961a2169
refs/heads/master
2021-07-09T21:46:27.279576
2016-11-06T17:43:38
2016-11-06T17:43:38
56,700,261
0
1
null
null
null
null
UTF-8
Python
false
false
2,958
py
pdbatom.py
#################################################################################################### # # # PROJECT Protein Adaptation # # CL...
fd3ba7732bd73c028d8b453e9a0aef809a619dcf
255e19ddc1bcde0d3d4fe70e01cec9bb724979c9
/dockerized-gists/5194475/snippet.py
2317a745d654b2ec5663f667e8f5bc536b49dacb
[ "MIT" ]
permissive
gistable/gistable
26c1e909928ec463026811f69b61619b62f14721
665d39a2bd82543d5196555f0801ef8fd4a3ee48
refs/heads/master
2023-02-17T21:33:55.558398
2023-02-11T18:20:10
2023-02-11T18:20:10
119,861,038
76
19
null
2020-07-26T03:14:55
2018-02-01T16:19:24
Python
UTF-8
Python
false
false
1,989
py
snippet.py
import cssutils from xml.sax import saxutils from lxml.html import tostring, fromstring, clean from lxml import etree import logging class Cleaner(clean.Cleaner): def clean_html(self, html): if not isinstance(html, unicode): raise ValueError('We only support cleaning unicode HTML fragments') ...
375a32ca50b114688fe96f5efbb3b87de646815c
a1730d0ff534159077a7413402356aaa0f02993f
/SVM/SVM.py
5eae4dbb189c963433347c393de1aa76d4a467f9
[ "MIT" ]
permissive
ripplesaround/ML4E
d4e5e88704a19fea3740e065147af8212980bbc1
29800f94e48d46548a3ca476711ad0adfee8a10a
refs/heads/master
2021-03-29T10:54:16.197278
2020-06-25T16:53:18
2020-06-25T16:53:18
247,947,634
0
0
null
2020-06-25T16:53:19
2020-03-17T11:02:24
Python
UTF-8
Python
false
false
20,230
py
SVM.py
# coding=utf-8 ''' Author: ripples Email: ripplesaround@sina.com date: 2020/3/25 13:38 desc: 采用一对一法 ''' # done 单个svm训练 # done 训练全部的,这个要在svm_oago里面写 svm_oago 训练成功,值得注意的是决策便捷的点 # done 超级绘图 import sys import copy import data_process import numpy as np import matplotlib.pyplot as plt import cvxopt.solvers import loggin...
332f2465fbec51f5a704582c27519b6bc0848f34
02550c8d7fc6b612bb56e5aa657a89b3fa4eb649
/grab_quadrant.py
8ff5eaca042ef175f2a1441d6421076816803bcb
[]
no_license
jwcunha/test
05ea0e27a8271641190f2d1489c4d473c491a1dc
120cd98253cf3fb2b3dac24541eda070b02ef9a4
refs/heads/master
2020-06-01T03:58:24.921936
2013-03-08T22:18:16
2013-03-08T22:18:16
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,240
py
grab_quadrant.py
""" Get the quadrant you want from a .csv of 384 well reader plate data. """ ### Maybe it would make sense to make this a method on the cell object - get your quadrant? from well_conversion import * ## The x96_to_384 function returns a tuple of the well and well index (e.g. 'B5',283). ## I am going to build a for lo...
a9640b0af286472a0aa8b9d41b2c7c5f8e8d527c
5c306febe1f135a38c858c44e284b6ba57886390
/web/exceptions.py
f535fdf21e8315f52e4caed2678cffdb5196b765
[]
no_license
trungdung22/exchange_analysis
5a895447ac6d43a3b0555e5c95aebf11cbdaa443
a0aa2ff43cece6180606d7a7ec44057c2e4050c0
refs/heads/master
2022-11-19T20:45:18.226335
2020-07-12T04:54:52
2020-07-12T04:54:52
277,562,698
0
0
null
null
null
null
UTF-8
Python
false
false
789
py
exceptions.py
# -*- coding: utf-8 -*- class InternalServerError(Exception): pass class InvalidUsage(Exception): pass class SchemaValidationError(Exception): pass class UnauthorizedError(Exception): pass class ValidationError(Exception): pass errors = { "InternalServerError": { "message": "...
d56dd93e22be2ad87d0ca9c73ffc41ef60a1ad87
71ace56c9b6d341517306699fff0635c66974c64
/code_archive/dt_recons.py
425f52c8faa1499763deb261a65871d788a1bf9f
[]
no_license
mwaskom/Fluid_NiPype
2ad34118db14dc7582fd3b0c1a51d29c8399bf2f
27bdad8e3e6ee5b552e5b3672166c2faecb73cf8
refs/heads/master
2023-08-24T06:17:59.578829
2011-10-06T00:44:48
2011-10-06T00:44:48
831,271
5
0
null
null
null
null
UTF-8
Python
false
false
1,181
py
dt_recons.py
"""Preprocess dwi data for the subjects we've already unpacked""" import os import sys import numpy as np from glob import glob data_dir = "/mindhive/gablab/fluid/Data" diffniftis = glob(os.path.join(data_dir, "gf??/dwi/diffusion.nii.gz")) subjects = [p.split("/")[-3] for p in diffniftis] def get_dwi_dicom(subj): ...
6403b300df3e4739206cefad3b9e88c75b6ea5a3
79e607a063a0989f5563efb6b65321e38336566d
/1-PythonBasics/Aula06_Compara_Total_Exercicios.py
0b78e19005123e5a0e29e84e55731d0fd26539ac
[]
no_license
viniciuskurt/LetsCode-PracticalProjects
9e9c583e7ce72d06d26bc85fb6ff8ce7dfdfce75
c49a44f76c9fe1dcb6c7b5b45a25f296929f3608
refs/heads/main
2023-06-30T21:37:21.708093
2021-07-29T00:58:16
2021-07-29T00:58:16
382,719,785
0
0
null
null
null
null
UTF-8
Python
false
false
292
py
Aula06_Compara_Total_Exercicios.py
exercicios = int(input('Quantos exercícios de Python vc já fez?')) if exercicios > 30: print('Já está ficando profissional!') elif exercicios > 20: print('Tá indo bem, bora fazer mais alguns!') elif exercicios > 10: print('Vamos tirar o atraso?') else: print('Xiiii...')
1db78b5cf62996537a459f560fd1ba38879bc335
bd791abf29cb5566a6578d426222e702f7fe3992
/Step3_cleanUpStep2Result.py
c8de850c9e4ecbcbf63a523daeaaab2b0f76cb85
[]
no_license
willDDDD/FWD-summer-keywordextraction-workflow
36a1cd2c807e4a3adfccb8ad868c1041b5cfa21d
fd057fa3ba5823e11def0cebe29040bd96f19362
refs/heads/main
2023-08-14T01:12:14.206220
2021-09-15T13:33:22
2021-09-15T13:33:22
402,090,753
0
0
null
null
null
null
UTF-8
Python
false
false
652
py
Step3_cleanUpStep2Result.py
# clean up the result from step2, excluding the terms including symbols import json with open(r'C:\Users\\Desktop\AutoPhrase.txt', 'r', encoding='utf-8') as file2: # AutoPhrase/models/DBLP/AutoPhrase.txt res_ = file2.readlines() e = ["\\", "~", "$", "_", "-", "*", ":"] #exclude terms incuding symbols target2 = ...
8a93a1c5853d5ce6ab8a4c9747667b23c6234ffb
9203b339cb9084dfc5f451a91bca3afb4f2f4781
/05-Atari(keras).py
b547cb39fcad5c0f73a9c9109610846c9b57fc5d
[]
no_license
hamxahbhatti/Reinforcement_Learning
286c1c68a494b2a359dc19af4ada481a0cbd646a
bbc5d3fc160c880b4cdb5e6297b073cc41bc34a5
refs/heads/master
2023-06-27T17:01:24.577633
2021-07-26T09:10:40
2021-07-26T09:10:40
389,573,325
0
0
null
null
null
null
UTF-8
Python
false
false
3,927
py
05-Atari(keras).py
import gym import matplotlib.pyplot as plt import cv2 import numpy as np from keras.layers import Dense,Conv2D,Flatten,Dropout import keras from collections import namedtuple import random # from keras_preprocessing.image import # env = gym.make('SpaceInvaders-ramNoFrameskip-v0') env = gym.make('TimePilotNoFrameskip...
0e95247a3f841512bb08d0cf1e042e5b7af29eea
237fee08ea40f970a4263be0385656690d452737
/Homework1.py
c3bc54bebf355ac4d2411855c1a0d4eb61ad35b9
[]
no_license
santithegreat/UniClass
0efef34c2f323586d2efc73498f331b357733fc9
bb78b13309d40922d15ba1e04e4d3fcd13b648a7
refs/heads/master
2020-07-23T09:15:45.837937
2019-09-17T09:53:30
2019-09-17T09:53:30
207,510,605
0
1
null
null
null
null
UTF-8
Python
false
false
371
py
Homework1.py
import math name = input("What is your name: ") print("Hello " + name) number1 = int(input("write the first number: ")) number2 = int(input("write the second number: ")) print("The division of both numbers is: "+str(math.ceil(number1/number2))) radius = int(input("Please enter radius of a circle: ")) print("The surfa...
0c1461ae4b359c5cb603d2a61adfed00985da219
a0568f7328cd8334ebf98d947458ae22aee1fcfa
/test/test_memoryindex.py
6822c12b83afef8148f9ae29e09af998e6275446
[]
no_license
Vardominator/search-engine
12ab3835941f84a5f59c037cda1d4b061e1e1ce8
2a214b69932df26d45fd49ab0ebb4b00566424c2
refs/heads/master
2021-09-07T07:58:37.838969
2018-02-19T18:01:37
2018-02-19T18:01:37
103,597,348
0
0
null
null
null
null
UTF-8
Python
false
false
2,760
py
test_memoryindex.py
"""Unit Tests for memoryindex file""" import os import json import collections import memoryindex from unittest.mock import patch, mock_open def process_documents(): """Helper function to pre-process documents""" docs = [] docs_dir = 'test/test_docs' for root,dirs,files in os.walk(docs_dir): f...
b75db715621a89377357468089c8f2df97b021b7
cf41bd8e03b7a9f29e441426df6275a01dd91b77
/2019/fbctf/hr-console/sol.py
73bb551c499a538bfaae685977d207e975ccbfdc
[]
no_license
daoduythuan/ctfs
8939890ec39c805c4ae9a02e6e8453dfc6f3118d
50b2408f3bd85cf319b2d95f49db1b1eea4e3be2
refs/heads/master
2023-01-24T10:44:38.780968
2020-10-11T09:21:04
2020-10-11T09:21:04
141,783,907
0
1
null
2023-01-11T01:06:36
2018-07-21T05:26:16
PHP
UTF-8
Python
false
false
113
py
sol.py
url = 'https://github.com/PDKT-Team/ctf/blob/master/fbctf2019/hr-admin-module/README.md' print 'hr_admin_module'
b12a3593c049245c4d4765665275afbddd3cffb1
34ddb81af1be500841ba108775b63ff53afbb19e
/src/dilap/BROKEN/toremove/tform.py
ada3401aeb61d1e52a23b026cdd31c3e3b93b505
[ "MIT" ]
permissive
W3SS/dilapidator
0f84ce1dc5b70a3b826934d81c08a853bf98c6b3
323595364b934ea5d9f979603c0f49da8640d41f
refs/heads/master
2021-06-21T07:08:55.461605
2017-07-04T14:33:23
2017-07-04T14:33:23
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,427
py
tform.py
import dilap.core.base as db import dilap.core.vector as dpv import dilap.core.quaternion as dpq __doc__ = '''A transform class which supports hierarchy''' class tform(db.base): '''tform represents a transform with position, rotation, scale, parent, and children''' def __str__(self,b = 0): strr ...
300712bee9718e05179cb5bee9e20d9f1eb80cb7
e9f7af56a6b6e7dee23c0aa4d49fe3b4bff2ae38
/script/text_generation.py
7072b3b8bd1826e7590aa026b78a9183e6c61910
[]
no_license
abevieiramota/challenge-webnlg
ee88d56f2a2c1622e3b8ff106683517f5f9a1fd0
42da2068d6356820d4811081f3ad76552dd74033
refs/heads/master
2021-06-16T11:46:53.555897
2019-07-12T13:56:57
2019-07-12T13:56:57
133,352,865
5
0
null
null
null
null
UTF-8
Python
false
false
2,418
py
text_generation.py
class TextGenerator(): def __init__(self, content_selection_model, sentence_generation_model, lexicalization_model, discourse_structuring_model, sentence_aggregation_model): self.content_selection_model = content_selec...
1e94658f664373c905bc32a8e1d14299b082de53
dc9b0f8e487b5e198ff648f94071ab1cea4c39ad
/apps/league/static.py
031b10a7b6c7e096c573b8ac5b94b66aebd83578
[]
no_license
mehdi1361/backend_aghigh
aadc37388c0606f20804cbab14f2171d495b93f3
a95addbca0b25b99da920721c078f1c01466f09b
refs/heads/master
2020-06-12T00:39:06.272492
2019-07-11T20:46:26
2019-07-11T20:46:26
194,138,167
0
0
null
null
null
null
UTF-8
Python
false
false
1,453
py
static.py
MIN_POINT_CITIZEN = -1 MIN_POINT_PROVINCIAL = -1 # MIN_POINT_NATIONALITY = 50000 MAX_SAME_POINT = 50 MIN_SAME_POINT = 50 # bartarin haye keshvari hich farghi ba 50 madrese bartar nadarad list_column_league_student = [ { "title": "50 مدرسه برتر", "query_type": "top_school", "locked": False ...