Skip to content

Instantly share code, notes, and snippets.

Foad Sojoodi Farimani Foadsf

Block or report user

Report or block Foadsf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Foadsf / CMakeLists.txt
Last active Feb 5, 2020
testing command line arguments double pointer type casting for pybind11
View CMakeLists.txt
cmake_minimum_required(VERSION 2.8.12)
project (example)
find_package(pybind11 REQUIRED)
pybind11_add_module(${PROJECT_NAME} example.cpp)
Foadsf / EFT.ipynb
Last active Oct 19, 2019
Easy Fourier transform: implementing 3Blue1Brown's interpretation
View EFT.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View exportedVariables.csv
time theta1 theta2
0 0 0
0 0 0
0 0 0
0.02 -6.40192 -7.79226
0.04 -12.8038 -12.1422
0.06 -19.2058 -18.1304
0.08 -25.6077 -26.7809
0.1 -32.0096 -32.5266
0.12 -38.4115 -36.9923
model testData
extends Modelica.Icons.Example;
import Modelica.Math.Random.Generators;
import Modelica.Math.Random.Utilities;
parameter Real k = 50.0;
parameter Real J = 0.001;
Real theta1;
Real theta2;
Foadsf /
Created Jul 18, 2019
Installing DOS Navigator ( dn ) on FreeDOS
  1. Ok first of all if you have issues installing FreeDOS on VirtualBox and you get weird infinite loop Invalid Opcode errors, [here][1] I wrote a small instruction how the installation should be done.

  2. Now when you have FreeDOS booted, from [here][2] you need to install the networking software and reboot.

  3. then you can run fdnpkg update to update the installed packages

  4. but you don't need to install dn as it comes with the FreeDOS iso file. all you need to do is:

  5. run FDIMPLES package manager

  6. go to Utilities

  7. find DN2 and select it

  8. reboot

Foadsf /
Last active Apr 17, 2019
example for this question
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
Foadsf / main.c
Created Apr 15, 2019
regarding this question for array append function in C using dynamic memory allocation
View main.c
#include <stdio.h>
#include <stdlib.h>
typedef struct intlist_ {
int size;
int* list;
} intlist;
void append(intlist* arr, int value){
View test.ino
const int buttonPin = 2;
const int ledPin = 7;
int buttonState = 0;
int lastButtonState = buttonState;
bool flag = true;
bool flag_ = flag;
volatile byte state = LOW;
volatile byte state_ = state;
Foadsf / findCirc.c
Created Apr 6, 2019
find circle from to points and radius
View findCirc.c
#include <stdio.h> // NULL,
#include <math.h>
typedef struct Point {
float x;
float y;
} point;
typedef struct Circle {
point c;
<style type="text/css"> .tg {border-collapse:collapse;border-spacing:0;} .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;} .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;} .tg .tg-cmwg{background-color:#ffccc9;text-align:center;vertical-align:top} .tg .tg-baqh{text-align:center;vertical-align:top} .tg .tg-uys7{border-color:inherit;text-align:center} </style>
You can’t perform that action at this time.