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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8475408fb06550acf848dd24b8f708082d96d6a0 | 2e07c81e9303f3aa66044323575d0e411de52504 | /property/py_09.py | eb94909ba1d0f53c8db3a2b0f3a39519b02b4044 | [] | no_license | Near-River/py_code | a6800a01fd6ae5691da6fb05babb960bb8f6242d | 4a1134dc435098c9955d57de136671a08a226667 | refs/heads/master | 2021-01-21T14:23:29.878240 | 2016-07-23T06:38:25 | 2016-07-23T06:38:25 | 58,114,374 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 890 | py | py_09.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# list comprehensions
print([x * x for x in range(1, 11)])
print([x * x for x in range(1, 11) if x % 2 == 0])
print([m + n for m in 'ABC' for n in 'XYZ'])
d = {'x': 'A', 'y': 'B', 'z': 'C'}
print([k + '=' + v for k, v in d.items()])
L = ['Hello', 'World', 'IBM', 'Apple... |
9bc269a8ebe7bf92f45df1d8ffb1cb28385ad2bd | ff56e1dced79619ee14dac6963011abb77617c67 | /backend/flask-api/tests/Book_test.py | 3212e7ba65dabfbf43c950334d999f6a909454ab | [] | no_license | UB-ES-2020-A/Booken | c931fba5c26d6a02c5c9da88410b16d6e19a2c9a | 40ec41bf63e21ec086bcbd798bd780e033f09afb | refs/heads/main | 2023-01-31T19:32:03.019659 | 2020-12-13T21:16:54 | 2020-12-13T21:16:54 | 303,438,037 | 0 | 0 | null | 2020-12-13T21:16:56 | 2020-10-12T15:42:18 | Python | UTF-8 | Python | false | false | 7,599 | py | Book_test.py | # deepcode ignore C0411: not an issue
import base64
import unittest
# deepcode ignore C0411: not an issue
import sys
import json
# deepcode ignore C0411: not an issue
sys.path.append('../')
from models.accounts import AccountModel
# deepcode ignore C0413: stupid issue
from app import setupApp
# deepcode ignore C04... |
409a5cf4a0f3425f200f8e3ead98a0fc5731123a | 9c57f0e2428dc17262416f4450ee480a4d2ee5c3 | /robot/hand/Conversation.py | 9094f25986000656188278c6e9319a38e4929e8d | [] | no_license | bluecatr/voicerobot-python | c4e8517a1b3a0b050827fda7143dbff9b9ecd2eb | 1ed9fb6106fed65809923904124f55fd8aca9c79 | refs/heads/master | 2023-05-30T02:56:38.718216 | 2021-06-24T01:52:48 | 2021-06-24T01:52:48 | 144,114,980 | 1 | 0 | null | 2021-06-24T01:52:49 | 2018-08-09T07:15:17 | Python | UTF-8 | Python | false | false | 3,086 | py | Conversation.py | #coding:utf-8
import logging
import os
import subprocess
import threading
from robot import utils, configuration
from robot.configuration import cmInstance
from robot.hand import AbstractController
from robot.mouth import mouth
from robot.tts import IflytekTTS
class ConversationController(AbstractController):
SL... |
246f25517b001bb93f042d08de9701458dea32ec | 7366ba8ed2e91473bbc64619fe32e00c2b7e9897 | /tests/p1/GNPTest.py | f775b48cf73ea7924668c1d0b816203fe7449932 | [] | no_license | mateuszGorczany/Graphs | ac0fbf716a19f100d98db1a25dd141ed5a58d72e | 06f545b035c8d018e7962b7228f0e0523b1fe4da | refs/heads/main | 2023-04-26T00:01:12.746980 | 2021-05-16T20:20:45 | 2021-05-16T20:20:45 | 364,572,126 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 254 | py | GNPTest.py | #Make packages visible for this file
import sys
import os
sys.path.append(os.path.curdir)
#Testing code below
from package1.gnp import GNP
from package1.plot import GraphPloter
print(GNP(10, 0.5).get_raw().sum())
GraphPloter(GNP(10, 0.5).graph).draw() |
c7488eaa71387c7e60693d863d148cca05e382a0 | 2d727c8d46e2f0fa1cc339fc1b0f4d9a043ddc85 | /UI_Centos_DailyBackup/Resources/DailyBackup_SettingsUI_v002_PyQt5.py | 81a090b3d9903565aea12d7cd2881416bfba2b63 | [] | no_license | sysrnd/Centos_DailyBackup | 1da03a41e95fa49f429098022dd838234edb0ecd | 288bbe3f6b44a634cc64fdbea3b8a56c7910d131 | refs/heads/master | 2021-04-29T18:04:08.047901 | 2018-04-24T19:47:26 | 2018-04-24T19:47:26 | 121,686,074 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,560 | py | DailyBackup_SettingsUI_v002_PyQt5.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'DailyBackup_SettingsUI_v002.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
# WARNING! All changes made in this file will be lost!
from Modules.Qt import QtCore, QtGui, QtWidgets
try:
_encoding = QtWidgets.QApplication.UnicodeUTF8... |
890c7e6ac924701e0b7d44f21a025c650f9b3d98 | 99bbbd7adcbbc231f1af00be48c036b2be84c8dc | /occ.py | f242a8099abb1b00d2cd2bfe510f3c547d2d61d4 | [] | no_license | postelrich/occ-pd | 97075ef1de65b3f3881dcb09ab7277a7054d173a | 164d9b383acc75f0761984a76c9c84c93be51ea5 | refs/heads/master | 2020-06-03T18:29:07.409962 | 2019-06-13T04:07:06 | 2019-06-13T04:07:06 | 191,682,983 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,564 | py | occ.py | import operator
import numpy as np
import pandas as pd
from pandas.api.extensions import ExtensionDtype
from pandas.core.arrays import ExtensionArray
_OCC_DATE_FORMAT = '%y%m%d'
class OccSymbol(object):
def __init__(self, s):
self.occ = s
class OccType(ExtensionDtype):
name = 'occ'
type = Occ... |
b4ed6a07b93ca3431573a485d95a1c445a07f371 | c2e3dc44288ec671454826ffd180308cd09f52ef | /Demo/sentiment_classifier.py | e7c81fb4b7d198988b49b0ec20a17af867ed7c30 | [
"MIT"
] | permissive | frizman04/SentimentAnalysis | 784d103be76fb82e2bf9596d212fefdaf74ae0b9 | a071db5e20f51d3c49c4565542d339acb5f8f102 | refs/heads/master | 2021-07-15T18:13:37.046444 | 2017-10-20T09:17:52 | 2017-10-20T09:17:52 | 107,596,981 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 316 | py | sentiment_classifier.py | import pickle
class SentimentClassifier(object) :
def __init__(self):
with open('../Classifier/sentiment_clf.pkl', 'rb') as f:
self.clf = pickle.load(f)
def predict(self,text) -> int :
try :
return self.clf.predict([text])
except :
return -1
|
28422b65f8e1d08ea9876c6c742b02893aa2e737 | 0eda97bc1d117134963ac3674b4d28434af73804 | /attendees/occasions/views/deprecated/assembly_attendances_ajax.py | 06c729fde0761ec03592ae9a6ea89675135e3ef2 | [
"MIT"
] | permissive | xjlin0/attendees | 4556eedf28e053ea63fe16295ac497758abb52db | 3c337ee68c00f17cbbbe26f2e33131e57850e4ed | refs/heads/master | 2020-12-05T12:38:51.020242 | 2020-05-25T00:14:58 | 2020-05-25T00:14:58 | 232,111,465 | 1 | 0 | MIT | 2020-03-25T06:08:03 | 2020-01-06T13:54:24 | Python | UTF-8 | Python | false | false | 1,301 | py | assembly_attendances_ajax.py | # from django.contrib.auth.decorators import login_required
# from django.utils.decorators import method_decorator
# from .assembly_attendances import AssemblyAttendanceListView
#
# import logging
#
#
# from attendees.occasions.models import Attendance
#
# logger = logging.getLogger(__name__)
#
#
# @method_decorator([l... |
f8bbe1b6686d8fdcda838c26e6aed99526ee9548 | 9b2743f149ed4f0922c25d1733ab458a7060bebc | /PSF/ellipse_angle.py | 33d0cb060b72b4ddc6656e2a41303779e7f34b85 | [] | no_license | ajay-dev98/Machine-Learning-Project | b2b15dc244a2d93017aed5473789bc923369d868 | c6a572680bdd153f1d183a6c2adb45fec0fb40f0 | refs/heads/main | 2023-01-27T15:12:06.860352 | 2020-12-08T11:09:23 | 2020-12-08T11:09:23 | 311,294,935 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 559 | py | ellipse_angle.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 23 16:24:46 2020
@author: dev
"""
import numpy as np
# here u define the numebr of datset u wish to create and the range
x=np.arange(np.deg2rad(0.01),np.deg2rad(180),np.deg2rad(0.05))
#x = np.random.normal(0,np.pi,500)
z = x,',',np.cos(x)
# opens... |
a38aa3230210d382994780a9f363880734937b3a | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_200/4617.py | 9d59cecd8edbc5b37c9e3a5ffff3121089527d6b | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,313 | py | 4617.py |
import logging
import os
import sys
import argparse
class Case(object):
def __init__(self, n, N):
self.n = n
self.N = N
self.r = n
def solve(self):
logging.info('solving for #%d ...', self.n)
def check(v):
r = 10
while v != 0:
... |
8fdf9e50fd64f24d9685ed15ac8013429a994695 | d46b7881d2e714fddfe92c967b80756e744dda12 | /ToDoList.py | 26c46e197ac4018d91d5927dc5770ed5d676e631 | [] | no_license | giorgitrapaidze/python-projects | 8576ccc6a71a03230d8942e18212e0f07f30eb3d | 41ac4389de50ad802de584032bcf7eb42e9acab8 | refs/heads/main | 2023-09-01T08:02:19.809095 | 2021-10-11T23:44:41 | 2021-10-11T23:44:41 | 375,863,378 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,140 | py | ToDoList.py | from datetime import datetime
import sqlite3
connection = sqlite3.connect("todo.db")
cursor = connection.cursor()
cursor.execute("""CREATE TABLE IF NOT EXISTS todos(
uid INTEGER PRIMARY KEY AUTOINCREMENT,
date VARCHAR NOT NULL,
text VARCHAR NOT NULL... |
c758580c4514765a961bc44923b7eff534ddb56c | 9868f287cfa54a8ed6c67b91b59d4f09bbd9410c | /large_language_model/megatron-lm/megatron/core/dist_checkpointing/tests/test_correctness.py | b1f399ebbd4da6e38b9edde1b326b6fbf0c21cfe | [
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"Apache-2.0"
] | permissive | mlcommons/training | 41c7e21ea074b5f5bb040d3602e621c3e987cc0e | 2f4a93fb4888180755a8ef55f4b977ef8f60a89e | refs/heads/master | 2023-09-05T12:45:53.020925 | 2023-08-03T15:43:54 | 2023-08-03T15:43:54 | 127,351,529 | 431 | 162 | Apache-2.0 | 2023-09-07T23:35:53 | 2018-03-29T21:56:06 | Python | UTF-8 | Python | false | false | 6,715 | py | test_correctness.py | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
import os
import shutil
from copy import deepcopy
from datetime import datetime
from pathlib import Path
import torch
import megatron.core.dist_checkpointing.load_save
from megatron import print_rank_0, get_args, get_timers, initialize_megatron
from mega... |
2fd21dc20eed7e3070f684284da5ccb62ddb981c | 9211a75e71ba12c1472e18b2adbba8dc81beeaf0 | /gui_draft.py | c2bc3a8ef8816d209e115e77c66e642ad6e4df54 | [] | no_license | QuailAutomation/fantasy_bot | f3884683fe07ca9f46b6c0f19473717c9c80ca20 | f3dad40963529bf4711cf25dc6b10977a77d0165 | refs/heads/master | 2023-05-14T14:32:00.992088 | 2023-01-08T16:57:56 | 2023-01-08T16:57:56 | 253,312,308 | 0 | 0 | null | 2023-05-01T23:40:31 | 2020-04-05T19:11:44 | Hack | UTF-8 | Python | false | false | 30,491 | py | gui_draft.py | # this is draft board gui
import os
import sys
import time
import pandas as pd
import pickle
from PyQt5 import QtGui, QtCore
from PyQt5.QtWidgets import QApplication, QComboBox, QLabel, QTableView, QTableWidget, QWidget, QPushButton, QHBoxLayout, QGroupBox, QDialog, QVBoxLayout, QGridLayout, QCheckBox, QListWidget, Q... |
d556c2485d5212cd3238be3e67b40f3a24891b05 | 102c0a6a6076d232fae988312b0d47a7720cadb1 | /backend/BP/products/migrations/0001_initial.py | 0f234d3e7e67033745015dab57719fe303acc8eb | [] | no_license | SumanMarahatha7/Blogs-Products | 2a581f532967d0094dda224f809caf69034e99ce | ea4a8fa99ea35c0ca15e7fb154b1f2553290c1e6 | refs/heads/main | 2023-03-02T11:10:11.138884 | 2021-02-01T06:06:32 | 2021-02-01T06:06:32 | 334,054,202 | 0 | 1 | null | 2021-02-01T06:06:33 | 2021-01-29T06:09:34 | Python | UTF-8 | Python | false | false | 1,338 | py | 0001_initial.py | # Generated by Django 3.1.4 on 2021-01-29 06:54
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
... |
d2c4af29184c111952cb11f1058d6d3ed3de329b | 8de6d706d14e2d0f5348d0b08a19aec48df03aef | /tests/test_offline.py | 2cdf33c64b5f21c2eaf9f3f9ed4b2234f528af1d | [
"MIT"
] | permissive | KM3NeT/km3io | 8049857331070dcba71d9862b97f1f68bab9e91e | cc0b06c01d4f7bcb49733805f00cce8bb5a36a33 | refs/heads/master | 2023-06-26T02:09:43.164451 | 2023-06-15T11:11:50 | 2023-06-15T11:11:50 | 222,018,925 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 18,868 | py | test_offline.py | import unittest
import numpy as np
from pathlib import Path
import uuid
import awkward as ak
from km3net_testdata import data_path
from km3io import OfflineReader
from km3io.offline import Header
from km3io.tools import usr
OFFLINE_FILE = OfflineReader(data_path("offline/km3net_offline.root"))
OFFLINE_USR = OfflineR... |
fdefb3d77e23ba624bb276dca9570d38716df285 | c5538b14a4ee1bd99dd70a80f6f859716799bbe9 | /blog13-cluster/blog13-cluster-09.py | 926b97fd7d2de300ac23b92ade2adaa7ddcb6170 | [] | no_license | sigma-random/Python-zero2one | 21f1cadbed91f4ac50ad60134520c1d6c75161f9 | 7c025b3a1c26679b111dfbe5b9c34786e4cd6b74 | refs/heads/master | 2023-09-05T03:30:33.492625 | 2021-11-23T06:39:30 | 2021-11-23T06:39:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 412 | py | blog13-cluster-09.py | # -*- coding: utf-8 -*-
# By:Eastmount CSDN 2021-07-03
#载入数据集
from sklearn.datasets import load_boston
d = load_boston()
x = d.data
y = d.target
print(x[:2])
print('形状:', x.shape)
#降维
import numpy as np
from sklearn.decomposition import PCA
pca = PCA(n_components=2)
newData = pca.fit_transform(x)
print(... |
41aab15cbe759a46163feb861ce4555fc60c368d | cb13037cdbd3e0ab6108670108e9497cc1e2a5a7 | /0.leetcode/3.刷题/2.算法系列/4.动态规划/8.正则表达式/44.hard_通配符匹配.py | 230ec4ce2b631ace68b2565d6d010cfbf22b325b | [] | no_license | GMwang550146647/network | 390fe0d1c72dcaca8b6d6dd1307adca0d56b55ce | 576de9b993f7763789d25a995702b40c9bc6fa57 | refs/heads/master | 2023-06-15T04:42:54.306077 | 2021-07-12T06:06:02 | 2021-07-12T06:06:02 | 315,488,828 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,398 | py | 44.hard_通配符匹配.py | from fundamentals.test_time import test_time
import re
class Solution():
def __init__(self):
pass
# @test_time
def isMatch_recur(self, s, p):
'''
这个非常好理解,但是太慢了
'''
def compare(ps, pp):
# 1.base case:
# 1.1.都到达终点
if ps == len_s a... |
3e592b2fdb8408a282465756083161ebee879f30 | e69a4e5964777249c5afc1949837d7dda63eb182 | /img_utils.py | 9abdbc58e06fc69f022bb749cd08e4ecfb0ebd6b | [] | no_license | AI3EL/Ticket | 6328eea1e597da86d9e0cba10d1ae261b040723e | 1ecb59ef92553705ace509d7373a8bafb4d71545 | refs/heads/master | 2023-05-08T05:44:34.231346 | 2021-06-02T19:16:08 | 2021-06-02T19:16:08 | 370,015,353 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,222 | py | img_utils.py | import cv2
import numpy as np
# Facility for show in notebook
def show(imgs, scale=1, names=None):
if names is None:
names = map(str,range(len(imgs)))
cv2.startWindowThread()
for name, img in zip(names, imgs):
cv2.imshow(name, resize(img, scale))
cv2.waitKey(0)
cv2.destroyAllWindow... |
51820676bdd9afa187152774b9d4849e9f8a23d1 | 7a826cd731bedb2764c34416ecc9c0399e34d5b8 | /examples/xmas/xmas-config.py | ceec965bddd361bb61370dffc4c27fb460f8af0f | [
"MIT"
] | permissive | Aggrathon/MLusic | 3c458ee877435067f1d059a5ee0fda2b0ec9798b | 22a9cafd15712723eb08944229a519f167d47461 | refs/heads/master | 2021-10-09T16:11:27.121987 | 2021-10-09T09:56:29 | 2021-10-09T09:56:29 | 77,785,473 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,938 | py | xmas-config.py |
"""
Song Cleaning Config
- These configs will change how the learning data is prepared for training
"""
# Discard short songs
MIN_SONG_LENGTH = 400
# Discard songs with tempos much larger than the standard 500000
MAX_SONG_TEMPO = 1000000
# Discard tracks that covers only short portions of the song
MIN_TRACK_COVERA... |
76964d199bc23b741de1a21bcc87ce394b5a1363 | ba949e02c0f4a7ea0395a80bdc31ed3e5f5fcd54 | /problems/twopointers/Solution75.py | 58e2512ffa8c22b6903770a2fe2523c18629909a | [
"MIT"
] | permissive | akaliutau/cs-problems-python | 6bc0a74064f6e9687fe58b13763da1fdf2e1f626 | 9b1bd8e3932be62135a38a77f955ded9a766b654 | refs/heads/master | 2023-05-11T22:19:06.711001 | 2021-06-04T11:14:42 | 2021-06-04T11:14:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 857 | py | Solution75.py | """ https://en.wikipedia.org/wiki/Dutch_national_flag_problem
Given an array nums
with n objects colored red, white, or blue, sort them in-place so that
objects of the same color are adjacent, with the colors in the order red,
white, and blue. Here, we will use the integers 0, 1, and 2 to represent t... |
8d0fcf0bf5effec9aa04e7cd56b4b7098c6713cb | 19e2f2fc9607df172f355cf5196633c69b91b8d7 | /Python For Beginners/Python Problems/NumberInReverse.py | 5ec91f96d096dc7af26e26f502ac31b7f86e4429 | [] | no_license | gunjankapoor99/Python-Tutorial-For-Beginners | c7602642bb41723c77507dba3badf5820cb99e0f | 1f0412fe00f972fea9970dad276c927629c33129 | refs/heads/main | 2023-06-11T13:21:38.700020 | 2021-06-30T12:33:21 | 2021-06-30T12:33:21 | 381,284,291 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 43 | py | NumberInReverse.py | for i in range(-10,0):
print(i,end=" ") |
a14114f9bb677601e6d75a72b84ec128fc9bbe61 | 4a2a99162cdbf72cde9e588105310305130c25a7 | /adv_project/urls.py | 29bc7783b3339edcadcc1a9f9a8236757c2aa7b2 | [] | no_license | MUD-Django/MUD-Django-BE | 6d890364e2746c32f4ccea68b5b2179900675f30 | 53577ebdbd6c4e373d44f9de8bbc07c561e198c8 | refs/heads/master | 2020-07-30T23:20:52.505115 | 2019-09-27T03:24:24 | 2019-09-27T03:24:24 | 210,395,569 | 1 | 0 | null | 2019-09-27T03:24:25 | 2019-09-23T15:55:04 | Python | UTF-8 | Python | false | false | 613 | py | urls.py | from django.contrib import admin
from django.urls import path, include, re_path
from django.conf.urls import include
# from rest_framework import routers
from rest_framework.authtoken import views
# from adventure.api import PlayerViewSet, RoomViewSet
# from adventure.api import move
# router = routers.DefaultRoute... |
edb206a8cd5bc48e831142d5632fd7eb90abd209 | d44d4efb7d704e907c9d611c50e9808fe8bcfc5d | /L3 regression/3.2_optimizer.py | cb5e4c07fe7339a20e25fabff6e1e705c72222e4 | [] | no_license | Letian-Wang/CS-20-Tensorflow-for-Deep-Learning-Research | 157f65c7723db2714f3b16e5908f2b7826a0553d | fab023c44cceefaa1845441030ae2845b8f6bfc5 | refs/heads/master | 2022-10-13T04:45:02.663606 | 2020-06-14T08:06:50 | 2020-06-14T08:06:50 | 269,886,398 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 695 | py | 3.2_optimizer.py | import tensorflow as tf
optimizer = tf.train.GradientDescentOptimizer(0.001).minimize(loss)
_, l = sess.run([optimizer, loss], feed_dict={X:x, Y:y})
Session looks at all trainable variables that loss depends on and update them
tf.Variable(initializer=None, trainable=True, collections=None, validate_shape=True, caching... |
36991c3191ba48b1b9dbd843e279f8fe124f1339 | f557d965c13723474f1ca5faeebe83b68d715b58 | /classes/rouge.py | 7b6330cf61356057398e0b38a79875512932f7c8 | [] | no_license | david3355/PyGame | 97bddeea4ce33624467809d89dd3581294301910 | 3fc3956b66dc325b59ee138ba000e0d32c2ff743 | refs/heads/master | 2020-12-28T20:43:40.300939 | 2016-09-17T10:59:33 | 2016-09-17T10:59:33 | 66,763,862 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 457 | py | rouge.py | __author__ = 'Jager'
from char import Character
class Rouge (Character):
def special_attack1(self, opponent, hitdamage_callback, specatt_callback):
pass # hook method
def special_attack2(self, opponent, hitdamage_callback, specatt_callback):
pass # hook method
def heal(self, target... |
0de657ee173b606ad61d614a6168c00fcd571a70 | c56c988ef082a364dd25b9d327ef6d43eef204fc | /tests/test_2010_to_2310.py | 4603895f213aa1efa287c2e8e510a4b5d1e794bb | [
"BSD-3-Clause"
] | permissive | cedadev/nappy | 3fb8ce6ff462d68b15d2a7eb52b786938577cd07 | 71e42a91112f52eef86183e35129b9ee2019e55b | refs/heads/main | 2023-04-18T16:21:51.390821 | 2022-09-07T14:35:29 | 2022-09-07T14:35:29 | 106,687,389 | 9 | 14 | BSD-3-Clause | 2022-09-07T14:35:31 | 2017-10-12T12:04:48 | Python | UTF-8 | Python | false | false | 538 | py | test_2010_to_2310.py | import os
from .common import cached_outputs, data_files, test_outputs
import nappy.nc_interface.na_to_nc
import nappy.nc_interface.nc_to_na
def test_convert_nc_2010_to_na_2310():
ffi_in, ffi_out = (2010, 2310)
infile = os.path.join(cached_outputs, f"{ffi_in}.nc")
outfile = os.path.join(test_outputs, f... |
06638b361c1cbe92660d242969590dfa45b63a4d | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /third_party/blink/web_tests/external/wpt/mathml/tools/stacks.py | b2ecec5386d0a0a65234855d3fdd71401f5b2ba9 | [
"BSD-3-Clause",
"GPL-1.0-or-later",
"MIT",
"LGPL-2.0-or-later",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 2,484 | py | stacks.py | #!/usr/bin/env python3
from utils import mathfont
import fontforge
v1 = 5 * mathfont.em
v2 = 1 * mathfont.em
f = mathfont.create("stack-bottomdisplaystyleshiftdown%d-axisheight%d" % (v1, v2),
"Copyright (c) 2016 MathML Association")
f.math.AxisHeight = v2
f.math.StackBottomDisplayStyleShiftDown = ... |
2dd59681a0dcb5d3f1143385100c09c7783babf4 | a93b952d57704ad32e6b53be1f9e3de283d3b6b0 | /bin/createDataModel.py | 09d6d93e6d938a09001f951cb6ca018df066c2c1 | [
"MIT"
] | permissive | monsendag/goldfish | 6a3e2ead1ea5f00ea5aec3cbda8230d37d254415 | a82db468a5c53ad2a694d2cc0d68cfa320c0af3f | refs/heads/master | 2022-03-06T14:06:51.578494 | 2022-02-23T11:41:47 | 2022-02-23T11:41:47 | 13,469,289 | 0 | 0 | MIT | 2022-02-23T11:41:49 | 2013-10-10T11:21:05 | Java | UTF-8 | Python | false | false | 356 | py | createDataModel.py | #!/usr/bin/env python
# script :: creating a datamodel that fits mahout from ratings.dat
ratings_dat = open('../data/movielens-1m/users.dat', 'r')
ratings_csv = open('../data/movielens-1m/users.txt', 'w')
for line in ratings_dat:
arr = line.split('::')
new_line = '\t'.join(arr)
ratings_csv.write(new_line)
rati... |
5ce98ae241c0982eeb1027ffcff5b770f94ff1a3 | 2b88812fe3c396346432fca2f04b413118716658 | /.data-generation/Events.py | f7d3674186478a2a34052830ca84b8580e9786f7 | [] | no_license | HoneyTheYellowBear123/Civilization-VI-Modding-Knowledge-Base | b9c2ad3974c0c3f5d82a604410534510b66b3c4c | f82f2c93fdc61b1b1a22469b6a36d42094742996 | refs/heads/master | 2023-08-22T03:24:13.138312 | 2021-09-01T15:46:49 | 2021-09-01T15:46:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,513 | py | Events.py | import csv
import os
events = {}
eventTypes = set()
eventIndices = {}
i = 0
with open('Civ VI Modding Companion - Events.csv', newline='') as csvfile:
reader = csv.reader(csvfile, delimiter=',', quotechar='|')
for row in reader:
if i < 4:
i += 1
continue
eventName = row[3]
eventType = "GameEvents" if... |
79c043fc862e77bea5adc3f1c6bb9a6272f19c75 | 8c22531e7222c5ee5bbbaf027bfd627697088f8a | /stompy/ros/leg/info.py | e18b1ce455b9ce6d72b65ffee605e4fac4f6f66b | [] | no_license | afcarl/stompy | 8a23739b3e5ae30014559c655e44a0c3631f4ab5 | 2b1d2c14ef474429ab0568c5795ea756322a7900 | refs/heads/master | 2020-03-16T23:25:55.634984 | 2017-11-05T20:03:08 | 2017-11-05T20:03:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 66 | py | info.py | #!/usr/bin/env python
import socket
name = socket.gethostname()
|
22c498d84f40455d89ed32ccf3bf8778cb159579 | 2ff4f34b2d9eee833ad44c514833645d6fea8a7a | /Ex2/resultsAnalysis.py | 52e143a15e6657e79b6498a9dafa1c4a05285e13 | [
"MIT"
] | permissive | nfrn/PRI_project | 0d5ad6e86b4e517ba9c76c2311fa143cdb291ab4 | 0b747a4d194500f5997cec10dc8b1f7b7bd88c15 | refs/heads/master | 2020-04-02T06:13:45.589106 | 2018-12-07T02:21:56 | 2018-12-07T02:21:56 | 154,137,031 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,325 | py | resultsAnalysis.py | import os
import pandas as pd
from tabulate import tabulate
if __name__ == '__main__':
bestPrecision = [0,0,0,0,0,0]
bestPrecisionFile = ['','','','','','']
bestRecall = [0,0,0,0,0,0]
bestRecallFile = ['','','','','','']
bestSupport = [0,0,0,0,0,0]
bestSupportFile = ['','','','','','']
bes... |
4169416e5ec1e1bb647482465fd55ab7119a88b0 | e0bea6e94e1ec8440c37e1341c1c6779d1f7dc6a | /Assignment 1/Assignment1_9.py | d278260664f60ed88f97a638e04486ed8086342c | [] | no_license | Heena3093/Python-Assignment | 33688e0e7a44670ead5e6d2a75021610ddab3b0f | fec1cfd9febb6e5bcf0af03951bcce85c31957c9 | refs/heads/main | 2023-03-11T04:34:47.078792 | 2021-03-03T07:08:21 | 2021-03-03T07:08:21 | 340,059,944 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 308 | py | Assignment1_9.py | #9. Write a program which display first 10 even numbers on screen.
#Output : 2 4 6 8 10 12 14 16 18 20
def DisplayW():
print("Display First 10 even number")
i=0
while(i<20):
i=i+2
print(i)
def main():
DisplayW()
if __name__=="__main__":
main() |
cd156bbef079ad81246081f5fe829e4b7d0bbd8e | a53d261478d78559e6e8a0e5b3b125864a99249c | /appablend/animation_layers/bake.py | 73c4770fb85ef057f237b096d3f093bcf375a189 | [] | no_license | ChristopherSchubert/com.appalachia.python.appablend | e0526350360ee684309b5876cca2623aca665b7d | 4c0cd69f3b8fc9a3e9033759554b1dae66968984 | refs/heads/main | 2023-04-15T05:39:01.195892 | 2021-04-23T23:38:58 | 2021-04-23T23:38:58 | 361,465,214 | 1 | 0 | null | 2021-04-25T15:26:33 | 2021-04-25T15:26:33 | null | UTF-8 | Python | false | false | 27,518 | py | bake.py | import bpy
from appablend.animation_layers.core import (check_handler, register_layers,
remove_handler,
select_layer_bones, unique_name)
from appablend.animation_layers.ops import (add_animlayer, copy_modifiers,
... |
5fa136ca0fe2f79dfdb6c2f2fb206d0ced25bdfa | 6ba3dbf7c8126a8e4fb9abd7ac753a72eeca5b74 | /python_webapp/apps.py | 5955c3ff3fa647091d41f36678a5e4eb7a75c499 | [] | no_license | toreeze/python_webapp | ed8946ca442d583ee179833270693e5f0381677d | 7d9c9e506e637b02e025fe0bde24c926f96d9c09 | refs/heads/master | 2020-11-28T15:29:10.891533 | 2019-12-24T02:55:59 | 2019-12-24T02:55:59 | 229,857,131 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 100 | py | apps.py | from django.apps import AppConfig
class PythonWebappConfig(AppConfig):
name = 'python_webapp'
|
d62c7e283785b21ec58038de57c12422161af066 | be216195c8b69d01d88651a6d7fc2014f9b97011 | /marturion/models.py | 592ac8f518a06c9f36b88ff566e2037765f7dcd9 | [
"BSD-3-Clause"
] | permissive | pombredanne/marturion | a504ef6be856f8c46c125e53a0e2d66c9b5db465 | 182327051c9d20a8877999300b2453c60b0fcacf | refs/heads/master | 2021-01-17T22:21:00.906945 | 2012-06-24T19:08:28 | 2012-06-24T19:10:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 338 | py | models.py | import datetime
from django.db import models
class Testimonial(models.Model):
text = models.TextField()
author = models.CharField(max_length=100)
affiliation = models.CharField(max_length=100, blank=True)
added = models.DateTimeField(default=datetime.datetime.now)
active = models.BooleanFie... |
ca0f92faaf328faf754a54e6eab58e39ed2ceccf | ca3ec495383d8deb5a517f6147ca67f504aff7c7 | /Palindromo.py | cb06c739cd1a1ccb69de9e47e9ea47162d130790 | [] | no_license | Steven-Jurado/Palindromo | fa0da0fa638e9bda9ac403437affcb0a9c6094c0 | a673d4c9084a5913f94f8298a4d11b72dc392400 | refs/heads/master | 2022-12-19T12:16:44.991319 | 2020-09-17T16:12:41 | 2020-09-17T16:12:41 | 296,353,390 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 500 | py | Palindromo.py | def esPalindromo(palabra):
palabra = palabra.replace(' ','')
palabra = palabra.lower()
palabraInvertida = palabra[::-1]
if palabraInvertida == palabra:
return True
else:
return False
def main():
palabra = input('Ingrese la palabra:\n')
if esPalindromo(palabra):
prin... |
9adcbea757935b1f87377d7c2c53a44d43574be1 | f3f90fb46176f707d0d3baf170b5e5b59d3198e4 | /triplets_selection.py | 96a19a39ca8e40a8f28068a65ffc4b5fee96de44 | [] | no_license | magomezs/MahalanobisMatrixLearning | b2455eceb0651f40964657de71d54ec581f5c6d4 | 459ffd3dc48a1cc07b0fc7067e2a41fc776748f1 | refs/heads/master | 2021-07-08T15:08:21.694138 | 2020-07-03T06:27:57 | 2020-07-03T06:27:57 | 130,340,244 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,965 | py | triplets_selection.py | import caffe
import numpy as np
from numpy import *
import yaml
from multiprocessing import Process, Queue
from caffe._caffe import RawBlobVec
from sklearn import preprocessing
import math
class TripletSelectLayer(caffe.Layer):
def setup(self, bottom, top):
self.input_batch=bottom[0].num
self.outp... |
02ef6c3581482b9ec81cc8a460e790461c836dfa | d32b594fe46405085c869d4c3c8a39aa93c57518 | /multincubadora/migrations/0002_auto_20160810_1301.py | d7abd0f9955614cc7b00fde08405b02becd7d197 | [] | no_license | raphaelArthur/cdt_controle_empresas | 59bb213b60ceb02dec4afb7ea1c2aa609eff70ba | 33c1a446481336a4b8b1251670074b3a5ff46695 | refs/heads/master | 2020-12-25T14:49:36.296678 | 2016-09-05T11:12:17 | 2016-09-05T11:12:17 | 67,426,599 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,989 | py | 0002_auto_20160810_1301.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-08-10 13:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('multincubadora', '0001_initial'),
]
operations = [
migrations.AddField(
... |
8e2093fdc1aecdb64e52fa6e1a22b186bcc8e48a | 66cc45f47d0c4fed1bd9e3022041c5d348bed73c | /Concurrency_asynchronous/05. yield_generator.py | 670509dfc5069806f82d55d8317f8b9a148fa770 | [] | no_license | juzhong180236/NewPython | 922a9f7fb1f64e7a983e667dc151b66a891e760f | a593c86bee70199946c1b4d3c969cffec19a0149 | refs/heads/master | 2021-11-23T09:23:42.953009 | 2021-11-17T08:49:06 | 2021-11-17T08:49:06 | 199,616,962 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,259 | py | 05. yield_generator.py | def range_generator(n):
i = 0
while i < n:
print("Generating value {}".format(str(i)))
yield i
i += 1
# generator = range_generator(3)
# print(generator)
# print(next(generator))
# print(next(generator))
def my_generator(_list):
_i = 0
while _list and _i < len(_list):
... |
96b45e27d9d2d63502ca98b3a5865d01d11f9a68 | fccb366066b9a59cd3d7acb66c889de078ea6f89 | /try_views.py | 8eddfc7c8e43accada5510baaa6624645ffc6408 | [] | no_license | prarthanabhattarai/AdReportWebsite | 8644eba5a0bc28e9d0a860f8de817ca1c9ad89f6 | 06f60517e762893b5d346690e7d12ceb0f5382e8 | refs/heads/master | 2020-05-19T19:17:12.226627 | 2015-07-07T21:20:41 | 2015-07-07T21:20:41 | 37,792,178 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 861 | py | try_views.py | from flask import Flask, render_template
from cassandra.cluster import Cluster
#from app import app
app = Flask(__name__)
cluster = Cluster(['52.8.165.110'])
session = cluster.connect('fb_report')
@app.route('/index')
def index():
user = { 'nickname': 'Miguel' } # fake user
return render_template("index.html"... |
c5e09b794cb65bd80d0ecf7d8292a602ceef3072 | 7656c2f82aaadb03133612d2097a47ae944f99b0 | /question2.py | d937bbdfb6b794cdfe9ce516c6becb329b80dc3e | [
"MIT"
] | permissive | jjlange/cs-software-development | 8bf61a2a6b5ffa21eec79b5690e6838a1abe3897 | ac7dfcca6bebad25d0b02223e968a4e56e7a7fb1 | refs/heads/master | 2023-01-04T13:34:55.749982 | 2020-10-05T15:30:21 | 2020-10-05T15:30:21 | 301,448,015 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 351 | py | question2.py | # Live Session - 5/10/2020 - 4CSE05
# Question 2
# Mark
m = int(input("Enter a mark: "))
if m < 40:
print("Fail")
else:
print("Pass")
# Temperature
temp = int(input("Temperature: "))
if temp > 19:
print("Hot")
else:
print("Cold")
# Number
n = int(input("Number: "))
if (n % 2 == 0):
print... |
dc4476bd868d1aba3cb503709dc0ac2a1e85ea14 | 0500be58b7820d0ec0ef7df5a37ed6b1616b801e | /App.py | e514abb1be1a4cf8c96ce1e393e35049175409b3 | [] | no_license | fmonte2010/flask-mysql-app | 0fcec2787f76ce201c9aacc06c71f0161e4a3642 | 95d180d2fc669badad1801be25f1c21d1a5eb8c2 | refs/heads/master | 2023-02-02T04:37:15.006367 | 2020-12-19T13:10:58 | 2020-12-19T13:10:58 | 320,835,098 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,007 | py | App.py | from flask import Flask, request, jsonify
import json
from flask_mysqldb import MySQL
from flask_cors import CORS
import os
import uuid
from werkzeug.utils import secure_filename
import pyrebase
#local uploads or temp
UPLOAD_FOLDER = "./uploads"
ALLOWED_EXTENSIONS = {"png", "jpg", "jpeg", "gif"}
#filter mime-types
de... |
af90240989f234a156532592b835293ca7e24c73 | 20b333dd8a42011bf8821694adff709507bf6a90 | /hybridmodel.py | 1b4c74c02c8b44cfa90d18026711cd20b64dbc9b | [] | no_license | Joey-Rose/dc2 | 5ce1f948b836ed7393c0c261e03ee337ff983328 | 21d6430da8a15cf3fb61aa1aebd7a58711d675e6 | refs/heads/master | 2022-12-02T16:02:36.589631 | 2020-08-17T19:53:18 | 2020-08-17T19:53:18 | 288,272,600 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,486 | py | hybridmodel.py | import pandas as pd
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.naive_bayes import MultinomialNB
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, classification_report, confusion_matrix
import nltk
from... |
c24a8a0adbc0af6d6e134542e48a9f35b6ed9c97 | 2a6da3e0acf4ad7a526e241e926a06527e7597db | /docs/mvc/contacts/create_db.py | d738f57672f2080cf534dd439571698050b65d2c | [] | no_license | muskrats-2017/Resources | 5a95b6f777875c0a3273916f112721d5da48a8d3 | 43cf211a7182c2841c5f4780cd85e8e3dbca4df3 | refs/heads/master | 2020-12-02T08:11:58.424722 | 2017-08-25T15:07:44 | 2017-08-25T15:07:44 | 96,786,221 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 627 | py | create_db.py | import sqlite3
def create_tables(database):
conn = sqlite3.connect(database)
c = conn.cursor()
c.execute("""CREATE TABLE contact(
id INTEGER,
name VARCHAR,
PRIMARY KEY('id')
)""")
c.execute("""CREATE TABLE phone(
id INTEGER,
number VARCHAR,
contact_id INTEGER,
PRIMARY KEY('id'),
FOREIGN KEY('con... |
a96706d45e111990b17c8926d63b3336d90a553b | 8f6bd6e42179c7f16ce7e998a549e49210baa571 | /ppo.py | 06d5b151acc4153e4e43f96e5266b0a1109811dd | [] | no_license | zstbackcourt/tensorflow_gail_ppo | 52df1463c01647738e8793f7aa19c0762ab7d738 | fb6d0d3e49cfe138c99a368b83d18b8399838360 | refs/heads/master | 2022-07-14T20:39:54.639386 | 2020-05-14T08:37:03 | 2020-05-14T08:37:03 | 263,857,033 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,611 | py | ppo.py | # -*- coding:utf-8 -*-
"""
@author: Weijie Shen
"""
import numpy as np
from logger import MyLogger
import tensorflow as tf
from expert import Sampler
from models import Model
from runner import Runner
from collections import deque
def constfn(val):
def f(_):
return val
return f
def safemean(xs):
... |
389b154592cc6bb624f828d9ae87c5b28d8c2a85 | 4f9d803ea90754252482f6697cce17d73a748f1c | /My_Practice/scons_practice/sub/SConscript | 5a7ad6a7c091698edd0c0e54b100ddca03de8ea4 | [] | no_license | ramya42043/RAMYA_VT_WORK | c9ee8652736187c8449d49fada8529bb7c874961 | 5eb49106a406ab070000f853f2a2debe4f250bf7 | refs/heads/master | 2020-03-20T20:52:36.486634 | 2018-06-19T06:11:42 | 2018-06-19T06:11:42 | 137,711,914 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 32 | SConscript | Program('../ramya','ramya.cpp')
| |
62ceba36fbb023bb0e30a80cbee724c078344558 | 6020d9fca971194717a50eb9d118374a80d3ca1c | /backend/portfolio/serializers/portfolio_serializer_main.py | c22527371bdb903d01ba4c2fe16a955b05d9313e | [] | no_license | eve-klopfenstein/krypstock | 8f4a3714adc44eabcf86dcf39862395ddd6a176a | 712e598286a596329f547f0f1ae8c47984f79eaa | refs/heads/main | 2023-04-28T15:48:32.372025 | 2021-04-23T08:49:35 | 2021-04-23T08:49:35 | 367,724,267 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 558 | py | portfolio_serializer_main.py | from django.contrib.auth import get_user_model
from rest_framework import serializers
from portfolio.models import Portfolio
from transaction.serializers.transaction_serializer_no_portfolio import TransactionSerializerNoPortfolio
from user.serializers.user_serializer_nested import UserSerializerNested
class Portfoli... |
10c4f506a345255c6a28cb99804309fe1b0ba879 | 5eb38c0823e159548a3d8088d84c9d6d461ee43d | /app/serializers.py | 2c19852783a7c4d1c7993a790f1cb49e99391fd7 | [] | no_license | LAP-2016-CSULA/lap-pythonanywhere | 584acc32167ca6b09e44cf2131a3c2debee15a68 | 34f95bc0f01490674f43281a270c583a7ff57a11 | refs/heads/master | 2021-01-18T22:20:22.641216 | 2016-05-11T23:01:23 | 2016-05-11T23:01:23 | 49,145,680 | 0 | 0 | null | 2016-05-11T23:01:23 | 2016-01-06T16:05:41 | Python | UTF-8 | Python | false | false | 3,911 | py | serializers.py | """
Model serializers for rest api.
"""
from . import models
from rest_framework import permissions, routers, serializers, viewsets
from django.contrib.auth.models import User, Group
class SpeciesTypeSerializer(serializers.ModelSerializer):
"""Seralizer for the Species type"""
class Meta:
model = mod... |
52de46e3144a2150c88b9a42597c21144327cf12 | 52d5636183ecc871014d5d5711ebc60bb83505f7 | /hotwireGcodeGenerator.py | 9bac3e24e0ab04d68efa74117fe1d7b854ec7a37 | [] | no_license | stonetronics/hotwireGcodeGenerator | 912c96503284c84c8dd68e4b2d8e3c61781b7077 | 671366f86e18e46b59312ec8ae0ae241ad9f7d59 | refs/heads/master | 2020-12-14T10:57:12.946926 | 2020-02-29T11:49:42 | 2020-02-29T11:49:42 | 234,719,149 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 33,056 | py | hotwireGcodeGenerator.py | #!/usr/bin/env python3
# requires svgpathtools, install it like this: pip3 install svgpathtools
# converts a list of path elements of a SVG file to simple line drawing commands
from svgpathtools import svg2paths
from svgpathtools import Path, Line, Arc, CubicBezier, QuadraticBezier
from xml.dom import minidom
#import... |
b8da9982cb91eff1491291db9f0e0928b1d563ce | f1342832080f31d9aaf5ff542edfcecf512c1747 | /struck/findAverageWfmNoise.py | debb9621db32e44462a02dc49a690b5213934bc2 | [] | no_license | Charge-readout-test-stand/charge-readout-scripts | 7d93828fa0203b45865a5369c09f018b5a428e01 | edddb2ae78fd63cc525056cadb5580e1a35d0063 | refs/heads/master | 2021-01-23T15:57:39.425129 | 2020-03-03T23:11:28 | 2020-03-03T23:16:14 | 23,400,593 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,063 | py | findAverageWfmNoise.py | """
This script find the average RMS (in keV) for charge waveforms from different
channels.
"""
import os
import sys
import math
import time
from ROOT import gROOT
gROOT.SetBatch(True) #comment out to run interactively
from ROOT import TH1D
from ROOT import TFile
from ROOT import TTree
from ROOT import TGraph
from ... |
0e1d5b04f7453850df99cb2f21b3e3971182d9d3 | 592a075d7d5cc5964ade6d7ed35005c7380ea89d | /CoderByte/Python/CB-LetterChanges.py | 460144f79661bf1c6e546078f49dc011a58bc0ca | [] | no_license | stephwongwt/LearningGists | 48cdc3ac4bf65c6e7004318f02e9d56008a55bf3 | fef4b921d24bb4305b36ebf664ebdb42b6702cfe | refs/heads/master | 2021-08-16T10:24:25.777986 | 2020-03-30T08:15:12 | 2020-03-30T08:15:12 | 141,531,346 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 424 | py | CB-LetterChanges.py | #Coderbyte Challenge. Change alphabets to the next alphabet, capitalize if it's a vowel.
def LetterChanges(str):
# code goes here
givenl = list(str)
for i in range(0, len(givenl)):
oldchar = ord(givenl[i])
newchar = oldchar+1
if 97 <= oldchar <= 123:
givenl[i] = oldchar+1
if newchar in [97, 101, 105, 1... |
1d64da637bbc5e50ad7a1a5784e2aeb1919c5df9 | 6c059d069c2b28621a08da372df1ab5316d8568e | /Modulo1/Aula16/contas.py | 2665ea9e0426cc456cc16beb8f6d4dd288afe842 | [] | no_license | ricardobgarcia/DSdegree | f97b0314e79c106ec038e689bf222de98880b725 | a854256304cfc88d499668807af822821cfc7d8c | refs/heads/master | 2023-08-22T23:50:02.956236 | 2021-11-04T01:05:25 | 2021-11-04T01:05:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 184 | py | contas.py | def soma(a, b):
resultado = a + b
return resultado
def media(x, y):
s = soma(x, y)
resultado = s/2
return resultado
def subtracao(a, b):
return a - b
var = 5 |
97f8e177d2e75971c6a2b46b49c37c3a9762a70c | 74cd10aecccd62ce9073a888b041be6de51ab520 | /Lesson_07/lambda_functions.py | 4a2b41245df288b05303c6e193a0a665fa516c3e | [] | no_license | Sanyarozetka/Python_lessons | e309f6d829f42863f2f561321cfd816f5184bf9a | 98f37488565cea1f6fac5b69fda86fb9bbdb4a7f | refs/heads/main | 2023-05-03T00:34:53.870077 | 2021-05-29T08:39:25 | 2021-05-29T08:39:25 | 352,309,330 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 807 | py | lambda_functions.py | import random
# def fahrenheit(temperature):
# return round(((float(9)/5) * temperature + 32), 2)
#
#
# def celsius(temperature):
# return round((float(5)/9)*(temperature - 32), 2)
temperatures = (36.5, 37, 37.5, 38, 39)
# lst = []
# for t in temperatures:
# lst.append(fahrenheit(t))
# print(lst)
# ... |
79301b2d77d9ba69f87a607e1150189932e99a27 | 5605ea4fba9feba2446e36216101a4b535945543 | /administration/migrations/0007_auto_20200921_2116.py | f30d64bc4b8ff4da6dcef0ac4b0a7682d09a01dd | [] | no_license | ranziitsah/school_management_system | bfb70f809945eed4f17b60d7f9aa92321124627a | 898778f7d3e5e634ca6220511f8787178b82096c | refs/heads/master | 2022-12-24T22:33:02.809106 | 2020-09-26T07:32:08 | 2020-09-26T07:32:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,312 | py | 0007_auto_20200921_2116.py | # Generated by Django 3.0 on 2020-09-21 15:31
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('administration', '0006_auto_20200920_2121'),
]
operations = [
migrations.CreateModel(
name='Princ... |
fe1e5a01932b78e3654c22888ef5fac477ef0657 | fc0150b1fd6ba0efd6746a34ffa8cba01640d10e | /Python_3_Programming_January_and_July_2016/Lecture_3/Задача_3_Променете_цените_в_каталог.py | 5776ffa0af26a294284c417112d0c0ae17f110a6 | [] | no_license | vgrozev/SofUni_Python_hmwrks | 7554d90f93b83d58e386c92dac355573c8cda848 | b10a941a0195ea069e698b319f293f5b4a660547 | refs/heads/master | 2021-06-08T19:40:27.009205 | 2019-11-24T17:19:31 | 2019-11-24T17:19:31 | 95,629,443 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,107 | py | Задача_3_Променете_цените_в_каталог.py | FILE_IN = 'catalog_full.csv'
FILE_OUT = 'catalog_plus_75.csv'
PRICE = -1 # currently at the last position --> index -1
PERCENT_INCREASE = 0.75 # 75% = 75/100 = 0.75
# Version 1.0 ------------
# with open(FILE_IN, 'r', encoding='utf-8') as catalog:
# with open(FILE_OUT, 'w', encoding='utf-8') as catalog_plu... |
0f833bf611afb3eac291580c233865fce8078713 | 06652474dacb29fd5acb086c3f4fbfabbfa697ef | /CollectiveIntelligence/optimization/socialnetwork.py | 2880e3ba8ad932faf8f0877c640686352ab6c233 | [] | no_license | kmr2001jn/python | 23c44cef9adbb17905c2d26eb7963a20339d7c69 | 86217af35fffe936348cfd65af78ee1cc9c3ee6e | refs/heads/master | 2022-02-17T02:07:19.017823 | 2019-08-11T13:42:47 | 2019-08-11T13:42:47 | 197,792,735 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,572 | py | socialnetwork.py | import math
people=['Charlie','Augustus','Veruca','Violet','Mike','Joe','Willy','Miranda']
links=[('Augustus','Willy'),('Mike','Joe'),('Miranda','Mike'),('Violet','Augustus'),('Miranda','Willy'),('Charlie','Mike'),('Veruca','Joe'),('Miranda','Augustus'),('Veruca','Joe'),('Joe','Charlie'),('Veruca','Augustus'),('Miran... |
a389822b6165a18790f6031e744b07b5a25b156c | 3717817ba153339dbf16a2d5d9586c4c1991dbff | /forum/migrations/0006_t_user_log.py | c71a2a8bf4a757f571dd10feebadc9fc33a3ae01 | [] | no_license | franssitumeang/PSI | b1842548f044046f0d0c5fadf4c9cc398eff4f68 | ceb0046da83b6db95958aed784a56ed5b341938e | refs/heads/master | 2020-05-25T23:41:06.756309 | 2019-05-22T13:03:31 | 2019-05-22T13:03:31 | 188,039,423 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 778 | py | 0006_t_user_log.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-30 04:10
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('forum', '0005_auto_20170518_1014'),
]
operations =... |
a349fc21f6e314602922bac8ef0029fbb4e81348 | 3e68469c07eb1d5ecf865c716376d0d27a34c893 | /examples/mnist_random_search.py | e28303fa8fd0eaca2460cfb08dce4c4cc91c9b76 | [
"MIT"
] | permissive | alencon/codecarbon | d02e072e16ba4f69620f2dca32072288116e789b | a65e2f55b4121573763358ca2622cc38d3b5c76e | refs/heads/master | 2023-04-06T13:19:30.148350 | 2021-04-08T20:01:32 | 2021-04-08T20:01:32 | 352,896,580 | 0 | 0 | MIT | 2021-04-08T20:01:22 | 2021-03-30T06:39:12 | null | UTF-8 | Python | false | false | 1,586 | py | mnist_random_search.py | import kerastuner
import tensorflow as tf
from codecarbon import EmissionsTracker
class RandomSearchTuner(kerastuner.tuners.RandomSearch):
def run_trial(self, trial, *args, **kwargs):
# You can add additional HyperParameters for preprocessing and custom training loops
# via overriding `run_trial`... |
36637228be38535dbb691e40b5d40dbefdfddb5b | 4ca5796cfa2fab70d9728f1a13abe41b38a37cce | /src/main/python/bank/table_names.py | 7d437526411066760dbc7df4fcc33355bb2794a3 | [] | no_license | sameerarora/python-workshop | a1e11cf5e48abc5e6393e1066de265dc553ebea3 | 6583b191ba79ded138b53b079e527d6e53415c3e | refs/heads/master | 2023-02-17T05:41:08.316721 | 2021-01-14T11:26:32 | 2021-01-14T11:26:32 | 288,372,241 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 172 | py | table_names.py | import re
for line in open('../../resources/poem.txt'):
if re.search('the', line):
substituted = re.sub('the', 'THE', line)
print(substituted, end='')
|
f359624dd7fa1523af8462f6746f9be6612e402e | 5792c4e79c22d743defa69775b74bea56a6b79dd | /apps/book_review/views.py | 917c105b457440a30fe8c340e118dca21f2f7616 | [] | no_license | etl-68/Django-Book_Review | 89d996158484157e739cd401f8ed9cac66856733 | 9bed461d3d57c24665929c23df35e08bcf777030 | refs/heads/master | 2021-01-19T00:10:58.028241 | 2017-04-04T04:32:43 | 2017-04-04T04:32:43 | 87,148,238 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,275 | py | views.py | from django.shortcuts import render, redirect
from .models import Book, Author, Review
from ..login_registration.models import User
# Create your views here.
def start(request):
context={
'reviews': reversed(Review.objects.all().order_by('-id')[:3]),
'books': Book.objects.all(),
}
return r... |
a32659e16450bc9d339515b43dbea2e5de52f7ba | 37e95a9e45065cf94eec5db64d0917164c13730e | /getsitemap/urlhandle.py | 5899814e19e01b9cb9e13411b1033fac9014bc08 | [
"MIT"
] | permissive | hsiaofongw/watson | 2eae9c04b072eadd703774d27e9fad305b780fa9 | bd8939e198d747633db00582a9f5bb00bdc04acc | refs/heads/master | 2021-04-06T21:26:03.684457 | 2020-03-20T15:11:28 | 2020-03-20T15:11:28 | 248,615,086 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 322 | py | urlhandle.py | # compose a valid url from given parameters
class URLHandler:
def make_sitemap_full_url(self, host: str, sitemap_path: str, http_scheme: str) -> str:
return "{http_scheme}://{host}{sitemapPath}".format(
http_scheme=http_scheme,
host=host,
sitemapPath=sitemap_path
... |
65e537c9de5cd4825bdc8d7d86a9386989f6cc72 | 400119671f21a5eb53f8f28970b2276ea780714e | /backend/migrations/0005_stock_tag.py | 2e369e7af195cbd08c7ff4b51a4ebff1bff934d3 | [] | no_license | code828/mystock | 7ed07b2caf5d2c8fdc88b300815300d518d415ed | 4a8265abf8d9c0aa54d21b25077771d6de227c36 | refs/heads/master | 2020-09-21T09:35:53.571935 | 2019-12-17T08:49:16 | 2019-12-17T08:49:16 | 224,753,695 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 398 | py | 0005_stock_tag.py | # Generated by Django 2.2.7 on 2019-12-09 12:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('backend', '0004_stockaddress_stockrecrod'),
]
operations = [
migrations.AddField(
model_name='stock',
name='tag',
... |
3d044a5814b87238a7b49bd9eb476f081f39509e | 859cc29188febfbe5777f88d31a49798349d2467 | /samples/3-5_scrape-by-lxml/scrape_by_lxml.py | 7b7df3dff3a0f3d2c05f1edc06eaa22d990a8ff6 | [] | no_license | abeaki/study-python-crawling | 041c8528eb70987e3754e19369e01ad7b75720bb | ff8dc15716d793c4cbe63d2c6fc6c52b83958195 | refs/heads/master | 2021-04-03T20:38:09.778720 | 2020-03-19T02:47:37 | 2020-03-19T02:47:37 | 248,394,406 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 345 | py | scrape_by_lxml.py | import lxml.html
with open('book.html') as f:
root = lxml.html.fromstring(f.read())
#tree = lxml.html.parse(f)
#root = tree.getroot()
print(root.tag)
print(root.xpath('//title')[0])
print(root.xpath('//title')[0].text)
for a in root.xpath('//h3//a'):
print(a.get('href'), a.text_content()) # text_con... |
1a4951644563cedf315911ea864a4b28d2821a3b | 8d070530a41abaf99b58423314541cdb3138fbbe | /sacredboard/tests/app/process/test_process.py | 1e945a00e07bd5f3c763247ffb10bd05aa578069 | [
"MIT"
] | permissive | luthfianto/sacredboard | 36075c57c42841123e61d8c37be12e20aacbe7b5 | 26063c8859ef7d149550a2a4f6aa54b4478cd2e9 | refs/heads/master | 2021-10-27T17:04:17.262988 | 2017-04-26T13:57:53 | 2017-04-26T13:57:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,531 | py | test_process.py | # coding=utf-8
import os
import pytest as py
import sacredboard.app.process.process as p
import sacredboard.tests.app.process.fixtures.tensorboard as mock_tensorboard
path = os.path.dirname(mock_tensorboard.__file__)
p.TENSORBOARD_BINARY = "python %s/tensorboard.py" % path
@py.mark.timeout(15)
def test_run_tensor... |
d2675e0f83553a617db8194d12604d6413c6cf2e | 3e2fc0a1be68b0ea72b8089308ab56e41b0b052d | /brutils/pdutils/__init__.py | eabdeead1bac5d41445d59a26a29099da716a84c | [] | no_license | bmritz/brutils | dcf060c80cdc474d480f48a3207fc76a345c9814 | 044c5140dabf94af5fb2d91a61e0fea267816aff | refs/heads/master | 2021-03-27T13:09:48.613049 | 2017-11-15T18:14:57 | 2017-11-15T18:14:57 | 63,984,393 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 22 | py | __init__.py | from .pdutils import * |
477fcd2b45d282fe98d89edcfe030f90ddd3c90a | 4b7d9eab5fb19301277fc71ffe9350fe9826c3e0 | /text.py | 8bbc636c2a044a5a4ba546512f9812876eabd8d1 | [] | no_license | ashritatirumalaraju/phone | 207c685d5f45b1cc75f1b695f18e2532f2862a8c | 3d2b679474b8c14586ed6a1c0c335a78e1f303a3 | refs/heads/master | 2023-04-04T04:45:13.611351 | 2021-04-22T06:00:45 | 2021-04-22T06:00:45 | 360,405,685 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 55 | py | text.py | text1 = "Contact us at +919502345393 and +916303123092" |
30b954089095e38b4df588a23be02f030aefcd5e | 43aacb2c18b722f3a88b959202e1c63641d95024 | /music/migrations/0003_auto_20190127_1236.py | a405b9cd53b6ef81a097039c0822007dd7ffd94e | [] | no_license | Waterloo-Music-Academy/waterloo-api | 6e7736d9a5f446657cbc4dba3aef7dc75d9a8133 | 6cc3a3b264d4d4aa5261e0c37a4f9fc4e6273207 | refs/heads/master | 2022-11-24T00:46:25.367454 | 2019-12-28T01:37:48 | 2019-12-28T01:37:48 | 213,228,900 | 0 | 0 | null | 2022-11-22T04:46:14 | 2019-10-06T19:18:45 | Python | UTF-8 | Python | false | false | 935 | py | 0003_auto_20190127_1236.py | # Generated by Django 2.1.5 on 2019-01-27 18:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('music', '0002_auto_20190127_1231'),
]
operations = [
migrations.AddField(
model_name='album',
name='cover_height',
... |
429f4488042248e9c9e5e80b6c178cdd175ce14d | 24c1e5429cadc1393fe859f947c38514b5db56eb | /beautifulsoup/web_autohome.py | 7b5583d780fc75d71fad0f309084b8763eaa84fd | [] | no_license | ChrisNoone/python_reptitle | 2d7a2c4d6b46774b04ad3ded18d7a6f4d459de9b | a1d50341642a4b8f3a0619926a28f8fc3b161a2d | refs/heads/master | 2020-05-01T03:18:48.447227 | 2019-09-14T05:56:18 | 2019-09-14T05:56:18 | 177,241,935 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,683 | py | web_autohome.py | # coding: utf-8
import requests
from bs4 import BeautifulSoup
url = 'https://www.autohome.com.cn/news/'
web_page = requests.get(url)
# 汽车之家返回的文件编码格式是 gb2312,而python默认用utf-8编码,这个改一下获取到的web数据的编码格式
web_page.encoding = 'gb2312'
soup = BeautifulSoup(web_page.text, 'lxml')
div = soup.find(name='div', attrs={'id': 'auto-c... |
3275cb8c9d5475875069f028d44cbe09373df308 | d12002ec72bf83262957c300290abe49a409f237 | /pmi.py | 6b1303be58967a38a988f091308d78b495d7a331 | [] | no_license | whuawell/Reference-Scope-Identification-for-Citances-Using-CNN | 302ff5e5966dd809332838bb53d9cba7dd1e758d | b48a7d59f16cf6b7fc4ea7d71259df1fc270ead4 | refs/heads/master | 2020-07-05T12:06:56.867263 | 2018-01-17T18:47:31 | 2018-01-17T18:47:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,171 | py | pmi.py | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 27 14:53:43 2017
@author: lenovo laptop
"""
from nltk import bigrams
import collections
import math
def getsignificance(a):
a1=a.split()
a2=collections.Counter(a1)
a3=collections.Counter(bigrams(a1))
a4=sum([a2[x]for x in a2])
a5=sum([a3[x]for x ... |
2576e84d6a46a88b981efeb6f80a3f2163906484 | 21cf70b07debae12d9a91a9beaa8e7b959e70fb5 | /change.py | 83f82b8ee6e7bb099c70f0f46520a6be43d079d9 | [] | no_license | MarcJajonek/BSRN_Passwortmanager_SS21 | de41600ffddc6163827375a0f9de55e2159f70f8 | 0961e95879cd8d53e543f4ba7bfbb82ef21a0f6e | refs/heads/main | 2023-06-10T02:08:46.480504 | 2021-06-29T14:19:02 | 2021-06-29T14:19:02 | 380,811,550 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,485 | py | change.py | #!/usr/bin/env python3
import getpass
from genpassword import genpassword
import sys
from datetime_check import datetime_check
from verentschluesselung import verschluesselung
from password import password
def change_Befehl():
#Datei öffnen und Daten in eine List schreiben, getrennt wird durch ein Leerzeiche... |
d4dd768052497a21095f332c092d13d8e128cf63 | f620c1cfb6a0ed43082f1eddde7bf3d71b612885 | /leetcode/107binary-tree-level-order-traversal-ii.py | f0c60ffce1f2add6e500ce9c8bc7c93dd41aebae | [] | no_license | liu839/python_stu | 3ad481256ee6b39c7ebb93172fd0eb145a762eaa | 6fe0c1b0796f86aab040a1051d86fd8c1a6fa1a8 | refs/heads/master | 2023-05-08T09:13:54.505265 | 2021-05-20T07:52:22 | 2021-05-20T07:52:22 | 259,217,245 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 668 | py | 107binary-tree-level-order-traversal-ii.py | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def getval(self, root, deep):
if not root:
return
try:
self.res[deep].append(root.val)
ex... |
c23c10d1a15625c42f510d43efe114c8f82a1460 | ccf69d003df0babe87a4dd6ed4420e0f0324c511 | /app/expsys.py | 3002df58c73b8dc85581b8a7e298cb32a91b25de | [] | no_license | skryabinav/testqa | 4a49a2a1d006c5e1b0fc1a4ab81848ff164a6202 | e520ca6358c87c278c6e92431f1022a9192396a3 | refs/heads/master | 2022-04-06T19:08:19.670884 | 2020-02-26T09:46:30 | 2020-02-26T09:46:30 | 226,188,826 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,698 | py | expsys.py | #!/usr/bin/env python3
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
import urllib.request
import argparse,os,time,csv
from selenium.webdriver.chrome.options import Options
class expsys:
def __init__(self, debug):
self.debug=debug
self.OKGREEN = '\... |
e92dbd2526f7512ab2ed424457bcd539c9a8c8a4 | 26060f5ea4d7efee2d03cbbd0b49c099e0f5f38a | /tests/uvlm/static/polars/generate_wing.py | 349b1cecc8949b0099a36454e196dcad6c18bb07 | [
"BSD-3-Clause"
] | permissive | ImperialCollegeLondon/sharpy | 0fcd1fba9ed2181dabc1124f9800aa75521bfc3d | 58ddceb985bef13af3ea199a1764c8dc9b088907 | refs/heads/main | 2023-08-19T03:04:26.044857 | 2023-07-17T07:05:06 | 2023-07-17T07:05:06 | 70,235,936 | 106 | 55 | BSD-3-Clause | 2023-08-16T02:27:58 | 2016-10-07T10:11:51 | Python | UTF-8 | Python | false | false | 11,412 | py | generate_wing.py | import numpy as np
import sharpy.cases.templates.flying_wings as wings
import sharpy.utils.algebra as algebra
import sharpy.sharpy_main
def generate_infinite_wing(case_name, alpha, **kwargs):
m = 8
n = 4
mstar = 500
u_inf = 1
alpha_deg = alpha
alpha_rad = alpha_deg * np.pi / 180
rho = 1.2... |
cba0b26c7f88dc06ad2ec3a593e8274c80631295 | 7adaf7f13e6b7ce37b893045b60042315fca876e | /src/pyMission/coupled_analysis.py | 8268d2c089d66d852200d9fa4d84b9b5617e0fd3 | [] | no_license | OpenMDAO-Plugins/pyMission | 43c115bfbf80c6c0f7e816d56ae29fc72051985f | 5b39ec79abed7db359def1d73f514b0ea4b89d87 | refs/heads/master | 2021-01-23T08:39:59.327739 | 2015-03-30T18:12:04 | 2015-03-30T18:12:04 | 23,191,741 | 3 | 3 | null | 2015-03-30T18:12:05 | 2014-08-21T15:08:13 | OpenEdge ABL | UTF-8 | Python | false | false | 26,778 | py | coupled_analysis.py | """
INTENDED FOR MISSION ANALYSIS USE
The horizontal and vertical flight equilibrium equations are presented
and enforced. The fuel weight is also computed. The user-defined relation
between alpha, CL, and CD are not here!
The mission analysis and trajectory optimization tool was developed by:
Jason Kao*
John ... |
7e1ab56a58ba6a348acc09479840b85257a408d6 | ea795c8ef6505ec525ba15c63ad0848f5ae94bed | /Counting Elements.py | c6651c110fd18803b52e87566f5019d49aaa41eb | [] | no_license | ABaligar/leetcode30DayChallenge | 67aadc91726f71129cd2aee830031a459309ddf3 | ac2f2d1332a2d56e99ce707a7a83cecc46e66a57 | refs/heads/master | 2021-05-21T08:10:03.439075 | 2020-05-07T06:43:09 | 2020-05-07T06:43:09 | 252,613,392 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 533 | py | Counting Elements.py | #https://leetcode.com/explore/featured/card/30-day-leetcoding-challenge/528/week-1/3289/
class Solution:
def countElements(self, arr: List[int]) -> int:
helper_map = {}
for element in arr:
if element in helper_map:
helper_map[element] += 1
else:
... |
c548672fd6d212ecf56b532db5c04955d0328e0b | ba23115df4beb99cfbb944f3e2a39c7523a4c732 | /lidar.py | 311b4c670f40e38e8500f4b13145eff8ee4d6df6 | [] | no_license | jangj8523/lidar-object-tracking-python | 0746a9dadf3112dcab76e41263daf3b2610d0d97 | 919eb5078d3b659ec3a3a961741166efcb1db60e | refs/heads/master | 2020-07-11T14:38:17.561650 | 2019-08-26T23:06:58 | 2019-08-26T23:06:58 | 204,571,240 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,910 | py | lidar.py | from rplidar import RPLidar
from concurrent.futures import ThreadPoolExecutor
from threading import Thread, Lock, Event
from collections import deque
import time
import sys
import paho.mqtt.client as mqtt
import os
import copy
import logging
import math
import Constant as c
class Lidar:
def __init__(self):
... |
fa8f7422f6432dbb0e63ff84908dfed0e433e060 | fdb6c1fe64f349bef001bc8b954aa9922b5db4a3 | /Gonz4PYTHON/clau.py | 5a15a0c6dc92b962555ef3d2183be7679709888b | [] | no_license | Gonz4Man/ensayos-complejidad | 936c59ab54246e3b8543b168e33d2fd592a93e6b | 1a301b3a168beb1f701130934e18cdcc3845482e | refs/heads/master | 2016-08-12T22:12:50.918067 | 2015-02-22T21:48:58 | 2015-02-22T21:48:58 | 48,695,318 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,945 | py | clau.py | import pygame
import random
pygame.init()
ventana = pygame.display.set_mode([1000,900])
pygame.display.set_caption("Laurita XXX")
reloj = pygame.time.Clock()
fuente= pygame.font.SysFont("Harrington", 40)
texto = fuente.render("(X)EXIT",True,(200,0,0),(0,0,0))
clau2 = pygame.image.load("you/clau2.png")
clau3 ... |
185996d085d039a116e233cc0f79ae401ff5d12f | 002e2165c63945a46aed8935f9afecf1f15a0d78 | /ion/agents/data/test/test_dsa_moas_dosta.py | 92b53b128755f6d8f31e4c90141434e4bfb1e84a | [] | no_license | wfrench/coi-services | a2be931c20d0751b98a18df07cf4acd94e9d9be7 | dd9ecdee507458efc8b8f64ebcb00b23289f33b4 | refs/heads/master | 2020-04-09T01:23:36.429311 | 2014-06-12T15:47:56 | 2014-06-12T15:47:56 | 3,411,433 | 0 | 0 | null | 2012-06-22T21:24:32 | 2012-02-10T21:47:02 | Python | UTF-8 | Python | false | false | 2,539 | py | test_dsa_moas_dosta.py | #!/usr/bin/env python
"""
@package ion.agents.data.test.test_moas_dosta
@file ion/agents/data/test_moas_dosta
@author Bill French
@brief End to end testing for moas dosta
"""
__author__ = 'Bill French'
__license__ = 'Apache 2.0'
import gevent
from pyon.public import log
from nose.plugins.attrib import attr
from ion... |
f5903f937bbe81a38d68c50780228abee7f3610c | c63a622f05685816d71f86493fb7b5ed7390744f | /code/SVM_test.py | 1a1760d084c7bfb48d71ecb8fb80ffdaa953f86d | [] | no_license | akallu/SWAG | 31e47d6dcf5ecc9dac329bc7748d9fd1b5635623 | ea6076934485df3ee071f1d865e5e69a16240950 | refs/heads/master | 2021-01-20T11:59:49.854954 | 2013-06-14T07:48:18 | 2013-06-14T07:48:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 919 | py | SVM_test.py | #!/usr/bin/python -tt
import re
import sys
import classifiers
import cPickle as pickle
from matplotlib import pyplot as plt
def main():
T = pickle.load(open('../data/data_pickles/pd.pickle', 'r'))
x0, y0 = benchmark(T)
T = pickle.load(open('../data/data_pickles/bc.pickle', 'r'))
x1, y1 = benchmark(T)
T = pic... |
51e6b9524cdfdc7a7c84cd8491baeb21dd7b8383 | a377648726c1a2987a05acee9c4e75a745dab29a | /game/Pendulum.py | a94dd4db3816402796153e46f15c2db069aa4029 | [] | no_license | guangxush/Mozart | 1ff253602b87eea6bae0088f03d478c0543fbc4f | 2ec3e24652735f7d0214397a6ad38eb6861c15da | refs/heads/master | 2020-04-04T00:40:40.934218 | 2019-01-12T05:47:30 | 2019-01-12T05:47:30 | 155,658,783 | 6 | 1 | null | 2019-01-12T05:47:31 | 2018-11-01T03:46:46 | Python | UTF-8 | Python | false | false | 811 | py | Pendulum.py | # -*- coding: utf-8 -*-
import gym
def try_gym():
# creat Pendulum env.
env = gym.make('Pendulum-v0')
# reset game env.
env.reset()
# episodes of game
random_episodes = 0
# sum of reward of game per episode
reward_sum = 0
while random_episodes < 10:
# show game
en... |
9aefe6c97f6582918b0f88ae6c41493807eb1632 | f5aa213dbebe5d1e6c083dccda803a894d06f531 | /FB-Graph-API/firebaseDataUploder.py | 126dc7323947dbac49234e2c47516ebff79bef6d | [] | no_license | kevintanhongann/Mssng | c5a56f34262eba22c771b1650f231ded1e2bf8bc | a939dc803ff250cd115cab9ec9ad61a8b4749121 | refs/heads/master | 2021-01-24T10:05:40.901828 | 2016-09-23T05:55:34 | 2016-09-23T05:55:34 | 68,899,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,600 | py | firebaseDataUploder.py | import pyrebase
config = {
"apiKey": "AIzaSyBGji4RqyJ2Lj5jxF3xWVDKEhIc7-SlOvQ",
"authDomain": "mssng-16afe.firebaseapp.com",
"databaseURL": "https://mssng-16afe.firebaseio.com",
"storageBucket": "mssng-16afe.appspot.com"
}
firebase = pyrebase.initialize_app(config)
# Get a reference to the auth service
auth ... |
5b8c95354f8b27eff8226ace52ab9e97f98ae217 | 048c152a7da9e2058f21970fc8418d553f40a3dd | /data_processing.py | 7e78821598607bc8e430d13b200b609bf305fca3 | [
"MIT"
] | permissive | fzaidi2014/dreamai | c858ff582e397d35d1490db867235ebe3bf2e7c6 | 02b9a58a65357dbe153baac403752c739b800f43 | refs/heads/master | 2020-04-18T02:48:15.941312 | 2019-05-19T21:16:21 | 2019-05-19T21:16:21 | 167,176,645 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 26,208 | py | data_processing.py | from dai_imports import*
from obj_utils import*
import utils
class my_image_csv_dataset(Dataset):
def __init__(self, data_dir, data, transforms_ = None, obj = False,
minorities = None, diffs = None, bal_tfms = None):
self.data_dir = data_dir
self.data = data
... |
64c32b3ada7fff51a7c4b07872b7688e100897d8 | 90a7d56160f099844b02c90c9c6faccfcc479d82 | /Practice/bst.py | 286937b02010a991676eece4a34c2698d26b69e6 | [] | no_license | naveenc131/project | 60b38b0e18422a9e023afa97058f3fd8885994e8 | 0627410f878a336abe314977aede38e47fe34c71 | refs/heads/master | 2020-06-11T12:49:20.601019 | 2017-04-27T21:48:46 | 2017-04-27T21:48:46 | 75,662,065 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,996 | py | bst.py | class Node(object):
def __init__(self,data):
self.data = data
self.left = None
self.right = None
self.parent = None
class tree(object):
def __init__(self):
self.root = None
def insert(self,root,value):
if self.root == None:
self.root = No... |
88ec9484e934ce27b13734ca26f79df71b7677e6 | 1ec81d617c9444d83581d2900fd8a09ac6560f0c | /FreeLancer/freelance.py | 0c865b14ed3014e37410786da7dddf4429877eee | [] | no_license | 5l1v3r1/HTB_WEB_CHALLENGES | 0f3ae01fa1ff65ee01fc8abbed8446691576b78f | c2c331c8242a31bd8d89ea225992968592c01573 | refs/heads/master | 2022-03-27T11:29:17.968548 | 2019-12-26T18:53:38 | 2019-12-26T18:53:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,557 | py | freelance.py | import requests
from bs4 import BeautifulSoup
import sys
import re
if len(sys.argv)<2:
print("Syntax : python %s <port>")%(str(sys.argv[0]))
else:
print('-'*55)
print("HTB WEB-CHALLENGE coded by ZyperX [Freelance]")
print('-'*55)
r=requests.session()
port=str(sys.argv[1])
url="http://docker.hackthebox.eu:"
url=... |
cd2e03666a890d6e9ea0fcb45fe28510d684916d | 0ea74190e0fb81ac2960862bdd3174ef3eb11492 | /funcs.py | c9d9f8276bc36f9f44ca8c4788bba1fdbcc48744 | [] | no_license | Shamanche/cto | abbe7c0f5afb3ae65d47d224401cf41d71661f81 | 003228b5690c9e8c25d8ae7100ca33fe3384f07f | refs/heads/master | 2023-01-13T01:57:09.904555 | 2020-11-06T12:45:31 | 2020-11-06T12:45:31 | 304,552,038 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,763 | py | funcs.py | import requests
def squeezed (client_name):
return client_name.replace('Индивидуальный предприниматель', 'ИП')
def get_kkm_filled_fn(max_fill=80):
## возвращает список ККМ с заполнением ФН больше max_fill в %
LOGIN_URL = 'https://pk.platformaofd.ru/auth/login'
API_URL = 'https://pk.platformaofd.ru/api/mon... |
709f2425bc6e0b0b650fd6c657df6d85cfbd05fe | 1f47093410f440f1f465c87d7ce86c563486dd28 | /petite_vue_app/views.py | bb1c1bbc393f1641cdae2d660fd3f43483147009 | [] | no_license | bideinsilence/django-petite-vue-form | a8258ec1938667f367d366ef8ef913c6f3808bf9 | 42f25acbc9d702185562220d0359322d1116b772 | refs/heads/main | 2023-08-30T17:26:55.496298 | 2021-10-26T19:14:17 | 2021-10-26T19:14:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 153 | py | views.py | from django.shortcuts import render
# Create your views here.
def test_petite_vue(request):
return render(request, 'petite_vue_app/test-form.html')
|
a4deb67d277538e61c32381da0fe4886016dae33 | f30a49ab916454af507bcc2f2087240cf86ba8e2 | /train-jpg/nn.py | e471890a0de40bae5d43c68eb9c8452e09573749 | [] | no_license | masarain/cs229TreeHugger | 38cab5183434764e653898f13ba88757244ac488 | 83b806648c0d3f563be03aa57b2a1a64b504f996 | refs/heads/master | 2020-08-27T17:10:52.417510 | 2019-12-13T21:36:23 | 2019-12-13T21:36:23 | 217,440,060 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,554 | py | nn.py | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import cv2
import imageio
import pandas as pd
import glob, os
import numpy as np
fileDir = os.getcwd()
# os.chdir("./train-jpg")
# there are 40480 training examples
# we will allocate 39000 for training
# and the remaining ... |
914f477518918619e0e42184bd03c2a7ed16bb01 | 9f0a98692c6a6deea11c99744bd725ff32e7df16 | /firstapp/models.py | fe9e8adbb1192cff2ecb374838c219044008e6cd | [] | no_license | wertarts/APV_F | 4a106f5478024ca795eaaa1f669c3dcd6385f55c | cf52ac33dba448895b998bd6bc6d709fe1fa8f54 | refs/heads/master | 2020-06-03T22:22:03.768518 | 2019-06-13T12:21:04 | 2019-06-13T12:21:04 | 191,755,448 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,489 | py | models.py | from django.db import models
class Location(models.Model):
id_location = models.AutoField(primary_key=True)
city = models.CharField(max_length=100, null=True)
street_name = models.CharField(max_length=100, null=True)
street_number = models.IntegerField(null=True)
zip = models.IntegerField(null=Tru... |
cdbf9427d48f0a5c53b6efe0de7dfea65a8afd83 | 3097d8735287c8e574c56831d0d49eeb4c624ad7 | /luxon/utils/unique.py | c3bc7c9076079e96b631c441460a1b7e0ba9a046 | [
"BSD-3-Clause"
] | permissive | TachyonicProject/luxon | 897b91e8d24bb41b66dd09c7df8933e8f8135753 | 5cfdc41a9983821b27f832c87e6424d90c0a8098 | refs/heads/development | 2020-03-12T16:49:09.961915 | 2020-01-08T11:58:12 | 2020-01-08T11:58:12 | 130,724,301 | 5 | 7 | NOASSERTION | 2020-01-08T11:58:40 | 2018-04-23T16:15:40 | Python | UTF-8 | Python | false | false | 2,696 | py | unique.py | # -*- coding: utf-8 -*-
# Copyright (c) 2018-2020 Christiaan Frans Rademan <chris@fwiw.co.za>.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the ... |
c4624425f57211e583b5fbaec3943539ce6fea6f | 9e796ef2d212e6930e04328fc730853b17771a8f | /Website/Src/blog/forms.py | 80a335c2ed99477431d41cfcfec7a4d2f1d5d077 | [] | no_license | Vcarter2/Djanglah | 292c0817a100c9f24ac9ffe2629c7c99f951313b | 5ce7b248f88247b55d0597a8cde6bc62cf5d0d1f | refs/heads/main | 2023-03-22T09:20:21.823242 | 2021-03-13T17:51:57 | 2021-03-13T17:51:57 | 347,424,568 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 145 | py | forms.py | from django import forms
from . models import BlogPost
class BlogPostForm(forms.ModelForm):
class Meta:
model = BlogPost
fields = '__all__' |
a42f36fca2f65d0c5c9b65055af1814d8b4b3d42 | 316b99c6046ff58c8499e0c214e9b81d9c3132b0 | /beartype/_data/module/datamodpy.py | 41592cdd1f3abe4ad000e5deab5034a04563b8d2 | [
"MIT",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | beartype/beartype | fb6417b3dc2e08c065f0d907f43411c33d883a7d | 0cfd53391eb4de2f8297a4632aa5895b8d82a5b7 | refs/heads/main | 2023-08-15T13:17:47.095732 | 2023-08-15T05:25:54 | 2023-08-15T05:25:54 | 252,646,465 | 1,992 | 51 | MIT | 2023-07-28T04:13:08 | 2020-04-03T06:06:22 | Python | UTF-8 | Python | false | false | 819 | py | datamodpy.py | #!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright (c) 2014-2023 Beartype authors.
# See "LICENSE" for further details.
'''
Project-wide **standard Python module globals** (i.e., global constants
describing modules and packages bundled with CPython's sta... |
dfa49594d0a11ebd52d3a5f0fb094ebd298b6d09 | 3272af9d94a6a89e718a9368f014a683a112e5d6 | /89.py | 77dc2a60ad312af2dc561a2693480c3b2d490cb5 | [] | no_license | shilpa2020/python-1 | 003fd51fdb802d4fbf3b0639c42502b53249442d | c6406595352bad6d90a4aabd6efa1c4f08afaf17 | refs/heads/master | 2020-06-28T20:53:10.225990 | 2019-08-03T04:56:47 | 2019-08-03T04:56:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 59 | py | 89.py | strg=input()
lex=sorted(strg)
print(''.join(map(str,lex)))
|
9fd7e1438820213a7b1e9677aef8381cb9844b90 | 013e48f9f9c82417f450568ec4f3af5e6b8f9d11 | /core/ydk/models/ydktest/ietf_netconf_with_defaults.py | ffdd129a40f6fb2ba2c1a829ce4619f3744fcfc0 | [
"Apache-2.0"
] | permissive | 111pontes/ydk-py | 4833f2d0524ec0c52f02f5f2c0fcbf05b50c0b96 | db2feddee1d91c992fe1c6ac154133504b33d0fb | refs/heads/master | 2021-01-15T17:20:09.916153 | 2017-06-06T23:57:35 | 2017-06-06T23:57:35 | 54,524,209 | 1 | 0 | null | 2016-03-23T02:24:11 | 2016-03-23T02:24:11 | null | UTF-8 | Python | false | false | 1,747 | py | ietf_netconf_with_defaults.py | """ ietf_netconf_with_defaults
This module defines an extension to the NETCONF protocol
that allows the NETCONF client to control how default
values are handled by the server in particular NETCONF
operations.
Copyright (c) 2011 IETF Trust and the persons identified as
the document authors. All rights reserved.
Red... |
85e1312874921bddcaef1e18cd3e37bb09cef26f | 216e63a4cae014ff85e19fad0b0d9e9d794d829a | /lab5/task1.py | 985ff9259e32734f39b849030770be62322a9eb9 | [] | no_license | yklym/templates | e387d5355356da02203ee61453da775408b66d07 | 32781396433ac6f95f22135ad226210bf16eb92c | refs/heads/master | 2021-02-03T22:31:46.173088 | 2020-04-17T17:55:02 | 2020-04-17T17:55:02 | 243,560,645 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,819 | py | task1.py | # Деякий галузевий концерн об’єднує декілька фабрик з виробництва
# устаткування для підприємств важкої промисловості. Замовлення на
# виготовлення продукції надходять з вказівкою, яка саме фабрика
# бажано повинна його виконати. У разі, якщо вказаній фабриці не
# вистачає ресурсів для виконання замовлення, вона пе... |
9477037a3b2cf30a59d4acecb42987290fa05b06 | e92b426c27fe362184be7006d45f6b44929e56c2 | /deepx/rnn/__init__.py | ff0cf35728d7b801e7a7ee4b1677b06aff105e77 | [
"MIT"
] | permissive | wycharry/deepx | 5c48f88b7d028508c56f7f448d7c1ae7fec15114 | 5e2932f8d082f121e84667ce140690bc21e2e357 | refs/heads/master | 2020-04-22T15:04:30.129953 | 2019-01-13T07:34:24 | 2019-01-13T07:34:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 46 | py | __init__.py | from .lstm import *
# from .generate import *
|
c6f9c3907eb6b7b3230b5e09e1fa4c7ffd54be88 | c4782e47abcb184917023c19060865daf2526934 | /PlayByPlay.py | 8dc2c5712495394f603758a55de16ce98ac69af0 | [] | no_license | rubenflamshepherd/HockeyScraper | 19274c6a0d86d6a80e5f73c7073482e251dec553 | a3d8afd8fea27b4b96a194cfdce64908a091ccd1 | refs/heads/master | 2021-01-18T21:49:56.627656 | 2017-01-30T17:50:55 | 2017-01-30T17:50:55 | 42,611,636 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 38,452 | py | PlayByPlay.py | import GameHeader
import Operations
import re
import Roster
# encoding=utf8
import sys
reload(sys)
sys.setdefaultencoding('utf8')
class Event(object):
def __init__(self, num, period_num, strength, time, event_type, zone,
description, away_acronym, home_acronym, away_on_ice, home_on_ice):
self.num = num
... |
fb3c82a23039721ff34099856c84b2b886ce572b | 4da66fb8568f88e8ad777ca29732166e5fe0704a | /tests/test_ft_templates.py | 888b80d7ba2b016dbc3d03e2f12cd16b79ef4529 | [
"BSD-3-Clause"
] | permissive | robotpy/robotpy-build | b5b091b9a1ccdd995da492f50b515f67fbfdd8d1 | 8274a674f6177906fe38309ae008b783a0c9b159 | refs/heads/main | 2023-07-12T03:33:17.326548 | 2023-07-07T14:37:40 | 2023-07-07T14:37:40 | 214,119,803 | 32 | 19 | BSD-3-Clause | 2023-09-10T23:58:02 | 2019-10-10T07:47:40 | Python | UTF-8 | Python | false | false | 1,150 | py | test_ft_templates.py | from rpytest import ft
def test_basic_template():
"""template/basic.h"""
s = ft.TBasicString()
s.setT("string")
assert s.t == "string"
assert s.getT() == "string"
def test_dependent_using():
du = ft.TDependentUsingInt()
assert du.getThird([1, 2, 3]) == 3
def test_dependent_using2():
... |
6aa73f1a01d0426e23a7d5b4a0bfc2184993a2d1 | 4d074d3daee33a6062d5c23514c7cd7bdd81895d | /global/changelog/fit2/functions.py | 12c9fec5e9736a6c439d092a22045f63201808b9 | [] | no_license | mbr-phys/cpviolation | 01fa66939b20071212af7dae06dc725668fa0a3b | 73b920ab47e6ef870393c30301c2cb1b5b9c5c62 | refs/heads/master | 2022-01-24T21:40:23.276742 | 2022-01-18T14:16:02 | 2022-01-18T14:16:02 | 196,842,930 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 63,775 | py | functions.py | from __future__ import division
import numpy as np
from fitting import *
from scipy.integrate import quad
g_gev = (1.1663787e-5)**2
Gf = 1.1663787e-5
hbar_gev = 6.582119514e-25
g_mev = (1.1663787e-11)**2
hbar_mev = 6.582118514e-22
########## LEPTONICS ##########
def bsm(mm,ml,Vud,fm,taum,delta):
'''
Cal... |
66cbe9327bf76a9a7751c8efc489e593be3cb32d | 8b4d84fcf32c03783dcaca0dd470dc60ed829282 | /Chapter12ProjReadSheetData.py | 22bdd5873713b19cd1fd326a0de1f49fb3402396 | [
"MIT"
] | permissive | lotspaih/automateBoringstuffPython | 1776c1054e3d3e6babf76f64e9147c32f6295e1a | 51a402e31df01c36ae45dccad662d04b30378fea | refs/heads/master | 2020-04-29T00:36:05.267875 | 2019-03-14T21:18:20 | 2019-03-14T21:18:20 | 60,571,508 | 107 | 51 | CC0-1.0 | 2018-01-10T06:54:00 | 2016-06-07T01:11:38 | Python | UTF-8 | Python | false | false | 1,178 | py | Chapter12ProjReadSheetData.py | #! /usr/bin/env python3
# Chapter 12 Project Reading Spreadsheet Data
# Tabulates population and number of census tracts for each county from
# censuspopdata.xlsx.
import openpyxl
import pprint
print('Opening workbook...')
wb = openpyxl.load_workbook('censuspopdata.xlsx')
sheet = wb.get_sheet_by_name('Population by ... |
8ba6e304534b032d7265e09475c6a5dea986749a | cbe29f3e8ee9957c94930d89740ea6827e51c83c | /decorators.py | a279762658d2272af6b56057521277897496fd26 | [] | no_license | Sahanduiuc/PyStand | f86e4f9096ebc19fff822c09697a8c69e09847ab | bf8a0cb9c159eec07f6ff69ef55178c32ec8a304 | refs/heads/master | 2020-07-12T16:25:15.444822 | 2010-01-13T10:34:45 | 2010-01-13T10:34:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,588 | py | decorators.py | def decorator(func):
"""
This is a meta-decorator to facilitate decorator creation. When used on a
function, it returns a function which, when called, passes the decorated
function and the arguments of the call to the decorator.
Example:
@decorator
def test(func, *args, **kwargs):
print 'Function %r ca... |
ea9ed9134ea4f83fbf5aa6e969d3f1e20a2fc93c | be7257c150d5db4c45387162e24de06d870f8ecd | /Les7/pe7_1.py | 0bef8bf3e973eeea8a97ebc4336e059ea20d1c9f | [] | no_license | DaanKaak-HU/pythonProgramming | 63018d19561db7a558cc0f95255a30de10c7c5d0 | 39a11f8edb8adb85f7a521ecf948010a48c47062 | refs/heads/master | 2021-07-17T23:36:55.253648 | 2017-10-25T13:18:01 | 2017-10-25T13:18:01 | 104,073,145 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 180 | py | pe7_1.py | def sum():
total = 0
while True:
number = int(input('geef nummer: '))
if number == 0:
break
total += int(number)
print(total)
sum() |