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
0f1f6c1c05b9e50f6a5463dd3b74061968611e84
77f78826afe7a2bef94c8311d044b570ed01c145
/lab03_svm/utils/kernels.py
e3fb4d6284d77fa055b1f2814d2e67edb9ba08da
[]
no_license
doreshnikov/itmo-ml
3be64e9a72a4c6bd1609147bf175eae662bdabef
0be6acbc34d4b7a328cdef39ec5f4195b21f3d03
refs/heads/master
2023-02-19T12:21:15.357783
2020-12-28T11:46:45
2020-12-28T11:46:45
300,064,771
0
0
null
null
null
null
UTF-8
Python
false
false
649
py
kernels.py
import numpy as np def apply_kernel(x, y, kernel): xd = np.zeros((x.shape[0], y.shape[0])) for i, row1 in enumerate(x): for j, row2 in enumerate(y): xd[i][j] = kernel(row1, row2) return np.mat(xd) class Kernel: @staticmethod def linear(): def f(x, y): retu...
e9d7ccf872443f9e1d2f2d07f92922c5f52ea746
ae4f92973e5969779f9a1b1b095024427da4846d
/app/main/views.py
5682ca260129fb9c7930454aacea9c2abc71c192
[]
no_license
christiansheng/bookstore
0dbde5f26c2e68d9c7f3eb9ea96d8369d680de60
503e27a7cfd94e7abda0193344c4e7303b8cff0d
refs/heads/master
2021-01-01T17:10:27.173540
2015-08-22T16:50:46
2015-08-22T16:50:46
41,214,338
0
0
null
null
null
null
UTF-8
Python
false
false
507
py
views.py
# -*- coding: UTF-8 -*- from flask import request from flask import jsonify from pprint import pprint from flask import render_template, abort from . import main @main.route('/', methods=['GET', 'POST']) def index(): return render_template('index.html') # just for test purpose @main.route('/test', methods=['GE...
8666365ebd12205060b345dd1aa1b4df981f14e0
9a9dd943c71837bb58001f077d385710e9322e41
/dominion_simple_ai.py
56cbb0f7e266dea6e8f7beaac22b3a66411ad83f
[]
no_license
danwiesenthal/dominion_simple_ai
a571383b18263a1f0400865282f896d5894cb72b
2d2805d35e0e3bb893b45777dfeeb4785fbe5d99
refs/heads/master
2020-08-15T18:44:48.352012
2020-01-07T19:34:50
2020-01-07T19:34:50
215,389,989
0
2
null
2020-01-07T19:34:52
2019-10-15T20:25:12
Python
UTF-8
Python
false
false
6,891
py
dominion_simple_ai.py
from enum import Enum from collections import namedtuple import random from collections import Counter import subprocess def speak_str(s): """Utility function to have macOS use Text to Speech to speak a string""" torun = 'say "' torun += s torun += '"' print(f"(Speaking: {s})") subprocess.cal...
e555f98baadf674dc4c56631c19a90bfe923fb60
e182d0521988dfa651d5fdac647d1e3073da4386
/1. Iterations/BinaryGap.py
5565a15e0a8625b9f561a1816988727ed431deb3
[]
no_license
wsc9150/Codility
04fd7f17c3e8550f0d2b759e55d858c9716e576e
d92706095b85d03c09c974b898b8a9472d6fc0a0
refs/heads/main
2023-03-28T01:52:47.879725
2021-03-11T14:50:39
2021-03-11T14:50:39
339,359,650
0
0
null
null
null
null
UTF-8
Python
false
false
348
py
BinaryGap.py
# BinaryGap # Find longest sequence of zeros in binary representation of an integer. def solution(N): binary_num = bin(N)[2:] count = 0 gap = [0] for i in binary_num: if i == '0': count += 1 else: gap.append(count) count = 0 return max(gap) ...
45ce7673361ea550fd1178f622ee32da9ea51b17
4ad99e601b8e18c47a7a06c1e8f2cac455e580dc
/utils/make_vocab.py
5c32c8a6c6a00d7de3ac49ad8d10369265c5bddb
[]
no_license
zhaozhaoqueue/VQA
b50aa1a395c82cee41de823b97263c06589a8e9c
5d2384cd003c63a3459971698a50343e5315c7e1
refs/heads/master
2020-05-01T18:12:01.143957
2019-03-26T17:09:59
2019-03-26T17:09:59
177,617,989
1
0
null
null
null
null
UTF-8
Python
false
false
3,729
py
make_vocab.py
from data_provider import VQADataProvider import re import json import sys import os root_path = os.path.join(os.getenv("HOME"), "vqa") sys.path.append(root_path) def make_vocab(instance_dic, vocab_size=-1): """ Returns a dictionary that maps words to indices. The output dictionary is trimmed and reindex...
6acc205a164a3e4cb6e8faf820341d47843624ac
1aebe59f2f40a610b5ae31b37eabed1062692751
/Side/Play_Preprocess.py
e274cff359031109e83c033ad119f7c41e588d29
[]
no_license
wlu673/gumgum
3a132cb2cd7f630b114db36f42360d45f5ebdd7a
c250084e3542069ea379cde03d17eab9e68db533
refs/heads/master
2021-06-02T15:23:30.395044
2016-08-17T22:13:53
2016-08-17T22:13:53
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,404
py
Play_Preprocess.py
import multiprocessing from datetime import datetime from scipy.sparse import csr_matrix, vstack import numpy as np import os import json var_ = ["hour", "day", "cc", "rg", "margin", "tmax", "bkc", "typeid", "cat", "pcat", "domain", "bti", "bidderid", "verticalid", "bidfloor", "format", "product", "banner"] with open...
1d478213a562b4a453b754cf132661b40c870691
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_2692487_1/Python/Martial/a.py
9617b8d0bf19a9da1d826d63d04596184c83ea9f
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Python
false
false
537
py
a.py
import sys sys.setrecursionlimit(10000) for case_index in range(1, 1+input()): sys.stderr.write(str(case_index)+' ') A,N=map(int,raw_input().split()) s=map(int,raw_input().split()) s.sort() if A==1: res = N else: while s and s[0]<A: A+=s[0] s.pop(0) N -= 1 res = N for k i...
198286f8b06919d21588be453a1899a4843b9842
cc7c25fc7dfc19b4204a8d2689424faa002188b6
/pykeval/pykeval/frontend/ctypes_shim/translate.py
e9f31d9128540216ec519a33bd7c66fb0b025b7a
[ "MIT" ]
permissive
wuyadie/keval
ce7842f27ae10c796ad52e46bb9143a6d50b5470
73e2ccd5cbdf0cc7fc167711cde60be783e8dfe7
refs/heads/master
2023-08-07T08:22:56.475074
2021-09-17T19:09:06
2021-09-17T19:09:06
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,948
py
translate.py
import ctypes from dataclasses import dataclass from typing import Tuple, List from pykeval.frontend.broker_allocation import BrokerAllocation from pykeval.frontend.ctypes_shim.address import (get_native_pointer_type, get_is_valid_usermode_address, get_is_kernel_addres...
a96f3691ccb009446a1196a5dd14ff6931dd7332
33602feb1f18aa898055fa9da5692bc8f47548cd
/Webllistoerp/chat/views.py
5e2f907ad092844923dae36a6bff1a804c1b840f
[ "MIT" ]
permissive
Prakhar-100/DjangoProject
6a1f761a22aeff0dc75e7398623c099b1f396162
5030fabe038bd67af50364431705837aa0bde91b
refs/heads/main
2023-06-23T00:23:34.833491
2021-07-20T09:56:35
2021-07-20T09:56:35
353,611,592
0
0
null
null
null
null
UTF-8
Python
false
false
6,938
py
views.py
from .models import GroupMessage, ChatGroupList, OnetoOneMessage from django.views.generic.edit import FormView from django.shortcuts import render, redirect from django.http import JsonResponse from core.models import CustomUser from django.views import View import datetime def display_empname(): all_members =...
d4ba83d51e6a333bd08415b50935b409454a0c3b
e49e6bd752cf1bcda119aa59832ac010e3da496e
/API_4/common/http_request.py
9a43eae780e542772d7346fb163e6fa961203892
[]
no_license
dianku/python15-api-test
10ea701b007f2e0fcf17a1df80f388d9dd194112
ce725935f04c77968d36fcc6a7d9ab1e1096926f
refs/heads/master
2022-12-15T23:37:11.844675
2020-04-25T15:34:29
2020-04-25T15:34:29
254,331,392
1
0
null
2022-12-08T09:39:08
2020-04-09T09:45:09
HTML
UTF-8
Python
false
false
3,481
py
http_request.py
# -*- coding: utf-8 -*- # @Time : 2020/4/6 15:52 # @Author : Bella # @Email : 1171208366@qq.com # @FileName : http_request.py import requests from API_4.common import logger from API_4.common.config import config #这个config是对象的引用 logger = logger.get_logger(__name__) class HttpRequest: #对类进行封装 """ 使用这个类的reque...
d8b5c497f0498b1836d3c62805d98a86c790eefc
a25f379bf4ab36547e2a6fa59c4fbea78d0bd729
/pev_photons/systematics/cluster_sens.py
4d7441627dbc655496ce01943cc38ce32eeddecc
[]
no_license
zdgriffith/pev-photons
1275464b81aef6f0e7a8c8440dadb6c24581ee7c
01c68fdafe398c1855329c25ccfba07b08a9a9e0
refs/heads/master
2021-07-26T00:56:19.689628
2018-11-17T17:04:06
2018-11-17T17:04:06
100,307,872
0
0
null
2018-08-15T19:12:19
2017-08-14T20:43:03
Python
UTF-8
Python
false
false
1,745
py
cluster_sens.py
#!/usr/bin/env python ######################################################################## # Submit a dagman to the cluster evaluating the sensitivity for a fine # grid (0.1 degrees) in declination. ######################################################################## import argparse import os from pev_photon...
b9c2d53348bec1602d276adbb1b4d56f0eb876c9
64d0c12d3da6fc33c2014e632d99c8047e686973
/setup.py
451a64fa0f9efbef0d697c3b85422b40d54bd712
[]
no_license
DiscoverSDK/pysimplib
0097c4c7d89c52484245c9e747c394f7d8583e0c
1bfc65df6e26efe748b797de4ee7d8f7dc7c2b35
refs/heads/master
2020-06-15T09:13:05.367274
2016-12-04T21:04:46
2016-12-04T21:04:46
75,307,135
1
1
null
null
null
null
UTF-8
Python
false
false
435
py
setup.py
from distutils.core import setup setup( name = 'pysimplib', packages = ['pysimplib'], # this must be the same as the name above version = '0.2', description = 'A tutorial lib', author = 'Liran BH', author_email = 'liran@discoversdk.com', url = 'https://github.com/DiscoverSDK/pysimplib', download_url = '...
174a21ce22fb86e085b99046b3bc077b479301f8
787bc6d9d328e5d0ca7ff6c2b0a0579f486452ba
/feature_calculators.py
6052343c1e865653a2de5d81dad43391b246371c
[]
no_license
concatto/emotions-eeg
58f509de172ff03ce9770c4245779dc23f0da821
c5d1ddaf1c0a9948e6530e4a60bec66203b2683b
refs/heads/main
2023-06-03T03:08:57.982070
2021-06-16T12:23:40
2021-06-16T12:23:40
319,338,533
0
0
null
null
null
null
UTF-8
Python
false
false
1,709
py
feature_calculators.py
from scipy.fft import fftfreq import numpy as np from constants import bands def diferential_entropy(fft_coefs, N, sf, band): # Find closest indices of band in frequency vector # get band boundaries low, high = band # get frequency axis freqs = fftfreq(N, 1/sf) # get indexes for the given frequne...
9e7fca8b5c7b7e606a3f13ff58d56f2b27a5d931
afd2087e80478010d9df66e78280f75e1ff17d45
/torch/package/_package_unpickler.py
b00210e3c191e5dfaf94170e083b56ebc44d5bf2
[ "BSD-3-Clause", "BSD-2-Clause", "LicenseRef-scancode-secret-labs-2011", "LicenseRef-scancode-generic-cla", "BSL-1.0", "Apache-2.0" ]
permissive
pytorch/pytorch
7521ac50c47d18b916ae47a6592c4646c2cb69b5
a6f7dd4707ac116c0f5fb5f44f42429f38d23ab4
refs/heads/main
2023-08-03T05:05:02.822937
2023-08-03T00:40:33
2023-08-03T04:14:52
65,600,975
77,092
24,610
NOASSERTION
2023-09-14T21:58:39
2016-08-13T05:26:41
Python
UTF-8
Python
false
false
965
py
_package_unpickler.py
import _compat_pickle import pickle from .importer import Importer class PackageUnpickler(pickle._Unpickler): # type: ignore[name-defined] """Package-aware unpickler. This behaves the same as a normal unpickler, except it uses `importer` to find any global names that it encounters while unpickling. ...
4413aa9bb3f05328adcb4ed5aece83d3085c83a9
d32c0f5a81e2c0f32289edef261ca5171282db7b
/questions/sort_and_search/sub_sort.py
2b53dea70c75824cf20217a0afb836196a5f7175
[]
no_license
mpettersson/PythonReview
5a9c863a298855d4949fb06c52e31c8a114736c3
14be619208dfffeafcab1a6ba5c3ff0b1e31c0b5
refs/heads/master
2022-03-05T00:18:42.397061
2022-02-19T15:15:35
2022-02-19T15:15:35
233,277,588
0
0
null
null
null
null
UTF-8
Python
false
false
883
py
sub_sort.py
""" SUB SORT Given an array of integers, write a method to find indices m and n such that if you sorted elements m through n, the entire array would be sorted. Minimize n - m (that is, find the smallest such sequence). Example: Input = [1, 2, 4, 7, 10, 11, 7, 12, 6, 7, 16, 18, 19] Out...
87ba16d1bc156b4584ac88faa041f15e6527e690
09c8e6631c8c442d91c3b816649d1b31d07bf2f7
/Fuzzy/pm4py/util/lp/factory.py
3d95a752ae0f85e4d71c593e1cc6c2f90b565f88
[]
no_license
griveralazo/fuzzy-algorithm
9997d85e1c573c76af04cf511bfebbf1d6ff2cfb
b03c13294ab2999be1446e6208280e355f7515ba
refs/heads/master
2022-02-24T01:23:53.728626
2019-08-09T16:39:32
2019-08-09T16:39:32
201,497,472
0
0
null
null
null
null
UTF-8
Python
false
false
2,234
py
factory.py
from pm4py.util.lp.versions import cvxopt_solver from pm4py.util.lp.versions import pulp_solver CVXOPT = "cvxopt" PULP = "pulp" VERSIONS_APPLY = {CVXOPT: cvxopt_solver.apply, PULP: pulp_solver.apply} VERSIONS_GET_PRIM_OBJ = {CVXOPT: cvxopt_solver.get_prim_obj_from_sol, PULP: pulp_solver.get_prim_obj_from_s...
b533b47d2d6173d1c6cba1e320207ed9d0e13af0
324be50e14cf01743bb198effe3dba1de6c89e93
/src/Mutation/__init__.py
6160823a24c103b73321303e5f6b35860f82c8a7
[]
no_license
fhfhfh999/Graduation
2b09ff5baaca9643522f870b981186010c212852
ec18f057cecbcf596b62d29e24aea34647bdd0b0
refs/heads/master
2021-03-04T18:15:56.384691
2020-04-28T02:23:53
2020-04-28T02:23:53
246,055,046
0
0
null
null
null
null
UTF-8
Python
false
false
75
py
__init__.py
""" this package change the Chinese input into similar similar sentence """
d8882dce1da7d7b2772988792357deb220497ade
00ec0c8b3c802a9305f46be6dbe76b57a238d3d2
/smile_agent/smile_agent_ask/models.py
668a3b482ee631b35d7d615fcdddc4160bbdac10
[ "MIT" ]
permissive
Opportunity-Hack-2016-SJC-SVCC/TeamSmile
403781928fe88c3aa85b7191f8f6b11fa947864c
c13697197813187a0fed0c66572c8c744138587e
refs/heads/master
2021-05-03T19:07:39.366952
2016-09-26T00:21:34
2016-09-26T00:21:34
69,121,007
0
1
null
null
null
null
UTF-8
Python
false
false
511
py
models.py
from rest_framework import serializers from django.db import models import ast # Create your models here. class Interpreter(models.Model): class Meta: managed = False time = models.TextField(blank=True, null=True) number = models.TextField(blank=True, null=True) locations = models.TextField...
34683ed51b20c7c67aa39d0ed2645de31ccd40ee
5162e738de99aa00aaf92a20dc773f9a2313dc08
/ECC_settings.py
aa0a621ecf4f4d76b384da8c114550ba0d334cae
[]
no_license
santamilla/Comments_survey
61f4c919b84ed09a1247217d84b12b3b653f9bd0
6e644fa5328fd74a3bf2f4df8e1c613e9fd54a53
refs/heads/master
2021-08-20T05:43:55.238736
2017-11-28T09:25:10
2017-11-28T09:25:10
112,314,126
0
0
null
null
null
null
UTF-8
Python
false
false
184
py
ECC_settings.py
cc_host = '10.0.0.211' cc_port = 6500 article_type = 'text' category_relevancy_type = 1 use_relevancy_cutoff = False cat_default_relevancy_cutoff = 0.0 skip_qualifier_matches = False
ab28223de4382c24dc7dd6d9756278de2733417a
ac402646066dc70af44b5850a38ba094f8559c38
/suchen.py
2748ee56f90dfb90f6117157831bec73cd86a465
[]
no_license
Bondzio/deepLearning
1b1f40ecb3361b157990ee82d7e7250ffd68da1b
87c4bdb2f16710bb845a056dac2a1ba578d8467c
refs/heads/master
2021-09-15T21:23:47.180108
2018-06-11T05:15:38
2018-06-11T05:15:38
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,297
py
suchen.py
#coding=utf-8 from __future__ import print_function import sys import argparse import gensim from gensim.models import word2vec from gensim.models import KeyedVectors #print "=========================================" def parseArgs(): parser = argparse.ArgumentParser(description='Sucht in einer word2vec bina...
1ffdc2845bc503c0a30407de444a152f8cc68d57
fed6c6bdb6276d195bc565e527c3f19369d22b74
/test/Fourier_Quad_pts_check/bias_check.py
cd466732f00a177c1539f855219ab908e9139539
[]
no_license
hekunlie/astrophy-research
edbe12d8dde83e0896e982f08b463fdcd3279bab
7b2b7ada7e7421585e8993192f6111282c9cbb38
refs/heads/master
2021-11-15T05:08:51.271669
2021-11-13T08:53:33
2021-11-13T08:53:33
85,927,798
0
0
null
null
null
null
UTF-8
Python
false
false
1,711
py
bias_check.py
import os my_home = os.popen("echo $MYWORK_DIR").readlines()[0][:-1] import numpy from sys import path, argv path.append("D:/Github/astrophy-research/mylib") path.append("D:/Github/astrophy-research/multi_shear_detect") path.append('%s/work/mylib' % my_home) from Fourier_Quad import Fourier_Quad # import h5py # from pl...
7e5cf782692d9cfb2718b2efcc83efa2ecb815cd
f5624e046836723fa065d47d11d52b8b3e448e7b
/old/pgnumpy/pgnumpy/__init__.py
85ad9614fcb33186d6f9f150f73cdd8d9f0aaa93
[]
no_license
esheldon/espy
99daafcf9f81b1465994a0e717095a8ea0bcbfc8
090e6f4c65c2dc3acef3c2d98b2971d8c1002787
refs/heads/master
2023-07-20T23:49:18.662509
2023-07-12T15:40:24
2023-07-12T15:40:24
1,374,930
7
0
null
null
null
null
UTF-8
Python
false
false
2,462
py
__init__.py
""" Package: pgnumpy Description A class and a set of functions for interacting with a PostgreSql database. A C++ extension module allows returning results as a NumPy array. Numpy arrays can also be written to tables. The workhorse class is called PgNumpy This class has limited functio...
34f98d4a6a15c9a7b42f237cab204b736dc97136
f44e5f3c73d91786664c1a966b415ed24a1ae829
/clarico_cms_blocks/__manifest__.py
124e1fcb33adb01c31cbf3890f6a703d9afc508e
[]
no_license
mayankvara/WEB
42b827574a78d4612ed8de11bb3aba48ce229cb7
bbb032d452b84c07550579f8006b96a4dba6ebb0
refs/heads/master
2020-04-06T09:43:24.216499
2018-05-25T09:17:19
2018-05-25T09:17:19
157,354,108
1
0
null
null
null
null
UTF-8
Python
false
false
737
py
__manifest__.py
{ # Theme information 'name' : 'Clarico CMS Blocks', 'category' : 'Website', 'version' : '1.0', 'summary': '13 CMS Building Blocks', 'description': """""", # Dependencies 'depends': [ 'snippet_style_1', 'snippet_style_2', 'snippet_style_3', 'snippet_style_4'...
c27c2df1830f066ca4f973c46967722869090d05
bf5e4c01c5c726268277b1689bc2a31e3806f595
/Config.py
e85f37a0a46dd17f72bcf5708db53aee4643291e
[]
no_license
voxmenthe/SequenceToSequence
82c5c91f0ac14ba4618a5872a884c8ce52fd6405
a7ef4912a81993980f02cb4c6fac6a6c0073d9a8
refs/heads/master
2022-11-28T02:50:30.558267
2017-02-25T08:06:48
2017-02-25T08:06:48
82,859,360
0
2
null
2022-11-26T08:17:20
2017-02-22T22:35:17
Jupyter Notebook
UTF-8
Python
false
false
1,466
py
Config.py
import tensorflow as tf class Config(object): # Source and Target files from_train_file='data/dev.en' to_train_file='data/dev.vi' # Special characters and ID's _PAD = b"_PAD" _GO = b"_GO" _EOS = b"_EOS" _UNK = b"_UNK" _START_VOCAB = [_PAD, _GO, _EOS, _UNK] PAD_ID = 0 GO_I...
153e7e66e2b796d011b78aed102d30e37bb0b80f
ce6d81e277a54fee6cc81e8522effb2a142426a1
/ddpg/main.py
920db16e13a314ee8cba343ff80d21a892db4c0e
[]
no_license
cthorrez/ml-fun
385f372980f0f26749e51c2ee4e862e28d2adf3d
8e336fa416685e53971f3bedee0c0a5780355548
refs/heads/master
2020-04-13T10:23:47.544876
2019-01-20T22:41:28
2019-01-20T22:41:28
163,138,628
8
2
null
null
null
null
UTF-8
Python
false
false
743
py
main.py
import gym from ddpg import DDPG def main(): #env = gym.make('LunarLanderContinuous-v2') #log_dir = 'log/lander' env = gym.make('Pendulum-v0') log_dir = 'log/pendulum' # paper settings # agent = DDPG(env, sigma=0.2, num_episodes=1000, buffer_size=1000000, batch_size=64, # ...
917a291c7b62dee392d7411c3e039949d74d7af8
d12ec5c0a7c5119905e9f455f0057686439f6d5b
/swarmlib/cuckoosearch/nest.py
28462913146815182247a0ff105824e70f0c06c3
[ "BSD-3-Clause" ]
permissive
mbjallow6/swarmlib
dc51c091bf585d7c14a8f8d609b8d76b836de046
1fd9094c21b180b819ed5ad6cb658c9a985ed3af
refs/heads/master
2020-12-15T10:10:04.545516
2020-01-19T21:13:22
2020-01-19T21:13:22
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,432
py
nest.py
# ------------------------------------------------------------------------------------------------------ # Copyright (c) Leo Hanisch. All rights reserved. # Licensed under the BSD 3-Clause License. See LICENSE.txt in the project root for license information. # ---------------------------------------------------------...
6455741bbda42b9d84428545ddd50a5d1b54a7ba
d8024df8d9c256fed952a21316c478ca6c3d146f
/gui.py
f59b350d1cdad3af5995bd85d993202dd780de4a
[]
no_license
aThorp96/ChadBotX
479cf49ddf4553a8694cac6e07d5d09e729eb3f6
06d2892d426e34c6987c2f4ea716951b3d9b119b
refs/heads/master
2021-06-25T12:59:59.015907
2020-12-05T19:24:57
2020-12-05T19:24:57
179,770,091
3
0
null
2019-04-06T15:46:37
2019-04-06T00:03:19
Python
UTF-8
Python
false
false
2,148
py
gui.py
import tkinter from tkinter import ttk, filedialog, messagebox import serial.tools.list_ports from PIL import ImageTk, Image from read_bytes import read root = tkinter.Tk() root.title('ChadBotX') # Define constants for mode selection MODE_RECORD = 1 MODE_PLAYBACK = 2 # Define gui state portname = tkinter.StringVar(r...
e280b003c95681ed4a887b0939077efeac9deefe
fadaae254715da6fc162f6cc10a048878a1f3564
/Clase 1/Ejercicio2.py
a9b9c64b802d0f9c6bf2e6ef51ae3015151ada17
[]
no_license
LucianoPer/Curso-IA
6758799580345e58b95094c16ab54fc73e1aba43
f6748b9d75d8ed143baaf81d91dab7c689e71367
refs/heads/master
2022-12-02T11:41:11.913368
2020-08-16T22:21:15
2020-08-16T22:21:15
278,736,191
0
0
null
null
null
null
UTF-8
Python
false
false
219
py
Ejercicio2.py
import numpy as np from Ejercicio1 import norma_l2 def sorting_l2(mat): mat_l2 = norma_l2(mat) mat_sort_index = np.argsort(mat_l2) mat_sort_l2 = mat[mat_sort_index,:] return mat_sort_l2[::-1]
7aba77137b96071101078c38c1c9397bf837d92a
cad2120482bba54ca26d373d28a683e56095ddd8
/isd0702b.py
2d9a15a7066d4c13749849cfb1b64f4ed8cdf827
[]
no_license
DJRockyFresh/isd_week_7
7c94765851279c59de17110971b21959a38a34b6
78371f529d9f677012fe572de0ce2e42d80c06a2
refs/heads/master
2020-04-03T16:01:46.003331
2018-11-13T14:51:42
2018-11-13T14:51:42
155,387,919
0
0
null
null
null
null
UTF-8
Python
false
false
58
py
isd0702b.py
a = [66.25, 333, 333, 1, 1234.5] a.index(333) print(a)
a2e77298059104b403555af95430d7995f8a697b
765847907a0c752243be8e6958540faa21060405
/annotator_supreme/views/webapp/login_view.py
3a5e1333cca35a3a3ba14d43a352f9a1129de9ad
[ "MIT" ]
permissive
meerkat-cv/annotator-supreme
8a3fe1a55887d71cb701b25f3874d3aa81df2d65
36f32834078b3c8b0ae5e59985848248265ac802
refs/heads/master
2020-06-15T10:42:34.925166
2018-04-17T13:40:42
2018-04-17T13:40:42
94,135,056
5
1
MIT
2018-01-11T19:56:19
2017-06-12T19:56:47
HTML
UTF-8
Python
false
false
1,790
py
login_view.py
import flask from flask.ext.classy import FlaskView, route, request from annotator_supreme.controllers.user_controller import UserController from annotator_supreme.views import view_tools from annotator_supreme.views import error_views from flask import render_template, flash, redirect, url_for from annotator_supreme i...
96dfc2d5422775d391ace25b119f447c8e19beb3
dfdf7d61a8d5e8cb037b4b0c2f7897991ea2aab5
/dfcleanser/sw_utilities/sw_utility_census_model.py
cb99030d2b91181f7f353b1f0fdcbb6c61992fa4
[]
no_license
RickKrasinski/dfcleanser
585b9eac2ca571f4f8aea793460fbc62c36d8da7
1873b7c43b1353937cfea58f74329b2b4e58bf9f
refs/heads/master
2023-04-16T06:13:36.354234
2023-04-07T02:50:26
2023-04-07T02:50:26
149,837,166
0
0
null
null
null
null
UTF-8
Python
false
false
687,126
py
sw_utility_census_model.py
""" # sw_utility_census_widgets """ # -*- coding: utf-8 -*- """ Created on Tue June 6 22:00:00 2019 @author: Rick """ import sys import os import dfcleanser.common.cfg as cfg this = sys.modules[__name__] DEBUG_CENSUS = True DISPLAY_MAIN = 0 DISPLAY_DOWNLOAD_...
5cf9e9a4b7f9388c1a9c273529b2b7647b6e2812
7ffd03850e17ca73bba2dd84cf8f4ca735b69cd1
/main.py
b2d5dac75d1d15df7a645375289f5aa4a6497f45
[ "MIT" ]
permissive
sshubhamk1/pyCalculator
00c802ee9f9309603383929914f64c75afdb9d34
35737a14e12140c6f4936b4498858320c4616577
refs/heads/master
2022-10-08T07:23:51.462914
2020-05-24T09:43:52
2020-05-24T09:43:52
266,507,652
0
0
null
null
null
null
UTF-8
Python
false
false
6,881
py
main.py
#import module from tkinter import * import math def sums(a,b): return a+b def diff(a,b): return b-a def mult(a,b): return a*b def divs(a,b): return a/b def mod(a,b): return a%b def power(a,b): return a**b def sqrroot(): return math.sqrt(a) def absolute(a): return abs(a) de...
a8d5ce579fea72391e8d593612994682eb3d660e
5c94e032b2d43ac347f6383d0a8f0c03ec3a0485
/KeyLab_mkII/view_control.py
e9aa202458a2da39bc69c035beb6714a3307eafe
[]
no_license
Elton47/Ableton-MRS-10.1.13
997f99a51157bd2a2bd1d2dc303e76b45b1eb93d
54bb64ba5e6be52dd6b9f87678ee3462cc224c8a
refs/heads/master
2022-07-04T01:35:27.447979
2020-05-14T19:02:09
2020-05-14T19:02:09
263,990,585
0
0
null
2020-05-14T18:12:04
2020-05-14T18:12:03
null
UTF-8
Python
false
false
1,487
py
view_control.py
# uncompyle6 version 3.6.7 # Python bytecode 2.7 (62211) # Decompiled from: Python 2.7.17 (default, Dec 23 2019, 21:25:33) # [GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.33.16)] # Embedded file name: /Users/versonator/Jenkins/live/output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/KeyLab_mkII...
a44b0499f6ca65445b2d8abd25ab6369de576709
1c7a47b8db7c1d59058dc3f02d2ba32c27c0f2ae
/Sessions/Will Velida/notebooks/MachineLearningDemo.py
04ce99f3d7d8e0452db9714bde463d2aebd8986b
[]
no_license
sam-cogan/2019
ae2b3ed3cc39d8678ecabe080404838eb8990f94
2c540e03c314714b7427e4b3e8bdc2f0bdaa8abb
refs/heads/master
2020-06-13T23:55:35.743192
2019-07-02T09:10:17
2019-07-02T09:10:17
194,828,376
0
1
null
2019-07-02T09:06:02
2019-07-02T09:06:02
null
UTF-8
Python
false
false
2,206
py
MachineLearningDemo.py
# Databricks notebook source from pyspark.ml import Pipeline from pyspark.ml.classification import DecisionTreeClassifier from pyspark.ml.feature import StringIndexer, Tokenizer, HashingTF from pyspark.ml.evaluation import MulticlassClassificationEvaluator from pyspark.ml.tuning import CrossValidator, ParamGridBuilder ...
37524fe4a81d135cb4f16b9257abd8405be0eaad
f63fc7b1a975ec25a1446636e80c421e2ae295b6
/ConnectedComponents.py
b294c08aef76cbe1e03f45ac2998936feb010c94
[]
no_license
Shaalan31/WriterIdentification
0b2e92f900109d742b2df178a620df0c6eb91827
8bbe7f197665a583836826501ead9650966da385
refs/heads/master
2020-04-08T03:33:40.680892
2018-12-22T16:43:25
2018-12-22T16:43:25
158,980,893
0
0
null
null
null
null
UTF-8
Python
false
false
1,949
py
ConnectedComponents.py
import cv2 import numpy as np import math # @returns word_dist within_word_dist total_transitions sdW MedianW AverageW threshold def ConnectedComponents(contours, hierarchy, img, image_shape): mask = (hierarchy[:, 3] == 0).astype('int') contours = contours[np.where(mask)] bounding_rect = np.zeros((len(con...
163b9a41e426b6e819d75d107104e249c0eaa5b7
7fc9ebeb3b81da59a62a939d573d83cc504b6543
/palindrome_partition.py
3f7ac30801e407b2dff7be9688c8ba424f921e1d
[]
no_license
Qinode/leet_q_python
ae45896aba7911353e2f05f51b60a32ee7b03c84
9c9ff536a23f76ae76ae69ce840fa69ebe1ab313
refs/heads/master
2022-01-17T21:15:04.607397
2019-07-03T21:46:21
2019-07-03T21:46:21
117,480,249
0
0
null
null
null
null
UTF-8
Python
false
false
651
py
palindrome_partition.py
class Solution(object): def partition(self, s): """ :type s: str :rtype: List[List[str]] """ if s == '': return [] else: acc = [] self.backtrack(acc, [], s) return acc def backtrack(self, acc, l, s): if s =...
c3a399840b823e53da1f2566312bc8013ebe65eb
ef5a23674e1e2da9eec11c5edc87cedabd477c3e
/python/datming/graph/ranking/text_rank.py
68a4e9feb3feb8ed5b80c738b9f4657222392f27
[ "Apache-2.0" ]
permissive
Yuhan-Wg/massive-data-mining
890fcfda131e0af37474f46573589fc95959ae64
b1f261e73a8d3a8e1f22dee0a1a975de3da2e7ce
refs/heads/master
2020-07-12T11:58:29.607793
2019-09-02T02:41:33
2019-09-02T02:41:33
204,815,163
1
0
null
null
null
null
UTF-8
Python
false
false
60
py
text_rank.py
""" TextRank. Order the words in an article or articles. """
201d713ac3809fca5b4f2d01bd3b88c31047500e
b6aa86e7ac92c188532f0508e12e2bb0e269cf49
/Proiect/main.py
76117ff8413851de00c36751dbe71733d53fbe7d
[]
no_license
RaresCristescu/cryptography
864270c0df98090344d36af479a0dc3729772214
c9014f5c0b24be34835c9c11a1e3bb6d20ae440d
refs/heads/main
2023-07-28T06:29:26.567514
2021-09-07T11:38:55
2021-09-07T11:38:55
403,953,506
0
0
null
null
null
null
UTF-8
Python
false
false
10,500
py
main.py
import math import sys from easygui import * ############################################################################################################################# #Am ales pentru acest proiect sa criptez textul clar cu cifrul Bifid, dupa care sa criptez rezultatul cu cifrul Nihilist. #Decriptarea este in...
c100794dfb9a5f9ce0f2a88e7f2b2c2a9c700f8d
cac1c8fdcff5a33196c5ea6c611cddcc17291ed1
/wang/wang/spiders/wang_spider.py
5d9500cd72729de5c728f02c97c3b5ee8356eb71
[]
no_license
s570504071/Scrapy
35f73be15817ea4eb1693e0988a70d75f4c1eeca
ee53bd46c1758c9ab4ed13ce6ec6005bba1b3171
refs/heads/master
2021-09-11T23:49:40.521224
2018-04-13T09:28:55
2018-04-13T09:28:55
107,762,197
0
0
null
null
null
null
UTF-8
Python
false
false
1,702
py
wang_spider.py
# ccoding=utf-8 # 该文件夹下不能有与项目同名的文件 """ 方法一有错 Traceback (most recent call last): File "d:\python27\lib\site-packages\twisted\internet\defer.py", line 653, in _runCallbacks current.result = callback(current.result, *args, **kw) File "d:\python27\lib\site-packages\scrapy\spiders\__init__.py", line 90, in parse ...
e097dd538e24424be3ce64a6a2f727a5d735c302
b3e15dd9f3e922410f8bcacdd08764e730c6768b
/obpacient/serializers.py
bd2ddf83ae33e030b829570f7c00f012548d34b9
[]
no_license
rickycm/OB
813c3aebd633827bbd86f2302456ba63f60d26e8
cbe14f2763b03538cb87c5c0ff89a210072a7f39
refs/heads/master
2021-01-13T01:55:43.924374
2014-05-15T02:42:35
2014-05-15T02:42:35
null
0
0
null
null
null
null
UTF-8
Python
false
false
207
py
serializers.py
__author__ = 'Aston' from rest_framework import serializers from models import patient class PatientSerializer(serializers.ModelSerializer): class Meta: model = patient #fields = (...)
0a60551c6a64760e1093751426578d916d55a323
db83a63708a3f2d37b400bc98e0619ee5f512fb8
/sec19_webdev/main.py
2fc1c2f3f12ce75daad73c342ccfc3961b55de9b
[]
no_license
DadongZ/python_dev
b2c21bd856464d7682f49a4c753a0c2e22e63beb
08726e78a8e27601fab4ed139bb09ef9566ef7cd
refs/heads/master
2022-12-17T22:57:23.670193
2020-09-28T22:33:23
2020-09-28T22:33:23
295,881,190
0
0
null
2020-09-24T14:55:45
2020-09-16T00:28:24
Python
UTF-8
Python
false
false
520
py
main.py
from flask import Flask, render_template app = Flask(__name__) @app.route('/') def hello_world(): return render_template('index.html') @app.route('/<username>/<int:post_id>') def hello_user(username=None, post_id=None): return render_template('index.html', name=username, post_id=post_id) @app.route('/about.h...
d9ee7d79df269de20dcf2f26aba8702a80d57e92
e60dd32858b162eb28e673ac9cfdb1b2a403c695
/combiningparams.py
8847cef5d666afc9c866e38cfa9412dce8499bbf
[]
no_license
Hemanthtm2/playing_python
8d3419a46d50b2801283aa020be89a8003d4ad31
cb896916c6d84c564f7036a4ed6a2a5481bf2fd6
refs/heads/master
2020-05-23T13:10:51.753218
2019-02-20T21:52:34
2019-02-20T21:52:34
186,767,575
0
0
null
null
null
null
UTF-8
Python
false
false
200
py
combiningparams.py
#!/usr/bin/python def func(a,b,c=20,*arg,**kwarg): print('a,b,c',a,b,c) print('args',arg) print('kwarg',kwarg) func(1,2,3,*(10,20,30),**{'A':30,'B':40}) func(1,2,3,10,20,30,A=30,B=40)
f0e828246ea8330da27acde22ffddce8c6b9f77b
35eb21804b1ce117dc414366eea2e6e71ce71f13
/test.py
d0e23de07346fd2b716c77c0a066c3f38838cb7c
[ "MIT" ]
permissive
BicodeCosmique/bicode
f39d72127da790a54a9a91a6537d4f695418262e
e2faf8a99d4aa3e55575fb28214a3448299060e6
refs/heads/main
2023-08-11T17:42:48.326336
2021-09-30T20:35:52
2021-09-30T20:35:52
412,217,765
0
0
null
null
null
null
UTF-8
Python
false
false
22
py
test.py
print("BOB".lower())
d66aac74e363516888d69109bb25c26bce24ee77
1ba49846832c1529b596bcb311c819ff8e7b448c
/Server/app/fdm.py
81b20f0bb2805f4dbc68c240c2d3b8293bbc5892
[]
no_license
hamigua85/U3.Cloud.Fac
a4ba244b17926ed195044638c53afc7d3cceea05
36dd66a136e179acf689f761dfe36b62136db9c9
refs/heads/master
2021-01-20T12:24:32.033622
2017-02-28T06:32:49
2017-02-28T06:32:49
82,658,196
0
0
null
null
null
null
UTF-8
Python
false
false
899
py
fdm.py
# -*- coding:utf-8 -*- machine_state = {1: "ready", 2: "preoperation", 3: "working", 4: "done", 5: "fault"} machine_type = {1: "fdm"} color = {1: "white", 2: "black", 3: "yellow", 4: "blue"} def fdm_data_parser(index, addr, data): state = dict() state["id"] = index state["address"] = addr state["state...
392f7d9bd083b7f417c5f8c72f81f30888643012
3b792d2396a9ff5fe9a2d136fdce5aa6a6c438a9
/src/flowcv/formulas.py
3ebbf2bf30de7a9979cc0fa89f57a4253a5d9cd7
[ "MIT" ]
permissive
skaaldig/flowcv_calculator
251f2fda6b4c5169f9e2c4665194723cb3c6495f
3c92786c13120c2041a6c852241fc633a98d6dd6
refs/heads/master
2020-04-05T04:47:55.170319
2018-11-15T21:57:16
2018-11-15T21:57:16
156,567,279
0
0
null
2018-11-07T15:32:35
2018-11-07T15:28:16
Python
UTF-8
Python
false
false
973
py
formulas.py
import math def liquid_cv(inlet, outlet, flow, gravity): cv = flow * math.sqrt((gravity / (inlet - outlet))) return cv def liquid_flow(cv, inlet, outlet, gravity): flow_rate = cv * math.sqrt((inlet - outlet) / gravity) return flow_rate def gas_cv(flow, inlet, outlet, temp, gravity): if outlet...
06d7123ed868704e874f55be9476585018a14289
e2c269c44c08e8783d5bbad81565613128ea061d
/valid.py
957f89a66a07655210a57adc9d9b5411bd7d4873
[]
no_license
ravenusmc/video_games
3ab48279c5b5f1dc8d16d2b9650e3cbc9472077d
117f68a5d0303f8d5dac21f4180c734169a5f1db
refs/heads/master
2021-01-12T01:56:33.681500
2017-01-17T15:36:25
2017-01-17T15:36:25
78,447,732
0
0
null
null
null
null
UTF-8
Python
false
false
483
py
valid.py
#This file will contain all of the functions for validation in my program def main_valid(choice): if choice == 1 or choice == 2: return True else: return False def specific_information_valid(option): if option == 1 or option == 2 or option == 3 or option == 4: return True else:...
77a8fcc5796f84472b32fb45cac1d6047aff8a94
714c4a7d00d1d9ca32dfae5072716c3833b5b7be
/read_gcs_using_wildcard.py
690ae6aece668a4237fc9fa5d0beafbd2f476269
[]
no_license
pavan-kattamuri/dataflow_input_patterns_1
67d981a358d4685a71407f07f9458d95e3f07cce
e368b8e4a57a53baecc0940a350e01b8aa1dc041
refs/heads/master
2021-05-17T10:51:09.298224
2020-03-28T08:11:22
2020-03-28T08:11:22
250,744,214
0
0
null
null
null
null
UTF-8
Python
false
false
886
py
read_gcs_using_wildcard.py
import json import argparse import apache_beam as beam from apache_beam.options.pipeline_options import PipelineOptions, SetupOptions from apache_beam.io import ReadFromText, WriteToText def run(argv=None): # argument parser parser = argparse.ArgumentParser() # pipeline options, google_cloud_options ...
341ef2c605460a71686600790dce5d1366df25c2
37c2298bcebb61c29417eed2b9ae2551e0273eeb
/train_vb.py
d0def475ee7766bf428e89d462ca318cf4ec73e9
[]
no_license
falkaer/em4kde
1589efa48ae9fe7d4d2a20ee00e0a407e0ac2461
2ec90635d9c445b09bb5e2378290ec28521a57d6
refs/heads/master
2020-04-26T06:10:24.316739
2019-05-21T10:15:36
2019-05-21T10:15:36
173,356,564
0
0
null
null
null
null
UTF-8
Python
false
false
532
py
train_vb.py
import numpy as np import torch from scipy.io import loadmat np.seterr(all='warn') from cv import KFold from vb4kde import KDE, train, load_kde # X = loadmat('clusterdata2d.mat')['data'] y = loadmat('weather.mat')['TMPMAX'] y = y[~np.isnan(y)] X = np.stack((np.arange(len(y)), y), axis=1)[:2000] N, D = X.shape X = to...
e8306d60626ebf74059668a3eb9b5a3b946b0e09
6fa9693a7fcb072f70e457a8c6e24a48d283718d
/regions/io/fits/write.py
ce1ccb6bac1f3c497e776f7b97b51dbeb7df9a2a
[ "BSD-3-Clause" ]
permissive
e-koch/regions
daf6532149cbd49311451ce615a6c0bc1d1882e5
501d12d5f5879c49413e20bed90a2d3eb725d5b7
refs/heads/master
2023-08-23T06:32:34.870401
2023-06-15T22:51:28
2023-06-15T22:51:28
105,062,043
0
0
null
2017-09-27T19:45:40
2017-09-27T19:45:40
null
UTF-8
Python
false
false
6,069
py
write.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst import warnings from dataclasses import dataclass import astropy.units as u import numpy as np from astropy.io import fits from astropy.table import QTable from astropy.utils.exceptions import AstropyUserWarning from regions.core import Region, Regions,...
798622ef63f307cda02c395fc111dc4b89d09f9e
98e115225c8ab9111de7a8122af617ae5a468065
/asrl__sensors__trex/scripts/lj_magEncoder.py
3da0505ace8350da225e49a0c6b454e065c3a0ab
[]
no_license
utiasASRL/trex
b44275a814b44e67601918e32fd4fc319af7bb4f
30b5f853210d8e6ca1f8914c6d754fb4e832c92d
refs/heads/master
2021-01-19T18:55:47.014081
2016-09-27T20:50:46
2016-09-27T20:50:46
69,395,613
1
0
null
null
null
null
UTF-8
Python
false
false
4,568
py
lj_magEncoder.py
#!/usr/bin/env python # Magnetic Encoder import rospy from std_msgs.msg import String from labjack import ljm from asrl__sensors__trex.msg import * from asrl__sensors__trex.srv import * from asrl__control__tether_management.msg import * from asrl__drivers__labjack.msg import * from asrl__drivers__labjack.srv import *...
3db32796a1d471d5e3fca0ee0f95df0980f71f8a
c5cfcf4907db58979502ab612ff104b67b39a998
/10 - Listas/desafio084.py
e125cef3e56bbc88682940de7066b93f0cd1327d
[]
no_license
leticiafelix/python-exercicios
b7ea82dd4c08803beae9c8321c3a694b3ede8bb1
5c29c4104218cfc3218c36bdcf6f5dbf937cd61b
refs/heads/master
2022-04-18T01:56:11.292549
2020-04-15T22:17:39
2020-04-15T22:17:39
256,045,697
0
0
null
null
null
null
UTF-8
Python
false
false
1,190
py
desafio084.py
#faça um programa que leia o nome e peso de varias pessoas e guarde numa lista no final mostre #a) quantas pessoas foram cadastradas #b) uma lista com as pessoas mais pesadas e outra com as pessoas mais leves pessoas = [] while True: ind = [str(input('Nome: ')).strip().capitalize(), float(input('Peso: '))] pe...
4752ddeed87dc095903ae10a3f1ab32bc722e02e
2737f745735ea360f4643a2a48c3ab814c831874
/3s_palautettava.py
86c56a2ef0681fd10d1d551d30fdd7345dbee71f
[]
no_license
Sammmster/python_harjoitukset
2654ac5c454a215e619cdede2bf9e3b1768b6d9f
1fe57a35b4c1fb46f4e4760300e56a3fd0c4eee3
refs/heads/master
2023-03-09T13:06:34.612294
2021-03-04T16:14:57
2021-03-04T16:14:57
336,015,823
0
0
null
null
null
null
UTF-8
Python
false
false
901
py
3s_palautettava.py
#! /usr/bin/python3 from math import sqrt # import ottaa käyttöön neliöjuuri funktion moduulista math. print("Haluatko laskea hypotenuusan(1) vai kateetin(2)?") vastaus = input("") if vastaus == "1": kateetti1 = int(input("anna ensimmäinen kateetti ")) kateetti2 = int(input("anna toinen kateetti ")) hypot...
893a37dd920054939bb2e28a918c51084e8baede
d5c8c0e3737ac065cd3b7a27e1b83a3235b5a5e3
/pokemon_entities/migrations/0005_pokemon_evolved_from.py
72b0a77cb1b764d0a3cc24e85f3791d0f44297b2
[]
no_license
DenisZaychikov/dvmn_orm_pokemon_map
edc631288b45453cd96bb1c427c68bf2bbc49024
6689b96ce173eac8e89310f6d82bb1a52ddcce9a
refs/heads/master
2023-03-22T18:16:48.201808
2021-03-19T11:03:47
2021-03-19T11:03:47
279,519,177
0
0
null
2020-07-14T08:25:32
2020-07-14T07:51:24
Python
UTF-8
Python
false
false
573
py
0005_pokemon_evolved_from.py
# Generated by Django 2.2.6 on 2020-08-11 12:00 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('pokemon_entities', '0004_auto_20200811_1445'), ] operations = [ migrations.AddField( model_name...
ab272f0ab316ea67d767fc9a7129d383513b4504
69abeb93aba9f9d978b522a027c502a8ea9f4f65
/logger/api/session.py
fa5758fecd7b7714d8d383a4000160079b1a8a3e
[]
no_license
pengra/library
36d32160a85830db864effe9f1233761e6284048
35ba6de62ac8598ca26d7977fb0613c2b6781a09
refs/heads/master
2020-03-29T13:14:04.272936
2019-02-13T23:19:33
2019-02-13T23:19:33
149,947,390
0
0
null
null
null
null
UTF-8
Python
false
false
2,975
py
session.py
from django.db.models import Q from logger.models import StudentSession from logger.serializers import StudentSessionSerializer from rest_framework import viewsets from logger.permissions import SessionPermission from rest_framework.filters import SearchFilter class StudentSessionViewSet(viewsets.ModelViewSet): "...
4d6c882ec36469c3ac29420872046740d37c9fc1
34d8a658eebace3827c4eff64df15684f32245eb
/data_pipeline/pipeline_tasks.py
074517b72f26aa7fae9d120ebc7e6b9c0b9291be
[]
no_license
MossMcLaughlin/powerline_fault
2cf1683af1f18b3f36b65f48a491372c9e8428c2
6292accb72c59d3b114d3f2fa51aca7d6b3cfdc0
refs/heads/master
2020-04-15T18:25:04.395995
2019-01-10T15:37:11
2019-01-10T15:37:11
164,911,829
0
0
null
null
null
null
UTF-8
Python
false
false
604
py
pipeline_tasks.py
class GenericPipelineTask: def __init__(self): pass def run(self): pass class DataPreparationTask: def __init__(self): self.name = 'data_preparation' def run(self): pass class FeatureEngineeringTask: def __init__(self): self.name = 'feature_engineering...
102d52a3764f3ff5e1fb705a3bd0791c0ddf7ad1
885e7db235741e17073452ab954370e19c76e6a1
/zoe_master/backends/service_instance.py
11c2627e11e5a8abbc890cc645216705a1b6d530
[ "Apache-2.0" ]
permissive
DistributedSystemsGroup/zoe
9bc5d15e080f83a444ccabeaf17ad6d4c2eb2f84
c8e0c908af1954a8b41d0f6de23d08589564f0ab
refs/heads/master
2021-04-15T14:24:30.665174
2019-09-08T09:31:16
2019-09-08T09:31:16
41,906,267
60
15
Apache-2.0
2019-01-25T07:38:59
2015-09-04T08:50:22
Python
UTF-8
Python
false
false
3,466
py
service_instance.py
# Copyright (c) 2017, Daniele Venzano # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
41b52fc7bf37ba3441431776d669c62e0d91c06d
aa3174a376b56987fa7c8854a90655af75562215
/src/momo/rvfunc.py
004a54193cd9678fccadb9dc018c34dcca32ddf1
[]
no_license
HajimeKawahara/momorbit
8b246a1ff01fc3129de9f8da8125161e578ee315
d88763722fba5fe35aead790692dc5ae9a2d4838
refs/heads/main
2023-01-28T22:31:21.804081
2020-11-21T06:56:13
2020-11-21T06:56:13
313,470,263
0
0
null
2020-11-21T06:56:14
2020-11-17T01:10:58
Python
UTF-8
Python
false
false
1,517
py
rvfunc.py
import numpy as np import sys from PyAstronomy import pyasl from momo import momoconst Gcr=momoconst.get_G_cuberoot() fac=(2.0*np.pi)**(1.0/3.0) m23=-2.0/3.0 m13=-1.0/3.0 def rvf2(t,T0,P,e,omegaA,M1,M2,i,Vsys): #RV of M1 K=fac*Gcr*M2*((M1+M2)**m23)*(P**m13)/np.sqrt(1.0 - e*e) return rvcoref(t,T0,P,e,omega...
ef442da0e45f3b3a65d2a84dd01d43d4fc9b974f
fe01ad35e82e86df5433c611d0dc8196ae8a2951
/Recursion_in_class.py
22da155a13e6c46389947a36695b610283c58769
[]
no_license
mdelafuen/RecursionInClass
63a8e8285d99ec0c39eb1b8411a4cb32276db940
547755a2587277841f0dcc31da6089f7634c6e46
refs/heads/master
2023-01-20T13:31:03.732936
2020-11-24T17:02:09
2020-11-24T17:02:09
315,698,823
0
0
null
null
null
null
UTF-8
Python
false
false
1,190
py
Recursion_in_class.py
def load_data(file_name): final_data = [] file = open(file_name, 'r') all_lines = file.readlines() for line in all_lines: faculty_data = line.split(',') final_data.append(faculty_data) return final_data def get_key(faculty_member): return faculty_member[1] def binary_search...
9ff43eddc00ad2b1f5e4f3ac47998f1586b61e23
3ab02b5a2c395ededae7d59d789c0004e749a915
/ques5.py
525c69ef0830e8ba2105818ba27ddabb5ddd1623
[]
no_license
shubhranshushivam/DSPLab_22-10-2020
840d0a0efadca805ef2bf0eaad518764a4955900
3ed692a93f669ac1647c010172fcbe8994b187e5
refs/heads/main
2023-01-03T20:46:38.890120
2020-10-22T04:56:43
2020-10-22T04:56:43
306,224,468
0
0
null
null
null
null
UTF-8
Python
false
false
435
py
ques5.py
# 5. Find the "Kth" max and min element of an array def minmax(arr,k): for i in range(len(arr)): for j in range(i+1,len(arr)): if arr[i]>arr[j]: arr[i],arr[j]=arr[j],arr[i] return {"min":arr[k-1],"max":arr[len(arr)-k]} n=int(input("Enter size=")) arr=[] for i i...
1ce92d735a384f5e356f09885851450574ae5333
db8f5a9c7084e8e3ac5d4756518cfa0f5f1b2e82
/03-autoencoders/02-fc-autoencoder/trainer.py
d193f2a9f4d23988c864300acd1eca6c8b0754b4
[]
no_license
wonyoungseo/everything-pytorch
b40059c0dd6a7be1aafa5a0cf092d18c612b1405
1e054a0455ef04ac251769e6a0876456fd2e1c87
refs/heads/master
2023-02-21T05:59:24.070355
2021-01-19T12:48:40
2021-01-19T12:48:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,753
py
trainer.py
from copy import deepcopy import numpy as np import torch import torch.nn.functional as F import torch.optim as optim class Trainer(): def __init__(self, model, optimizer, criterion): self.model = model self.optimizer = optimizer self.criterion = criterion super().__init__() ...
fa58396cf1da93f9b41101dc87463111b9dd1932
10f67cc69725c4c9538b22d18767c1b09fafc310
/1_EchoServer/echo_server.py
6adb82f326f70ba9a57e997d191f7cc3e8a48410
[]
no_license
linhng98/basic-http-server-python
d8ca4a51b30eb476139061b53cd5021667c96b22
6d79cb79463353e86a10ea7eb6f4e5acf6ff0114
refs/heads/master
2022-02-15T14:22:51.409704
2019-07-25T09:45:29
2019-07-25T09:45:29
null
0
0
null
null
null
null
UTF-8
Python
false
false
838
py
echo_server.py
''' This server is a HTTP that receive request from client and respond with a friendly greeting. Run this program on terminal and access the server at localhost port 8000 ''' from http.server import HTTPServer from http.server import BaseHTTPRequestHandler class EchoHandler(BaseHTTPRequestHandler): d...
a8ee3791d86ffc107aeed288a1e15b6308c1b4a8
4145236960bafc832f1d5ce0bfb273a10c77d5bc
/centerselect.py
e58b67214af5dc06b8aa7cd8fb4311b8ff03885d
[]
no_license
Desein-Yang/Course-Adavance-Algorithms
b2a6716a21e41d5c6970514438c3be02dfa2db51
0216d51c4cfd82d2af1fd7566db51a93657ac4de
refs/heads/master
2022-11-20T17:05:21.975259
2022-11-12T13:01:47
2022-11-12T13:01:47
217,952,950
1
0
null
null
null
null
UTF-8
Python
false
false
1,878
py
centerselect.py
import numpy as np from numpy import random import matplotlib.pyplot as plt class Point(object): def __init__(self,num,pos_x,pos_y): self.num=num self.pos_x=pos_x self.pos_y=pos_y def dist(self,p2): dist=np.sqrt(np.power(self.pos_x-p2.pos_x,2)+np.power(self.pos...
c9ff2f7e91afa2e642de3e9ce192198ac42e6235
5c372f63b4a7376d537016e9f52885836d883658
/test_models.py
ca7c6fd66423c707432de6c5bb0a8a9cb1f3f9f9
[]
no_license
MrCookiefries/Blogly
4984b612c2d7ef1d52f4e70f25a45451045ee4ba
c6097050ef2509f6719bad0d9324341a9fb2c784
refs/heads/main
2023-07-07T09:24:07.102004
2021-08-09T22:57:07
2021-08-09T22:57:07
393,229,253
0
0
null
null
null
null
UTF-8
Python
false
false
2,173
py
test_models.py
from unittest import TestCase from app import app from models import db, User, Tag, Post, PostTag app.config["SQLALCHEMY_DATABASE_URI"] = "postgresql:///blogly_test" app.config["SQLALCHEMY_ECHO"] = False db.drop_all() db.create_all() class UserModelTestCase(TestCase): """Tests for model for Users""" def set...
3f97700144302dc92f4f69a399aac5ccbfd09c24
27ace8e0fa08b370ddc6b89c8175edf0c923456d
/RespMesh/microphone.py
506d31e82ff0339fd8d455a9db988a124bc60899
[ "MIT" ]
permissive
dormalk/ArmsMesh
f77c0274487be40fd56c38c4ec4fd761dfba19ab
f2146df8cbc10c67ecc64d2f764d59248d681ba6
refs/heads/master
2020-05-04T21:41:55.450788
2019-11-11T10:19:02
2019-11-11T10:19:02
179,485,458
0
1
null
null
null
null
UTF-8
Python
false
false
975
py
microphone.py
import pyaudio import wave import os #The following code comes from markjay4k as referenced below form_1 = pyaudio.paInt16 chans=1 samp_rate = 44100 chunk = 4096 record_secs = 3 #record time dev_index = 2 wav_output_filename = 'test1.wav' audio = pyaudio.PyAudio() #setup audio input stream stream=audio.open(f...
297450d17bef097187ca095d93aee02fb7b7b56f
e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f
/indices/myriapoda.py
9d958374c3b4424a5c163639869d16d3ca5d7bb2
[]
no_license
psdh/WhatsintheVector
e8aabacc054a88b4cb25303548980af9a10c12a8
a24168d068d9c69dc7a0fd13f606c080ae82e2a6
refs/heads/master
2021-01-25T10:34:22.651619
2015-09-23T11:54:06
2015-09-23T11:54:06
42,749,205
2
3
null
2015-09-23T11:54:07
2015-09-18T22:06:38
Python
UTF-8
Python
false
false
44
py
myriapoda.py
ii = [('RogePAV2.py', 5), ('RogePAV.py', 4)]
bc145820d7463b842a3bb3acc2b20fe3f9bf34a4
c79052a39eef6034908f8536867bda22d1e787ba
/app/api/api_v1/endpoints/login.py
eb9e3c210cda321e0441fe74bdc5013f1aac8f5c
[]
no_license
lemontree1991/app
2b1fb62bfa938492a35e1bd0a32a7a67991f4c37
562376f471bbbde978641b09d3d8c7725951e40b
refs/heads/master
2022-12-11T18:45:07.375117
2020-09-14T02:00:11
2020-09-14T02:00:11
294,337,465
0
0
null
null
null
null
UTF-8
Python
false
false
1,079
py
login.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from datetime import timedelta from fastapi import APIRouter from fastapi import Depends from fastapi import HTTPException from fastapi.security import OAuth2PasswordRequestForm from app import crud from app.core import security from app.core.config import settings rout...
16c70bd137998977d9c30e7988e4cc1f97027118
e976de194ebc5a04fba3537834ec3937ab59fdfe
/bookapp/.ipynb_checkpoints/urls-checkpoint.py
974f89bc37ff29afeda07f663e0a7d6d82414715
[]
no_license
pushpswati/bookapi
cce715ea450c511f741c3f0aef0e0b10486924e9
cb8f3040a49fecc1015d78bb4c4100b3b7b67d6b
refs/heads/main
2023-01-11T14:15:21.182495
2020-11-02T18:34:47
2020-11-02T18:34:47
309,458,058
0
0
null
null
null
null
UTF-8
Python
false
false
343
py
urls-checkpoint.py
from django.urls import path from rest_framework.urlpatterns import format_suffix_patterns from . import views urlpatterns = [ path('login/', views.Userview.as_view()), path('otpverify/', views.Otpverify.as_view()), path('profile/<int:pk>/', views.UserProfileView.as_view()), ] urlpatterns = format_suffi...
ec6bdcf3c28555a0b35df418ad901b03c249b18f
46867de588875d2ca5e2c18a4704e67b2098f757
/src/durran-blossey/transport.py
aba325814156fd485515a6b230af8b24b9c5f239
[]
no_license
hertzsprung/charney-phillips
ae7e105e0e374d617649c8be2b7e0bbec16af1d1
989f50a7f586f4311ecbb8993ef658bbd1cfb271
refs/heads/master
2021-01-11T20:22:49.173238
2017-10-07T17:17:27
2017-10-07T17:17:27
79,103,993
1
0
null
null
null
null
UTF-8
Python
false
false
3,760
py
transport.py
#!/usr/bin/env python3 import numpy as np import math import os def ghost_x(f): f = np.insert(f, 0, f[0,:], axis=0) f = np.insert(f, f.shape[0], f[-1,:], axis=0) return f def ghost_z(f): f = np.insert(f, 0, f[:,0], axis=1) f = np.insert(f, f.shape[1], f[:,-1], axis=1) return f def interpolate...
332dc3e3ab5096a60299a027e8a2ba82c523b590
85cf59074b722d3460de9776733dacd3f8a41a85
/FinalVersion/rebootGPS.py
1c871377a17bdcdda248f130c851b85bd462251f
[]
no_license
EllieDJeon/RaspberryPi
ff5fa8c7a7ec96d53a83b68070cfce8cea34e3c5
ebc459cbf56f60ecb1dacf03664f2ab1ae0776fb
refs/heads/master
2020-03-19T20:57:25.672670
2018-10-17T16:55:44
2018-10-17T16:55:44
136,924,005
0
0
null
null
null
null
UTF-8
Python
false
false
247
py
rebootGPS.py
import os os.system("sudo killall gpsd") os.system("sudo cat /dev/ttyUSB0") os.system("sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock") #os.system("sudo gpsd /dec\v/ttyS0 -F /var/run/gpsd.sock") #os.system("cgps") os.system("gpsmon /dev/ttyUSB0")
ac9d914d5a0c4fd8f017f5ef6182fbb975832fa9
d2825c2ee7be5def83700269bb10280bf8d5a64e
/fe/access/auth.py
a8835b6bd2bd91cf6854d140dcd5a73a0ce1804c
[]
no_license
SSH-DBMS-201-1-17-14/bookstore
f5d4961421f348c0853d3cf49aea56bed79c9fac
0eb4bb982bc76bc4c907caa0ae76bf286589be03
refs/heads/main
2023-02-15T23:00:49.518272
2021-01-13T02:19:04
2021-01-13T02:19:04
326,973,802
0
0
null
null
null
null
UTF-8
Python
false
false
4,747
py
auth.py
import requests from urllib.parse import urljoin class Auth: def __init__(self, url_prefix): self.url_prefix = urljoin(url_prefix, "auth/") def login(self, user_id: str, password: str, terminal: str) -> (int, str): json = {"user_id": user_id, "password": password, "terminal": terminal} ...
eaa1016068874c0591151cd7fd6c60caa3eade9b
5b3bea9a8575672520f6a697200bbcdee06b3d1f
/cnswd/scripts/runner.py
c7c73f3414b913a4f49ab799536fe0111526394d
[ "Apache-2.0" ]
permissive
jingmouren/cnswd
c7520595d92495ab8b2c3249ed3fb61eea77a843
e015c02fe21ef754c462227db30b52db846047a1
refs/heads/master
2021-03-08T06:52:26.434982
2019-07-22T13:54:35
2019-07-22T13:54:35
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,671
py
runner.py
# 废弃 import math import os import time import multiprocessing as mp from selenium.common.exceptions import TimeoutException from cnswd.websource.exceptions import RetryException import logbook max_worker = 1 # max(1, int(os.cpu_count()/2)) logger = logbook.Logger('runner') class TryToCompleted(object): """多进程多次...
4c369bc45337f1d849e74344e33aaab0ef879a3c
73f7eaa5a4e4063247e4fe1381db38b7f295bd44
/maddpg/plotting.py
9bfebf3b955e8faee437a19dbb5de50a9fd1895e
[ "MIT" ]
permissive
jensakut/Reinforced-Tennis-MADDPG
fd1fc7cd0dbb6c85794b222302f3dc188ca341d7
7b0bb6b170788b1340b3f7d391f2f8b5a32431bb
refs/heads/master
2022-08-15T15:40:58.479907
2020-05-21T18:07:49
2020-05-21T18:07:49
263,742,324
0
0
null
null
null
null
UTF-8
Python
false
false
5,097
py
plotting.py
import time from collections import deque import matplotlib.pyplot as plt import numpy as np import yaml class Plotting: def __init__(self, par): self.scores = [] self.scores_window = deque(maxlen=100) self.scores_per_agent = [] self.scores_std = [] self.scores_mean = [] ...
25869031fd8d13453240ca4203865a01978ce927
9696faf6f3cb7b000d02667db750d2695e9db49c
/ellipse/__init__.py
37b9bea0b9ce6a07c20d2285798747f73bf77db2
[ "BSD-2-Clause" ]
permissive
ibusko/isophote
84e862daf0d87f1f46d1c8add88434e300d50e3d
f8479b00b4d02b1de3c75fee7deff6b8107682b7
refs/heads/master
2021-01-11T07:39:44.603580
2017-02-13T18:47:50
2017-02-13T18:47:50
72,648,884
2
2
null
2018-01-22T06:07:26
2016-11-02T14:40:02
Python
UTF-8
Python
false
false
21
py
__init__.py
__author__ = 'busko'
1f913baebe3f65da08d5b3bdd724e95292658ea1
cadb6dceb7bb67ce47ef48b2c83f480a65d6b01a
/s3prl/upstream/example/hubconf.py
421a32da4769d80ffba1268d31b7a676642e60fc
[ "Apache-2.0", "CC-BY-NC-4.0" ]
permissive
s3prl/s3prl
52ec2ae4df5a61c786c122085603aa9c5e8c2681
76a9432b824f6ae3eae09a35a67782c4ed582832
refs/heads/main
2023-08-17T02:26:57.524087
2023-06-10T17:12:27
2023-06-10T17:12:27
196,905,457
1,549
398
Apache-2.0
2023-09-14T13:07:05
2019-07-15T01:54:52
Python
UTF-8
Python
false
false
1,009
py
hubconf.py
from .expert import UpstreamExpert as _UpstreamExpert def customized_upstream(*args, **kwargs): """ To enable your customized pretrained model, you only need to implement upstream/example/expert.py and leave this file as is. This file is used to register the UpstreamExpert in upstream/example/expert.p...
26b129fb4327e9958db3e90a41a0ae61874f3813
c9234d809fb2f8ef76c794c6f77de11814492207
/fact_zero_7.py
44eb4b140dd29ec7285d44edf16d6bae6726dc67
[]
no_license
Akhileswari-dot-Velaga/python
4f91427f018a231d6bbddf00b076f7f40f49070a
fb8b87bd989f46588c530de35427c23a5ad892b1
refs/heads/main
2023-07-31T09:00:14.962521
2021-10-01T05:27:38
2021-10-01T05:27:38
412,335,692
0
0
null
null
null
null
UTF-8
Python
false
false
244
py
fact_zero_7.py
#Write a Python program to find the number of zeros at the end of a factorial of a given positive number def fact(n): x= n//5 y=x while x>0: x /= 5 y += int(x) return y print(fact(5)) print(fact(12))
1c07bd98c086a87e72ee67fe09a0555ef42d2347
e0ef3274d37ef71932449723e4437b393dd7e504
/main.py
1dcd6f4ff6217313f6bd28b623cafb9db0415aa2
[]
no_license
marcusblake/coco_objectdetection
85bb968dce11b95e43f67a6edf8d6405b2ea5a09
593bd22e3fd0863803023082232dadeec05b4c85
refs/heads/master
2023-09-04T08:12:04.920081
2021-10-03T15:21:08
2021-10-03T15:21:08
352,770,740
0
0
null
null
null
null
UTF-8
Python
false
false
619
py
main.py
import argparse def main(): parser = argparse.ArgumentParser(description="script to help train, test, and build YOLO model on the COCO dataset") parser.add_argument("--network_arch", type=str, help="Filepath to JSON file defining neural network architecture") parser.add_argument("--model", type=str, help...
427229be6c2ff33ff36a671caf3ff1b816fe7f3f
3256af0d6c19732bb84b256a9f792aaf7f3d901a
/f5/bigip/tm/asm/policies/test/unit/test_blocking_settings.py
d74b5e38055e71b54cbb5adcc299b0c7a31cb26f
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
F5Networks/f5-common-python
73e33ea489d989399d205077163f24ce584d83b9
3050df0079c2426af99b9a1b8f93d0b512468ff4
refs/heads/development
2023-08-29T10:11:23.713392
2022-09-21T02:45:03
2022-09-21T02:45:03
45,062,555
286
180
Apache-2.0
2023-05-12T23:13:03
2015-10-27T18:48:06
Python
UTF-8
Python
false
false
2,845
py
test_blocking_settings.py
# Copyright 2015 F5 Networks Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
af28305a4bd65e10ca8e1121785ef5f59f5ca1b9
1ffac55e77900dc68f7d92a78479f1bc8aa1abb2
/logisticRegression.py
3634acb15a9717c7413df26b1db57e2f7c8a2872
[]
no_license
anna-kay/sklearn-machine-learning
27c50acd84f961fd2b656bb356d095116cfac02d
9c899638840a99642fb860a41cb848d9b69ae01d
refs/heads/master
2022-12-07T15:37:44.110955
2020-05-12T11:51:04
2020-05-12T11:51:04
263,321,896
0
0
null
null
null
null
UTF-8
Python
false
false
12,595
py
logisticRegression.py
#!/usr/bin/env python # coding: utf-8 # In[1]: # imports import numpy as np import pandas as pd from sklearn.linear_model import LinearRegression from sklearn.linear_model import Ridge from sklearn.linear_model import Lasso from sklearn.metrics import mean_squared_error from sklearn.metrics import mea...
cd017c6762d045593976f09a5add1193b38216bb
0fea9ce62ed4e6dcab30f2868e8163abcd010b74
/src/settings.py
17f1abb8729da5e74ff60aba9ad2c09d80f441a9
[ "MIT" ]
permissive
irfanchahyadi/Whatsapp-Chat-Analyzer
886a34bd5b0e2566e039275400c4e166ead0eb94
f6eb7d8cbbe351a460000f6079eefb0b92b08a6c
refs/heads/master
2023-02-06T16:28:24.187346
2023-01-21T16:51:31
2023-01-21T16:51:31
256,719,747
30
6
null
null
null
null
UTF-8
Python
false
false
6,255
py
settings.py
import os, dotenv dotenv.load_dotenv() DATABASE_URL = 'sqlite:///src/wca.db' GA_TRACKING_ID = 'UA-41298121-2' APP_NAME = 'Whatsapp Chat Analyzer' LOGO = '/assets/logo.png' FONT_AWESOME = 'https://use.fontawesome.com/releases/v5.10.2/css/all.css' SOURCE_CODE_URL = 'https://github.com/irfanchahyadi/Whatsapp-Chat-Analyze...
a0ca9c7ca8d783d0e897904199735caf0b899af4
2c4f71012cda2f7c896ab0f08e06a5a678aadfb7
/6_functions_documentation_examples.py
4156fd599d212d404ab7cabc4808132260ef3aa8
[]
no_license
rvrn2hdp/informatorio2020
6eb4a9e5f768bec4bc3f710699965491773851b7
96c2aa3b4fd85538ff8bf1254ea0bce449f407e2
refs/heads/master
2023-02-19T01:55:34.968318
2021-01-25T22:33:32
2021-01-25T22:33:32
332,902,530
0
0
null
null
null
null
UTF-8
Python
false
false
40,657
py
6_functions_documentation_examples.py
''' Son el primer paso para entender la programación orientada a objetos en Python Una función se encarga de contener el código necesario para realizar una tarea especifica. Una vez definida una función la vamos a poder utilizar todas las veces que sean necesarias. ''' # Creacion de Funciones ------------------------...
f0ac2e66cc7fe9730c77a8feb77a74e26986a3f8
3a7f3167062fac434b84efc46f2ce8b32818f86a
/AntiSat/Menumanager.py
46348421e2a6598bfeb0651f6c473b33ccec9ba1
[]
no_license
atheys/Portfolio
30274e99c147c9a6afa997a0b9330d320ffc6981
6c3db635e1b2b2eba8b49ad0ff182ba53e336099
refs/heads/master
2020-03-21T02:27:52.361663
2018-06-20T08:09:04
2018-06-20T08:09:04
137,999,714
0
0
null
null
null
null
UTF-8
Python
false
false
5,764
py
Menumanager.py
import pygame class MenuManager(): def __init__(self, manager): print "Menu manager created. Continue? [y/n]" self.manager = manager self.paused = False self.intro_done = False self.menus = [] self.menus.append(Pause_menu(self)) self.menus.append(St...
0659df48bb150582917e333a7a25d2d25395dfda
f9ccce37c3829b445bd127f4c97bdacfa09e58ed
/face_recognition/model_utils.py
5c3263347c8f1a8c601a96c3dd8caaba4b41e94b
[]
no_license
kim1102/deep_emotion
e0b37043f25354cb9556354da95afd6290ac05aa
e17ff7d24d31076d2a25a0bdfceccf6a261e94b0
refs/heads/master
2023-03-27T13:07:24.236704
2021-03-30T07:37:45
2021-03-30T07:37:45
297,290,129
0
1
null
null
null
null
UTF-8
Python
false
false
909
py
model_utils.py
from face_recognition.model import Backbone import torch import numpy class face_verifier(): def __init__(self, net_depth=50, drop_ratio=0.6, net_mode="ir_se", device="cuda"): # create model self.model = Backbone(net_depth, drop_ratio, net_mode).to(device) save_path = "face_recognit...
dccdca65cce2959b07657636e23e7c9ab8a4f96c
b2cefb7a2a83aa93ee1b15a780b5ddf6c498215b
/nemo_text_processing/text_normalization/es/verbalizers/money.py
45f4b4e03f195dc8437d927f6b2cb4d59a89e761
[ "Apache-2.0" ]
permissive
VahidooX/NeMo
bfde8c9b48c818342a9c6290fb9dee62fafeca38
866cc3f66fab3a796a6b74ef7a9e362c2282a976
refs/heads/main
2023-07-23T19:13:39.948228
2022-04-29T21:51:54
2022-04-29T21:51:54
227,733,473
1
2
Apache-2.0
2022-09-15T15:30:13
2019-12-13T01:55:21
Jupyter Notebook
UTF-8
Python
false
false
7,249
py
money.py
# Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. 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 requ...
ebbc79d6582f7d6139e0dcec6333b679bb86c63c
0bdd797b3e95429e03108152cacfbb26069f1d76
/dynamicprogramming/outofboundarypaths.py
7cdc061164eac08d1dc633242f751d4378387e75
[ "MIT" ]
permissive
mengyangbai/leetcode
3eda89470c933fdec5ffdfbf9cceb57e85c7e44d
e7a6906ecc5bce665dec5d0f057b302a64d50f40
refs/heads/master
2021-06-28T15:39:16.258564
2019-06-27T07:30:22
2019-06-27T07:30:22
142,398,571
0
0
null
null
null
null
UTF-8
Python
false
false
848
py
outofboundarypaths.py
class Solution(object): def findPaths(self, m, n, N, i, j): """ :type m: int :type n: int :type N: int :type i: int :type j: int :rtype: int """ MOD = 10 ** 9 + 7 dz = zip((1,0,-1,0),(0,1,0,-1)) dp = [[0]* n for x in range(m)] ...
2da6debb1f9ae2c966a17fdfb3b668160a3ef8d7
7573c77dcc0f97a74846597f26ac4a5ee75da81d
/Comment/1.py
fadc8de706c876819ad4d1d01b08cb68448b308d
[]
no_license
fdragon50/python_ruby
1d8af13fd180c72a2c064151351b3fd3082a349e
7b96715e658d49edfc14b0970d9d92bde4570e0f
refs/heads/master
2021-01-20T21:07:20.917552
2016-06-14T22:00:49
2016-06-14T22:00:49
60,126,839
0
0
null
null
null
null
UTF-8
Python
false
false
694
py
1.py
''' #조건문 예제 #fdragon50 #2016 ''' # 주석 : 도움말/덧글 / 미사용(추후 사용가능한) 코드 기록 # 여러줄의 문자열 표현은 ''' ''' 사이에 표현 가능하나 사용은 권장않음 # #으로 시작하는것은 문자열 자체가 아닌.. 무시되는 구간 # 주석은 누가봐도 이해할수있게 / 간결하게 # 더 좋은것은 누가봐도 이해할수 있는 코드임 # 가독성이 좋은 코드를 만들수 있도록.. #조건문 예제 #fdragon50 #2016 input = 11 real_fdragon50 = 11 #real_k8805 = "ab" if real_fdr...
deb8ee1d6327a6406244147a819821e8d2b2890e
308fdd19597632333f328c4adf73e348d4d43cdd
/webmoney_merchant/migrations/0001_initial.py
75317f20d23b875af38b1cc6c1a9a3407c7fb054
[ "Apache-2.0" ]
permissive
evstropov/django-webmoney-merchant
6d410bd6fe55b38363497b1bc55d278ab3d58148
a349aeb27676fdc03ac127f3ee26bf22e5a63f09
refs/heads/master
2020-05-30T01:57:47.458501
2015-11-30T04:39:25
2015-11-30T04:39:25
37,641,610
0
1
null
null
null
null
UTF-8
Python
false
false
4,130
py
0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
d64140466e62b78506d0f200f451649023697a3b
6bef49786b342eddd6e624513bc5e14eaae56cb0
/fabfile.py
ce3264bd302412cbd8012cb4c23ca0bb3bf96985
[]
no_license
wegrata/ADL_LRS
0fcb18d6c7c20f682635ec42b17fd281eec593b1
d70d65b37ea7ef789d326702fb0f59be18cd3a95
refs/heads/master
2021-01-20T23:18:13.526777
2012-06-21T17:58:24
2012-06-21T17:58:24
null
0
0
null
null
null
null
UTF-8
Python
true
false
401
py
fabfile.py
from fabric.api import local,run INSTALL_STEPS = ['yes | sudo apt-get install libmysqlclient-dev python-dev python-mysqldb python-virtualenv', 'virtualenv --no-site-packages env', '. env/bin/activate;pip install -r requirements.txt'] def deps_local(): for step in INSTALL_STEPS: ...
8356bc92a3a8b561d55bf5f2d9aeb0da89b730ca
ff509e6b2dfc92d0d54a89c9ae17878119acb205
/plot_histogram_mean.py
fc8bb11a6d3d4b960f549f89c73caab7d2ac5d37
[]
no_license
RodrigoFerreira001/GASIR
8f90c07fc2cf734912cc00eaa60fc893dd9b73da
be24a48b3990eaadbc39eed90a5beaba044b2030
refs/heads/master
2021-01-02T08:35:09.102825
2018-06-04T19:40:24
2018-06-04T19:40:24
99,022,605
4
0
null
null
null
null
UTF-8
Python
false
false
2,162
py
plot_histogram_mean.py
# -*- coding: utf-8 -*- from matplotlib import pyplot as plt from matplotlib import colors import numpy as np import sys max_value = int(sys.argv[1]) file1 = open(sys.argv[2]) file2 = open(sys.argv[3]) file3 = open(sys.argv[4]) histogram = np.zeros(max_value, dtype=int).tolist() highest_value = 0.0 sample_size = 0...
aaebd9eba8a5c51c64baaf60224720b87a6364e1
f511050f5eb72ef59b5edbc7561d32504f4b9998
/cluster/clusters.py
411b810679babb25dc619f37d3f1323cf2f41c09
[ "MIT" ]
permissive
Xinghui-Wu/NetProject
c0ae01a99404a8876441bebb22286a3d04b78b73
8fad38743afab8a48ef699adfdf53aecfb6119ac
refs/heads/main
2023-06-02T02:18:35.924343
2021-06-21T12:39:36
2021-06-21T12:39:36
375,697,410
0
0
MIT
2021-06-10T12:55:42
2021-06-10T12:55:41
null
UTF-8
Python
false
false
6,370
py
clusters.py
#聚类算法: # kmeans # 密度聚类:DBSCAN # 层次聚类:AgglomerativeClustering # 谱聚类:SpectralClustering # 分批kmeans:MiniBatchKMeans # 评价指标:FMI(Fowlkes–Mallows index) # 排除:特征聚类:FeatureAgglomeration# 亲和传播聚类(AP)聚类:affinity_propagation# 偏移均值向量:MeanShift import numpy as np import sklearn.cluster as cluster import os impo...
eb81b0e41743e1785b82e88f6a618dc91eba73e5
692a0dde31884c0f7f5fac5b0a547d435650df46
/video_data_generator.py
d015bfc96db27f9633f06fd1ca9b319b59b27c34
[]
no_license
Avenger-py/trackmania_self_driving_car
377a913d5010dbf94583bf63532f468c735e4193
fb0b8e0bd67858daeb6da32453c8b92d93c23bfd
refs/heads/master
2023-03-12T19:40:33.723754
2021-02-28T13:48:01
2021-02-28T13:48:01
343,098,978
0
0
null
null
null
null
UTF-8
Python
false
false
1,185
py
video_data_generator.py
#train a neural network from input video feed import numpy as np import cv2 vid = cv2.VideoCapture('trackmania_test_vid.mp4') w = 1280//2 h = 720//2 vid_data = np.empty((360, 640, 3)) #print(vid_data.shape) def process_frame(img): global vid_data img = cv2.resize(img, (w, h)) cv2.imshow('Frame', img) ...
6a7459159221cc2635283ca7eddfc4b28fd01810
ab9322fbdf154af7ba947ee0605c6458a10850a7
/SANDAB_SoRaKH_Lab#3/iroha-lab-3/main.py
8844e8dd683df223b7da8b570271439ed23f5f95
[]
no_license
Tepisandap/iroha-blockchain-training
b6d6bc366cf21bdfb946b13c13be0e34da8baaa7
04bb641da3e8354806c3183c073ea7b6af8569ee
refs/heads/main
2023-04-03T07:17:33.381969
2021-04-13T07:17:53
2021-04-13T07:17:53
350,549,785
1
0
null
null
null
null
UTF-8
Python
false
false
1,792
py
main.py
from iroha import Iroha, IrohaCrypto, IrohaGrpc root_account = "root@sorakh" root_priv_key = "f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70" root_pub_key = "313a07e6384776ed95447710d15e59148473ccfc052a681317a72a69f2a49910" bob_account = "bob@sorakh" bob_priv_key = "14266dfe9f3905a014cb2ed7c251eebf8...
fd6d461a63b44d7b32a07f9ff9a9594cc1550ef8
8501c532b5c1b5358c06cbba68b1ff96c68cc75e
/viz.py
b73f3a224b13d34c432759675a00b724318fd56e
[]
no_license
askerry/aesutil
e6177b3204823c1309a8632ac6314065369ae33e
a8c6f3b6bdb9ef8046f25fdf6bd8a82680055987
refs/heads/master
2020-03-26T08:03:43.035206
2015-08-19T15:42:47
2015-08-19T15:42:47
32,439,325
1
0
null
null
null
null
UTF-8
Python
false
false
2,414
py
viz.py
# -*- coding: utf-8 -*- """ Created on Tue Mar 17 18:45:21 2015 @author: amyskerry """ import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as mpatches import seaborn as sns from statsmodels.graphics import regressionplots import pandas as pd def makelegend(legenddict, loc=(1,0)): patches...
a5a31a902cf87120cca4d163832fd0e50fde08dc
6ff44f941c5e6486eae3e26a4e3371b2c6b547c4
/orchestrator/core/orc_server/es_mirror/document.py
689882e973cfd7e5143b5cb5268c55c0e90327d3
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-unknown-license-reference" ]
permissive
g2-inc/openc2-oif-orchestrator
819ec4a02dd9c475e1279fc38b53a05e39f021b8
85102bb41aa0d558a3fa088e4fd6f51613599ad0
refs/heads/master
2020-05-17T09:49:39.800493
2020-04-30T19:10:24
2020-04-30T19:10:24
183,642,877
1
0
Apache-2.0
2019-04-26T14:27:16
2019-04-26T14:27:15
null
UTF-8
Python
false
false
1,076
py
document.py
from django.db.models import Model from elasticsearch_dsl import Document as DSL_Document, InnerDoc, Nested, Object from .utils import es_dict, get_nestedFields class Document(DSL_Document): @classmethod def model_init(cls, model: Model = None) -> 'Document': fields = dict( _id=model.pk ...
c10e57fc1686e0fa3a99262ca1c56ccfbf56e463
9e5947370511e2c3ec06c2225c95e812b018a789
/CalculaCombustiveGUIl.py
2b896348bff41b4c814284e98766d0ac5d2ae542
[]
no_license
heltonteixeira92/pythondiscovery
4c58c029a4f9953125bd274c6420e33e5aec0ba8
2f7d4626fcc0110084aa03004fcc1dc636e2e76d
refs/heads/master
2023-01-11T00:56:45.099398
2020-11-12T03:58:34
2020-11-12T03:58:34
268,714,471
0
0
null
null
null
null
UTF-8
Python
false
false
1,541
py
CalculaCombustiveGUIl.py
#calculadora de combustivel com interface #se o valor do alcool for < 70% do valor da gasolina, abasteça alcool #basta dividir o valor do litro do álcool pelo da gasolina < 0.7 ruim, >= 0.7 bom. import PySimpleGUI as sg class Calcombustivel: def __init__(self): alcool = 0 gasolina = 0 r...
4136066ef3cdb874cb97cf43eefbc59933b54bd3
799a4bba7d7ef3c4089571ececd097000259f115
/pygame_lab5/gun.py
62d989ab433e02b390391fe6057dae805dd92d15
[]
no_license
minaev-aa/infa_2020_minaev
5f6a7974e2a684334cb7f3c08997d45b70ae66c6
076c6a53d8acdeee2521a55ccddb14baafeaefdd
refs/heads/master
2023-01-11T07:27:20.773952
2020-11-19T22:38:18
2020-11-19T22:38:18
298,302,127
0
0
null
null
null
null
UTF-8
Python
false
false
13,637
py
gun.py
from random import randrange as rnd, choice import tkinter as tk import math import time start_time = time.time() root = tk.Tk() fr = tk.Frame(root) root.geometry('800x600') canv = tk.Canvas(root, bg='white') canv.pack(fill=tk.BOTH, expand=1) class ball(): def __init__(self, x=40, y=450): """ Конструкто...
380631fb2c95151e1ed9c5a70632561c85ee70f6
fb7f89f387a80f987bedc0832d88b9831294e047
/twittur/models.py
7c905c4d1ae29a6e04eb1649125bba96f0294404
[]
no_license
SyafiqTermizi/fyp-revamp
5223e28d3ad31d82ad39aec3a2b3184890484b28
0d7ef7a1d67c670afef420698a0636c27eebc5f6
refs/heads/master
2021-05-09T22:46:55.722818
2018-02-11T18:11:18
2018-02-11T18:11:18
118,763,677
1
0
null
null
null
null
UTF-8
Python
false
false
540
py
models.py
from django.db import models from django.contrib.auth.models import User from django.contrib.postgres.fields import JSONField class SearchItem(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) keyword = models.CharField(max_length=200, blank=False) is_user_search = models.BooleanField...
40abaadb93ddbbae0b2c06b30f7ff6fe8f27e2ad
e5558275eae360d627b6e616153b95a5f1027dc2
/Learning/Python/django/django_project_learning/my_project/machine_learning/admin.py
6cb9096a9a4762f15a52d0122373aa98340df3a8
[]
no_license
nishantpaliwall/npcl
e6e5e36bd25b1345f0adf952fd9eccac2eab43de
ce65fa6c58482e30d37ba14b1f996d0303cb374b
refs/heads/master
2022-12-21T07:31:16.815196
2021-06-05T08:30:33
2021-06-05T08:30:33
140,876,969
0
0
null
2022-12-08T12:01:22
2018-07-13T17:48:19
Python
UTF-8
Python
false
false
123
py
admin.py
from django.contrib import admin from .models import ml_models # Register your models here. admin.site.register(ml_models)
67c42e918ccff7491770126bb7172f99ff0462d8
5a771018900ceb173bb1fa61cf22fe87860e6995
/tests/promote_while_connecting
1e3ca13d3a3129d09d8fc1f95d82fa1a8332bcef
[]
no_license
zhang3125/drbd9-tests
23980a1187c7a61877fa03795a42711e50bb1cdc
23d8c742ccd7ba54e0047512f53141c5e604f007
refs/heads/master
2023-01-11T23:44:58.549377
2020-11-12T12:25:40
2020-11-12T12:25:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,336
promote_while_connecting
#! /usr/bin/env python3 # # Promote while we hole the uuid_sem . There was a locking bug # in the code that caused this to deadlock. Keep such a test # in the testsuite so that we see it quickly when we re-introduce # it. from python import drbdtest from python.drbdtest import log import time #import os def my_log(st...
c9883160bcb9f88f065bf68447ba632da696c8b6
aa457540830dca2c9729c9489e7047fa032ac794
/calendar_web-/calendar_web_user/models/calendario_user.py
bd5f06c9d28442af21711011309a0da3522fe9de
[]
no_license
carmenclemente1/carlendiro_web
1249d4ec96f4f9f173c1607f8d89b7613bbaa8f3
45ecb820a935fe7f299f6ff4100f61b27e9baeed
refs/heads/main
2023-03-03T22:32:08.401091
2021-02-10T00:01:47
2021-02-10T00:01:47
337,570,101
0
0
null
null
null
null
UTF-8
Python
false
false
882
py
calendario_user.py
#-*- coding: utf-8 -*- from odoo import models, fields, api class CalendarioTask(models.Model): _name = 'calendario.task' _inherit = ['calendario.task','mail.thread'] user_id = fields.Many2one('res.users', 'Responsible') date_deadline = fields.Date('Deadline') name = fields.Char(help="Breve d...
e00f90aef66aee9f8c2798b99dd6919e4124bb83
bb3d04747c19d7121bfdcf06784590643349529e
/SubhamKumarSahoo/webapp/app/models.py
fddb2327d010331b10ec012ebe87595aedb0c477
[]
no_license
incubateind/track-unpolluted-routes
595e8d918dd45ca424754075dbf873397bad996b
fd9fa089097d33b64befa770caf3eeee06627fc6
refs/heads/master
2020-09-28T01:24:09.901463
2019-12-21T08:28:43
2019-12-21T08:28:43
226,654,823
0
1
null
null
null
null
UTF-8
Python
false
false
1,377
py
models.py
from app import db, login from werkzeug.security import generate_password_hash, check_password_hash from flask_login import UserMixin @login.user_loader def load_user(id): return User.query.get(int(id)) class User(UserMixin, db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.S...